:root {
  --bg: #ffffff;
  --app-bg: #fcfbfc;
  --surface: #ffffff;
  --surface-alt: #eaf7fa;
  --border: #a9d6e0;
  --text: #1c2b30;
  --text-dim: #5b7680;
  --accent: #2f7fb0;
  --green: #4caf50;
  --red: #e53935;
  --orange: #fb8c00;
  --yellow: #fbc02d;
  --pale-green: #a5d6a7;
  --pale-red: #ef9a9a;
  --grey: #dbe9ec;
  --radius: 10px;
  --max-width: 480px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
}

.app-container {
  width: 100%;
  max-width: var(--max-width);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--app-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.topbar {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 8px;
}

.game-title {
  font-size: 1.82rem; /* 1.4rem + 30% */
  margin: 0;
  letter-spacing: 0.02em;
  display: inline-block;
  /* Same light-green -> dark-green run as the grid's own found-letter
     gradient, with a red flourish at the end for the word's last letter -
     the title previews the game's own colour language. */
  background: linear-gradient(90deg, #a5d6a7 0%, var(--green) 35%, #1b5e20 65%, var(--red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: titleGreeting 1.6s ease-in-out;
  /* Never let the icon row squeeze the title narrower than its text. */
  flex-shrink: 0;
  white-space: nowrap;
}

/* A one-off "hello" on load: the title spins around its vertical axis while
   swelling up and settling back to its original size and orientation -
   there's no splash screen, so this is the game introducing itself. */
@keyframes titleGreeting {
  0%   { transform: perspective(500px) rotateY(0deg) scale(1); }
  20%  { transform: perspective(500px) rotateY(130deg) scale(1.3); }
  50%  { transform: perspective(500px) rotateY(250deg) scale(1.45); }
  80%  { transform: perspective(500px) rotateY(345deg) scale(1.1); }
  100% { transform: perspective(500px) rotateY(360deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .game-title { animation: none; }
}

.icon-row {
  display: flex;
  gap: 6px;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text);
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:active {
  background: var(--surface-alt);
}

.icon-btn svg {
  width: 100%;
  height: 100%;
  fill: var(--text);
}

main {
  width: 100%;
  max-width: var(--max-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 10px 2px;
}

.status-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 4px 0 10px;
}

.quick-instructions {
  width: 100%;
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.4;
}

.quick-instructions p {
  margin: 0 0 2px;
}

.quick-instructions p:last-child {
  margin-bottom: 0;
}

/* Keeps a short run of help text together on one line (e.g. the rules
   icon with "free.", or "◀2 or ▼1"), so wrapping never strands a piece. */
.nowrap {
  white-space: nowrap;
}

.inline-rules-btn {
  display: inline-flex;
  width: 18px;
  height: 18px;
  padding: 0;
  margin-left: 2px;
  vertical-align: -4px;
  border-radius: 5px;
  color: var(--text-dim);
}

.inline-rules-btn svg {
  fill: var(--text-dim);
}

.difficulty-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.diff-btn {
  border: none;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.diff-btn.active {
  background: var(--accent);
  color: #fff;
}

.gradient-sample {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
  margin: 0 2px;
}

.gradient-sample span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  margin-bottom: 16px;
}

.tile-cell {
  position: relative;
  aspect-ratio: 1 / 1;
}

.tile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}

.tile:active:not(:disabled) {
  transform: scale(0.94);
}

.tile.used {
  background: var(--grey);
  border-color: var(--grey);
  color: #93a6ab;
  cursor: default;
  pointer-events: none;
}

.tile.hit {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  cursor: default;
  pointer-events: none;
}

/* Hard mode only: every found letter uses the flat .hit green above, so
   these rings are what marks out the word's first and last letter instead
   of a colour change. outline (not border) keeps the box model and the
   gradient's background/border-color inline overrides unaffected. */
.tile.hit-first {
  outline: 3px solid var(--yellow);
  outline-offset: -3px;
}

.tile.hit-last {
  outline: 3px solid var(--red);
  outline-offset: -3px;
}

/* ---- Reveal vs pencil mark: two deliberately different looks ----------
   A real reveal (tap) is SOLID: the tile flips over and fills with flat
   colour (green hit, grey miss), with a "+1" floating up. A pencil mark
   (corner box) is SKETCHY: dashed outlines and hatching, never a solid
   fill, with a small "free" floating up instead. Players should be able to
   tell from a glance - or from watching someone else play - which is
   which. */

/* Pencilled in as "in the word": a dashed green ring, like a pencil circle. */
.tile.marked {
  outline: 2px dashed var(--green);
  outline-offset: -6px;
}

/* Pencilled in as "ruled out": hatched and faded, letter struck through.
   Unlike .used (a revealed miss - flat solid grey), this stays fully
   clickable - it's only a personal note. */
.tile.excluded {
  background: repeating-linear-gradient(135deg, #ffffff 0 6px, #edf2f3 6px 12px);
  color: #a3b4b8;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(229, 57, 53, 0.55);
}

/* A single corner control that cycles through three states each tap: not
   marked -> marked as in the word (tick) -> marked as ruled out (cross) ->
   back to not marked. The tappable zone is big (comfortably past the ~40px
   recommended touch target); the visible part is a small dashed "pencil
   box" so it reads as a separate control from the letter itself. */
.deduce-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 42%;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  transform-origin: 12px 12px;
}

.deduce-btn::before {
  content: "✓";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #94b4bd;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  color: #9fbcc4;
}

.deduce-btn.marked::before {
  border: 1.5px solid var(--green);
  background: var(--green);
  color: #fff;
}

.deduce-btn.excluded::before {
  content: "✕";
  border: 1.5px solid var(--red);
  background: var(--red);
  color: #fff;
  font-size: 10px;
}

/* A pencil mark just changed: the corner box gives a quick "stamp" pop. */
.deduce-btn.just-marked {
  animation: markPop 0.28s ease-out;
}

@keyframes markPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* A tile just revealed by a tap: it flips over like a card. */
.tile.just-revealed {
  animation: revealFlip 0.38s ease-out;
}

@keyframes revealFlip {
  0%   { transform: perspective(300px) rotateY(90deg) scale(0.92); }
  70%  { transform: perspective(300px) rotateY(-8deg) scale(1.03); }
  100% { transform: perspective(300px) rotateY(0deg) scale(1); }
}

/* "+1" (a tap spent) or "free" (a pencil mark) floating up from the tile. */
.floater {
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  animation: floatUp 0.9s ease-out forwards;
}

.floater.cost { color: var(--text); }

.floater.free {
  left: 4px;
  transform: none;
  color: var(--green);
  font-size: 0.7rem;
}

@keyframes floatUp {
  0%   { opacity: 0; margin-top: 8px; }
  15%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; margin-top: -20px; }
}

/* The tap counter gives a little bump whenever a tap is spent. */
#tapCounter.bump {
  animation: counterBump 0.35s ease-out;
}

@keyframes counterBump {
  0%   { transform: scale(1); color: var(--text-dim); }
  40%  { transform: scale(1.25); color: var(--accent); }
  100% { transform: scale(1); color: var(--text-dim); }
}

#tapCounter {
  display: inline-block;
}

/* Small inline copies of the corner badge, for the instructions/rules text. */
.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  vertical-align: -2px;
}

.mini-badge--tick { background: var(--green); }
.mini-badge--cross { background: var(--red); }

/* ---- Tutorial coach panel ------------------------------------------- */

.coach-panel {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text);
}

.coach-panel.nudge {
  animation: coachNudge 0.4s ease-in-out;
}

@keyframes coachNudge {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.coach-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.coach-step {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.coach-skip {
  background: none;
  border: none;
  padding: 2px 0;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: underline;
  cursor: pointer;
}

.coach-text {
  margin: 0;
}

.coach-next {
  margin-top: 8px;
  padding: 6px 16px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

/* While a step points at one tile, the rest of the grid fades back. */
.letter-grid.coach-dim .tile-cell:not(.coach-target):not(.coach-target-corner) {
  opacity: 0.35;
}

.tile-cell.coach-target .tile {
  animation: coachPulse 1.4s ease-in-out infinite;
}

.tile-cell.coach-target .tile.just-revealed {
  animation: revealFlip 0.38s ease-out, coachPulse 1.4s ease-in-out 0.38s infinite;
}

.tile-cell.coach-target-corner .deduce-btn::before {
  animation: coachPulse 1.2s ease-in-out infinite;
}

@keyframes coachPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 127, 176, 0); }
  50%      { box-shadow: 0 0 0 5px rgba(47, 127, 176, 0.55); }
}

@media (prefers-reduced-motion: reduce) {
  .tile.just-revealed,
  .deduce-btn.just-marked,
  #tapCounter.bump,
  .coach-panel.nudge { animation: none; }
}

.tile .ind {
  position: absolute;
  font-size: 0.42em;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.02em;
}

.tile .ind-up { top: 5px; left: 50%; transform: translateX(-50%); }
.tile .ind-down { bottom: 5px; left: 50%; transform: translateX(-50%); }
.tile .ind-left { left: 5px; top: 50%; transform: translateY(-50%); }
.tile .ind-right { right: 5px; top: 50%; transform: translateY(-50%); }

.tray {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  width: 100%;
  margin-bottom: 14px;
}

.tray-tile {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  /* Letters can be press-and-dragged to swap tray positions (see
     onTrayPointerDown in game.js); this stops the browser's own touch
     scroll/zoom gestures from competing with that drag on mobile. */
  touch-action: none;
  position: relative;
}

.tray-tile.filled {
  border-color: var(--accent);
}

/* The tray tile currently being press-dragged. */
.tray-tile.dragging {
  z-index: 5;
  border-color: var(--accent);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transform: scale(1.08);
}

/* The tray tile currently under the dragged tile - the swap target if the
   player releases now. */
.tray-tile.drag-over {
  border-color: var(--accent);
  background: var(--surface-alt);
}

/* A letter a wrong guess confirmed is in the right position: solid blue
   accent (deliberately not green - green on the grid means "in the word",
   not "in the right place"), with a small padlock in the corner. Can't be
   typed over or dragged. */
.tray-tile.locked {
  background: var(--accent);
  border-color: var(--accent);
  touch-action: auto;
}

.tray-tile.locked::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 9px;
  height: 9px;
  background: rgba(255, 255, 255, 0.85);
  /* Padlock shape via an inline SVG mask. */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 9V7A5 5 0 0 0 7 7v2H5v13h14V9h-2zM9 7a3 3 0 0 1 6 0v2H9V7z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 9V7A5 5 0 0 0 7 7v2H5v13h14V9h-2zM9 7a3 3 0 0 1 6 0v2H9V7z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

.tray-tile.locked input,
.tray-tile.locked input:disabled {
  color: #fff;
  -webkit-text-fill-color: #fff;
  opacity: 1;
  cursor: default;
}

/* Inline "locked in" label for the rules and wrong-guess text. */
.lock-swatch {
  display: inline-block;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.tray-tile input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  font-family: inherit;
  /* Belt-and-braces alongside the pointerdown preventDefault() in game.js:
     without a text selection to grab, a mouse press-drag has nothing for
     the browser to turn into its own native text-drag, which is what was
     silently swallowing the drag-to-swap gesture for mouse users. */
  -webkit-user-select: none;
  user-select: none;
}

.guess-banner {
  width: 100%;
  text-align: center;
  padding: 8px;
  margin-bottom: 10px;
  background: var(--surface-alt);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-dim);
}

.controls {
  width: 100%;
  display: flex;
  gap: 10px;
}

.primary-btn, .secondary-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn {
  background: var(--accent);
  color: #fff;
}

.primary-btn:disabled {
  background: var(--surface-alt);
  color: var(--text-dim);
  cursor: default;
}

.secondary-btn {
  background: var(--surface-alt);
  color: var(--text);
}

.danger-btn {
  color: var(--red);
}

.danger-btn:disabled {
  color: var(--text-dim);
  cursor: default;
  opacity: 0.6;
}

.hidden { display: none !important; }

.footer {
  width: 100%;
  max-width: var(--max-width);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.75rem;
  padding: 4px 10px 8px;
}

.footer a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border);
}

.footer p {
  margin: 0;
}

.footer p + p {
  margin-top: 2px;
}

/* The "Get it on Google Play" badge (website only - hidden in the app).
   Google's guidelines: use the badge unaltered, legible, with clear space
   around it; the PNG's own transparent margin provides that space. */
.footer .get-app a {
  display: inline-block;
  text-decoration: none;
}

.play-badge {
  display: block;
  height: 54px;
  width: auto;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 40, 45, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.modal-large {
  max-width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  text-align: left;
}

.modal h2 {
  margin-top: 0;
  text-align: center;
}

/* "Version 2.2" just under the Rules dialog's heading. */
.rules-version {
  margin: -10px 0 4px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.modal-subtext {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.result-rating {
  font-weight: 700;
  margin: 10px 0 0;
}

.result-rating--good { color: var(--green); }
.result-rating--average { color: var(--accent); }
.result-rating--bad { color: var(--orange); }

.result-compare {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 4px 0 0;
}

.stats-breakdown {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: -6px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.result-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
}

.result-share-btn .share-wordmark {
  font-weight: 800;
  /* Same gradient as the game's own title/logo. */
  background: linear-gradient(90deg, #a5d6a7 0%, var(--green) 35%, #1b5e20 65%, var(--red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.result-share-btn .share-label {
  color: var(--text);
  font-weight: 600;
}

.rules-text p, .rules-text li {
  font-size: 0.92rem;
  line-height: 1.5;
}

.rules-text ul {
  padding-left: 20px;
}

.swatch {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 0.85em;
}

.swatch.green { background: var(--green); }
.swatch.red { background: var(--red); }
.swatch.orange { background: var(--orange); }
.swatch.yellow { background: var(--yellow); color: #1c2b30; }
.swatch.pale-green { background: var(--pale-green); color: #1c2b30; }
.swatch.pale-red { background: var(--pale-red); color: #1c2b30; }

#statsContent table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#statsContent th, #statsContent td {
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
}

#statsContent .empty-stats {
  color: var(--text-dim);
  text-align: center;
  padding: 20px 0;
}

@media (min-width: 500px) {
  .tile { font-size: 1.5rem; }
  .tray-tile { font-size: 1.3rem; }
  .tile .ind { font-size: 0.4em; }
  .deduce-btn::before { width: 22px; height: 22px; font-size: 13px; }
  .deduce-btn.excluded::before { font-size: 12px; }
}

/* Narrow phones: five icons in the top bar (Share, New, Stats, Sound,
   Rules) need a little less room each so they fit beside the title. */
@media (max-width: 400px) {
  .icon-row { gap: 2px; }
  .icon-btn { width: 34px; height: 34px; padding: 7px; }
  .icon-btn.inline-rules-btn { width: 18px; height: 18px; padding: 0; }
}

@media (max-width: 345px) {
  .game-title { font-size: 1.35rem; }
  .icon-row { gap: 0; }
  .icon-btn { width: 31px; height: 31px; padding: 6px; }
}

/* Short screens: not just older/small phones, but plenty of ordinary
   mainstream ones too, once the browser's own address bar is factored in -
   a Samsung Galaxy A52s (a genuinely average phone) still comes in under
   this height with Chrome's toolbar visible. The max-width here keeps this
   scoped to actual narrow phone-portrait screens - without it, a merely
   short but wide desktop/laptop browser window (very common - a maximised
   1366x768 laptop screen leaves well under 820px of page height once
   browser chrome is subtracted) would wrongly get squeezed into the phone
   layout too.

   The grid and tray deliberately use the phone's full width here, same as
   on any larger screen - NOT a smaller capped width. Bigger tiles mean
   bigger, easier-to-hit tap targets, which matters a lot for players with
   larger fingers (a cramped grid makes it easy to mis-tap the tick/cross
   marker instead of the letter itself). The explicitly accepted tradeoff:
   on the shortest phones, this can push the footer's "Get the app" link
   partly or fully out of view below the fold, since width is no longer
   being sacrificed to buy back vertical room. Trimming the surrounding
   paddings/gaps below still claws back a little height without shrinking
   tile size. */
@media (max-height: 820px) and (max-width: 500px) {
  .topbar { padding: 8px 12px 4px; }
  .game-title { font-size: 1.5rem; }
  .status-bar { margin: 2px 0 6px; }
  .quick-instructions { margin-bottom: 4px; }
  .coach-panel { margin-bottom: 6px; padding: 8px 10px; }
  .letter-grid { gap: 6px; margin-bottom: 8px; }
  .tray { gap: 4px; margin-bottom: 8px; }
  .guess-banner { padding: 6px; margin-bottom: 6px; }
  main { padding-top: 2px; }
  .footer { padding: 2px 10px 4px; }
}
