/* ---------- tokens: the one place the app's colours, fonts, corners, motion and layers are set (DESIGN.md) ---------- */
:root {
  /* the app's look: Sage. A soft green-grey page, near-white cards, the session's deep green for buttons and gold
     for what's picked. Flat colours, no fades. */
  --paper: #e7eee9;
  --panel: #f8fbf8;
  --panel-2: #ffffff;
  --ink: #17231f;
  --ink-soft: #4d5e57;
  --ink-faint: #6d7c75;
  --line: #cfdad3;
  --line-soft: #dee6e0;
  --brass: #b08436;
  --brass-soft: #f1e5c9;
  --brass-ink: #654510;
  --primary: #234238;
  --primary-ink: #f2f6f3;
  --danger: #cf5a42;        /* errors, delete, recording, cut-in (light) */
  --success: #23704e;       /* went well, up, done (light; 5.1:1 on --paper) */

  /* the dark look: setup, the session screen, the end pages and their pop-ups. Each dark scope maps these onto
     its role names (--bg, --ink, --soft...), so every dark screen shares one set. */
  --dark-bg: #0f1312;
  --dark-glow: #1b2320;     /* the lamp-lit middle of the dark background */
  --dark-surface: #1c2321;  /* solid dark dialogs */
  --dark-ink: #efece5;
  --dark-soft: #b0b7b1;
  --dark-faint: #7f8a85;
  --dark-line: rgba(255,255,255,.11);
  --dark-line-2: rgba(255,255,255,.24);
  --dark-card: rgba(255,255,255,.045);
  --dark-card-2: rgba(255,255,255,.075);
  --gold: #d6b06c;
  --gold-2: #f0d8a6;
  --gold-bg: rgba(214,176,108,.13);
  --dark-danger: #e0775f;
  --dark-success: #9fd2b0;
  --on-light: #12100c;      /* text on cream or gold */
  --cream: #f4eee3;         /* title text on black, cream pills */

  /* the room itself stays dark in both looks */
  --wall: #1c2928;
  --wall-2: #233432;
  --lamp: rgba(236, 200, 132, .22);
  --lamp-core: rgba(246, 222, 170, .30);
  --room-ink: var(--cream);
  --room-soft: #a9b8b3;
  --bubble: #f6f4ee;
  --bubble-ink: var(--ink);

  /* tension scale for the people in the room */
  --calm: #8fa39c;
  --tense: #d9a441;
  --reactive: var(--danger);

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;

  /* corners: inputs and small tiles, cards and boxes, and pills. Circles use 50%. */
  --r-sm: 10px;
  --r-md: 14px;
  --r-pill: 999px;

  /* motion: things arriving, and things moving from one place to another */
  --ease-enter: cubic-bezier(.2,.7,.2,1);
  --ease-move: cubic-bezier(.5,0,.2,1);

  /* layers, lowest first. Values 1 to 10 are kept for order inside one component (the room, a card). */
  --z-raised: 20;        /* menus and cards that pop up inside a page */
  --z-cover: 40;         /* the curtain over the room */
  --z-sticky: 50;        /* top bars, slide-in side panels */
  --z-overlay: 70;       /* hover cards, drawers */
  --z-backdrop: 80;      /* the veil behind a card on setup and end */
  --z-modal: 90;         /* that card, the opening */
  --z-popup: 120;        /* the session's pop-ups */
  --z-sheet: 130;        /* the session's sheets and their veil */
  --z-toast: 150;        /* tips and toasts */
  --z-transition: 300;   /* setup handing over to the session */
  --z-view: 400;         /* full-screen views (setup, end) */
  --z-drag: 1000;        /* whatever is being dragged */
  --z-top: 2147483000;   /* the black between views */
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: .005em; line-height: 1.1; }
h1 { font-size: 2.6rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
small { color: var(--ink-faint); font-size: .8em; font-weight: 400; margin-left: .3em; }
.lede { color: var(--ink-soft); margin: .4rem 0 0; max-width: 60ch; }
.hint { color: var(--ink-faint); font-size: .8rem; margin: .55rem 0 0; }
.error { color: var(--reactive); font-size: .9rem; margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* masthead */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .8rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.wordmark { display: flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.55rem; line-height: 1; }
.wordmark em { font-style: italic; color: var(--ink-soft); }
.mark { position: relative; width: 30px; height: 26px; flex: none; }
.mark i { position: absolute; width: 11px; height: 11px; border: 1.5px solid var(--ink); }
.mark i:nth-child(1) { left: 1px; top: 0; }
.mark i:nth-child(2) { right: 1px; top: 0; border-radius: 50%; }
.mark i:nth-child(3) { left: 9.5px; bottom: 0; border-radius: 50%; border-color: var(--brass); }
.nav { display: flex; gap: 1.6rem; }
.nav-link {
  font: inherit; font-size: .95rem; color: var(--ink-soft); background: none; border: 0; padding: .3rem 0;
  border-bottom: 1.5px solid transparent; cursor: pointer;
}
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brass); }

main { flex: 1; min-height: 0; width: 100%; margin: 0; padding: 1rem clamp(1rem, 2vw, 2rem); display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* controls */
.btn {
  font: inherit; font-size: .9rem; font-weight: 500; border-radius: var(--r-pill); padding: .55rem 1.15rem; cursor: pointer;
  border: 1px solid transparent; background: none; color: var(--ink); white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--primary) 88%, var(--brass)); }
.btn.quiet { border-color: var(--line); background: var(--panel-2); }
.btn.quiet:hover { border-color: var(--ink-faint); }
.btn.ghost { color: var(--ink-soft); padding-left: .7rem; padding-right: .7rem; }
.btn.ghost:hover { color: var(--ink); background: var(--panel); }
.btn.small { font-size: .82rem; padding: .35rem .8rem; }
.btn.danger { color: var(--reactive); }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn { border: 0; background: none; font-size: 1.7rem; line-height: 1; color: var(--ink-faint); cursor: pointer; padding: 0 .2rem; }
.icon-btn:hover { color: var(--ink); }

.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; font-size: .82rem; color: var(--ink-soft); font-weight: 500; }
input, textarea, select {
  font: inherit; font-size: .95rem; color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .75rem; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 22%, transparent); }
textarea { resize: vertical; line-height: 1.5; }

/* session setup */
.setup {
  display: flex; flex-direction: column; gap: .8rem; min-height: 0; overflow-y: auto;
  padding-right: 1.25rem; border-right: 1px solid var(--line);
}
.setup input, .setup select { padding: .45rem .7rem; }
.setup .scenario-field textarea { resize: none; font-size: .9rem; line-height: 1.45; }
.starters { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: -.35rem; }
.starter { font: inherit; font-size: .76rem; border: 1px dashed var(--line); background: transparent; color: var(--ink-soft); border-radius: var(--r-pill); padding: .15rem .6rem; cursor: pointer; }
.starter:hover { color: var(--ink); border-color: var(--brass); }
.setup-actions { display: flex; flex-direction: column; gap: .45rem; margin-top: auto; }
.setup-actions .btn { width: 100%; }
.setup-toggle { display: none; }
.setup .field { margin: 0; }

.session-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(220px, 14vw, 290px) minmax(0, 1fr) clamp(320px, 23vw, 470px); gap: clamp(1rem, 1.4vw, 1.75rem); }
.room-col { display: flex; flex-direction: column; min-height: 0; }
.session-grid.transcript-collapsed { grid-template-columns: clamp(220px, 14vw, 290px) minmax(0, 1fr) 48px; }
/* hidden transcript: a slim strip with one vertical "Show transcript" button */
.session-grid.transcript-collapsed .transcript { padding-left: 0; border-left: 0; align-items: center; }
.session-grid.transcript-collapsed .transcript-head { flex-direction: column; margin: 0; }
.session-grid.transcript-collapsed .transcript-head > :not(#transcript-toggle) { display: none; }
.session-grid.transcript-collapsed #transcript-toggle {
  writing-mode: vertical-rl; padding: 1rem .45rem; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--panel-2); color: var(--ink); font-size: .85rem;
}
.session-grid.transcript-collapsed #transcript-toggle:hover { border-color: var(--brass); }

/* the room */
.room {
  position: relative; flex: 1; min-height: 300px; border-radius: var(--r-md); overflow: hidden;
  background:
    radial-gradient(ellipse 46% 30% at 50% 72%, var(--lamp-core), transparent 70%),
    radial-gradient(ellipse 75% 60% at 50% 70%, var(--lamp), transparent 72%),
    linear-gradient(180deg, var(--wall) 0%, var(--wall-2) 100%);
  color: var(--room-ink);
  isolation: isolate;
}
.room::before {
  content: ""; position: absolute; left: 12%; right: 12%; top: 50%; height: 44%; border-radius: 50%;
  border: 1px solid rgba(238, 241, 236, .08); z-index: -1;
}
.room-hint {
  position: absolute; left: 50%; top: 14%; transform: translateX(-50%); width: min(80%, calc(460px * var(--s, 1)));
  text-align: center; font-family: var(--serif); font-style: italic; font-size: calc(1.35rem * var(--s, 1)); line-height: 1.3; color: var(--room-soft);
  transition: opacity .4s;
}

.seat {
  position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: .45rem;
  background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: .4rem; width: calc(150px * var(--s, 1));
  z-index: 2;
}
.seat:disabled { cursor: default; }
.avatar {
  --c: #8c6ba8; --t: var(--calm);
  position: relative; width: calc(62px * var(--s, 1)); height: calc(62px * var(--s, 1)); display: grid; place-items: center;
  font-family: var(--serif); font-size: calc(1.55rem * var(--s, 1)); color: #fff;
}
.avatar::before {
  content: ""; position: absolute; inset: 0; background: var(--c);
  box-shadow: 0 0 0 3px var(--wall), 0 0 0 5px var(--t), 0 0 26px 4px color-mix(in srgb, var(--t) 55%, transparent);
  transition: box-shadow .6s ease;
}
.avatar span { position: relative; }
.avatar.man::before { border-radius: 6px; }
.avatar.woman::before { border-radius: 50%; }
.avatar.nonbinary::before { transform: rotate(45deg) scale(.82); border-radius: 6px; }
.avatar.unspecified::before { border-radius: 30%; }
.avatar[data-tension="5"]::before { animation: simmer 1.6s ease-in-out infinite; }
@keyframes simmer { 50% { box-shadow: 0 0 0 3px var(--wall), 0 0 0 5px var(--t), 0 0 40px 10px color-mix(in srgb, var(--t) 60%, transparent); } }
.seat[aria-pressed="true"] .avatar::after {
  content: ""; position: absolute; inset: -12px; border: 1.5px solid var(--brass); opacity: .95;
}
.seat[aria-pressed="true"] .avatar.man::after { border-radius: var(--r-md); }
.seat[aria-pressed="true"] .avatar.woman::after { border-radius: 50%; }
.seat[aria-pressed="true"] .avatar.unspecified::after { border-radius: 34%; }
.seat[aria-pressed="true"] .avatar.nonbinary::after { inset: -8px; transform: rotate(45deg); border-radius: var(--r-sm); }
.seat-name { font-size: calc(.95rem * var(--s, 1)); font-weight: 500; line-height: 1.1; }
.seat-cue { font-family: var(--serif); font-style: italic; font-size: calc(1rem * var(--s, 1)); color: var(--room-soft); line-height: 1.15; text-align: center; min-height: 1.15em; max-width: calc(170px * var(--s, 1)); }
.seat:hover .seat-name { text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 4px; }

.seat.you { cursor: default; width: auto; }
.seat.you .avatar { width: calc(48px * var(--s, 1)); height: calc(48px * var(--s, 1)); font-family: var(--sans); font-size: calc(.78rem * var(--s, 1)); color: var(--room-ink); }
.seat.you .avatar::before { background: transparent; border: 1.5px dashed rgba(238,241,236,.45); box-shadow: none; border-radius: 50%; }

.breath { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px 8px; border-radius: var(--r-pill); background: var(--bubble); }
.breath i { width: 5px; height: 5px; border-radius: 50%; background: var(--bubble-ink); opacity: .35; animation: breath 1.1s infinite; }
.breath i:nth-child(2) { animation-delay: .15s; }
.breath i:nth-child(3) { animation-delay: .3s; }
@keyframes breath { 40% { opacity: 1; transform: translateY(-2px); } }

.bubble {
  position: absolute; z-index: 5; max-width: 300px; min-width: 120px;
  background: var(--bubble); color: var(--bubble-ink); border-radius: var(--r-md); padding: .7rem 1rem;
  font-size: calc(.95rem * var(--s, 1)); line-height: 1.45; box-shadow: 0 10px 30px -12px rgba(0,0,0,.6);
  transform-origin: bottom center; animation: pop .22s ease-out;
  border-top: 3px solid var(--c, transparent);
  transition: opacity .5s, filter .5s;
}
.bubble::after {
  content: ""; position: absolute; bottom: -7px; left: var(--tail, 50%); width: 14px; height: 14px; background: var(--bubble);
  transform: translateX(-50%) rotate(45deg); border-radius: 0 0 3px 0;
}
.bubble.side::after { bottom: auto; top: var(--tail-y, 50%); transform: translateY(-50%) rotate(45deg); }
.bubble.tail-left::after { left: -6px; }
.bubble.tail-right::after { left: auto; right: -6px; }
.bubble.long { max-width: 400px; }
.bubble.mutter {
  background: #2c3d3b; color: var(--room-ink); border: 1px dashed rgba(238,241,236,.4); border-top-width: 1px;
  font-family: var(--serif); font-style: italic; font-size: 1.05rem; padding: .4rem .8rem; box-shadow: none; min-width: 0;
}
.bubble.mutter::after { display: none; }
.bubble.cut { opacity: .62; }
.bubble.active { z-index: 7; }
.bubble.you { background: var(--brass-soft); color: var(--brass-ink); border-top-color: var(--brass); }
.bubble.you::after { background: var(--brass-soft); }
.bubble.m-hidden { display: none; }
.bubble.m-top::after { bottom: -7px; top: auto; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.97); } }

/* composer */
.composer { margin-top: .75rem; flex: none; }
.composer-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.addressing { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.addressing strong { color: var(--ink); font-weight: 600; }
.addressing button { font: inherit; font-size: .85rem; color: var(--brass); background: none; border: 0; cursor: pointer; padding: 0 0 0 .4rem; text-decoration: underline; text-underline-offset: 3px; }
.composer-actions { display: flex; gap: .25rem; flex-wrap: wrap; }
.composer-row { display: flex; gap: .6rem; align-items: stretch; }
.composer-row textarea { flex: 1; height: 6.2rem; border-radius: var(--r-md); padding: .7rem 1rem; resize: none; line-height: 1.5; }
.composer-row .mic-btn { align-self: flex-end; height: 2.9rem; }
.composer-row #send { align-self: flex-end; height: 2.9rem; }
.composer-row .btn { padding-left: 1.6rem; padding-right: 1.6rem; }

.suggestions {
  position: absolute; left: 1rem; right: 1rem; bottom: 1rem; z-index: var(--z-raised);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem;
  max-height: calc(100% - 2rem); overflow-y: auto;
}
.suggestions .loading { background: var(--panel-2); border-radius: var(--r-md); padding: .8rem 1rem; margin: 0; }
.suggestion { box-shadow: 0 18px 40px -18px rgba(0,0,0,.7); }
.suggestion {
  text-align: left; font: inherit; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: .85rem 1rem; cursor: pointer; display: flex; flex-direction: column; gap: .4rem;
  transition: border-color .15s;
}
.suggestion:hover { border-color: var(--brass); }
.suggestion .to { font-size: .78rem; color: var(--brass-ink); font-weight: 600; }
.suggestion .text { font-family: var(--serif); font-size: 1.15rem; line-height: 1.3; }
.suggestion .why { font-size: .82rem; color: var(--ink-soft); }
.suggestions .loading { grid-column: 1 / -1; color: var(--ink-soft); font-style: italic; font-family: var(--serif); font-size: 1.1rem; }

/* transcript */
.transcript { border-left: 1px solid var(--line); padding-left: 1.5rem; display: flex; flex-direction: column; min-height: 0; }
.disclaimer { flex: none; font-size: .74rem; color: var(--ink-faint); margin: .75rem 0 0; line-height: 1.4; }
.session-grid.transcript-collapsed .disclaimer { display: none; }
.mobile-only { display: none; }
.transcript-close { display: none; }
.transcript-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .75rem; }
.transcript-list { flex: 1; min-height: 0; list-style: none; margin: 0; padding: 0 .4rem 0 0; display: flex; flex-direction: column; gap: .9rem; overflow-y: auto; }
.session-grid.transcript-collapsed .transcript-list { display: none; }
.t-entry { font-size: .92rem; line-height: 1.5; }
.t-who { font-weight: 600; font-size: .82rem; color: var(--c, var(--ink)); }
.t-cue { font-family: var(--serif); font-style: italic; color: var(--ink-faint); font-size: .95rem; margin-left: .35rem; }
.t-text { margin: .1rem 0 0; }
.t-entry.mutter .t-text { font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--ink-soft); }
.t-entry.you { background: var(--brass-soft); color: var(--brass-ink); border-radius: var(--r-md); padding: .6rem .8rem; }
.t-entry.you .t-who { color: var(--brass-ink); }
.t-entry.note { text-align: center; font-family: var(--serif); font-style: italic; color: var(--ink-faint); }
.t-actions { display: flex; gap: .2rem; margin-top: .35rem; }
.t-actions .btn { color: var(--brass-ink); padding: .2rem .6rem; font-size: .78rem; }
.t-actions .btn:hover { background: color-mix(in srgb, var(--brass) 18%, transparent); }
.t-empty { color: var(--ink-faint); font-size: .9rem; }

.coach { margin-top: .6rem; background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); padding: .8rem .95rem; font-size: .88rem; }
.coach h4 { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; margin: .7rem 0 .2rem; }
.coach h4:first-child { margin-top: 0; }
.coach ul { margin: .2rem 0; padding-left: 1.1rem; }
.coach p { margin: .3rem 0; }
.typing::after { content: "▍"; animation: blink 1s steps(1) infinite; margin-left: 1px; color: var(--brass); }
@keyframes blink { 50% { opacity: 0; } }

/* libraries */
.library-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; flex: none; }
.library-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.card-grid { flex: 1; min-height: 0; overflow-y: auto; align-content: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; padding: 2px 4px 1rem 2px; }
.card {
  background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 1.3rem 1.35rem;
  display: flex; flex-direction: column; gap: .6rem;
}
.card h3 { font-size: 1.55rem; }
.card .role { color: var(--ink-soft); font-size: .88rem; margin: 0; }
.card .bg { font-size: .9rem; margin: 0; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .actions { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--line-soft); }
.card .actions .btn { padding: .35rem .7rem; font-size: .82rem; }
.card-title { display: flex; align-items: center; gap: .75rem; }
.example-tag { font-size: .72rem; color: var(--ink-faint); border: 1px solid var(--line); border-radius: var(--r-pill); padding: .1rem .5rem; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.tag { font-size: .76rem; background: var(--panel); border: 1px solid var(--line-soft); color: var(--ink-soft); border-radius: var(--r-pill); padding: .1rem .55rem; }
.tag.pattern { background: var(--brass-soft); border-color: transparent; color: var(--brass-ink); }

.mini { --c: #8c6ba8; width: 26px; height: 26px; display: inline-grid; place-items: center; position: relative; font-family: var(--serif); color: #fff; font-size: .85rem; flex: none; }
.mini::before { content: ""; position: absolute; inset: 0; background: var(--c); }
.mini span { position: relative; }
.mini.man::before { border-radius: 4px; }
.mini.woman::before { border-radius: 50%; }
.mini.nonbinary::before { transform: rotate(45deg) scale(.8); border-radius: 3px; }
.mini.unspecified::before { border-radius: 30%; }
.mini.lg { width: 40px; height: 40px; font-size: 1.15rem; }
.family-cast { display: flex; flex-wrap: wrap; gap: .9rem; }
.family-cast .who { display: flex; align-items: center; gap: .45rem; font-size: .88rem; }
.family-cast .who small { margin: 0; }

/* sheets (dialogs) */
dialog { border: 0; padding: 0; border-radius: var(--r-md); background: var(--panel-2); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
dialog::backdrop { background: rgba(16, 24, 22, .55); backdrop-filter: blur(2px); }
.sheet { width: min(760px, calc(100vw - 1.5rem)); max-height: calc(100vh - 1.5rem); }
.sheet form { display: flex; flex-direction: column; max-height: calc(100vh - 1.5rem); }
.sheet.small { width: min(420px, calc(100vw - 1.5rem)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 1.4rem 1.6rem .4rem; }
.sheet-head h2 { font-size: 2rem; }
.sheet-body { padding: 1rem 1.6rem; overflow-y: auto; }
.sheet-foot { display: flex; gap: .6rem; padding: 1rem 1.6rem 1.4rem; border-top: 1px solid var(--line-soft); }
.spacer { flex: 1; }
.steps { list-style: none; display: flex; gap: 1.1rem; padding: 0 1.6rem; margin: .4rem 0 0; flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); }
.steps li { font-size: .85rem; color: var(--ink-faint); padding: .5rem 0; cursor: pointer; border-bottom: 1.5px solid transparent; margin-bottom: -1px; }
.steps li.done { color: var(--ink-soft); }
.steps li.active { color: var(--ink); border-bottom-color: var(--brass); }
.step-intro { margin: 0 0 1.1rem; color: var(--ink-soft); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.section-label { margin: 1.5rem 0 .8rem; }
.section-label p { margin: .25rem 0 0; color: var(--ink-soft); font-size: .88rem; }

.symbol-pick { border: 0; padding: 0; margin: 0 0 1rem; }
.symbol-pick legend { font-size: .82rem; color: var(--ink-soft); font-weight: 500; margin-bottom: .4rem; padding: 0; }
.symbol-options { display: flex; gap: .5rem; flex-wrap: wrap; }
.symbol-option { position: relative; display: flex; align-items: center; gap: .55rem; border: 1px solid var(--line); border-radius: var(--r-pill); padding: .35rem .85rem .35rem .45rem; cursor: pointer; font-size: .88rem; }
.symbol-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.symbol-option:has(input:checked) { border-color: var(--brass); background: var(--brass-soft); color: var(--brass-ink); }
.symbol-option:has(input:focus-visible) { outline: 2px solid var(--brass); outline-offset: 2px; }
.symbol-option .mini { --c: var(--ink-soft); width: 18px; height: 18px; }

.sliders { display: flex; flex-direction: column; gap: 1.2rem; }
.slider-row label { display: flex; justify-content: space-between; gap: 1rem; font-weight: 500; font-size: .92rem; }
.slider-row .value { color: var(--brass-ink); font-family: var(--serif); font-size: 1.1rem; font-weight: 400; }
.slider-row input[type=range] { padding: 0; border: 0; background: none; accent-color: var(--brass); margin-top: .3rem; box-shadow: none; }
.slider-ends { display: flex; justify-content: space-between; font-size: .76rem; color: var(--ink-faint); }

.pattern-chips { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1rem; }
.pattern { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r-md); padding: .6rem .75rem; cursor: pointer; font-size: .88rem; }
.pattern input { width: auto; margin-top: .25rem; accent-color: var(--brass); }
.pattern strong { display: block; font-weight: 600; }
.pattern span { color: var(--ink-soft); font-size: .8rem; }
.pattern:has(input:checked) { border-color: var(--brass); background: var(--brass-soft); }

.review dl { margin: 0; display: grid; grid-template-columns: 160px 1fr; gap: .45rem 1rem; font-size: .92rem; }
.review dt { color: var(--ink-faint); }
.review dd { margin: 0; white-space: pre-wrap; }

.member-rows { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .75rem; }
.member-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: .6rem; align-items: center; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px; background: var(--panel); }
.segmented button { font: inherit; font-size: .8rem; border: 0; background: none; color: var(--ink-soft); padding: .3rem .75rem; border-radius: var(--r-pill); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--panel-2); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.relationship-rows { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1rem; }
.relationship-rows .field { margin: 0; }
.relationship-rows .pair { display: flex; align-items: center; gap: .45rem; color: var(--ink); font-size: .9rem; }
.empty-note { color: var(--ink-faint); font-size: .9rem; font-style: italic; margin: 0 0 1rem; }

.passcode-form { padding: 1.6rem; display: flex; flex-direction: column; gap: .8rem; }
.row-end { display: flex; justify-content: flex-end; }


@media (max-width: 1000px) {
  .session-grid, .session-grid.transcript-collapsed { grid-template-columns: 210px minmax(0, 1fr); }
  .mobile-only { display: inline-flex; }
  #transcript-toggle { display: none; }
  .transcript {
    display: none; position: fixed; z-index: var(--z-sticky); top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
    background: var(--paper); border-left: 1px solid var(--line); padding: 1.1rem 1.25rem; box-shadow: -30px 0 60px -30px rgba(0,0,0,.45);
  }
  .transcript.open { display: flex; }
  .transcript-close { display: inline-flex; }
}
@media (max-width: 720px) {
  h1 { font-size: 2.1rem; }
  .masthead { padding: .6rem 1rem; }
  .wordmark { font-size: 1.25rem; }
  .wordmark em { display: none; }
  .nav { gap: 1.1rem; }
  main { padding: .6rem .75rem .75rem; }
  .setup-toggle {
    display: flex; justify-content: space-between; align-items: center; flex: none; width: 100%;
    font: inherit; font-size: .9rem; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md);
    padding: .5rem .85rem; margin-bottom: .6rem; cursor: pointer;
  }
  .setup-toggle .chev { width: 8px; height: 8px; border-right: 1.5px solid var(--ink-soft); border-bottom: 1.5px solid var(--ink-soft); transform: rotate(45deg); margin-top: -4px; }
  .setup-toggle[aria-expanded="true"] .chev { transform: rotate(-135deg); margin-top: 4px; }
  .session-grid, .session-grid.transcript-collapsed { grid-template-columns: minmax(0, 1fr); }
  .setup { display: none; border-right: 0; padding-right: 0; max-height: 45vh; }
  .setup.open { display: flex; }
  .setup-actions { flex-direction: row; }
  .composer-row textarea { height: 4.2rem; }
  .room { min-height: 0; border-radius: var(--r-md); }
  .composer-top { margin-bottom: .35rem; gap: .25rem; }
  .composer-actions .btn { padding: .3rem .55rem; font-size: .82rem; }
  .composer-row .btn { padding-left: 1.1rem; padding-right: 1.1rem; }
  .library-head h1 { font-size: 1.8rem; }
  .library-head .lede { display: none; }
  .room-hint { top: 8%; font-size: 1.15rem; }
  .seat { width: 110px; }
  .avatar { width: 50px; height: 50px; font-size: 1.3rem; }
  .seat-cue { font-size: .84rem; max-width: 96px; }
  .bubble { max-width: min(250px, 66vw); font-size: .86rem; padding: .55rem .8rem; }
  .bubble.long { max-width: min(290px, 78vw); }
  .suggestions { grid-template-columns: 1fr; left: .5rem; right: .5rem; bottom: .5rem; gap: .5rem; }
  .suggestion { padding: .6rem .8rem; }
  .suggestion .text { font-size: 1rem; }
  .grid-2, .pattern-chips { grid-template-columns: 1fr; }
  .review dl { grid-template-columns: 1fr; }
  .member-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .member-row .segmented { grid-column: 2 / -1; justify-self: start; }
  .setup .field { min-width: 0; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* hover card: how each person is doing */
.seat-card {
  position: fixed; top: 0; left: 0; z-index: var(--z-overlay);
  width: 220px; text-align: left; padding: .8rem .95rem; border-radius: var(--r-md);
  background: #101a19; border: 1px solid rgba(238,241,236,.14); color: var(--room-ink);
  box-shadow: 0 20px 40px -16px rgba(0,0,0,.8);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s, visibility .15s;
}
.seat-card.show { opacity: 1; visibility: visible; }
.seat-card .sc-name { font-size: .74rem; color: var(--room-soft); margin-bottom: .15rem; }
.seat-card .sc-feeling { font-family: var(--serif); font-size: 1.45rem; line-height: 1.05; }
.seat-card .sc-feeling.none { color: var(--room-soft); font-size: 1.1rem; font-style: italic; }
.seat-card .sc-label { font-size: .72rem; color: var(--room-soft); margin-top: .65rem; }
.seat-card .sc-meter { display: flex; gap: 3px; margin-top: .3rem; }
.seat-card .sc-meter i { flex: 1; height: 5px; border-radius: 3px; background: rgba(238,241,236,.12); }
.seat-card .sc-meter i.on { background: var(--t); }
.seat-card .sc-level { font-size: .8rem; margin-top: .25rem; }
.seat-card .sc-cue { font-family: var(--serif); font-style: italic; font-size: .98rem; color: var(--room-soft); margin-top: .5rem; line-height: 1.25; }
.seat-card .sc-style { font-size: .74rem; color: var(--room-soft); margin-top: .6rem; padding-top: .5rem; border-top: 1px solid rgba(238,241,236,.1); }

/* ---------- family map (genogram) ---------- */
.map-sheet { width: calc(100vw - 2rem); max-width: 1500px; height: calc(100vh - 2rem); height: calc(100dvh - 2rem); max-height: none; }
.fe { display: flex; flex-direction: column; height: 100%; }
.fe-head { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.4rem .6rem; flex: none; }
.fe-name {
  flex: 1; font-family: var(--serif); font-size: 2rem; line-height: 1.1; border: 0; border-bottom: 1px solid transparent;
  border-radius: 0; background: none; padding: .1rem 0; color: var(--ink);
}
.fe-name:hover { border-bottom-color: var(--line); }
.fe-name:focus { box-shadow: none; border-bottom-color: var(--brass); }
.fe-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; border-top: 1px solid var(--line-soft); }
.fe-map { position: relative; min-height: 0; display: flex; flex-direction: column; background: var(--panel); }
#fe-svg { flex: 1; min-height: 0; width: 100%; padding: 1rem; }
.fe-legend { flex: none; display: flex; flex-wrap: wrap; gap: .35rem 1rem; padding: .6rem 1rem .8rem; border-top: 1px solid var(--line-soft); font-size: .76rem; color: var(--ink-soft); }
.legend-item { display: inline-flex; align-items: center; gap: .35rem; }
.fe-panel { min-height: 0; overflow-y: auto; padding: 1rem 1.3rem 1.5rem; border-left: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: .4rem; }
.fe-foot { flex: none; display: flex; align-items: center; gap: .6rem; padding: .8rem 1.4rem 1rem; border-top: 1px solid var(--line-soft); }
.fe-tip { margin: 0; font-size: .82rem; color: var(--ink-faint); }
.fe-section { padding: .6rem 0 .9rem; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: .45rem; }
.fe-section:last-child { border-bottom: 0; }
.fe-section h3 { font-size: 1.2rem; }
.fe-section .field { margin-bottom: .35rem; }
.fe-note { margin: 0; font-size: .84rem; color: var(--ink-soft); line-height: 1.4; }
.fe-title { display: flex; align-items: center; gap: .8rem; padding: .3rem 0 .4rem; }
.fe-title h2 { font-size: 1.7rem; }
.fe-panel .back { align-self: flex-start; padding-left: 0; color: var(--brass-ink); }
.fe-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .5rem; align-items: center; }
.fe-who { background: none; border: 0; padding: 0; cursor: pointer; }
.fe-list-btn {
  display: flex; align-items: center; gap: .65rem; width: 100%; text-align: left; font: inherit; font-size: .92rem; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .5rem .7rem; cursor: pointer;
}
.fe-list-btn:hover { border-color: var(--brass); }
.fe-list-btn > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.fe-list-btn small { margin: 0; font-size: .78rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fe-pair-minis { display: inline-flex; gap: 3px; flex: none; }
.fe-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: .4rem; align-items: center; font-size: .85rem; color: var(--ink-soft); }
.fe-pick select { padding: .4rem .5rem; font-size: .88rem; }
.fe-tri-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.fe-tri-pick select { padding: .4rem .5rem; font-size: .88rem; }
.segmented.wrap { flex-wrap: wrap; border-radius: var(--r-md); }
.check { display: flex; align-items: center; gap: .5rem; font-size: .9rem; margin: .2rem 0 .6rem; cursor: pointer; }
.check input { width: auto; accent-color: var(--brass); }
.quality-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.quality {
  display: flex; flex-direction: column; align-items: center; gap: .15rem; font: inherit; font-size: .76rem; color: var(--ink-soft);
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: .4rem .3rem; cursor: pointer; text-align: center; line-height: 1.2;
}
.quality:hover { border-color: var(--ink-faint); }
.quality[aria-checked="true"] { border-color: var(--brass); background: var(--brass-soft); color: var(--brass-ink); }
.line-sample { display: block; flex: none; }
.mini.outline::before { background: var(--panel-2); border: 1.5px dashed var(--ink-soft); }
.mini.outline { color: var(--ink); }

/* genogram drawing */
#fe-svg .node, .fam-thumb .node { cursor: pointer; }
#fe-svg .node:focus { outline: none; }
#fe-svg .node:focus-visible .body { stroke: var(--brass); stroke-width: 3; }
#fe-svg .node:hover .body { filter: brightness(1.06); }
.g-name { font-family: var(--sans); font-weight: 600; pointer-events: none; letter-spacing: .01em; }
#fe-svg.connecting .node.target { cursor: crosshair; }
#fe-svg.connecting .node.target .body { stroke-width: 2.4; }
#fe-svg.connecting .node.target:hover .body, #fe-svg .node.drop .body { stroke: var(--brass); stroke-width: 3.5; }
#fe-svg.dragging, #fe-svg.dragging * { cursor: crosshair !important; }
.drag-line { stroke: var(--brass); stroke-width: 2; stroke-dasharray: 6 5; pointer-events: none; }
.g-tri { fill: color-mix(in srgb, var(--brass) 9%, transparent); stroke: var(--brass); stroke-width: 1.3; stroke-dasharray: 5 5; stroke-linejoin: round; cursor: pointer; }
.g-tri:hover, .g-tri.selected { fill: color-mix(in srgb, var(--brass) 22%, transparent); stroke-width: 2.2; }
.g-hit { stroke: transparent; stroke-width: 18; fill: none; cursor: pointer; }
.g-hit:hover, .g-hit.selected { stroke: color-mix(in srgb, var(--brass) 26%, transparent); }
.emo.selected path { filter: drop-shadow(0 0 3px color-mix(in srgb, var(--brass) 70%, transparent)); }
.connect-hint { margin: 0; font-size: .84rem; color: var(--brass-ink); background: var(--brass-soft); border-radius: var(--r-sm); padding: .55rem .75rem; line-height: 1.4; }
.legend-absent { width: 14px; height: 14px; border: 1.5px dashed var(--ink-soft); border-radius: 3px; display: inline-block; }

.thumb-btn { display: block; width: 100%; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .4rem; cursor: pointer; }
.thumb-btn:hover { border-color: var(--brass); }
.fam-thumb { display: block; width: 100%; height: 170px; pointer-events: none; }
.fam-thumb .g-sub { display: none; }

@media (max-width: 1000px) {
  .map-sheet { width: 100vw; height: 100vh; height: 100dvh; max-width: none; border-radius: 0; }
  .fe-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 44%) minmax(0, 1fr); }
  .fe-panel { border-left: 0; border-top: 1px solid var(--line-soft); }
  .fe-legend { display: none; }
  .fe-tip { display: none; }
  .fe-name { font-size: 1.5rem; }
  .quality-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* triangles: direction and picking */
.g-tri-group { cursor: pointer; }
.g-tri-group:hover .g-tri, .g-tri-group.selected .g-tri { fill: color-mix(in srgb, var(--brass) 22%, transparent); stroke-width: 2.2; }
.g-tri-arrow { stroke: var(--brass); stroke-width: 2; }
.g-tri-dot { fill: var(--brass); }
.pick-steps { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.pick-steps li { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: var(--r-md); border: 1px solid var(--line-soft); background: var(--panel); color: var(--ink-faint); font-size: .92rem; }
.pick-steps li > span:last-child { display: flex; flex-direction: column; }
.pick-steps li small { margin: 0; color: var(--ink); font-size: .85rem; }
.pick-steps li.now { border-color: var(--brass); color: var(--ink); background: var(--brass-soft); }
.pick-steps li.done { color: var(--ink-soft); }
.pick-dot { width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed var(--ink-faint); display: inline-grid; place-items: center; font-size: .78rem; flex: none; }

/* quick build */
.quick-build { background: var(--brass-soft); border-radius: var(--r-md); padding: .8rem .9rem .6rem; margin-bottom: 1.1rem; }
.quick-build .field { margin-bottom: .4rem; color: var(--brass-ink); }
.quick-build small { color: var(--brass-ink); opacity: .8; }
.qb-row { display: flex; gap: .5rem; align-items: stretch; }
.qb-row textarea { flex: 1; resize: none; background: var(--panel-2); }
.qb-status { margin: .35rem 0 0; font-size: .82rem; color: var(--brass-ink); min-height: 1.1em; }
@media (max-width: 720px) { .qb-row { flex-direction: column; } }

/* timeline */
.transcript-head .spacer { flex: 1; }
.transcript-head { gap: .2rem; align-items: center; }
.tl-title { font-size: 2rem; }
.tl-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1rem; padding: 1rem 1.4rem 1.2rem; border-top: 1px solid var(--line-soft); }
.tl-stats { flex: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.tl-stat { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .7rem .9rem; display: flex; flex-direction: column; gap: .1rem; }
.tl-stat-label { font-size: .76rem; color: var(--ink-faint); }
.tl-stat-value { font-family: var(--serif); font-size: 1.5rem; line-height: 1.15; }
.tl-stat-note { font-size: .8rem; color: var(--ink-soft); }
.tl-grid-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 210px minmax(0, 1fr); border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; background: var(--panel-2); }
.tl-labels { border-right: 1px solid var(--line-soft); overflow: hidden; }
.tl-label { display: flex; align-items: center; gap: .6rem; padding: 0 .8rem; border-bottom: 1px solid var(--line-soft); }
.tl-label > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.tl-label strong { font-weight: 600; font-size: .92rem; }
.tl-label small { margin: 0; font-size: .74rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini.you-mini::before { background: var(--brass); border-radius: 50%; }
.tl-scroll { overflow-x: auto; overflow-y: hidden; }
#tl-svg { display: block; }
.tl-lane { fill: var(--panel-2); }
.tl-lane.alt { fill: var(--panel); }
.tl-grid { stroke: var(--line-soft); stroke-width: 1; }
.tl-tick { font-family: var(--sans); font-size: 11px; fill: var(--ink-faint); }
.tl-silence { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.tl-silence-label { font-family: var(--serif); font-style: italic; font-size: 13px; fill: var(--ink-faint); }
.tl-ev { cursor: default; outline: none; }
.tl-block { opacity: .92; }
.tl-ev:hover .tl-block, .tl-ev:focus .tl-block { opacity: 1; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.tl-block.mutter { stroke-width: 1.5; opacity: 1; }
.tl-cutin { fill: var(--reactive); }
.tl-key { flex: none; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .78rem; color: var(--ink-soft); align-items: center; }
.tl-key span { display: inline-flex; align-items: center; gap: .4rem; }
.tl-key i { display: inline-block; width: 22px; height: 10px; border-radius: 3px; }
.k-block { background: var(--ink-soft); }
.k-cut { background: linear-gradient(135deg, var(--ink-soft) 70%, transparent 70%); }
.k-cutin { width: 0 !important; height: 0 !important; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--reactive); border-radius: 0 !important; }
.k-mutter { border: 1.5px dashed var(--ink-soft); }
.k-silence { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.k-tension { height: 5px !important; background: linear-gradient(90deg, var(--calm) 33%, var(--tense) 33% 66%, var(--reactive) 66%); }
.tl-note { color: var(--ink-faint); font-style: italic; }
@media (max-width: 1000px) {
  .tl-grid-wrap { grid-template-columns: 120px minmax(0, 1fr); }
  .tl-label small { display: none; }
  .tl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-stat-value { font-size: 1.15rem; }
  .tl-key .tl-note { display: none; }
}

/* mic */
.mic-btn {
  flex: none; width: 2.9rem; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-soft);
  display: grid; place-items: center; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.mic-btn:hover { color: var(--ink); border-color: var(--ink-faint); }
.mic-btn:disabled { opacity: .45; cursor: default; }
.mic-btn.listening { background: var(--reactive); border-color: var(--reactive); color: #fff; animation: listen 1.4s ease-in-out infinite; }
@keyframes listen { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--reactive) 25%, transparent); } }
#voices-btn[aria-pressed="false"] { color: var(--ink-faint); text-decoration: line-through; }

/* voice settings */
.voice-pick { border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .7rem .9rem .3rem; margin: .4rem 0 0; }
.voice-pick legend { font-size: .82rem; color: var(--ink-soft); font-weight: 500; padding: 0 .3rem; }
.voice-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 0 .8rem; align-items: end; }
.voice-grid .btn { margin-bottom: 1rem; }
.voice-grid input[type=range] { padding: 0; border: 0; background: none; accent-color: var(--brass); box-shadow: none; margin-top: .55rem; }
.vv { font-style: normal; color: var(--brass-ink); margin-left: .3rem; }
@media (max-width: 720px) { .voice-grid { grid-template-columns: 1fr 1fr; } .voice-grid .field:first-child { grid-column: 1 / -1; } }

/* balance meter */
.balance {
  position: absolute; top: 14px; left: 14px; z-index: 4; width: calc(196px * var(--s, 1)); padding: .6rem .75rem .55rem; border-radius: var(--r-md);
  background: rgba(14, 22, 21, .72); border: 1px solid rgba(238,241,236,.1); color: var(--room-ink); backdrop-filter: blur(3px);
}
.balance.warn { border-color: color-mix(in srgb, var(--tense) 60%, transparent); }
.bal-title { font-size: .72rem; color: var(--room-soft); margin-bottom: .35rem; }
.bal-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 34px; gap: .45rem; align-items: center; margin: .22rem 0; }
.bal-row .mini { width: 18px; height: 18px; font-size: .7rem; }
.bal-bar { height: 6px; border-radius: 3px; background: rgba(238,241,236,.1); overflow: hidden; }
.bal-bar i { display: block; height: 100%; border-radius: 3px; transition: width .4s ease; }
.bal-pct { font-size: .74rem; color: var(--room-soft); text-align: right; }
.bal-note { margin: .45rem 0 0; font-family: var(--serif); font-style: italic; font-size: .95rem; line-height: 1.25; color: var(--room-ink); }
.balance.warn .bal-note { color: #f0c46a; }
@media (max-width: 720px) { .balance { display: none; } }

/* save + case dialogs */
.report-box { padding: 1.4rem 1.5rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.report-choices { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.case-box { display: flex; flex-direction: column; max-height: calc(100vh - 1.5rem); }
#case-text { resize: none; line-height: 1.55; }

/* left column preview: the family map, or the person you're seeing */
.setup-preview { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .4rem; }
.setup-preview .sp-label { font-size: .82rem; color: var(--ink-soft); font-weight: 500; }
.setup-preview .thumb-btn { flex: 1; min-height: 120px; display: flex; padding: .5rem; }
.setup-preview .fam-thumb { height: 100%; min-height: 110px; }
.sp-person { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .8rem .9rem; display: flex; flex-direction: column; gap: .45rem; overflow-y: auto; min-height: 0; }
.sp-person .sp-head { display: flex; align-items: center; gap: .6rem; }
.sp-person h3 { font-size: 1.3rem; }
.sp-person p { margin: 0; font-size: .84rem; color: var(--ink-soft); line-height: 1.45; }
.setup-actions { margin-top: 0; }
@media (max-width: 720px) { .setup-preview { display: none; } }

/* coaching approach: card in the left column */
.approach-wrap { display: flex; flex-direction: column; gap: .4rem; }
.approach-card {
  text-align: left; font: inherit; cursor: pointer; border: 0; border-radius: var(--r-md); padding: .8rem .9rem;
  background: var(--primary); color: var(--primary-ink); display: flex; flex-direction: column; gap: .3rem;
}
.approach-card:hover { filter: brightness(1.08); }
.ac-group { font-size: .72rem; opacity: .7; }
.ac-name { font-family: var(--serif); font-size: 1.45rem; line-height: 1.05; }
.ac-desc { font-size: .8rem; line-height: 1.4; opacity: .85; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ac-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .1rem; }
.ac-tags span { font-size: .7rem; border: 1px solid currentColor; border-radius: var(--r-pill); padding: .02rem .45rem; opacity: .75; }
.ac-notes { font-size: .72rem; color: #e9cf9a; }

/* coaching approach: browse panel */
.ap-head { font-size: 2rem; }
.ap-search-row { padding: 0 1.4rem .8rem; flex: none; }
.ap-search-row input { max-width: 560px; }
.ap-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); border-top: 1px solid var(--line-soft); }
.ap-list { min-height: 0; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line-soft); padding: .5rem .6rem 1rem; display: flex; flex-direction: column; gap: 2px; }
.ap-group { font-size: .74rem; color: var(--ink-faint); margin: .8rem .5rem .25rem; }
.ap-group.rec { color: var(--brass-ink); }
.ap-item { text-align: left; font: inherit; background: none; border: 0; border-radius: var(--r-sm); padding: .5rem .65rem; cursor: pointer; display: flex; flex-direction: column; color: var(--ink); }
.ap-item:hover { background: var(--panel-2); }
.ap-item b { font-weight: 500; font-size: .95rem; }
.ap-item b em { font-style: normal; font-size: .72rem; color: var(--brass); margin-left: .45rem; font-weight: 600; }
.ap-item i { font-style: normal; font-size: .8rem; color: var(--ink-soft); }
.ap-item.sel { background: var(--primary); color: var(--primary-ink); }
.ap-item.sel i { color: color-mix(in srgb, var(--primary-ink) 70%, transparent); }
.ap-empty { color: var(--ink-faint); font-size: .9rem; padding: .8rem; }
.ap-detail { min-height: 0; overflow-y: auto; padding: 1.2rem 1.6rem 1.6rem; display: flex; flex-direction: column; gap: .9rem; max-width: 900px; }
.ap-why { margin: 0; background: var(--brass-soft); color: var(--brass-ink); border-radius: var(--r-md); padding: .7rem .9rem; font-size: .92rem; line-height: 1.45; }
.ap-kicker { margin: 0; font-size: .8rem; color: var(--ink-faint); }
.ap-title { font-size: 2.6rem; line-height: 1; }
.ap-overview { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--ink-soft); max-width: 70ch; }
.ap-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.ap-box { background: var(--panel); border-radius: var(--r-md); padding: .8rem 1rem; }
.ap-box b { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.ap-box ul { margin: 0; padding-left: 1.1rem; font-size: .88rem; line-height: 1.55; color: var(--ink-soft); }
.ap-moves { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.ap-moves span { font-size: .8rem; background: var(--brass-soft); color: var(--brass-ink); border-radius: var(--r-pill); padding: .15rem .65rem; }
.ap-notes textarea { resize: vertical; }
@media (max-width: 1000px) {
  .ap-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 38%) minmax(0, 1fr); }
  .ap-list { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .ap-cols { grid-template-columns: 1fr; }
  .ap-title { font-size: 2rem; }
  #ap-recommend { font-size: .75rem; }
}

/* personality scales: groups, Not set, your scales */
.trait-groups { display: flex; flex-direction: column; gap: .6rem; }
.trait-group { border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .2rem .9rem; background: var(--panel-2); }
.trait-group[open] { padding-bottom: .9rem; }
.trait-group summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: .6rem; padding: .55rem 0; font-family: var(--serif); font-size: 1.2rem; }
.trait-group summary::-webkit-details-marker { display: none; }
.trait-group summary::before { content: "›"; font-family: var(--sans); color: var(--ink-faint); transition: transform .15s; display: inline-block; }
.trait-group[open] summary::before { transform: rotate(90deg); }
.trait-group summary .count { font-family: var(--sans); font-size: .76rem; color: var(--brass-ink); margin: 0; }
.trait-group .sliders { gap: .9rem; margin-bottom: .6rem; }
.slider-row label > span:first-child { display: flex; flex-direction: column; }
.slider-row label small { margin: .1rem 0 0; font-weight: 400; }
.vwrap { display: inline-flex; align-items: center; gap: .3rem; }
.clear-trait { border: 0; background: none; color: var(--ink-faint); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .15rem; }
.clear-trait:hover { color: var(--reactive); }
.slider-row.unset .value { color: var(--ink-faint); font-family: var(--sans); font-size: .82rem; font-style: italic; }
.slider-row.unset input[type=range] { opacity: .45; accent-color: var(--ink-faint); }
.slider-row.unset .slider-ends { opacity: .6; }
.tag.custom { background: color-mix(in srgb, var(--brass) 14%, transparent); color: var(--brass-ink); border-color: transparent; }
.anchor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.anchor-grid .field:last-child { grid-column: 1 / -1; }
.scale-list { display: flex; flex-direction: column; gap: .4rem; }
.scale-glyph { width: 36px; height: 26px; border-radius: var(--r-sm); background: var(--brass-soft); color: var(--brass-ink); display: grid; place-items: center; font-size: .72rem; font-weight: 600; flex: none; }

/* case files */
.case-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .5rem; margin-top: -.35rem; }
.case-n { font-family: var(--serif); font-size: 1.25rem; }
.case-sub { font-size: .76rem; color: var(--ink-faint); }
.link-btn { font: inherit; font-size: .8rem; color: var(--brass-ink); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.room-hint.since { font-size: calc(1.1rem * var(--s, 1)); line-height: 1.4; width: min(84%, calc(620px * var(--s, 1))); }
.end-loading { padding: 2rem 0; text-align: center; }
.end-loading .lede { font-family: var(--serif); font-size: 1.5rem; margin: 0 auto; }
.end-summary { font-size: 1.02rem; line-height: 1.6; margin: 0 0 1rem; }
.end-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.end-box { background: var(--panel); border-radius: var(--r-md); padding: .7rem .9rem; font-size: .88rem; }
.end-box b { display: block; font-weight: 600; margin-bottom: .25rem; }
.end-box p { margin: 0; color: var(--ink-soft); line-height: 1.5; }
.end-box ul { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); line-height: 1.5; }
.between { margin-top: 1rem; background: var(--brass-soft); color: var(--brass-ink); border-radius: var(--r-md); padding: .8rem 1rem; }
.between h4, .map-suggs h4 { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; margin: 0 0 .3rem; }
.between p { margin: 0; line-height: 1.55; }
.between ul { margin: 0; padding-left: 1.1rem; }
.map-suggs { margin-top: 1rem; display: flex; flex-direction: column; gap: .45rem; }
.map-suggs .hint { margin: 0 0 .2rem; }
.map-sugg { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .55rem .75rem; font-size: .9rem; cursor: pointer; }
.map-sugg input { width: auto; margin-top: .25rem; accent-color: var(--brass); }
.map-sugg small { display: block; margin: .15rem 0 0; color: var(--ink-soft); }
.end-box:empty { display: none; }
#end-dialog .check { margin-top: 1rem; }
.cf-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 240px minmax(0, 1fr); border-top: 1px solid var(--line-soft); }
.cf-body > .lede, .cf-body > .cf-progress { grid-column: 1 / -1; }
.cf-list { min-height: 0; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line-soft); padding: .6rem; display: flex; flex-direction: column; gap: 2px; }
.cf-detail { min-height: 0; overflow-y: auto; padding: 1.2rem 1.6rem 1.6rem; max-width: 960px; }
.cf-detail .ap-title { margin-bottom: .4rem; }
.cf-actions { display: flex; gap: .5rem; margin-top: 1.2rem; flex-wrap: wrap; }
#cf-tabs { margin-left: 1rem; }
.cf-progress { min-height: 0; overflow-y: auto; padding: 1.2rem 1.6rem; display: flex; flex-direction: column; gap: .8rem; }
.cf-progress h3 { font-size: 1.3rem; margin-top: .4rem; }
.progress-chart { width: 100%; max-width: 820px; height: auto; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.pc-grid { stroke: var(--line-soft); }
.pc-tick { font-family: var(--sans); font-size: 11px; fill: var(--ink-faint); }
.pc-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }
.pc-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.pc-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.pc-table { border-collapse: collapse; font-size: .88rem; max-width: 820px; width: 100%; }
.pc-table th, .pc-table td { text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--line-soft); }
.pc-table th { color: var(--ink-faint); font-weight: 500; }
.pc-changes { margin: 0; padding-left: 1.1rem; line-height: 1.6; }
@media (max-width: 1000px) {
  .cf-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .cf-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .end-grid { grid-template-columns: 1fr; }
}

/* confirmations */
.confirm-box { padding: 1.5rem 1.6rem 1.3rem; display: flex; flex-direction: column; gap: .7rem; }
.confirm-box h2 { font-size: 1.8rem; }
.confirm-actions { gap: .5rem; margin-top: .4rem; }
.btn.danger-solid { background: var(--reactive); color: #fff; }
.btn.danger-solid:hover { filter: brightness(1.06); }
dialog[open] { animation: sheet-in .22s ease-out; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }

/* room transitions: the family leaves, rewinds, or arrives */
.room-curtain {
  position: absolute; inset: 0; z-index: var(--z-cover); display: grid; place-items: center; pointer-events: none;
  font-family: var(--serif); font-size: calc(2.4rem * var(--s, 1)); color: var(--room-ink);
  background: rgba(8, 13, 12, 0); opacity: 0; transition: background .9s ease, opacity .6s ease;
}
.room.leaving .room-curtain { background: rgba(8, 13, 12, .82); opacity: 1; transition-delay: .35s; }
.room.leaving .seat:not(.you) { animation: seat-leave .9s ease-in forwards; animation-delay: calc(var(--i, 0) * 110ms); }
.room.leaving .bubble, .room.leaving .balance, .room.leaving .room-hint { opacity: 0; transition: opacity .4s; }
@keyframes seat-leave { to { opacity: 0; transform: translate(-50%, -38%) scale(.9); filter: blur(2px); } }
.room.rewind .room-curtain { animation: rewind-flash .9s ease-in-out forwards; }
.room.rewind .bubble { opacity: 0; transition: opacity .25s; }
.room.rewind .seat:not(.you) { animation: seat-rewind .9s ease-in-out; }
@keyframes rewind-flash { 0% { opacity: 0; background: rgba(8,13,12,0); } 45% { opacity: 1; background: rgba(8,13,12,.9); } 100% { opacity: 1; background: rgba(8,13,12,.9); } }
@keyframes seat-rewind { 50% { opacity: 0; transform: translate(-50%, -50%) scale(.85) rotate(-4deg); } 51% { opacity: 0; } }
.room.arriving .seat:not(.you) { animation: seat-arrive .75s var(--ease-enter) both; animation-delay: calc(.15s + var(--i, 0) * 140ms); }
@keyframes seat-arrive { from { opacity: 0; transform: translate(-50%, -28%) scale(.92); } }
.room.arriving .room-curtain { animation: curtain-lift .9s ease-out forwards; }
.room.arriving.titled .room-curtain { animation: curtain-title 2s ease-out forwards; }
@keyframes curtain-lift { from { opacity: 1; background: rgba(8,13,12,.9); } to { opacity: 0; background: rgba(8,13,12,0); } }
@keyframes curtain-title { 0%, 35% { opacity: 1; background: rgba(8,13,12,.9); } 100% { opacity: 0; background: rgba(8,13,12,0); } }

/* you cutting in, and people talking over you */
.btn.primary.cut-in { background: var(--reactive); color: #fff; }
.bubble.you.cutting-in { border-top-color: var(--reactive); animation: pop .18s ease-out, nudge .35s ease-in-out .18s 2; }
@keyframes nudge { 50% { transform: translateX(-4px); } }
.bubble.over {
  z-index: 9; font-weight: 600; transform: scale(1.06); transform-origin: bottom center;
  border-top: 4px solid var(--reactive); box-shadow: 0 14px 34px -10px rgba(207, 90, 66, .55);
  transition: transform .25s ease;
}
.bubble.over::before {
  content: attr(data-over); position: absolute; top: -1.45rem; left: .4rem; white-space: nowrap;
  font-size: .72rem; font-weight: 600; color: #fff; background: var(--reactive); border-radius: var(--r-pill); padding: .1rem .55rem;
}
.t-flag { margin: .15rem 0 0; font-size: .74rem; color: var(--reactive); font-weight: 600; }

/* the room as a floor plan */
.room.plan { background: linear-gradient(180deg, var(--wall) 0%, var(--wall-2) 100%); --k: 1; --av: max(26px, calc(42px * var(--k))); }
.room.plan::before { display: none; }
.stage { position: absolute; z-index: 1; border-radius: var(--r-sm); overflow: visible; }
.plan-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: var(--r-sm); box-shadow: 0 18px 50px -20px rgba(0, 0, 0, .6); }
.plan-svg .fp-item { cursor: default; }
.plan-svg.editing .fp-item { cursor: grab; }
.plan-svg.editing .fp-item:active { cursor: grabbing; }
.plan-svg .fp-rotate { cursor: grab; }
.plan-svg .fp-btn { cursor: pointer; }
.room.plan .seat { width: calc(124px * max(1, var(--k))); gap: .18rem; padding: 0; transform: translate(-50%, calc(var(--av) / -2)); pointer-events: none; }
/* only the person themselves is clickable, so the furniture around them can still be grabbed */
.room.plan .seat > .avatar, .room.plan .seat > .seat-name { pointer-events: auto; }
.room.plan .seat-name { position: relative; z-index: 1; margin-top: calc(var(--av) * -.26); }
.room.plan:not(.arranging) .seat { transition: left .6s var(--ease-enter), top .6s var(--ease-enter); }
.room.plan .avatar { width: var(--av); height: var(--av); font-size: calc(var(--av) * .44); }
.room.plan .avatar::before { box-shadow: 0 0 0 2.5px #f7f3ea, 0 0 0 5px var(--t), 0 4px 18px 2px color-mix(in srgb, var(--t) 55%, transparent); }
.room.plan .seat-name { font-size: calc(.76rem * max(1, var(--k) * .9)); background: rgba(20, 27, 26, .78); color: var(--cream); padding: .06rem .5rem; border-radius: var(--r-pill); white-space: nowrap; }
.room.plan .seat-cue { font-size: calc(.8rem * max(1, var(--k) * .9)); background: rgba(20, 27, 26, .66); color: #e9e4d8; padding: .05rem .5rem; border-radius: var(--r-sm); max-width: calc(132px * max(1, var(--k))); min-height: 0; }
.room.plan .seat-cue:empty { display: none; }
.room.plan .seat.you { width: auto; }
.room.plan .seat.you .avatar { width: calc(var(--av) * .82); height: calc(var(--av) * .82); font-size: calc(var(--av) * .26); color: #2c3a37; }
.room.plan .seat.you .avatar::before { background: rgba(247, 243, 234, .9); border: 1.5px dashed #4c6862; }
.room.plan .room-hint { z-index: 5; top: 5%; background: rgba(20, 27, 26, .82); color: #ece7dc; padding: .55rem 1.1rem; border-radius: var(--r-md); width: auto; max-width: min(80%, calc(520px * var(--s, 1))); font-size: calc(1.1rem * var(--s, 1)); }
.room.plan .room-hint:empty { display: none; }
.room.plan .bubble { z-index: 8; }
.room-arrange {
  position: absolute; top: .7rem; right: .7rem; z-index: 6; font: inherit; font-size: .8rem; color: var(--cream);
  background: rgba(20, 27, 26, .72); border: 1px solid rgba(238, 241, 236, .25); border-radius: var(--r-pill); padding: .32rem .8rem; cursor: pointer;
}
.room-arrange:hover:not(:disabled) { border-color: var(--brass); }
.room-arrange:disabled { opacity: .45; cursor: default; }
.room.arranging .bubble, .room.arranging .balance, .room.arranging .room-hint, .room.arranging .suggestions, .room.arranging .breath { display: none !important; }
.room.arranging .seat { cursor: grab; z-index: 3; }
.room.arranging .seat:not(.you):hover .avatar::before { box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px var(--brass); }
.room.arranging .seat.dragging { cursor: grabbing; z-index: 9; }
.room.arranging .seat.dragging .avatar { transform: scale(1.1); }
.room.arranging .seat.standing .seat-name::after { content: " · standing"; opacity: .75; }

.plan-bar, .plan-tray {
  position: absolute; left: .6rem; right: .6rem; z-index: 6; background: rgba(250, 247, 240, .97); color: var(--ink);
  border-radius: var(--r-md); box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .55); padding: .5rem .65rem;
}
.plan-bar { top: .6rem; display: flex; align-items: center; gap: .5rem .8rem; flex-wrap: wrap; }
.plan-tray { bottom: .6rem; display: flex; flex-direction: column; gap: .45rem; }
.plan-rooms, .plan-floors, .plan-save { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.plan-rooms { flex: 1; min-width: 0; }
.plan-label { font-size: .76rem; color: var(--ink-faint); margin-right: .15rem; }
.plan-label.strong { font-size: .88rem; color: var(--ink); font-weight: 600; }
.plan-tip { font-size: .76rem; color: var(--ink-faint); }
.plan-chip {
  font: inherit; font-size: .8rem; display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .7rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer;
}
.plan-chip:hover { border-color: var(--brass); }
.plan-chip.on { background: var(--ink); color: var(--paper, #fff); border-color: var(--ink); }
.plan-chip .pc-mark { width: 6px; height: 6px; border-radius: 50%; background: var(--brass); }
.plan-chip .pc-x { font-size: 1rem; line-height: 1; opacity: .6; padding: 0 .1rem; }
.plan-chip .pc-x:hover { opacity: 1; color: var(--reactive); }
.plan-name { width: 150px; height: 30px; font-size: .82rem; padding: 0 .6rem; }
.plan-err { font-size: .76rem; color: var(--reactive); }
.plan-err:empty { display: none; }
.plan-tray-head { display: flex; align-items: center; gap: .4rem .7rem; flex-wrap: wrap; }
.plan-tiles { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .1rem; }
.plan-tile {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: .25rem; width: 76px; padding: .35rem .25rem .3rem;
  font: inherit; font-size: .72rem; color: var(--ink-soft); background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-sm); cursor: pointer;
}
.plan-tile:hover { border-color: var(--brass); color: var(--ink); }
.plan-tile svg { width: 64px; height: 44px; border-radius: 6px; background: #d9c09b; }
@media (max-width: 720px) {
  .plan-tip { display: none; }
  .plan-name { width: 120px; }
}

/* people moving around the room */
.room.plan:not(.arranging) .seat.walking { transition: left 1.5s var(--ease-move), top 1.5s var(--ease-move), opacity .6s ease; }
.room.plan .seat.gone { opacity: 0; pointer-events: none; }
.room.plan .seat.gone > * { pointer-events: none; }

/* the therapist's chair view (chair-view.js): the room is one picture, and each seat button is an invisible click
   target over that person's head (--av: the head's size, --feet: from the head down to their feet). The name sits
   at their feet; the brass ring round the head still shows who you're speaking to. */
.room.plan.chair .plan-svg { display: none; }
.chair-stage { position: absolute; inset: 0; border-radius: var(--r-sm); overflow: hidden; box-shadow: 0 18px 50px -20px rgba(0, 0, 0, .6); }
.room.plan.chair .seat { transition: none; }
.room.plan.chair .seat.you { visibility: hidden; }
/* speech bubbles sit near the ceiling over their speaker (placeLeadBubble in app.js); the tail becomes a line
   down to the top of their head (--lead long), in their colour */
.room.plan.chair .bubble.lead::after { bottom: auto; top: 100%; width: 2px; height: var(--lead, 0); border-radius: 0 0 2px 2px; transform: translateX(-50%); background: var(--c, var(--gold)); }
.room.plan.chair .bubble.mutter.lead::after { display: block; opacity: .7; }
/* your own words: a solid gold-tinted card (the dark room's 13% gold wash disappears on this bright room) */
.room.plan.chair .bubble.you { background: color-mix(in srgb, var(--gold) 26%, var(--bubble)); color: var(--on-light); border-top-color: var(--gold); }
.room.plan.chair .bubble.you::after { background: color-mix(in srgb, var(--gold) 26%, var(--bubble)); }
.room.plan.chair .bubble.you.talked-over { opacity: .85; }
/* the certificate on the wall (chair-view.js), sized to the room the way setup draws it (setup-view.css .cert) */
.chair-stage { container-type: inline-size; }
.chair-cert { position: absolute; left: 59%; top: 13.5%; width: 12.5%; aspect-ratio: 1.42; background: #fbf6ec; color: #2d2822; text-align: center; padding: .9cqw .6cqw .5cqw; box-shadow: 0 0 0 .5cqw #b38a5c, 0 .9cqw 1.4cqw -.5cqw rgba(60, 40, 20, .5); display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.chair-cert::before { content: ""; position: absolute; inset: .45cqw; border: .12cqw solid #c9a873; }
.chair-cert small { font-size: .62cqw; letter-spacing: .22em; color: #9a7650; }
.chair-cert b { font-family: var(--serif); font-weight: 400; font-size: 1.45cqw; line-height: 1.05; margin: .2cqw 0 .1cqw; max-width: 90%; }
.chair-cert em { font-style: normal; font-size: .62cqw; color: #7a6f60; }
.chair-cert svg.seal { position: absolute; right: .3cqw; bottom: .25cqw; width: 2.6cqw; height: auto; }
.room.plan.chair .avatar::before { background: none; box-shadow: none; animation: none; }
.room.plan.chair .avatar > * { visibility: hidden; }
.room.plan.chair:not(.addr-some) .seat .avatar::after { display: none; }
.room.plan.chair .seat[aria-pressed="true"] .avatar::after { inset: -10px; border-radius: 50%; border-width: 2px; }
.room.plan.chair .seat-name { position: absolute; top: calc(var(--feet) + 8px); left: 50%; transform: translateX(-50%); margin: 0; }
.room.plan.chair .seat-cue[data-side="feet"] { top: calc(var(--feet) + 12px + 1.6em); left: 50%; transform: translateX(-50%); text-align: center; }
.move-caption {
  position: absolute; left: 50%; bottom: 4%; transform: translate(-50%, 8px); z-index: 7; max-width: 80%;
  font-family: var(--serif); font-style: italic; font-size: calc(1.05rem * max(1, var(--k) * .9)); color: var(--cream);
  background: rgba(20, 27, 26, .84); padding: .35rem 1rem; border-radius: var(--r-pill); text-align: center;
  opacity: 0; transition: opacity .4s ease, transform .4s ease; pointer-events: none;
}
.move-caption.show { opacity: 1; transform: translate(-50%, 0); }
.door-chip {
  position: absolute; right: 1.5%; z-index: 6; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; gap: .3rem;
}
.door-chip button {
  font: inherit; font-size: .78rem; color: var(--cream); background: rgba(20, 27, 26, .84); border: 1px solid rgba(238, 241, 236, .3);
  border-radius: var(--r-pill); padding: .28rem .75rem; cursor: pointer; white-space: nowrap;
}
.door-chip button:hover { border-color: var(--brass); }
.room.arranging .move-caption, .room.arranging .door-chip { display: none; }

/* body language captions sit beside people, never on top of each other */
.room.plan .seat-cue { position: absolute; white-space: normal; width: max-content; text-align: center; z-index: 2; transition: opacity .3s ease; }
.room.plan .seat-cue[data-side="down"] { top: calc(100% + 4px); left: 50%; transform: translateX(-50%); }
.room.plan .seat-cue[data-side="up"] { bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); }
.room.plan .seat-cue[data-side="left"] { right: calc(50% + var(--av) / 2 + 8px); top: calc(var(--av) / 2); transform: translateY(-50%); text-align: right; }
.room.plan .seat-cue[data-side="right"] { left: calc(50% + var(--av) / 2 + 8px); top: calc(var(--av) / 2); transform: translateY(-50%); text-align: left; }
.room.plan .seat-cue.cue-hidden { opacity: 0; }

/* yelling and threatening moments */
.bubble.shout { font-size: 1.04em; }
.move-caption.threat { background: rgba(120, 30, 20, .9); font-style: normal; font-weight: 600; }
.room.plan .seat.looming .avatar { transform: scale(1.16); transition: transform .3s ease; }
.room.plan .seat.looming .avatar::before { animation: loom 1.1s ease-in-out infinite; }
@keyframes loom { 50% { box-shadow: 0 0 0 2.5px #f7f3ea, 0 0 0 6px var(--reactive), 0 0 34px 10px rgba(207, 90, 66, .7); } }
.room.plan .seat.slam .avatar { animation: slam .5s var(--ease-enter); }
@keyframes slam { 30% { transform: scale(1.22) translateY(4px); } }
.room.plan .seat.flinch .avatar { animation: flinch .55s ease-in-out; }
@keyframes flinch { 20% { transform: translateX(-4px) scale(.94); } 45% { transform: translateX(3px) scale(.95); } 70% { transform: translateX(-2px); } }
.stage.jolt { animation: jolt .45s ease-in-out; }
@keyframes jolt { 20% { transform: translate(3px, 2px); } 40% { transform: translate(-3px, -1px); } 60% { transform: translate(2px, -2px); } 80% { transform: translate(-1px, 1px); } }
.safety-note {
  position: absolute; z-index: 9; top: .7rem; left: .7rem; width: min(calc(100% - 1.4rem), 400px);
  background: rgba(250, 247, 240, .98); color: var(--ink); border-left: 4px solid var(--reactive); border-radius: 0;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .6); padding: .7rem .9rem .75rem; display: flex; flex-direction: column; gap: .35rem;
}
.safety-note[hidden] { display: none; }
.safety-note .sn-head { display: flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .86rem; color: var(--reactive); }
.safety-note .sn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--reactive); }
.safety-note p { margin: 0; font-size: .86rem; line-height: 1.45; }
.safety-note .btn { align-self: flex-end; }
.room.arranging .safety-note { display: none; }
.t-entry.note.safety { color: var(--reactive); font-weight: 600; }

/* drawn faces */
.face-wrap { position: absolute !important; inset: 0; overflow: hidden; display: block; }
.face-wrap .face { width: 100%; height: 100%; display: block; }
.avatar.man .face-wrap, .mini.man .face-wrap { border-radius: 6px; }
.avatar.woman .face-wrap, .mini.woman .face-wrap { border-radius: 50%; }
.avatar.unspecified .face-wrap, .mini.unspecified .face-wrap { border-radius: 30%; }
.avatar.nonbinary .face-wrap, .mini.nonbinary .face-wrap { clip-path: polygon(50% 4%, 96% 50%, 50% 96%, 4% 50%); }
.mini.man .face-wrap { border-radius: 4px; }
.face .m-open { opacity: 0; }
.avatar.talking .face .m-open { animation: talk-open .34s steps(1) infinite; }
.avatar.talking .face .m-closed { animation: talk-closed .34s steps(1) infinite; }
@keyframes talk-open { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes talk-closed { 0% { opacity: 0; } 50% { opacity: 1; } }
.face-wrap.changed .face { animation: face-change .35s ease-out; }
@keyframes face-change { from { opacity: .35; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .avatar.talking .face .m-open, .avatar.talking .face .m-closed { animation: none; } }

/* the look picker in the person wizard */
.look-pick { border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .7rem .9rem .8rem; margin: 0 0 1rem; }
.look-pick legend { font-size: .85rem; padding: 0 .3rem; }
.look-pick legend small { color: var(--ink-faint); font-weight: 400; margin-left: .3rem; }
.look-row { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.look-preview { display: flex; gap: .5rem; }
.look-cell { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.look-cell small { font-size: .7rem; color: var(--ink-faint); }
.mini.look-face { width: 54px; height: 54px; }
.look-controls { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: .5rem; }
.look-line { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.look-label { width: 2.6rem; font-size: .8rem; color: var(--ink-soft); }
.look-line select { width: auto; min-width: 9rem; height: auto; min-height: 34px; padding: .35rem 2rem .35rem .7rem; line-height: 1.3; font-size: .88rem; }
.look-line .check { margin: 0; }
.swatches { display: flex; gap: .3rem; flex-wrap: wrap; }
.swatch { width: 22px; height: 22px; border-radius: 50%; background: var(--sw); border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--brass); }

.room.arranging .seat.you { pointer-events: auto; cursor: grab; }
.room.arranging .seat.you:hover .avatar::before { border-color: var(--brass); border-style: solid; }

/* homework */
.hw-box { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.hw-box h4, .hw-report h4 { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; margin: 0; }
.hw-box .hint { margin: 0 0 .2rem; }
.hw-item { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .6rem .75rem; background: var(--panel-2); }
.hw-item.on { border-color: var(--brass); background: var(--brass-soft); }
.hw-item > input { width: auto; margin-top: .35rem; accent-color: var(--brass); }
.hw-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.hw-tag { align-self: flex-start; font-size: .68rem; text-transform: none; color: var(--brass-ink); background: var(--panel); border-radius: var(--r-pill); padding: .05rem .5rem; }
.hw-tag.given { color: var(--ink-soft); }
.hw-task { font-size: .92rem; min-height: 0; resize: vertical; }
.hw-people { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.hw-for { font-size: .74rem; color: var(--ink-faint); margin-right: .1rem; }
.hw-who { font: inherit; font-size: .78rem; display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem .15rem .2rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft); cursor: pointer; }
.hw-who .mini { width: 18px; height: 18px; }
.hw-who.on { border-color: var(--brass); color: var(--ink); background: #fff; }
.hw-why { color: var(--ink-faint); font-size: .78rem; line-height: 1.4; }
.hw-box > .btn { align-self: flex-start; }
.hw-report { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.hw-rep-item { border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .6rem .8rem; }
.hw-rep-task { margin: 0 0 .3rem; font-weight: 500; }
.hw-rep-task small { font-weight: 400; color: var(--ink-faint); }
.hw-rep-item summary { cursor: pointer; font-size: .82rem; color: var(--brass-ink); }
.hw-rep-item ul { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .86rem; line-height: 1.5; color: var(--ink-soft); }
.hw-out { font-weight: 600; color: var(--ink); }
.hw-out.did_it { color: var(--success); } .hw-out.partly { color: #8a6a20; } .hw-out.backfired, .hw-out.refused { color: var(--reactive); }
.room-hint .hint-hw { display: block; margin-top: .45rem; font-style: normal; font-family: var(--sans); font-size: .85em; color: #f0d9a8; }

/* bubbles below a speaker, and peeking at someone a bubble covers */
.bubble.below::after { bottom: auto; top: -7px; border-radius: 3px 0 0 0; }
.bubble.peek { opacity: .14 !important; filter: none; transition: opacity .15s ease; }
.room.plan .seat.peeked { z-index: 9; }
.room.plan .seat.peeked .avatar::before { box-shadow: 0 0 0 2.5px #fff, 0 0 0 6px var(--brass), 0 0 26px 6px color-mix(in srgb, var(--brass) 55%, transparent); }
.room.plan .seat.peeked .seat-name { background: var(--brass); color: #1f1a12; }

/* saying plainly what's AI, and what the approaches are not */
.ai-note { align-self: center; font-size: .72rem; color: var(--ink-faint); border: 1px solid var(--line-soft); border-radius: var(--r-pill); padding: .12rem .55rem; white-space: nowrap; cursor: help; }
.ap-affil { display: inline-block; margin-top: .25rem; color: var(--ink-faint); font-size: .92em; }

.bubble.leaving { opacity: 0 !important; transform: translateY(-6px); transition: opacity .4s ease, transform .4s ease; pointer-events: none; }

/* where each person stands: trust, openness, pattern grip */
.standing { margin-top: 1rem; }
.standing h4 { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; margin: 0; }
.standing .hint { margin: .15rem 0 .4rem; }
.standing-table { border-collapse: collapse; font-size: .86rem; width: 100%; }
.standing-table th, .standing-table td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.standing-table th { color: var(--ink-faint); font-weight: 500; }
.standing-table .st-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.standing-table .st-cell.up { color: var(--success); font-weight: 600; }
.standing-table .st-cell.down { color: var(--reactive); font-weight: 600; }
.standing-table .st-note { color: var(--ink-soft); line-height: 1.4; }
.standing-table .st-label { color: var(--ink-soft); }
.standing-table tr.st-first td { border-top: 2px solid var(--line); }

/* ===== More info on the hover card ===== */
.seat-card.show { pointer-events: auto; }
.seat-card .sc-more {
  display: block; width: 100%; margin-top: .7rem; padding: .45rem .6rem; border-radius: var(--r-sm); text-align: center;
  font: inherit; font-size: .8rem; font-weight: 600; color: var(--room-ink); cursor: pointer;
  background: rgba(238, 241, 236, .08); border: 1px solid rgba(238, 241, 236, .16);
  transition: background .15s ease, border-color .15s ease;
}
.seat-card .sc-more:hover, .seat-card .sc-more:focus-visible { background: rgba(238, 241, 236, .16); border-color: var(--brass); outline: none; }

/* shared: a person's face in their genogram shape */
.face-tile { flex: none; position: relative; display: inline-grid; }

/* ===== The session summary card ===== */
.ss-card {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  padding: 1.25rem 1.35rem 1.1rem; margin-bottom: 1.25rem;
}
.ss-top { display: flex; flex-direction: column; gap: .35rem; }
.ss-kicker { font-size: .76rem; letter-spacing: .02em; color: var(--ink-faint); }
.ss-headline { font-family: var(--serif); font-weight: 400; font-size: 1.85rem; line-height: 1.12; margin: 0; color: var(--ink); text-wrap: balance; }
.ss-summary { margin: .2rem 0 0; font-size: .95rem; line-height: 1.6; color: var(--ink-soft); max-width: 68ch; }
.ss-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-top: 1.1rem; }
.ss-person {
  display: flex; align-items: center; gap: .7rem; text-align: left; padding: .65rem .75rem; min-height: 72px;
  font: inherit; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ss-person:hover { border-color: var(--line); transform: translateY(-1px); box-shadow: 0 8px 20px -14px rgba(0, 0, 0, .45); }
.ss-person:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.ss-person[aria-selected="true"] { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 10px 24px -16px rgba(0, 0, 0, .5); }
.ss-pbody { display: flex; flex-direction: column; gap: .12rem; min-width: 0; }
.ss-pname { font-weight: 600; font-size: .95rem; }
.ss-phead { font-size: .8rem; color: var(--ink-soft); line-height: 1.3; }
.ss-trend {
  align-self: flex-start; margin-top: .2rem; font-size: .68rem; font-weight: 600; letter-spacing: .01em;
  padding: .12rem .5rem; border-radius: var(--r-pill); background: var(--line-soft); color: var(--ink-soft); white-space: nowrap;
}
.ss-trend.t-up { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.ss-trend.t-down { background: color-mix(in srgb, var(--reactive) 16%, transparent); color: #a8432e; }
.ss-trend.t-mixed { background: color-mix(in srgb, var(--tense) 20%, transparent); color: #8a6214; }
.ss-trend.t-first { background: var(--brass-soft); color: var(--brass-ink); }
.ss-hint { margin: .7rem 0 0; font-size: .8rem; color: var(--ink-faint); }
.ss-detail { margin-top: 1rem; padding-top: 1.1rem; border-top: 1px solid var(--line-soft); animation: ss-in .22s ease-out; }
.ss-detail[hidden] { display: none; }
@keyframes ss-in { from { opacity: 0; transform: translateY(4px); } }
.ssd-head { display: flex; gap: 1rem; align-items: flex-start; }
.ssd-titles { min-width: 0; }
.ssd-titles h4 { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.1; }
.ssd-titles h4 .ss-trend { margin: 0; font-family: var(--sans); }
.ssd-headline { margin: .3rem 0 0; font-size: .95rem; font-weight: 600; color: var(--ink); }
.ssd-note { margin: .25rem 0 0; font-size: .9rem; line-height: 1.55; color: var(--ink-soft); }
.ssd-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.4rem; margin-top: 1.1rem; }
.ssd-col h5, .ps-sec h5 { margin: 0 0 .6rem; font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-faint); }
.ssd-legend { display: flex; align-items: center; gap: .35rem; margin: -.25rem 0 .6rem; font-size: .72rem; color: var(--ink-faint); }
.ssd-legend i { display: inline-block; width: 14px; height: 8px; border-radius: 3px; }
.ssd-legend .lg-now { background: var(--c, var(--ink-soft)); }
.ssd-legend .lg-was { margin-left: .5rem; box-shadow: inset 0 0 0 1.5px var(--ink-faint); }
.ssd-moments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.ssd-moments li {
  font-family: var(--serif); font-style: italic; font-size: 1.02rem; line-height: 1.4; color: var(--ink);
  padding: .1rem 0 .1rem .8rem; border-left: 2px solid var(--brass);
}

/* measures: five steps each */
.ms-list { display: flex; flex-direction: column; gap: .55rem; }
.ms-row { display: grid; grid-template-columns: minmax(0, 1fr) 118px 3.4rem; align-items: center; gap: .75rem; }
.ms-label { display: flex; flex-direction: column; min-width: 0; }
.ms-label span { font-size: .86rem; font-weight: 600; color: var(--ink); }
.ms-label small { font-size: .72rem; color: var(--ink-faint); line-height: 1.3; }
.ms-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.ms-track i { height: 9px; border-radius: 3px; background: var(--line-soft); }
.ms-track i.on { background: var(--c, var(--ink-soft)); }
.ms-track.inverse i.on { background: color-mix(in srgb, var(--c, var(--ink-soft)) 55%, var(--tense)); }
.ms-track i.was { box-shadow: inset 0 0 0 1.5px var(--ink-faint); }
.ms-track i.on.was { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .75); }
.ms-val { font-size: .82rem; font-variant-numeric: tabular-nums; color: var(--ink-soft); text-align: right; white-space: nowrap; }
.ms-val.good { color: var(--success); font-weight: 600; }
.ms-val.bad { color: #a8432e; font-weight: 600; }
.end-sub { margin: 0 0 .6rem; font-family: var(--serif); font-weight: 400; font-size: 1.25rem; }

/* ===== More info popup ===== */
.ps-sheet { width: min(900px, calc(100vw - 1.5rem)); }
.ps-box { display: flex; flex-direction: column; max-height: calc(100vh - 1.5rem); }
.ps-head {
  display: flex; align-items: center; gap: 1.1rem; padding: 1.3rem 1.5rem 1.15rem;
  background: color-mix(in srgb, var(--c) 10%, var(--panel-2)); border-bottom: 1px solid var(--line-soft);
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.ps-titles { flex: 1; min-width: 0; }
.ps-titles h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 2.2rem; line-height: 1; }
.ps-meta { margin: .35rem 0 0; font-size: .9rem; color: var(--ink-soft); }
.ps-head .icon-btn { align-self: flex-start; }
.ps-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; padding: 1.1rem 1.5rem 1.5rem; overflow-y: auto; }
.ps-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.ps-sec { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .95rem 1.05rem 1rem; }
.ps-feeling { margin: 0; font-family: var(--serif); font-size: 1.7rem; line-height: 1.05; }
.ps-feeling.none { font-size: 1.2rem; font-style: italic; color: var(--ink-faint); }
.ps-tension { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; margin-top: .7rem; font-size: .8rem; color: var(--ink-soft); }
.ps-tension .sc-meter { display: flex; gap: 3px; }
.ps-tension .sc-meter i { flex: 1; height: 7px; border-radius: 3px; background: var(--line-soft); }
.ps-tension .sc-meter i.on { background: var(--t); }
.ps-tlabel { font-weight: 600; color: var(--ink); }
.ps-cue { margin: .6rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink-soft); }
.ps-style { margin: .65rem 0 0; padding-top: .55rem; border-top: 1px solid var(--line-soft); font-size: .8rem; color: var(--ink-faint); }
.ps-sub { margin: -.2rem 0 .65rem; font-size: .76rem; color: var(--ink-faint); }
.ps-empty { margin: 0; font-size: .88rem; color: var(--ink-faint); }
.ps-note { margin: 0 0 .6rem; font-size: .9rem; line-height: 1.55; color: var(--ink-soft); }
.ps-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.ps-chip { font-size: .76rem; padding: .2rem .6rem; border-radius: var(--r-pill); background: var(--brass-soft); color: var(--brass-ink); }
.ps-prose { margin-top: .6rem; }
.ps-prose b { display: block; font-size: .78rem; font-weight: 600; color: var(--ink); }
.ps-prose p { margin: .15rem 0 0; font-size: .88rem; line-height: 1.5; color: var(--ink-soft); }
.ps-rels, .ps-hw { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.ps-rels li { display: grid; grid-template-columns: auto 1fr; column-gap: .5rem; align-items: baseline; font-size: .88rem; }
.ps-rels b { font-weight: 600; }
.ps-q { font-size: .76rem; color: var(--brass-ink); }
.ps-rels small { grid-column: 1 / -1; font-size: .78rem; color: var(--ink-faint); line-height: 1.4; }
.ps-hw li { font-size: .88rem; line-height: 1.5; color: var(--ink-soft); padding-left: .8rem; border-left: 2px solid var(--line); }

@media (max-width: 720px) {
  .ssd-grid, .ps-body { grid-template-columns: 1fr; }
  .ss-headline { font-size: 1.5rem; }
  .ps-titles h2 { font-size: 1.8rem; }
  .ms-row { grid-template-columns: minmax(0, 1fr) 96px 3rem; }
}

#end-dialog { width: min(900px, calc(100vw - 1.5rem)); }

/* measures with partial steps */
.ms-track { position: relative; }
.ms-track i { background: linear-gradient(to right, var(--c, var(--ink-soft)) calc(var(--f, 0) * 100%), var(--line-soft) 0); }
.ms-track.inverse i { background: linear-gradient(to right, color-mix(in srgb, var(--c, var(--ink-soft)) 55%, var(--tense)) calc(var(--f, 0) * 100%), var(--line-soft) 0); }
.ms-track .ms-was {
  position: absolute; top: -3px; bottom: -3px; left: calc(var(--at) * 100%); width: 2px; margin-left: -1px;
  border-radius: 1px; background: var(--ink); opacity: .55;
}
.ssd-legend .lg-was { width: 2px; height: 12px; border-radius: 1px; background: var(--ink); opacity: .55; box-shadow: none; margin-left: .6rem; }

/* ================= training ================= */
/* the Training page */
#view-training { padding-top: .25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tr-kicker, .pp-kicker, .ts-kicker { font-size: .72em; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-ink); font-weight: 600; }
/* one screen: the steps on the left, the chosen step on the right; nothing scrolls the page */
.tr-body {
  flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(260px, 22vw, 320px) minmax(0, 1fr);
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden;
}
.tr-nav { position: relative; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line-soft); padding: 1.1em .7em .8em; }
.tr-nav-head { padding: 0 .55em .8em; }
.tr-nav-head h2 { font-size: 1.65em; margin-top: .2em; }
.tr-with { display: flex; flex-wrap: wrap; align-items: center; gap: .3em .7em; font-size: .8em; color: var(--ink-soft); margin: .55em 0 0; }
.tr-with .who { display: inline-flex; align-items: center; gap: .3em; color: var(--ink); }
.tr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; }
.tr-row {
  width: 100%; display: flex; align-items: center; gap: .65em; text-align: left; font: inherit; color: var(--ink-soft);
  background: none; border: 1px solid transparent; border-radius: var(--r-sm); padding: .45em .55em; cursor: pointer;
}
.tr-row:hover { background: var(--panel-2); }
.tr-row.on { background: var(--panel-2); border-color: var(--line); color: var(--ink); }
.tr-num { width: 1.6em; height: 1.6em; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .78em; border: 1.5px solid var(--line); background: var(--panel-2); color: var(--ink-soft); }
.tr-row.done .tr-num { background: var(--brass); border-color: var(--brass); color: var(--primary-ink); }
.tr-row-text { display: flex; flex-direction: column; min-width: 0; }
.tr-row-title { font-size: .92em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-row.on .tr-row-title { font-weight: 600; }
.tr-row-meta { font-size: .74em; color: var(--ink-faint); }
.tr-row-meta b { color: var(--brass-ink); font-weight: 600; }
.tr-nav-foot { display: flex; gap: .4em; padding: .7em .55em 0; border-top: 1px solid var(--line-soft); margin-top: .5em; }
.tr-nav-foot .btn { flex: 1; }
.tr-nav-foot .btn.on { border-color: var(--brass); }
.tr-pop {
  position: absolute; left: .9em; right: .9em; bottom: 3.6em; z-index: 5; max-height: 60%; overflow-y: auto;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: .8em .9em; box-shadow: 0 14px 30px -18px rgba(0,0,0,.4);
}
.tr-pop h4 { font-family: var(--sans); font-size: .82em; font-weight: 600; margin: 0 0 .35em; }
.tr-pop ul { margin: 0; padding-left: 1.1em; font-size: .86em; }
.tr-pop ul li { margin: .15em 0; }
.tr-skill-group { margin-top: .5em; }
.tr-skill-group h5 { font-family: var(--sans); font-size: .7em; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 .15em; font-weight: 600; }
.tr-skill-group ul { list-style: none; padding: 0; }
.tr-skill-group li { display: flex; justify-content: space-between; gap: .5em; font-size: .82em; }
.tr-skill-group li small { margin: 0; white-space: nowrap; }
.tr-skill-group li.soon { color: var(--ink-faint); }
.tr-skill-group li.ready { font-weight: 600; }
.tr-skill-group li.ready small { color: var(--brass-ink); }

.tr-detail { display: flex; flex-direction: column; min-height: 0; background: var(--panel-2); }
.td-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: clamp(1em, 2vw, 1.7em) clamp(1.2em, 3vw, 2.6em) .9em; display: flex; flex-direction: column; gap: .7em; }
.td-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 1em 2em; align-items: start; }
.td-grid > .td-resume, .td-grid > .td-settings { grid-column: 1 / -1; }
.td-resume { display: flex; align-items: center; gap: .6em; flex-wrap: wrap; background: var(--brass-soft); color: var(--brass-ink); border-radius: var(--r-md); padding: .5em .8em; font-size: .88em; }
.td-kicker { font-size: .78em; color: var(--ink-faint); }
.td-title { font-size: clamp(1.8em, 2.6vw, 2.5em); margin-top: -.1em; }
.td-blurb { margin: 0; font-size: 1em; color: var(--ink-soft); max-width: 62ch; }
.td-sec h4, .td-referral h4 { font-family: var(--sans); font-size: .72em; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 .4em; font-weight: 600; }
.td-sec p { margin: 0; font-size: .92em; max-width: 62ch; }
.td-sec .hint { margin-top: .45em; }
.td-referral { background: var(--brass-soft); color: var(--brass-ink); border-radius: var(--r-md); padding: .7em .9em; max-width: 70ch; }
.td-referral h4 { color: var(--brass-ink); }
.td-referral p { margin: 0; font-size: .9em; }
.td-seed { border-left: 2px solid var(--brass); padding-left: .8em; max-width: 62ch; }
.td-seed p { margin: .15em 0; font-size: .92em; }
.td-chips { display: flex; flex-wrap: wrap; gap: .35em; }
.td-chip { font-size: .82em; border: 1px solid var(--line); border-radius: var(--r-pill); padding: .2em .7em; background: var(--panel); }
.td-settings { display: flex; flex-wrap: wrap; gap: .9em 1.6em; align-items: center; padding-top: .3em; }
.td-setting { display: flex; align-items: center; gap: .6em; flex-wrap: wrap; margin: 0; }
.td-setting select { width: auto; padding: .35em .6em; font-size: .86em; }
.td-label { font-size: .72em; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.td-mode-note { margin: 0; font-size: .78em; color: var(--ink-faint); flex-basis: 100%; }
.td-vars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6em; max-width: 760px; }
.td-var { font: inherit; text-align: left; border: 1px solid var(--line); border-radius: var(--r-md); padding: .7em .8em; background: var(--panel); cursor: pointer; color: var(--ink); }
.td-var:hover { border-color: var(--brass); }
.td-var b { display: block; }
.td-var small { display: block; margin: .2em 0 0; font-size: .82em; color: var(--ink-soft); }
.td-foot { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .85em clamp(1.2em, 3vw, 2.6em); border-top: 1px solid var(--line-soft); }
.td-status { font-size: .84em; color: var(--ink-faint); display: flex; flex-direction: column; }
.td-status small { margin: 0; color: var(--ink-soft); }
.td-foot .btn.primary { padding-left: 1.8em; padding-right: 1.8em; }
@media (max-width: 720px) {
  .tr-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .tr-nav { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: .7em .5em .5em; }
  .tr-nav-head { padding-bottom: .5em; }
  .tr-nav-head h2 { font-size: 1.3em; }
  .tr-with { display: none; }
  .tr-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; flex: none; }
  .tr-list li { flex: none; }
  .tr-row-meta { display: none; }
  .tr-nav-foot { display: none; }
}

/* the room during practice: the panel takes the setup column */
.session-grid.practicing { grid-template-columns: clamp(260px, 19vw, 360px) minmax(0, 1fr) clamp(320px, 23vw, 470px); }
.session-grid.practicing.transcript-collapsed { grid-template-columns: clamp(260px, 19vw, 360px) minmax(0, 1fr) 48px; }
.session-grid.practicing .setup > :not(.practice-panel) { display: none; }
@media (max-width: 1000px) { .session-grid.practicing, .session-grid.practicing.transcript-collapsed { grid-template-columns: 250px minmax(0, 1fr); } }
@media (max-width: 720px) {
  .session-grid.practicing, .session-grid.practicing.transcript-collapsed { grid-template-columns: minmax(0, 1fr); }
  .practice-panel { min-height: 0; }
  .pp-map { height: 120px; }
}
.practice-panel { display: flex; flex-direction: column; gap: .9em; min-height: 100%; }
.pp-head h3 { font-size: 1.45em; margin-top: .15em; }
.pp-var { margin: .3em 0 0; font-size: .8em; color: var(--brass-ink); }
.pp-status { margin: .35em 0 0; font-size: .82em; color: var(--ink-soft); }
.pp-referral { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: .45em .7em; font-size: .86em; }
.pp-referral summary { cursor: pointer; font-weight: 600; font-size: .82em; }
.pp-referral p { margin: .4em 0 .1em; color: var(--ink-soft); }
.pp-sec h4, .db-sec h4, .ts-sec h4 { font-family: var(--sans); font-size: .74em; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 .4em; font-weight: 600; }
.pp-text { margin: 0; font-size: .88em; color: var(--ink-soft); }
.pp-goals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45em; }
.pp-goals li { display: grid; grid-template-columns: 1.15em minmax(0, 1fr); gap: .5em; font-size: .88em; line-height: 1.4; }
.pp-dot { width: 1.15em; height: 1.15em; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: .7em; margin-top: .05em; transition: background .3s ease, border-color .3s ease; }
.pp-goals li.met .pp-dot { background: var(--brass); border-color: var(--brass); color: var(--primary-ink); }
.pp-met { display: block; margin: .15em 0 0; color: var(--brass-ink); font-size: .78em; }
.pp-help { display: flex; flex-wrap: wrap; gap: .4em; }
.pp-nudge { margin: .55em 0 0; font-family: var(--serif); font-style: italic; font-size: 1.02em; color: var(--brass-ink); background: var(--brass-soft); border-radius: var(--r-sm); padding: .5em .7em; }
.pp-explain { margin-top: .55em; }
.pp-map-head { display: flex; align-items: center; justify-content: space-between; gap: .4em; flex-wrap: wrap; }
.pp-map-head h4 { margin: 0; }
.pp-toggle { margin: 0; font-size: .78em; }
.pp-map { height: 150px; margin-top: .4em; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .3em; }
.pp-map.lit .node.selected, .pp-map.lit .g-tri-group.selected { animation: lit 1.6s ease-in-out 2; }
@keyframes lit { 50% { opacity: .45; } }
.pp-lasttag { margin: .4em 0 0; font-size: .82em; color: var(--ink-soft); }
.pp-actions { margin-top: auto; display: flex; flex-direction: column; gap: .45em; padding-top: .4em; }
.pp-actions .btn { width: 100%; }
.pp-minor { display: flex; justify-content: space-between; }

/* patterns named in the transcript and in the room */
.t-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.tag-chip { display: inline-flex; gap: .35rem; align-items: baseline; font-size: .76rem; line-height: 1.3; border-radius: var(--r-pill); padding: .15rem .6rem; background: var(--panel); border: 1px solid color-mix(in srgb, var(--brass) 45%, var(--line)); color: var(--ink-soft); }
.tag-chip b { color: var(--brass-ink); font-weight: 600; }
.tag-chip.k-reveal { background: color-mix(in srgb, var(--calm) 22%, var(--panel)); border-color: var(--calm); }
.tag-chip.k-goal { background: var(--panel-2); }
.t-entry.demo { background: color-mix(in srgb, var(--calm) 18%, var(--panel)); color: var(--ink); }
.t-entry.demo .t-who { color: var(--ink); }
.t-teach { margin: .35rem 0 0; font-size: .82rem; color: var(--ink-soft); }
.t-teach b { font-weight: 600; color: var(--ink); }
.t-entry.flash { animation: flash 1.8s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px var(--brass); } 100% { box-shadow: 0 0 0 3px transparent; } }
.pattern-toast {
  position: absolute; left: 50%; top: 3.5%; transform: translateX(-50%); z-index: 8; max-width: 82%;
  display: flex; gap: .5rem; align-items: baseline; color: var(--cream); background: rgba(20, 27, 26, .86);
  border: 1px solid rgba(210, 171, 102, .55); padding: .35rem 1rem; border-radius: var(--r-pill); font-size: .9rem;
  animation: toast-in .4s ease; pointer-events: none;
}
.pattern-toast b { color: #e2c48b; font-weight: 600; white-space: nowrap; }
.pattern-toast span { font-family: var(--serif); font-style: italic; font-size: 1.05rem; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -6px); } }

/* watching instead of typing */
.composer.watching .composer-row, .composer.watching #addressing, .composer.watching #suggest-btn, .composer.watching #continue-btn { display: none; }
.watch-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .65rem .8rem; }
.wb-note { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* the training sheet */
.train-sheet { width: min(640px, calc(100vw - 1.5rem)); }
.train-sheet.wide { width: min(880px, calc(100vw - 1.5em)); }
.ts-box { display: flex; flex-direction: column; max-height: calc(100vh - 1.5em); }
.ts-head { align-items: flex-start; gap: 1em; }
.ts-titles h2 { margin-top: .2em; }
.ts-body { display: flex; flex-direction: column; gap: 1.1em; }
.ts-intro { margin: 0; font-size: 1em; color: var(--ink-soft); max-width: 66ch; }
.ts-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1em 1.4em; }
.ts-list { margin: 0; padding-left: 1.1em; font-size: .9em; }
.ts-list li { margin: .25em 0; }
.ts-lenses { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .45em 1em; margin: 0; font-size: .9em; }
.ts-lenses dt { font-weight: 600; }
.ts-lenses dd { margin: 0; color: var(--ink-soft); }
.ts-referral { background: var(--brass-soft); color: var(--brass-ink); border-radius: var(--r-md); padding: .75em .95em; }
.ts-referral h4 { margin: 0 0 .3em; font-family: var(--sans); font-size: .74em; letter-spacing: .06em; text-transform: uppercase; }
.ts-referral p { margin: 0; font-size: .92em; }
.ts-seed { border-left: 2px solid var(--brass); padding-left: .8em; }
.ts-seed p { margin: .2em 0; font-size: .92em; }
.ts-modes { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.ts-modes legend { font-size: .74em; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; margin-bottom: .4em; padding: 0; }
.ts-mode { display: flex; gap: .55em; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r-md); padding: .7em .8em; cursor: pointer; background: var(--panel-2); }
.ts-mode:has(input:checked) { border-color: var(--brass); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brass) 25%, transparent); }
.ts-mode input { width: auto; margin-top: .25em; accent-color: var(--brass); }
.ts-mode b { display: block; }
.ts-mode small { display: block; margin: .15em 0 0; font-size: .82em; color: var(--ink-soft); }
.ts-variation { margin: 0; }
.ts-reflect { min-height: 8em; }
.ts-vars { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.ts-var { font: inherit; text-align: left; border: 1px solid var(--line); border-radius: var(--r-md); padding: .7em .8em; background: var(--panel-2); cursor: pointer; color: var(--ink); }
.ts-var:hover { border-color: var(--brass); }
.ts-var b { display: block; }
.ts-var small { display: block; margin: .2em 0 0; font-size: .82em; color: var(--ink-soft); }
.ts-journal, .ts-entries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8em; }
.ts-journal p { margin: 0 0 .3em; font-family: var(--serif); font-style: italic; font-size: 1.05em; }
.ts-entries li { border-left: 2px solid var(--line); padding-left: .8em; }
.ts-entries p { margin: .15em 0 0; font-size: .9em; }
.ts-entries small { margin: 0; }
.ts-entry-prompt { color: var(--ink-faint); font-style: italic; }
@media (max-width: 720px) { .ts-cols, .ts-modes, .ts-vars { grid-template-columns: 1fr; } }

/* the feedback */
.db-opening { margin: 0; font-family: var(--serif); font-size: 1.3rem; line-height: 1.35; max-width: 62ch; }
.db-sec { display: flex; flex-direction: column; gap: .45em; }
.db-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7em; }
.db-card { border-radius: var(--r-md); padding: .8em .95em; border: 1px solid var(--line-soft); background: var(--panel-2); display: flex; flex-direction: column; gap: .35em; }
.db-card.good { background: color-mix(in srgb, var(--calm) 16%, var(--panel-2)); border-color: color-mix(in srgb, var(--calm) 55%, var(--line-soft)); }
.db-card.try { background: var(--brass-soft); border-color: color-mix(in srgb, var(--brass) 40%, var(--line-soft)); color: var(--brass-ink); }
.db-card h5 { margin: 0; font-size: .98em; font-weight: 600; }
.db-card p { margin: 0; font-size: .9em; }
.db-card .link-btn { align-self: flex-start; }
.db-try { margin: .1em 0; font-family: var(--serif); font-size: 1.12em; line-height: 1.35; color: var(--ink); }
.db-card p.db-why { font-size: .84em; opacity: .85; }
.db-card-actions { display: flex; align-items: center; gap: .8em; flex-wrap: wrap; margin-top: .2em; }
.db-goals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55em; }
.db-goals li { display: grid; grid-template-columns: 1.6em minmax(0, 1fr); gap: .55em; }
.db-gicon { width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; font-size: .85em; border: 1.5px solid var(--line); color: var(--ink-soft); }
.db-goals li.st-did .db-gicon { background: var(--brass); border-color: var(--brass); color: var(--primary-ink); }
.db-goals li.st-started .db-gicon { border-color: var(--brass); color: var(--brass-ink); }
.db-goals b { font-weight: 600; font-size: .92em; }
.db-gstatus { display: inline-block; margin-left: .5em; color: var(--brass-ink); font-size: .78em; }
.db-goals p { margin: .1em 0 0; font-size: .88em; color: var(--ink-soft); }
.db-quote { margin: 0; border-left: 2px solid var(--line); padding-left: .8em; font-style: italic; color: var(--ink-soft); font-size: .9em; white-space: pre-wrap; }
.db-answer { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .7em .9em; }
.db-answer p { margin: .25em 0 0; font-size: .9em; }
.db-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55em; }
.db-facts li { border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .6em .8em; background: var(--panel-2); }
.db-facts li.out { border-color: color-mix(in srgb, var(--calm) 60%, var(--line-soft)); }
.db-fact-top { display: flex; justify-content: space-between; gap: .5em; align-items: baseline; }
.db-fact-tag { font-size: .76em; color: var(--ink-faint); }
.db-facts li.out .db-fact-tag { color: var(--ink); font-weight: 600; }
.db-facts p { margin: .2em 0 0; font-size: .9em; }
.db-facts small { display: block; margin: .3em 0 0; font-size: .82em; color: var(--ink-soft); }
.db-prompt { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.1em; }
.db-journal-row { display: flex; align-items: center; gap: .6em; margin-top: .35em; }
.db-journal-row small { margin: 0; }
.db-saved { font-size: .8em; color: var(--brass-ink); }
.db-next { margin: 0; font-size: .92em; color: var(--ink-soft); border-top: 1px solid var(--line-soft); padding-top: .8em; }
.db-moves { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: .8em; }
.db-move-text { margin: 0; font-family: var(--serif); font-size: 1.1em; }
.db-move-note { margin: .2em 0 .2em; font-size: .9em; color: var(--ink-soft); }

/* training text scales with one base size, set by the page to the largest that fits without scrolling */
.tr-body { font-size: 16px; }
.practice-panel { font-size: 15px; }
.train-sheet { font-size: clamp(16px, min(1.3vw, 2.4vh), 24px); }
.train-sheet.wide { width: min(1320px, calc(100vw - 2rem)); }
.train-sheet { width: min(900px, calc(100vw - 2rem)); }
.train-sheet h2 { font-size: 2em; }
.td-title { font-size: 2.3em; }
.tr-nav-head h2 { font-size: 1.6em; }
.pp-head h3 { font-size: 1.5em; }
:is(.tr-body, .practice-panel, .train-sheet) .btn { font-size: .95em; }
:is(.tr-body, .practice-panel, .train-sheet) .btn.small { font-size: .85em; padding: .4em .9em; }
:is(.tr-body, .practice-panel, .train-sheet) .hint { font-size: .85em; }
:is(.tr-body, .practice-panel, .train-sheet) .link-btn { font-size: .85em; }
:is(.tr-body, .practice-panel, .train-sheet) .segmented button { font-size: .85em; padding: .35em .9em; }
:is(.tr-body, .practice-panel, .train-sheet) select, :is(.practice-panel, .train-sheet) textarea { font-size: .95em; }
:is(.tr-body, .practice-panel) .check { font-size: .85em; }
.practice-panel .coach { font-size: .92em; }
.tr-with .mini { width: 1.7em; height: 1.7em; }
.session-grid.practicing { grid-template-columns: clamp(280px, 24vw, 520px) minmax(0, 1fr) clamp(320px, 23vw, 470px); }
.session-grid.practicing.transcript-collapsed { grid-template-columns: clamp(280px, 24vw, 520px) minmax(0, 1fr) 48px; }
@media (max-width: 1000px) { .session-grid.practicing, .session-grid.practicing.transcript-collapsed { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 720px) { .session-grid.practicing, .session-grid.practicing.transcript-collapsed { grid-template-columns: minmax(0, 1fr); } }
.tr-body { grid-template-columns: clamp(270px, 28%, 600px) minmax(0, 1fr); }
.tr-with { gap: .25em; margin-top: .45em; flex-wrap: nowrap; }
.tr-with .mini { width: 1.35em; height: 1.35em; }
.tr-row { padding: .32em .5em; }
.tr-nav-head { padding-bottom: .55em; }
@media (max-width: 720px) { .tr-body { grid-template-columns: minmax(0, 1fr); } }
.tr-body { grid-template-columns: clamp(270px, 24%, 520px) minmax(0, 1fr); }
.tr-detail { line-height: 1.42; }
.td-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16em), 1fr)); gap: .8em 1.8em; }
.td-chip { padding: .15em .65em; }
.td-chips { gap: .3em; }
.td-sec h4, .td-referral h4 { margin-bottom: .3em; }
@media (max-width: 720px) { .tr-body { grid-template-columns: minmax(0, 1fr); } }
.td-foot .td-settings { margin-left: auto; padding: 0; gap: .4em 1.4em; flex-wrap: nowrap; }
.td-foot .td-setting { flex-wrap: nowrap; }
.td-foot .td-mode-note { display: none; }
.td-foot .td-status { flex: 0 1 auto; min-width: 0; }

/* ---------- the step panels: each fills the space it has ---------- */
.td-scroll { gap: .55em; }
.td-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .9em; margin-top: .3em; }
.td-two { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4em; align-items: stretch; }
.td-idea { margin: 0; font-family: var(--serif); font-size: 1.55em; line-height: 1.25; max-width: 30em; border-left: 3px solid var(--brass); padding-left: .7em; }

/* pictures of people with labelled lines */
.td-pic { position: relative; min-height: 9em; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.pic-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.pl { stroke-width: 3; }
.pl.tension { stroke: var(--reactive); stroke-dasharray: 8 6; }
.pl.pull { stroke: var(--brass); }
.pl.outside { stroke: var(--ink-faint); stroke-width: 1.6; stroke-dasharray: 3 6; }
.pl.unknown { stroke: var(--line); stroke-width: 2; stroke-dasharray: 6 6; }
.pic-label { position: absolute; transform: translate(-50%, -50%); font-size: .82em; padding: .1em .55em; border-radius: var(--r-pill); background: var(--panel); white-space: nowrap; }
.pic-label.tension { color: var(--reactive); }
.pic-label.pull { color: var(--brass-ink); font-weight: 600; }
.pic-label.outside { color: var(--ink-faint); }
.pic-label.unknown { color: var(--brass-ink); font-weight: 600; font-size: 1.05em; }
.pic-person { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: .25em; }
.pic-person .mini { width: 3.4em; height: 3.4em; }
.pic-name { font-size: .85em; font-weight: 600; white-space: nowrap; background: var(--panel); border-radius: 6px; padding: 0 .3em; }
.pic-unknown { width: 2.8em; height: 2.8em; border-radius: 50%; border: 2px dashed var(--ink-faint); display: grid; place-items: center; font-size: 1.2em; color: var(--ink-faint); background: var(--panel-2); }

/* learn: step through */
.td-stage { display: flex; flex-direction: column; gap: .5em; min-width: 0; }
.td-step-of { font-size: .8em; letter-spacing: .06em; text-transform: uppercase; color: var(--brass-ink); font-weight: 600; }
.td-stage h3 { font-size: 1.7em; }
.td-stage p { margin: 0; font-size: 1.05em; color: var(--ink-soft); line-height: 1.5; }
.td-stepper { margin-top: auto; display: flex; align-items: center; gap: .8em; }
.td-dots { display: flex; gap: .4em; }
.td-dots i { width: .6em; height: .6em; border-radius: var(--r-pill); background: var(--line); transition: width .2s ease; }
.td-dots i.on { width: 1.6em; background: var(--brass); }
.td-qs { list-style: none; margin: .4em 0 0; padding: 0; display: flex; flex-direction: column; gap: .5em; font-size: 1.05em; }
.td-qs li { display: flex; align-items: center; gap: .6em; }
.td-qs li span { width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--brass); color: var(--brass-ink); font-weight: 600; flex: none; }

/* watch: predict first */
.td-seed.big { max-width: none; }
.td-seed.big p { font-size: 1.05em; margin: .3em 0; }
.td-predict { display: flex; flex-direction: column; gap: .4em; min-height: 0; }
.td-predict label h4 { margin: 0; }
.td-predict textarea { flex: 1; min-height: 4.5em; font-size: 1.05em; resize: none; border-radius: var(--r-md); }

/* drill: the challenge */
.td-challenge { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .9em 1.1em; display: flex; flex-direction: column; gap: .25em; }
.td-ch-lead { margin: 0; font-size: .95em; color: var(--ink-soft); }
.td-ch-quote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.75em; line-height: 1.2; }
.td-ch-task { margin: .3em 0 0; font-size: 1.1em; font-weight: 500; }
.td-tiles { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8em; }
.td-tile { border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--panel); padding: .9em 1em; display: flex; flex-direction: column; justify-content: center; gap: .6em; font-size: 1.02em; line-height: 1.35; }
.td-icon { display: inline-grid; width: 1.9em; height: 1.9em; color: var(--brass); flex: none; }
.td-icon svg { width: 100%; height: 100%; }

/* full session: the map, and goals you can tap */
.td-session { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1.4em; }
.td-mapbox { display: flex; flex-direction: column; gap: .5em; min-height: 0; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .7em; }
.td-map { flex: 1; min-height: 8em; height: auto; width: 100%; }
.td-map.focus .node:not(.selected), .td-map.focus .g-emotions, .td-map.focus .g-triangles { opacity: .22; transition: opacity .2s ease; }
.td-map .node.selected { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--brass) 70%, transparent)); }
.hidden-badge { fill: var(--ink); }
.hidden-badge-q { fill: var(--panel-2); font-family: var(--sans); font-weight: 700; }
.td-map.focus .hidden-badge, .td-map.focus .hidden-badge-q { display: none; }
.td-map-note { margin: 0; font-size: .9em; color: var(--ink-soft); line-height: 1.4; min-height: 2.8em; }
.td-map-note.on { color: var(--brass-ink); font-weight: 600; }
.td-referral-mini { font-size: .88em; border-top: 1px solid var(--line-soft); padding-top: .4em; }
.td-referral-mini summary { cursor: pointer; font-weight: 600; color: var(--brass-ink); }
.td-referral-mini p { margin: .3em 0 0; color: var(--ink-soft); }
.td-goals { display: flex; flex-direction: column; gap: .5em; min-height: 0; }
.td-goals-head { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: .6em; flex-wrap: wrap; }
.td-goals-head b { font-size: .78em; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.td-goals-head span { font-size: .82em; color: var(--brass-ink); }
.td-goal {
  flex: 1; display: flex; align-items: center; gap: .8em; width: 100%; text-align: left; font: inherit; font-size: 1em; line-height: 1.3;
  color: var(--ink); background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: .55em .9em; cursor: pointer;
  box-shadow: 0 2px 0 var(--line); transition: border-color .15s, background-color .15s, transform .1s, box-shadow .1s;
}
.td-goal:hover { border-color: var(--brass); }
.td-goal:active { transform: translateY(2px); box-shadow: 0 0 0 var(--line); }
.td-goal.on { background: var(--brass-soft); border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 30%, transparent); color: var(--brass-ink); }
.td-goal-text { flex: 1; }
.td-goal-mark { width: 1.5em; height: 1.5em; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: .85em; flex: none; }
.td-goal.on .td-goal-mark { background: var(--brass); border-color: var(--brass); color: var(--primary-ink); }
.td-goal.on .td-icon { color: var(--brass-ink); }

/* harder versions */
.td-harder { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13em), 1fr)); gap: .9em; }
.td-hcard { border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--panel); padding: .9em 1em; display: flex; flex-direction: column; gap: .5em; }
.td-hcard h3 { font-size: 1.35em; }
.td-h-change { margin: 0; font-size: .95em; color: var(--ink-soft); line-height: 1.45; }
.td-h-problem { background: var(--brass-soft); color: var(--brass-ink); border-radius: var(--r-sm); padding: .55em .7em; }
.td-h-problem b { font-size: .75em; letter-spacing: .06em; text-transform: uppercase; }
.td-h-problem p { margin: .2em 0 0; font-size: .95em; line-height: 1.4; }
.td-h-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: .5em; }

/* observing: mark the roles */
.ob-row { display: flex; flex-direction: column; gap: .45em; }
.ob-q { font-weight: 600; font-size: 1.05em; }
.ob-faces { display: flex; flex-wrap: wrap; gap: .5em; }
.ob-face { font: inherit; display: inline-flex; align-items: center; gap: .5em; padding: .4em .9em .4em .45em; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--panel); cursor: pointer; color: var(--ink); }
.ob-face:hover { border-color: var(--brass); }
.ob-face[aria-pressed="true"] { background: var(--brass-soft); border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 30%, transparent); color: var(--brass-ink); font-weight: 600; }
.ob-face .mini { width: 1.8em; height: 1.8em; }
.ob-text { display: flex; flex-direction: column; gap: .4em; }
.ob-qq { font-family: var(--serif); font-size: 1.3em; line-height: 1.2; overflow-wrap: anywhere; }
.ob-ans { min-height: 3.4em; }
.db-bigidea { background: color-mix(in srgb, #8a6aa8 10%, var(--panel)); border: 1px solid color-mix(in srgb, #8a6aa8 35%, var(--line)); border-radius: var(--r-md); padding: .8em 1em; font-size: 1.02em; line-height: 1.5; }
.db-qa { display: flex; flex-direction: column; gap: .45em; margin-top: .9em; }
.db-qa-q { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.3em; line-height: 1.2; overflow-wrap: anywhere; }
.db-qa-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5em; }
.db-qa-you, .db-qa-real { border-radius: var(--r-md); padding: .55em .8em; overflow-wrap: anywhere; }
.db-qa-you { background: var(--panel); border: 1px solid var(--line); margin-top: .6em; }
.db-qa-pair .db-qa-you { margin-top: 0; }
.db-qa-real { background: color-mix(in srgb, #8a6aa8 10%, var(--panel)); border: 1px solid color-mix(in srgb, #8a6aa8 35%, var(--line)); }
.db-qa-lab { display: block; font-family: var(--serif); font-size: 1.05em; color: var(--ink-soft); }
.db-qa-you p, .db-qa-real p { margin: .2em 0 0; line-height: 1.45; }
.db-ai { border-left: 3px solid var(--brass); padding: .2em .8em; margin: .5em 0 0; color: var(--ink-soft); }
@media (max-width: 720px) { .db-qa-pair { grid-template-columns: minmax(0, 1fr); } }
.db-maps { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
.db-maps figure { margin: 0; display: flex; flex-direction: column; gap: .3em; }
.db-maps .td-pic { height: 15em; }
.db-maps figcaption { text-align: center; font-weight: 600; color: var(--ink-soft); }
.db-maps-note { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); }
.db-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
.db-compare figure { margin: 0; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .8em 1em; }
.db-compare figure:last-child { background: var(--brass-soft); color: var(--brass-ink); }
.db-compare figcaption { font-size: .75em; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.db-compare p { margin: .3em 0; font-family: var(--serif); font-size: 1.2em; line-height: 1.35; }
.db-compare small { margin: 0; color: inherit; opacity: .9; }

@media (max-width: 1000px) {
  .td-two, .td-session { grid-template-columns: minmax(0, 1fr); }
  .td-tiles { grid-template-columns: minmax(0, 1fr); }
  .td-pic { min-height: 12em; }
}
@media (max-width: 720px) { .db-maps, .db-compare { grid-template-columns: 1fr; } }
.td-h-main { display: flex; flex-direction: column; gap: .5em; }
@media (max-width: 720px) {
  .td-body, .td-two, .td-session, .td-tiles, .td-harder, .td-goal, .td-map, .td-predict textarea { flex: none; }
  .td-mapbox { min-height: 17em; }
  .td-map { height: 13em; }
  .td-pic { height: 14em; }
  .td-foot { flex-wrap: wrap; gap: .6em; }
  .td-foot .td-settings { margin-left: 0; order: 3; width: 100%; }
  .td-status small { display: none; }
}
:is(.tr-body, .practice-panel) .segmented button { white-space: nowrap; }

/* Progress bar on the waiting screens (session notes, the week at home, training feedback). */
.wait-bar { width: min(22rem, 80%); height: .55rem; margin: 1rem auto .7rem; background: var(--line-soft); border-radius: var(--r-pill); overflow: hidden; }
.wait-fill { display: block; height: 100%; width: 0; background: var(--brass); border-radius: inherit; transition: width .25s linear; }
@media (prefers-reduced-motion: reduce) { .wait-fill { transition: none; } }

/* "Since last session" in the room: labelled parts, whole sentences, homework as a list. */
.room-hint.since { max-height: 74%; overflow: auto; }
.room-hint .hint-label { display: block; font-family: var(--sans); font-style: normal; font-weight: 600; font-size: .6em; letter-spacing: .09em; text-transform: uppercase; opacity: .7; margin-bottom: .25rem; }
.room-hint .hint-week { display: block; }
.room-hint .hint-more { font-family: var(--sans); font-style: normal; font-size: .72em; opacity: .7; }
.room-hint .hint-hw { margin-top: .7rem; }
.room-hint .hint-hw ul { margin: 0; padding-left: 1.1em; text-align: left; }
.room-hint .hint-hw li { margin-bottom: .3rem; }
.room-hint .hint-hw li b { font-weight: 600; }
.room .room-hint.since { width: min(92%, calc(720px * var(--s, 1))); max-width: min(92%, calc(720px * var(--s, 1))); top: 4%; }
.room-hint.since .hint-week { font-size: .92em; }
.room-hint.since .hint-hw { font-size: .78em; }

/* ---------- Sessions screen: clients on the left, the picked client's sessions on the right ---------- */
.ss { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(16rem, 34%) minmax(0, 1fr); gap: 1.2rem; font-size: clamp(16px, 1.15vw, 20px); }
.ss-left, .ss-right { min-height: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 1.1em 1.2em; }
.ss-right { overflow: auto; gap: 1em; }
.ss-head, .ss-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap; }
.ss h2 { font-family: var(--serif); font-weight: 400; font-size: 2em; line-height: 1.05; margin: 0; }
.ss .btn { font-size: 1em; }
.ss .hint { margin: .2em 0 0; color: var(--ink-soft); font-size: .95em; }
.ss-filters { display: flex; flex-direction: column; gap: .6em; margin: 1em 0 .8em; }
.ss-search, .ss-pick { font: inherit; font-size: 1em; padding: .55em .8em; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-2); color: var(--ink); width: 100%; }
.ss-chips { display: flex; gap: .4em; flex-wrap: wrap; }
.ss-chip { font: inherit; font-size: .92em; padding: .35em .9em; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; }
.ss-chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.ss-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: .45em; padding-right: .2em; }
.ss-client { text-align: left; font: inherit; display: flex; flex-direction: column; gap: .1em; padding: .7em .9em; border-radius: var(--r-md); border: 1.5px solid transparent; background: var(--panel-2); color: var(--ink); cursor: pointer; }
.ss-client b { font-size: 1.08em; font-weight: 600; }
.ss-client span { color: var(--ink-soft); font-size: .9em; }
.ss-client em { font-style: normal; font-size: .8em; font-weight: 600; color: var(--brass-ink); }
.ss-client:hover { border-color: var(--line); }
.ss-client.sel { border-color: var(--brass); background: var(--brass-soft); }
.ss-map { background: var(--panel-2); border-radius: var(--r-md); padding: .8em 1em; display: flex; flex-direction: column; gap: .5em; overflow-x: auto; }
.ss-dotrow { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); align-items: center; gap: .6em; }
.ss-dotlabel { font-size: .78em; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.ss-dots { display: flex; align-items: center; }
.ss-dot { flex: none; width: 2.2em; height: 2.2em; border-radius: 50%; border: 2px solid var(--primary); background: var(--panel-2); color: var(--ink); font: inherit; font-weight: 700; font-size: .95em; cursor: pointer; display: grid; place-items: center; padding: 0; }
.ss-dot.on { background: var(--primary); color: var(--primary-ink); }
.ss-dot.next { border-style: dashed; color: var(--brass-ink); border-color: var(--brass); }
.ss-dot.faded { border-color: var(--ink-faint); color: var(--ink-faint); border-style: dashed; }
.ss-dot.faded.on { background: var(--ink-faint); color: var(--panel-2); }
.ss-dot.ghost { visibility: hidden; cursor: default; }
.ss-link { flex: none; width: 1.4em; height: 2px; background: var(--primary); }
.ss-link.dashed { background: none; border-top: 2px dashed var(--brass); }
.ss-link.faded { background: none; border-top: 2px dashed var(--ink-faint); }
.ss-gap { flex: none; width: 1.4em; }
.ss-sessions { display: flex; flex-direction: column; gap: .7em; }
.ss-session { background: var(--panel-2); border: 1.5px solid var(--line-soft); border-radius: var(--r-md); padding: .8em 1em; }
.ss-session.focus { border-color: var(--brass); }
.ss-session.earlier { opacity: .85; border-style: dashed; }
.ss-s-top { display: flex; justify-content: space-between; gap: .8em; flex-wrap: wrap; align-items: baseline; }
.ss-s-top b { font-size: 1.05em; }
.ss-s-top span { color: var(--ink-soft); font-size: .88em; }
.ss-headline { margin: .25em 0 .5em; font-family: var(--serif); font-size: 1.25em; line-height: 1.25; }
.ss-actions { display: flex; gap: .5em; flex-wrap: wrap; }
.ss-actions .btn { font-size: .9em; }
.ss-path { display: flex; flex-direction: column; gap: .6em; margin-top: .6em; padding-top: .8em; border-top: 1px dashed var(--line); }
.ss-path h3 { margin: 0; font-size: 1em; color: var(--ink-soft); }
.ss-head-actions, .ss-path-head { display: flex; align-items: center; gap: .6em; flex-wrap: wrap; }
.ss-path-head { justify-content: space-between; }
.back-sessions { align-self: flex-start; font-size: .9rem; margin-bottom: .2rem; }
@media (max-width: 720px) {
  .ss { grid-template-columns: 1fr; grid-template-rows: minmax(0, 40%) minmax(0, 1fr); }
}
.ss-right > * { flex: none; }
@media (max-width: 720px) {
  .ss { grid-template-rows: auto minmax(0, 1fr); gap: .8rem; }
  .ss h2 { font-size: 1.6em; }
  .ss-filters { margin: .7em 0 .6em; gap: .45em; }
  .ss-list { flex: none; max-height: 8.5em; }
  .ss-left, .ss-right { padding: .8em .9em; }
}

/* ---------- Replay controller, in the strip under the room ---------- */
.replay-ctl { position: absolute; left: 50%; bottom: .55rem; transform: translateX(-50%); z-index: 8; width: min(94%, 820px);
  display: flex; align-items: center; gap: .55rem; padding: .45rem .8rem; border-radius: var(--r-pill); background: #142120; color: var(--cream); border: 1px solid #2c403d; font-size: clamp(14px, 1vw, 17px); }
.replay-ctl[hidden] { display: none; }
.rc-btn { flex: none; width: 2.3em; height: 2.3em; border-radius: 50%; border: 0; background: transparent; color: inherit; font-size: 1.05em; cursor: pointer; display: grid; place-items: center; }
.rc-btn:hover { background: #24363a; }
.rc-btn.rc-main { width: 2.7em; height: 2.7em; background: var(--cream); color: #142120; font-size: 1.15em; }
.rc-track { flex: 1; min-width: 0; display: flex; gap: 3px; align-items: center; height: 1.6em; }
.rc-tick { flex: 1; min-width: 4px; height: .55em; border: 0; padding: 0; border-radius: 3px; cursor: pointer; opacity: .45; background: #8fa39c; transition: height .15s; }
.rc-tick.t3 { background: #d9a441; } .rc-tick.t4, .rc-tick.t5 { background: #cf5a42; }
.rc-tick.past { opacity: .95; }
.rc-tick.now { opacity: 1; height: 1.15em; box-shadow: 0 0 0 2px var(--cream); }
.rc-tick:hover { height: .95em; opacity: 1; }
.rc-pos { flex: none; font-variant-numeric: tabular-nums; font-size: .9em; color: #a9b8b3; min-width: 4.2em; text-align: center; }
.rc-speed { flex: none; border: 1px solid #3a504c; background: transparent; color: inherit; border-radius: var(--r-pill); padding: .2em .65em; font: inherit; font-size: .9em; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .rc-tick { transition: none; } }

/* Left panel: nothing shrinks into anything else; if it's tall, the panel scrolls instead,
   so the family map is never covered by the buttons below it. */
.setup > * { flex-shrink: 0; }
.setup-preview { flex: 1 0 auto; }
.setup-preview .thumb-btn { flex: 1 0 auto; }
/* During a replay there's no session to end, restart or cancel. */
.session-grid.replaying .setup-actions, .session-grid.replaying #approach-change, .session-grid.replaying .scenario-field { display: none; }

/* Replay controller as speaker lanes: controls on top, one lane per person below. */
.replay-ctl { flex-direction: column; align-items: stretch; gap: .35rem; border-radius: var(--r-md); padding: .45rem .9rem .6rem; width: min(96%, 900px); --rc-name: 4.6em; }
.rc-row { display: flex; align-items: center; gap: .5rem; }
.rc-row .spacer { flex: 1; }
.rc-pos { min-width: 0; text-align: left; }
.rc-lanes { position: relative; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.rc-lane { display: grid; grid-template-columns: var(--rc-name) minmax(0, 1fr); align-items: center; height: .8em; }
.rc-name { font-size: .72em; color: #a9b8b3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: .4em; }
.rc-lanes .rc-track { position: relative; display: block; height: .62em; background: #1d2e2c; border-radius: 3px; gap: 0; }
.rc-block { position: absolute; top: 0; bottom: 0; border-radius: 2px; opacity: .38; }
.rc-block.past { opacity: .95; }
.rc-block.now { opacity: 1; box-shadow: 0 0 0 1.5px var(--cream); }
.rc-head { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--cream); border-radius: 1px; pointer-events: none; transition: left .3s linear; }
.rc-lanes:hover .rc-track { background: #24363a; }
@media (prefers-reduced-motion: reduce) { .rc-head { transition: none; } }

/* ---------- Session page: the room, with one panel beside it (Settings, Transcript, Map) ---------- */
#view-session .session-grid { grid-template-columns: minmax(0, 1fr) clamp(320px, 27vw, 500px); }
#view-session .session-grid.practicing { grid-template-columns: clamp(260px, 21vw, 420px) minmax(0, 1fr) clamp(300px, 24vw, 460px); }
#view-session .practice-panel { min-height: 0; overflow: hidden; }
#view-session .practice-panel[hidden] { display: none; }
.room-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; flex: none; min-width: 0; }
.rh-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.45rem, 1.5vw, 1.95rem); line-height: 1.1; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.room-head .spacer { flex: 1; }
.room-head .btn { font-size: 1rem; white-space: nowrap; }
.room-head .back-sessions { font-size: 1rem; white-space: nowrap; margin: 0; align-self: center; }
.session-grid.practicing .room-head { display: none; }
.session-grid.replaying .room-head #end-btn, .session-grid.replaying .room-head #cancel-session { display: none; }
.side-panel { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .9rem 1rem; gap: .8rem; font-size: clamp(16px, .45vw + 10px, 19px); }
.side-tabs [data-side] { flex: 1; border: 0; background: transparent; border-radius: var(--r-pill); padding: .45em .5em; font: inherit; font-weight: 600; font-size: .95em; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.side-tabs [data-side].on { background: var(--primary); color: var(--primary-ink); }
.side-tabs [data-side]:not(.on):hover { color: var(--ink); background: var(--panel); }
.session-grid.practicing .side-tabs [data-side="set"] { display: none; }
.side-badge { display: inline-block; min-width: 1.4em; padding: 0 .35em; margin-left: .25em; border-radius: var(--r-pill); background: var(--reactive); color: #fff; font-size: .74em; line-height: 1.4em; vertical-align: 1px; text-align: center; }
.side-badge[hidden] { display: none; }
.side-close { display: none; flex: none; width: 2em; height: 2em; border: 0; border-radius: 50%; background: transparent; font-size: 1.3em; color: var(--ink-soft); cursor: pointer; }
.side-panel [data-pane][hidden] { display: none !important; }
#view-session .side-panel .setup { display: flex; flex: 1; min-height: 0; overflow-y: auto; border: 0; padding: 0 .2rem 0 0; max-height: none; gap: .95em; font-size: 1em; }
#view-session .side-panel .transcript { display: flex; position: static; flex: 1; min-height: 0; border: 0; padding: 0; box-shadow: none; background: transparent; width: auto; }
#view-session .side-panel .transcript-head { margin-bottom: .4rem; }
.side-map { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .6em; }
#view-session .side-map .setup-preview { display: flex; flex: 1; min-height: 0; }
#view-session .side-map .setup-preview .thumb-btn { flex: 1; min-height: 0; }
#view-session .side-map .setup-preview .fam-thumb { height: 100%; min-height: 0; }
/* larger text across the session page */
#view-session .side-panel .field > span, #view-session .side-panel .sp-label { font-size: .95em; }
#view-session .side-panel select, #view-session .side-panel textarea, #view-session .side-panel .btn { font-size: 1em; }
#view-session .side-panel .case-n { font-size: 1.5em; }
#view-session .side-panel .case-sub, #view-session .side-panel .link-btn { font-size: .9em; }
#view-session .t-entry { font-size: 1em; }
#view-session .t-who { font-size: .88em; }
#view-session .t-entry.mutter .t-text { font-size: 1.08em; }
#view-session .addressing { font-size: 1.02rem; }
#view-session .composer-actions .btn, #view-session .ai-note { font-size: .98rem; }
#view-session #message { font-size: 1.1rem; }
#view-session .composer-row .btn { font-size: 1.05rem; }
/* narrower screens: during practice, and on phones, the panel slides in over the page */
@media (max-width: 1000px) {
  #view-session .session-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  #view-session .session-grid.practicing { grid-template-columns: 280px minmax(0, 1fr); }
  .session-grid:not(.practicing) #transcript-open { display: none; }
  .session-grid.practicing .side-panel { display: none; position: fixed; z-index: var(--z-sticky); top: 0; right: 0; bottom: 0; width: min(440px, 100vw); border-radius: 0; background: var(--paper); box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .45); }
  .session-grid.practicing .side-panel.open { display: flex; }
  .session-grid.practicing .side-close { display: inline-flex; align-items: center; justify-content: center; }
  .room-head .btn { font-size: .92rem; padding-left: .8rem; padding-right: .8rem; }
}
@media (max-width: 720px) {
  #view-session .session-grid, #view-session .session-grid.practicing { grid-template-columns: minmax(0, 1fr); }
  .side-panel { display: none; position: fixed; z-index: var(--z-sticky); top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; background: var(--paper); }
  .side-panel.open { display: flex; }
  .side-close { display: inline-flex; align-items: center; justify-content: center; }
  .session-grid:not(.practicing) #transcript-open { display: inline-flex; }
  .session-grid.practicing .practice-panel { display: none; }
  .session-grid.practicing .practice-panel.open { display: flex; max-height: 50vh; overflow-y: auto; }
  .room-head { gap: .5rem; flex-wrap: wrap; }
  .rh-title { font-size: 1.25rem; flex-basis: 100%; order: -1; }
}
@media (max-width: 720px) {
  .room-head { row-gap: .3rem; column-gap: .45rem; margin-bottom: .45rem; }
  .room-head .back-sessions { font-size: .9rem; }
  .room-head .btn { font-size: .85rem; padding: .35rem .7rem; }
}
#view-session .side-panel .setup > * { flex: none; }

/* ---------- The card that opens each session ---------- */
.start-card { width: min(92vw, 760px); max-height: 90vh; padding: 0; border: 0; border-radius: var(--r-md); background: var(--panel-2); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); font-size: clamp(16px, .5vw + 10px, 19px); }
.start-card[open] { display: flex; flex-direction: column; }
.start-card::backdrop { background: rgba(16, 24, 22, .55); }
.sc-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1.4em 1.6em .8em; display: flex; flex-direction: column; gap: .85em; }
.start-card h2 { font-family: var(--serif); font-weight: 400; font-size: 2.1em; line-height: 1.05; margin: 0; }
.sc-sub { margin: -.4em 0 0; color: var(--ink-soft); }
#sc-since { display: flex; flex-direction: column; gap: .85em; }
.sc-block { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .8em 1em; display: flex; flex-direction: column; gap: .45em; }
.sc-label { font-size: .78em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-ink); }
.sc-label small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-faint); margin-left: .3em; }
.sc-week { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.22em; line-height: 1.35; }
.sc-more { margin: 0; font-size: .85em; color: var(--ink-faint); }
.sc-hw { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55em; }
.sc-hw li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: .5em; align-items: start; line-height: 1.4; }
.sc-dots { display: flex; padding-top: .2em; }
.sc-dot { width: 1.05em; height: 1.05em; border-radius: 50%; border: 2px solid var(--panel); margin-right: -.3em; flex: none; }
.start-card textarea { font: inherit; font-size: 1em; line-height: 1.45; resize: none; border: 1px solid var(--line); border-radius: var(--r-md); padding: .6em .75em; background: var(--panel-2); color: var(--ink); width: 100%; }
.start-card .starters { margin: 0; gap: .4em; }
.start-card .starter { font-size: .9em; padding: .3em .85em; }
.sc-foot { display: flex; align-items: center; gap: .6em; padding: .8em 1.6em 1.2em; border-top: 1px solid var(--line-soft); }
.sc-foot .spacer { flex: 1; }
.sc-foot .btn { font-size: 1em; }
/* Settings: the name and scenario read larger, and can't be changed mid-session */
#view-session .side-panel .session-with { display: flex; flex-direction: column; gap: .1em; }
#view-session .side-panel .session-with b { font-family: var(--serif); font-weight: 400; font-size: 1.85em; line-height: 1.05; }
#view-session .side-panel .field > span { font-size: .9em; font-weight: 600; color: var(--ink-soft); }
#view-session .side-panel .scenario-view p { margin: .2em 0 0; font-size: 1.05em; line-height: 1.45; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .55em .75em; }
#view-session .side-panel .scenario-view p.empty { color: var(--ink-faint); font-style: italic; }
@media (max-width: 720px) { .sc-body { padding: 1.1em 1.1em .7em; } .sc-foot { padding: .7em 1.1em 1em; } .start-card h2 { font-size: 1.7em; } }
.start-card.wide { width: min(94vw, 1040px); }
.sc-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: .9em; align-items: start; }
.sc-cols.solo { grid-template-columns: minmax(0, 1fr); }
.sc-scene textarea { min-height: 7.5em; }
@media (max-width: 720px) { .sc-cols { grid-template-columns: minmax(0, 1fr); } }
#view-session .side-panel .field > span, #view-session .side-panel .sp-label { font-size: 1em; }
#view-session .side-panel .session-with b { font-size: 2em; }
#view-session .side-panel .scenario-view p { font-size: 1.08em; }

/* ---------- Session page, three columns: settings and map | the room | the transcript ---------- */
#view-session .session-grid { grid-template-columns: clamp(270px, 20vw, 390px) minmax(0, 1fr) clamp(300px, 24vw, 450px); }
#view-session .session-grid.practicing { grid-template-columns: clamp(260px, 21vw, 420px) minmax(0, 1fr) clamp(300px, 24vw, 450px); }
.session-grid.practicing .side-left { display: none; }
.side-left { display: flex; flex-direction: column; min-height: 0; gap: .8rem; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .9rem 1rem; font-size: clamp(16px, .45vw + 10px, 19px); }
#view-session .side-left .setup { display: flex; flex: none; overflow: visible; border: 0; padding: 0; max-height: none; gap: .75em; font-size: 1em; }
#view-session .side-left .setup > * { flex: none; }
#view-session .side-left .session-with { display: flex; flex-direction: column; gap: .05em; }
#view-session .side-left .session-with b { font-family: var(--serif); font-weight: 400; font-size: 1.85em; line-height: 1.05; }
#view-session .side-left .field > span, #view-session .side-left .sp-label { font-size: .95em; font-weight: 600; color: var(--ink-soft); }
#view-session .side-left .case-n { font-size: 1.3em; }
#view-session .side-left .case-sub, #view-session .side-left .link-btn { font-size: .88em; }
#view-session .side-left .scenario-view p { margin: .2em 0 0; font-size: 1em; line-height: 1.4; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .45em .7em; }
#view-session .side-left .scenario-view p.empty { color: var(--ink-faint); font-style: italic; }
#view-session .side-left .btn { font-size: .95em; }
#view-session .side-left .setup-actions { flex-direction: row; }
.side-left .side-map { flex: 1; min-height: 9rem; display: flex; flex-direction: column; gap: .5em; border-top: 1px solid var(--line-soft); padding-top: .7em; }
.side-panel { gap: .5rem; }
.side-head { display: flex; align-items: center; gap: .5rem; flex: none; }
.side-head h2 { font-family: var(--serif); font-weight: 400; font-size: 1.7em; margin: 0; flex: 1; }
.side-close { display: none; }
.side-left > .side-close { align-self: flex-end; margin-bottom: -.4rem; }
@media (max-width: 1000px) {
  #view-session .session-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  #view-session .session-grid.practicing { grid-template-columns: 280px minmax(0, 1fr); }
  #view-session .setup-toggle { display: flex; justify-content: space-between; align-items: center; flex: none; width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: .5rem .85rem; margin-bottom: .6rem; cursor: pointer; }
  .side-left { display: none; position: fixed; z-index: var(--z-sticky); top: 0; left: 0; bottom: 0; width: min(420px, 100vw); border-radius: 0; background: var(--paper); box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .45); }
  .side-left.open { display: flex; }
  .side-left .side-close, .session-grid.practicing .side-panel .side-close { display: inline-flex; align-items: center; justify-content: center; width: 2em; height: 2em; border: 0; border-radius: 50%; background: transparent; font-size: 1.3em; color: var(--ink-soft); cursor: pointer; }
}
@media (max-width: 720px) {
  #view-session .session-grid, #view-session .session-grid.practicing { grid-template-columns: minmax(0, 1fr); }
  .side-left { width: 100vw; }
  .side-panel .side-close { display: inline-flex; align-items: center; justify-content: center; width: 2em; height: 2em; border: 0; border-radius: 50%; background: transparent; font-size: 1.3em; color: var(--ink-soft); cursor: pointer; }
}
/* Left column stays compact so the family map gets the room it needs */
#view-session .side-left .approach-card .ac-desc, #view-session .side-left .approach-card .ac-tags { display: none; }
#view-session .side-left .approach-card { padding: .55em .8em; }
#view-session .side-left .setup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; }
#view-session .side-left .setup-actions .btn { width: 100%; padding-left: .4em; padding-right: .4em; white-space: nowrap; }
#view-session .side-left .approach-wrap { gap: .3em; }
.session-grid.replaying .side-left .setup-actions { display: none; }

/* ---------- Training: methods (Ask and methods on the left, courses and moves on the right) ---------- */
.tr-body > .mt { grid-column: 1 / -1; }
.mt { min-height: 0; display: grid; grid-template-columns: clamp(270px, 22vw, 360px) minmax(0, 1fr); font-size: clamp(16px, .55vw + 9px, 20px); }
.mt-left { min-height: 0; display: flex; flex-direction: column; gap: .8em; border-right: 1px solid var(--line-soft); padding: 1em .9em; }
.mt-ask { flex: none; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .7em; display: flex; flex-direction: column; gap: .55em; max-height: 55%; overflow: auto; }
.mt-tabs { display: flex; gap: .2em; background: var(--panel); border-radius: var(--r-pill); padding: .18em; align-self: flex-start; }
.mt-tabs button { border: 0; background: transparent; border-radius: var(--r-pill); padding: .3em 1em; font: inherit; font-size: .88em; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.mt-tabs button.on { background: var(--primary); color: var(--primary-ink); }
.mt-askrow { display: flex; gap: .4em; }
.mt-q { flex: 1; min-width: 0; font: inherit; font-size: .9em; padding: .5em .7em; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); color: var(--ink); }
.mt-askrow .btn { font-size: .9em; padding: .45em .9em; }
.mt-examples { display: flex; flex-direction: column; gap: .3em; }
.mt-examples button { text-align: left; font: inherit; font-size: .85em; color: var(--brass-ink); background: none; border: 1px dashed var(--line); border-radius: var(--r-sm); padding: .35em .6em; cursor: pointer; }
.mt-examples button:hover { border-color: var(--brass); }
.mt-answer { display: flex; flex-direction: column; gap: .4em; }
.mt-answer p { margin: 0; font-size: .92em; line-height: 1.45; }
.mt-results { display: flex; flex-direction: column; gap: .3em; }
.mt-jump { text-align: left; font: inherit; font-size: .9em; font-weight: 600; background: var(--brass-soft); color: var(--brass-ink); border: 1px solid transparent; border-radius: var(--r-sm); padding: .35em .6em; cursor: pointer; display: flex; flex-direction: column; }
.mt-jump small { font-weight: 500; font-size: .78em; opacity: .85; }
.mt-jump:hover { border-color: var(--brass); }
.mt-methods { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .6em; padding-right: .2em; }
.mt-group h4 { margin: 0 0 .2em .5em; font-size: .75em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.mt-method { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .5em; text-align: left; font: inherit; font-size: .95em; padding: .38em .6em; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); cursor: pointer; }
.mt-method:hover { background: var(--panel-2); }
.mt-method.on { background: var(--primary); color: var(--primary-ink); }
.mt-method small { font-size: .7em; font-weight: 700; padding: .1em .5em; border-radius: var(--r-pill); background: var(--brass-soft); color: var(--brass-ink); }
.mt-main { min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: .9em; padding: 1em 1.3em 1.1em; }
.mt-head { flex: none; }
.mt-kicker { font-size: .8em; font-weight: 600; color: var(--ink-faint); }
.mt-head h2 { font-family: var(--serif); font-weight: 400; font-size: 2.3em; line-height: 1.02; margin: .05em 0 .15em; }
.mt-head p { margin: 0; color: var(--ink-soft); line-height: 1.45; max-width: 60em; }
.mt-sec { flex: none; display: flex; flex-direction: column; gap: .45em; min-height: 0; }
.mt-sec h3 { margin: 0; font-size: .8em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-ink); }
.mt-courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6em; }
.mt-course { text-align: left; font: inherit; display: flex; flex-direction: column; gap: .15em; padding: .65em .85em; border-radius: var(--r-md); border: 1.5px solid var(--line-soft); background: var(--panel-2); color: var(--ink); }
.mt-course.ready { cursor: pointer; border-color: var(--brass); }
.mt-course.ready:hover { background: var(--brass-soft); }
.mt-course.soon { opacity: .75; }
.mt-level { font-size: .75em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.mt-course b { font-size: 1.02em; }
.mt-status { font-size: .82em; color: var(--ink-soft); }
.mt-course.ready .mt-status { color: var(--brass-ink); font-weight: 600; }
.mt-moves { flex: 1; }
.mt-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: .6em; }
.mt-card { min-height: 0; overflow: hidden; text-align: left; font: inherit; display: flex; flex-direction: column; gap: .35em; padding: .7em .85em; border-radius: var(--r-md); border: 1.5px solid var(--line-soft); background: var(--panel-2); color: var(--ink); cursor: pointer; }
.mt-card:hover { border-color: var(--brass); }
.mt-card-top { display: flex; align-items: center; gap: .45em; }
.mt-card-top b { font-size: 1.02em; line-height: 1.2; }
.mt-num { flex: none; width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; font-size: .8em; font-weight: 700; background: var(--primary); color: var(--primary-ink); }
.mt-card-what { font-size: .88em; color: var(--ink-soft); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mt-card-ex { font-family: var(--serif); font-style: italic; font-size: .98em; line-height: 1.3; background: var(--panel); border-radius: var(--r-sm); padding: .4em .55em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mt-card.hit, .mt-open.hit { border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-soft); }
.mt-open { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .6em; padding: 1em 1.2em; border-radius: var(--r-md); border: 1.5px solid var(--line-soft); background: var(--panel-2); }
.mt-open-head { display: flex; align-items: center; gap: .55em; }
.mt-open h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.8em; line-height: 1.05; }
.mt-what { margin: 0; font-size: 1.05em; line-height: 1.45; }
.mt-row span { display: block; font-size: .75em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .1em; }
.mt-row p { margin: 0; line-height: 1.45; }
.mt-example p { font-family: var(--serif); font-style: italic; font-size: 1.15em; line-height: 1.35; background: var(--panel); border-radius: var(--r-sm); padding: .5em .7em; }
.mt-open-foot { margin-top: auto; display: flex; gap: .5em; align-items: center; flex-wrap: wrap; }
.mt-open-foot .btn { font-size: .92em; }
.tr-back { display: block; margin-bottom: .4em; font-size: .9em; }
@media (max-width: 1000px) {
  .mt { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .mt-left { border-right: 0; border-bottom: 1px solid var(--line-soft); max-height: 42vh; }
  .mt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-main { overflow-y: auto; }
}
.mt-sec .mt-open h3 { text-transform: none; letter-spacing: 0; color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 1.8em; }
.mt-open { overflow: hidden; gap: .55em; }
.mt-open-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: .5em 1.4em; min-height: 0; }
.mt-open-cols > div { display: flex; flex-direction: column; gap: .55em; }
@media (max-width: 1000px) { .mt-open-cols { grid-template-columns: minmax(0, 1fr); } .mt-open { overflow-y: auto; } }
.mt-open-head .spacer { flex: 1; } .mt-open-head .btn { font-size: .85em; }
.mt-main.card-open .mt-courses-sec { display: none; }

/* ---------- Training methods, "dark rail" design ---------- */
.tr-body > .mr { grid-column: 1 / -1; }
.mr { --rail: #04342c; --rail-2: #085041; --rail-on: #e1f5ee; --rail-ink: #c9e9dd; --rail-mute: #9fe1cb;
  --lv0: #1d9e75; --lv0-bg: #e1f5ee; --lv0-ink: #085041; --lv1: #ba7517; --lv1-bg: #faeeda; --lv1-ink: #633806; --lv2: #d85a30; --lv2-bg: #faece7; --lv2-ink: #712b13;
  min-height: 0; display: grid; grid-template-columns: clamp(250px, 19vw, 330px) minmax(0, 1fr); font-size: clamp(16px, .55vw + 9px, 20px); }
.mr-rail { min-height: 0; display: flex; flex-direction: column; gap: 1em; background: var(--rail); padding: 1.1em .9em; }
.mr-tabs { display: grid; grid-template-columns: repeat(4, auto); justify-content: stretch; gap: .2em; background: var(--rail-2); border-radius: var(--r-md); padding: .22em; }
.mr-tabs button { border: 0; border-radius: var(--r-sm); padding: .5em .3em; font: inherit; font-size: .78em; font-weight: 700; color: var(--rail-mute); background: transparent; cursor: pointer; line-height: 1.15; }
.mr-tabs button.on { background: var(--rail-on); color: var(--rail); }
.mr-tabs button:not(.on):hover { color: #fff; }
.mr-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .2em; }
.mr-list button { display: flex; align-items: center; justify-content: space-between; gap: .5em; text-align: left; font: inherit; font-size: 1em; padding: .55em .75em; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--rail-ink); cursor: pointer; }
.mr-list button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.mr-list button.on { background: #0f6e56; color: #fff; font-weight: 600; }
.mr-list small { font-size: .68em; font-weight: 700; padding: .12em .55em; border-radius: var(--r-pill); background: var(--rail-on); color: var(--rail); flex: none; }
.mr-main { position: relative; min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: .85em; padding: 1em 1.4em 1.1em; background: var(--paper); }
.mr-ask { position: relative; flex: none; z-index: 5; }
.mr-bar { display: flex; align-items: center; gap: .5em; background: var(--panel-2); border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: .28em .3em .28em 1em; }
.mr-bar:focus-within { border-color: var(--lv0); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lv0) 20%, transparent); }
.mr-icon { color: var(--lv0-ink); font-size: 1.05em; flex: none; }
.mr-q { flex: 1; min-width: 0; font: inherit; font-size: .98em; border: 0; outline: none; background: transparent; color: var(--ink); padding: .35em 0; }
.mr-go { flex: none; font: inherit; font-size: .88em; font-weight: 700; border: 0; border-radius: var(--r-pill); padding: .4em 1em; background: var(--lv0-ink); color: #fff; cursor: pointer; }
.mr-seg { flex: none; display: flex; background: var(--panel); border-radius: var(--r-pill); padding: .18em; gap: .1em; }
.mr-seg button { border: 0; border-radius: var(--r-pill); padding: .32em .9em; font: inherit; font-size: .85em; font-weight: 600; color: var(--ink-soft); background: transparent; cursor: pointer; }
.mr-seg button.on { background: var(--rail-2); color: #fff; }
.mr-drop { position: absolute; left: 0; right: 0; top: calc(100% + .45em); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: .9em 2.4em .9em 1em; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .35); max-height: 22em; overflow-y: auto; }
.mr-close { position: absolute; top: .4em; right: .5em; width: 1.8em; height: 1.8em; border: 0; border-radius: 50%; background: transparent; font-size: 1.2em; color: var(--ink-soft); cursor: pointer; }
.mr-drop .mt-answer p { font-size: .98em; line-height: 1.5; margin: 0 0 .6em; }
.mr-jumps { display: flex; flex-wrap: wrap; gap: .4em; }
.mr-jumps .mt-jump { flex: 0 1 auto; }
.mr .mt-head h2 { font-size: 2.4em; }
.mr-h { margin: 0 0 .4em; font-family: var(--serif); font-weight: 400; font-size: 1.65em; line-height: 1; color: var(--ink); letter-spacing: 0; text-transform: none; }
.mr-sec { flex: none; display: flex; flex-direction: column; min-height: 0; }
.mr-moves { flex: 1; }
.mr-courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65em; }
.mr-course { text-align: left; font: inherit; display: flex; flex-direction: column; gap: .15em; padding: .7em .9em; border-radius: var(--r-md); border: 1.5px solid; }
.mr-course.lv0 { background: var(--lv0-bg); border-color: var(--lv0); color: var(--lv0-ink); }
.mr-course.lv1 { background: var(--lv1-bg); border-color: var(--lv1); color: var(--lv1-ink); }
.mr-course.lv2 { background: var(--lv2-bg); border-color: var(--lv2); color: var(--lv2-ink); }
.mr-course .mt-level, .mr-course .mt-status { color: inherit; opacity: .85; }
.mr-course b { font-size: 1.05em; }
.mr-course.ready { cursor: pointer; box-shadow: 0 4px 14px -8px rgba(0, 0, 0, .35); }
.mr-course.ready:hover { filter: brightness(.97); }
.mr-course.ready .mt-status { font-weight: 700; opacity: 1; }
.mr-course.soon { border-style: dashed; opacity: .78; }
.mr-main.card-open .mt-courses-sec { display: none; }
.mr .mt-card { background: var(--panel-2); border-color: var(--line); }
.mr .mt-card:hover { border-color: var(--lv0); }
.mr .mt-num { background: var(--lv0-ink); color: #fff; }
.mr .mt-card-ex, .mr .mt-example p { background: var(--lv0-bg); color: var(--lv0-ink); }
.mr .mt-open { background: var(--panel-2); border-color: var(--line); }
.mr .mt-sec .mt-open h3, .mr .mt-open h3 { text-transform: none; letter-spacing: 0; color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 1.8em; }
.mr .mt-card.hit, .mr .mt-open.hit { border-color: var(--lv1); box-shadow: 0 0 0 3px var(--lv1-bg); }
@media (max-width: 1000px) {
  .mr { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .mr-rail { max-height: 34vh; }
  .mr-main { overflow-y: auto; }
  .mr-courses { grid-template-columns: minmax(0, 1fr); }
}
.mr-tabs button { font-size: .85em; white-space: nowrap; }
/* Card faces show a short tagline and quote in full: no clamping, so nothing is ever cut mid-line. */
.mr .mt-card-what, .mr .mt-card-ex { display: block; -webkit-line-clamp: unset; overflow: visible; }
.mr .mt-card { justify-content: flex-start; }
.mr-head { display: flex; align-items: flex-start; gap: 1.2em; }
.mr-head > div { flex: 1; min-width: 0; }
.mr-back { flex: none; font-size: 1em; font-weight: 600; padding: .5em 1.3em; border: 1.5px solid var(--lv0-ink); color: var(--lv0-ink); background: var(--panel-2); border-radius: var(--r-pill); }
.mr-back:hover { background: var(--lv0-bg); }

/* Opened move card as a study card ("flashcard") */
.mr .mt-flash { overflow: hidden; gap: .7em; padding: .9em 1.1em 1em; }
.mf-hero { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .65em; text-align: center; background: #04342c; color: #e1f5ee; border-radius: var(--r-md); padding: 1em 2em; }
.mf-tag { font-size: .82em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9fe1cb; }
.mf-quote { margin: 0; font-family: var(--serif); font-size: 1.55em; line-height: 1.3; max-width: 34em; }
.mf-what { margin: 0; font-size: .95em; line-height: 1.45; color: #c9e9dd; max-width: 40em; }
.mf-tiles { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6em; }
.mf-tile { overflow: hidden; border-radius: var(--r-md); padding: .65em .85em; background: var(--panel); border: 1px solid var(--line-soft); }
.mf-tile span { display: block; font-size: .72em; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .2em; }
.mf-tile p { margin: 0; font-size: .9em; line-height: 1.45; }
.mf-tile.then { background: var(--lv1-bg); border-color: transparent; color: var(--lv1-ink); }
.mf-tile.then span { color: var(--lv1); }
.mf-tile.miss { background: var(--lv2-bg); border-color: transparent; color: var(--lv2-ink); }
.mf-tile.miss span { color: var(--lv2); }
@media (max-width: 1000px) { .mf-tiles { grid-template-columns: minmax(0, 1fr); } }
.mf-quote { font-size: 2em; } .mf-what { font-size: 1.05em; } .mf-tag { font-size: .9em; }

/* ---------- An opened move, popped up over the Training page ---------- */
.move-card { --lv0: #1d9e75; --lv0-bg: #e1f5ee; --lv0-ink: #085041; --lv1: #ba7517; --lv1-bg: #faeeda; --lv1-ink: #633806; --lv2: #d85a30; --lv2-bg: #faece7; --lv2-ink: #712b13;
  width: min(92vw, 1120px); height: min(86vh, 780px); max-width: none; max-height: none; padding: 1.1em 1.3em 1.2em; border: 0; border-radius: var(--r-md);
  background: var(--panel-2); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); font-size: clamp(16px, .55vw + 9px, 20px); overflow: hidden; }
.move-card[open] { display: flex; flex-direction: column; gap: .75em; }
.move-card::backdrop { background: rgba(10, 22, 20, .62); }
.mc-head { flex: none; display: flex; align-items: center; gap: .6em; }
.mc-head .mt-num { flex: none; width: 1.7em; height: 1.7em; border-radius: 50%; display: grid; place-items: center; font-size: .85em; font-weight: 700; background: var(--lv0-ink); color: #fff; }
.mc-head h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 2em; line-height: 1; }
.mc-method { font-size: .9em; color: var(--ink-faint); margin-left: .2em; }
.mc-head .spacer { flex: 1; }
.mc-head .btn { font-size: .95em; padding: .5em 1.25em; white-space: nowrap; }
.mc-practise { background: var(--lv0-ink); border-color: var(--lv0-ink); }
.mc-close { flex: none; width: 2.2em; height: 2.2em; margin-left: .2em; border: 1.5px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--ink-soft); font-size: .95em; cursor: pointer; }
.mc-close:hover { color: var(--ink); border-color: var(--ink-soft); }
.mc-soon { flex: none; margin: -.2em 0 0; font-size: .9em; color: var(--lv1-ink); background: var(--lv1-bg); border-radius: var(--r-sm); padding: .45em .8em; }
.mc-soon[hidden] { display: none; }
.move-card .mf-hero { flex: 1; min-height: 0; }
@media (max-width: 720px) { .move-card { width: 100vw; height: 100vh; border-radius: 0; } .mc-head { flex-wrap: wrap; } }
.mc-head .mc-watch { background: transparent; border: 1.5px solid var(--lv0-ink); color: var(--lv0-ink); }
.mc-head .mc-watch:hover { background: var(--lv0-bg); }

/* Arrange room: the room takes the full width so people and furniture are easy to place. */
#view-session .session-grid.arranging-room, #view-session .session-grid.practicing.arranging-room, #view-session .session-grid.practicing.transcript-collapsed.arranging-room { grid-template-columns: minmax(0, 1fr); }
.session-grid.arranging-room .side-left, .session-grid.arranging-room .side-panel, .session-grid.arranging-room .composer, .session-grid.arranging-room .practice-panel, .session-grid.arranging-room #transcript-open { display: none !important; }
.room .seat.you { cursor: default; }
.room.arranging .seat.you { cursor: grab; }

/* Words not yet spoken hold their space, so a bubble does not move as it fills in. */
.bubble .unsaid { visibility: hidden; }

/* Course pictures can hold a labelled thing (a feeling, a part, a thought) beside people. */
.pic-thing { position: absolute; transform: translate(-50%, -50%); max-width: 34%; padding: .35rem .6rem; border-radius: var(--r-md); background: var(--brass-soft); color: var(--brass-ink); font-size: .85rem; line-height: 1.25; text-align: center; box-shadow: 0 4px 12px -6px rgba(0,0,0,.35); }
.pl.link { stroke: var(--ink-faint); stroke-width: 2; }
.pl.loop { stroke: var(--brass); stroke-dasharray: 2 5; stroke-width: 2.4; }
/* "Spot it" for parts other than a triangle: what you picked beside what was there. */
.db-role-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: .4rem 0 .6rem; }
.db-role-table th, .db-role-table td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
.db-role-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.db-role-table tr.same td { color: var(--calm, inherit); font-weight: 600; }

/* The card that says a course is done, and what's next. */
.cd-lead { font-size: 1.05rem; margin: 0 0 1rem; }
.cd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem 1.4rem; }
.cd-sec h4 { margin: 0 0 .35rem; font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); }
.cd-sec p { margin: 0; }
.cd-reflect { font-family: var(--serif); font-style: italic; font-size: 1.05rem; }
.tr-kicker.tr-complete { background: none; border: 0; padding: 0; cursor: pointer; color: var(--brass-ink, var(--brass)); text-align: left; text-decoration: underline; text-underline-offset: 3px; }

/* Skills open the course that teaches them. */
.tr-pop-skills .tr-skill-open { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; text-decoration: none; padding: .2rem 0; }
.tr-pop-skills .tr-skill-open small { color: var(--ink-faint); font-size: .78rem; }
.tr-pop-skills .tr-skill-open:hover span { text-decoration: underline; }

/* Core skills: ten cards in two rows of five, with no courses above them. */
.mr-moves.core .mt-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1000px) { .mr-moves.core .mt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The family map opened large from the training panel: a look-only explorer. */
.map-view .mv { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.map-view .fe-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem .4rem; }
.map-view .mv-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.6rem; }
.map-view .mv-body { flex: 1; min-height: 0; display: flex; gap: 1rem; padding: 0 1rem 1rem; }
.map-view .fe-map { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: var(--r-md); }
.map-view .mv-svg { flex: 1; min-height: 0; width: 100%; padding: 1rem; }
.map-view .mv-svg .node, .map-view .mv-svg .hit { cursor: pointer; }
.map-view .mv-svg .node:hover .body { filter: brightness(1.08); }
.map-view .mv-key { cursor: pointer; border: 1px solid transparent; border-radius: var(--r-pill); background: none; font: inherit; color: inherit; padding: .15rem .5rem; }
.map-view .mv-key:hover, .map-view .mv-key.on { border-color: var(--brass); background: var(--brass-soft); }
.map-view .mv-panel { width: 340px; flex: none; overflow-y: auto; display: flex; flex-direction: column; gap: .8rem; padding: .3rem .2rem 1rem; }
.map-view .mv-panel h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }
.map-view .mv-panel h4 { margin: 0 0 .35rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.map-view .mv-panel p { margin: 0; line-height: 1.45; }
.map-view .mv-kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brass-ink); }
.map-view .mv-lead { font-size: 1.05rem; }
.map-view .mv-muted { color: var(--ink-soft); }
.map-view .mv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.map-view .mv-list span { display: block; color: var(--ink-soft); }
.map-view .mv-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.map-view .mv-link { font: inherit; font-size: .92rem; text-align: left; cursor: pointer; border: 1px solid var(--line-soft); background: var(--panel); color: var(--ink); border-radius: var(--r-md); padding: .35rem .7rem; }
.map-view .mv-link:hover { border-color: var(--brass); background: var(--brass-soft); }
.map-view .mv-link.absent { border-style: dashed; }
.map-view .mv-link.back { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--brass-ink); }
.map-view .mv-sample svg { width: 120px; height: 24px; }
@media (max-width: 720px) { .map-view .mv-body { flex-direction: column; } .map-view .mv-panel { width: auto; max-height: 45%; } }

/* A bubble waits, hidden, until its first words are spoken (the breathing dots show who's about to talk). */
.bubble.waiting { visibility: hidden; }

/* Notes: a notepad tab beside the transcript. */
.side-tabs { flex: 1; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--panel); border: 1px solid var(--line-soft); }
.side-tab { flex: 1; font: inherit; font-size: .95rem; font-weight: 500; background: none; border: 1px solid transparent; border-radius: var(--r-pill); padding: .35rem .8rem; color: var(--ink-soft); cursor: pointer; transition: background .15s, color .15s; }
.side-tab:hover { color: var(--ink); }
.side-tab.on { background: var(--panel-2); color: var(--ink); border-color: var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.side-tab:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.notes-count { display: inline-block; min-width: 1.2em; font-size: .72rem; line-height: 1.5; padding: 0 .4em; margin-left: .35em; border-radius: var(--r-pill); background: var(--brass-soft); color: var(--brass-ink); vertical-align: 1px; }
.notes-count:empty { display: none; }
.notes-panel { display: flex; flex-direction: column; gap: .8rem; min-height: 0; flex: 1; }
.notes-panel[hidden] { display: none; }
.note-form { display: flex; flex-direction: column; gap: .4rem; }
.note-form textarea { font: inherit; width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .55rem .7rem; background: var(--panel); color: var(--ink); resize: vertical; }
.note-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.note-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; overflow-y: auto; min-height: 0; }
.note-card { border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .6rem .75rem; background: var(--panel); display: flex; flex-direction: column; gap: .3rem; }
.note-when { font-size: .78rem; color: var(--ink-soft); }
.note-text { margin: 0; white-space: pre-wrap; }
.note-snap summary { cursor: pointer; font-size: .85rem; color: var(--ink-soft); }
.note-snap ol, .note-snap ul { margin: .35rem 0 0; padding-left: 1.1rem; font-size: .85rem; display: flex; flex-direction: column; gap: .2rem; }
.snap-pattern { margin: .35rem 0 0; font-size: .85rem; }
.note-btns { display: flex; gap: .9rem; }
.t-entry.flash { background: var(--brass-soft, #f1e7d2); transition: background .3s; }

/* Live: talk with the family. */
.live-btn { display: inline-flex; align-items: center; gap: .35rem; align-self: flex-end; height: 2.9rem; padding: 0 1rem; border-radius: var(--r-pill); border: 1px solid var(--brass); background: transparent; color: var(--brass-ink); font: inherit; font-weight: 500; cursor: pointer; }
.live-btn:hover, .live-btn.open { background: var(--brass-soft); }
.composer { position: relative; }
.composer-row[hidden] { display: none; }
.live-bar { display: flex; align-items: center; gap: .9rem; background: #2c2c2a; color: #fff; border-radius: var(--r-md); padding: .7rem 1rem; }
.live-bar[hidden] { display: none; }
.live-orb { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--brass); flex: none; transition: transform .12s; }
.live-text { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.live-text span { font-size: .82rem; opacity: .75; }
.live-round { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: #444441; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.live-round:hover { background: #5f5e5a; }
.live-round.off { background: #a32d2d; }
.live-round.end { background: #e24b4a; }
.live-round:focus-visible, .live-btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.live-card { position: absolute; right: 6.5rem; bottom: calc(100% - 2.2rem); z-index: var(--z-raised); width: min(22rem, 92vw); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .55rem; box-shadow: 0 18px 40px -18px rgba(0,0,0,.35); }
.live-card[hidden] { display: none; }
.live-card h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.35rem; }
.live-sub { margin: -.2rem 0 .2rem; font-size: .85rem; color: var(--ink-soft); }
.live-lab { font-size: .8rem; color: var(--ink-soft); margin-top: .2rem; }
.live-line { display: flex; gap: .55rem; align-items: center; }
.live-line[hidden] { display: none; }
.live-line select { flex: 1; min-width: 0; font: inherit; font-size: .9rem; padding: .35rem .5rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.live-meter { display: inline-flex; gap: 3px; align-items: flex-end; height: 16px; }
.live-meter i { width: 5px; height: 4px; border-radius: 2px; background: var(--line); transition: height .08s, background .08s; }
.live-meter i:nth-child(2) { height: 6px; } .live-meter i:nth-child(3) { height: 8px; } .live-meter i:nth-child(4) { height: 10px; } .live-meter i:nth-child(5) { height: 12px; } .live-meter i:nth-child(6) { height: 14px; }
.live-meter i.lit { background: var(--brass); }
.live-tog { display: flex; justify-content: space-between; align-items: center; gap: .8rem; font-size: .92rem; cursor: pointer; margin-top: .2rem; }
.live-tog small { display: block; font-size: .78rem; color: var(--ink-soft); }
.live-go { margin-top: .4rem; width: 100%; }
.live-quick { font-size: .8rem; color: var(--ink-soft); display: flex; gap: .4rem; align-items: center; justify-content: center; }
.live-quick[hidden] { display: none; }
.live-cap { position: absolute; left: 1rem; right: 1rem; bottom: .8rem; z-index: 8; background: rgba(44,44,42,.88); color: #fff; border-radius: var(--r-md); padding: .55rem .9rem; font-size: 1.02rem; line-height: 1.4; pointer-events: none; }
.live-cap[hidden] { display: none; }
.live-cap.quiet { color: rgba(255,255,255,.7); font-size: .92rem; }
.live-tog > span:not(.sw) { flex: 1; min-width: 0; }
.live-quick { flex-direction: row; }
/* On/off switches: every tick box is drawn as a switch (see makeSwitch in app.js). */
input.sw-input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.sw { --sw-w: 2.6rem; --sw-h: 1.5rem; --sw-pad: 3px; position: relative; display: inline-block; flex: none; width: var(--sw-w); height: var(--sw-h); border-radius: var(--r-pill); background: #c9cfc8; vertical-align: middle; cursor: pointer; transition: background .18s ease; }
.sw::after { content: ""; position: absolute; top: var(--sw-pad); left: var(--sw-pad); width: calc(var(--sw-h) - 2 * var(--sw-pad)); height: calc(var(--sw-h) - 2 * var(--sw-pad)); border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s ease; }
input.sw-input:checked + .sw { background: var(--brass); }
input.sw-input:checked + .sw::after { transform: translateX(calc(var(--sw-w) - var(--sw-h))); }
input.sw-input:focus-visible + .sw { outline: 2px solid var(--brass); outline-offset: 2px; }
input.sw-input:disabled + .sw { opacity: .45; cursor: default; }
label:has(> input.sw-input) { cursor: pointer; }
.live-quick .sw { --sw-w: 2.2rem; --sw-h: 1.3rem; }
.live-err { color: var(--reactive); margin: .1rem 0 0; }
.live-err[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .sw, .sw::after { transition: none; } }

/* ================= THE CLIENT'S SEAT ================= */
.people-top { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.people-tabs button { font-size: .88rem; padding: .35rem .95rem; }
.library-actions[hidden], .card-grid[hidden] { display: none !important; }
.card .bg.faint { color: var(--ink-faint); font-style: italic; }
.self-invite { border-style: dashed; background: var(--panel-2); }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 1rem; }
.self-map-row { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.self-map-row .fam-thumb { height: 150px; border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--panel); }
.disp-sliders { gap: 1rem; margin-top: .4rem; }
.share-row { align-items: flex-start; margin: .35rem 0; }
.share-row input { margin-top: .2rem; }
.share-row small { display: block; color: var(--ink-faint); font-size: .78rem; }
.support-line { flex: none; margin: .5rem 0 0; font-size: .8rem; color: var(--ink-faint); text-align: center; letter-spacing: .01em; }
.ts-body .support-line { text-align: left; }
.frame-block h3 { margin: 0 0 .3rem; font-size: 1rem; }
.frame-block p { margin: 0; color: var(--ink-soft); }

.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.kind-choice { text-align: left; font: inherit; display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.2rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; transition: border-color .15s, transform .15s; }
.kind-choice b { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.1; }
.kind-choice span { color: var(--ink-soft); font-size: .9rem; line-height: 1.45; }
.kind-choice:hover { border-color: var(--brass); transform: translateY(-1px); }
.kind-choice:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.seat-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(220px, 15vw, 290px) minmax(0, 1fr) clamp(300px, 24vw, 460px); gap: clamp(1rem, 1.4vw, 1.75rem); }
.seat-side { display: flex; flex-direction: column; gap: .9rem; min-height: 0; overflow-y: auto; }
.cs-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .85rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.cs-card select { width: 100%; }
.cs-who { display: flex; align-items: center; gap: .65rem; }
.cs-who b { display: block; font-weight: 600; }
.cs-who small { display: block; color: var(--ink-faint); font-size: .78rem; }
.cs-hint { margin: 0; font-size: .8rem; color: var(--ink-faint); line-height: 1.45; }
.seat-main { display: flex; flex-direction: column; min-height: 0; }
.seat-stage { flex: 1; min-height: 0; border-radius: var(--r-md); background: linear-gradient(180deg, var(--wall) 0%, var(--wall-2) 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4rem; padding: 1.5rem clamp(1rem, 4vw, 3.5rem); position: relative; overflow: hidden; }
.seat-stage::before { content: ""; position: absolute; inset: -20% 10% auto; height: 70%; background: radial-gradient(closest-side, var(--lamp-core), var(--lamp) 55%, transparent); pointer-events: none; }
.seat-face { position: relative; }
.mini.xl { width: clamp(110px, 17vh, 170px); height: clamp(110px, 17vh, 170px); }
.seat-face.talking .face .m-open { animation: talk-open .34s steps(1) infinite; }
.seat-face.talking .face .m-closed { animation: talk-closed .34s steps(1) infinite; }
.seat-line { position: relative; margin: 0; max-width: 46ch; min-height: 4.5em; max-height: 45%; overflow-y: auto; text-align: center; font-family: var(--serif); font-size: clamp(1.25rem, 1.1vw + .8rem, 1.75rem); line-height: 1.35; color: var(--room-ink); }
.seat-stage.thinking .seat-line::after { content: "…"; display: inline-block; animation: seat-breathe 1.4s ease-in-out infinite; color: var(--room-soft); }
@keyframes seat-breathe { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.seat-err { color: var(--tense); font-family: var(--sans); font-size: .95rem; }
.seat-stage .link-btn { color: var(--room-ink); font-family: var(--sans); font-size: .95rem; }
.seat-composer .composer-row textarea { height: 5rem; }
.seat-composer #seat-send { align-self: flex-end; height: 2.9rem; }
.seat-tx-h { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; }
.seat-switch { display: flex; align-items: center; gap: .6rem; font-size: .78rem; color: var(--brass-ink); }
.seat-switch::before, .seat-switch::after { content: ""; flex: 1; height: 1px; background: var(--brass); opacity: .45; }
.seat-switch span { font-weight: 600; }
.seat-switch time { color: var(--ink-faint); }
@media (prefers-reduced-motion: reduce) { .seat-face.talking .face .m-open, .seat-face.talking .face .m-closed, .seat-stage.thinking .seat-line::after { animation: none; } }
/* Narrower screens: only the method switch stays beside the session, as a slim row above it. */
@media (max-width: 1000px) {
  .seat-grid { grid-template-columns: minmax(0, 1fr) clamp(280px, 34vw, 400px); grid-template-rows: auto minmax(0, 1fr); row-gap: .6rem; }
  .seat-side { grid-column: 1; grid-row: 1; overflow: visible; }
  .seat-side .cs-card:not(.cs-method), .seat-side .cs-hint { display: none; }
  .seat-side .cs-method { flex-direction: row; align-items: center; gap: .8rem; padding: .5rem .8rem; }
  .seat-side .cs-method select { width: auto; flex: 1; min-width: 0; }
  .seat-main { grid-column: 1; grid-row: 2; }
  .seat-tx { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 720px) { .seat-grid { grid-template-columns: minmax(0, 1fr); } .seat-tx { display: none; } .kind-pick { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }

.sd-block { display: flex; flex-direction: column; gap: .7rem; }
.sd-block h3 { margin: 0; font-size: 1rem; }
.sd-item { border-left: 2px solid var(--brass); padding: .1rem 0 .1rem .9rem; display: flex; flex-direction: column; gap: .3rem; }
.sd-item b { font-weight: 600; }
.sd-item p { margin: 0; color: var(--ink-soft); line-height: 1.5; }
.sd-quote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink); line-height: 1.4; }
.sd-block.carry { background: var(--brass-soft); color: var(--brass-ink); border-radius: var(--r-md); padding: .9rem 1rem; }
.sd-block.carry p { margin: 0; }
.self-invite .bg { display: block; -webkit-line-clamp: unset; overflow: visible; }
.frame-block h3, .sd-block h3 { font-family: var(--sans); font-weight: 600; font-size: .95rem; color: var(--ink); letter-spacing: 0; text-transform: none; }

.ready-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .3rem; }
.ready-choice { font: inherit; text-align: left; display: flex; gap: .65rem; align-items: flex-start; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-2); color: var(--ink); cursor: pointer; }
.ready-choice:hover { border-color: var(--brass); }
.ready-choice b { display: block; font-weight: 600; }
.ready-choice small { display: block; color: var(--ink-soft); font-size: .8rem; line-height: 1.4; margin-top: .15rem; }
.thumb-btn.static { cursor: default; }
.thumb-btn.static:hover { border-color: var(--line-soft); }
.ss-welcome { max-width: 40rem; margin: 3rem auto; display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; }
.ss-welcome h2 { margin: 0; }
.sd-transcript { overflow: visible; }
@media (max-width: 720px) { .ready-pick { grid-template-columns: 1fr; } }

/* You tried to cut in and were talked over */
.bubble.you.talked-over { opacity: .55; font-style: italic; }
.t-entry.you.attempt { background: transparent; border: 1px dashed var(--brass); opacity: .85; }
.t-entry.you.attempt .t-text { font-style: italic; }

/* The session clock and turn counter, in the room's bottom-left corner (clear of your chair):
   time, whether it's paused, the turn count, and a bar for how much of the session is gone. */
.room-clock { position: absolute; bottom: .55rem; left: .7rem; z-index: 6; min-width: 17rem; display: flex; flex-direction: column; gap: .35rem; padding: .45rem .8rem .55rem; border-radius: var(--r-md); background: rgba(12, 19, 18, .92); border: 1px solid rgba(238, 241, 236, .22); color: var(--room-ink); pointer-events: none; }
.rc-top { display: flex; align-items: baseline; gap: .55rem; white-space: nowrap; }
.rc-top b { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 1.15rem; letter-spacing: .01em; }
.rc-top small { font-size: .82rem; color: #d3dcd8; }
.room-clock .room-turns { margin-left: auto; padding-left: .8rem; font-size: .82rem; color: #d3dcd8; font-variant-numeric: tabular-nums; }
.rc-bar { height: 5px; border-radius: 3px; background: rgba(238, 241, 236, .2); overflow: hidden; }
.rc-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: #a9c9bd; transition: width .25s linear; }
.room-clock.paused .rc-top b { color: #d3dcd8; }
.room-clock.late { border-color: var(--tense); }
.room-clock.late .rc-top b, .room-clock.late .room-turns { color: #f2c46a; }
.room-clock.late .rc-bar i { background: var(--tense); }
.room-clock.over { border-color: var(--reactive); }
.room-clock.over .rc-top b { color: #ff9a85; }
.room-clock.over .rc-bar i { background: var(--reactive); }
.room-clock.turns-late .room-turns { color: #f2c46a; }
.room-clock[hidden] { display: none; }
@media (max-width: 720px) { .room-clock { min-width: 0; left: 50%; transform: translateX(-50%); } .rc-top small { display: none; } }
.sc-length-label { margin-top: .9rem; display: block; }
.sc-length { width: auto; min-width: 11rem; }
@media (max-width: 720px) { .room-clock small { display: none; } }

/* ---------- Courses: a course guide builds a course, one question at a time ---------- */
.cw-root { flex: 1; min-height: 0; display: flex; flex-direction: column; --cw-line: color-mix(in srgb, var(--ink-faint) 55%, var(--line)); }
/* Selections are rings that follow each shape (box-shadow keeps the radius), never square outlines. */
.cw-chip:focus-visible, .cw-fam:focus-visible, .cw-person:focus-visible, .cw-course:focus-visible, .cw-tile-main:focus-visible, .cw-rail-btn:focus-visible, .cw-x:focus-visible, .cw-kind:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 45%, transparent); }

/* the shelf */
.cw-home { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.2rem; }
.cw-home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.cw-home-head h1 { margin: 0; }
.cw-home > .hint { margin: 0; }
.cw-shelf { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: minmax(190px, auto); gap: 1.1rem; align-content: start; padding: 4px; }
.cw-course { font: inherit; text-align: left; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: .5rem; padding: 1.3rem 1.4rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel-2); transition: transform .15s, border-color .15s, box-shadow .15s; }
.cw-course:hover { transform: translateY(-2px); border-color: var(--brass); box-shadow: 0 10px 28px -18px rgba(0,0,0,.35); }
.cw-course b { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }
.cw-course-kicker { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
.cw-course-desc { color: var(--ink-soft); font-size: .9rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cw-course-steps { margin-top: auto; display: flex; align-items: center; gap: .3rem; }
.cw-course-steps small { margin: 0 0 0 .35rem; color: var(--ink-faint); font-size: .8rem; }
.cw-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
:is(.cw-dot, .pv-n).k-drill { background: var(--brass); }
:is(.cw-dot, .pv-n).k-scenario { background: var(--primary); }
:is(.cw-dot, .pv-n).k-demo { background: var(--calm); }
.cw-new { border-style: dashed; background: transparent; justify-content: center; align-items: flex-start; }
.cw-plus { font-family: var(--serif); font-size: 2.6rem; line-height: .8; color: var(--brass); }

/* the wizard */
.cw { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cw-head { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr) minmax(110px, auto); align-items: center; gap: 1.2rem; padding-bottom: .9rem; border-bottom: 1px solid var(--cw-line); }
.cw-head-mid { display: flex; flex-direction: column; align-items: center; gap: .45rem; min-width: 0; }
.cw-kicker { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-head-actions { display: flex; gap: .5rem; justify-self: end; }
.cw-pill { font: inherit; font-size: .95rem; font-weight: 500; display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1.15rem; border-radius: var(--r-pill); border: 1px solid var(--cw-line); background: var(--panel-2); color: var(--ink); cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.cw-pill:hover { border-color: var(--ink-faint); background: var(--panel); }
.cw-pill.danger { color: var(--reactive); }
.cw-pill.danger:hover { border-color: var(--reactive); }
.cw-pill[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.cw-head > .cw-pill { justify-self: start; }
.cw-preview-toggle { display: none; }
.cw-rail { list-style: none; margin: 0; padding: 2px; display: flex; gap: .3rem; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.cw-rail-btn { font: inherit; font-size: .85rem; display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .8rem .3rem .3rem; border-radius: var(--r-pill); border: 1px solid transparent; background: none; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.cw-rail-btn:hover { background: var(--panel); }
.cw-rail-n { width: 1.55rem; height: 1.55rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: .75rem; font-weight: 600; background: var(--panel); border: 1px solid var(--line); color: var(--ink-soft); }
.cw-rail-btn[data-done="true"] .cw-rail-n { background: var(--brass-soft); border-color: var(--brass); color: var(--brass-ink); }
.cw-rail-btn[aria-current="step"] { background: var(--primary); color: var(--primary-ink); }
.cw-rail-btn[aria-current="step"] .cw-rail-n { background: var(--primary-ink); color: var(--primary); border-color: transparent; }

.cw-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(290px, 26vw, 400px); gap: clamp(1rem, 2.2vw, 2.4rem); padding-top: 1rem; }
.cw-q { min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: .4rem 4px .2rem; }
.cw-stack { flex: 1; min-height: 0; width: 100%; max-width: max(calc(100% - 3rem), min(100%, 880px)); display: flex; flex-direction: column; gap: .85rem; }
.cw-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1rem; }
.cw-card-head { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; }
.cw-card-head .cw-hint { margin: 0; }
.cw-card { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .9rem; padding: clamp(1.1rem, 2.2vw, 1.7rem); border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--cw-line); box-shadow: 0 22px 48px -34px rgba(0,0,0,.4); }
.cw-nav { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 .3rem; }
.cw-nav > :last-child { justify-self: end; }
.cw-nav > :first-child { justify-self: start; }
.cw-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, min(3.3vw, 5.5vh), 3.1rem); line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.cw-hint { margin: -.3rem 0 .4rem; color: var(--ink-soft); font-size: 1rem; max-width: 64ch; }
.cw-note { margin: 0; min-height: 1.3em; color: var(--brass-ink); font-size: .92rem; }
.cw-note:empty { display: none; }
.cw-input { width: 100%; font-size: 1rem; }
.cw-input.big { font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2.2rem); padding: .55rem .2rem; border: 0; border-bottom: 2px solid var(--cw-line); border-radius: 0; background: transparent; box-shadow: none; }
.cw-input.big:focus { border-bottom-color: var(--brass); box-shadow: none; }
textarea.cw-input { font-size: 1.02rem; line-height: 1.55; border-radius: var(--r-md); padding: .8rem 1rem; resize: none; border-color: var(--cw-line); }
.cw-suggest { display: flex; flex-direction: column; gap: .5rem; }
.cw-chips { display: flex; flex-wrap: wrap; gap: .45rem; padding: 2px; }
.cw-chip { font: inherit; font-size: .95rem; padding: .5rem 1rem; border-radius: var(--r-pill); border: 1px solid var(--cw-line); background: var(--panel-2); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.cw-chip:hover { border-color: var(--brass); }
.cw-chip.small { font-size: .85rem; padding: .35rem .8rem; }
.cw-chip.add { align-self: flex-start; border-style: dashed; color: var(--ink-soft); background: transparent; }
.cw-chip.num { min-width: 3.2rem; font-size: 1.15rem; font-family: var(--serif); }
.cw-chip[aria-pressed="true"], .cw-fam[aria-pressed="true"], .cw-person[aria-pressed="true"] { background: var(--brass-soft); border-color: var(--brass); color: var(--brass-ink); box-shadow: 0 0 0 2px var(--brass); }
.cw-methods { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem 1rem; align-items: start; }
.cw-method-group { display: contents; }
.cw-method-group h4 { padding-top: .5rem; text-align: right; width: 7.5rem; line-height: 1.3; }
.cw-chip.method { font-size: .86rem; padding: .32rem .8rem; }
.cw-chips:has(.method) { gap: .35rem; }
.cw-method-group h4 { margin: 0; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; font-family: var(--sans); }
.cw-picked { margin: 0; padding-top: .7rem; border-top: 1px solid var(--line-soft); font-size: .9rem; color: var(--ink-soft); line-height: 1.45; display: flex; flex-direction: column; gap: .15rem; height: calc(1.6rem + 1.45em + .85rem); overflow: hidden; }
.cw-picked-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-picked b { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--ink); margin-right: .5rem; }
.cw-picked small { margin: 0; color: var(--ink-faint); }
.cw-picked-what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-card:has(.cw-methods) { gap: .65rem; padding-block: .95rem; }
.cw-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.cw-kinds.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cw-kind { min-height: 150px; }
.cw-kind .td-icon { width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; background: var(--brass-soft); color: var(--brass-ink); }
.cw-kind .td-icon svg { width: 1.2rem; height: 1.2rem; }
.cw-step-tiles { list-style: none; margin: .4rem 0 0; padding: 2px; display: flex; flex-wrap: wrap; gap: .6rem; }
.cw-tile { display: flex; align-items: stretch; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel-2); }
.cw-tile-main { font: inherit; text-align: left; display: flex; align-items: center; gap: .7rem; padding: .6rem .5rem .6rem .7rem; background: none; border: 0; border-radius: var(--r-md); color: var(--ink); cursor: pointer; }
.cw-tile-main:hover b { color: var(--brass-ink); }
.cw-tile-n { width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-size: .82rem; font-weight: 600; }
.cw-tile-text { display: flex; flex-direction: column; line-height: 1.25; }
.cw-tile-text small { margin: 0; font-size: .72rem; color: var(--ink-faint); }
.cw-tile-text b { font-weight: 500; }
.cw-tile-move { display: flex; flex-direction: column; justify-content: center; padding-right: .3rem; }
.cw-x { font: inherit; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 0; background: none; color: var(--ink-soft); cursor: pointer; display: grid; place-items: center; font-size: 1rem; flex: none; }
.cw-x:hover:not(:disabled) { background: var(--panel); color: var(--ink); }
.cw-x:disabled { opacity: .25; cursor: default; }
.cw-fams { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; padding: 3px; }
.cw-fam { font: inherit; text-align: left; display: flex; flex-direction: column; gap: .45rem; padding: .9rem 1rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; transition: border-color .15s, transform .15s; }
.cw-fam:hover { border-color: var(--brass); transform: translateY(-1px); }
.cw-fam b { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.1; }
.cw-fam small { margin: 0; color: var(--ink-soft); font-size: .82rem; }
.cw-fam.action { border-style: dashed; background: transparent; }
.cw-faces { display: flex; }
.cw-faces > * { margin-right: -6px; box-shadow: 0 0 0 2px var(--panel-2); border-radius: 50%; }
.cw-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.cw-sub { display: flex; flex-direction: column; gap: .5rem; }
.cw-sub-label { font-size: .9rem; color: var(--ink-soft); font-weight: 500; }
.cw-who-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: 2px; }
.cw-who-row > small { margin: 0 .3rem 0 0; color: var(--ink-faint); font-size: .8rem; }
.cw-person { font: inherit; font-size: .9rem; display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .8rem .25rem .3rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; }
.cw-person:hover { border-color: var(--brass); }
.cw-lines-wrap { display: flex; flex-direction: column; gap: .6rem; }
.cw-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.cw-lines li { display: flex; align-items: center; gap: .6rem; }
.cw-line-n { flex: none; min-width: 1rem; font-size: .8rem; color: var(--brass); font-weight: 600; white-space: nowrap; }
.cw-lines .cw-input { border-radius: var(--r-pill); padding: .6rem 1rem; }
.cw-facts { display: flex; flex-direction: column; gap: .8rem; }
.cw-fact { display: flex; flex-direction: column; gap: .5rem; padding: .8rem; border-radius: var(--r-md); background: var(--panel); }
.cw-fact .cw-x { margin-left: auto; }
.cw-fact-text { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.cw-fact-text textarea { font-size: .92rem; }
.cw-count { font-size: .95rem; font-weight: 600; color: var(--ink-soft); }

/* the preview: what a student sees */
.cw-preview { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .8rem; padding: 0 0 1rem; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--cw-line); box-shadow: 0 22px 48px -34px rgba(0,0,0,.4); }
.cw-preview > :not(.pv-kicker) { margin-inline: 1rem; }
.pv-kicker { position: sticky; top: 0; z-index: 1; flex: none; padding: .8rem 1rem; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; text-align: center; background: var(--primary); color: var(--primary-ink); }
.pv-course, .pv-step { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 1rem 1.1rem; }
.pv-course h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.1; margin: .35rem 0 .3rem; }
.pv-course > p { margin: 0 0 .8rem; color: var(--ink-soft); font-size: .88rem; line-height: 1.45; }
.pv-method { display: inline-block; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; color: var(--brass-ink); background: var(--brass-soft); border-radius: var(--r-pill); padding: .2rem .6rem; }
.faint { color: var(--ink-faint) !important; font-style: italic; }
.pv-steps { list-style: none; margin: 0; padding: 2px; display: flex; flex-direction: column; gap: 2px; }
.pv-steps li { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: var(--r-md); }
.pv-steps li.on { background: var(--brass-soft); box-shadow: 0 0 0 2px var(--brass); }
.pv-steps small { display: block; margin: 0; font-size: .68rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .05em; }
.pv-steps b { font-weight: 500; font-size: .9rem; }
.pv-n { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .72rem; font-weight: 600; }
.pv-n.k-scenario { color: var(--primary-ink); }
.pv-empty { margin: 0; font-size: .85rem; color: var(--ink-faint); font-style: italic; }
.pv-step-kicker { display: inline-flex; align-items: center; gap: .35rem; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--brass); }
.pv-step-kicker .td-icon svg { width: .95rem; height: .95rem; }
.pv-step h4 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; margin: .25rem 0 .55rem; }
.pv-faces { display: flex; flex-wrap: wrap; gap: .5rem .8rem; font-size: .82rem; margin-bottom: .5rem; }
.pv-faces .who { display: inline-flex; align-items: center; gap: .3rem; }
.pv-scene { font-size: .85rem; color: var(--ink-soft); font-style: italic; margin: 0 0 .5rem; line-height: 1.45; }
.pv-task { font-size: .9rem; margin: 0 0 .5rem; padding: .55rem .75rem; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line-soft); }
.pv-goals small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin: .3rem 0 .2rem; }
.pv-goals ul { margin: 0; padding-left: 1.1rem; font-size: .86rem; line-height: 1.5; }
.pv-held { margin: .5rem 0 0; font-size: .82rem; color: var(--brass-ink); }

@media (max-width: 1000px) {
  .cw-body { grid-template-columns: minmax(0, 1fr); }
  .cw-preview { display: none; }
  .cw.show-preview .cw-preview { display: flex; }
  .cw.show-preview .cw-q { display: none; }
  .cw-preview-toggle { display: inline-flex; }
  .cw-methods { grid-template-columns: 1fr; gap: .3rem; }
  .cw-method-group h4 { text-align: left; width: auto; padding-top: .4rem; }
}
@media (max-width: 720px) {
  .cw-head { grid-template-columns: 1fr auto; }
  .cw-head-mid { grid-column: 1 / -1; grid-row: 2; align-items: stretch; }
  .cw-rail-btn { font-size: 0; gap: 0; padding: .2rem; }
  .cw-rail-btn[aria-current="step"] { font-size: .85rem; gap: .45rem; padding-right: .8rem; }
  .cw-kinds, .cw-kinds.two, .cw-fact-text { grid-template-columns: 1fr; }
  .cw-kind { min-height: 0; }
  .cw-title { font-size: 1.8rem; }
}

/* ---------- Courses: the name, description and method questions ---------- */
.cw-v { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .9rem; }
.cw-ideas-label { margin: 0; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.cw-chips.centered { justify-content: center; }
[data-group="core"] { --g: var(--brass); }
[data-group="family"] { --g: #4f8a76; }
[data-group="couples"] { --g: #b36a57; }
[data-group="individual"] { --g: #6870a8; }

/* Name: one big centred line */
.cw-name-1 { justify-content: safe center; align-items: center; text-align: center; gap: 1.1rem; }
.cw-name-1 .cw-input.big { text-align: center; font-size: clamp(2.2rem, 3.8vw, 3.6rem); max-width: 860px; }
.cw-name-1 .cw-chips { max-width: 860px; }
.cw-name-1 .cw-chip { font-size: 1rem; padding: .5rem 1.05rem; }

/* Description: a writing box, and three tip cards with an example each */
.cw-counted { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .35rem; }
.cw-counted textarea.cw-input { flex: 1; min-height: 6rem; font-size: 1.1rem; line-height: 1.6; }
.cw-chars { align-self: flex-end; font-size: .82rem; color: var(--ink-soft); }
.cw-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.2rem; }
.cw-guide-cards { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .45rem; min-height: 0; }
.cw-guide-cards li { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.8rem 1fr; column-gap: .65rem; row-gap: .1rem; align-content: center; padding: .45rem .8rem; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line-soft); }
.cw-guide-cards li > :not(.cw-g-n) { grid-column: 2; }
.cw-g-n { grid-row: span 3; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 600; background: var(--brass-soft); color: var(--brass-ink); }
.cw-guide-cards b { font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.cw-g-sub { color: var(--ink-soft); font-size: .9rem; line-height: 1.4; }
.cw-g-eg { font-family: var(--serif); font-size: 1.12rem; line-height: 1.35; color: var(--ink); margin-top: .15rem; font-style: italic; quotes: "\201C" "\201D"; }

/* Method: radio lists of the methods by group */
.cw-method { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.4rem; }
.cw-method h4 { margin: 0; font-size: .8rem; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; font-family: var(--sans); }
.cw-mr { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; align-content: start; }
.cw-mr-col { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.cw-mr-group { display: flex; flex-direction: column; gap: .05rem; }
.cw-mr-group h4 { padding: 0 0 .35rem .2rem; margin-bottom: .25rem; border-bottom: 2px solid var(--g); }
.cw-mradio { font: inherit; font-size: 1.08rem; line-height: 1.25; text-align: left; display: flex; align-items: center; gap: .6rem; padding: .28rem .3rem; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); cursor: pointer; }
.cw-mradio::before { content: ""; flex: none; width: .9em; height: .9em; border-radius: 50%; border: 1.5px solid var(--cw-line); background: var(--panel-2); }
.cw-mradio:hover { background: var(--panel); }
.cw-mradio[aria-pressed="true"] { font-weight: 600; }
.cw-mradio[aria-pressed="true"]::before { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 2.5px var(--panel-2); }
.cw-mradio:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 45%, transparent); }

/* The chosen method */
.cw-md { display: flex; flex-direction: column; gap: .35rem; min-height: 0; overflow: hidden; }
.cw-method .cw-md { padding: .2rem 0 .2rem 1.4rem; border-left: 1px solid var(--cw-line); }
.cw-mkicker { font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); display: inline-flex; align-items: center; gap: .45rem; }
.cw-mkicker::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--g); }
.cw-mname { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 2.7vw, 2.6rem); line-height: 1.05; margin-top: .1rem; }
.cw-mfounder { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.cw-mover { margin: .45rem 0 0; font-size: 1.05rem; line-height: 1.6; color: var(--ink); }
.cw-mtags { display: flex; flex-wrap: wrap; gap: .35rem; padding-top: .5rem; }
.cw-mtags span { font-size: .86rem; padding: .25rem .75rem; border-radius: var(--r-pill); background: var(--brass-soft); color: var(--brass-ink); }

/* On a short screen: smaller text, and the overview kept to a few lines */
@media (max-height: 820px) {
  .cw-card-head .cw-hint { display: none; }
  .cw-mover { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; font-size: .97rem; }
  .cw-mradio { font-size: .93rem; padding-block: .12rem; }
  .cw-mr-col { gap: .5rem; }
  .cw-mr-group h4 { padding-bottom: .25rem; margin-bottom: .15rem; }
  .cw-guide-cards b { font-size: .98rem; }
  .cw-g-sub { font-size: .84rem; line-height: 1.3; }
  .cw-g-eg { font-size: 1.02rem; line-height: 1.3; }
}

@media (max-width: 1000px) {
  .cw-about, .cw-method { grid-template-columns: 1fr; }
  .cw-method { flex: none; }
  .cw-method .cw-md { padding-left: 0; border-left: 0; padding-top: 1rem; border-top: 1px solid var(--cw-line); }
}
@media (max-width: 720px) {
  .cw-mr { grid-template-columns: 1fr; }
}

/* ---------- Courses: the steps question ---------- */
[data-kind="drill"] { --k: var(--brass); }
[data-kind="scenario"] { --k: var(--primary); }
[data-kind="demo"] { --k: var(--calm); }
[data-kind="lesson"] { --k: #6870a8; }
[data-kind="spot"] { --k: #8a6aa8; }
:is(.cw-dot, .pv-n).k-spot { background: #8a6aa8; }
[data-kind="map"] { --k: #5a8aa8; }
[data-kind="chair"] { --k: #a8785a; }
[data-kind="talk"] { --k: #5f8f6a; }
[data-kind="note"] { --k: #8a7d5a; }
[data-kind="reflect"] { --k: #6a8f9a; }
:is(.cw-dot, .pv-n).k-lesson { background: #6870a8; }
.cw-steps { position: relative; display: grid; grid-template-columns: minmax(230px, .75fr) minmax(0, 1.55fr); gap: 1.2rem; }

/* The steps, listed like the Training tab */
.cw-slist { list-style: none; margin: 0; padding: 0 .8rem 0 0; display: flex; flex-direction: column; gap: .3rem; min-height: 0; overflow: auto; border-right: 1px solid var(--cw-line); }
.cw-slist-row { display: flex; align-items: center; border-radius: var(--r-md); border: 1px solid transparent; }
.cw-slist-row:hover { background: var(--panel); }
.cw-slist-row[aria-current="true"] { background: var(--panel); border-color: var(--brass); }
.cw-slist-main { font: inherit; flex: 1; min-width: 0; display: flex; align-items: center; gap: .75rem; padding: .6rem .3rem .6rem .7rem; text-align: left; background: none; border: 0; border-radius: var(--r-md); color: var(--ink); cursor: pointer; }
.cw-snum { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--k, var(--primary)); color: #fff; font-size: .85rem; font-weight: 600; }
.cw-slist-row.new .cw-snum { background: none; color: var(--brass-ink); border: 1.5px dashed var(--brass); }
.cw-slist-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cw-slist-text b { font-weight: 500; font-size: 1.02rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cw-slist-text small { margin: 0; color: var(--ink-soft); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-slist-row[draggable="true"] { cursor: grab; position: relative; }
.cw-slist-row[draggable="true"] .cw-slist-main { cursor: grab; }
.cw-slist-row.dragging { opacity: .45; }
.cw-slist-row.drop-before::before, .cw-slist-row.drop-after::after { content: ""; position: absolute; left: .4rem; right: .4rem; height: 3px; border-radius: 3px; background: var(--brass); }
.cw-slist-row.drop-before::before { top: -3px; }
.cw-slist-row.drop-after::after { bottom: -3px; }
.cw-trash { flex: none; width: 2rem; height: 2rem; margin-right: .3rem; border-radius: 50%; border: 0; background: none; color: var(--ink-faint); display: grid; place-items: center; cursor: pointer; }
.cw-trash .td-icon { width: 1.05rem; height: 1.05rem; color: inherit; }
.cw-trash:hover { color: var(--reactive); background: color-mix(in srgb, var(--reactive) 12%, transparent); }
.cw-slist-main:focus-visible, .cw-trash:focus-visible, .cw-choice:focus-visible, .cw-sub-btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* The kinds of step */
[data-kind="video"] { --k: #b36a57; }
[data-kind="checkin"] { --k: #4f8a76; }
:is(.cw-dot, .pv-n).k-video { background: #b36a57; }
:is(.cw-dot, .pv-n).k-checkin { background: #4f8a76; }
/* The kinds of step: three across, the icon as the centrepiece */
.cw-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: .75rem; min-height: 0; }
.cw-choice { font: inherit; text-align: center; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; min-width: 0; padding: 1rem; overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--cw-line); background: var(--panel-2); color: var(--ink); cursor: pointer; transition: border-color .15s, transform .15s, background .15s; }
.cw-choice:not([aria-disabled="true"]):hover { border-color: var(--k); background: color-mix(in srgb, var(--k) 5%, var(--panel-2)); transform: translateY(-1px); }
.cw-choice[aria-disabled="true"] { cursor: default; }
.cw-choice .td-icon, .cw-ktag .td-icon { border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--k) 18%, var(--panel-2)); color: var(--k); }
.cw-choice .td-icon { flex: none; width: clamp(2.6rem, 8vh, 6rem); height: clamp(2.6rem, 8vh, 6rem); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 22%, transparent); transition: transform .2s ease; }
.cw-choice .td-icon svg { width: 50%; height: 50%; stroke-width: 1.6; }
.cw-choice:not([aria-disabled="true"]):hover .td-icon { transform: scale(1.05); }
.cw-choice-name { font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 2.4vh, 1.8rem); line-height: 1.05; }
.cw-choice-sub { display: none; }
.cw-choice-tags { position: absolute; top: .7rem; right: .7rem; display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.cw-tag { font-style: normal; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; padding: .15rem .5rem; border-radius: var(--r-pill); background: var(--panel); color: var(--ink-soft); border: 1px solid var(--line-soft); }
.cw-tag.guided { background: color-mix(in srgb, var(--k) 14%, var(--panel-2)); color: var(--k); border-color: color-mix(in srgb, var(--k) 35%, transparent); }

/* An open step: the picked kind, grown to fill the right side */
.cw-pane { min-height: 0; display: flex; flex-direction: column; gap: .65rem; padding: .9rem 1.2rem 1rem; border-radius: var(--r-md); background: color-mix(in srgb, var(--k) 4%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--k) 45%, var(--cw-line)); }
.cw-pane-head { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem .75rem; }
.cw-pane-step { font-family: var(--serif); font-size: 1.35rem; line-height: 1; }
.cw-ktag { display: inline-flex; align-items: center; gap: .4rem; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); }
.cw-ktag .td-icon { width: 1.6rem; height: 1.6rem; }
.cw-ktag .td-icon svg { width: .95rem; height: .95rem; }
.cw-pane-close { margin-left: auto; font-size: 1.35rem; }
.cw-pane-hint { margin: 0; font-size: .92rem; line-height: 1.4; color: var(--ink-soft); }
.cw-ghost { position: absolute; z-index: 2; pointer-events: none; border-radius: var(--r-md); background: color-mix(in srgb, var(--k) 4%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--k) 45%, var(--cw-line)); box-shadow: 0 18px 40px -28px rgba(0,0,0,.45); }
.cw-subrail { flex-basis: 100%; list-style: none; margin: 0; padding: 0 0 .65rem; display: flex; flex-wrap: wrap; gap: .3rem; border-bottom: 1px solid var(--cw-line); }
.cw-sub-btn { font: inherit; font-size: .84rem; white-space: nowrap; padding: .26rem .68rem; border-radius: var(--r-pill); border: 1px solid var(--cw-line); background: var(--panel-2); color: var(--ink-soft); cursor: pointer; }
.cw-sub-btn:hover { border-color: var(--brass); color: var(--ink); }
.cw-sub-btn[data-done="true"] { color: var(--ink); border-color: var(--brass); background: color-mix(in srgb, var(--brass-soft) 45%, var(--panel-2)); }
.cw-sub-btn[aria-current="step"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.cw-pane-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: .85rem; padding: 2px; }
.cw-pane .cw-fams { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem; }
.cw-pane .cw-fam { padding: .6rem .8rem; gap: .3rem; }
.cw-pane .cw-fam b { font-size: 1.12rem; }
.cw-pane .cw-fact-text textarea { min-height: 5.4rem; }
.cw-pane-body > * { flex-shrink: 0; }
@media (max-width: 1400px) {
  .cw-steps { grid-template-columns: minmax(185px, .55fr) minmax(0, 1.6fr); gap: 1rem; }
  .cw-slist { padding-right: .6rem; }
  .cw-slist-main { gap: .55rem; padding-left: .5rem; }
}

@media (max-height: 820px) {
  .cw-pick { gap: .55rem; }
  .cw-choice { padding: .6rem .7rem; gap: .35rem; }
  .cw-choice-name { font-size: 1.35rem; }
  .cw-choice .td-icon { width: clamp(2.4rem, 7.5vh, 3.6rem); height: clamp(2.4rem, 7.5vh, 3.6rem); }
  .cw-choice-tags { top: .4rem; right: .4rem; }
  .cw-choice-tags .cw-tag { font-size: .58rem; padding: .1rem .4rem; }

  .cw-slist-main { padding-block: .4rem; }
  .cw-pane { gap: .5rem; padding: .7rem 1rem .8rem; }
  .cw-pane-head { flex-wrap: nowrap; padding-bottom: .5rem; border-bottom: 1px solid var(--cw-line); }
  .cw-pane-head .cw-ktag, .cw-pane-hint { display: none; }
  .cw-subrail { flex-basis: auto; flex: 1; min-width: 0; padding: 0; border: 0; order: 2; }
  .cw-pane-close { order: 3; }
  .cw-pane-step { font-size: 1.15rem; }
  .cw-subrail { gap: .2rem; }
  .cw-sub-btn { font-size: .76rem; padding: .18rem .5rem; }
  .cw-pane-body textarea.cw-input { height: 4.4rem; }
  .cw-pane .cw-fam small { display: none; }
  .cw-pane .cw-fam { padding: .5rem .7rem; }
  .cw-pane .cw-fams + .cw-row .btn { padding-block: .3rem; }
  .cw-sub-btn { font-size: .8rem; padding: .2rem .65rem; }
}
@media (max-width: 1000px) {
  .cw-steps { grid-template-columns: 1fr; }
  .cw-slist { border-right: 0; padding-right: 0; overflow: visible; }
  .cw-steps-q .cw-v { flex: none; }
}
@media (max-width: 720px) {
  .cw-pick { grid-template-columns: 1fr; }
}

/* ---------- Courses: lessons ---------- */
/* A lesson is written in the Training lesson sheet at its own width and text size, with a slim column of tools on the left. */
.lesson-sheet { --k: #6870a8; --cw-line: color-mix(in srgb, var(--ink-faint) 55%, var(--line)); width: min(1320px, calc(100vw - 2rem)); height: calc(100vh - 1.5rem); max-height: calc(100vh - 1.5rem); max-width: none; }
.lesson-sheet .ls-box { height: 100%; display: flex; flex-direction: column; }
.lesson-sheet .ls-sheet { flex: 1; }
.ls-sheet { min-width: 0; min-height: 0; max-height: none; }
.ls-head { padding: 1.1em 1.6rem .6em; border-bottom: 1px solid var(--line-soft); }
.ls-head .ts-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ls-head .ts-kicker { color: var(--k); }
/* The name is the same box written and read; only its outline goes */
.lesson-sheet .ls-title { display: block; box-sizing: border-box; font: inherit; font-family: var(--serif); font-weight: 500; letter-spacing: normal; font-size: 1.8em; line-height: 1.2; height: calc(1.2em + .7rem + 2px); margin: .25em 0 0 -.75rem; padding: .3rem .75rem .4rem; border: 1px solid var(--cw-line); border-radius: var(--r-md); background: var(--panel); color: var(--ink); outline: none; width: min(calc(100% + .75rem), 40rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .15s, border-color .15s, box-shadow .15s; }
.lesson-sheet .ls-title:hover:not(.read) { background: color-mix(in srgb, var(--k) 4%, var(--panel)); }
.lesson-sheet .ls-title:focus { border-color: var(--k); box-shadow: 0 0 0 1px var(--k); background: color-mix(in srgb, var(--k) 7%, var(--panel)); }
.lesson-sheet .ls-title.read { border-color: transparent; background: none; }
.ls-head-actions { display: flex; align-items: center; gap: .6rem; flex: none; }
.lesson-sheet .ls-head-actions .cw-pill { min-width: 11.5em; justify-content: center; text-align: center; }
.lesson-sheet .ls-head-actions .cw-pill[aria-pressed="true"] { background: var(--k); border-color: var(--k); color: #fff; opacity: 1; }

/* Buttons to add a picture */
.ls-tool { font: inherit; font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: .4rem; padding: .3rem .75rem .3rem .35rem; border: 1px solid var(--cw-line); border-radius: var(--r-pill); background: var(--panel); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.ls-tool:hover:not(:disabled), .ls-tool:focus-visible { border-color: var(--k); background: color-mix(in srgb, var(--k) 6%, var(--panel)); outline: none; }
.ls-tool:disabled { opacity: .5; cursor: default; }
.ls-tool .td-icon { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--k) 13%, var(--panel)); color: var(--k); }
.ls-tool .td-icon svg { width: 1rem; height: 1rem; }

/* Back to the four looks, beside the student view. Hidden, it keeps its room, so the title never moves. */
.lesson-sheet .ls-head-actions .ls-back { min-width: 0; white-space: nowrap; }
.ls-back.off { visibility: hidden; }
.ls-studentbtn:disabled { opacity: .45; cursor: default; }
.lesson-sheet { --good: var(--success); --warm: var(--reactive); }

/* The page */
.ls-page { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 1.3em 1.6rem 1.2em; overflow-wrap: anywhere; }
.ls-lbl { font-family: var(--sans); font-size: .74em; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 .5em; font-weight: 600; }
.ls-nothing { margin: 3em auto; color: var(--ink-faint); font-style: italic; }
.ts-intro.faint { color: var(--ink-faint); font-style: italic; }

/* A place to write: outlined while writing, bare when read, the same size either way */
.ls-f { --py: .3em; --px: .5em; min-width: 0; margin: calc(-1 * var(--py)) calc(-1 * var(--px)); padding: var(--py) var(--px); border: 1px solid transparent; border-radius: var(--r-sm); white-space: pre-wrap; overflow-wrap: anywhere; outline: none; transition: background .15s, border-color .15s, box-shadow .15s; }
.ls-f:not(.read) { border-color: var(--cw-line); background: var(--panel); cursor: text; }
.ls-f:not(.read):hover { background: color-mix(in srgb, var(--k) 4%, var(--panel)); }
.ls-f:not(.read):focus { border-color: var(--k); box-shadow: 0 0 0 1px var(--k); background: color-mix(in srgb, var(--k) 7%, var(--panel)); }
.ls-list { padding-left: calc(var(--px) + 1.1em); }
.ls-list li { margin: .1em 0; }
.ls-list li::marker { color: var(--ink-faint); }
.k-sounds .ls-list li { font-style: italic; color: var(--ink-soft); }
.ls-f.blank::before { content: attr(data-ph); color: var(--ink-faint); opacity: .75; pointer-events: none; }

/* Picking a look */
.ls-choose { margin: auto; width: min(100%, 58em); display: flex; flex-direction: column; align-items: center; gap: .6em; text-align: center; padding: 1em 0; }
.ls-choose h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7em; margin: 0; }
.ls-choose .hint { margin: 0; }
.ls-looks { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1em; margin: .9em 0 .4em; }
.ls-look { font: inherit; display: flex; flex-direction: column; align-items: center; gap: .45em; padding: 1.2em 1em 1.3em; border: 1px solid var(--cw-line); border-radius: var(--r-md); background: var(--panel); color: var(--ink); cursor: pointer; text-align: center; transition: background .15s, border-color .15s, box-shadow .15s; }
.ls-look:hover, .ls-look:focus-visible { border-color: var(--k); background: color-mix(in srgb, var(--k) 5%, var(--panel)); outline: none; }
.ls-look[aria-pressed="true"] { border-color: var(--k); box-shadow: 0 0 0 1px var(--k); }
.ls-look b { font-size: 1em; }
.ls-look small { font-size: .8em; line-height: 1.45; color: var(--ink-soft); }
.ls-thumb { display: block; width: 100%; max-width: 9em; aspect-ratio: 104 / 86; margin-bottom: .3em; }
.ls-thumb svg { width: 100%; height: 100%; stroke: var(--line); }
.ls-thumb .ink { stroke: var(--k); }
.ls-thumb .soft { stroke: color-mix(in srgb, var(--k) 30%, var(--panel)); }
.ls-thumb .rule { stroke: var(--line-soft); stroke-width: 1.2; }
.ls-thumb .fill { fill: color-mix(in srgb, var(--k) 16%, var(--panel)); stroke: none; }
.ls-thumb .warm { fill: color-mix(in srgb, var(--warm) 22%, var(--panel)); stroke: none; }
.ls-thumb circle.ink { fill: var(--k); stroke: none; }
.ls-thumb .soft-f { fill: color-mix(in srgb, var(--k) 30%, var(--panel)); stroke: none; }

/* Text lesson: ruled rows */
.lt { display: grid; grid-template-columns: 11em minmax(0, 48em); column-gap: 2em; align-content: start; }
.lt-l, .lt-t { border-top: 1px solid var(--line-soft); padding: .8em 0; }
.lt-l { font-family: var(--serif); font-size: 1.15em; line-height: 1.3; padding-top: .72em; }
.lt-t { font-size: .95em; line-height: 1.6; }
.lt-t.k-learn { font-size: 1.05em; color: var(--ink-soft); }
.lt > :nth-last-child(-n+2) { border-bottom: 1px solid var(--line-soft); }

/* Picture lesson: half and half */
.lp { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.6em; }
.lp.bare { grid-template-columns: minmax(0, 46em); }
.lp-txt { display: flex; flex-direction: column; gap: 1.25em; min-width: 0; }
.lp-sec { min-width: 0; font-size: .92em; line-height: 1.55; }
.lp-sec .lead { font-family: var(--serif); font-size: 1.5em; line-height: 1.32; }
.lp-sec.k-next { border-left: 2px solid var(--brass); padding-left: .85em; }
.lp-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6em; }

/* A picture: a genogram or an image, in a frame, with a caption */
.ls-pic { margin: 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: .45em; }
.ls-frame { position: relative; flex: 1; min-height: 15em; border-radius: var(--r-md); overflow: hidden; background: color-mix(in srgb, var(--k) 6%, var(--panel)); }
/* An image is shown whole, at its own shape, never cropped or blown up */
.ls-frame.is-img { background: none; }
.ls-frame > img { position: absolute; inset: 0; margin: auto; display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: var(--r-md); }
.ls-cap { font-size: .8em; line-height: 1.4; font-style: italic; text-align: center; color: var(--ink-soft); outline: none; overflow-wrap: anywhere; }
.ls-cap { padding: .15em .4em; }
.ls-cap.edit { border-radius: 6px; cursor: text; }
.ls-cap.edit:hover, .ls-cap.edit:focus { background: color-mix(in srgb, var(--k) 8%, var(--panel)); }
.ls-cap.none { visibility: hidden; }
.ls-cap.blank::before { content: attr(data-ph); color: var(--ink-faint); }
.ls-pic-bar { position: absolute; top: .5rem; right: .5rem; z-index: 2; display: flex; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: var(--panel); box-shadow: 0 1px 4px rgba(0,0,0,.15); opacity: 0; transition: opacity .15s; }
.ls-pic:hover .ls-pic-bar, .ls-pic:focus-within .ls-pic-bar { opacity: 1; }
.ls-bar-btn { font: inherit; font-size: .8rem; font-weight: 600; height: 1.9rem; padding: 0 .65rem; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.ls-bar-btn:hover, .ls-bar-btn:focus-visible { background: color-mix(in srgb, var(--k) 12%, var(--panel)); color: var(--ink); outline: none; }
.ls-bar-btn.on { background: var(--k); color: #fff; }
.ls-bar-btn.x { width: 1.9rem; padding: 0; font-size: 1.05rem; }
.ls-bar-btn.x:hover { color: var(--reactive); }
.ls-bar-btn:disabled { opacity: .3; cursor: default; }
.ls-slot { flex: 1; min-height: 15em; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7em; padding: 1em; border: 1.5px dashed var(--cw-line); border-radius: var(--r-md); background: color-mix(in srgb, var(--k) 3%, var(--panel-2)); text-align: center; }
.ls-slot small { font-size: .8em; color: var(--ink-faint); }
.ls-slot-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .6em; }
.ls-slot.drop-here, .ls-pic.drop-here .ls-frame { outline: 2px dashed var(--k); outline-offset: -2px; background: color-mix(in srgb, var(--k) 10%, var(--panel)); }

/* Cards: one at a time */
.lc { flex: 1; display: flex; flex-direction: column; gap: 1.1em; }
.lc-stage { flex: 1; min-height: 16em; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.6em; }
.lc-stage.bare { grid-template-columns: minmax(0, 36em); justify-content: center; }
.lc-words { align-self: center; display: flex; flex-direction: column; gap: 1.1em; max-width: 26em; min-width: 0; }
.lc-t { font-family: var(--serif); font-size: 1.8em; line-height: 1.15; }
.lc-b { font-size: 1.1em; line-height: 1.6; color: var(--ink-soft); }
.lc-nav { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: .5em; padding-top: .9em; border-top: 1px solid var(--line-soft); }
.lc-nav .spacer { flex: 1; }
.lc-nav .cw-chip { align-self: center; }
.lc-count { font-size: .72em; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--brass-ink); margin-right: .6em; }
.lc-dots { display: flex; gap: .4em; margin-right: .5em; }
.lc-dots button { width: .6em; height: .6em; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--line); cursor: pointer; transition: width .2s, background .2s; }
.lc-dots button.on { width: 1.6em; background: var(--brass); }

/* Conversation: a transcript with notes */
.lv { display: flex; flex-direction: column; gap: 1.2em; }
.lv-intro { font-size: 1.05em; line-height: 1.6; color: var(--ink-soft); max-width: 50em; }
.lv-script { display: grid; grid-template-columns: 7em minmax(0, 1fr) 17em auto; column-gap: 1.6em; border-top: 1px solid var(--line-soft); }
.lv-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: start; padding: .6em 0; border-bottom: 1px solid var(--line-soft); }
.lv-who { font-weight: 600; font-size: .95em; line-height: 1.5; }
.lv-row.m-good .lv-who { color: var(--good); }
.lv-said { font-size: .95em; line-height: 1.5; }
.lv-row.m-key .lv-said { background: color-mix(in srgb, var(--warm) 10%, var(--panel)); }
.lv-row.m-good .lv-said { background: color-mix(in srgb, var(--good) 11%, var(--panel)); }
.lv-note { display: flex; gap: .4em; align-items: baseline; min-width: 0; font-size: .84em; line-height: 1.45; font-style: italic; color: var(--ink-soft); padding-top: .12em; }
.lv-note b { flex: none; font-style: normal; color: var(--ink); }
.lv-row.m-key .lv-note b { color: var(--warm); }
.lv-row.m-good .lv-note b { color: var(--good); }
.lv-note .ls-f { flex: 1; margin-left: 0; }
.lv-tools.off { visibility: hidden; }
.lv-tools { display: flex; align-items: center; gap: 4px; }
.lv-mark { font: inherit; font-size: .72rem; font-weight: 600; padding: .22rem .6rem; border: 1px solid var(--line-soft); border-radius: var(--r-pill); background: var(--panel); color: var(--ink-soft); cursor: pointer; }
.lv-mark:hover { border-color: var(--ink-faint); color: var(--ink); }
.lv-mark.m-key[aria-pressed="true"] { background: var(--warm); border-color: var(--warm); color: #fff; }
.lv-mark.m-good[aria-pressed="true"] { background: var(--good); border-color: var(--good); color: #fff; }
.lv-add { align-self: flex-start; }
.lv .lp-sec.k-next { max-width: 50em; }
.ls-count { margin: 0; align-self: center; font-size: .85rem; }

/* The genogram builder */
/* The genogram in a lesson picture (lesson-genogram.js). It fills its frame. */
.gx { --gx-k: var(--k, #6870a8); --gx-warm: var(--reactive); --gx-bg: color-mix(in srgb, var(--gx-k) 6%, var(--panel));
  position: absolute; inset: 0; overflow: hidden; font-size: 15px; -webkit-user-select: none; user-select: none; }
.gx input { -webkit-user-select: text; user-select: text; }
.gx-canvas { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.gx.panning .gx-canvas { cursor: grabbing; }
.gx-hint { position: absolute; right: .8em; bottom: .75em; max-width: 50%; text-align: right; font-size: .72em; color: var(--ink-faint); pointer-events: none; }

/* Zoom, bottom left */
.gx-zoom { position: absolute; z-index: 3; left: .6rem; bottom: .6rem; display: flex; align-items: center; padding: 2px; border-radius: var(--r-pill); background: var(--panel); border: 1px solid var(--line-soft); box-shadow: 0 6px 16px -10px rgba(0,0,0,.35); font-size: .76rem; opacity: .85; }
.gx-zoom:hover { opacity: 1; }
.gx-zoom button { border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; font-weight: 700; min-width: 1.9rem; height: 1.9rem; border-radius: var(--r-pill); }
.gx-zoom button:hover { background: color-mix(in srgb, var(--gx-k) 12%, var(--panel)); }
.gx-zoom .gx-pct { min-width: 3.2rem; font-weight: 600; color: var(--ink-soft); }

/* The toolbar, floating top left */
.gx-float { position: absolute; z-index: 4; left: .6rem; top: .6rem; display: flex; align-items: stretch; gap: 2px; padding: 4px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line-soft); box-shadow: 0 10px 28px -12px rgba(0,0,0,.35); font-size: .78rem; max-width: calc(100% - 1.2rem); }
.gx-grip { flex: none; width: .95rem; display: grid; place-items: center; cursor: grab; color: var(--ink-faint); border-radius: 6px; touch-action: none; }
.gx-grip:hover { background: color-mix(in srgb, var(--gx-k) 10%, transparent); color: var(--ink-soft); }
.gx-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.gx-tb { font: inherit; padding: .32em .55em; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); cursor: pointer; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: .4em; }
.gx-tb:hover:not(:disabled) { background: color-mix(in srgb, var(--gx-k) 12%, var(--panel)); }
.gx-tb:disabled { opacity: .35; cursor: default; }
.gx-tb.quiet { font-weight: 500; color: var(--ink-soft); }
.gx-tb.on { background: var(--gx-k); color: #fff; }
.gx-tb.on:hover:not(:disabled) { background: color-mix(in srgb, var(--gx-k) 85%, #000); }
.gx-tb.danger { color: var(--gx-warm); }
.gx-tb.ln[aria-pressed="true"] { background: color-mix(in srgb, var(--gx-k) 15%, var(--panel)); box-shadow: inset 0 0 0 1.5px var(--gx-k); }
.gx-tb[aria-expanded="true"] { background: color-mix(in srgb, var(--gx-k) 15%, var(--panel)); }
.gx-div { width: 1px; align-self: stretch; background: var(--line-soft); margin: 2px 3px; }
.gx-pill { display: inline-flex; margin-left: 4px; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 1px; }
.gx-pill .gx-tb { border-radius: var(--r-pill); }
.gx-done { margin-left: 4px; background: var(--gx-k); color: #fff; }
.gx-done:hover:not(:disabled) { background: color-mix(in srgb, var(--gx-k) 85%, #000); }
.gx-inp { font: inherit; padding: .3em .5em; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); color: var(--ink); min-width: 0; }
.gx-inp:focus { outline: 2px solid color-mix(in srgb, var(--gx-k) 45%, transparent); outline-offset: 0; }
.gx-n { width: 7em; } .gx-a { width: 3.4em; }
.gx-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.gx-seg button { font: inherit; border: 0; background: var(--panel-2); color: var(--ink); padding: .3em .5em; cursor: pointer; display: grid; place-items: center; }
.gx-seg button svg { width: .95em; height: .95em; fill: none; stroke: currentColor; stroke-width: 1.6; }
.gx-seg button[aria-pressed="true"] { background: var(--gx-k); color: #fff; }
.gx-st button { font-weight: 600; padding: .3em .6em; }

/* Pop-ups: the six lines, Save and Load */
.gx-pop { position: absolute; z-index: 5; display: flex; flex-direction: column; gap: 2px; padding: 5px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line-soft); box-shadow: 0 12px 30px -12px rgba(0,0,0,.4); font-size: .78rem; }
.gx-lines .gx-tb { justify-content: flex-start; }
.gx-lbl { color: var(--ink-faint); font-weight: 600; padding: .2em .5em .3em; }
.gx-sw { width: 2.6em; height: 1em; display: block; overflow: visible; flex: none; }
.gx-menu { width: 17rem; gap: 6px; padding: 9px; }
.gx-menu > b { font-size: .95em; }
.gx-menu .gx-row { flex-wrap: nowrap; justify-content: space-between; gap: 8px; }
.gx-note { color: var(--ink-soft); line-height: 1.35; }
.gx-list { display: flex; flex-direction: column; gap: 2px; max-height: 13rem; overflow: auto; margin: 0 -4px; }
.gx-item { display: flex; align-items: center; gap: 2px; border-radius: var(--r-sm); }
.gx-item:hover { background: color-mix(in srgb, var(--gx-k) 8%, var(--panel)); }
.gx-item.ask { padding: .25em .3em .25em .5em; background: color-mix(in srgb, var(--gx-warm) 9%, var(--panel)); }
.gx-item.ask span { flex: 1; min-width: 0; }
.gx-open { font: inherit; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: .4em .5em; border: 0; background: none; color: var(--ink); cursor: pointer; text-align: left; }
.gx-open b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.gx-open small { color: var(--ink-faint); }
.gx-x { font: inherit; border: 0; background: none; color: var(--ink-faint); cursor: pointer; font-size: 1.15em; width: 1.8em; height: 1.8em; border-radius: 6px; }
.gx-x:hover { color: var(--gx-warm); background: color-mix(in srgb, var(--gx-warm) 10%, transparent); }
.ls-frame.is-fig { cursor: default; }

@media (max-height: 820px) {
  .ls-head { padding: .8em 1.4rem .5em; }
  .ls-page { padding: 1em 1.4rem 1em; }
  .lp-txt { gap: 1.05em; }
  .lesson-sheet .sheet-foot { padding: .7rem 1.4rem .9rem; }
}
@media (max-width: 720px) {
  .ls-tool span:last-child { display: none; }
  .ls-tool { padding: .3rem; }
  .ls-head-actions .cw-pill { display: none; }
  .ls-looks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lt, .lp, .lp-pair, .lc-stage { grid-template-columns: minmax(0, 1fr); }
  .lv-script { grid-template-columns: 5em minmax(0, 1fr); }
  .lv-tools.off { display: none; }
  .lv-note, .lv-tools { grid-column: 2; }
}

/* A drill, scenario or demo opens in the same sheet as a lesson */
.step-sheet .ss-page { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .9rem; overflow: auto; padding: .9rem 1.6rem 1.1rem; }
.step-sheet .ss-rail { order: 0; flex: none; justify-content: center; padding: 0 0 .9rem; border-bottom: 1px solid var(--line-soft); }
.step-sheet .ss-q { width: min(100%, 60rem); margin: auto; display: flex; flex-direction: column; gap: .9rem; }
.step-sheet .ss-q > * { flex-shrink: 0; }
.step-sheet .cw-title { font-size: clamp(1.6rem, min(2.6vw, 4.4vh), 2.4rem); }
.step-sheet .cw-fams { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; max-height: min(17rem, calc(100vh - 28rem)); overflow-y: auto; padding: 3px 6px 3px 3px; }
.step-sheet .cw-fam { padding: .9rem 1.05rem; min-height: 7rem; gap: .45rem; }
.step-sheet .cw-fam b { font-size: 1.35rem; }
.step-sheet .cw-fam small { font-size: .88rem; }
.step-sheet .ts-kicker { color: var(--k); }
/* A drill screen drawn by its own file fills the page under the question tabs */
.step-sheet .ss-full { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* The first page of a drill: a big warm card to describe it for AI, and building it yourself beside it */
.ds-start { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(16rem, 24vw, 22rem); gap: clamp(.9rem, 1.6vw, 1.4rem); }
.ds-ai { min-height: 0; display: flex; flex-direction: column; gap: clamp(.45rem, 1.3vh, .9rem); padding: clamp(1rem, 2.6vh, 1.8rem) clamp(1.1rem, 2vw, 2rem); border-radius: var(--r-md); background: linear-gradient(160deg, color-mix(in srgb, var(--brass-soft) 70%, var(--panel-2)), var(--panel-2) 60%); border: 1px solid color-mix(in srgb, var(--brass) 45%, var(--line-soft)); box-shadow: 0 18px 40px -30px rgba(0,0,0,.5); }
.ds-headrow { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ds-h { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, min(3vw, 5vh), 2.8rem); line-height: 1.05; }
.ds-tag { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--brass-ink); background: var(--brass-soft); border-radius: var(--r-pill); padding: .22rem .65rem; white-space: nowrap; }
.ds-ic { display: inline-flex; color: var(--brass); }
.ds-lede { margin: 0; color: var(--ink-soft); font-size: clamp(.9rem, 1.9vh, 1.05rem); line-height: 1.45; max-width: 46rem; }
.ds-paper { flex: 1; min-height: 5rem; display: flex; position: relative; }
.ds-paper textarea { flex: 1; width: 100%; resize: none; outline: none; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-2); padding: .9rem 1.1rem 1.6rem; font: inherit; font-family: var(--serif); font-size: clamp(1.05rem, 2.4vh, 1.35rem); line-height: 1.45; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.ds-paper textarea:focus { border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 25%, transparent); }
.ds-paper textarea[readonly] { color: var(--ink-soft); }
.ds-count { position: absolute; right: .9rem; bottom: .55rem; font-size: .75rem; color: var(--ink-faint); pointer-events: none; }
.ds-bottom { display: flex; align-items: flex-end; gap: 1.2rem; }
.ds-fam { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.ds-lab { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.ds-chips { display: flex; flex-wrap: wrap; gap: .4rem; max-height: 5.4rem; overflow-y: auto; padding: 2px; }
.ds-chip { font: inherit; display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); border-radius: var(--r-pill); padding: .34rem .85rem; font-size: .86rem; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s, box-shadow .15s; }
.ds-chip:hover { border-color: var(--brass); }
.ds-chip[aria-pressed="true"] { background: var(--brass-soft); border-color: var(--brass); color: var(--brass-ink); box-shadow: 0 0 0 1.5px var(--brass); font-weight: 600; }
.ds-act { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; max-width: 22rem; }
.ds-warn { font-size: .84rem; line-height: 1.3; color: var(--ink-soft); text-align: right; }
.ds-warn.err { color: var(--reactive); font-weight: 600; }
.ds-go { font: inherit; display: inline-flex; align-items: center; gap: .55rem; border: 0; border-radius: var(--r-pill); background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 1rem; padding: .72rem 1.5rem; cursor: pointer; white-space: nowrap; box-shadow: 0 10px 24px -14px rgba(0,0,0,.6); transition: filter .15s, transform .15s; }
.ds-go:hover { filter: brightness(1.12); transform: translateY(-1px); }
.ds-go .ds-ic { font-size: 1.1em; }
.ds-prog { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) auto; gap: .8rem; align-items: center; }
.ds-st { display: flex; gap: .65rem; align-items: center; padding: .6rem .8rem; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--ink-faint); min-width: 0; }
.ds-st-text { min-width: 0; }
.ds-st b { display: block; font-size: .9rem; color: inherit; }
.ds-st small { display: block; font-size: .78rem; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-dot { flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 1.5px solid currentColor; font-size: .8rem; font-weight: 700; }
.ds-st.now { color: var(--ink); border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); }
.ds-st.now .ds-dot { border: 0; color: var(--brass); }
.ds-st.done { color: var(--ink); }
.ds-st.done .ds-dot { background: #3f8a5c; border-color: #3f8a5c; color: #fff; }
.ds-spin { display: inline-block; width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ds-spin .8s linear infinite; }
@keyframes ds-spin { to { transform: rotate(360deg); } }
.ds-keep { font-size: .84rem; color: var(--ink-soft); }
.ds-bar { grid-column: 1 / -1; height: 5px; border-radius: var(--r-pill); background: var(--line-soft); overflow: hidden; }
.ds-bar span { display: block; height: 100%; background: var(--brass); border-radius: inherit; transition: width 1.2s ease; }
.ds-self { min-height: 0; display: flex; flex-direction: column; padding: clamp(1rem, 2.6vh, 1.6rem) 1.2rem; border-radius: var(--r-md); border: 1px dashed var(--line); }
.ds-self h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.1; }
.ds-self p { margin: .25rem 0 0; color: var(--ink-soft); font-size: .9rem; }
.ds-steps { list-style: none; margin: clamp(.6rem, 2vh, 1.2rem) 0; padding: 0; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-evenly; position: relative; }
.ds-steps::before { content: ""; position: absolute; left: .85rem; top: 1rem; bottom: 1rem; width: 1.5px; background: var(--line); }
.ds-steps button { font: inherit; position: relative; width: 100%; display: flex; gap: .7rem; align-items: center; border: 0; background: none; padding: .3rem .4rem .3rem 0; border-radius: var(--r-sm); cursor: pointer; text-align: left; font-size: .92rem; color: var(--ink); }
.ds-steps button:hover { background: var(--panel); }
.ds-steps i { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--panel-2); border: 1.5px solid var(--line); font-style: normal; font-size: .78rem; font-weight: 700; color: var(--ink-soft); }
.ds-manual { font: inherit; align-self: flex-start; border: 1px solid var(--line); border-radius: var(--r-pill); padding: .55rem 1.25rem; background: var(--panel-2); color: var(--ink); font-weight: 600; cursor: pointer; transition: border-color .15s; }
.ds-manual:hover { border-color: var(--brass); }

/* Try it: what's ready on the left, the room on the right. The real room moves in while trying. */
.dt { flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(17rem, 24vw, 22rem) minmax(0, 1fr); gap: clamp(.9rem, 1.6vw, 1.4rem); }
.dt-side { min-height: 0; display: flex; flex-direction: column; gap: .55rem; padding: .95rem 1.1rem; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line-soft); overflow-y: auto; }
.dt-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.dt-h { margin: -.3rem 0 0; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.1; }
.dt-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.dt-checks li { display: flex; align-items: center; gap: .6rem; padding: .4rem .6rem; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line-soft); }
.dt-checks li.todo { border-color: color-mix(in srgb, var(--reactive) 45%, var(--line-soft)); }
.dt-dot { flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-size: .78rem; font-weight: 700; color: #fff; background: #3f8a5c; }
.dt-checks li.todo .dt-dot { background: var(--reactive); }
.dt-check-text { flex: 1; min-width: 0; }
.dt-check-text b { display: block; font-size: .9rem; }
.dt-check-text small { display: block; font-size: .78rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-edit { font: inherit; flex: none; border: 0; background: none; color: var(--ink-soft); font-size: .8rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.dt-checks li.todo .dt-edit { color: var(--reactive); }
.dt-mode { margin-top: auto; display: flex; flex-direction: column; gap: .4rem; }
.dt-lab { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.dt-seg { display: inline-flex; align-self: flex-start; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--panel-2); border: 1px solid var(--line-soft); }
.dt-seg button { font: inherit; border: 0; background: none; border-radius: var(--r-pill); padding: .32rem .9rem; font-size: .86rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.dt-seg button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.dt-hint { margin: 0; font-size: .84rem; color: var(--ink-soft); line-height: 1.4; }
.dt-door { min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .7rem; padding: 1.5rem; border-radius: var(--r-md); border: 1px solid var(--line-soft); background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--brass-soft) 55%, var(--panel-2)), var(--panel) 75%); }
.dt-door.locked { background: var(--panel); border-style: dashed; }
.dt-door.locked .dt-faces { opacity: .45; filter: grayscale(.6); }
.dt-faces { display: flex; gap: .4rem; }
.dt-faces .mini { width: 3.4rem; height: 3.4rem; }
.dt-door-h { margin: .3rem 0 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.1; }
.dt-door-p { margin: 0; max-width: 34rem; color: var(--ink-soft); font-size: .95rem; line-height: 1.45; }
.dt-walk { font: inherit; margin-top: .4rem; border: 0; border-radius: var(--r-pill); background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 1.05rem; padding: .75rem 2.2rem; cursor: pointer; box-shadow: 0 10px 24px -14px rgba(0,0,0,.6); }
.dt-walk:hover:not(:disabled) { filter: brightness(1.12); }
.dt-walk:disabled { opacity: .45; cursor: default; box-shadow: none; }
.dt-status { margin: 0; min-height: 1.2em; font-size: .85rem; color: var(--reactive); }
/* While trying: the practice panel and the real room, inside the sheet */
.dt-running { grid-template-columns: clamp(17rem, 23vw, 21rem) minmax(0, 1fr); }
.dt-panel-live { min-height: 0; display: flex; flex-direction: column; }
.dt-panel-live .practice-panel { flex: 1; min-height: 0; overflow-y: auto; }
.dt-room-live { min-height: 0; display: flex; flex-direction: column; }
.dt-room-live .room-col { flex: 1; min-height: 0; }
.dt-room-live .room-head { display: none; }
.dt-room-live .room { flex: 1; min-height: 0; }
.dt-room-live .composer textarea { min-height: 0; height: 4.2rem; }

/* ---- Drill sheet: the line of questions sits beside the name ---- */
.step-sheet .ls-head { align-items: flex-end; gap: clamp(1rem, 2vw, 2rem); }
.step-sheet .ls-head .ts-titles { flex: 0 1 25rem; }
.step-sheet .ls-head .ls-head-actions { align-self: center; }
.sl-line { flex: 1; min-width: 0; display: flex; align-items: center; list-style: none; margin: 0 0 .3rem; padding: 0; }
.sl-line li { display: flex; align-items: center; flex: 0 0 auto; min-width: 0; }
.sl-line.snug .sl-stop { font-size: .76rem; gap: .28rem; padding-inline: .14rem; }
.sl-line.snug li + li::before { flex-basis: .8rem; min-width: .3rem; margin: 0 .08rem; }
.sl-line.tight li:not(.on) .sl-lab { display: none; }
.sl-line.tight .sl-stop { padding-inline: .3rem; }
.sl-line li + li::before { content: ""; flex: 1 1 2.4rem; min-width: .7rem; max-width: 3.2rem; height: 2px; margin: 0 .3rem; border-radius: 2px;
  background: linear-gradient(90deg, var(--brass) 50%, var(--line) 50%) right / 200% 100% no-repeat; transition: background-position .45s var(--ease-enter); }
.sl-line li.done::before, .sl-line li.on::before { background-position: left; }
.sl-stop { display: flex; align-items: center; gap: .42rem; flex: none; font: inherit; font-size: .86rem; font-weight: 600; color: var(--ink-soft); background: none; border: 0; border-radius: var(--r-pill); padding: .3rem .45rem; cursor: pointer; white-space: nowrap; transition: color .2s, background .2s; }
.sl-stop:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.sl-stop:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
.sl-dot { position: relative; width: .72rem; height: .72rem; flex: none; border-radius: 50%; border: 2px solid var(--line); background: var(--panel-2); transition: background .25s, border-color .25s, transform .25s; }
.sl-line li.done .sl-dot { background: var(--brass); border-color: var(--brass); }
.sl-line li.done .sl-stop { color: var(--ink); }
.sl-line li.on .sl-dot { background: var(--primary); border-color: var(--primary); transform: scale(1.15); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.sl-line li.on .sl-stop { color: var(--ink); font-weight: 700; }
@media (max-width: 1360px) { .sl-stop { font-size: .8rem; padding: .3rem .3rem; } .sl-line li + li::before { margin: 0 .15rem; } .step-sheet .ls-head .ts-titles { flex-basis: 19rem; } }
@media (prefers-reduced-motion: reduce) { .sl-line li + li::before, .sl-dot { transition: none; } }

/* ---- Try it and The room: buttons on the room itself ---- */
.dt-stage { position: relative; min-height: 0; display: flex; flex-direction: column; }
.dt-stage > .dt-room-live { flex: 1; }
.dt-running #arrange-btn, .dt-arrange #arrange-btn { display: none; }
.dt-top { position: absolute; top: .65rem; right: .65rem; z-index: 7; display: flex; gap: .45rem; }
.dt-top-btn { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-size: .86rem; font-weight: 600; padding: .45rem .95rem .45rem .75rem; border-radius: var(--r-pill); cursor: pointer;
  color: var(--cream); background: rgba(20, 27, 26, .74); border: 1px solid rgba(238, 241, 236, .28); backdrop-filter: blur(6px); transition: background .15s, transform .15s, box-shadow .15s; }
.dt-top-btn svg { width: 1rem; height: 1rem; }
.dt-top-btn:hover { background: rgba(20, 27, 26, .9); transform: translateY(-1px); }
.dt-top-btn.strong { color: var(--ink); background: var(--panel-2); border-color: transparent; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .7); }
.dt-top-btn.strong:hover { background: #fff; }

/* The room question: the room, open to arrange, and nothing else. */
.dt.dt-arrange { display: flex; flex-direction: column; gap: .6rem; }
.dt-arrange .dt-stage { flex: 1; }
.dt-arrange .composer, .dt-arrange .room-clock, .dt-arrange .plan-bar > .btn.primary { display: none !important; }
.dr-head { display: flex; align-items: center; gap: 1rem; }
.dr-head p { flex: 1; margin: 0; font-size: .92rem; color: var(--ink-soft); }
.dr-head p b { color: var(--ink); }
.dr-head .dt-top-btn { color: var(--ink); background: var(--panel); border-color: var(--line); backdrop-filter: none; }
.dr-head .dt-top-btn:hover { background: var(--panel-2); }
.dr-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--panel); padding: 2rem; color: var(--ink-soft); }
.dr-empty h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.9rem; color: var(--ink); }
.dr-empty p { margin: 0; max-width: 30rem; }
.dt-ic { display: inline-flex; }

/* "What's happening right now?" while it's being worked out, and the card it opens */
.pp-looking { position: relative; overflow: hidden; }
.pp-looking::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brass) 22%, transparent), transparent); transform: translateX(-100%); animation: pp-sheen 1.3s ease-in-out infinite; }
@keyframes pp-sheen { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .pp-looking::after { animation: none; } }
.pp-explain-card { font-size: 1rem; line-height: 1.55; }

/* The main aim of a guide's drill or full session, above the things to try. */
.pp-aim { margin: 0 0 .55rem; padding: .5rem .75rem; border-left: 3px solid var(--brass); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: color-mix(in srgb, var(--brass-soft) 45%, transparent); font-family: var(--serif); font-size: 1.02rem; line-height: 1.3; color: var(--ink); }

/* Map the family: how students map it (the step's first page) */
.mm-start { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: clamp(1rem, 3vh, 2rem); padding: 0 clamp(0rem, 3vw, 3rem); }
.mm-h { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 4.6vh, 2.8rem); line-height: 1.1; text-align: center; }
.mm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.mm-card { display: flex; flex-direction: column; gap: .5rem; text-align: left; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); font: inherit; color: var(--ink); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.mm-card:hover { border-color: var(--brass); }
.mm-card[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.mm-card b { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.15; }
.mm-card > span:not(.mm-thumb) { color: var(--ink-soft); line-height: 1.45; flex: 1; }
.mm-card { --k: var(--primary); }
.mm-thumb { max-width: none; width: 100%; aspect-ratio: 120 / 86; max-height: 26vh; margin: .4rem 0 0; padding: .5rem; border-radius: var(--r-md); background: var(--panel-2); box-sizing: border-box; }
.mm-thumb .rule { stroke: var(--line); stroke-width: 1.4; }
.mm-thumb .ink { stroke: var(--k); fill: var(--panel); }
@media (max-width: 720px) { .mm-cards { grid-template-columns: minmax(0, 1fr); } }

/* Map the family: the Map tab, the sheet to build the map in, and the comparison */
.map-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.map-panel[hidden] { display: none; }
.mp-box { position: relative; flex: 1; min-height: 0; border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; background: var(--panel-2); }
.mp-box .gx { font-size: 13px; }
.train-sheet.mapsheet { width: min(1320px, calc(100vw - 2rem)); height: calc(100vh - 2rem); max-height: none; }
.train-sheet.mapsheet .ts-box { height: 100%; display: flex; flex-direction: column; }
.train-sheet.mapsheet .ts-body { flex: 1; min-height: 0; overflow: hidden; }
.ms { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: .9rem; }
.ms.solo { grid-template-columns: minmax(0, 1fr); }
.ms-side { min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.ms-side h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.7em; line-height: 1.1; }
.ms-notes { flex: 1; min-height: 0; overflow-y: auto; margin: 0; }
.ms-paper { background: #fbf8ef; color: #2a2620; border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .7em 1em; font-size: .92em; line-height: 1.6; }
.ms-paper p { margin: 0 0 .75em; overflow-wrap: anywhere; }
:root[data-theme="dark"] .ms-paper { background: #2a2720; color: #ece4d2; }
.ms-map { position: relative; min-height: 0; min-width: 0; border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; background: var(--panel); }
.ms-map .gx { font-size: 14px; }
.db-gmaps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .8rem; }
.db-gmaps figure { margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.db-gmaps figcaption { font-family: var(--serif); font-size: 1.1em; color: var(--ink-soft); text-align: center; }
.db-gbox { position: relative; height: clamp(220px, 34vh, 360px); border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; background: var(--panel); }
.db-gbox .gx { font-size: 13px; }
.db-find { margin-top: .8em; }
.db-find h5 { margin: 0 0 .4em; font-family: var(--serif); font-weight: 400; font-size: 1.3em; }
.db-find ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5em; }
.db-find li { border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .55em .8em; background: var(--panel); overflow-wrap: anywhere; }
.db-find li p { margin: .3em 0 0; line-height: 1.45; }
.db-find li .db-qa-lab { display: inline; margin-right: .4em; }
@media (max-width: 720px) { .ms, .db-gmaps { grid-template-columns: minmax(0, 1fr); } }

/* The step panel fits its column: the family map gives up height first, so the finish button stays in view */
@media (min-width: 721px) {
  .session-grid.practicing .practice-panel { height: 100%; min-height: 0; }
  .practice-panel > * { flex-shrink: 0; }
  .practice-panel > .pp-map-sec { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .pp-map-sec > .thumb-btn { flex: 0 1 170px; min-height: 64px; display: flex; }
  .pp-map-sec .pp-map { flex: 1; min-height: 0; height: auto; width: 100%; margin-top: 0; }
}

/* A face at the start of a rounded pill sits clear of the curve. Men are squares, and their
   corners poke through a pill's round end unless the pill leaves room on the left.
   Any new pill that starts with a face goes in this list. */
:is(.mo-adder button, .dm-chip, .hw-who, .symbol-option, .ob-face, .ds-chip, .fam-pill):has(> .mini:first-child) { padding-left: .5rem; }
.db-asked { margin: 0 0 .6em; font-family: var(--serif); font-size: 1.2em; color: var(--ink); }

/* A lesson's start page: the AI box and "write it yourself", filling the sheet */
.ls-page.look-start { display: flex; flex-direction: column; }
.ls-page.look-start .ls-start { flex: 1; min-height: 0; margin: .4rem 0; }
.ls-head-actions .cw-pill .ds-ic { width: 1em; height: 1em; margin-right: .35em; display: inline-grid; vertical-align: -.12em; }
.ls-start .ds-bottom { justify-content: flex-end; }

/* The genogram builder (genogram-box.js): one for every family map */
.gb-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gb.edit .gb-svg { top: 3.2rem; height: calc(100% - 3.2rem); }
.gb .node { cursor: pointer; }
.gb .node:focus { outline: none; }
.gb .node:focus-visible .body { stroke: var(--brass); stroke-width: 3; }
.gb .node:hover .body { filter: brightness(1.06); }
.gb-svg.connecting .node.target { cursor: crosshair; }
.gb-svg .node.drop .body { stroke: var(--brass); stroke-width: 3.5; }
.gb-svg.dragging, .gb-svg.dragging * { cursor: crosshair !important; }
.gb-pair { width: 17.5rem; gap: 7px; padding: 9px 10px 10px; }
.gb-pair-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.gb-pair-head b { font-family: var(--serif); font-weight: 400; font-size: 1.15em; line-height: 1.15; }
.gb-struct { width: 100%; }
.gb-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.gb-kinds .gx-tb { justify-content: flex-start; font-size: .82em; padding: .32em .45em; white-space: nowrap; }
.gb-kinds .line-sample { width: 2.5em; height: 1em; flex: none; }
.gb-text { width: 100%; resize: none; line-height: 1.4; font-size: .9em; }
.gb-text::placeholder { color: var(--ink-faint); opacity: 1; }
.gb-locked { padding: .25em .45em; max-width: 26em; }
.fe-box { flex: 1; min-height: 0; position: relative; }

/* Play the client: where they sit, who they play, who leads */
.mm-cards.cs-two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; margin: 0 auto; width: 100%; }
.cs-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.cs-tile-wrap { position: relative; display: flex; }
.mm-card.cs-tile { width: 200px; align-items: center; text-align: center; padding: 1.2rem 1rem 1rem; }
.mm-card.cs-tile b { font-size: 1.35rem; }
.mm-card.cs-tile > span:not(.mini):not(.cs-plus) { flex: none; font-size: .92rem; }
.cs-new { border-style: dashed; background: transparent; }
.cs-plus { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 1.5px dashed var(--line); font-size: 2rem; color: var(--ink-soft); }
.cs-edit { position: absolute; top: .5rem; right: .5rem; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-pill); padding: .2rem .65rem; font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.cs-edit:hover { border-color: var(--brass); color: var(--ink); }
.cs-note { margin: 0; text-align: center; color: var(--ink-soft); }
.cs-center { display: flex; justify-content: center; }
@media (max-width: 720px) { .mm-cards.cs-two { grid-template-columns: minmax(0, 1fr); } .mm-card.cs-tile { width: 150px; } }
.mm-card.cs-tile > .mini { flex: none; width: 72px; height: 72px; font-size: 1.6rem; margin-bottom: .2rem; }

/* The family editor with the one genogram builder: the builder brings its own side panel. */
#family-editor.gk-mode .fe-panel, #family-editor.gk-mode .fe-legend { display: none; }
#family-editor.gk-mode .fe-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
#family-editor.gk-mode .fe-box > .gk { border: 0; border-radius: 0; }

/* Pattern tags on a person's card are the same small pills as the rest. (.pattern is also the
   wizard's big pattern chooser, so the tag needs its own size back.) */
.tags { align-items: flex-start; }
.tag.pattern { display: inline-block; font-size: .76rem; padding: .1rem .55rem; border-radius: var(--r-pill); cursor: default; gap: 0; line-height: 1.5; }
/* People who only have a name so far */
.card.unfinished { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass) inset; }
.unfinished-note { margin: 0; font-size: .84rem; line-height: 1.4; color: var(--brass-ink); background: var(--brass-soft); border-radius: var(--r-sm); padding: .5rem .7rem; }
.in-fams { margin: 0; font-size: .82rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; margin-left: .35rem; padding: 0 .3rem; border-radius: var(--r-pill); background: var(--brass); color: #fff; font-size: .7rem; font-weight: 700; vertical-align: 1px; }
/* Three buttons in a confirm box: they wrap instead of spilling out of the box. */
.confirm-actions { flex-wrap: wrap; justify-content: flex-end; }

/* Map the family: the student's map opens in its own sheet, like Edit family map. */
.bsheet { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.bsheet-h { margin: 0; font-size: 1.9rem; }
.bsheet-box { min-height: 0; display: grid; border-top: 1px solid var(--line-soft); }
.bsheet-box > .gk { border: 0; border-radius: 0; min-height: 0; }
.my-map-empty { display: grid; place-items: center; min-height: 90px; width: 100%; color: var(--ink-faint); font-size: .9rem; }
.bsheet .fe-head .icon-btn { margin-left: auto; }
.bsheet-start { max-width: 260px; }

/* ---------- People: views and filters (five versions to compare) ---------- */
.people-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .8rem; }
.people-body[hidden] { display: none !important; }
.people-body.pv-v2 { display: grid; grid-template-columns: 210px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); column-gap: 1.2rem; row-gap: .8rem; }
.pv-v2 .pv-side { grid-row: 1 / -1; }
.pv-v2 > .people-tools, .pv-v2 > .card-grid { grid-column: 2; }
.people-tools { flex: none; position: relative; z-index: 3; }
.people-tools:empty { display: none; }
.pv-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pv-stack { display: flex; flex-direction: column; gap: .6rem; }
.pv-lbl { font-size: .86rem; color: var(--ink-soft); }
.pv-gap { width: .8rem; }
.pv-count { font-size: .86rem; color: var(--ink-soft); margin-right: .3rem; }
.pv-select { font: inherit; font-size: .88rem; padding: .38rem 2rem .38rem .8rem; border-radius: var(--r-pill); border: 1px solid var(--line); background-color: var(--panel); color: var(--ink); cursor: pointer; width: auto; }
.pv-select.on { border-color: var(--brass); background-color: var(--brass-soft); }
.pv-seg button { font-size: .84rem; }
.pv-clear { font-size: .86rem; }
.pv-search { font: inherit; font-size: .92rem; width: min(380px, 100%); padding: .5rem .9rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--panel); }
.pv-sentence { font-size: .92rem; color: var(--ink-soft); gap: .35rem; }
.pv-num { width: 4rem; font: inherit; font-size: .9rem; padding: .36rem .6rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel); text-align: center; }
.pv-tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line-soft); }
.pv-tab { font: inherit; font-size: .92rem; background: none; border: 0; border-bottom: 2px solid transparent; padding: .45rem .8rem .55rem; color: var(--ink-soft); cursor: pointer; display: inline-flex; gap: .45rem; align-items: center; margin-bottom: -1px; }
.pv-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.pv-tab-n { font-size: .75rem; padding: 0 .45rem; border-radius: var(--r-pill); background: var(--panel-2); color: var(--ink-soft); font-weight: 500; }
.pv-filter-btn { display: inline-flex; gap: .4rem; align-items: center; }
.pv-filter-btn .nav-badge { margin-left: 0; }
.pv-chip { font: inherit; font-size: .84rem; display: inline-flex; gap: .4rem; align-items: center; padding: .3rem .7rem; border-radius: var(--r-pill); border: 1px solid var(--brass); background: var(--brass-soft); color: var(--ink); cursor: pointer; }
.pv-chip span { color: var(--ink-soft); }
.pv-has-pop { position: relative; }
.pv-pop { position: absolute; top: calc(100% + .4rem); left: 0; width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 18px 40px -18px rgba(0,0,0,.35); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .8rem; }
.pv-pop-group h4 { margin: 0 0 .35rem; font-size: .86rem; font-weight: 600; }
.pv-pop-group .segmented { flex-wrap: wrap; }
.pv-pop-foot { display: flex; align-items: center; gap: .5rem; }
.pv-side { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .9rem; overflow-y: auto; min-height: 0; }
.pv-side-h { margin: 0; font-size: 1.6rem; }
.pv-side-group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.pv-side-group legend { font-weight: 600; font-size: .9rem; margin-bottom: .25rem; padding: 0; }
.pv-radio { display: flex; align-items: center; gap: .5rem; font-size: .88rem; cursor: pointer; padding: .12rem 0; }
.pv-switch { position: fixed; right: 1rem; bottom: 1rem; z-index: var(--z-raised); display: flex; align-items: center; gap: .2rem; padding: .3rem .35rem .3rem .8rem; border-radius: var(--r-pill); background: var(--ink); color: var(--panel); box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); font-size: .82rem; }
.pv-switch span { margin-right: .3rem; }
.pv-switch button { font: inherit; width: 1.9rem; height: 1.9rem; border-radius: var(--r-pill); border: 0; background: transparent; color: inherit; cursor: pointer; }
.pv-switch button[aria-pressed="true"] { background: var(--panel); color: var(--ink); font-weight: 700; }
.pv-none { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; color: var(--ink-soft); }
.pv-none p { margin: 0; }
/* Condensed cards */
.card-grid.pv-condensed { grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: .8rem; }
.card.pv-mini { padding: .8rem .9rem; gap: .45rem; }
.pv-mini .card-title { gap: .6rem; }
.pv-mini-name { min-width: 0; display: flex; flex-direction: column; }
.pv-mini h3 { font-size: 1.15rem; margin: 0; }
.pv-mini .in-fams { font-size: .78rem; }
.pv-one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-mini .actions { align-items: center; padding-top: .45rem; }
.pv-mini .actions .link-btn { font-size: .78rem; }
.pv-flag { font-size: .74rem; font-weight: 600; color: var(--brass-ink); }
/* List */
.card-grid.pv-list { display: block; }
.pv-list { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.pv-row { display: grid; grid-template-columns: minmax(180px, 1.3fr) 3.5rem 5.5rem minmax(0, 2fr) minmax(0, 1.2fr) auto; gap: .9rem; align-items: center; padding: .5rem 1rem; border-top: 1px solid var(--line-soft); font-size: .9rem; }
.pv-row:first-child { border-top: 0; }
.pv-head { font-size: .78rem; color: var(--ink-faint); font-weight: 600; padding-top: .6rem; padding-bottom: .6rem; background: var(--panel-2); }
.pv-row.unfinished { background: color-mix(in srgb, var(--brass-soft) 55%, transparent); }
.pv-who { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.pv-who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); }
.pv-acts { display: flex; gap: .7rem; justify-content: flex-end; }
.pv-acts .link-btn { font-size: .84rem; }
.link-btn.danger { color: var(--reactive); }
.pv-select { field-sizing: content; min-width: 0; max-width: 220px; }
.pv-mini .actions { flex-wrap: nowrap; gap: .25rem; }
.pv-mini .actions .link-btn, .pv-acts .link-btn { text-decoration: none; color: var(--ink-soft); white-space: nowrap; }
.pv-mini .actions .link-btn:hover, .pv-acts .link-btn:hover { color: var(--ink); text-decoration: underline; }
.pv-mini .actions .link-btn.danger, .pv-acts .link-btn.danger { color: var(--reactive); }
.pv-mini .actions .link-btn + .link-btn { margin-left: .45rem; }
/* "In 1 family" pill beside a person's name: hover or click for the families. */
.fam-pill-wrap { position: relative; display: inline-flex; flex: none; }
.fam-pill { font: inherit; font-size: .76rem; font-weight: 600; padding: .15rem .6rem; border-radius: var(--r-pill); border: 1px solid var(--brass); background: var(--brass-soft); color: var(--brass-ink); cursor: pointer; white-space: nowrap; }
.fam-pill:hover, .fam-pill-wrap.open .fam-pill { background: var(--brass); color: #fff; }
.fam-pill-list { display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: var(--z-raised); min-width: 170px; flex-direction: column; padding: .3rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 14px 30px -14px rgba(0,0,0,.4); }
.fam-pill-wrap:hover .fam-pill-list, .fam-pill-wrap.open .fam-pill-list, .fam-pill-wrap:focus-within .fam-pill-list { display: flex; }
.fam-pill-wrap::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 6px; }
.fam-pill-list button { font: inherit; font-size: .86rem; text-align: left; padding: .4rem .6rem; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); cursor: pointer; white-space: nowrap; }
.fam-pill-list button:hover, .fam-pill-list button:focus-visible { background: var(--brass-soft); outline: none; }
.pv-mini .card-title { align-items: flex-start; }
.pv-mini .card-title .fam-pill-wrap { margin-left: auto; margin-top: .15rem; }
.pv-list { overflow: visible; } .pv-head { border-radius: var(--r-md) var(--r-md) 0 0; }
.pv-radio { display: flex !important; flex-direction: row; justify-content: flex-start; text-align: left; white-space: nowrap; }
.pv-radio input { width: auto !important; flex: none; margin: 0; accent-color: var(--ink); }
.pv-side-group { gap: .1rem; }

/* People: the filter column and the list's columns */
.pv-side .pv-search { width: 100%; box-sizing: border-box; font-size: .88rem; padding: .45rem .8rem; }
.pv-row { grid-template-columns: minmax(150px, 1.3fr) 3rem 5rem minmax(0, 2fr) 8.5rem 11.5rem; }
.pv-row > span { min-width: 0; }
.pv-acts { justify-content: flex-start; }
#persona-grid .card .actions { flex-wrap: nowrap; }
#persona-grid .card .actions .btn { padding: .35rem .6rem; }
.people-body.pv-v2 { grid-template-columns: 250px minmax(0, 1fr); }
.pv-side .pv-search { padding: .45rem .7rem; font-size: .85rem; }

/* Talk it through, Session note, Reflect and plan */
.cw-choice.needs > * { opacity: .4; filter: grayscale(.8); }
.cw-choice.needs::after { content: attr(data-why); position: absolute; left: 50%; top: .6rem; transform: translateX(-50%); width: max-content; max-width: calc(100% - 1rem); padding: .3rem .6rem; border-radius: var(--r-sm); background: var(--ink); color: var(--panel-2); font-size: .78rem; line-height: 1.25; opacity: 0; pointer-events: none; transition: opacity .15s; }
.cw-choice.needs:hover > * { opacity: .55; }
.cw-choice.needs:hover::after, .cw-choice.needs:focus-visible::after { opacity: 1; }
.cw-tag.warn { background: color-mix(in srgb, #c98a2b 16%, var(--panel-2)); color: #9a6514; border-color: color-mix(in srgb, #c98a2b 45%, transparent); }
.cw-slist-text small.lb-row.warn { color: #9a6514; }
.cw-slist-text small.lb-row.block { color: var(--reactive); }
.lb-banner { margin: 0; padding: .55rem .85rem; border-radius: var(--r-md); font-size: .92rem; line-height: 1.4; background: color-mix(in srgb, #c98a2b 12%, var(--panel-2)); border: 1px solid color-mix(in srgb, #c98a2b 40%, transparent); color: var(--ink); }
.lb-banner.block { background: color-mix(in srgb, var(--reactive) 10%, var(--panel-2)); border-color: color-mix(in srgb, var(--reactive) 40%, transparent); }
.lb-banner.small { font-size: .84rem; padding: .4rem .65rem; }
.lb-switch { display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; }
.lb-switch > span { display: flex; flex-direction: column; gap: .15rem; }
.lb-switch small { color: var(--ink-soft); font-size: .86rem; }
#tab-notes { position: relative; }
#tab-notes.nudge { animation: lb-pulse 1.2s ease-in-out 3; border-color: var(--brass); }
#tab-notes.nudge::after { content: attr(data-nudge); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: .25rem .6rem; border-radius: var(--r-sm); background: var(--brass); color: #fff; font-size: .78rem; z-index: 5; }
@keyframes lb-pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brass) 30%, transparent); } }

.lb-try .lb-side { gap: .6rem; }
.lb-side-h { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }
.lb-src { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line-soft); }
.lb-src .td-icon { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--k) 18%, var(--panel-2)); color: var(--k); }
.lb-src .td-icon svg { width: 1.2rem; height: 1.2rem; }
.lb-src span { display: flex; flex-direction: column; min-width: 0; }
.lb-src small { color: var(--ink-soft); font-size: .82rem; }
.lb-ran { margin: 0; font-size: .9rem; color: var(--ink-soft); line-height: 1.4; }
.lb-side .btn { align-self: flex-start; }
.lb-mynotes { display: flex; flex-direction: column; gap: .3rem; min-height: 0; border-top: 1px solid var(--line-soft); padding-top: .6rem; }
.lb-mynotes h4 { margin: 0; font-size: 1rem; }
.lb-mynotes ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; overflow-y: auto; }
.lb-faint { margin: 0; color: var(--ink-faint); font-size: .88rem; }
.lb-over { align-self: flex-start; }
.lb-main { min-height: 0; display: flex; flex-direction: column; gap: .7rem; padding: 1rem 1.3rem; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line-soft); }
.lb-head h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 4vh, 2.4rem); line-height: 1.05; }
.lb-head p { margin: .25rem 0 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.4; max-width: 46rem; }
.lb-chat { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: .2rem .2rem .4rem; display: flex; flex-direction: column; gap: .6rem; }
.lb-msg { max-width: min(42rem, 85%); display: flex; flex-direction: column; gap: .2rem; }
.lb-msg p { margin: 0; padding: .6rem .9rem; border-radius: var(--r-md); line-height: 1.45; white-space: pre-wrap; }
.lb-msg.guide p { background: color-mix(in srgb, var(--k) 12%, var(--panel)); border-top-left-radius: 4px; }
.lb-msg.you { align-self: flex-end; }
.lb-msg.you p { background: var(--primary); color: var(--primary-ink); border-top-right-radius: 4px; }
.lb-who { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--k); }
.lb-who .td-icon { width: 1.1rem; height: 1.1rem; }
.lb-who .td-icon svg { width: 1rem; height: 1rem; }
.lb-dots { display: inline-flex; gap: .25rem; }
.lb-dots span { width: .4rem; height: .4rem; border-radius: 50%; background: var(--ink-faint); animation: lb-dot 1s infinite ease-in-out; }
.lb-dots span:nth-child(2) { animation-delay: .15s; }
.lb-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes lb-dot { 50% { opacity: .3; transform: translateY(-2px); } }
.lb-compose { display: flex; gap: .6rem; align-items: flex-end; }
.lb-compose[hidden], .lb-done[hidden] { display: none; }
.lb-input, .lb-heads textarea { flex: 1; width: 100%; box-sizing: border-box; resize: none; font: inherit; font-size: 1rem; line-height: 1.45; padding: .6rem .8rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.lb-input:focus, .lb-heads textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 22%, transparent); }
.lb-compose-btns { display: flex; flex-direction: column; gap: .4rem; }
.lb-mic { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font: inherit; font-size: .88rem; padding: .4rem .75rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft); cursor: pointer; }
.lb-mic:hover { color: var(--ink); border-color: var(--brass); }
.lb-mic.listening { background: var(--reactive); border-color: var(--reactive); color: #fff; }
.lb-done { padding: .6rem .9rem; border-radius: var(--r-md); background: color-mix(in srgb, var(--k) 10%, var(--panel)); }
.lb-status { margin: 0; color: var(--reactive); font-size: .9rem; }
.lb-status:empty { display: none; }
.lb-heads { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .7rem; padding: 2px; }
.lb-head-row { display: flex; flex-direction: column; gap: .3rem; }
.lb-head-row > b { font-size: 1rem; }
.lb-answer { display: flex; gap: .5rem; align-items: flex-start; }
.lb-actions { display: flex; align-items: center; gap: .8rem; justify-content: flex-end; }
.lb-saved { color: var(--ink-soft); font-size: .9rem; }
.lb-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1rem; }
.lb-col { min-height: 0; display: flex; flex-direction: column; gap: .4rem; }
.lb-col h4 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; }
.lb-col-body { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: .6rem .8rem; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: .6rem; }
.lb-noteblock b { font-size: .9rem; }
.lb-noteblock p { margin: .15rem 0 0; white-space: pre-wrap; line-height: 1.45; font-size: .95rem; }
.lb-points { list-style: none; }
.lb-pt { display: flex; gap: .6rem; align-items: flex-start; }
.lb-pt > span:last-child { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.lb-mark { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; border: 1px solid var(--line); background: var(--panel-2); }
.lb-pt.yes .lb-mark { background: color-mix(in srgb, var(--k) 25%, var(--panel-2)); border-color: var(--k); color: var(--k); }
.lb-pt.partly .lb-mark { border-color: var(--brass); color: var(--brass); }
.lb-pt.no .lb-mark { color: var(--ink-faint); border-style: dashed; }
.lb-pt.extra .lb-mark { color: var(--k); }
.lb-found { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.lb-pt q { font-style: italic; font-size: .9rem; color: var(--ink-soft); }
.lb-tip { font-size: .9rem; color: var(--ink-soft); line-height: 1.4; }
.lb-empty { margin: auto; max-width: 40rem; }
.lb-heads { display: grid; grid-auto-rows: minmax(4.6rem, 1fr); }
.lb-head-row { min-height: 0; }
.lb-heads textarea { flex: 1; min-height: 2.8rem; height: 100%; }
.lb-answer { flex: 1; min-height: 0; }
.lb-bottom { display: flex; justify-content: flex-end; }

/* Session note: the note template, your notes and what to notice, on a page from a client's file */
.nt-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(16rem, .8fr); gap: clamp(1rem, 2.6vw, 2.6rem); padding: clamp(.4rem, 1.6vh, 1.2rem) clamp(.4rem, 2vw, 2rem); }
.nt-paper { min-height: 0; display: flex; flex-direction: column; background: #fffdf7; color: #2a2620; border: 1px solid color-mix(in srgb, var(--brass) 30%, var(--line-soft)); border-radius: 6px; box-shadow: 0 26px 50px -34px rgba(0,0,0,.55), 0 2px 0 rgba(0,0,0,.03); padding: clamp(.9rem, 3vh, 1.8rem) clamp(1.2rem, 2.6vw, 2.4rem) clamp(.7rem, 2vh, 1.2rem) clamp(1.8rem, 3.4vw, 3rem); position: relative; overflow: hidden; }
.nt-paper::before { content: ""; position: absolute; left: clamp(.8rem, 1.6vw, 1.5rem); top: 0; bottom: 0; border-left: 2px solid rgba(192,103,74,.25); }
.nt-ph { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid rgba(0,0,0,.12); padding-bottom: .6rem; margin-bottom: clamp(.4rem, 1.4vh, .9rem); }
.nt-ph b { font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 3.8vh, 2rem); }
.nt-ph small { color: #7a7266; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-secs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; justify-content: space-evenly; gap: .3rem; padding: 2px; }
.nt-sec { position: relative; display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; align-items: center; column-gap: .4rem; padding: .15rem .5rem .15rem .2rem; border-radius: var(--r-sm); }
.nt-sec > .nt-head, .nt-sec > .nt-hint { grid-column: 2; }
.nt-grip { grid-row: 1 / span 2; grid-column: 1; align-self: center; width: 1.6rem; height: 2.2rem; border: 0; border-radius: var(--r-sm); background: none; color: #b3aa9c; display: grid; place-items: center; font-size: 1.05rem; cursor: grab; opacity: .55; transition: opacity .15s, background .15s; }
.nt-sec:hover .nt-grip, .nt-grip:focus-visible { opacity: 1; }
.nt-grip:hover { background: rgba(0,0,0,.06); color: #2a2620; }
.nt-grip:active { cursor: grabbing; }
.nt-sec.dragging { opacity: .4; }
.nt-sec.drop-before::before, .nt-sec.drop-after::after { content: ""; position: absolute; left: .4rem; right: .4rem; height: 3px; border-radius: 3px; background: var(--brass); }
.nt-sec.drop-before::before { top: -2px; }
.nt-sec.drop-after::after { bottom: -2px; }
.nt-chip.drag, .nt-sec { cursor: grab; touch-action: none; }
.nt-sec input, .nt-sec textarea { cursor: text; }
.nt-ghost { position: fixed; z-index: var(--z-drag); pointer-events: none; margin: 0; background: #fffdf7; color: #2a2620; border-radius: var(--r-md); box-shadow: 0 18px 40px -18px rgba(0,0,0,.45), 0 0 0 1px color-mix(in srgb, var(--brass) 35%, transparent); transform: rotate(-1deg); opacity: .95; }
.nt-chip.nt-ghost { background: var(--panel-2); color: var(--ink); border-radius: var(--r-pill); border-style: solid; }
body.nt-dragging, body.nt-dragging * { cursor: grabbing !important; user-select: none; }
.nt-sec:hover, .nt-sec:focus-within { background: color-mix(in srgb, var(--brass) 8%, transparent); }
.nt-bare { border: 0; outline: none; background: transparent; padding: 0; width: 100%; min-width: 0; font: inherit; color: inherit; box-shadow: none; }
.nt-bare:focus { box-shadow: none; border: 0; }
.nt-head { font-family: var(--serif); font-size: clamp(1.1rem, 2.9vh, 1.55rem); line-height: 1.2; color: #2a2620; }
.nt-hint { font-size: clamp(.82rem, 2vh, .94rem); color: #8a8072; font-style: italic; line-height: 1.5; background-image: repeating-linear-gradient(transparent 0 1.5em, rgba(0,0,0,.1) 1.5em calc(1.5em + 1px)); }
.nt-tools { grid-row: 1 / span 2; grid-column: 3; display: flex; opacity: 0; transition: opacity .15s; }
.nt-sec:hover .nt-tools, .nt-sec:focus-within .nt-tools { opacity: 1; }
.nt-ib { border: 0; background: none; color: #8a8072; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1rem; flex: none; cursor: pointer; }
.nt-ib:hover { background: rgba(0,0,0,.06); color: #2a2620; }
.nt-ib:disabled { opacity: .3; cursor: default; background: none; }
.nt-add { align-self: flex-start; margin-top: .3rem; border: 0; background: none; color: #8a6a2f; font: inherit; font-weight: 600; font-size: .9rem; padding: .3rem .5rem; border-radius: var(--r-sm); cursor: pointer; }
.nt-add:hover { background: color-mix(in srgb, var(--brass) 10%, transparent); }
/* Your notes: the same page as the template, with your writing where the hint line was. It grows as you write. */
.nt-sec.mine { display: flex; flex-direction: column; align-items: stretch; padding-left: 2.2rem; flex: none; }
.nt-mine { field-sizing: content; min-height: 1.5em; max-height: 9em; resize: none; overflow-y: auto; font-size: clamp(.82rem, 2vh, .94rem); line-height: 1.5; color: #2a2620; background-image: repeating-linear-gradient(transparent 0 1.5em, rgba(0,0,0,.1) 1.5em calc(1.5em + 1px)); background-attachment: local; }
.nt-mine::placeholder, .nt-hint::placeholder { color: #b3aa9c; }
.nt-side { min-height: 0; display: flex; flex-direction: column; gap: clamp(.6rem, 2vh, 1.1rem); }
.nt-h { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 5vh, 2.6rem); line-height: 1.05; }
.nt-sub { margin: .35rem 0 0; color: var(--ink-soft); font-size: clamp(.88rem, 2vh, 1rem); line-height: 1.45; }
.nt-group h3 { margin: 0 0 .4rem; font-size: .95rem; }
.nt-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.nt-chip { font: inherit; border: 1px dashed var(--line); background: var(--panel-2); color: var(--ink-soft); border-radius: var(--r-pill); padding: .3rem .75rem; font-size: .86rem; cursor: pointer; }
.nt-chip:hover { border-color: var(--brass); color: var(--ink); border-style: solid; }
.nt-chip.style { border-style: solid; }
.nt-chip.style[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.nt-ai { align-self: flex-start; }
.nt-ai[disabled] { opacity: .6; cursor: default; transform: none; }
.nt-small { margin: 0; color: var(--ink-soft); font-size: .86rem; line-height: 1.45; }
.nt-status { margin: 0; color: var(--reactive); font-size: .88rem; }
.nt-status:empty { display: none; }
.nt-tab { font-size: .95rem; font-weight: 500; padding: .35rem 1rem; border-radius: var(--r-pill); background: var(--panel-2); border: 1px solid var(--brass); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brass) 25%, transparent); }
.nt-bubble { padding: .25rem .65rem; border-radius: var(--r-sm); background: var(--brass); color: #fff; font-size: .82rem; }
.nt-items { flex: 0 1 auto; list-style: none; margin: 0; padding: 2px; justify-content: flex-start; gap: .2rem; }
.nt-item { grid-template-columns: 1.6rem minmax(0, 1fr) auto; cursor: auto; touch-action: auto; padding-block: .35rem; border-bottom: 1px solid rgba(0,0,0,.08); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.nt-num { grid-column: 1; font-family: var(--serif); font-size: 1.3rem; color: var(--brass); text-align: right; }
.nt-item .nt-head { grid-column: 2; }
.nt-item .nt-tools { grid-row: 1; }
.nt-empty { color: #8a8072; font-style: italic; padding: .6rem .5rem; }
.nt-peek { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.nt-peek small { flex-basis: 100%; color: var(--ink-soft); font-size: .84rem; }

/* The step card: what students see on a step before they start. The same layout for every step of a kind. */
.sc-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(14rem, .7fr); gap: clamp(1rem, 2.6vw, 2.6rem); padding: clamp(.4rem, 1.6vh, 1.2rem) clamp(.4rem, 2vw, 2rem); }
.sc-stage { min-height: 0; display: flex; align-items: center; justify-content: center; }
.sc-card { width: min(100%, 44rem); max-height: 100%; min-height: 0; display: flex; flex-direction: column; gap: clamp(.4rem, 1.3vh, .9rem); background: var(--panel-2); border: 1px solid var(--line-soft); border-top: 5px solid var(--k); border-radius: var(--r-md); padding: clamp(.65rem, 1.8vh, 1.3rem) clamp(1rem, 2vw, 1.6rem); box-shadow: 0 26px 50px -36px rgba(0,0,0,.5); overflow-y: auto; scrollbar-width: none; }
.sc-top { display: flex; align-items: center; gap: .45rem; color: var(--k); font-weight: 700; font-size: .92rem; }
.sc-top .spacer { flex: 1; }
.sc-top svg { width: 1.15em; height: 1.15em; }
.sc-min { display: inline-flex; align-items: center; gap: .3rem; color: var(--ink-soft); font-weight: 500; font-size: .88rem; }
.sc-min input { width: 3.2rem; text-align: center; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-pill); padding: .15rem .3rem; }
.sc-lead { display: grid; grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr); gap: clamp(.8rem, 2vw, 1.4rem); align-items: center; }
.sc-pic { display: grid; place-items: center; aspect-ratio: 240 / 124; border-radius: var(--r-md); background: color-mix(in srgb, var(--k) 9%, var(--panel)); color: var(--k); padding: .4rem; }
.sc-pic svg { width: 100%; height: 100%; }
.sc-pic .fill { fill: color-mix(in srgb, var(--k) 14%, var(--panel-2)); }
.sc-pic .blank { fill: var(--panel-2); stroke-dasharray: 5 4; }
.sc-pic .dash { stroke-dasharray: 4 4; stroke-width: 1.8; opacity: .7; }
.sc-pic .thin { stroke-width: 1.6; opacity: .55; }
.sc-pic .solid, .sc-pic .dot { fill: currentColor; }
.sc-pic .num { fill: var(--panel-2); stroke: none; font: 700 11px var(--sans); text-anchor: middle; }
.sc-pic text { fill: currentColor; stroke: none; font: 700 15px var(--sans); text-anchor: middle; }
.sc-pic .sm circle, .sc-pic .sm path { stroke-width: 2; }
.sc-pic .you circle, .sc-pic .you path { stroke: var(--ink); stroke-width: 2.8; }
.sc-pic .ring { fill: color-mix(in srgb, var(--k) 16%, transparent); stroke-dasharray: 5 4; }
.sc-pic .lens { fill: color-mix(in srgb, var(--panel-2) 70%, transparent); stroke-width: 3; }
.sc-pic .handle { stroke-width: 5; }
.sc-pic .margin { stroke: #c0674a; opacity: .5; stroke-width: 1.6; }
.sc-pic .road { stroke-dasharray: 2 7; stroke-width: 3.2; }
.sc-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 3.6vh, 2.1rem); line-height: 1.1; }
.sc-about { display: block; width: 100%; resize: none; margin-top: .35rem; font-size: clamp(.92rem, 2.2vh, 1.02rem); line-height: 1.45; color: var(--ink); field-sizing: content; min-height: 2.9em; max-height: 4.4em; }
.sc-points h4 { margin: 0 0 .35rem; font-size: .95rem; color: var(--ink); }
.sc-points ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .9rem; }
.sc-points li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .5rem; padding: .35rem .5rem .35rem .6rem; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line-soft); }
.sc-mark { width: .55rem; height: .55rem; margin-top: .45rem; border-radius: 50%; background: var(--k); }
.sc-points ol.numbered .sc-mark { width: 1.45rem; height: 1.45rem; margin-top: .05rem; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .8rem; }
.sc-pt { display: flex; flex-direction: column; min-width: 0; }
.sc-h { font-weight: 600; font-size: .95rem; }
.sc-hint { font-size: .85rem; line-height: 1.35; color: var(--ink-soft); resize: none; field-sizing: content; min-height: 1.35em; max-height: 2.7em; scrollbar-width: none; }
.sc-points li .nt-ib { width: 1.6rem; height: 1.6rem; opacity: 0; color: var(--ink-faint); }
.sc-points li:hover .nt-ib, .sc-points li:focus-within .nt-ib { opacity: 1; }
.sc-points .nt-add { color: var(--brass-ink, #8a6a2f); }
.sc-word { display: flex; flex-direction: column; gap: .15rem; padding: .45rem .8rem; border-left: 3px solid var(--k); background: color-mix(in srgb, var(--k) 6%, var(--panel)); border-radius: 0 var(--r-md) var(--r-md) 0; }
.sc-word span { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.sc-word textarea { resize: none; font-family: var(--serif); font-size: clamp(1rem, 2.4vh, 1.15rem); font-style: italic; line-height: 1.35; color: var(--ink); field-sizing: content; min-height: 1.4em; max-height: 4.2em; }
.sc-card ::placeholder { color: var(--ink-faint); }
.ls-page.look-card { display: flex; flex-direction: column; overflow: hidden; }

/* Where the student sits: the room, with the AI therapist on one side and the student ringed */
.mm-card.cs-seat { gap: .45rem; padding: 1rem 1rem 1.2rem; }
.mm-cards.cs-two:has(.cs-seat) { max-width: 1060px; }
.cs-scene.family { gap: clamp(.8rem, 2vw, 1.4rem); }
.cs-scene.family .cs-who .mini.xl { width: clamp(50px, 8vh, 68px); height: clamp(50px, 8vh, 68px); }
.cs-scene.family .cs-who.ai .mini.xl { width: clamp(40px, 6.4vh, 54px); height: clamp(40px, 6.4vh, 54px); }
.cs-scene { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 3vw, 2.4rem); min-height: clamp(9rem, 26vh, 13rem); margin-bottom: .45rem; padding: 1rem; border-radius: var(--r-md);
  background: radial-gradient(ellipse 70% 40% at 50% 88%, color-mix(in srgb, var(--brass) 20%, transparent), transparent 70%), color-mix(in srgb, #4c6862 9%, var(--panel-2)); }
.cs-who { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.cs-who .mini.xl { width: clamp(56px, 9vh, 78px); height: clamp(56px, 9vh, 78px); }
.cs-who.ai .mini.xl { width: clamp(44px, 7vh, 60px); height: clamp(44px, 7vh, 60px); }
.cs-who small { font-size: .78rem; font-weight: 600; line-height: 1; white-space: nowrap; padding: .28rem .6rem; border-radius: var(--r-pill); background: var(--panel); color: var(--ink-soft); border: 1px solid var(--line-soft); }
.cs-who.ther small { background: #4c6862; border-color: #4c6862; color: #fff; }
.cs-who.you .face-wrap { box-shadow: 0 0 0 3px var(--panel-2), 0 0 0 6px var(--brass); }
.cs-who.you small { background: var(--brass); border-color: var(--brass); color: #fff; }
.cs-side.fam { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .7rem .8rem .55rem; border: 1.5px dashed color-mix(in srgb, var(--ink) 22%, transparent); border-radius: var(--r-md); background: color-mix(in srgb, var(--panel) 60%, transparent); }
.cs-fam { display: flex; align-items: center; gap: .7rem; }
.cs-fam-tag { font-size: .78rem; font-weight: 600; color: var(--ink-soft); }

/* Building a therapist: the same steps as building a person, on one fixed-size sheet */
.train-sheet[data-kind="tbuild"] { width: min(1040px, calc(100vw - 2rem)); }
.train-sheet[data-kind="tbuild"] .ts-box { height: min(44em, calc(100vh - 2rem)); }
.train-sheet[data-kind="tbuild"] .ts-body { flex: 1; min-height: 0; overflow: hidden; gap: 1em; }
.tb-rail { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4em; }
.tb-stop { display: inline-flex; align-items: center; gap: .45em; font: inherit; font-size: .82em; font-weight: 600; padding: .3em .85em .3em .35em; border-radius: var(--r-pill); border: 1px solid var(--line-soft); background: var(--panel); color: var(--ink-soft); cursor: pointer; }
.tb-stop:hover { border-color: var(--brass); }
.tb-stop[aria-current] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink, #fff); }
.tb-num { width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); color: var(--ink); font-size: .9em; }
.tb-stop[aria-current] .tb-num { background: rgba(255,255,255,.2); color: inherit; }
.tb-page { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .9em; }
.tb-page .field { margin: 0; }
.tb-page textarea { resize: none; }
.tb-ai { display: flex; flex-direction: column; gap: .55em; padding: .9em 1em .7em; border-radius: var(--r-md); background: color-mix(in srgb, var(--brass) 9%, var(--panel)); border: 1px solid color-mix(in srgb, var(--brass) 30%, transparent); }
.tb-ai h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.45em; line-height: 1.1; }
.tb-ai-row { display: flex; gap: .8em; align-items: center; }
.tb-ai-row textarea { flex: 1; min-width: 0; }
.tb-go { font-size: .92em; }
.tb-go:disabled { opacity: .7; cursor: progress; }
.tb-status { margin: 0; min-height: 1.2em; font-size: .85em; color: var(--ink-soft); }
.tb-or { margin: -.2em 0 -.3em; text-align: center; font-size: .85em; color: var(--ink-faint); }
.tb-who { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 1.3em; align-items: stretch; }
.tb-who-face, .tb-rv-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5em; text-align: center; padding: 1em .6em; border-radius: var(--r-md); background: color-mix(in srgb, #4c6862 9%, var(--panel-2)); }
.tb-face .mini.xl { width: 5.6em; height: 5.6em; }
.tb-who-face b { font-family: var(--serif); font-weight: 400; font-size: 1.15em; line-height: 1.15; }
.tb-who-fields { display: flex; flex-direction: column; gap: .8em; min-width: 0; }
.tb-3 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, .7fr) minmax(0, 1fr); gap: .8em; }
.tb-about { margin: 0; padding: .75em .95em; border-radius: var(--r-md); background: var(--panel-2); color: var(--ink-soft); font-size: .9em; line-height: 1.45; }
.tb-about b { color: var(--ink); }
.tb-lede { margin: 0; color: var(--ink-soft); }
.tb-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em 2.4em; margin: 0; }
.tb-review { flex: 1; min-height: 0; display: grid; grid-template-columns: 12em minmax(0, 1fr); gap: 1.2em; }
.tb-rv-card { align-self: start; padding: 1.3em .8em; }
.tb-rv-name { font-family: var(--serif); font-weight: 400; font-size: 1.3em; line-height: 1.15; }
.tb-rv-card > span { font-size: .88em; color: var(--ink-soft); }
.tb-rv-card > .tb-rv-appr { margin-top: .2em; padding: .2em .75em; border-radius: var(--r-pill); background: #4c6862; color: #fff; }
.tb-rv-list { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(0, 1fr); gap: .7em; min-height: 0; }
.tb-rv { display: flex; flex-direction: column; gap: .4em; min-height: 0; overflow: hidden; text-align: left; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: .75em .95em; cursor: pointer; }
.tb-rv:hover { border-color: var(--brass); }
.tb-rv-h { font-weight: 600; font-size: .92em; }
.tb-rv p { margin: 0; font-size: .88em; line-height: 1.45; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tb-rv .tags { margin: 0; }
.tb-rv-none { font-size: .88em; font-style: italic; color: var(--ink-faint); }
@media (max-width: 720px) { .tb-who, .tb-review, .tb-rv-list, .tb-sliders, .tb-3 { grid-template-columns: minmax(0, 1fr); } .tb-ai-row { flex-direction: column; align-items: stretch; } .cs-fam { gap: .4rem; } }
.tb-page .field > span { font-size: 1.05em; font-weight: 600; color: var(--ink); }
.tb-page .field > span small { font-weight: 400; color: var(--ink-faint); }

/* Talk it through: the questions as the AI course guide's chat bubbles, and how it talks */
.nt-paper.tk-paper { background: var(--panel); color: var(--ink); border-radius: var(--r-md); border-color: var(--line-soft); padding: clamp(.9rem, 3vh, 1.6rem) clamp(1rem, 2.4vw, 2rem) clamp(.7rem, 2vh, 1.1rem); }
.nt-paper.tk-paper::before { display: none; }
.tk-paper .nt-ph b { color: var(--ink); }
.tk-list { list-style: none; margin: 0; justify-content: flex-start; gap: clamp(.2rem, .8vh, .5rem); padding: 2px 2px 2px 0; overflow: visible; }
.tk-q { padding: 0 .3rem 0 .1rem; row-gap: 0; }
.tk-q:hover, .tk-q:focus-within { background: transparent; }
.tk-bubble { grid-column: 2; grid-row: 1; justify-self: start; width: min(100%, 38rem); display: flex; align-items: center; gap: .6rem; padding: clamp(.3rem, 1vh, .55rem) .95rem clamp(.3rem, 1vh, .55rem) .5rem; border-radius: var(--r-md); border-top-left-radius: 4px; background: color-mix(in srgb, var(--k) 13%, var(--panel)); }
.tk-q:hover .tk-bubble, .tk-q:focus-within .tk-bubble { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--k) 45%, transparent); }
.tk-n { flex: none; width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--k); color: #fff; font-size: .78rem; font-weight: 700; }
.tk-text { font-size: clamp(.95rem, 2.3vh, 1.08rem); line-height: 1.35; color: var(--ink); resize: none; field-sizing: content; min-height: 1.35em; max-height: 2.7em; overflow: hidden; }
.tk-text::placeholder { color: var(--ink-faint); }
.tk-q .nt-tools { grid-row: 1; }
.tk-q .nt-grip { grid-row: 1; }
.tk-reply { grid-column: 2; grid-row: 2; justify-self: end; margin-top: clamp(.1rem, .5vh, .3rem); padding: .1rem .75rem; border-radius: var(--r-md); border-top-right-radius: 4px; border: 1px dashed var(--line); color: var(--ink-faint); font-size: .76rem; line-height: 1.3; font-style: italic; }
.tk-paper .nt-add { color: var(--k); }
.tk-chat { flex: 1; min-height: 0; padding-top: .3rem; }
.tk-empty { align-self: center; max-width: 24rem; margin-top: auto; margin-bottom: auto; text-align: center; color: var(--ink-faint); font-size: .92rem; line-height: 1.45; }
.tk-stale { margin: 0 0 .5rem; font-size: .86rem; color: #8a6a2f; }
.tk-choices { display: flex; flex-wrap: wrap; gap: .35rem; }
.tk-choice { font: inherit; font-size: .9rem; font-weight: 600; color: var(--ink-soft); background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-pill); padding: .35rem .9rem; cursor: pointer; }
.tk-choice:hover { border-color: var(--brass); color: var(--ink); }
.tk-help { margin: .4rem 0 0; font-size: .86rem; line-height: 1.4; color: var(--ink-soft); }
.tk-choice[aria-checked="true"] { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }

/* The step card: hover to dim it and show Preview; Preview opens it full screen as students see it */
.sc-frame { position: relative; width: 100%; max-height: 100%; min-height: 0; display: flex; justify-content: center; }
.sc-card > * { transition: opacity .15s; }
.sc-frame:hover:not(:has(.sc-card :focus)) .sc-card > * { opacity: .5; }
.sc-peek { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: var(--r-pill); background: var(--primary); color: var(--primary-ink); font: inherit; font-weight: 700; font-size: 1rem; padding: .75rem 1.5rem; cursor: pointer; box-shadow: 0 14px 30px -14px rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .15s; }
.sc-frame:hover:not(:has(.sc-card :focus)) .sc-peek, .sc-peek:focus-visible { opacity: 1; pointer-events: auto; }
.sc-peek-ic { display: inline-grid; font-size: 1.15em; }
.sc-full { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; display: none; flex-direction: column; background: var(--paper); color: var(--ink); }
.sc-full[open] { display: flex; }
.sc-full::backdrop { background: var(--paper); }
.sc-full-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.4rem; background: var(--panel-2); border-bottom: 1px solid var(--line-soft); }
.sc-full-bar > span { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.sc-full-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: clamp(.8rem, 3vh, 2.4rem) 1rem; }
.sc-view { width: 44rem; max-width: calc((100vw - 2rem) / 1.2); max-height: calc((100vh - 7rem) / 1.2); overflow: hidden; zoom: 1.2; }
@media (min-height: 860px) { .sc-view { zoom: 1.45; max-width: calc((100vw - 2rem) / 1.45); max-height: calc((100vh - 8rem) / 1.45); } }
@media (min-height: 1040px) { .sc-view { zoom: 1.7; max-width: calc((100vw - 2rem) / 1.7); max-height: calc((100vh - 9rem) / 1.7); } }
.sc-view .sc-about { margin: .35rem 0 0; max-height: none; min-height: 0; }
.sc-view .sc-none { color: var(--ink-faint); font-style: italic; }
.sc-view .sc-h { font-weight: 600; }
.sc-view .sc-word p { margin: 0; font-family: var(--serif); font-size: clamp(1rem, 2.4vh, 1.15rem); font-style: italic; line-height: 1.35; }
.sc-go { display: flex; justify-content: flex-end; }
.sc-go .btn { pointer-events: none; }

/* ---------- Reflect and plan: the questions page (rf-) and the student's cards (rc-) ---------- */
.rf-ed, .rc-host { --rf-c1: #4f79b0; --rf-c2: #3f8a7a; --rf-c3: #b08a3a; --rf-p1: #4f79b0; --rf-p2: #c0674a; --rf-good: var(--success); }
.rf-ed { flex: 1; min-height: 0; height: 100%; display: grid; grid-template-columns: minmax(17rem, .82fr) minmax(0, 2fr); gap: clamp(1rem, 2.2vw, 2.2rem); padding: clamp(.4rem, 1.4vh, 1rem) clamp(.4rem, 1.2vw, 1.2rem); box-sizing: border-box; }
.rf-ed button { cursor: pointer; font-family: inherit; line-height: 1.3; }
.rf-ed button:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 45%, transparent); }
.rf-ed input, .rf-ed textarea { border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; padding: 0; min-width: 0; box-shadow: none; }
.rf-ed textarea { resize: none; overflow: hidden; width: 100%; display: block; }
.rf-ed input::placeholder, .rf-ed textarea::placeholder { color: var(--ink-faint); }
.rf-ed h3 { margin: 0; font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--ink); letter-spacing: 0; text-transform: none; }
.rf-h { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.05; font-size: clamp(1.8rem, 4.8vh, 2.4rem); }
.rf-outline { min-height: 0; display: flex; flex-direction: column; gap: clamp(.4rem, 1.3vh, .8rem); }
.rf-ol { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: clamp(.4rem, 1.4vh, .8rem); padding: 2px; }
.rf-ol > * { flex: none; }
.rf-grp { display: flex; flex-direction: column; gap: .3rem; }
.rf-ed .rf-grph { color: color-mix(in srgb, var(--pc) 70%, var(--ink)); display: flex; align-items: center; gap: .5rem; font-size: 1.08rem; }
.rf-grph::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--pc); }
.rf-grp ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: clamp(.25rem, .8vh, .4rem); min-height: 1.4rem; border-radius: var(--r-md); }
.rf-it { position: relative; touch-action: none; cursor: grab; display: flex; align-items: center; gap: .5rem; padding: clamp(.3rem, 1vh, .5rem) .7rem clamp(.3rem, 1vh, .5rem) .2rem; border-radius: var(--r-md); border: 1px solid var(--line-soft); background: var(--panel); }
.rf-it:hover { border-color: var(--ink-faint); }
.rf-it.on { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 10%, var(--panel-2)); box-shadow: 0 0 0 1px var(--pc); }
.rf-it.dragging { opacity: .35; }
.rf-it.drop-before::before, .rf-it.drop-after::after { content: ""; position: absolute; left: .4rem; right: .4rem; height: 3px; border-radius: 3px; background: var(--brass); z-index: 2; }
.rf-it.drop-before::before { top: -4px; }
.rf-it.drop-after::after { bottom: -4px; }
.rf-ed .drop-in { box-shadow: inset 0 0 0 2px var(--brass); }
.rf-ghost { position: fixed; z-index: var(--z-drag); pointer-events: none; margin: 0; list-style: none; background: var(--panel-2); border-radius: var(--r-md); box-shadow: 0 18px 40px -18px rgba(0,0,0,.45), 0 0 0 1px color-mix(in srgb, var(--brass) 45%, transparent); transform: rotate(-1deg); opacity: .95; }
.rf-chip.rf-ghost { border-radius: var(--r-pill); width: auto !important; }
.rf-grip { flex: none; width: 1.4rem; height: 1.5rem; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-faint); display: grid; place-items: center; font-size: .95rem; cursor: grab; opacity: .5; padding: 0; }
.rf-it:hover .rf-grip, .rf-grip:focus-visible, .rf-it.on .rf-grip { opacity: 1; }
.rf-num { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--ink-soft); }
.rf-t { flex: 1; min-width: 0; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-skip { flex: none; font-size: .72rem; color: var(--ink-soft); }
.rf-ic { flex: none; width: 1.2rem; height: 1.2rem; color: var(--kc); display: inline-flex; }
.rf-ic svg { width: 100%; height: 100%; }
.rf-addq { align-self: stretch; text-align: left; border: 1px dashed var(--line); background: none; color: var(--ink-soft); border-radius: var(--r-md); padding: .38rem .8rem; font-size: .92rem; font-weight: 600; }
.rf-addq:hover { color: var(--ink); border-color: var(--ink-faint); border-style: solid; background: var(--panel); }
.rf-full { margin: 0; font-size: .8rem; color: var(--ink-faint); padding-left: .3rem; }
.rf-recs { display: flex; flex-direction: column; gap: .3rem; margin-top: .3rem; }
.rf-ed .rf-recs h3 { width: 100%; font-size: .92rem; font-weight: 500; color: var(--ink-soft); }
.rf-chip { border: 1px dashed var(--line); background: none; color: var(--ink-soft); border-radius: var(--r-md); padding: .38rem .8rem; font-size: .92rem; text-align: left; touch-action: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-chip:hover { border-color: var(--brass); color: var(--ink); border-style: solid; }
.rf-ai { flex: none; align-self: stretch; justify-content: center; display: inline-flex; align-items: center; gap: .55rem; border: 0; border-radius: var(--r-pill); background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: .98rem; padding: .62rem 1.3rem; white-space: nowrap; }
.rf-ai:hover:not([disabled]) { filter: brightness(1.12); }
.rf-ai[disabled] { opacity: .7; cursor: default; }
.rf-spark { display: inline-flex; color: var(--brass); font-size: 1.1em; }
.rf-spin { display: inline-block; width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: rf-spin .8s linear infinite; }
@keyframes rf-spin { to { transform: rotate(360deg); } }
.rf-status { margin: 0; font-size: .85rem; color: var(--reactive); }
.rf-status:empty { display: none; }
.rf-card { min-height: 0; display: flex; flex-direction: column; gap: clamp(.45rem, 1.5vh, .9rem); padding: clamp(.75rem, 2.4vh, 1.4rem) clamp(1.1rem, 2.4vw, 2rem); border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line-soft); }
.rf-ctop { flex: none; display: flex; align-items: center; gap: .3rem; color: var(--ink-soft); font-size: .95rem; }
.rf-where { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-ctop .rf-seg { margin-right: .5rem; }
.rf-nav { flex: none; border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--r-pill); width: 1.9rem; height: 1.9rem; display: grid; place-items: center; color: var(--ink-soft); padding: 0; }
.rf-nav:hover:not([disabled]) { color: var(--ink); border-color: var(--ink-faint); }
.rf-nav[disabled] { opacity: .35; cursor: default; }
.rf-seg { flex: none; display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--panel-2); border: 1px solid var(--line-soft); }
.rf-seg button { border: 0; background: none; padding: .3rem .85rem; border-radius: var(--r-pill); font-size: .92rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.rf-seg button:hover { color: var(--ink); }
.rf-seg button[aria-checked="true"] { background: color-mix(in srgb, var(--k, var(--brass)) 16%, var(--panel-2)); color: var(--ink); box-shadow: inset 0 0 0 1px var(--k, var(--brass)); }
.rf-ed .rf-bigq { flex: none; font-family: var(--serif); font-size: clamp(1.45rem, 4.2vh, 2.1rem); line-height: 1.15; border-bottom: 1px dashed var(--line); padding-bottom: .25rem; }
.rf-ed .rf-bigq:focus { border-bottom-color: var(--k); }
.rf-ed .rf-help { flex: none; width: 100%; font-size: 1rem; color: var(--ink-soft); padding: .15rem 0; border-bottom: 1px dashed transparent; }
.rf-ed .rf-help:hover { border-bottom-color: var(--line); }
.rf-ed .rf-help:focus { border-bottom-color: var(--k); color: var(--ink); }
.rf-ebody { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(11rem, 14rem) minmax(0, 1fr); gap: clamp(.8rem, 1.8vw, 1.6rem); }
.rf-kcol { display: flex; flex-direction: column; gap: .4rem; }
.rf-ed .rf-kcol h3, .rf-ed .rf-su h3 { font-size: .95rem; font-weight: 500; color: var(--ink-soft); }
.rf-kopt { display: flex; align-items: center; gap: .6rem; text-align: left; padding: clamp(.4rem, 1.3vh, .65rem) .7rem; border-radius: var(--r-md); border: 1px solid var(--line-soft); background: var(--panel-2); color: var(--ink); }
.rf-kopt > svg { flex: none; width: 1.3rem; height: 1.3rem; color: var(--kc); }
.rf-kopt span { display: flex; flex-direction: column; min-width: 0; }
.rf-kopt b { font-size: 1rem; font-weight: 600; }
.rf-kopt small { font-size: .84rem; color: var(--ink-soft); line-height: 1.25; }
.rf-kopt:hover { border-color: var(--kc); }
.rf-kopt[aria-checked="true"] { border-color: var(--kc); background: color-mix(in srgb, var(--kc) 14%, var(--panel-2)); box-shadow: 0 0 0 1px var(--kc); }
.rf-scol { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: clamp(.45rem, 1.4vh, .8rem); padding: 2px 2px 2px 1.2rem; border-left: 1px solid var(--line-soft); }
.rf-su { display: flex; flex-direction: column; gap: clamp(.4rem, 1.2vh, .65rem); }
.rf-row { display: flex; align-items: center; gap: .5rem .9rem; flex-wrap: wrap; }
.rf-l { font-size: .95rem; color: var(--ink-soft); }
.rf-opts { display: flex; flex-wrap: wrap; gap: .35rem .4rem; align-items: center; }
.rf-o { display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--r-pill); padding: .2rem .2rem .2rem .6rem; }
.rf-o:focus-within { border-color: var(--k); box-shadow: 0 0 0 1px var(--k); }
.rf-ed .rf-o input { field-sizing: content; min-width: 9ch; max-width: 100%; font-size: 1rem; }
.rf-add { border: 1px dashed var(--line); background: none; color: var(--ink-soft); border-radius: var(--r-pill); padding: .34rem .9rem; font-size: .92rem; font-weight: 600; }
.rf-add:hover { color: var(--ink); border-style: solid; }
.rf-x { flex: none; border: 0; background: none; color: var(--ink-faint); width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: .72rem; padding: 0; }
.rf-x:hover:not([disabled]) { color: var(--reactive); background: color-mix(in srgb, var(--reactive) 12%, transparent); }
.rf-x[disabled] { opacity: .3; cursor: default; }
.rf-labs { display: flex; flex-direction: column; gap: .25rem; }
.rf-lab { display: flex; align-items: center; gap: .55rem; }
.rf-ed .rf-lab input { flex: 1; max-width: 20rem; border-bottom: 1px dashed var(--line); padding: .18rem .1rem; font-size: 1rem; }
.rf-ed .rf-lab input:focus { border-bottom-color: var(--k); }
.rf-n { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); display: grid; place-items: center; font-weight: 600; font-size: .8rem; color: var(--ink-soft); }
.rf-tg { display: inline-flex; align-items: center; gap: .55rem; border: 0; background: none; text-align: left; padding: .15rem .3rem .15rem 0; border-radius: var(--r-md); color: var(--ink); align-self: flex-start; }
.rf-sw { flex: none; width: 2.1rem; height: 1.2rem; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ink-faint) 55%, var(--line)); position: relative; transition: background .15s; }
.rf-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.2rem - 4px); height: calc(1.2rem - 4px); border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.rf-tg[aria-pressed="true"] .rf-sw { background: var(--rf-good); }
.rf-tg[aria-pressed="true"] .rf-sw::after { transform: translateX(.9rem); }
.rf-tgt { display: flex; flex-direction: column; min-width: 0; }
.rf-tgt b { font-weight: 600; font-size: .98rem; display: inline-flex; align-items: center; gap: .3rem; }
.rf-tgt small { font-size: .86rem; color: var(--ink-soft); line-height: 1.3; }
.rf-b { flex: none; width: .8rem; height: .8rem; border-radius: 50%; border: 1.5px solid var(--ink-faint); }
.rf-b.many { border-radius: 3px; }
.rf-acts { display: flex; flex-wrap: wrap; gap: .2rem; margin-top: auto; padding-top: .3rem; }
.rf-lnk { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line-soft); background: none; color: var(--ink-soft); border-radius: var(--r-pill); padding: .32rem .8rem; font-size: .92rem; white-space: nowrap; }
.rf-lnk:hover:not([disabled]) { color: var(--ink); border-color: var(--line); }
.rf-lnk.rm:hover { color: var(--reactive); border-color: color-mix(in srgb, var(--reactive) 40%, transparent); }
.rf-lnk[disabled] { opacity: .4; cursor: default; }
.rf-empty { margin: auto; color: var(--ink-faint); text-align: center; max-width: 24rem; line-height: 1.45; }
.rf-faint { color: var(--ink-faint); }
.rf-sbody { flex: 1; min-height: 0; overflow: hidden; display: flex; }
.rf-pv { width: min(100%, 34rem); display: flex; flex-direction: column; gap: .7rem; }
.rf-pvat { font-size: .82rem; color: var(--ink-soft); }
.rf-pvq { font-family: var(--serif); font-size: clamp(1.4rem, 4vh, 1.9rem); line-height: 1.2; overflow-wrap: anywhere; }
.rf-optl { font-family: var(--sans); font-size: .72rem; font-weight: 600; color: var(--ink-soft); background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-pill); padding: .05rem .5rem; vertical-align: .25em; white-space: nowrap; }
.rf-pvhelp { font-size: .95rem; color: var(--ink-soft); line-height: 1.35; margin-top: -.2rem; }
.rf-pvbox { position: relative; min-height: 2.6rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); padding: .6rem 6rem .6rem .8rem; font-size: .9rem; color: var(--ink-faint); }
.rf-pvbox.long { min-height: clamp(5rem, 16vh, 8rem); }
.rf-pvmic { position: absolute; right: .45rem; bottom: .4rem; display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--line); border-radius: var(--r-pill); padding: .2rem .65rem; font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.rf-pvhint { font-size: .82rem; color: var(--ink-soft); }
.rf-pvopts { display: flex; flex-wrap: wrap; gap: .4rem; }
.rf-pvo { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-pill); padding: .45rem 1rem .45rem .7rem; font-size: .95rem; }
.rf-pvo.other { border-style: dashed; color: var(--ink-soft); }
.rf-pvscale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; }
.rf-pt { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; min-width: 0; }
.rf-pt .rf-n { width: 2.6rem; height: 2.6rem; font-size: 1rem; }
.rf-pt small { font-size: .84rem; color: var(--ink-soft); line-height: 1.2; min-height: 1em; }
@media (max-height: 760px) { .rf-kopt small, .rf-tgt small { display: none; } .rf-recs .rf-chip:nth-of-type(n+3) { display: none; } }

/* The student's cards: cream paper on a small stack, one question at a time */
.rc-host { flex: 1; min-height: 0; height: 100%; display: flex; align-items: center; justify-content: center; padding: clamp(.6rem, 2vh, 1.2rem); box-sizing: border-box; container-type: size; overflow: hidden; }
.rc-host button { cursor: pointer; font-family: inherit; line-height: 1.3; }
.rc-host :is(button, input):focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, #c39a5a 55%, transparent); }
.rc-sheaf { position: relative; width: min(100%, 56rem); height: min(100%, 40rem); }
.rc-sheaf::before, .rc-sheaf::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-sm); background: #f6efdf; box-shadow: 0 10px 30px -20px rgba(0,0,0,.4); }
.rc-sheaf::before { transform: rotate(-1.8deg) translate(-6px, 6px); background: #efe5cf; }
.rc-sheaf::after { transform: rotate(1.2deg) translate(5px, 4px); }
.rc-card { position: relative; z-index: 1; width: 100%; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: clamp(.45rem, 2.2cqh, 1rem); padding: clamp(1rem, 4cqh, 2rem) clamp(1.4rem, 4cqw, 3rem); border-radius: var(--r-sm); color: #2b2721; background: linear-gradient(170deg, #fffaf0, #fbf3e2); box-shadow: 0 24px 50px -30px rgba(60,40,10,.55); }
.rc-top { flex: none; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.rc-count { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 4cqh, 1.4rem); color: #8a5a2b; }
.rc-part { font-size: .95rem; color: #7a6c58; }
.rc-optl { font-size: .78rem; font-weight: 600; color: #7a6c58; border: 1px solid #e0d2b2; border-radius: var(--r-pill); padding: .08rem .55rem; }
.rc-pips { margin-left: auto; display: inline-flex; gap: .55rem; color: #8a5a2b; }
.rc-pp { display: inline-flex; gap: .28rem; }
.rc-pips i { width: .55rem; height: .55rem; border-radius: 50%; background: color-mix(in srgb, currentColor 22%, transparent); transition: background .2s, transform .2s; }
.rc-pips i.has { background: color-mix(in srgb, currentColor 65%, transparent); }
.rc-pips i.on { background: currentColor; transform: scale(1.35); }
.rc-qh { flex: none; font-family: var(--serif); font-weight: 400; margin: 0; font-size: clamp(1.6rem, 7cqh, 2.7rem); line-height: 1.08; text-wrap: balance; color: #231f1a; max-width: 46rem; }
.rc-help { flex: none; margin: -.2rem 0 0; font-size: clamp(.95rem, 2.8cqh, 1.1rem); color: #7a6c58; }
.rc-squig { flex: none; width: 9rem; height: .7rem; color: #c39a5a; margin-top: -.3rem; }
.rc-lead { margin: 0; font-size: clamp(.95rem, 2.8cqh, 1.12rem); line-height: 1.45; max-width: 40rem; }
.rc-spacer { flex: 1; }
.rc-fld { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .6rem; }
.rc-fld.scale, .rc-fld.pick { justify-content: center; align-items: center; }
.rc-write { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .45rem; }
.rc-write.short { flex: none; }
.rc-write.short .rc-ta { flex: none; height: 4.2rem; }
.rc-ta { flex: 1; min-height: 3.5rem; width: 100%; box-sizing: border-box; resize: none; outline: none; border: 0; background: repeating-linear-gradient(transparent 0 calc(2.1rem - 1px), #e4d8bd calc(2.1rem - 1px) 2.1rem); background-attachment: local; line-height: 2.1rem; padding: 0 .2rem; font-family: var(--serif); font-size: clamp(1.2rem, 4cqh, 1.45rem); color: #2b2721; }
.rc-ta::placeholder { color: #b3a68c; font-style: italic; }
.rc-wfoot { flex: none; display: flex; align-items: center; gap: .8rem; }
.rc-hint { margin: 0; font-size: .9rem; color: #7a6c58; flex: 1; }
.rc-center { flex: none; text-align: center; }
.rc-host .lb-mic { color: #5c4a30; border-color: #d9c9a6; background: #fffaf0; }
.rc-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; width: min(100%, 40rem); }
.rc-opt { display: flex; align-items: center; gap: .7rem; text-align: left; padding: .75rem 1rem; border-radius: var(--r-md); font-size: 1.05rem; font-weight: 500; line-height: 1.25; border: 1.5px solid #dccdab; background: #fffcf5; color: #2b2721; transition: background .15s, border-color .15s, transform .15s; }
.rc-opt:hover { transform: translateY(-1px); border-color: #b98d52; }
.rc-ok { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid color-mix(in srgb, currentColor 35%, transparent); }
.rc-ok.many { border-radius: 6px; }
.rc-ok svg { width: .9rem; height: .9rem; opacity: 0; }
.rc-opt[aria-pressed="true"] { border-color: #2b2721; background: #2b2721; color: #fffaf0; }
.rc-opt[aria-pressed="true"] .rc-ok svg { opacity: 1; }
.rc-other { width: min(100%, 40rem); box-sizing: border-box; border: 0; border-bottom: 1.5px solid #dccdab; background: transparent; outline: none; font-family: var(--serif); font-size: 1.2rem; padding: .3rem .2rem; color: #2b2721; }
.rc-other::placeholder { color: #b3a68c; font-style: italic; }
.rc-scale { display: flex; flex-direction: column; align-items: stretch; gap: .8rem; width: min(100%, 32rem); }
.rc-srow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); justify-items: center; align-items: start; }
.rc-spt { display: flex; flex-direction: column; align-items: center; gap: .45rem; min-width: 0; text-align: center; }
.rc-spt small { font-family: var(--serif); font-style: italic; font-size: 1rem; line-height: 1.2; color: #5c4a30; min-height: 1.2em; }
.rc-sc { width: clamp(3rem, 11cqh, 3.8rem); height: clamp(3rem, 11cqh, 3.8rem); padding: 0; border-radius: 50%; border: 2px solid #2b2721; background: #fffcf5; color: #2b2721; font-family: var(--serif); font-size: 1.35rem; display: grid; place-items: center; transition: transform .15s, background .15s; }
.rc-sc:hover { transform: translateY(-2px); }
.rc-sc[aria-checked="true"] { background: #2b2721; color: #fffaf0; box-shadow: 0 0 0 4px #fffaf0, 0 0 0 6px #c39a5a; }
.rc-ends { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: #5c4a30; padding-inline: .2rem; }
.rc-ends span:last-child { text-align: right; }
.rc-nav { flex: none; display: flex; align-items: center; gap: .7rem; }
.rc-need { font-size: .88rem; color: #7a6c58; }
.rc-go { display: inline-flex; align-items: center; gap: .45rem; border: 0; border-radius: var(--r-pill); padding: .62rem 1.3rem; background: #2b2721; color: #fffaf0; font-weight: 600; white-space: nowrap; }
.rc-go svg { width: 1.05rem; height: 1.05rem; transition: transform .15s; }
.rc-go:hover:not([disabled]) svg { transform: translateX(3px); }
.rc-go[disabled] { opacity: .4; cursor: default; }
.rc-ghost { border: 1px solid #d9c9a6; border-radius: var(--r-pill); padding: .55rem 1.15rem; background: transparent; color: #2b2721; font-weight: 600; white-space: nowrap; }
.rc-ghost:hover { border-color: #b98d52; }
.rc-said { margin: 0; padding: .7rem 1rem; line-height: 1.45; max-width: 38rem; background: #f6ecd6; border-left: 3px solid #c39a5a; border-radius: 0 var(--r-md) var(--r-md) 0; font-family: var(--serif); font-size: 1.15rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rc-said b { display: block; font-family: var(--sans); font-weight: 600; font-size: .88rem; color: #7a6c58; }
.rc-recap { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: clamp(.8rem, 2.4cqw, 1.8rem); }
.rc-recap section { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: .3rem; }
.rc-recap h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.2rem, 4.2cqh, 1.55rem); color: #8a5a2b; }
.rc-recap dl { margin: 0; }
.rc-recap dt { font-weight: 600; font-size: .82rem; color: #7a6c58; margin-top: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-recap dd { margin: 0; font-family: var(--serif); font-size: 1.05rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-recap dd.none { opacity: .5; font-style: italic; }
.rc-soft { opacity: .7; }
@container (max-height: 520px) { .rc-recap dd { -webkit-line-clamp: 1; } .rc-recap dt { margin-top: .2rem; } }
.rc-card.enter-f { animation: rc-in-f .38s var(--ease-enter); }
.rc-card.enter-b { animation: rc-in-b .38s var(--ease-enter); }
.rc-card.leave-f { animation: rc-out-f .2s ease-in forwards; }
.rc-card.leave-b { animation: rc-out-b .2s ease-in forwards; }
@keyframes rc-in-f { from { opacity: 0; transform: translateX(40px) rotate(1.5deg); } }
@keyframes rc-in-b { from { opacity: 0; transform: translateX(-40px) rotate(-1.5deg); } }
@keyframes rc-out-f { to { opacity: 0; transform: translateX(-60px) rotate(-2deg); } }
@keyframes rc-out-b { to { opacity: 0; transform: translateX(60px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .rc-card { animation: none !important; } }
.lb-main.rc-main { padding: 0; background: none; border: 0; }

/* A small sound someone makes while another person talks ("mm-hm", sighs): shown by their seat for a moment. */
.seat-sound {
  position: absolute; left: calc(50% + 22px * var(--s, 1)); top: calc(-6px * var(--s, 1)); z-index: 4; pointer-events: none;
  font-family: var(--serif); font-size: calc(.95rem * var(--s, 1)); white-space: nowrap;
  background: rgba(250, 247, 240, .96); color: #2c3533; padding: .1rem .55rem; border-radius: var(--r-pill);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  animation: seat-sound 2.6s ease forwards;
}
.seat-sound.act { font-style: italic; }
@keyframes seat-sound {
  0% { opacity: 0; transform: translateY(4px); }
  10%, 75% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) { .seat-sound { animation: none; } }
.t-sound { margin: .15rem 0 0; font-family: var(--serif); font-style: italic; font-size: .9rem; color: var(--ink-faint); }

/* Kit heads (kit-heads.js): the open mouth shows only while talking; the eyes blink now and then. */
.kit-face { background: #3b3e42; }
.kit-face .m-open { opacity: 0; }
.kit-face .k-blink { opacity: 0; animation: kit-blink 5s var(--blink-delay, 0s) infinite steps(1); }
.kit-face .k-eyes { animation: kit-eyes 5s var(--blink-delay, 0s) infinite steps(1); }
@keyframes kit-blink { 0%, 96% { opacity: 0; } 97%, 99% { opacity: 1; } }
@keyframes kit-eyes { 0%, 96% { opacity: 1; } 97%, 99% { opacity: 0; } }
.avatar.talking .kit-face .m-open, .seat-face.talking .kit-face .m-open { animation: talk-open .26s steps(1) infinite; }
.avatar.talking .kit-face .m-closed, .seat-face.talking .kit-face .m-closed { animation: talk-closed .26s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { .kit-face .k-blink, .kit-face .k-eyes { animation: none; } }
.kit-pick { display: flex; gap: .5rem; flex-wrap: wrap; }
.kit-choice { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .3rem .35rem .25rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); cursor: pointer; }
.kit-choice small { font-size: .75rem; color: var(--muted, inherit); }
.kit-choice.on { box-shadow: 0 0 0 2px var(--brass); border-color: transparent; }
.kit-choice .mini.kit-choice-face { position: relative; display: block; width: 46px; height: 46px; }


/* ---------- Session setup: who's coming in, the scene, Standard or Premium, and how long ---------- */
.start-card.wide { width: min(94vw, 1100px); }
.sc-body { gap: 1.1em; padding: 0 0 .9em; }
.sc-hero { padding: 1.5em 1.7em 1.2em; background: linear-gradient(160deg, var(--brass-soft) 0%, var(--panel-2) 75%); border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: .5em; }
.sc-hero .sc-sub { margin: 0; font-size: 1.05em; }
.start-card h2 { font-size: 2.5em; }
.sc-faces { display: flex; flex-wrap: wrap; gap: .9em; margin-bottom: .3em; }
.sc-face { display: flex; flex-direction: column; align-items: center; gap: .3em; font-size: .85em; font-weight: 600; color: var(--ink-soft); }
.sc-face .mini.lg { width: 3.6em; height: 3.6em; }
.sc-cols, .sc-cols.solo { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1em; padding: 0 1.6em; }
.sc-col { display: flex; flex-direction: column; gap: 1em; min-width: 0; }
.sc-block { padding: 1em 1.1em; gap: .65em; }
.sc-h { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.45em; line-height: 1.1; color: var(--ink); }
.sc-h small { font-family: var(--sans); font-size: .55em; color: var(--ink-faint); margin-left: .35em; vertical-align: middle; }
.sc-lengths { display: flex; flex-wrap: wrap; gap: .4em; }
.sc-len { font: inherit; font-size: .92em; padding: .4em .95em; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; }
.sc-len:hover { border-color: var(--ink-soft); }
.sc-len[aria-checked="true"] { background: var(--ink); color: var(--panel-2); border-color: var(--ink); }
.sc-summary { display: flex; align-items: center; gap: .6em; color: var(--ink-soft); font-size: .92em; }
@media (max-width: 720px) { .sc-cols, .sc-cols.solo { grid-template-columns: minmax(0, 1fr); padding: 0 1.1em; } .sc-hero { padding: 1.2em 1.1em 1em; } .start-card h2 { font-size: 1.9em; } .sc-summary { display: none; } }

/* The two writing cards */
.tier-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(13em, 1fr)); gap: .7em; }
.tier { font: inherit; text-align: left; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: .55em; padding: 1em 1.05em 1.05em; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--panel-2); transition: border-color .15s, box-shadow .15s, transform .15s; }
.tier:hover { border-color: var(--ink-soft); transform: translateY(-1px); }
.tier:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.tier[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 14%, transparent), 0 10px 24px -14px rgba(0, 0, 0, .35); }
.tier-premium { background: linear-gradient(155deg, var(--panel-2) 0%, var(--brass-soft) 100%); border-color: color-mix(in srgb, var(--brass) 45%, var(--line)); }
.tier-premium[aria-checked="true"] { border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 30%, transparent), 0 12px 28px -14px color-mix(in srgb, var(--brass) 70%, transparent); }
.tier-top { display: flex; align-items: center; justify-content: space-between; gap: .5em; }
.tier-name { font-family: var(--serif); font-size: 1.65em; line-height: 1; display: flex; align-items: center; gap: .25em; }
.tier-star { color: var(--brass); font-size: .7em; }
.tier-check { width: 1.35em; height: 1.35em; border-radius: 50%; border: 1.5px solid var(--line); flex: none; display: grid; place-items: center; }
.tier[aria-checked="true"] .tier-check { background: var(--ink); border-color: var(--ink); }
.tier-premium[aria-checked="true"] .tier-check { background: var(--brass); border-color: var(--brass); }
.tier[aria-checked="true"] .tier-check::after { content: ""; width: .32em; height: .62em; border: solid var(--panel-2); border-width: 0 2px 2px 0; transform: translateY(-.08em) rotate(45deg); }
.tier-line { font-size: .95em; line-height: 1.4; color: var(--ink-soft); }
.tier-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3em; font-size: .88em; }
.tier-points li { display: flex; gap: .45em; align-items: baseline; }
.tier-points li::before { content: "\2713"; color: var(--ink-faint); font-weight: 700; }
.tier-premium .tier-points li::before { color: var(--brass); }
.tier-model { margin-top: auto; padding-top: .45em; border-top: 1px solid var(--line-soft); font-size: .78em; color: var(--ink-faint); }
@media (max-width: 720px) { .tier-pick { grid-template-columns: minmax(0, 1fr); } }

/* The choice, shown once the session is under way */
.writer-badge { display: inline-flex; align-items: center; gap: .3em; width: fit-content; padding: .22em .75em; border-radius: var(--r-pill); font-size: .82rem; font-weight: 600; border: 1px solid var(--line); color: var(--ink-soft); background: var(--panel-2); }
.writer-badge.premium { border-color: color-mix(in srgb, var(--brass) 55%, transparent); color: var(--brass-ink); background: linear-gradient(135deg, var(--brass-soft), var(--panel-2)); }
.sc-summary .writer-badge { font-size: .85em; }
.writer-view:empty { display: none; }
.writer-view { margin: -.2rem 0 .3rem; }
.cs-card .writer-badge { margin-top: .5rem; }
.sc-face .mini::before, .sc-face .mini .face, .sc-face .mini svg { border-radius: 50%; }

/* What this session has cost so far: on this computer only (app.js paintMeter). */
.cost-meter { position: fixed; right: 12px; bottom: 12px; z-index: var(--z-sticky); display: grid; gap: .1rem; padding: .55rem .8rem; border-radius: var(--r-md); background: #1f3a33; color: #fff; font: 13px/1.35 var(--sans); opacity: .92; pointer-events: none; box-shadow: 0 4px 14px rgb(0 0 0 / .18); }
.cost-meter b { font-size: 15px; }
.cost-meter span { opacity: .85; }
.cost-meter[hidden] { display: none; }
.writer-badge.opus { border-color: color-mix(in srgb, #2f6f5e 50%, transparent); color: #2f6f5e; }

/* Ultra Premium looks like Premium */
.tier-ultra { background: linear-gradient(155deg, var(--panel-2) 0%, var(--brass-soft) 100%); border-color: color-mix(in srgb, var(--brass) 45%, var(--line)); }
.tier-ultra[aria-checked="true"] { border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 30%, transparent), 0 12px 28px -14px color-mix(in srgb, var(--brass) 70%, transparent); }
.tier-ultra[aria-checked="true"] .tier-check { background: var(--brass); border-color: var(--brass); }
.tier-ultra .tier-points li::before { color: var(--brass); }
.writer-badge.ultra { border-color: color-mix(in srgb, var(--brass) 55%, transparent); color: var(--brass-ink); background: linear-gradient(135deg, var(--brass-soft), var(--panel-2)); }
/* For now the session panel doesn't offer changing the approach, restarting, or show the writer:
   those are chosen on the setup screen before the session. */
.side-left .approach-wrap, .side-left .setup-actions, .side-left .writer-view { display: none !important; }

/* Hold to talk: the talk button in the Live bar */
.live-talk { border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: .55rem 1.1rem; background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; user-select: none; touch-action: none; white-space: nowrap; }
.live-talk:hover { border-color: var(--gold); }
.live-talk.on { background: var(--brass); border-color: var(--brass); color: var(--on-light); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brass) 35%, transparent); }
.live-talk:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* A session is just the room: no top menu, no "All sessions", no Arrange room.
   The ways out are End session and Cancel session. */
body.in-session .masthead .nav { display: none; }
body.in-session .masthead .wordmark { pointer-events: none; }
#back-sessions, #seat-back, #arrange-btn { display: none !important; }
.note-actions { gap: .5rem; }

/* The client's seat: clock, hold to talk, and the move behind each line (Guided) */
.seat-clock { display: inline-flex; align-items: baseline; gap: .35rem; padding: .3rem .7rem; border-radius: var(--r-pill); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.seat-clock small { color: var(--ink-faint); }
.seat-clock.late { border-color: var(--brass); }
.seat-clock.over { border-color: var(--danger); color: var(--danger); }
.seat-clock.over small { color: inherit; }
.composer-row .seat-talk { align-self: flex-end; height: 2.9rem; }
.seat-move { margin: .35rem 0 0; padding: .4rem .6rem; border-left: 3px solid var(--brass); background: var(--brass-soft, rgba(200,160,80,.12)); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .86rem; color: var(--ink-soft, inherit); }
.seat-move b { display: block; font-weight: 600; }
#seat-transcript .t-entry.note .t-text { font-style: italic; color: var(--ink-faint); }

/* ---------- one page: the black between views, and the views themselves (app.js openView) ---------- */
#page-black { position: fixed; inset: 0; z-index: var(--z-top); background: #000; opacity: 0; pointer-events: none; }
#page-black.on { opacity: 1; pointer-events: auto; }
.page-view { position: fixed; inset: 0; z-index: var(--z-view); }

/* Training: the rail in the session's deep green; green, amber and orange for Beginner, Intermediate and Advanced */
.mr, .move-card {
  --rail: #18302a; --rail-2: #234238; --rail-on: #f1e5c9; --rail-ink: #d3e0d9; --rail-mute: #97b0a5;
  --lv0: #1d9e75; --lv0-bg: #e1f5ee; --lv0-ink: #085041;
  --lv1: #ba7517; --lv1-bg: #faeeda; --lv1-ink: #633806;
  --lv2: #d85a30; --lv2-bg: #faece7; --lv2-ink: #712b13;
}
.mr-rail { border-right: 1px solid var(--line); }
.mr-main { background: transparent; }
.mr-list button.on { background: var(--brass-soft); color: var(--brass-ink); }
.mr .mt-num, .mc-head .mt-num, .mr-go, .mc-practise, .mr-seg button.on { color: #fff; }
.mf-hero { background: var(--rail); }
.move-card::backdrop { background: rgba(20,24,22,.45); }
.panel, .card, .ss-card { box-shadow: 0 1px 2px rgba(20,30,25,.05); }

/* ---------- scrollbars: the app's own, never the computer's (a slim rounded bar, no arrows, no track) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; }
::-webkit-scrollbar-thumb { background: var(--sb, rgba(23,35,31,.24)) padding-box; border: 3px solid transparent; border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background-color: var(--sb-on, rgba(23,35,31,.42)); }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--sb, rgba(23,35,31,.24)) transparent; } }

/* ---------- one page: the title card on the black as a Training practice begins (app.js practiceTitleCard) ---------- */
#page-black .practice-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem; padding: 0 8vw; text-align: center; opacity: 0; transform: translateY(8px); transition: opacity 1s ease, transform 1.4s ease; color: var(--cream); font-family: var(--sans); }
#page-black .practice-card.on { opacity: 1; transform: none; }
#page-black .practice-card h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1.05; letter-spacing: .005em; color: var(--cream); }
#page-black .practice-card p { margin: 0; color: #b9b1a3; font-size: clamp(1rem, 1.5vw, 1.25rem); letter-spacing: .04em; }
#page-black .practice-card .rule { width: 56px; height: 1px; background: var(--gold); opacity: .7; }
#page-black .practice-card .pc-aim { margin-top: .6rem; max-width: 34em; font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.1vw, 1.75rem); letter-spacing: 0; line-height: 1.3; color: var(--gold-2); }
@media (prefers-reduced-motion: reduce) { #page-black .practice-card { transition: opacity .3s ease; transform: none; } }

/* ---------- starting a paid Training practice: its price (app.js practiceCostOk). Dark, like a session's Begin. ---------- */
dialog.practice-go { width: min(460px, 92vw); padding: 0; border: 1px solid var(--dark-line); border-radius: var(--r-md); background: var(--dark-surface); color: var(--dark-ink); box-shadow: 0 40px 90px -30px rgba(0,0,0,.7); --sb: rgba(255,255,255,.2); }
dialog.practice-go::backdrop { background: rgba(5,8,7,.62); backdrop-filter: blur(8px); }
.practice-go .pg-in { display: flex; flex-direction: column; align-items: center; gap: .9rem; padding: 1.8rem 1.8rem 1.5rem; text-align: center; font-family: var(--sans); }
.practice-go h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.1; color: var(--dark-ink); }
.practice-go .pg-what { margin: -.4rem 0 0; color: var(--dark-soft); font-size: 1rem; }
.practice-go .pg-cost { font-family: var(--serif); font-size: 3.2rem; line-height: 1; color: var(--gold-2); }
.practice-go .pg-lines { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.2rem; margin: 0; font-size: .95rem; text-align: left; }
.practice-go .pg-lines dt { color: var(--dark-soft); }
.practice-go .pg-lines dd { margin: 0; text-align: right; font-weight: 600; }
.practice-go .pg-lines .total { border-top: 1px solid var(--dark-line); padding-top: .7rem; }
.practice-go .pg-refund { margin: 0; width: 100%; text-align: left; background: color-mix(in srgb, var(--dark-success) 8%, transparent); border: 1px solid color-mix(in srgb, var(--dark-success) 25%, transparent); border-radius: var(--r-md); padding: .7rem .85rem; font-size: .9rem; line-height: 1.45; color: color-mix(in srgb, var(--dark-success) 50%, #fff); }
.practice-go .pg-btns { display: flex; gap: .6rem; width: 100%; margin-top: .3rem; }
.practice-go .pg-btns .btn { flex: 1; justify-content: center; border-radius: var(--r-pill); padding: .75rem 1rem; font-weight: 600; font-size: 1rem; box-shadow: none; }
.practice-go .btn.quiet { background: var(--dark-card); border: 1px solid var(--dark-line-2); color: var(--dark-ink); }
.practice-go .btn.quiet:hover { border-color: var(--gold); }
.practice-go .btn.primary { background: var(--dark-ink); border: 1px solid var(--dark-ink); color: var(--on-light); }

/* the room's floor plan: its corners follow the frame around it, never square */
.stage > .plan-svg { clip-path: inset(0 round var(--r-sm)); }
