:root {
  color-scheme: dark;
  --bg: #111318;
  --panel: #1b1f27;
  --panel-2: #222835;
  --line: #343b49;
  --text: #f4f6f8;
  --muted: #aeb7c4;
  --faint: #747e8d;
  --green: #53a86b;
  --yellow: #c8a64d;
  --gray: #4b5565;
  --red: #e06c68;
  --blue: #69a8d7;
  --key: #d8dde5;
  --key-text: #171b22;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(105, 168, 215, 0.12), transparent 340px),
    radial-gradient(circle at top right, rgba(83, 168, 107, 0.16), transparent 320px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 19, 24, 0.94);
  backdrop-filter: blur(10px);
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1320px, calc(100vw - 40px));
  min-height: 60px;
  margin: 0 auto;
}

.brand-link,
.nav-links a {
  color: var(--text);
  text-decoration: none;
}

.brand-link {
  flex: 0 0 auto;
  font-size: 1.15rem;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 800;
}

.nav-links .nav-play {
  min-width: 74px;
  background: var(--key);
  color: var(--key-text);
  text-align: center;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.brand-link:hover,
.brand-link:focus-visible {
  color: var(--text);
}

.nav-links .nav-play:hover,
.nav-links .nav-play:focus-visible {
  background: white;
  color: var(--key-text);
}

.nav-links .nav-active:not(.nav-play) {
  background: rgba(105, 168, 215, 0.14);
  color: #d5ecff;
}

.nav-links .nav-play.nav-active {
  background: white;
  color: var(--key-text);
}

.app-shell {
  width: min(1320px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 36px;
}

.topbar {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  text-align: center;
}

.topbar p {
  width: min(680px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hidden {
  display: none;
}

.board {
  display: grid;
  justify-items: center;
}

.game-panel {
  display: grid;
  gap: 16px;
  width: min(560px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 31, 39, 0.94);
  box-shadow: var(--shadow);
}

.game-head,
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.game-title {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 950;
  line-height: 1;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stats-row div {
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.stats-row div > span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.stats-row strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 1.35rem;
}

.status-line {
  min-height: 25px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.status-line[data-tone="good"] {
  color: #a7e0b8;
}

.status-line[data-tone="warn"] {
  color: #f1d889;
}

.status-line[data-tone="bad"] {
  color: #f3aaa7;
}

.word-board {
  display: grid;
  gap: 7px;
  justify-content: center;
}

.word-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  width: min(360px, calc(100vw - 72px));
}

.word-cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: #141820;
  color: var(--text);
  font-size: clamp(1.35rem, 8vw, 2.05rem);
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.word-cell.absent {
  border-color: var(--gray);
  background: var(--gray);
}

.word-cell.present {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #17130a;
}

.word-cell.correct {
  border-color: var(--green);
  background: var(--green);
  color: #07150c;
}

.shake {
  animation: shake 0.36s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-7px);
  }

  40%,
  80% {
    transform: translateX(7px);
  }
}

.control-row {
  justify-content: center;
}

.control-row button,
.ghost-button,
.feedback-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.control-row button,
.ghost-button {
  padding: 9px 14px;
  background: var(--key);
  color: var(--key-text);
}

.ghost-button {
  min-width: 124px;
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.keyboard {
  display: grid;
  gap: 7px;
  width: 100%;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.key {
  display: grid;
  place-items: center;
  min-width: 0;
  width: clamp(27px, 8vw, 43px);
  height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--key);
  color: var(--key-text);
  font-size: 0.92rem;
  font-weight: 950;
}

.key.wide {
  width: clamp(54px, 15vw, 76px);
  font-size: 0.78rem;
}

.key.absent {
  background: var(--gray);
  color: var(--text);
}

.key.present {
  background: var(--yellow);
  color: #17130a;
}

.key.correct {
  background: var(--green);
  color: #07150c;
}

.key.ready {
  background: #58d98f;
  color: #06140b;
  animation: enter-breathe 1.05s ease-in-out infinite;
}

@keyframes enter-breathe {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(88, 217, 143, 0.18),
      0 0 0 2px rgba(88, 217, 143, 0.45);
    transform: translateY(0);
  }

  50% {
    box-shadow:
      0 0 0 8px rgba(88, 217, 143, 0.18),
      0 0 18px rgba(88, 217, 143, 0.58);
    transform: translateY(-2px);
  }
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.choice-tile {
  display: grid;
  place-items: center;
  min-height: 86px;
  border: 1px solid rgba(105, 168, 215, 0.25);
  border-radius: 8px;
  background: #d8dde5;
  color: #111318;
  font-size: 2rem;
  font-weight: 950;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.choice-tile:hover,
.choice-tile:focus-visible {
  background: #58d98f;
  box-shadow: 0 0 0 5px rgba(88, 217, 143, 0.16);
  transform: translateY(-2px);
}

.vexle-game {
  width: min(980px, 100%);
}

.prompt-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  text-align: center;
}

.prompt-kicker,
.prompt-country {
  margin: 0;
}

.prompt-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.prompt-country {
  color: var(--text);
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 950;
  line-height: 1;
}

.draw-stage {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
    #151922;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

#drawCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  height: auto;
  touch-action: none;
  background: white;
}

.tool-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.palette,
.tool-grid,
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.swatch.is-active {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(88, 217, 143, 0.35);
}

.custom-color,
.size-control {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
}

.custom-color input {
  width: 52px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
}

.tool-button,
.submit {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.tool-button {
  padding: 8px 12px;
  background: #2d3340;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tool-button.is-active {
  background: #d8dde5;
  color: #111318;
}

.size-control input {
  width: min(260px, 52vw);
}

.action-row {
  justify-content: space-between;
}

.submit {
  min-width: 170px;
  padding: 10px 18px;
  background: #58d98f;
  color: #06140b;
}

.result-panel {
  display: grid;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compare-grid figure {
  position: relative;
  margin: 0;
}

.compare-grid canvas {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.result-preview.is-empty::after {
  content: "?";
  position: absolute;
  inset: 1px 1px 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7f8fb, #ffffff);
  color: #a3adbc;
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
}

.compare-grid figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.score-readout {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.score-readout strong {
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  line-height: 1;
}

.score-readout span {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.feedback {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 9, 12, 0.68);
  backdrop-filter: blur(6px);
}

.feedback.hidden {
  display: none;
}

.feedback-panel {
  width: min(520px, 100%);
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 31, 39, 0.98);
  box-shadow: var(--shadow);
  padding: 24px;
  color: var(--text);
  text-align: center;
}

.feedback.good .feedback-panel {
  border-color: rgba(83, 168, 107, 0.9);
}

.feedback.bad .feedback-panel {
  border-color: rgba(224, 108, 104, 0.9);
}

.feedback-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 900;
}

.feedback.good .feedback-kicker,
.feedback.good .feedback-title {
  color: #a7e0b8;
}

.feedback.bad .feedback-kicker,
.feedback.bad .feedback-title {
  color: #f3aaa7;
}

.feedback-title {
  min-height: 0;
  margin: 0 0 12px;
  font-size: clamp(2rem, 7vw, 3.8rem);
  font-weight: 900;
  line-height: 1.08;
}

.feedback p {
  overflow-wrap: anywhere;
}

.feedback-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.feedback-stats span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.feedback-stats strong {
  color: var(--text);
  font-size: 1.45rem;
}

.feedback-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.feedback-actions button:first-child {
  background: var(--key);
  color: var(--key-text);
}

.feedback-actions button:last-child {
  background: #2d3340;
  color: white;
}

.seo-content,
.content-shell {
  width: min(920px, 100%);
  margin: 42px auto 0;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 31, 39, 0.9);
  box-shadow: var(--shadow);
  padding: 20px;
}

.seo-content h2,
.content-card h1,
.content-card h2 {
  margin: 0 0 12px;
}

.seo-content h3,
.content-card h3 {
  margin: 18px 0 8px;
}

.seo-content p,
.seo-content li,
.content-card p,
.content-card li {
  color: var(--muted);
  line-height: 1.65;
}

.seo-content a,
.content-card a {
  color: #d5ecff;
}

.faq-accordion {
  width: min(1080px, 100%);
  padding: 18px 0 0;
  color: var(--text);
}

.faq-accordion h2 {
  margin: 0 0 18px;
  color: #f4f6f8;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.faq-item summary h2 {
  margin: 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1.25;
}

.faq-item {
  border: 1px solid rgba(105, 168, 215, 0.22);
  border-radius: 8px;
  background: rgba(27, 31, 39, 0.92);
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.faq-item + .faq-item {
  margin-top: 10px;
}

.faq-item:hover {
  border-color: rgba(88, 217, 143, 0.42);
  background: rgba(34, 40, 53, 0.96);
}

.faq-item summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 13px 18px 13px 36px;
  color: var(--text);
  font-weight: 900;
  list-style: none;
  outline: 0;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "";
  position: absolute;
  left: 17px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #58d98f;
  transition: transform 0.18s ease;
  filter: drop-shadow(0 0 7px rgba(88, 217, 143, 0.45));
}

.faq-item[open] summary::before {
  transform: rotate(90deg);
}

.faq-body {
  padding: 0 36px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.faq-body h3 {
  margin: 14px 0 8px;
  color: #8fc6ef;
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
}

.faq-body p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.faq-body a {
  color: #b7e9c8;
  font-weight: 800;
}

.content-cta {
  margin-top: 24px;
}

.content-card .content-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--key);
  color: var(--key-text);
  font-weight: 900;
  text-decoration: none;
}

.content-shell {
  padding-bottom: 36px;
  padding-top: 10px;
}

.content-card {
  max-width: 860px;
  margin: 0 auto;
}

.content-card h1 {
  max-width: none;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.content-meta {
  margin-top: -4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.content-card ul,
.content-card ol {
  padding-left: 1.35rem;
}

.site-footer {
  display: flex;
  justify-content: center;
  width: min(1320px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 8px 0 34px;
}

.saasdance-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  line-height: 0;
}

.saasdance-badge:focus-visible {
  outline: 3px solid rgba(88, 217, 143, 0.55);
  outline-offset: 4px;
}

.saasdance-badge img {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .primary-nav {
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 8px 0;
  }

  .nav-links {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 4px 0 8px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 44px;
  }

  .faq-accordion {
    width: 100%;
  }
}

@media (min-width: 1100px) {
  .topbar {
    margin-bottom: 18px;
  }

  .vexle-board {
    justify-items: stretch;
  }

  .game-panel.vexle-game {
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    width: min(1220px, 100%);
    padding: 20px;
  }

  .vexle-game .game-head,
  .vexle-game .prompt-card,
  .vexle-game .result-panel {
    grid-column: 1 / -1;
  }

  .vexle-game .draw-stage {
    grid-column: 1;
    grid-row: 3 / span 2;
  }

  .vexle-game .tool-panel,
  .vexle-game .action-row {
    grid-column: 2;
  }

  .vexle-game .tool-panel {
    align-content: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(34, 40, 53, 0.68);
  }

  .vexle-game .palette,
  .vexle-game .tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .vexle-game .swatch,
  .vexle-game .tool-button {
    width: 100%;
  }

  .vexle-game .custom-color,
  .vexle-game .size-control {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    width: 100%;
  }

  .vexle-game .custom-color input,
  .vexle-game .size-control input {
    width: 100%;
  }

  .vexle-game .action-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .vexle-game .submit,
  .vexle-game .ghost-button {
    width: 100%;
  }

  .vexle-game .result-panel {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .vexle-game .compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .vexle-game .score-readout {
    grid-column: 2;
    grid-row: 1;
    min-height: 100%;
    align-content: center;
  }

  .vexle-game .result-panel .stats-row {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  .primary-nav {
    width: min(100vw - 24px, 1120px);
    gap: 10px;
  }

  .brand-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .nav-links a {
    padding: 7px 9px;
    font-size: 0.88rem;
  }

  .app-shell {
    width: min(100vw - 18px, 1120px);
    padding: 10px 0 28px;
  }

  .topbar {
    margin-bottom: 10px;
  }

  .topbar p {
    font-size: 0.92rem;
    line-height: 1.4;
  }

  .game-panel {
    gap: 12px;
    padding: 12px;
  }

  .game-head {
    align-items: flex-start;
  }

  .game-title {
    font-size: clamp(1.45rem, 8vw, 1.9rem);
  }

  .prompt-card {
    padding: 12px 10px;
  }

  .prompt-country {
    font-size: clamp(1.65rem, 10vw, 2.6rem);
    overflow-wrap: anywhere;
  }

  .status-line {
    font-size: 0.9rem;
  }

  .ghost-button {
    min-width: 104px;
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  .stats-row {
    gap: 6px;
  }

  .stats-row div {
    min-height: 58px;
    padding: 8px;
  }

  .stats-row strong {
    font-size: 1.12rem;
  }

  .word-row {
    gap: 5px;
    width: min(330px, calc(100vw - 48px));
  }

  .word-cell {
    border-width: 2px;
  }

  .keyboard-row {
    gap: 4px;
  }

  .key {
    height: 44px;
    font-size: 0.82rem;
  }

  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .palette,
  .tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .swatch,
  .tool-button {
    width: 100%;
  }

  .swatch {
    height: 40px;
  }

  .custom-color,
  .size-control {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    width: 100%;
    gap: 8px;
  }

  .custom-color input,
  .size-control input {
    width: 100%;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .submit,
  .action-row .ghost-button {
    width: 100%;
    min-width: 0;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .score-readout {
    padding: 10px;
  }

  .faq-item summary {
    padding: 12px 14px 12px 32px;
  }

  .faq-item summary::before {
    left: 14px;
  }

  .faq-body {
    padding: 0 16px 16px;
  }

  .feedback-actions,
  .feedback-stats {
    grid-template-columns: 1fr;
  }

  .feedback {
    padding: 12px;
  }

  .feedback-panel,
  .content-card {
    padding: 16px;
  }
}

@media (max-width: 380px) {
  .primary-nav {
    width: min(100vw - 16px, 1120px);
  }

  .brand-link {
    font-size: 1rem;
  }

  .nav-links a {
    font-size: 0.82rem;
    padding-inline: 8px;
  }

  .app-shell {
    width: min(100vw - 12px, 1120px);
  }

  .game-panel {
    padding: 9px;
  }

  #drawCanvas {
    aspect-ratio: 4 / 3;
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .custom-color,
  .size-control {
    grid-template-columns: 1fr;
  }

  .custom-color input {
    height: 42px;
  }
}
