/* v1.72: Tower Guard, the Fun Zone's tower defence game */
.tg-hud { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0; font-weight: 700; }
.tg-hud span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--hull); border: 1px solid var(--rivet); }
.tg-gold b { color: var(--gold); }
.tg-lives b { color: #ffb0bd; }
.tg-board { border-radius: 20px; overflow: hidden; border: 1px solid var(--rivet); background: #6fb950; }
.tg-map { display: block; width: 100%; height: auto; cursor: pointer; touch-action: manipulation; }
.tg-map:focus-visible { outline: 3px solid var(--sky); outline-offset: -3px; }
.tg-panel { margin: 14px 0; padding: 14px 16px; border-radius: 16px; background: var(--hull); border: 1px solid var(--rivet); display: grid; gap: 10px; justify-items: start; }
.tg-panel-title { margin: 0; font-weight: 700; font-size: 1.1rem; }
.tg-hint { margin: 0; color: var(--ink-dim); }
.tg-builds { display: flex; flex-wrap: wrap; gap: 10px; }
.tg-build { display: grid; gap: 2px; min-width: 150px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--rivet); background: var(--hull-2, #2b2160);
  color: var(--ink); font: 600 .95rem var(--body); text-align: left; cursor: pointer; }
.tg-build b { font-size: 1.05rem; }
.tg-build small { color: var(--ink-dim); font-weight: 500; }
.tg-build .tg-cost { color: var(--gold); font-weight: 700; }
.tg-build:disabled { opacity: .45; cursor: not-allowed; }
.tg-build:not(:disabled):hover { border-color: var(--gold); }
.tg-build:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.tg-bow { border-left: 6px solid #3ddc97; } .tg-cannon { border-left: 6px solid #9aa3b5; } .tg-frost { border-left: 6px solid #59c3ff; }
.tg-question { padding: 18px; border-radius: 18px; background: var(--hull); border: 1px solid var(--rivet); }
.tg-q-meta { margin: 0; text-align: center; color: var(--ink-dim); font-weight: 600; }
.tg-legend { margin: 0 0 10px; padding-left: 1.2em; display: grid; gap: 4px; }
.tower .race-intro { margin-top: 16px; }
.tower .race-end { margin-top: 16px; }
@media (max-width: 640px) {
  .tg-hud { gap: 8px; font-size: .9rem; }
  .tg-build { min-width: 0; flex: 1 1 100%; }
}
/* Map and side panel side by side on wide screens */
.tg-layout { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1000px) {
  .tg-layout:has(> .tg-side:not([hidden])) { grid-template-columns: minmax(0, 1fr) 360px; }
  .tg-side .answers { grid-template-columns: 1fr; }
  .tg-side .q-text { font-size: 1.3rem; }
  .tg-side .q-flag .flag { height: 110px; }
  .tg-side .q-pic { width: min(100%, 260px); }
}
.tg-side { display: grid; gap: 14px; }
.tg-side .tg-panel { margin: 0; }
.tg-side .feedback .btn { justify-self: stretch; }
