:root {
  --ink: #17211d;
  --ink-soft: #35413b;
  --muted: #69736e;
  --paper: #f5f2e9;
  --paper-deep: #e8e2d5;
  --white: #fffef9;
  --coral: #ed6246;
  --coral-soft: #fee2d9;
  --teal: #167b70;
  --teal-soft: #d9efea;
  --blue: #4b65c6;
  --blue-soft: #e1e6fb;
  --yellow: #eebd42;
  --yellow-soft: #fff0bd;
  --danger: #b83b2d;
  --line: #d2ccbf;
  --shadow: 0 20px 60px rgba(42, 38, 29, 0.14);
  --radius: 7px;
}

* { box-sizing: border-box; }

html { min-width: 0; }

body {
  display: flow-root;
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  background-color: #dcd7ca;
  background-image:
    linear-gradient(rgba(71, 67, 57, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 67, 57, 0.055) 1px, transparent 1px);
  background-size: 24px 24px;
  letter-spacing: 0;
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: "Fraunces", serif; }
h1 { margin-bottom: 12px; font-size: clamp(34px, 5vw, 58px); line-height: 1.02; }
h2 { font-size: 25px; }
p { color: var(--muted); line-height: 1.6; }

.hidden { display: none !important; }

.app-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100dvh - 104px);
  margin: 16px auto;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 29, 0.14);
  border-radius: 8px;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(23, 33, 29, 0.045) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
  box-shadow: var(--shadow);
}

.app-header {
  height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 242, 233, 0.95);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: "Fraunces", serif;
  font-size: 25px;
  font-weight: 700;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  transform: rotate(-3deg);
}
.brand-mark span { border: 2px solid var(--ink); background: var(--white); }
.brand-mark span:nth-child(2) { background: var(--coral); }
.brand-mark span:nth-child(3) { background: var(--yellow); }
.brand-mark span:nth-child(4) { background: var(--teal); }

.header-status {
  justify-self: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-toggle {
  height: 34px;
  display: inline-grid;
  grid-template-columns: repeat(2, 34px);
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}
.language-toggle button {
  padding: 0;
  border: 0;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.language-toggle button.active { color: var(--white); background: var(--ink); }

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
}
.icon-button:hover { border-color: var(--ink); background: var(--yellow-soft); }
.icon-button:disabled { cursor: not-allowed; opacity: 0.38; }
.icon-button i { width: 19px; height: 19px; }

.view { display: none; min-height: calc(100dvh - 172px); padding: 34px; }
.view.active { display: block; animation: view-in 220ms ease-out both; }
.app-shell:has(#draw-view.active, #transition-view.active, #guess-view.active) { min-height: calc(100dvh - 32px); }
.app-shell:has(#draw-view.active, #transition-view.active, #guess-view.active) .view.active { min-height: calc(100dvh - 102px); }
.app-shell:has(#draw-view.active, #transition-view.active, #guess-view.active) + .site-footer { display: none; }
#draw-view.active {
  -webkit-user-select: none;
  user-select: none;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.eyebrow i { width: 16px; height: 16px; }

.setup-layout {
  width: min(100%, 1020px);
  min-height: 658px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: clamp(34px, 7vw, 82px);
  align-items: center;
}

.setup-intro > p { max-width: 480px; font-size: 16px; }

.set-ticket {
  width: min(100%, 400px);
  margin-top: 30px;
  padding: 18px 20px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--yellow-soft);
  box-shadow: 7px 7px 0 var(--ink);
}
.set-ticket label, .set-ticket strong, .set-ticket small { display: block; }
.set-ticket label { margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.set-ticket strong { margin-bottom: 5px; font-family: "Fraunces", serif; font-size: 22px; }
.set-ticket select {
  width: 100%;
  min-height: 44px;
  margin-bottom: 6px;
  padding: 7px 34px 7px 10px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  background: var(--white);
  font-family: "Fraunces", serif;
  font-size: 18px;
  font-weight: 700;
}
.set-ticket small { color: var(--muted); }

.setup-controls { display: grid; gap: 25px; }
.daily-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.daily-rules > div {
  min-height: 118px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.daily-rules .option-icon { top: 14px; left: 14px; }
.daily-rules strong, .daily-rules small { display: block; }
.daily-rules strong { margin-bottom: 2px; font-size: 14px; }
.daily-rules small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.recall-card {
  min-height: 88px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 68px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--blue-soft);
}
.recall-card.hidden { display: none; }
.recall-card .option-icon { top: 50%; left: 14px; transform: translateY(-50%); }
.recall-card strong, .recall-card small { display: block; }
.recall-card small { margin-top: 3px; color: var(--muted); line-height: 1.35; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 12px; font-weight: 700; }

.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.option-card {
  min-width: 0;
  min-height: 134px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 2px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
}
.option-card:hover { border-color: var(--ink); }
.option-card:has(input:checked) { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.option-card input, .list-option input { position: absolute; opacity: 0; pointer-events: none; }
.option-card strong { font-size: 14px; }
.option-card small { color: var(--muted); white-space: nowrap; }

.option-icon {
  width: 38px;
  height: 38px;
  position: absolute;
  top: 13px;
  left: 13px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.option-icon i { width: 19px; height: 19px; }
.option-icon.coral { background: var(--coral-soft); color: var(--coral); }
.option-icon.teal { background: var(--teal-soft); color: var(--teal); }
.option-icon.blue { background: var(--blue-soft); color: var(--blue); }

.option-list { display: grid; gap: 8px; }
.list-option {
  min-height: 66px;
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
}
.list-option:hover { border-color: var(--ink); }
.list-option:has(input:checked) { border: 2px solid var(--ink); background: var(--teal-soft); }
.list-option strong, .list-option small { display: block; }
.list-option strong { font-size: 14px; }
.list-option small { color: var(--muted); font-size: 12px; }
.list-option > i { width: 20px; height: 20px; color: var(--muted); }

.difficulty {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  font-weight: 700;
}
.difficulty.hard { background: var(--coral); }
.difficulty.middle { background: var(--blue); }
.difficulty.easy { background: var(--teal); }

.primary-button, .secondary-button, .danger-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}
.primary-button { color: var(--white); border: 1px solid var(--ink); background: var(--ink); }
.primary-button:hover { border-color: var(--teal); background: var(--teal); }
.primary-button:disabled { cursor: not-allowed; opacity: 0.42; }
.secondary-button { border: 1px solid var(--ink); background: var(--white); }
.secondary-button:hover { background: var(--teal-soft); }
.danger-button { color: var(--white); border: 1px solid var(--danger); background: var(--danger); }
.primary-button i, .secondary-button i, .danger-button i { width: 18px; height: 18px; }
.start-button { width: 100%; min-height: 52px; }

.game-bar {
  width: min(100%, 1040px);
  min-height: 52px;
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: 130px minmax(200px, 1fr) 130px;
  align-items: center;
  gap: 18px;
}
.game-bar > div:first-child { display: flex; flex-direction: column; }
.game-phase { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.game-bar .text-button { justify-self: end; }

.text-button {
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}
.text-button:hover { color: var(--danger); }

.round-dots { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; }
.round-dot { height: 7px; border-radius: 999px; background: var(--paper-deep); }
.round-dot.done { background: var(--teal); }
.round-dot.current { background: var(--coral); }
.round-dot.answered { background: var(--blue); }

.draw-layout {
  width: min(100%, 1040px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 28px;
}

.draw-stage { min-width: 0; }
.word-presenter { min-height: 93px; display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.word-presenter span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.word-presenter h1 { margin: 0; font-size: clamp(38px, 5vw, 62px); }

.canvas-frame {
  width: min(100%, 680px);
  aspect-ratio: 1.28;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background-color: var(--white);
  background-image:
    linear-gradient(#e9e5da 1px, transparent 1px),
    linear-gradient(90deg, #e9e5da 1px, transparent 1px);
  background-size: 22px 22px;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.canvas-frame.locked canvas { pointer-events: none; }
#drawing-canvas { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }

.countdown-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--ink);
  background: rgba(255, 254, 249, 0.92);
  transition: opacity 160ms ease;
}
.countdown-overlay.hide { opacity: 0; pointer-events: none; }
.countdown-overlay span { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; }
.countdown-overlay strong { min-height: 90px; font-family: "Fraunces", serif; font-size: 82px; line-height: 1; }
.countdown-overlay.go strong { color: var(--coral); font-size: 58px; }

.draw-controls {
  width: min(100%, 680px);
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.tool-group { display: flex; gap: 7px; }

.draw-sidebar { min-width: 0; padding-top: 94px; }
.timer-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.timer-card > span { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.timer-card > strong { display: block; margin: 4px 0 12px; font-family: "Fraunces", serif; font-size: 46px; line-height: 1; }
.timer-track { height: 8px; overflow: hidden; border-radius: 999px; background: var(--paper-deep); }
.timer-track span { width: 100%; height: 100%; display: block; transform-origin: left; background: var(--coral); }

.board-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 14px; }
.preview-cell { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: 10px; font-weight: 700; }
.preview-cell.done { border-color: var(--teal); background: var(--teal-soft); color: var(--teal); }
.preview-cell.current { border: 2px solid var(--coral); background: var(--coral-soft); color: var(--coral); }
.draw-sidebar > p { margin: 12px 0 0; font-size: 12px; }

#transition-view.active { display: grid; place-items: center; }
.transition-card { width: min(100%, 530px); padding: 46px; text-align: center; }
.transition-card .eyebrow { justify-content: center; }
.transition-card h1 { font-size: 43px; }
.transition-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow-soft);
  box-shadow: 5px 5px 0 var(--ink);
}
.transition-icon i { width: 30px; height: 30px; }

.guess-layout {
  width: min(100%, 980px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.guess-drawing-panel { min-width: 0; }
.drawing-label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
#guess-canvas {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background-color: var(--white);
  background-image:
    linear-gradient(#e9e5da 1px, transparent 1px),
    linear-gradient(90deg, #e9e5da 1px, transparent 1px);
  background-size: 20px 20px;
}
.guess-nav { display: flex; justify-content: space-between; margin-top: 9px; }

.answer-panel { min-width: 0; }
.answer-panel h1 { margin-bottom: 8px; font-size: 39px; }
.answer-panel > div:first-child p { margin-bottom: 25px; }

.hard-answer label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; }
.answer-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.answer-input-row input {
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--white);
}
.answer-input-row input::placeholder { color: #aaa59a; }

.word-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 310px; overflow: auto; padding: 2px; }
.word-choice {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.word-choice:hover, .word-choice.current { color: var(--white); border-color: var(--blue); background: var(--blue); }
.word-choice.used-middle::after { content: " · " attr(data-used-label); opacity: 0.7; font-size: 10px; }

.answer-summary { display: flex; align-items: center; justify-content: space-between; margin-top: 23px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.answer-summary span { color: var(--muted); font-size: 12px; }
.answer-summary strong { font-size: 16px; }
#finish-guessing { width: 100%; margin-top: 12px; }

.results-head {
  width: min(100%, 1030px);
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.results-head h1 { margin-bottom: 6px; }
.results-head p { margin-bottom: 0; }
.score-seal {
  width: 116px;
  height: 116px;
  flex: 0 0 116px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--teal-soft);
  box-shadow: 5px 5px 0 var(--ink);
}
.score-seal strong { font-family: "Fraunces", serif; font-size: 48px; line-height: 0.9; }
.score-seal span { color: var(--muted); font-size: 13px; }

.result-stats {
  width: min(100%, 1030px);
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.result-stats > div { min-width: 0; padding: 12px 16px; border-right: 1px solid var(--line); }
.result-stats > div:last-child { border-right: 0; }
.result-stats span, .result-stats strong { display: block; }
.result-stats span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.result-stats strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.results-grid { width: min(100%, 1030px); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.result-card { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); }
.result-card.correct { border-top: 4px solid var(--teal); }
.result-card.wrong { border-top: 4px solid var(--coral); }
.result-drawing {
  width: 100%;
  aspect-ratio: 1.3;
  display: block;
  border: 1px solid var(--paper-deep);
  background-color: var(--paper);
  background-image:
    linear-gradient(#e5e0d5 1px, transparent 1px),
    linear-gradient(90deg, #e5e0d5 1px, transparent 1px);
  background-size: 13px 13px;
}
.result-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: center; margin-top: 8px; }
.result-copy strong, .result-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-copy strong { font-size: 12px; }
.result-copy small { color: var(--muted); font-size: 10px; }
.result-mark { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--white); }
.correct .result-mark { background: var(--teal); }
.wrong .result-mark { background: var(--coral); }
.result-mark i { width: 14px; height: 14px; }

.results-actions { width: min(100%, 1030px); margin: 22px auto 0; display: flex; justify-content: flex-end; gap: 9px; }

.site-footer {
  width: min(1180px, calc(100% - 32px));
  min-height: 54px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
}
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; }
.site-footer a { color: inherit; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--ink); }

.ad-placement {
  width: min(100%, 1030px);
  min-height: 90px;
  margin: 24px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.58);
}
.ad-placement[hidden] { display: none; }
.ad-label { display: block; padding: 4px 8px 0; color: var(--muted); font-size: 9px; text-align: center; text-transform: uppercase; }

.content-shell {
  width: min(780px, calc(100% - 32px));
  min-height: calc(100vh - 100px);
  margin: 16px auto;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 29, 0.14);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.content-header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}
.content-header .brand { text-decoration: none; }
.content-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; }
.content-nav a { color: var(--muted); font-size: 12px; font-weight: 700; text-underline-offset: 3px; }
.content-nav a[aria-current="page"] { color: var(--ink); }
.content-body { padding: clamp(28px, 6vw, 58px); }
.content-body h1 { max-width: 650px; }
.content-body h2 { margin-top: 34px; margin-bottom: 10px; font-size: 24px; }
.content-body h3 { margin-top: 25px; margin-bottom: 8px; }
.content-body p, .content-body li { max-width: 680px; color: var(--ink-soft); line-height: 1.7; }
.content-body ul, .content-body ol { padding-left: 22px; }
.content-body .notice {
  margin: 24px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
}
.content-body .notice p { margin: 0; }
.content-body code { padding: 2px 5px; border-radius: 3px; background: var(--paper-deep); }

.confirm-dialog {
  width: min(calc(100% - 30px), 420px);
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.confirm-dialog::backdrop { background: rgba(23, 33, 29, 0.48); }
.confirm-dialog form { padding: 28px; text-align: center; }
.dialog-icon { width: 55px; height: 55px; margin: 0 auto 17px; display: grid; place-items: center; border-radius: 50%; background: var(--coral-soft); color: var(--coral); }
.dialog-icon i { width: 24px; height: 24px; }
.dialog-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 20px; }

@media (max-width: 820px) {
  body { background: var(--paper); }
  .app-shell { width: 100%; min-height: calc(100dvh - 70px); margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .app-header { height: 60px; padding: 0 14px; }
  .brand { font-size: 22px; }
  .brand-mark { width: 30px; height: 30px; }
  .view { min-height: calc(100dvh - 130px); padding: 22px 15px; }
  .app-shell:has(#draw-view.active, #transition-view.active, #guess-view.active) { min-height: 100dvh; }
  .app-shell:has(#draw-view.active, #transition-view.active, #guess-view.active) .view.active { min-height: calc(100dvh - 60px); }

  .setup-layout { min-height: 0; display: block; }
  .setup-intro { margin-bottom: 34px; }
  .set-ticket { box-shadow: 4px 4px 0 var(--ink); }
  .setup-controls { gap: 22px; }

  .game-bar { grid-template-columns: 92px minmax(100px, 1fr) 52px; gap: 9px; margin-bottom: 17px; }
  .game-bar .text-button { padding: 0 4px; font-size: 12px; }
  .round-dots { gap: 3px; }

  .draw-layout { display: block; }
  .word-presenter { min-height: 76px; }
  .canvas-frame { width: 100%; aspect-ratio: 1; }
  .draw-sidebar { padding-top: 14px; }
  .timer-card { display: grid; grid-template-columns: auto 52px minmax(80px, 1fr); align-items: center; gap: 12px; padding: 12px; }
  .timer-card > strong { margin: 0; font-size: 29px; }
  .timer-track { margin: 0; }
  .board-preview { grid-template-columns: repeat(8, 1fr); }
  .draw-sidebar > p { display: none; }

  .guess-layout { display: block; }
  .guess-drawing-panel { width: min(100%, 390px); margin: 0 auto 24px; }
  #guess-canvas { aspect-ratio: 1.35; }
  .answer-panel h1 { font-size: 33px; }
  .word-list { max-height: none; }

  .results-head { align-items: flex-start; }
  .score-seal { width: 94px; height: 94px; flex-basis: 94px; }
  .score-seal strong { font-size: 39px; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { width: 100%; margin: 0; padding: 16px; background: var(--paper); }
  .content-shell { width: 100%; min-height: 100vh; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
}

@media (max-width: 520px) {
  .header-status { display: none; }
  .app-header { grid-template-columns: 1fr auto; }
  .header-actions { grid-column: 2; }
  #setup-view { padding-top: 18px; padding-bottom: 18px; }
  .setup-intro { margin-bottom: 24px; }
  .setup-intro .eyebrow { margin-bottom: 10px; }
  .setup-intro h1 { margin-bottom: 8px; font-size: 36px; }
  .setup-intro > p { margin-bottom: 0; line-height: 1.45; }
  .set-ticket { margin-top: 20px; padding: 14px 16px; }
  .setup-controls { gap: 18px; }
  .daily-rules { grid-template-columns: 1fr; }
  .daily-rules > div { min-height: 82px; padding: 12px 12px 12px 62px; align-items: center; }
  .daily-rules .option-icon { top: 50%; left: 12px; transform: translateY(-50%); }
  .recall-card { grid-template-columns: 1fr; padding-right: 12px; }
  .recall-card .secondary-button { width: 100%; }
  legend { margin-bottom: 9px; }
  .option-grid { grid-template-columns: 1fr; }
  .option-card { min-height: 68px; padding: 9px 10px 9px 58px; justify-content: center; }
  .option-icon { left: 10px; }
  .option-icon { top: 50%; transform: translateY(-50%); }
  .list-option { grid-template-columns: 32px minmax(0, 1fr) 20px; gap: 9px; }
  .list-option small { line-height: 1.35; }
  .word-presenter { align-items: flex-start; flex-direction: column; justify-content: center; gap: 2px; }
  .word-presenter h1 { max-width: 100%; overflow-wrap: anywhere; font-size: 35px; }
  .canvas-frame { aspect-ratio: 0.95; }
  .board-preview { grid-template-columns: repeat(8, 1fr); gap: 3px; }
  .draw-controls .primary-button { padding: 0 12px; }
  .answer-input-row { grid-template-columns: 1fr; }
  .answer-input-row .primary-button { width: 100%; }
  .result-stats { grid-template-columns: 1fr; }
  .result-stats > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .result-stats > div:last-child { border-bottom: 0; }
  .results-head h1 { font-size: 31px; }
  .score-seal { width: 82px; height: 82px; flex-basis: 82px; }
  .score-seal strong { font-size: 34px; }
  .results-actions { display: grid; grid-template-columns: 1fr; }
  .dialog-actions { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 10px; }
  .site-footer nav { justify-content: flex-start; }
  .content-header { align-items: flex-start; flex-direction: column; padding-top: 14px; padding-bottom: 14px; }
  .content-nav { justify-content: flex-start; }
  .content-body { padding: 28px 16px; }
}

@media (max-width: 350px) {
  .view { padding-left: 11px; padding-right: 11px; }
  .game-bar { grid-template-columns: 76px minmax(80px, 1fr) 45px; }
  .round-dots { gap: 2px; }
  .results-grid { gap: 6px; }
  .result-card { padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}