/* 7-transform (plan 119): Ayna Dünyası and Simetri İnşaatı (units/7-transform-boards.js) and the Hızlı Parmak
   figures (u7t-figure, units/7-transform-core.js). Theme tokens only, so light, dark and high contrast follow
   tokens.css and the world tokens of topic-games.css. */

/* ---------- Shared ---------- */
.u7t-board { width: min(100%, 1040px); }
.u7t-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; }
.u7t-spark:empty { visibility: hidden; }
.u7t-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; }
.u7t-work { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(12px, 2vw, 28px); width: 100%; }
.u7t-side { display: grid; justify-items: center; gap: 10px; max-width: 480px; }
.u7t-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.u7t-check { min-height: var(--touch); font-size: clamp(18px, 1.7vw, 22px); }
.u7t-undo { font-size: clamp(17px, 1.6vw, 20px); }
.u7t-chip { margin: 0; padding: 4px 16px; color: var(--world-ink); background: var(--world-band); border: 2px solid var(--world-band-edge); border-radius: 999px; font-size: clamp(18px, 1.7vw, 22px); font-weight: 900; text-align: center; }
.u7t-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.u7t-choice { min-width: 120px; padding: 6px 16px; white-space: nowrap; font-size: clamp(18px, 1.7vw, 22px); }
.u7t-choice[data-missed] { border-color: var(--red-base); border-style: dashed; }
.u7t-choice[data-answer] { color: var(--green-ink); background: var(--green-tint); border-color: var(--green-base); opacity: 1; }

/* Lines, points and labels, shared by the boards and the Hızlı Parmak figures. */
.u7t-grid { fill: none; stroke: var(--line); stroke-width: 1.5; }
.u7t-mirror { stroke: var(--world-accent, var(--sky-base)); stroke-width: 7; stroke-linecap: round; }
.u7t-shape { fill: var(--world-band, var(--brand-tint)); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.u7t-shape--image { fill: var(--green-tint); stroke: var(--green-base); stroke-dasharray: 9 6; }
.u7t-dot { fill: var(--ink); }
.u7t-dot--touch { fill: var(--coral-base); }
.u7t-label { fill: var(--ink); font-size: 18px; font-weight: 900; }
.u7t-name { fill: var(--ink-2); font-size: 15px; font-weight: 800; font-style: italic; }
.u7t-measure { fill: var(--red-ink); font-size: 17px; font-weight: 900; }
.u7t-perp { stroke: var(--red-base); stroke-width: 3; stroke-dasharray: 7 6; stroke-linecap: round; }
.u7t-perp--done { stroke: var(--green-base); stroke-width: 2; }
.u7t-segment { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.u7t-compass { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; }
.u7t-bisector { stroke: var(--coral-base); stroke-width: 4; stroke-dasharray: 10 7; stroke-linecap: round; }
.u7t-ray { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.u7t-ray--bisector { stroke: var(--brand); stroke-dasharray: 9 6; }
.u7t-ray--try { stroke: var(--red-base); stroke-width: 4; }
.u7t-arc { fill: none; stroke: var(--ink-2); stroke-width: 2; }
.u7t-arc--asked { stroke: var(--coral-base); stroke-width: 4; }
.u7t-tick { stroke: var(--ink); stroke-width: 3; }

/* ---------- Hızlı Parmak figures ---------- */
.u7t-figure { display: block; width: min(100%, 360px); height: auto; margin-inline: auto; }
.u7t-figure .u7t-label, .u7t-figure .u7t-name { font-size: 17px; }

/* ---------- The grid boards: SVG under, buttons over its points ---------- */
.u7t-plane { position: relative; width: min(100%, 540px); aspect-ratio: 440 / 320; background: var(--world-model, var(--surface)); border: 2px solid var(--world-model-edge, var(--line)); border-radius: 16px; }
.u7t-plane__svg { display: block; width: 100%; height: 100%; }
/* A spot is one square wide, so the spots tile the grid and a tap goes to the nearest point. */
.u7t-spot {
  position: absolute;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  padding: 0;
  color: var(--world-ink);
  background: transparent;
  border-radius: 50%;
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 900;
  line-height: 1;
  transform: translate(-50%, -50%);
}
.u7t-spot::before { content: ""; position: absolute; inset: 38%; border-radius: 50%; background: var(--line-strong); opacity: 0; }
html:not([data-input="touch"]) .u7t-spot:hover:not(:disabled)::before { opacity: 1; }
.u7t-spot:focus-visible { z-index: 1; outline: 4px solid var(--focus); outline-offset: -4px; }
.u7t-spot:disabled { cursor: default; opacity: 1; }
.u7t-spot[data-placed] { background: var(--world-band); border: 3px solid var(--world-model-edge); }
.u7t-spot[data-missed] { color: var(--ink); background: var(--red-tint); border: 3px dashed var(--red-base); }
.u7t-spot[data-missed]::after { content: "×"; color: var(--red-ink); font-size: 1.2em; }
.u7t-spot[data-answer] { color: var(--green-ink); background: var(--green-tint); border: 3px solid var(--green-base); }
.u7t-slots { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.u7t-slot { display: grid; min-width: 56px; min-height: 44px; place-items: center; color: var(--ink-2); background: var(--surface); border: 2px dashed var(--line-strong); border-radius: 999px; font-size: clamp(18px, 1.7vw, 22px); font-weight: 900; }
.u7t-slot[data-next] { color: var(--ink); border: 3px solid var(--world-accent); }
.u7t-slot[data-filled] { color: var(--world-ink); background: var(--world-band); border: 2px solid var(--world-model-edge); }

/* nokta: lettered pins one square wide. */
.u7t-pin {
  position: absolute;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  font-size: clamp(15px, 1.5vw, 19px);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}
.u7t-pin.tg-key:hover:not(:disabled) { transform: translate(-50%, calc(-50% - 1px)); }
.u7t-pin.tg-key:active:not(:disabled) { transform: translate(-50%, calc(-50% + 1px)); }
.u7t-pin[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); }
.u7t-pin[data-missed] { color: var(--ink); background: var(--red-tint); border: 2px dashed var(--red-base); opacity: 1; }
.u7t-pin[data-answer] { color: var(--green-ink); background: var(--green-tint); border: 3px solid var(--green-base); opacity: 1; }

/* ---------- The construction sheet ---------- */
.u7t-sheet { width: min(100%, 440px); padding: 6px; background: var(--world-model); border: 2px solid var(--world-model-edge); border-radius: 16px; }
.u7t-sheet__svg { display: block; width: 100%; height: auto; }
.u7t-sheet[data-solved] { border-color: var(--green-base); }
.u7t-steps { display: grid; gap: 8px; width: min(100%, 460px); margin: 0; padding: 0; list-style: none; }
.u7t-step { display: flex; width: 100%; justify-content: flex-start; gap: 10px; padding: 6px 12px; font-size: clamp(16px, 1.4vw, 19px); font-weight: 800; line-height: 1.25; text-align: left; }
.u7t-step__n { display: inline-grid; flex: none; width: 32px; height: 32px; place-items: center; color: var(--ink); border: 2px dashed var(--line-strong); border-radius: 50%; font-weight: 900; }
.u7t-step[data-numbered] .u7t-step__n { color: var(--world-ink); background: var(--world-band); border: 2px solid var(--world-model-edge); }
.u7t-step[data-answer] { color: var(--ink); opacity: 1; }
.u7t-step[data-answer] .u7t-step__n { color: var(--green-ink); background: var(--green-tint); border-color: var(--green-base); }
.u7t-step__text { overflow-wrap: anywhere; }

/* High contrast: no tints; marks speak through borders and weight. */
body.high-contrast .u7t-shape { fill: none; }
body.high-contrast .u7t-shape--image { stroke-width: 4; }
body.high-contrast .u7t-spot::before { background: var(--ink); }

/* A short landscape board (1366 × 768): the kicker goes, as on the units 1–2 boards, and the grids slim so the
   controls stay above the instruction bar. */
@media (orientation: landscape) and (min-width: 900px) and (max-height: 820px) {
  .question-card--topic:has(.u7t-board) .question-kicker { display: none; }
  .question-card--topic:has(.u7t-board) .question-copy { margin-bottom: 8px; }
  .u7t-plane { width: min(100%, 460px); }
  .u7t-sheet { width: min(100%, 380px); }
}

@media (max-width: 700px) {
  /* A 390 × 844 phone holds the whole round above the instruction bar. */
  .u7t-choice { min-width: 0; flex: 1 1 28%; padding: 4px 8px; }
  .u7t-sheet { max-width: 340px; }
  /* The keypad tasks and the step cards need the height: their figures shrink. */
  .u7t-build:is([data-task="aci"], [data-task="butun"]) .u7t-sheet { max-width: 250px; padding: 2px; }
  .u7t-sheet--steps { max-width: 200px; padding: 2px; }
  .u7t-step { padding: 4px 10px; font-size: 15px; }
  .u7t-step__n { width: 28px; height: 28px; }
  .u7t-steps { gap: 6px; }
  .u7t-slot { min-width: 48px; }
  .u7t-spot, .u7t-pin { font-size: 15px; }
}
