.completion-cover { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; border-radius: inherit; background: rgb(248 247 240 / 38%); backdrop-filter: blur(2px); }
.completion-card { width: min(100%, 400px); max-height: 100%; overflow: auto; padding: 28px; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: rgb(252 251 245 / 95%); box-shadow: 0 12px 50px #183f3214; }
.completion-card .eyebrow { margin: 0 0 12px; }
.app-page .completion-card h2 { font-size: clamp(24px, 3vw, 38px); line-height: 1.12; margin: 0 0 20px; }
.completion-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 18px; }
.completion-metrics > div { display: flex; flex-direction: column-reverse; gap: 4px; }
.completion-metrics dd { margin: 0; font: 28px/1.15 Georgia, serif; font-variant-numeric: tabular-nums; }
.completion-metrics dt { font-size: 11px; line-height: 1.5; color: var(--muted); }
.completion-card .button { width: 100%; }
.completion-dismiss { min-height: 44px; border: 0; background: none; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.result-share-dialog { width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.result-share-dialog::backdrop { background: #183f3266; backdrop-filter: blur(2px); }
.result-share-dialog header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 12px; background: var(--paper); }
.app-page .result-share-dialog h2 { font-size: 28px; margin: 0; }
.result-share-dialog header button { flex-shrink: 0; min-width: 44px; min-height: 44px; font-size: 28px; background: none; border: 0; }
.result-share-dialog img, .shared-result-image { display: block; width: 100%; height: auto; border-radius: 8px; }
.result-share-dialog p, .result-share-dialog label { font-size: 13px; line-height: 1.6; }
.result-share-dialog input { width: 100%; min-width: 0; margin-top: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.shared-result-page { max-width: 780px; margin: 48px auto; text-align: center; }
.shared-result-page h1 { margin: 12px 0 28px; }
.shared-result-page form { margin: 28px 0 14px; }
.shared-result-page > p:last-child { color: var(--muted); font-size: 14px; line-height: 1.6; }
.app-page .game:fullscreen .board-tools:has([data-maze-target="completionShow"]:not([hidden])) { grid-template-columns: 1fr auto auto; }
.app-page .game:fullscreen .board-tools:has([data-maze-target="completionShow"]:not([hidden])) > p { display: none; }
@media (max-width: 600px), (max-height: 500px) {
  .completion-cover { padding: 8px; }
  .completion-card { padding: 16px; }
  .app-page .completion-card h2 { font-size: 24px; margin-bottom: 12px; }
  .completion-metrics { gap: 10px; }
  .completion-metrics dd { font-size: 23px; }
  .result-share-dialog { padding: 16px; }
  .app-page .result-share-dialog h2 { font-size: 23px; }
  .share-actions { display: grid; grid-template-columns: 1fr; }
  .app-page .game:fullscreen .board-tools:has([data-maze-target="completionShow"]:not([hidden])) { grid-template-columns: 1fr auto; }
  .app-page .game:fullscreen [data-maze-target="completionShow"] { grid-column: 1 / -1; }
}
