.local-works-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: min(820px, calc(100dvh - 32px));
  padding: 0;
  border: 1px solid #e2e5e3;
  border-radius: 24px;
  background: #f6f7f5;
  color: #111411;
}

.local-works-dialog::backdrop { background: rgba(13, 17, 14, 0.52); backdrop-filter: blur(8px); }
.local-works-shell { display: grid; gap: 18px; padding: 24px; }
.local-works-shell > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.local-works-shell > header small { color: #168447; font-weight: 800; letter-spacing: .12em; }
.local-works-shell > header h2 { margin: 4px 0; font-size: clamp(24px, 4vw, 36px); }
.local-works-shell > header p { margin: 0; color: #69706b; }
.local-works-shell > header .local-works-owner { margin-top: 8px; color: #176d3d; font-size: 13px; font-weight: 700; }
.local-works-shell > header > button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; font-size: 28px; cursor: pointer; }
.work-share-receive { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 320px) auto; align-items: end; gap: 12px; padding: 16px; border: 1px solid #bfeccd; border-radius: 16px; background: #effcf3; }
.work-share-receive strong, .work-share-receive small, .work-share-receive label span { display: block; }
.work-share-receive small { margin-top: 4px; color: #5f6962; }
.work-share-receive label span { margin-bottom: 6px; color: #536058; font-size: 12px; font-weight: 800; }
.work-share-receive input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #cbd5ce; border-radius: 10px; background: #fff; font: inherit; letter-spacing: .05em; text-transform: uppercase; }
.work-share-receive > button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: #111411; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.local-works-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px; border: 1px solid #e2e5e3; border-radius: 16px; background: #fff; }
.local-works-toolbar > div { margin-right: auto; }
.local-works-toolbar strong, .local-works-toolbar small { display: block; }
.local-works-toolbar small { margin-top: 3px; color: #69706b; }
.local-works-toolbar button { min-height: 44px; padding: 0 16px; border: 1px solid #d9ddda; border-radius: 12px; background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.local-works-toolbar button:first-child { border-color: #1fdb68; background: #2cff73; color: #07140b; }
.local-works-toolbar span { margin-left: auto; color: #69706b; font-size: 13px; }
.local-works-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; overflow: auto; padding-right: 4px; }
.local-work-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1px solid #e2e5e3; border-radius: 18px; background: #fff; }
.local-work-preview { width: 116px; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 0; overflow: hidden; border: 0; border-radius: 12px; background-color: #e9ece9; background-image: linear-gradient(45deg, rgba(255,255,255,.48) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.48) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.48) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.48) 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; cursor: pointer; }
.local-work-preview-canvas { display: grid; place-items: center; max-width: 100%; max-height: 100%; overflow: hidden; aspect-ratio: var(--work-preview-aspect, auto); background: #fff; box-shadow: 0 1px 8px rgba(17,20,17,.12); }
.local-work-preview[data-preview-shape="portrait"] .local-work-preview-canvas { width: auto; height: 100%; }
.local-work-preview[data-preview-shape="landscape"] .local-work-preview-canvas,
.local-work-preview[data-preview-shape="balanced"] .local-work-preview-canvas { width: 100%; height: auto; }
.local-work-preview[data-preview-shape="unknown"] .local-work-preview-canvas { width: 100%; height: 100%; }
.local-work-preview img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.local-work-copy { min-width: 0; align-self: center; }
.local-work-copy strong, .local-work-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.local-work-copy strong { font-size: 16px; }
.local-work-copy small { margin-top: 6px; color: #707670; }
.local-work-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.local-work-actions button { min-height: 38px; padding: 0 12px; border: 1px solid #dfe3e0; border-radius: 10px; background: #f7f8f7; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.local-work-actions button:first-child { background: #111411; color: #fff; }
.local-work-actions .danger { margin-left: auto; color: #a52a2a; }
.local-works-empty { min-height: 220px; display: grid; place-content: center; gap: 8px; text-align: center; color: #69706b; }
.local-works-empty strong { color: #151915; font-size: 20px; }
.recent-work-grid .local-work-card.compact { display: block; padding: 0; overflow: hidden; }
.recent-work-grid .local-work-card.compact .local-work-preview { width: 100%; border-radius: 0; aspect-ratio: 16 / 10; padding: 0; }
.recent-work-grid .local-work-card.compact .local-work-copy { padding: 12px; }
.recent-work-owner { margin-left: auto; color: #168447; font-size: 12px; font-weight: 700; }
.recent-work-owner + button { margin-left: 10px; }
.work-share-result-dialog { width: min(520px, calc(100vw - 28px)); padding: 0; border: 1px solid #dfe3e0; border-radius: 22px; background: #fff; color: #111411; }
.work-share-result-dialog::backdrop { background: rgba(13, 17, 14, .52); backdrop-filter: blur(8px); }
.work-share-result-shell { display: grid; gap: 16px; padding: 22px; }
.work-share-result-shell header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.work-share-result-shell header small { color: #168447; font-weight: 800; }
.work-share-result-shell h2, .work-share-result-shell p { margin: 4px 0 0; }
.work-share-result-shell header button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #f2f4f2; font-size: 26px; cursor: pointer; }
.work-share-code { padding: 18px; border-radius: 14px; background: #eafff0; color: #083e20; font-size: clamp(24px, 7vw, 34px); letter-spacing: .08em; text-align: center; }
.work-share-result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.work-share-result-actions button, .work-share-revoke { min-height: 44px; border: 1px solid #dce2dd; border-radius: 11px; background: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.work-share-result-actions button:first-child { border-color: #1fdb68; background: #2cff73; color: #07140b; }
.work-share-revoke { color: #a52a2a; }
.work-license-transition-dialog { width: min(560px, calc(100vw - 28px)); padding: 0; border: 1px solid #dfe3e0; border-radius: 22px; background: #fff; color: #111411; }
.work-license-transition-dialog::backdrop { background: rgba(13, 17, 14, .56); backdrop-filter: blur(8px); }
.work-license-transition-shell { display: grid; gap: 16px; padding: 22px; }
.work-license-transition-shell header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.work-license-transition-shell header small { color: #168447; font-weight: 800; letter-spacing: .08em; }
.work-license-transition-shell h2, .work-license-transition-shell p { margin: 4px 0 0; }
.work-license-transition-shell header button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #f2f4f2; font-size: 26px; cursor: pointer; }
.work-license-transition-notice { padding: 14px; border: 1px solid #ccebd6; border-radius: 13px; background: #f2fff6; color: #315b40; line-height: 1.55; }
.work-license-transition-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.work-license-transition-actions button { min-height: 46px; padding: 0 14px; border: 1px solid #dce2dd; border-radius: 11px; background: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.work-license-transition-actions button:first-child { border-color: #1fdb68; background: #2cff73; color: #07140b; }
.work-license-transition-actions .danger { border-color: #efc6c6; color: #a52a2a; }
.work-license-transition-shell > small { color: #7a817b; }

@media (max-width: 720px) {
  .recent-work-section { display: block; }
  .recent-work-section .workbench-head { flex-wrap: wrap; }
  .local-works-dialog { width: 100vw; max-width: none; max-height: calc(100dvh - env(safe-area-inset-top)); margin: env(safe-area-inset-top) 0 0; border-radius: 22px 22px 0 0; }
  .local-works-shell { padding: 18px 14px calc(20px + env(safe-area-inset-bottom)); }
  .local-works-list { grid-template-columns: 1fr; }
  .local-works-toolbar span { width: 100%; margin-left: 0; }
  .work-share-receive { grid-template-columns: 1fr; align-items: stretch; }
  .work-share-result-actions { grid-template-columns: 1fr; }
  .work-license-transition-actions { grid-template-columns: 1fr; }
  .recent-work-owner { width: 100%; margin: 4px 0 0; order: 3; }
}
