/* Max's Math Tycoon — components in the concept-art look: rounded cards, caramel pill
   buttons with a cocoa edge, tan progress tracks, illustrated rows. Only tokens.css colours. */

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border: 2px solid var(--ink); border-radius: 999px;
  font-family: var(--font-display); font-size: 15px; font-weight: 700; line-height: 1.15; text-decoration: none;
  background: var(--card); color: var(--ink); box-shadow: 0 3px 0 var(--ink);
  transition: background-color 0.15s ease-out, color 0.15s ease-out, transform 0.08s ease-out, box-shadow 0.08s ease-out;
}
.btn:hover { background: var(--card-2); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent-deep); color: var(--accent-text); box-shadow: 0 3px 0 var(--accent-deep); text-shadow: 0 1px 0 rgba(74, 46, 28, 0.25); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.primary:active { box-shadow: 0 1px 0 var(--accent-deep); }
.btn.brick { background: var(--brick); border-color: var(--brick-ink); color: var(--card); box-shadow: 0 3px 0 var(--brick-ink); }
.btn.brick:hover { background: var(--brick-hover); }
.btn.cta { padding: 13px 28px; font-size: 18px; }
.btn.small { padding: 5px 12px; font-size: 13px; box-shadow: 0 2px 0 var(--ink); }
.btn.small.primary { box-shadow: 0 2px 0 var(--accent-deep); }
.btn.small.brick { box-shadow: 0 2px 0 var(--brick-ink); }
.btn.ghost { border-color: transparent; background: none; box-shadow: none; }
.btn.ghost:hover { background: var(--card-2); }
.btn:disabled, .btn:disabled:hover { background: var(--tan); border-color: var(--tan-deep); color: var(--rail-deep); box-shadow: 0 3px 0 var(--tan-deep); opacity: 0.9; cursor: default; transform: none; text-shadow: none; }
.btn.small:disabled { box-shadow: 0 2px 0 var(--tan-deep); }
.btn .sub { font-family: var(--font); font-size: 11px; font-weight: 600; opacity: 0.9; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; }

/* ---------- CARDS, TABLES, ALERTS ---------- */
.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card.raised { box-shadow: var(--shadow); }
.alert { margin: 12px 0 0; padding: 10px 14px; background: var(--brick-wash); border: 2px solid var(--brick); border-radius: var(--radius-sm); color: var(--brick-ink); font-size: 14px; }
.note { margin: 10px 0 0; padding: 10px 14px; background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); color: var(--ink-2); font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.stat-grid .cell { padding: 10px 12px; background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.stat-grid .cell b { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-2); }
.stat-grid .cell span { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.doc-head { background: var(--line); border: 2px solid var(--ink); padding: 10px 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.bar { position: relative; height: 14px; background: var(--card-3); border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); border-radius: 999px; transition: none; }
.bar.running > i { width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); font-family: var(--font-display); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chip.brick { border-color: var(--brick); color: var(--brick); }
.chip.ink { background: var(--rail-item); border-color: var(--rail-deep); color: var(--rail-text); }
.chip .icon { color: var(--accent); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; background: var(--brick); color: var(--card); border-radius: 999px; font-family: var(--font-display); font-size: 12px; font-weight: 700; }
.badge:empty { display: none; }
.lock { display: inline-flex; align-items: center; gap: 4px; color: var(--brick); font-weight: 700; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filters .btn { padding: 4px 11px; font-size: 13px; box-shadow: none; }
.filters .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent-deep); color: var(--accent-text); }
.field { display: block; margin-bottom: 10px; }
.field > span { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
input[type="text"], input[type="search"], select, textarea {
  width: 100%; padding: 9px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-family: var(--font); font-size: 15px;
}
input[type="text"]:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--brick-wash); }
textarea { min-height: 70px; font-family: var(--mono); font-size: 12px; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
@media (max-width: 900px) {
  .dialog input[type="text"], .dialog select, .dialog textarea, .panel textarea, .panel select { font-size: 16px; }
  .dialog .part { grid-template-columns: 1fr auto; }
  .dialog .part label { grid-column: 1 / -1; }
}

/* ---------- PLACEHOLDER (§5.3) ---------- */
.placeholder { padding: 16px 18px; border: 2px dashed var(--line); border-radius: var(--radius-sm); background: var(--card-2); color: var(--ink-3); font-weight: 600; font-size: 15px; }
.placeholder.small { font-size: 14px; padding: 10px 12px; }

/* ---------- BUSINESS ROWS ---------- */
.business-list { display: flex; flex-direction: column; gap: 14px; }
.biz { position: relative; display: grid; grid-template-columns: 128px 1fr; gap: 8px 16px; padding: 14px 16px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 0 var(--line-2); }
.biz.is-focus { box-shadow: var(--shadow); border-color: var(--accent); }
.biz.is-locked-business { background: var(--card-2); }
.biz.is-locked-business .biz-art img { filter: saturate(0.3) opacity(0.75); }
.biz.is-gated { border-color: var(--brick); }
.biz-art { grid-row: span 3; width: 128px; height: 108px; display: flex; align-items: center; justify-content: center; }
.biz-art img { display: block; max-width: 128px; max-height: 108px; width: auto; height: auto; }
.biz-portrait { width: 44px; height: 44px; flex: none; }
.biz-portrait button { width: 44px; height: 44px; padding: 0; border: 2px solid var(--line); background: var(--card-2); border-radius: 50%; overflow: hidden; display: block; }
.biz-portrait button:hover { border-color: var(--accent); }
.biz-portrait svg, .biz-portrait img { display: block; width: 40px; height: 40px; }
.biz-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.biz-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.biz-titles { display: flex; flex-direction: column; min-width: 0; }
.biz-name { font-family: var(--font-display); font-size: 20px; font-weight: 800; line-height: 1.1; }
.biz-course { font-size: 13px; font-weight: 600; color: var(--accent-deep); }
.biz-faculty { font-size: 12px; color: var(--ink-2); }
.biz-meta { margin-left: auto; display: flex; gap: 12px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.biz-mult { font-family: var(--mono); font-weight: 700; color: var(--ink); background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.biz-barrow { display: flex; align-items: center; gap: 10px; }
.biz-barrow .bar { flex: 1; }
.biz-pay { font-family: var(--font-display); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
.biz-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.biz-actions .btn { padding: 6px 12px; font-size: 13px; box-shadow: 0 2px 0 var(--ink); }
.biz-actions .btn.primary { box-shadow: 0 2px 0 var(--accent-deep); }
.biz-actions .btn.brick { box-shadow: 0 2px 0 var(--brick-ink); }
.biz-actions .btn:disabled { box-shadow: 0 2px 0 var(--tan-deep); }
.biz-actions .btn .sub { font-size: 10px; }
.biz-click { position: absolute; inset: 0; border: 0; background: none; cursor: pointer; border-radius: var(--radius); }
.biz-click:focus-visible { outline-offset: -3px; }
.biz > *:not(.biz-click) { position: relative; z-index: 1; pointer-events: none; }
.biz .biz-actions, .biz .biz-portrait, .biz .biz-head .lock, .biz .biz-unlock { pointer-events: auto; }
.biz-unlock { grid-column: 2; display: flex; align-items: center; gap: 12px; color: var(--ink-2); flex-wrap: wrap; }
.floaters { position: absolute; left: 150px; top: 6px; pointer-events: none; z-index: 2; }
.floater { position: absolute; left: 0; top: 0; font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--accent-deep); white-space: nowrap; animation: floater 900ms ease-out forwards; font-variant-numeric: tabular-nums; }
.floater.big { font-size: 30px; }
@keyframes floater { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-34px); opacity: 0; } }
@media (max-width: 900px) {
  .biz { grid-template-columns: 84px 1fr; padding: 12px; }
  .biz-art { width: 84px; height: 72px; }
  .biz-art img { max-width: 84px; max-height: 72px; }
  .biz-name { font-size: 17px; }
  .floaters { left: 100px; }
}

/* ---------- MODAL (§6.3) ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 24px; background: var(--scrim); }
.modal.is-open { display: flex; }
.modal.is-closing { opacity: 0; transition: opacity 150ms ease-out; pointer-events: none; }
body.reduced-motion .modal.is-closing { transition: none; }
.dialog { position: relative; width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; background: var(--card); border: 3px solid var(--line); border-radius: var(--radius-dialog); box-shadow: var(--shadow-lg); padding: 22px 24px 20px; }
.dialog-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px solid var(--line-2); }
.dialog-head .portrait { width: 48px; height: 48px; flex: none; border-radius: 50%; overflow: hidden; border: 2px solid var(--line); background: var(--card-2); display: flex; align-items: center; justify-content: center; }
.dialog-head .portrait svg { display: block; width: 40px; height: 40px; }
.dialog-head .portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.dialog-head .portrait .icon { width: 26px; height: 26px; color: var(--accent); }
.dialog-head .titles { min-width: 0; }
.dialog-head .titles b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.dialog-head .titles span { display: block; font-size: 12px; color: var(--ink-2); }
.dialog-head .tag { margin-left: auto; }
.dialog .prompt { font-size: 16px; line-height: 1.6; margin-bottom: 14px; }
.dialog .prompt .katex-display { margin: 10px 0; }
.dialog .parts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.dialog .part { display: grid; grid-template-columns: minmax(80px, 160px) 1fr auto; align-items: center; gap: 10px; }
.dialog .part label { font-weight: 600; font-size: 13px; }
.dialog .part.is-correct input { background: var(--accent); border-color: var(--accent-deep); color: var(--accent-text); }
.dialog .part .mark { width: 22px; text-align: center; font-weight: 700; }
.dialog .part .mark.ok { color: var(--accent-deep); }
.dialog .choices { display: flex; flex-direction: column; gap: 6px; }
.dialog .choices label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border: 2px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card-2); }
.dialog .format-help { font-size: 12px; color: var(--ink-2); font-family: var(--mono); margin: 8px 0 10px; }
.dialog .dialog-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dialog .dialog-actions .attempts { margin-left: auto; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dialog .feedback { min-height: 22px; margin-top: 10px; font-size: 14px; }
.dialog .feedback.wrong { color: var(--brick); font-weight: 700; }
.dialog .solution { margin-top: 12px; padding: 12px 14px; background: var(--card-2); border: 2px solid var(--line-2); border-radius: var(--radius-sm); }
.dialog .solution b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-2); margin-bottom: 6px; }
.dialog .hint-box { margin-top: 10px; padding: 10px 12px; background: var(--card-2); border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.dialog .close-x { position: absolute; top: 10px; right: 10px; }
.dialog.placeholder-mode .parts, .dialog.placeholder-mode .format-help { display: none; }

/* ---------- PANEL LISTS ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 14px; background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.item.is-bought { background: var(--card); color: var(--ink-2); }
.item b { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.item .desc { grid-column: 1; font-size: 12px; color: var(--ink-2); }
.item .btn { grid-row: span 2; }

/* faculty cards (concept: big figure, name, course, business, Hire/Locked) */
.item.faculty { grid-template-columns: 96px 1fr; grid-template-rows: auto auto auto auto; gap: 2px 12px; align-items: start; padding: 12px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); }
.item.faculty .portrait { grid-row: span 4; width: 96px; height: 120px; display: flex; align-items: flex-end; justify-content: center; }
.item.faculty .bio { grid-column: 1 / -1; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.item.faculty .portrait img { max-width: 96px; max-height: 120px; width: auto; height: auto; display: block; }
.item.faculty .portrait .monogram-big { width: 84px; height: 84px; border-radius: 50%; background: var(--card-2); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.item.faculty .portrait .monogram-big svg { width: 70px; height: 70px; }
.item.faculty .who { min-width: 0; }
.item.faculty .who b { font-size: 18px; font-weight: 800; }
.item.faculty .who small { display: block; font-size: 13px; font-weight: 600; color: var(--accent-deep); }
.item.faculty .biz-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.item.faculty .biz-line img { width: 34px; height: 30px; object-fit: contain; }
.item.faculty .bio { font-size: 11px; color: var(--ink-2); line-height: 1.4; }
.item.faculty .btn { grid-row: auto; grid-column: 2; justify-self: start; margin-top: 6px; }
.item.faculty .status { grid-column: 2; font-size: 12px; color: var(--ink-2); }
.item.faculty.is-cleared::after { content: 'Course cleared'; grid-column: 1 / -1; justify-self: start; padding: 2px 10px; background: var(--accent); color: var(--accent-text); border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.item.faculty.is-bought { opacity: 0.85; }

.pu-card { padding: 12px 14px; background: var(--card-2); border: 2px solid var(--line-2); border-radius: var(--radius-sm); }
.pu-card.is-active { border-color: var(--accent); background: var(--card); }
.pu-card.is-locked, .pu-card.is-locked-feature { color: var(--ink-2); }
.pu-card .pu-head { display: flex; align-items: center; gap: 10px; }
.pu-card .pu-head b { font-family: var(--font-display); font-size: 17px; font-weight: 800; }
.pu-card .pu-head .chip { margin-left: auto; }
.pu-card .pu-effect { font-size: 13px; color: var(--ink-2); margin: 4px 0 2px; }
.pu-card .pu-q { font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.pu-card .pu-state { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* wardrobe */
.wardrobe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.costume { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); text-align: center; }
.costume.is-equipped { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.costume .thumb { width: 100px; height: 100px; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.costume .thumb > svg { width: 84px; height: 84px; display: block; }
.costume .thumb img { max-width: 100px; max-height: 100px; width: auto; height: auto; display: block; }
.costume.is-locked .thumb img { filter: saturate(0.55); opacity: 0.8; }
.costume b { font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.costume .cond { font-size: 11px; color: var(--ink-2); min-height: 30px; }
.costume .desc { font-size: 11px; color: var(--ink-2); font-style: italic; }
.costume.is-locked b { color: var(--ink-2); }
.costume .btn.small { width: 100%; }
.avatar-editor { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; margin-bottom: 14px; }
.avatar-editor .preview { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; background: var(--card-2); border: 2px solid var(--line); border-radius: var(--radius); }
.avatar-editor .preview img.look { max-width: 120px; max-height: 140px; }
.avatar-editor .opts { display: flex; gap: 6px; flex-wrap: wrap; }
.avatar-editor .opts .btn { padding: 4px 11px; font-size: 13px; box-shadow: none; }
.avatar-editor .opts .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent-deep); color: var(--accent-text); }
.tag { display: inline-block; padding: 2px 10px; border: 2px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-2); }
.tag.brick { border-color: var(--brick); color: var(--brick); }
.locked-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 5px 12px; border-radius: 999px; background: var(--tan); border: 2px solid var(--tan-deep); color: var(--rail-deep); font-family: var(--font-display); font-size: 13px; font-weight: 700; }

/* ---------- TOASTS ---------- */
.toasts { position: fixed; top: 14px; right: 14px; z-index: 70; display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100vw - 28px)); pointer-events: none; }
.toast { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 10px 12px; background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); pointer-events: auto; animation: toast-in 0.2s ease-out; }
.toast .thumb { width: 48px; height: 48px; background: var(--card-2); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.toast .thumb > svg { width: 40px; height: 40px; display: block; }
.toast .thumb img { max-width: 46px; max-height: 46px; display: block; }
.toast b { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.toast span { display: block; font-size: 12px; color: var(--ink-2); }
.toast a, .toast button.link { color: var(--accent-deep); font-size: 12px; font-weight: 700; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.toast.is-leaving { opacity: 0; transition: opacity 0.2s ease-out; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- MAX (§12.4) ---------- */
.max { position: fixed; right: 18px; bottom: 18px; z-index: 65; display: flex; align-items: flex-end; gap: 8px; max-width: min(440px, calc(100vw - 36px)); pointer-events: none; }
.max.is-hidden { display: none; }
.max-portrait { flex: none; width: 96px; height: 96px; pointer-events: auto; }
.max-portrait > svg, .max-portrait .mascot-figure, .max-portrait img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: bottom; }
.max-bubble { position: relative; margin-bottom: 24px; padding: 12px 16px; background: var(--card); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow); font-size: 14px; line-height: 1.5; pointer-events: auto; cursor: pointer; animation: max-in 0.2s ease-out; }
.max-bubble::after { content: ''; position: absolute; right: -10px; bottom: 16px; width: 14px; height: 14px; background: var(--card); border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(-45deg); border-radius: 0 0 4px 0; }
.max-bubble b { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 13px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 2px; }
@keyframes max-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.max.pose-celebrating .max-portrait { animation: max-bob 0.6s ease-in-out 2; }
@keyframes max-bob { 0%, 100% { transform: none; } 50% { transform: translateY(-4px) rotate(-3deg); } }
body.modal-open .max { z-index: 55; }   /* under the modal scrim (60) */
@media (max-width: 900px) { .max { right: 50%; transform: translateX(50%); bottom: 64px; width: calc(100vw - 36px); max-width: none; } .max-bubble { flex: 1; } .max-portrait { width: 72px; height: 72px; } }
@media (prefers-reduced-motion: reduce) { .max-bubble, .toast, .floater { animation: none; } .max.pose-celebrating .max-portrait { animation: none; } }
body.reduced-motion .max-bubble, body.reduced-motion .toast, body.reduced-motion .floater { animation: none; }
body.reduced-motion .max.pose-celebrating .max-portrait { animation: none; }
body.reduced-motion .floater { opacity: 0; }

/* ---------- AWAY PANEL, TRANSCRIPT ---------- */
.away .away-amount { font-family: var(--font-display); font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 6px 0; color: var(--accent-deep); }
.away ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.transcript { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.transcript .scroll { padding: 10px; background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); font-size: 12px; }
.transcript .scroll.is-cleared { border-color: var(--accent); background: var(--card); }
.transcript .scroll b { display: block; font-family: var(--font-display); font-size: 14px; }

/* ---------- DEV PANEL (§17.5) ---------- */
.dev { position: fixed; left: 304px; bottom: 12px; z-index: 55; width: 300px; max-height: 70vh; overflow: auto; background: var(--card); border: 3px double var(--brick); border-radius: var(--radius-sm); font-size: 12px; }
.dev summary { padding: 8px 10px; background: var(--brick); color: var(--card); font-weight: 700; letter-spacing: 1px; cursor: pointer; }
.dev .dev-body { padding: 10px; }
.dev .dev-row { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.dev .dev-row .btn { padding: 3px 8px; font-size: 11px; box-shadow: none; }
.dev .dev-row b { width: 100%; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 1px; }
@media (max-width: 900px) { .dev { left: 12px; bottom: 60px; width: calc(100vw - 24px); } }

/* ---------- STAMP ---------- */
.stamp { display: inline-block; padding: 4px 10px; border: 3px double var(--brick); border-radius: 6px; color: var(--brick); font-family: var(--font-display); font-weight: 800; letter-spacing: 2px; text-transform: uppercase; transform: rotate(-6deg); mix-blend-mode: multiply; }

/* warm the line-art avatar so it sits with the illustrations */
.avatar { --card: var(--avatar-card); --card-3: var(--avatar-card-3); --line: var(--avatar-line); --brick: var(--accent); }
