/* 6-shapes (plan 119 pilot): Açı Metrosu, Üçgen Şifresi and Dörtgen Kimliği (units/6-shapes-boards.js) and the
   Hızlı Parmak figures (u6s-figure, units/6-shapes-core.js). Theme tokens only, so light, dark and high contrast
   follow tokens.css and the world tokens of topic-games.css. */

/* ---------- Shared ---------- */
.u6s-board { width: min(100%, 1040px); }
.u6s-spark { min-height: 1.6em; margin: 0; padding: 2px 14px; color: var(--ink); background: var(--red-tint); border: 2px solid var(--red-base); border-left-width: 8px; border-radius: 12px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.u6s-spark:empty { visibility: hidden; }
.u6s-reason { margin: 0; padding: 6px 16px; color: var(--world-ink); background: var(--world-band); border: 2px solid var(--world-band-edge); border-radius: 14px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.u6s-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.u6s-choice { min-width: 150px; padding: 6px 16px; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.u6s-choice[data-missed] { border-color: var(--red-base); border-style: dashed; }
.u6s-choice[data-answer] { color: var(--green-ink); background: var(--green-tint); border-color: var(--green-base); opacity: 1; }
.u6s-toggle[aria-pressed="true"] { color: var(--world-ink); background: var(--world-band); border-color: var(--world-model-edge); box-shadow: inset 0 0 0 2px var(--world-model-edge); }
.u6s-check { min-height: var(--touch); font-size: clamp(18px, 1.7vw, 22px); }

/* Lines and shapes, shared by the boards and the Hızlı Parmak figures. */
.u6s-shape { fill: var(--world-band, var(--brand-tint)); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.u6s-cut { stroke: var(--world-accent, var(--coral-base)); stroke-width: 3; stroke-linecap: round; }
.u6s-dash { stroke-dasharray: 7 6; }
.u6s-label { fill: var(--ink); font-size: 17px; font-weight: 900; }
.u6s-label--outer { fill: var(--world-ink, var(--brand-ink)); }
.u6s-name { fill: var(--ink-2); font-size: 15px; font-weight: 800; font-style: italic; }
.u6s-grid { fill: none; stroke: var(--line); stroke-width: 1; }

/* ---------- Hızlı Parmak figures ---------- */
.u6s-figure { display: block; width: min(100%, 360px); height: auto; margin-inline: auto; }
.u6s-figure .u6s-shape { fill: var(--brand-tint); }
.u6s-line { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.u6s-arc { fill: none; stroke-width: 3; }
.u6s-arc--given { stroke: var(--brand); }
.u6s-arc--asked { stroke: var(--coral-base); }

/* ---------- Açı Metrosu ---------- */
.u6s-metro__work { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(12px, 2vw, 28px); width: 100%; }
.u6s-metro__map { position: relative; width: min(100%, 520px); aspect-ratio: 420 / 300; }
.u6s-metro__svg { display: block; width: 100%; height: 100%; }
.u6s-rail { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.u6s-rail__ties { stroke: var(--world-model-edge); stroke-width: 16; stroke-dasharray: 3 12; opacity: .55; }
.u6s-mark { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.u6s-road { stroke: var(--world-accent); stroke-width: 7; stroke-linecap: round; }
.u6s-wedge { fill: transparent; stroke: none; }
.u6s-wedge[data-lit] { fill: var(--brand); opacity: .55; }
.u6s-wedge[data-asked] { fill: var(--coral-base); opacity: .55; }
.u6s-wedge[data-picked] { fill: var(--world-accent); opacity: .4; }
.u6s-station {
  position: absolute;
  display: inline-grid;
  min-width: var(--touch);
  min-height: var(--touch);
  place-items: center;
  padding: 0 6px;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}
.u6s-station.tg-key:hover:not(:disabled) { transform: translate(-50%, calc(-50% - 1px)); }
.u6s-station.tg-key:active:not(:disabled) { transform: translate(-50%, calc(-50% + 1px)); }
.u6s-station--fixed { color: var(--ink-2); background: var(--surface); border: 2px solid var(--line); }
.u6s-station[data-lit] { color: var(--brand-ink); background: var(--brand-tint); border: 3px solid var(--brand); }
.u6s-station[data-asked] { color: var(--ink); background: var(--surface); border: 3px dashed var(--coral-base); }
.u6s-station[aria-pressed="true"] { color: var(--world-ink); background: var(--world-band); border-color: var(--world-model-edge); box-shadow: inset 0 0 0 2px var(--world-model-edge); }
.u6s-station[data-answer] { color: var(--green-ink); background: var(--green-tint); border: 3px solid var(--green-base); opacity: 1; }
.u6s-metro__controls { display: grid; justify-items: center; gap: 10px; }
.u6s-metro[data-task="relation"] .u6s-choice { min-width: 170px; }

/* ---------- Üçgen Şifresi ---------- */
.u6s-cipher__work { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(12px, 2vw, 28px); width: 100%; }
.u6s-cipher__sheet { width: min(100%, 460px); padding: 6px; background: var(--world-model); border: 2px solid var(--world-model-edge); border-radius: 16px; }
.u6s-cipher__sheet svg { display: block; width: 100%; height: auto; }
.u6s-cipher__sheet .u6s-shape { fill: var(--world-band); }
.u6s-cipher__sheet .u6s-label { font-size: 19px; }
.u6s-cipher__sheet[data-solved] .u6s-shape { stroke: var(--green-base); }
.u6s-cipher__lock { display: grid; justify-items: center; gap: 6px; }
.u6s-cipher__title { margin: 0; color: var(--world-ink); font-family: var(--font-display); font-size: clamp(18px, 1.8vw, 24px); font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Dörtgen Kimliği ---------- */
.u6s-quad__work { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(12px, 2vw, 28px); width: 100%; }
.u6s-quad__card { display: grid; gap: 6px; width: min(100%, 440px); padding: 10px 14px 12px; background: var(--world-model); border: 2px solid var(--world-model-edge); border-radius: 18px; box-shadow: 0 4px 0 var(--world-band-edge); }
.u6s-quad__head { margin: 0; color: var(--world-ink); font-family: var(--font-display); font-size: clamp(16px, 1.5vw, 20px); font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.u6s-paper { display: block; width: 100%; height: auto; background: var(--surface); border-radius: 8px; }
.u6s-paper .u6s-shape { fill: var(--world-band); }
.u6s-corner { fill: var(--ink); }
.u6s-quad__name { min-height: 1.4em; margin: 0; color: var(--ink); font-size: clamp(19px, 1.9vw, 24px); font-weight: 900; overflow-wrap: anywhere; }
.u6s-quad__name[data-stamped] { color: var(--green-ink); }
.u6s-quad__stamps { display: grid; justify-items: center; gap: 10px; max-width: 520px; }
.u6s-quad[data-task="property"] .u6s-choice { min-width: 0; flex: 1 1 220px; }

/* High contrast: no tints; marks speak through borders and weight. */
body.high-contrast .u6s-wedge[data-lit],
body.high-contrast .u6s-wedge[data-asked],
body.high-contrast .u6s-wedge[data-picked] { fill: var(--ink); opacity: .25; }
body.high-contrast .u6s-rail__ties { display: none; }

/* A short landscape board (1366 × 768): the kicker goes, as on the units 1–2 boards, and the metro map slims, so the
   lower stations stand above the instruction bar;
   the ID card slims so its name line stays in view. */
@media (orientation: landscape) and (min-width: 900px) and (max-height: 820px) {
  .question-card--topic:has(.u6s-board) .question-kicker { display: none; }
  .question-card--topic:has(.u6s-board) .question-copy { margin-bottom: 8px; }
  .u6s-metro__map { width: min(100%, 460px); }
  .u6s-quad__card { width: min(100%, 360px); }
}

@media (max-width: 700px) {
  .u6s-choice { min-width: 0; flex: 1 1 40%; }
  /* A 390 × 844 phone holds the whole round above the instruction bar: smaller figures, two stamps a row. */
  .u6s-choices { gap: 8px; }
  .u6s-quad[data-task="property"] .u6s-choice { flex: 1 1 40%; padding: 4px 8px; font-size: 16px; }
  .u6s-quad__card { gap: 2px; padding: 6px 10px 8px; }
  .u6s-quad__head { display: none; }
  .u6s-paper { max-height: 16vh; }
  .u6s-cipher__sheet svg { max-height: 18vh; }
  .u6s-station { padding: 0 4px; font-size: 16px; }
}
