.tg-game {
  --tg-paper: #fafaf8;
  --tg-ink: #1d211e;
  --tg-muted: #656d65;
  --tg-line: #1d211e26;
  --tg-tint: #f0f2ed;
  --tg-lime: #d5ff65;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 40px 7%;
  padding-top: 32px;
  border-top: 1px solid var(--tg-line);
  color: var(--tg-ink);
  font: 400 16px/1.65 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  text-align: left;
}
.tg-game *, .tg-game *::before, .tg-game *::after { box-sizing: border-box; }
.tg-game [hidden] { display: none !important; }
.tg-game p, .tg-game h2, .tg-game ul, .tg-game ol { margin: 0; }
.tg-game h2 { font-size: clamp(28px, 2.7vw, 36px); line-height: 1.15; letter-spacing: -.03em; font-weight: 550; margin-top: 18px; max-width: 15ch; }
.tg-game button, .tg-game a { -webkit-tap-highlight-color: transparent; }
.tg-game button { color: inherit; font: inherit; cursor: pointer; }
.tg-game :where(a, button):focus-visible { outline: 2px solid var(--tg-ink); outline-offset: 4px; }
.tg-game button:disabled { cursor: default; }
.tg-eyebrow { color: var(--tg-muted); font-size: 12px; line-height: 1.6; }
.tg-description { margin-top: 24px !important; max-width: 37ch; font-size: 17px; line-height: 1.7; }
.tg-meaning { margin-top: 16px !important; max-width: 37ch; color: var(--tg-muted); font-size: 15px; line-height: 1.7; }
.tg-story-links { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 24px; margin-top: 20px; }
.tg-story-links a, .tg-story-links button { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 5px; font-size: 14px; line-height: 1.5; }
.tg-preview-note { color: var(--tg-muted); font-size: 12px; line-height: 1.6; flex-basis: 100%; }
.tg-play-area { min-width: 0; }
.tg-topline { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--tg-line); font-size: 12px; line-height: 1.6; }
.tg-topline > span:last-child { color: var(--tg-muted); font-variant-numeric: tabular-nums; }
.tg-status { min-height: 84px; padding: 20px 0 16px; font-size: 16px; line-height: 1.6; }
.tg-game[data-phase=success] .tg-status { color: #36522c; }
.tg-moments { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0 0 20px; list-style: none; }
.tg-moments li { display: inline-flex; align-items: center; gap: 5px; color: var(--tg-muted); font-size: 12px; line-height: 1.5; }
.tg-moments svg { width: 18px; height: 18px; }
.tg-moments .is-found { color: var(--tg-ink); }
.tg-moment-state { font-size: 12px; color: #36522c; }
.tg-game svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.tg-board { display: grid; grid-template-columns: repeat(5, minmax(44px, 1fr)); gap: 4px; width: min(100%, 320px); }
.tg-cell { display: grid; place-items: center; aspect-ratio: 1; min-width: 44px; min-height: 44px; padding: 8px; border: 1px solid var(--tg-line); border-radius: 4px; background: transparent; }
.tg-cell svg { width: 24px; height: 24px; }
.tg-cell:not(:disabled):hover { border-color: var(--tg-ink); }
.tg-cell.is-blocked { color: #959d94; background: #e9ece5; border-color: transparent; }
.tg-cell.is-visited:not(.is-current) { background: var(--tg-tint); }
.tg-cell.has-moment { color: #36522c; background: #f0f6e7; }
.tg-cell.is-finish { border-color: #6b8652; }
.tg-cell.is-current { border-color: var(--tg-ink); background: var(--tg-lime); }
.tg-player-dot { width: 12px; height: 12px; background: var(--tg-ink); border-radius: 50%; }
.tg-walk-bottom { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-top: 20px; width: min(100%, 430px); }
.tg-direction-controls { display: grid; grid-template-columns: repeat(3, 44px); gap: 4px; }
.tg-direction-controls button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--tg-line); border-radius: 4px; background: transparent; font-size: 23px; line-height: 1; }
.tg-direction-controls button[data-tg-direction=up] { grid-column: 2; }
.tg-direction-controls button[data-tg-direction=left] { grid-row: 2; grid-column: 1; }
.tg-direction-controls button[data-tg-direction=down] { grid-row: 2; grid-column: 2; }
.tg-direction-controls button[data-tg-direction=right] { grid-row: 2; grid-column: 3; }
.tg-direction-controls button:not(:disabled):hover { background: var(--tg-tint); border-color: var(--tg-ink); }
.tg-direction-controls button:disabled { opacity: .45; }
.tg-restart, .tg-pass-controls > button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--tg-line); border-radius: 24px; background: transparent; font-size: 14px !important; line-height: 1.5; }
.tg-restart:hover, .tg-pass-controls > button:not(:disabled):hover { border-color: var(--tg-ink); background: var(--tg-tint); }
.tg-hint { margin-top: 20px !important; max-width: 58ch; color: var(--tg-muted); font-size: 12px; line-height: 1.7; }
.tg-chain { display: flex; flex-wrap: wrap; align-content: start; gap: 6px; min-height: 94px; padding: 0 0 20px; list-style: none; }
.tg-chain-tile { display: flex; align-items: stretch; width: calc((100% - 12px) / 3); border: 1px solid var(--tg-line); border-radius: 5px; background: var(--tg-tint); }
.tg-chain-tile > span { display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 10px 3px; font-size: 12px; line-height: 1.4; }
.tg-chain-tile > span + span { border-left: 1px solid var(--tg-line); }
.tg-chain-tile svg { width: 22px; height: 22px; }
.tg-chain-empty { display: flex; align-items: center; min-height: 74px; width: 100%; color: var(--tg-muted); font-size: 14px; }
.tg-next { font-size: 14px; line-height: 1.6; margin: 0 0 16px !important; }
.tg-pass-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.tg-pass-options .tg-next { margin: 0 !important; }
.tg-hints-toggle { min-height: 44px; padding: 8px 14px; border: 1px solid var(--tg-line); border-radius: 24px; background: transparent; font-size: 13px !important; }
.tg-hints-toggle[aria-pressed=true] { background: var(--tg-tint); border-color: #819668; }
.tg-hints-toggle:disabled { opacity: .5; }
.tg-song-return { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; border-top: 1px solid var(--tg-line); padding-top: 22px; }
.tg-song-return p { color: var(--tg-muted); font-size: 14px; }
.tg-song-return a { min-height: 44px; display: inline-flex; align-items: center; color: var(--tg-ink); text-decoration: underline; text-underline-offset: 5px; font-size: 14px; }
.tg-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tg-domino { display: flex; padding: 0; min-height: 94px; border: 1px solid var(--tg-line); border-radius: 6px; background: transparent; }
.tg-domino > span { display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px 3px; font-size: 12px; line-height: 1.4; }
.tg-domino > span + span { border-left: 1px solid var(--tg-line); }
.tg-domino svg { width: 26px; height: 26px; }
.tg-domino.is-possible { border-color: #819668; background: #f0f6e7; }
.tg-domino:not(:disabled):hover { border-color: var(--tg-ink); background: #e8efdc; }
.tg-domino.is-used { opacity: .35; background: var(--tg-tint); }
.tg-pass-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tg-pass-controls button:disabled { opacity: .45; }
@media (max-width: 800px) {
  .tg-game { grid-template-columns: 1fr; gap: 32px; }
  .tg-game h2 { max-width: 22ch; }
  .tg-description, .tg-meaning { max-width: 48ch; }
  .tg-play-area { max-width: 580px; width: 100%; }
}
@media (max-width: 500px) {
  .tg-game { padding-top: 24px; }
  .tg-game h2 { font-size: 28px; }
  .tg-description { font-size: 16px; margin-top: 20px !important; }
  .tg-meaning { font-size: 14px; }
  .tg-status { min-height: 92px; font-size: 15px; }
  .tg-moments { gap: 8px 12px; }
  .tg-moments li { font-size: 12px; }
  .tg-moment-state { display: none; }
  .tg-board { max-width: 320px; }
  .tg-walk-bottom { gap: 16px; align-items: center; }
  .tg-restart { padding-inline: 13px; font-size: 13px !important; }
  .tg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .tg-chain-tile { width: calc((100% - 6px) / 2); }
  .tg-chain-tile > span { font-size: 12px; }
  .tg-domino > span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .tg-game * { scroll-behavior: auto !important; } }

.tg-gift-panel { margin-top:24px; padding:18px 20px; background:#eff2e9; border:1px solid var(--line,#d9ddd4); border-radius:8px; } .tg-gift-panel p { margin:0 0 6px !important; font-size:12px !important; color:var(--muted,#626b61); } .tg-gift-panel strong { display:block; font-weight:500; font-size:20px; } .tg-gift-panel a { display:inline-flex; align-items:center; min-height:44px; margin-top:4px; font-size:13px; text-underline-offset:4px; }
