:root,
:root[data-theme="dark"] {
  --bg: #0b1021;
  --surface: #151b31;
  --surface-2: #1d263f;
  --text: #e0f2fe;
  --muted: #7dd3fc;
  --line: #263653;
  --accent: #38bdf8;
  --accent-2: #10b981;
  --warn: #f59e0b;
  --bad: #fb7185;
  --shadow: rgba(2, 6, 23, 0.55);
  --cell: rgba(255, 255, 255, 0.055);
  --block: #020617;
  --radius: 16px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #eaf2f8;
  --text: #0f172a;
  --muted: #0369a1;
  --line: #cbd5e1;
  --accent: #0284c7;
  --accent-2: #059669;
  --warn: #d97706;
  --bad: #e11d48;
  --shadow: rgba(148, 163, 184, 0.35);
  --cell: #ffffff;
  --block: #0f172a;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--accent) 16%, transparent), transparent 38%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.hidden { display: none !important; }
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .45rem;
  min-height: 42px;
  padding: .28rem .55rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.logo { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .06em; }
.logo-compact {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  flex: none;
  min-width: 4.9rem;
  line-height: .92;
  font-size: .82rem;
  text-transform: lowercase;
}
.logo-compact span + span {
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: 0;
}
.header-title { display: flex; flex-direction: column; min-width: 0; }
.header-title small { color: var(--muted); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .65rem; }
.header-title strong { font-size: 1rem; }
.header-actions { display: flex; gap: .28rem; flex-wrap: nowrap; justify-content: flex-end; min-width: 0; }
.btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: .5rem .72rem;
  font-weight: 800;
  cursor: pointer;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #00111f; }
.btn:disabled { opacity: .5; cursor: default; }
.app-main { width: min(100%, 960px); margin: 0 auto; padding: .75rem; }
.launch-screen { min-height: calc(100dvh - 64px); display: grid; place-items: center; }
.launch-card {
  width: min(100%, 720px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 95%, transparent), color-mix(in srgb, var(--bg) 96%, transparent));
  box-shadow: 0 24px 70px var(--shadow);
  padding: 1.15rem;
}
.launch-kicker { color: var(--accent); font-weight: 900; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; }
.launch-title { margin: .3rem 0 .35rem; font-size: clamp(2rem, 8vw, 3.8rem); line-height: .95; }
.launch-intro { color: var(--muted); margin: 0 0 1rem; line-height: 1.55; }
.first-badge { display: inline-flex; color: #00111f; background: var(--accent-2); border-radius: 999px; padding: .25rem .55rem; font-size: .75rem; font-weight: 900; margin-bottom: .75rem; }
.launch-actions { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.launch-choice {
  text-align: left;
  min-height: 90px;
  padding: .95rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
.launch-choice-primary { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 26%, transparent); }
.launch-choice-easy { min-height: 112px; padding: 1.1rem; }
.launch-choice-easy .launch-choice-label { font-size: 1.24rem; }
.launch-choice-label { display: block; font-size: 1.05rem; font-weight: 900; }
.launch-choice-sub { display: block; margin-top: .35rem; color: var(--muted); font-size: .86rem; line-height: 1.35; }
.launch-advanced {
  border-top: 1px solid var(--line);
  padding-top: .6rem;
}
.launch-advanced > summary {
  width: max-content;
  max-width: 100%;
  cursor: pointer;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 900;
}
.launch-advanced > summary::-webkit-details-marker { display: none; }
.launch-advanced > summary::before {
  content: "+";
  display: inline-block;
  width: 1.15em;
  color: var(--accent);
}
.launch-advanced[open] > summary::before { content: "-"; }
.launch-advanced-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin-top: .65rem;
}
.launch-choice-secondary {
  min-height: 72px;
  padding: .75rem;
  border-radius: 14px;
}
.launch-choice-secondary .launch-choice-label { font-size: .92rem; }
.launch-choice-secondary .launch-choice-sub { font-size: .76rem; }
.custom-panel { margin-top: .85rem; padding: .85rem; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.setup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-bottom: .85rem; }
.setup-grid label { display: flex; flex-direction: column; gap: .35rem; color: var(--muted); font-size: .8rem; font-weight: 800; }
select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: .65rem; color: var(--text); background: var(--surface); font: inherit; }
.source-note { color: var(--muted); min-height: 1.2em; margin-top: .75rem; font-size: .8rem; }
.play-shell { display: grid; gap: .65rem; }
.board-wrap { width: min(100%, var(--cw-board-open-size, 560px)); margin: 0 auto; }
.board {
  display: grid;
  gap: 2px;
  aspect-ratio: 1 / 1;
  border: 4px solid var(--line);
  border-radius: 12px;
  background: var(--line);
  overflow: hidden;
  box-shadow: 0 18px 46px var(--shadow);
}
.cell {
  position: relative;
  border: 0;
  padding: 0;
  min-width: 0;
  display: grid;
  place-items: center;
  background: var(--cell);
  color: var(--text);
  font-weight: 900;
  font-size: clamp(1rem, 6vw, 1.9rem);
}
.cell-block { background: var(--block); }
.cell-stop { background: color-mix(in srgb, var(--block) 82%, var(--accent)); opacity: .7; }
.cell-open { cursor: pointer; }
.board.has-active .cell-open:not(.cell-active) { filter: brightness(.68); opacity: .74; }
.cell-active { background: color-mix(in srgb, var(--accent) 22%, var(--cell)); filter: none !important; opacity: 1 !important; z-index: 2; }
.cell-active-across { box-shadow: inset 0 4px 0 var(--accent), inset 0 -4px 0 var(--accent); }
.cell-active-down { box-shadow: inset 4px 0 0 var(--accent-2), inset -4px 0 0 var(--accent-2); }
.cell-focus { outline: 3px solid var(--text); outline-offset: -5px; background: var(--accent); color: #00111f; z-index: 4; }
.cell-char { pointer-events: none; line-height: 1; }
.cell-start-labels { position: absolute; top: .22rem; left: .28rem; z-index: 7; display: flex; align-items: flex-start; pointer-events: none; line-height: 1; }
.cell-start-label {
  width: auto;
  height: auto;
  padding: 0;
  display: block;
  font-size: clamp(.52rem, 1.2vw, .72rem);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 0 2px rgba(0,0,0,.75);
}
.cell-number { position: absolute; top: 2px; left: 3px; font-size: .46em; color: var(--muted); }
.cell-cross-badge {
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: clamp(.5rem, 23%, .72rem);
  height: clamp(.5rem, 23%, .72rem);
  padding: 0;
  color: var(--accent-2);
  font-size: clamp(.38rem, 30%, .5rem);
  line-height: 1;
  font-weight: 950;
  border: 1px solid color-mix(in srgb, var(--accent-2) 58%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  pointer-events: none;
}
.current-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 12px 30px var(--shadow);
  padding: .7rem;
}
.clue-toolbar {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  gap: .55rem;
  align-items: stretch;
}
.clue-main { min-width: 0; }
.nav-btn {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--text);
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .1rem;
  font-weight: 900;
  cursor: pointer;
}
.nav-symbol {
  font-size: 2.6rem;
  line-height: .72;
  color: var(--accent);
}
.nav-label {
  color: var(--muted);
  font-size: .72rem;
}
.current-top { display: grid; grid-template-columns: minmax(0, auto) auto 1fr auto; align-items: center; gap: .36rem; }
.current-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: .28rem .62rem; background: var(--surface-2); color: var(--muted); font-weight: 900; }
.status-correct { color: var(--accent-2); }
.status-wrong { color: var(--bad); }
.status-tone { color: var(--warn); }
.progress { color: var(--muted); font-weight: 900; text-align: right; }
.tool-icon-btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
}
.direction-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  color: var(--text);
  min-height: 34px;
  padding: .28rem .52rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .28rem;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}
.current-pattern {
  width: 100%;
  margin: .65rem 0 .25rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-size: clamp(1.7rem, 8vw, 3rem);
  font-weight: 900;
  letter-spacing: 0;
  min-height: 1.1em;
  padding: 0;
}
.current-pattern.can-edit {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-2) 42%, transparent);
  padding: .18rem .45rem;
  cursor: pointer;
}
.current-pattern.can-edit::after {
  content: "直す";
  display: inline-flex;
  margin-left: .45rem;
  vertical-align: middle;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .12rem .38rem;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: 0;
}
.current-clue { color: var(--text); line-height: 1.45; }
.tool-strip {
  display: flex;
  gap: .45rem;
  align-items: stretch;
  margin-top: .65rem;
}
.tool-btn {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
  color: var(--text);
  min-height: 44px;
  padding: .45rem .7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  font-weight: 900;
  cursor: pointer;
}
.direction-tool { flex: 1; }
.edit-tool { flex: 1; background: color-mix(in srgb, var(--warn) 16%, var(--surface-2)); }
.tool-symbol { color: var(--accent); font-size: 1.18rem; line-height: 1; }
.hint-panel {
  margin-top: .52rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
}
.assist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}
.hint-toggle {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  min-height: 46px;
  padding: .65rem .78rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  font-weight: 900;
  cursor: pointer;
}
.pass-toggle {
  min-width: 74px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--warn) 18%, transparent);
  color: var(--text);
  padding: .55rem .75rem;
  font-weight: 900;
  cursor: pointer;
}
.hint-count {
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.hint-history { display: flex; flex-direction: column; gap: .35rem; padding: 0 .65rem .65rem; }
.hint-line { border-left: 3px solid var(--accent-2); padding: .45rem .6rem; background: color-mix(in srgb, var(--surface-2) 72%, transparent); border-radius: 10px; color: var(--muted); }
.edit-return {
  width: 100%;
  margin-top: .42rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--warn) 16%, var(--surface-2));
  color: var(--text);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  font-weight: 900;
  cursor: pointer;
}
.palette {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  transform: translateY(115%);
  transition: transform .22s ease;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 -10px 34px var(--shadow);
  padding: .4rem .55rem calc(.48rem + env(safe-area-inset-bottom));
  backdrop-filter: blur(12px);
}
.palette.up { transform: translateY(0); }
.palette-head { display: flex; align-items: center; justify-content: flex-end; margin: -.08rem .22rem .18rem; }
.palette-mode { display: none; }
.palette-close {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 98%, transparent);
  color: var(--text);
  border-radius: 999px;
  width: 38px;
  height: 24px;
  font-size: 1.08rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.palette-keys { display: grid; grid-template-columns: repeat(8, 1fr); gap: .3rem; max-width: 560px; margin: 0 auto; }
.palette-keys.tone { grid-template-columns: repeat(3, 1fr); gap: .36rem; align-items: stretch; }
.palette-keys .palette-btn { min-height: 44px; font-size: clamp(1.05rem, 4.6vw, 1.36rem); }
.tone-label { grid-column: 1 / -1; color: var(--muted); font-weight: 900; }
.palette-btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  min-height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.08rem;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}
.letter-palette .palette-btn {
  min-height: 44px;
  font-size: clamp(1.05rem, 4.6vw, 1.36rem);
}
.tone-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 46px; font-size: clamp(1rem, 4.2vw, 1.24rem); }
.tone-btn small { color: var(--muted); font-size: .68rem; }
.tone-btn.active { background: var(--accent); color: #00111f; }
.tone-btn.active small { color: #063348; }
.edit-wide { grid-column: 1 / -1; }
.delete-btn { background: color-mix(in srgb, var(--bad) 24%, var(--surface-2)); }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(6px);
}
.modal-sheet {
  width: min(100%, 760px);
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  box-shadow: 0 -18px 60px var(--shadow);
  overflow: hidden;
}
.modal-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.05rem; }
.icon-btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 999px; width: 36px; height: 36px; font-size: 1.2rem; cursor: pointer; }
.clue-tabs { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: .65rem; border-bottom: 1px solid var(--line); }
.tab-btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: .65rem; font-weight: 900; }
.tab-btn.active { background: var(--accent); color: #00111f; border-color: var(--accent); }
.clue-list, .status-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: .65rem; display: flex; flex-direction: column; gap: .45rem; }
.clue-row, .modal-list-row {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .7rem;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
}
.clue-row.active { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.clue-row-top, .modal-list-row { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; }
.clue-row-top em, .modal-list-row small { color: var(--muted); font-style: normal; font-size: .8rem; }
.clue-row-hint { display: block; color: var(--muted); margin-top: .28rem; line-height: 1.35; }
.modal-actions { padding: .75rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.result-summary { font-size: 1.7rem; font-weight: 900; text-align: center; padding: 1rem; color: var(--accent-2); }
@media (max-width: 640px) {
  .app-main { padding: .55rem; }
  .app-header { padding: .22rem .42rem; gap: .3rem; min-height: 38px; }
  .logo-compact { min-width: 4.45rem; font-size: .76rem; }
  .logo-compact span + span { font-size: .62rem; }
  .launch-advanced-grid { grid-template-columns: 1fr; }
  .setup-grid { grid-template-columns: 1fr; }
  .board-wrap { width: min(100%, var(--cw-board-open-size, 330px)); }
  .current-card { padding: .55rem; }
  .clue-toolbar { grid-template-columns: 48px minmax(0, 1fr) 48px; gap: .42rem; }
  .nav-btn { min-height: 76px; border-radius: 14px; }
  .nav-symbol { font-size: 2.28rem; }
  .nav-label { font-size: .66rem; }
  .current-top { grid-template-columns: minmax(0, auto) auto 1fr 36px; gap: .28rem; }
  .current-badge { padding: .24rem .5rem; font-size: .78rem; }
  .direction-chip { min-height: 32px; padding: .22rem .42rem; font-size: .72rem; }
  .tool-icon-btn { width: 36px; height: 36px; }
  .current-pattern { margin: .42rem 0 .12rem; font-size: clamp(1.35rem, 6vw, 2rem); }
  .current-pattern.can-edit { padding: .14rem .38rem; }
  .current-clue { font-size: .95rem; line-height: 1.3; }
  .hint-panel { margin-top: .38rem; }
  .tool-strip { gap: .36rem; margin-top: .52rem; }
  .tool-btn { min-height: 42px; padding: .4rem .55rem; font-size: .82rem; }
  .hint-toggle { min-height: 44px; padding: .58rem .68rem; }
  .palette { padding: .35rem .4rem calc(.38rem + env(safe-area-inset-bottom)); }
  .palette-head { margin: -.1rem .16rem .18rem; }
  .palette-mode { font-size: .72rem; }
  .palette-close { width: 34px; height: 22px; font-size: 1rem; }
  .palette-keys { grid-template-columns: repeat(8, 1fr); gap: .25rem; }
  .palette-keys .palette-btn { min-height: 42px; font-size: clamp(1rem, 4.8vw, 1.25rem); border-radius: 10px; }
  .palette-keys.tone { grid-template-columns: repeat(3, 1fr); gap: .32rem; }
  .palette-keys.tone .palette-btn { min-height: 44px; }
  .header-actions .btn {
    min-height: 44px;
    padding: .42rem .55rem;
    font-size: .75rem;
  }
}

/* ===== クルーパネル（一覧アコーディオン・v7 clue UX） ===== */
.ic { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
.clue-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 12px 30px var(--shadow);
  overflow: hidden;
}
body.palette-open .clue-panel {
  max-height: var(--cw-clue-panel-max-height, 180px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dir-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-bottom: 1px solid var(--line); }
body.palette-open .dir-tabs { position: sticky; top: 0; z-index: 2; }
.dir-tabs button { border: 0; background: transparent; color: var(--muted); font-weight: 900; font-size: .92rem; padding: .62rem; cursor: pointer; border-bottom: 2px solid transparent; }
.dir-tabs button.on[data-tab="across"] { color: var(--accent); border-bottom-color: var(--accent); }
.dir-tabs button.on[data-tab="down"] { color: var(--accent-2); border-bottom-color: var(--accent-2); }

.clue-accordion { display: flex; flex-direction: column; }
.clue { border-bottom: 1px solid var(--line); }
.clue:last-child { border-bottom: 0; }
.clue-head { display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: center; gap: .5rem; padding: .6rem .8rem; cursor: pointer; border-left: 4px solid var(--st, transparent); }
.clue.active .clue-head { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.h-num { font-weight: 900; font-size: .9rem; color: var(--dir, var(--accent)); white-space: nowrap; }
.h-slots { font-size: clamp(1.05rem, 4.8vw, 1.4rem); font-weight: 900; letter-spacing: .12em; color: var(--text); cursor: text; }
.h-tools { display: flex; align-items: center; gap: .1rem; justify-self: end; }
.h-tool { border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; border-radius: 8px; }
.h-tool:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.h-done { color: var(--accent-2); display: grid; place-items: center; justify-self: end; }
.h-chev { color: var(--accent); display: grid; place-items: center; transition: transform .2s ease; }
.clue.active .h-chev { transform: rotate(180deg); }
.clue:not(.active) .h-tools { display: none; }

.facet { display: grid; grid-template-columns: 1.35em auto 1fr; align-items: center; gap: .65rem; padding: .5rem .8rem .5rem 1.7rem; color: var(--muted); }
.facet + .facet { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.facet .f-ic { color: var(--muted); }
.facet .f-label { font-weight: 900; font-size: .85rem; color: var(--text); white-space: nowrap; }
.facet .f-content { min-width: 0; text-align: right; font-weight: 800; color: color-mix(in srgb, var(--muted) 60%, transparent); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet.primary .f-ic { color: var(--accent); }
.facet.primary .f-label { display: none; }
.facet.primary .f-content { text-align: left; color: var(--text); font-size: clamp(1.05rem, 4.6vw, 1.32rem); font-weight: 900; white-space: normal; line-height: 1.3; }
.clue:not(.active) .facet:not(.primary) { display: none; }
.facet.locked { cursor: pointer; }
.facet.open .f-ic { color: var(--accent-2); }
.facet.open .f-content { color: var(--text); font-size: .95rem; white-space: normal; text-align: right; }
.facet.pass { cursor: pointer; color: var(--warn); }
.facet.pass .f-ic { color: var(--warn); }
.facet.pass .f-label { color: var(--warn); }
.facet.pass .f-content { color: color-mix(in srgb, var(--warn) 75%, transparent); font-size: .72rem; }
