/* Game pages (play.html, and the shared pieces Desire Match reuses: .app, .screen, .card, .chip, .pills, .handoff
   screens, .confirm-box, .toggle, .ember, .dock). Colors come only from the mapped tokens in palette.css/base.css. */

/* ---------- Ember: a soft glow behind the table. Radial gradient, no filter; its color cross-fades between levels. */
@property --ember { syntax: "<color>"; inherits: true; initial-value: transparent; }
.ember {
  --ember: var(--accent);
  position: fixed; left: 50%; top: 42%; z-index: 0;
  width: min(120vmin, 900px); aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--ember), color-mix(in srgb, var(--ember) 38%, transparent) 48%, transparent 100%);
  opacity: var(--glow);
  pointer-events: none;
  transition: --ember 1.1s ease, opacity 1.1s ease;
  animation: kd-breathe 9s ease-in-out infinite;
  will-change: transform;
}
@keyframes kd-breathe { 50% { transform: translate(-50%, -50%) scale(1.08); } }
body.calm .ember { animation: none; }
body.is-hidden .ember, body.is-paused .ember { animation-play-state: paused; }

/* No colour fade while the saved Daylight/Candlelight choice is applied on load (game.js removes .g-init). */
body.g-init, body.g-init .ember { transition: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- Frame */
.app {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  padding-block: max(10px, env(safe-area-inset-top, 0px)) 0;
}
.g-top, .hud, .g-main, .dock { width: 100%; max-width: 560px; margin-inline: auto; }
/* Names can be 20 characters with no spaces: let any line break inside a word rather than push the page sideways. */
.app, .kd-dialog { overflow-wrap: anywhere; }
.g-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--ink); text-decoration: none;
}
.wordmark svg { width: 22px; height: 22px; color: var(--accent); }
.g-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.screen { flex: 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; padding-block: 8px 20px; }
.screen h1 { font-size: clamp(1.75rem, 7.4vw, 2.5rem); line-height: 1.08; }
.screen h1:focus, .kd-dialog h2:focus { outline: none; }
.screen h1:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.lede { font-size: var(--t-lede); line-height: 1.4; }
.stack { display: grid; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row > .btn { flex: 1 1 140px; }
.actions-col:empty { display: none; }
.error { font-weight: 600; font-size: var(--t-small); border-left: 3px solid var(--accent); padding-left: 10px; }
.noscript { padding: 20px; background: var(--card); color: var(--card-ink); border-radius: var(--radius-card); }

/* Docked controls in the thumb zone */
.dock {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-block: 10px max(12px, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, transparent, var(--bg) 40%);
}
.pause-btn { min-height: 48px; min-width: 112px; }
.pause-btn svg { width: 16px; height: 16px; }

/* ---------- Player chips: an initial, plus a different shape per player (filled circle vs outlined square), so turns
   never rely on color alone. */
.chip {
  display: inline-grid; place-items: center; flex: none;
  width: 2.1em; height: 2.1em; border-radius: 50%;
  font-family: var(--font-body); font-size: .85rem; font-weight: 800; line-height: 1; letter-spacing: 0;
  text-transform: none; font-variant-numeric: normal;
}
.chip.p0 { background: var(--accent); color: var(--on-accent); }
.chip.p1 { background: transparent; color: inherit; border-radius: 28%; box-shadow: inset 0 0 0 2.5px var(--accent); }

/* ---------- Heat ladder (top of the table) */
.hud { display: flex; align-items: center; gap: 12px; min-height: 36px; flex-wrap: wrap; }
.heat { display: flex; align-items: center; gap: 4px; }
.seg { width: 18px; height: 8px; border-radius: 4px; background: var(--ink); opacity: .18; transition: opacity .6s ease, height .3s ease; }
.seg.on { background: var(--accent); opacity: 1; }
.seg.now { height: 13px; }
.hud-label { font-size: var(--t-label); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }

/* ---------- Setup */
.setup-form, .resume { display: grid; gap: 18px; align-content: start; }
.resume { padding-top: 8px; }
.names { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.name-field { display: grid; gap: 6px; min-width: 0; }
.name-field label { font-size: var(--t-small); font-weight: 600; color: var(--soft); }
.name-row { position: relative; }
.name-row .chip { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: .8rem; }
.name-row .chip.p1 { color: var(--card-ink); }
.name-row .input { padding-left: 50px; min-height: 50px; }
.input[aria-invalid="true"] { border-color: var(--accent); border-width: 2.5px; }
@media (max-width: 359px) { .names { grid-template-columns: minmax(0, 1fr); } }

.pact {
  background: var(--card); color: var(--card-ink);
  border-radius: 20px; padding: 14px; display: grid; gap: 12px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -26px var(--shadow);
}
.pact p { font-size: 1rem; line-height: 1.45; }
.agree-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.agree {
  font: inherit; color: inherit; background: transparent; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 54px;
  padding: 8px 10px; border-radius: 14px; border: 1.5px solid var(--control);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.agree .chip { font-size: .78rem; }
.agree-txt { display: grid; min-width: 0; flex: 1; line-height: 1.2; }
.agree-name { font-weight: 700; overflow-wrap: anywhere; }
.agree-say { font-size: var(--t-small); }
.agree-tick { width: 20px; height: 20px; flex: none; display: none; }
.agree[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.agree[aria-pressed="true"] .agree-tick { display: block; }
.agree[aria-pressed="true"] .chip.p0 { background: var(--on-accent); color: var(--accent); }
.agree[aria-pressed="true"] .chip.p1 { box-shadow: inset 0 0 0 2.5px var(--on-accent); }
.agree:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.settings { border: 1.5px solid var(--control); border-radius: 16px; }
.settings > summary {
  list-style: none; cursor: pointer; min-height: 52px;
  display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; padding: 10px 44px 10px 14px; position: relative;
  border-radius: 14px;
}
.settings > summary::-webkit-details-marker { display: none; }
.settings > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.settings-k { font-weight: 700; }
.settings-v { font-size: var(--t-small); color: var(--soft); }
.chev { position: absolute; right: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); transition: transform .2s ease; }
.settings[open] .chev { transform: translateY(-50%) rotate(180deg); }
.settings-body { display: grid; gap: 22px; padding: 6px 14px 18px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend.label { padding: 0; margin-bottom: 10px; }
fieldset > .help { margin-top: 10px; }

/* Level ladder (radio list) */
.ladder { display: grid; gap: 8px; }
.rung { position: relative; display: block; cursor: pointer; }
.rung input, .pill input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.rung-in {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 52px; padding: 9px 12px; border-radius: 14px; border: 1.5px solid var(--control);
  transition: background-color .2s ease, border-color .2s ease;
}
.rung-num { font-family: var(--font-display); font-size: 1.35rem; line-height: 1; color: var(--soft); font-variant-numeric: tabular-nums; }
.rung-name { display: block; font-weight: 700; }
.rung-blurb { display: block; font-size: var(--t-small); line-height: 1.35; color: var(--soft); }
.swatch { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--control); }
.lock-badge {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: var(--t-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft);
}
.lock-badge svg { width: 14px; height: 14px; }
.rung input:checked + .rung-in { background: var(--card); color: var(--card-ink); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.rung input:checked + .rung-in .rung-num { color: var(--card-ink); }
.rung input:checked + .rung-in .rung-blurb, .rung input:checked + .rung-in .lock-badge { color: var(--card-ink); }
.rung input:focus-visible + .rung-in, .pill input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Pills (radio groups) */
.pills { display: grid; gap: 8px; }
.pills.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pills.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pills.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 379px) { .pills.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pill { position: relative; display: block; cursor: pointer; min-width: 0; }
.pill > span {
  display: grid; gap: 1px; align-content: center; text-align: center; min-height: 52px;
  padding: 8px 6px; border-radius: 14px; border: 1.5px solid var(--control);
  transition: background-color .2s ease, border-color .2s ease;
}
.pill strong { font-weight: 700; line-height: 1.2; }
.pill small { font-size: var(--t-label); color: var(--soft); }
.pill input:checked + span { background: var(--card); color: var(--card-ink); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pill input:checked + span small { color: var(--card-ink); }
.pill input:disabled + span { opacity: .45; cursor: not-allowed; }

/* Checkbox rows */
.switch { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; min-height: 44px; padding-block: 4px; cursor: pointer; }
.switch input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.switch-t { font-weight: 700; display: grid; gap: 2px; }
.switch-t .help { font-weight: 400; }

/* Toggle chips ("Off the table"): pressed = off tonight, shown with fill + strike-through, not color alone */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font: inherit; font-size: var(--t-small); font-weight: 600; color: var(--ink); cursor: pointer;
  min-height: 44px; padding: 8px 14px; border-radius: var(--radius-pill);
  background: transparent; border: 1.5px solid var(--control);
}
.tag[aria-pressed="true"] { background: var(--card); color: var(--card-ink); border-color: var(--accent); text-decoration: line-through; text-decoration-thickness: 2px; }
.pack-pitch { display: block; font-weight: 400; }

.write-row { display: grid; gap: 8px; justify-items: start; }
.go { display: grid; gap: 8px; }
.start-hint { text-align: center; }
.start-hint.attn { color: var(--ink); font-weight: 700; }

.confirm-box {
  display: grid; gap: 12px; padding: 14px; border-radius: 16px;
  border: 1.5px solid var(--control); background: var(--card); color: var(--card-ink);
}
.confirm-box p:focus { outline: none; }
.confirm-box .btn.ghost { color: var(--card-ink); }
.kd-dialog .confirm-box { background: transparent; }

/* ---------- Cards */
.table { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.turn {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  font-family: var(--font-display); font-size: clamp(2rem, 9vw, 2.7rem); line-height: 1.05;
}
.turn .chip { font-size: 1rem; }
.turn .chips { display: inline-flex; gap: 4px; }
.turn-name { min-width: 0; overflow-wrap: anywhere; }
.turn-name small { font-family: var(--font-body); font-size: var(--t-lede); font-weight: 600; color: var(--soft); }

.card {
  position: relative; overflow: hidden;
  width: 100%; min-height: clamp(220px, 42dvh, 430px);
  background: var(--card); color: var(--card-ink);
  border: 2px solid transparent; border-radius: var(--radius-card);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -28px var(--shadow);
}
.card.deal { animation: kd-deal .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes kd-deal { from { opacity: 0; transform: translateY(18px) rotate(-2deg) scale(.97); } to { opacity: 1; transform: none; } }
.card-top, .card-foot {
  position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 12px;
  font-size: var(--t-label); font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.card-foot { letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.card-from {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: var(--t-small); font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill);
  border: 1.5px solid currentColor;
}
.card-from svg { fill: currentColor; }
.card-body { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.prompt { font-family: var(--font-display); font-size: clamp(1.5rem, 6.2vw, 2.05rem); line-height: 1.2; text-wrap: pretty; overflow-wrap: break-word; }
.card-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.card-tools:not(:has(> :not([hidden]))) { display: none; }

/* Kinds: both = double frame; finish-the-sentence = a blank line; dare = accent border + glow at night, flood by day */
.card[data-kind="b"]::after { content: ""; position: absolute; inset: 8px; border: 1.5px solid var(--line); border-radius: 19px; pointer-events: none; }
.card[data-kind="f"] .prompt::after { content: ""; display: block; width: 44%; height: 2px; margin-top: 18px; border-radius: 2px; background: currentColor; opacity: .4; }
.card[data-kind="d"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 48px -10px color-mix(in srgb, var(--accent) 75%, transparent), 0 30px 60px -28px var(--shadow);
}
:root[data-mode="day"] .card[data-kind="d"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: 0 1px 0 var(--line), 0 30px 60px -28px var(--shadow); }
/* Frames for special cards */
.card.is-custom { border-style: dashed; border-color: var(--control); }
.card.is-custom[data-kind="d"] { border-color: var(--accent); }
.card.is-match::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--accent); }
.card.is-spark {
  border-color: var(--accent);
  background: radial-gradient(130% 80% at 50% 0%, color-mix(in srgb, var(--accent) 22%, var(--card)), var(--card) 72%);
}
.card.is-spark .prompt { text-align: center; }
.card.is-spark .card-from { align-self: center; }

/* Timer + 3-2-1 */
.timer {
  position: relative; z-index: 1;
  font: inherit; font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px;
  padding: 9px 16px; border-radius: var(--radius-pill); border: 1.5px solid currentColor;
  background: transparent; color: inherit; cursor: pointer;
}
.timer:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.timer-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .55; }
.timer.running .timer-dot { opacity: 1; animation: kd-pulse 1s ease-in-out infinite; }
.timer.done { border-style: dashed; }
@keyframes kd-pulse { 50% { transform: scale(1.6); opacity: .4; } }
.timer-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: currentColor; opacity: .45; transform-origin: left; transition: transform 1s linear; z-index: 1; }
.countdown {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
}
.countdown span { font-family: var(--font-display); font-size: clamp(6rem, 34vw, 13rem); line-height: 1; color: var(--accent); }
.countdown span.tick { animation: kd-tick .8s ease both; }
@keyframes kd-tick { from { transform: scale(1.25); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1); } }

.pw { display: grid; gap: 6px; font-size: var(--t-small); font-weight: 600; }
.pw .input { font-size: 1rem; }
.pw-help { font-weight: 400; font-size: var(--t-small); }

/* Actions under the card */
.actions { width: 100%; display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; }
.actions .btn { min-height: 54px; padding-inline: 18px; }
.keep svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.keep[aria-pressed="true"] { background: var(--card); color: var(--card-ink); border-color: var(--accent); }
.keep[aria-pressed="true"] svg { color: var(--accent); fill: currentColor; }
@media (max-width: 359px) {
  .actions .btn { padding-inline: 13px; }
  .keep-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.echo { width: 100%; min-height: 48px; }
.echo .chip { font-size: .72rem; }
.hint { font-size: var(--t-small); color: var(--soft); text-align: center; }

/* ---------- Level intro */
.intro { justify-content: center; }
.intro-card {
  position: relative; overflow: hidden; display: grid; gap: 12px;
  background: var(--card); color: var(--card-ink); border-radius: var(--radius-card);
  padding: 24px 22px 26px; min-height: clamp(260px, 46dvh, 420px); align-content: end;
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -28px var(--shadow);
}
.intro-card .label { color: inherit; }
.intro-card h1 { font-size: clamp(2.6rem, 12vw, 4.2rem); line-height: 1; position: relative; }
.intro-num {
  position: absolute; right: 8px; top: -30px; font-family: var(--font-display); font-size: 13rem; line-height: 1;
  color: var(--accent); opacity: .22; pointer-events: none;
}
.intro-tip { font-weight: 600; }
.intro-ritual { font-family: var(--font-display); font-size: var(--t-lede); line-height: 1.3; border-top: 1.5px solid var(--line); padding-top: 12px; }
.first-up { display: flex; align-items: center; gap: 10px; font-weight: 600; flex-wrap: wrap; }

/* ---------- Check-in */
.checkin, .handoff { justify-content: center; }
.checkin h1 { font-size: clamp(2rem, 8.4vw, 3rem); }
.preview {
  background: var(--card); color: var(--card-ink);
  border-radius: 22px; padding: 18px 20px; display: grid; gap: 4px;
  box-shadow: 0 1px 0 var(--line), 0 22px 44px -22px var(--shadow);
  transform: rotate(-1.2deg);
}
.preview-k { font-size: var(--t-label); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.preview-n { font-family: var(--font-display); font-size: 2.1rem; line-height: 1.1; }
.preview-b { font-size: 1rem; }
.preview-note {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: var(--t-small); font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill); border: 1.5px solid currentColor;
}
.vote { display: grid; gap: 12px; }
.vote-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.hold, .vote-no { min-height: 76px; border-radius: 20px; font-size: 1.125rem; }
.hold {
  position: relative; overflow: hidden; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--ink); background: transparent;
  border: 2px solid var(--accent);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
  transition: color .1s linear .3s;
}
.hold-fill { position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: bottom; transition: transform .12s ease-out; }
.hold-txt { position: relative; display: grid; gap: 2px; }
.hold-label { font-size: 1.125rem; }
.hold-sub { font-size: var(--t-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hold.holding { color: var(--on-accent); }
.hold.holding .hold-fill { transform: scaleY(1); transition: transform .6s linear; }
.hold:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.vote-no { border-width: 2px; }

/* ---------- End + journal */
.end .card { min-height: clamp(200px, 36dvh, 340px); }
.nightcap, .summary { display: grid; gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.stats div { border-top: 1.5px solid var(--line); padding-top: 10px; min-width: 0; }
.stats dt { font-size: var(--t-label); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.stats dd { margin: 4px 0 0; font-family: var(--font-display); font-size: clamp(1.6rem, 6vw, 2.1rem); line-height: 1.1; overflow-wrap: break-word; }
.summary h2.label { margin-top: 6px; font-family: var(--font-body); line-height: 1.4; }
.kept, .nights, .night-kept { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.kept li { background: var(--card); color: var(--card-ink); border-radius: 18px; padding: 14px 16px; display: grid; gap: 8px; }
.kept p { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.25; }
.lvl-chip {
  justify-self: start; font-size: var(--t-label); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent);
}
.support, .sponsor { font-size: var(--t-small); color: var(--soft); text-align: center; }
.support a, .sponsor a { color: var(--ink); font-weight: 700; padding-block: 13px; }   /* 44px tap height, no layout shift */
.nights > li {
  background: var(--card); color: var(--card-ink); border-radius: 18px; padding: 14px 16px; display: grid; gap: 8px;
}
.nights h2 { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.nights .meta { font-size: var(--t-small); }
.night-kept li { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.3; border-left: 3px solid var(--accent); padding-left: 10px; }
.nights .btn.ghost { color: var(--card-ink); justify-self: start; }
.nights .confirm-box { border-color: var(--control); }

/* ---------- Write a card */
.write-form { display: grid; gap: 16px; }
.write-form .field label { color: var(--ink); }
.write-form textarea { resize: vertical; min-height: 96px; line-height: 1.4; }
.counter { text-align: right; }
select.input { min-height: 50px; }

/* ---------- Dialogs (pause, pass menu) */
.kd-dialog .note a { color: inherit; font-weight: 700; }
.kd-dialog p { margin: 0; }
.pause-word { font-weight: 600; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--control); }
.pause-word strong { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; }
.kd-dialog .stack > .btn { width: 100%; }
.kd-dialog .btn.quiet { color: var(--card-ink); }
.toggles { display: grid; gap: 2px; padding: 4px 0; border-block: 1.5px solid var(--line); }
.toggle {
  font: inherit; font-weight: 600; color: inherit; background: none; border: 0; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 12px; min-height: 48px; width: 100%; padding: 4px 2px; border-radius: 12px;
}
.toggle-track { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; border: 1.5px solid var(--control); transition: background-color .2s ease; }
.toggle-track::after {
  content: ""; position: absolute; left: 3px; top: 50%; width: 17px; height: 17px; border-radius: 50%;
  background: var(--control); transform: translateY(-50%); transition: transform .2s ease, background-color .2s ease;
}
.toggle[aria-pressed="true"] .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle[aria-pressed="true"] .toggle-track::after { background: var(--on-accent); transform: translate(18px, -50%); }
.toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.kd-dialog.sheet h2 { font-size: 1.7rem; }
@media (max-width: 600px) {
  .kd-dialog.sheet { margin: auto auto max(12px, env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Wider screens: a little more air, same single column for the table */
@media (min-width: 900px) {
  .app { padding-top: 24px; }
  .screen { padding-block: 16px 32px; }
}
@media (min-height: 760px) {
  .play { justify-content: center; }
}
