/* ═══════════════════════════════════════════════════════════════
   boardgameBuilder — v0.3
   Tool-specific overrides on base-ui.css

   Design principles:
   - Dark header on top (--bg)
   - Cream body surface (--surface) below
   - Centre canvas as a single card
   - Feedback panel uses .k-narrative (4px accent bar)
   - No rainbow tints; differentiation via mono labels + spatial separation
   - Three-state symbols ●◐○ used where semantic
   ═══════════════════════════════════════════════════════════════ */

/* Classes that set display (.phase-actions is flex) would otherwise show an element marked hidden */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  overflow: hidden;
}

/* ── Header (dark bar) ────────────────────────────────────── */

.k-header {
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--border-dark);
  height: 56px;
  flex-shrink: 0;
}

.k-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  max-width: none;
}

.k-tool-identity {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.k-tool-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--light);
  letter-spacing: -0.005em;
}

.k-tool-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--light3);
  text-transform: uppercase;
}

.k-header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.turn-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--light);
  text-transform: uppercase;
  padding: 5px 11px;
  border: 1px solid var(--border-dark);
  border-radius: 3px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
}

/* a.k-header-link matches the base stylesheet's selector, so these win; the base grey on the dark bar was unreadable */
.k-header-link, a.k-header-link {
  font-family: var(--font-label);
  font-size: 12.5px;
  color: #D5DADB;
  text-decoration: none;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.k-header-link:hover, a.k-header-link:hover { color: #FFFFFF; }
.k-header-link svg { width: 15px; height: 15px; fill: currentColor; }

/* ── Main layout ────────────────────────────────────────────────── */

.app-main {
  display: grid;
  grid-template-columns: 280px 1fr 380px;
  height: calc(100vh - 56px);
  background: var(--surface);
  overflow: hidden;
}

@media (max-width: 1280px) {
  .app-main { grid-template-columns: 240px 1fr 340px; }
}

.palette,
.canvas,
.feedback-panel {
  overflow-y: auto;
  scrollbar-width: thin;
}

/* ── Section eyebrow + region patterns ──────────────────────────── */

.section-eyebrow,
.region-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink3);
}

.region-eyebrow {
  color: var(--accent);
  margin-bottom: 6px;
}

.region-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.2;
  margin-bottom: 4px;
}

.region-hint,
.section-hint {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-style: italic;
  color: var(--ink3);
  line-height: 1.45;
}

.region-hint em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

/* ── Palette (left column) ──────────────────────────────────────── */

.palette {
  background: var(--surface-inner);
  border-right: 1px solid var(--surface-border);
  padding: 24px 22px 32px;
}

.palette-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--surface-border);
}

.palette-header .section-eyebrow {
  display: block;
  margin-bottom: 4px;
}

.palette-search {
  position: sticky;
  top: -24px;
  z-index: 2;
  margin: 0 -22px 14px;
  padding: 10px 22px;
  background: var(--surface-inner);
}

.palette-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--surface-border);
  border-radius: 4px;
}

.palette-search input:focus {
  outline: none;
  border-color: var(--accent);
}

.palette-no-match {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink3);
  margin: 0;
}

.palette-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.palette-group { padding: 0; }

.palette-group + .palette-group {
  padding-top: 16px;
  border-top: 1px solid var(--surface-border);
}

.group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.group-letter {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--surface);
  letter-spacing: 0;
  flex-shrink: 0;
}

.group-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Feeling group has accent treatment */
.palette-group.group-feeling .group-letter {
  background: var(--accent);
  color: white;
}
.palette-group.group-feeling .group-title { color: var(--accent); }

.group-description {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink3);
  line-height: 1.4;
  margin: 0 0 10px 28px;
}

.block-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-left: 28px;
}

/* ── Block (chip) ───────────────────────────────────────────────── */

.block {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink);
  background: white;
  border: 1px solid var(--surface-border);
  border-radius: 3.5px;
  cursor: grab;
  user-select: none;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.08s ease;
  white-space: nowrap;
}

.block:hover {
  border-color: var(--ink3);
  transform: translateY(-1px);
}
.block:active { cursor: grabbing; }
.block.dragging { opacity: 0.4; transform: none; }

.block[data-dim="feeling"] {
  font-style: italic;
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-bg);
}

.block-in-slot {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
}
.block-in-slot[data-dim="feeling"] {
  /* same accent treatment */
}

/* a block tagged in How our game plays: filled, with a dark border */
.block-in-slot.tagged {
  background: var(--accent);
  border: 2px solid var(--ink);
  color: white;
}
.block-in-slot.tagged .info-btn { color: white; opacity: 0.9; }
.block-in-slot.tagged .info-btn:hover { background: white; color: var(--accent); border-color: white; }

.block-in-slot .remove-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 2px;
  font-size: 13px;
  font-weight: 400;
  color: currentColor;
  opacity: 0.55;
  cursor: pointer;
  line-height: 1;
}
.block-in-slot .remove-x:hover { opacity: 1; }

/* ── Canvas (centre column) ─────────────────────────────────────── */

.canvas {
  background: var(--surface);
  padding: 32px 36px 40px;
  border-right: 1px solid var(--surface-border);
}

.canvas-card {
  background: white;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 28px 30px 32px;
  max-width: 720px;
  margin: 0 auto;
}

.canvas-region + .canvas-divider + .canvas-region {
  margin-top: 28px;
}

.canvas-divider {
  height: 1px;
  background: var(--surface-border);
  margin: 28px -30px;
}

.region-header {
  margin-bottom: 16px;
}

/* ── Feelings shelf ─────────────────────────────────────────────── */

.feelings-shelf {
  min-height: 76px;
  background: var(--accent-bg);
  border: 1px dashed var(--accent);
  border-radius: 4px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  transition: background 0.15s ease, border-style 0.15s ease;
}

.feelings-shelf.drop-active {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-style: solid;
}

.feelings-shelf .empty-hint {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 13px;
  color: var(--accent);
  opacity: 0.75;
}

/* ── How our game plays: the narrative box and its @tags ─────────── */

.narrative { position: relative; }

/* the box and the text drawn behind it share every measure, so the marked tags sit exactly under the typed ones */
.narrative textarea, .narrative-backdrop {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: normal;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  border: 1px solid var(--surface-border);
  border-radius: 4px;
}

.narrative textarea {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 140px;
  color: transparent;
  caret-color: var(--ink);
  background: transparent;
  resize: none;
  overflow: hidden;
}
.narrative textarea::placeholder { color: var(--ink3); }
.narrative textarea::selection { color: transparent; background: var(--accent-bg); }

.narrative-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: var(--ink);
  background: white;
  border-color: transparent;
  overflow: hidden;
  pointer-events: none;
}
.narrative.locked .narrative-backdrop { background: var(--surface-inner); }

/* a tag in the text: filled in the accent colour, with a dark edge drawn as a ring so no letter moves */
.narrative-backdrop mark.tag {
  color: white;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 3px var(--ink);
}
.narrative-backdrop mark.tag.gone { color: var(--ink3); background: none; box-shadow: none; text-decoration: line-through; }

.narrative textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }

.narrative-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--accent);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(45, 52, 54, 0.18);
  padding: 4px;
}

.narrative-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 3px;
  background: none;
  font-family: var(--font-label);
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.narrative-choice.on, .narrative-choice:hover { background: var(--accent-bg); }
.narrative-choice .choice-box { font-family: var(--font-mono); font-size: 11px; color: var(--ink3); }
.narrative-menu-empty { padding: 8px 10px; font-family: var(--font-body); font-style: italic; font-size: 13px; color: var(--ink3); }

.narrative-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.narrative-tags:empty { display: none; }

.narrative-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink2);
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: 3px;
}

.narrative-tag b { font-family: var(--font-label); font-size: 12px; font-weight: 600; color: var(--ink); }
.narrative-tag.gone { background: none; border-style: dashed; border-color: var(--surface-border); color: var(--ink3); }

/* a box with a block tagged in the gameplay carries an @ at its corner */
.mechanic-slot.tagged::after, .feelings-shelf.tagged::after {
  content: "@";
  position: absolute;
  top: -9px;
  right: -9px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: var(--accent);
  border-radius: 50%;
}

.feelings-shelf { position: relative; }

/* ── Mechanics grid (slots) ─────────────────────────────────────── */

.mechanics-grid {
  display: grid;
  /* minmax(0, …) so a long block or answer wraps inside its slot instead of widening the grid past the card */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mechanic-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 76px;
  padding: 12px 14px;
  background: var(--surface-inner);
  border: 1px dashed var(--surface-border);
  border-radius: 4px;
  transition: background 0.12s ease, border-color 0.12s ease, border-style 0.12s ease;
}

.mechanic-slot.filled {
  background: white;
  border-style: solid;
  border-color: var(--accent);
}

.mechanic-slot.drop-active {
  background: var(--accent-bg);
  border-color: var(--accent);
  border-style: solid;
}

.slot-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.slot-cardinality {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border: 1px solid var(--surface-border);
  border-radius: 3px;
  color: var(--ink3);
  background: white;
  text-transform: none;
}

.mechanic-slot.filled .slot-cardinality {
  border-color: var(--accent);
  color: var(--accent);
}

.slot-cardinality.many {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-bg);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

/* Multi-slot — full-width, dashed accent border to read as "stack here" */
.mechanic-slot.multi {
  grid-column: 1 / -1;
  min-height: 96px;
  border-color: var(--accent);
  border-style: dashed;
  background: color-mix(in srgb, var(--accent-bg) 60%, var(--surface-inner));
}

.mechanic-slot.multi.filled {
  border-style: solid;
}

.slot-body-multi {
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.slot-more-hint {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 12px;
  color: var(--accent);
  opacity: 0.7;
  margin-left: 4px;
}

.slot-letter {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink3);
  color: var(--surface);
  flex-shrink: 0;
}

.mechanic-slot.filled .slot-letter {
  background: var(--accent);
}
.mechanic-slot.filled .slot-label {
  color: var(--accent);
}

.slot-body {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  align-items: center;
}

.slot-empty-hint {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink3);
  opacity: 0.6;
}

/* ── Feedback panel (right column) ────────────── */

.feedback-panel {
  background: var(--surface);
  border-left: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
}

.feedback-header {
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface-inner);
}

.feedback-header .region-title {
  font-size: 18px;
  margin-bottom: 0;
}

.feedback-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px 8px;
}

/* k-narrative pattern: 4px accent bar + serif body */
.k-narrative {
  display: flex;
  gap: 0;
  margin-bottom: 22px;
}

.k-narrative-bar {
  width: 3px;
  flex-shrink: 0;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 18px;
}

.k-narrative-body {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}

.k-narrative-body p { margin-bottom: 10px; }
.k-narrative-body p:last-child { margin-bottom: 0; }
.k-narrative-body em { color: var(--accent); font-style: italic; }
.k-narrative-body strong { color: var(--ink); font-weight: 600; }

.feedback-welcome .k-narrative-body p:first-child {
  font-weight: 600;
  font-size: 16px;
}

/* Turn block uses narrative pattern */
.turn-block {
  display: flex;
  gap: 0;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--surface-border);
}

.turn-block:last-of-type { border-bottom: none; margin-bottom: 0; }

.turn-block::before {
  content: "";
  width: 3px;
  flex-shrink: 0;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 18px;
  opacity: 0.65;
}

.turn-block.complete-summary::before {
  opacity: 1;
}

.turn-block-body {
  flex: 1;
  min-width: 0;
}

.turn-number {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}

.turn-narration {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
}

.turn-block.complete-summary .turn-narration {
  font-family: var(--font-display);
  font-size: 16.5px;
  line-height: 1.65;
}

.source-tag {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--ink3);
  text-transform: uppercase;
  opacity: 0.55;
}

.start-again {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  padding-bottom: 1px;
  cursor: pointer;
}
.start-again:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }

/* ── Buttons (base button primitives) ─────────────────────────── */

.feedback-actions > .k-btn-primary,
.feedback-actions > .k-btn-outline { flex: 1; }
.feedback-actions {
  display: flex;
  gap: 8px;
  padding: 16px 26px 22px;
  border-top: 1px solid var(--surface-border);
  background: var(--surface-inner);
}

.k-btn-primary,
.k-btn-outline {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1.2;
  padding: 11px 18px;
  font-family: var(--font-label);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  border: 1px solid;
}

.k-btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.k-btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.k-btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--surface-border);
}
.k-btn-outline:hover {
  border-color: var(--ink3);
  background: white;
}

/* One button standard. ".k button { font: inherit }" and ".k a { color }" are more specific than the button classes,
   so the classes are repeated under .k to win: every button and link-button has the same type, size and height. */
.k .k-btn-primary,
.k .k-btn-outline {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 4px;
}
.k a.k-btn-primary { color: white; }
.k a.k-btn-outline { color: var(--ink); }

.k-btn-primary:disabled,
.k-btn-outline:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Thinking indicator ─────────────────────────────────────────── */

.thinking {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink3);
  padding: 12px 0 4px 21px;
  position: relative;
}
.thinking::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: thinkPulse 1.1s ease-in-out infinite;
}
@keyframes thinkPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ── Locked state ───────────────────────────────────────────────── */

.app-main.locked .palette,
.app-main.locked .canvas {
  opacity: 0.55;
  pointer-events: none;
}

/* ── Block info icon (palette + slot) ───────────────────────────── */

.block { position: relative; }

.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: var(--ink3);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.info-btn:hover {
  opacity: 1;
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.block[data-dim="feeling"] .info-btn,
.block-in-slot .info-btn {
  color: var(--accent);
  opacity: 0.65;
}
.block[data-dim="feeling"] .info-btn:hover,
.block-in-slot .info-btn:hover {
  background: var(--accent);
  color: white;
}

/* ── Block info modal ───────────────────────────────────────────── */

.block-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.block-modal[hidden] { display: none; }

.block-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 52, 54, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.block-modal-card {
  position: relative;
  width: min(440px, calc(100vw - 48px));
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 28px 28px 26px;
  box-shadow: 0 12px 40px rgba(45, 52, 54, 0.18);
  z-index: 1;
}

.block-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 26px;
  height: 26px;
  background: transparent;
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  color: var(--ink3);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-label);
}
.block-modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.block-modal-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.block-modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.15;
}

.block-modal-svg {
  background: white;
  border: 1px solid var(--surface-border);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
}

.block-modal-svg svg {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
}

.block-modal-desc {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}

/* ── Onboarding (reuses the block modal) ───────────────────────── */

.onboarding-card { width: min(560px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow-y: auto; }

.onboarding-steps {
  margin: 0 0 16px;
  padding-left: 22px;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink);
}
.onboarding-steps li { margin-bottom: 10px; }
.onboarding-steps li::marker { font-family: var(--font-mono); color: var(--accent); }

.onboarding-note {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink3);
  margin-bottom: 20px;
}

.onboarding-start { width: 100%; }

/* Link to Prayas Abhinav's site in the header tag */
.k-tool-tag a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.k-tool-tag a:hover { color: var(--accent); }

/* ── Block questions, part tests and known games (from the April 2026 demo, carried over 16 October 2026) ── */
.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--surface-border);
  background: var(--surface-inner);
  flex-shrink: 0;
}
.panel-tab {
  flex: 1;
  padding: 12px 8px 10px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--surface-border);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  position: relative;
  text-align: center;
  line-height: 1.2;
}
.panel-tab:last-child { border-right: none; }
.panel-tab:hover { background: white; color: var(--ink); }
.panel-tab.active {
  background: white;
  color: var(--accent);
}
.panel-tab.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
}
.panel-tab .tab-num {
  display: block;
  font-size: 8.5px;
  color: var(--ink3);
  font-weight: 400;
  letter-spacing: 0.12em;
  margin-bottom: 2px;
}
.panel-tab.active .tab-num { color: var(--accent); }
.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
}
.panel-pane[hidden] { display: none; }
.slot-config {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-top: 6px;
  padding: 4px 8px;
  background: var(--accent-bg);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 3px;
  display: inline-block;
  align-self: flex-start;
  line-height: 1.3;
}
.config-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.config-modal[hidden] { display: none; }
.config-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 52, 54, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.config-modal-card {
  position: relative;
  width: min(560px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-top: 4px solid var(--accent);
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(45, 52, 54, 0.22);
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.config-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  color: var(--ink3);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.config-modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.config-modal-head {
  padding: 26px 32px 16px;
  border-bottom: 1px solid var(--surface-border);
}
.config-modal-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.config-modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
  line-height: 1.15;
}
.config-modal-body {
  padding: 22px 32px;
  overflow-y: auto;
  flex: 1;
}
.config-q { margin-bottom: 18px; }
.config-q-label {
  font-family: var(--font-label);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}
.config-opts {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.config-opt {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 12px;
  border: 1px solid var(--surface-border);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.12s ease;
  background: white;
}
.config-opt:hover { border-color: var(--accent); }
.config-opt.selected {
  background: var(--accent-bg);
  border-color: var(--accent);
}
.config-opt input {
  margin-top: 3px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.config-opt-name {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.config-opt-detail {
  font-family: var(--font-body);
  font-size: 11.5px;
  color: var(--ink3);
  margin-top: 2px;
  line-height: 1.4;
}
.config-modal-foot {
  padding: 14px 32px;
  border-top: 1px solid var(--surface-border);
  background: var(--surface-inner);
  display: flex;
  align-items: center;
  gap: 12px;
}
.config-modal-foot .k-btn-primary {
  flex-shrink: 0;
}
.schematic-empty,
.tests-empty {
  text-align: center;
  padding: 48px 20px 36px;
  color: var(--ink3);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.55;
}
.test-card {
  background: white;
  border: 1px solid var(--surface-border);
  border-top: 3px solid var(--accent);
  padding: 18px 20px;
  margin-bottom: 16px;
  border-radius: 3px;
}
.test-card-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.test-card-tag.seam {
  color: white;
  background: var(--accent);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 8px;
}
.test-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.2;
}
.test-card-time {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--ink);
  color: white;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.test-card-rules {
  background: var(--surface-inner);
  padding: 11px 14px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 14px;
  color: var(--ink);
}
.test-card-rules .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 4px;
}
.form-q { margin-bottom: 12px; }
.form-q-label {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.opt-pill {
  font-family: var(--font-label);
  font-size: 11.5px;
  padding: 5px 10px;
  border: 1px solid var(--surface-border);
  border-radius: 99px;
  background: white;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s ease;
  color: var(--ink);
}
.opt-pill:hover { border-color: var(--accent); }
.opt-pill.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.opt-pill .sym {
  font-family: var(--font-display);
  font-size: 12px;
  margin-right: 4px;
}
.text-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--surface-border);
  padding: 6px 0;
  font-family: var(--font-body);
  font-size: 12.5px;
  background: transparent;
  color: var(--ink);
}
.text-input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.test-saved-indicator {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  margin-top: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.test-saved-indicator.show { opacity: 1; }
.phase-overlay {
  position: fixed;
  top: 56px; 
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  z-index: 50;
  overflow-y: auto;
  padding: 32px 40px 60px;
}
.phase-overlay[hidden] { display: none; }
.phase-shell {
  max-width: 880px;
  margin: 0 auto;
}
.phase-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.phase-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.1;
}
.phase-intro {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink2);
  max-width: 640px;
  margin-bottom: 30px;
}
.fam-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink3);
}
.fam-progress .dots { display: flex; gap: 6px; }
.fam-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid var(--surface-border);
}
.fam-dot.done { background: var(--accent); border-color: var(--accent); }
.fam-dot.current { background: white; border-color: var(--accent); border-width: 2px; }
.fam-card {
  background: white;
  border: 1px solid var(--surface-border);
  border-top: 4px solid var(--accent);
  border-radius: 6px;
  padding: 32px 36px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(45,52,54,0.04);
}
.fam-card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.fam-card h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.15;
}
.fam-parent {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 13px;
  color: var(--ink3);
  margin-bottom: 14px;
}
.fam-meta {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink3);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.fam-meta span strong {
  color: var(--accent);
  font-weight: 500;
}
.fam-equipment {
  background: var(--surface-inner);
  padding: 14px 18px;
  border-radius: 4px;
  margin-bottom: 22px;
}
.fam-equipment-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 6px;
}
.fam-equipment ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px !important;
  line-height: 1.65;
  color: var(--ink) !important;
}
.fam-equipment ul li {
  color: var(--ink) !important;
  font-family: var(--font-body) !important;
  font-size: 13.5px !important;
  font-style: normal !important;
}
.fam-equipment ul li::marker {
  color: var(--accent);
}
.fam-intro {
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 22px;
  color: var(--ink);
}
.fam-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 22px;
}
.fam-step {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--surface-border);
}
.fam-step:first-child { border-top: none; padding-top: 0; }
.fam-step.plain { grid-template-columns: 1fr; }
.fam-lesson { margin: 16px 0; padding: 14px 18px; background: white; border: 1px solid var(--accent); border-radius: 6px; }
.fam-lesson p { margin: 6px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink); }
.fam-credits { margin: 14px 0 18px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--surface-inner); border-radius: 0 4px 4px 0; }
.fam-credits dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 6px 0 0; font-size: 14px; line-height: 1.45; }
.fam-credits dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink3); padding-top: 2px; }
.fam-credits dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 560px) { .fam-credits dl { grid-template-columns: 1fr; gap: 2px; } .fam-credits dd { margin-bottom: 8px; } }
.fam-download { display: inline-block; margin-top: 10px; font-family: var(--font-label); font-size: 14px; color: var(--accent); }
.fam-step-svg {
  background: var(--surface-inner);
  border-radius: 4px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}
.fam-step-svg svg {
  width: 100%;
  max-width: 90px;
  height: auto;
}
.fam-step-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.fam-step-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.2;
}
.fam-step-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
}
.fam-notice {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 3px;
  margin-bottom: 24px;
}
.fam-notice-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.fam-notice ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px !important;
  line-height: 1.65;
  color: var(--ink) !important;
}
.fam-notice ul li {
  color: var(--ink) !important;
  font-family: var(--font-body) !important;
  font-size: 13.5px !important;
  font-style: normal !important;
}
.fam-notice ul li::marker {
  color: var(--accent);
}
.phase-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.analysis-stage {
  background: white;
  border: 1px solid var(--surface-border);
  border-top: 4px solid var(--accent);
  border-radius: 6px;
  padding: 30px 36px;
  margin-bottom: 22px;
}
.anim-wrap {
  background: #FAF7F1;
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  padding: 22px;
  margin-bottom: 18px;
  position: relative;
  min-height: 280px;
}
.anim-narration {
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: white;
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 3px;
  min-height: 50px;
}
.anim-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}
.anim-controls .anim-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink3);
  margin-left: auto;
  letter-spacing: 0.05em;
}
.mcq-list { margin-top: 18px; }
.mcq-card {
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  padding: 18px 20px;
  margin-bottom: 14px;
  background: white;
}
.mcq-q {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.3;
}
.mcq-q-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 8px;
}
.mcq-opts { display: flex; flex-direction: column; gap: 6px; }
.mcq-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--surface-border);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.12s ease;
  background: white;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 400;
  font-style: normal;
}
.mcq-opt > div {
  color: var(--ink) !important;
  font-family: var(--font-body) !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-size: 14.5px !important;
  opacity: 1 !important;
}
.mcq-opt:hover { border-color: var(--accent); background: #FFFAF6; }
.mcq-opt:hover > div { color: var(--ink) !important; }
.mcq-opt.selected {
  background: var(--accent-bg);
  border-color: var(--accent);
}
.mcq-opt.selected > div { color: var(--ink) !important; }
.mcq-opt input { margin-top: 4px; accent-color: var(--accent); flex-shrink: 0; }
.mcq-opt.correct {
  background: #EAF5EE;
  border-color: #4A8B6A;
}
.mcq-opt.correct > div { color: #265B3D !important; }
.mcq-opt.wrong {
  background: #FBEAE5;
  border-color: #C75B39;
}
.mcq-opt.wrong > div { color: #7A2A0F !important; }
.mcq-feedback {
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  padding: 10px 14px;
  border-radius: 3px;
  display: none;
}
.mcq-feedback.show { display: block; }
.mcq-feedback.correct { background: #EAF5EE; color: #265B3D; border-left: 3px solid #4A8B6A; }
.mcq-feedback.wrong { background: #FBEAE5; color: #7A2A0F; border-left: 3px solid #C75B39; }
.analysis-result {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 18px 0 10px;
}
.analysis-result.passed { color: #4A8B6A; }
.analysis-result.failed { color: #C75B39; }
.feedback-panel > .panel-pane { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.feedback-panel > .panel-pane[hidden] { display: none; }
.slot-item { display: inline-flex; flex-wrap: wrap; align-items: stretch; gap: 6px; max-width: 100%; min-width: 0; }
button.slot-config { display: inline-block; margin: 0; padding: 0 10px; height: 32px; line-height: 30px; max-width: 16rem; border: 1px dashed var(--accent); border-radius: 4px; background: transparent; cursor: pointer; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.05em; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.slot-config:hover:not(:disabled) { background: var(--accent-bg, rgba(74, 140, 92, 0.1)); border-style: solid; }
button.slot-config:disabled { cursor: default; }
.games-nav { justify-content: space-between; margin: 0 0 18px; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 12px; margin-top: 18px; }
.game-pick { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; background: white; border: 1px solid var(--surface-border); border-radius: 6px; cursor: pointer; font-family: var(--font-body); color: var(--ink); }
.game-pick strong { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.game-pick-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.game-pick-meta > span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--ink); background: var(--surface-inner); border-radius: 3px; padding: 3px 7px; }
.game-pick-meta em { font-style: normal; color: var(--ink3); text-transform: uppercase; letter-spacing: 0.08em; margin-right: 4px; }
.game-pick-from { font-size: 13px; font-style: italic; color: var(--ink3); line-height: 1.45; }
.game-pick:hover { border-color: var(--accent); }
.mcq-heading { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin: 18px 0 12px; }
.mcq-discuss { display: block; margin-top: 4px; color: var(--ink3); font-size: 14px; }
.config-modal-foot .config-preview { color: var(--ink2); font-family: var(--font-body); font-size: 14px; }
.mcq-feedback.show:not(.correct):not(.wrong) { background: var(--surface-inner); color: var(--ink2); border-left: 3px solid var(--ink3); }


/* ── Play on screen (#play) ─────────────────────────────────────── */

.play-overlay:fullscreen { top: 0; padding-top: 24px; }
.play-shell { max-width: 1180px; margin: 0 auto; color: var(--ink); }
.play-overlay .games-nav { justify-content: flex-end; flex-wrap: wrap; }
.play-share { margin: 0 0 18px; }
.play-share input { width: 100%; box-sizing: border-box; padding: 8px 10px; font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--surface-border); border-radius: 4px; background: white; }
.play-note { font-family: var(--font-body); font-style: italic; font-size: 13px; color: var(--ink3); margin: 6px 0 0; }

.play-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 18px 32px; margin-bottom: 22px; }
.play-list { margin: 6px 0 0; padding-left: 18px; font-size: 14.5px; line-height: 1.5; color: var(--ink2); }
.play-seats { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.play-seat { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.play-seat input, .play-seat select, .play-field input { padding: 7px 10px; font-family: var(--font-body); font-size: 14px; border: 1px solid var(--surface-border); border-radius: 4px; background: white; color: var(--ink); }
.play-seat-name { width: 12rem; max-width: 100%; }
.play-seat-goal { flex: 1; min-width: 12rem; }
.play-seat-remove { border: none; background: none; font-size: 18px; color: var(--ink3); cursor: pointer; }
.play-field { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; font-size: 14.5px; }
.play-start { margin-top: 22px; }

.play-top { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink2); padding: 10px 14px; background: var(--surface-inner); border: 1px solid var(--surface-border); border-radius: 4px; margin-bottom: 16px; line-height: 1.6; }
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 20px; }
@media (max-width: 900px) { .play-grid { grid-template-columns: minmax(0, 1fr); } }
.play-decision { background: white; border: 1px solid var(--accent); border-top-width: 4px; border-radius: 6px; padding: 16px 18px; margin-bottom: 18px; }
.play-prompt { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin: 0 0 12px; color: var(--ink); }
.play-options { display: flex; flex-wrap: wrap; gap: 8px; }
.k .play-option { min-height: 36px; padding: 6px 14px; text-align: left; white-space: normal; }
.play-private { font-size: 13.5px; margin-bottom: 10px; padding: 8px 10px; background: var(--accent-bg); border-radius: 4px; }
.play-tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink3); border: 1px solid var(--surface-border); border-radius: 3px; padding: 1px 5px; background: white; }
.play-curtain { text-align: center; padding: 60px 0; }
.play-curtain .phase-intro { margin: 0 auto 24px; }

.play-board { display: flex; flex-direction: column; gap: 8px; }
.play-board .fam-equipment-label { margin-top: 8px; }
.play-track { display: flex; flex-wrap: wrap; gap: 4px; }
.play-cell { position: relative; width: 52px; height: 46px; box-sizing: border-box; padding: 14px 4px 2px; border: 1px solid var(--surface-border); border-radius: 4px; background: white; font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); text-align: center; }
.play-cell.marked { background: var(--accent-bg); }
.play-cell i { position: absolute; top: 2px; left: 4px; font-style: normal; font-size: 8.5px; color: var(--ink3); }
.play-cell b { display: inline-block; margin: 1px; padding: 0 3px; border-radius: 3px; background: var(--ink); color: white; font-weight: 500; font-size: 9.5px; }
.play-market { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.play-card { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 34px; border-radius: 4px; background: var(--c); color: white; font-family: var(--font-mono); font-size: 13px; font-weight: 500; vertical-align: middle; }
.play-card.back { background: var(--ink3); }
.play-spots { display: flex; flex-wrap: wrap; gap: 6px; }
.play-spot { padding: 5px 10px; border: 1px solid var(--surface-border); border-radius: 4px; background: white; font-size: 13px; }
.play-spot.gone { text-decoration: line-through; color: var(--ink3); }
.play-tiles { display: grid; grid-template-columns: repeat(7, 34px); gap: 3px; }
.play-tiles span { height: 34px; border: 1px dashed var(--surface-border); border-radius: 3px; font-family: var(--font-mono); font-size: 9px; color: var(--ink3); display: flex; align-items: center; justify-content: center; }
.play-mini { display: grid; gap: 2px; width: 54px; margin-top: 6px; }
.play-mini span { height: 16px; border: 1px solid var(--surface-border); border-radius: 2px; background: white; }
.play-table { border-collapse: collapse; font-size: 13.5px; margin: 6px 0 12px; }
.play-table th, .play-table td { border: 1px solid var(--surface-border); padding: 4px 10px; text-align: left; }
.play-table th { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; color: var(--ink3); }

.play-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.play-players { display: flex; flex-direction: column; gap: 8px; }
.play-player { padding: 10px 12px; border: 1px solid var(--surface-border); border-radius: 4px; background: white; }
.play-player.now { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.play-player.out { opacity: 0.5; }
.play-player-name { font-weight: 500; font-size: 14px; margin-bottom: 3px; }
.play-seat-no { display: inline-block; padding: 0 5px; border-radius: 3px; background: var(--ink); color: white; font-family: var(--font-mono); font-size: 11px; font-weight: 500; }
.play-player-bits { font-size: 13px; line-height: 1.6; color: var(--ink2); }
.play-offscreen ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--ink2); }
.play-start + .play-log { margin-top: 28px; }
.play-log p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink2); }
.play-end p { font-size: 16px; line-height: 1.55; margin: 0 0 8px; color: var(--ink2); }
.play-questions { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px; }
.play-question { display: flex; gap: 8px; align-items: center; }
.play-question span { font-family: var(--font-mono); font-size: 12px; color: var(--ink3); width: 1.6em; }
.play-question input { flex: 1; min-width: 0; padding: 7px 10px; font-family: var(--font-body); font-size: 14px; border: 1px solid var(--surface-border); border-radius: 4px; background: white; color: var(--ink); }
.play-share-link { display: flex; gap: 8px; margin-top: 14px; }
.play-share-link input { flex: 1; min-width: 0; }
.play-reply { margin: 22px 0; padding: 16px 18px; background: white; border: 1px solid var(--surface-border); border-radius: 6px; }
.play-reply-q { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; font-size: 14.5px; }
.play-reply-q textarea, .play-reply-text { width: 100%; box-sizing: border-box; padding: 8px 10px; font-family: var(--font-body); font-size: 14px; border: 1px solid var(--surface-border); border-radius: 4px; color: var(--ink); }
.play-reply-text { margin-top: 12px; min-height: 9rem; font-family: var(--font-mono); font-size: 12px; }
