:root {
  color-scheme: dark;
  --bg: #161513;
  --panel: #1c1b18;
  --panel-solid: #1c1b18;
  --line: #2c2a26;
  --muted: #8d877c;
  --text: #e7e1d6;
  --blue: #cfc6b8;
  --blue-bright: #e7e1d6;
  --ink: #161513;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: "IBM Plex Sans", sans-serif; overflow-x: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }

.topbar { height: 64px; padding: 0 clamp(20px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: relative; z-index: 2; background: var(--bg); }
.brand { display: flex; gap: 8px; align-items: center; color: var(--text); text-decoration: none; font: 500 20px/1 "Source Serif 4", serif; letter-spacing: -.02em; }
.brand-mark, .loader-mark { width: 18px; height: 18px; display: block; }
.topbar-note { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 6px; height: 6px; background: #9a8f78; border-radius: 50%; }

main { position: relative; z-index: 1; }
.welcome { max-width: 760px; margin: 0 auto; padding: clamp(56px, 9vh, 96px) 28px 64px; text-align: left; }
.eyebrow, .lesson-kicker { color: var(--muted); font: 500 13px "IBM Plex Sans", sans-serif; }
h1 { margin: 10px 0 16px; max-width: 14ch; font: 500 clamp(40px, 5.4vw, 64px)/1.05 "Source Serif 4", serif; letter-spacing: -.03em; }
.lede { max-width: 36em; margin: 0; color: #b7b1a6; font-size: 17px; line-height: 1.55; }
.learn-form { max-width: 640px; margin: 36px 0 0; text-align: left; }
.learn-form > label { display: block; font-size: 13px; font-weight: 500; color: #c4beb4; margin: 0 0 8px; }
.learn-input-wrap { display: flex; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.learn-input-wrap:focus-within { border-color: #6f685c; }
.learn-input-wrap input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 12px 12px; outline: 0; font-size: 15px; }
.learn-input-wrap input::placeholder { color: #6f685c; }
.learn-input-wrap button { border: 0; background: var(--text); color: var(--ink); border-radius: 6px; padding: 0 16px; display: flex; align-items: center; gap: 12px; font-weight: 500; }
.learn-input-wrap button:hover { background: #f4f0e8; }
.suggestions { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }
.suggestions button, .text-button { border: 1px solid var(--line); background: transparent; color: #b7b1a6; border-radius: 6px; padding: 6px 10px; font-size: 13px; }
.suggestions button:hover, .text-button:hover { color: var(--text); border-color: #6f685c; }
.model-picker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border: 0; padding: 0; margin: 14px 0 0; }
.model-picker legend { float: left; font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 6px; padding: 0; }
.model-picker label { cursor: pointer; }
.model-picker input { position: absolute; opacity: 0; pointer-events: none; }
.model-picker span { display: inline-block; border: 1px solid var(--line); background: transparent; color: #b7b1a6; border-radius: 6px; padding: 6px 10px; font-size: 13px; font-weight: 500; }
.model-picker label:hover span { color: var(--text); border-color: #6f685c; }
.model-picker input:checked + span { color: var(--ink); background: var(--text); border-color: var(--text); }
.model-picker input:focus-visible + span { outline: 2px solid #6f685c; outline-offset: 2px; }
.promise-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; margin-top: 72px; text-align: left; }
.promise-grid article { border-top: 1px solid var(--line); padding: 16px 0 0; }
.promise-grid h2 { margin: 0 0 6px; font: 500 16px "Source Serif 4", serif; }
.promise-grid p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }

.workspace { height: calc(100vh - 64px); padding: 12px; gap: 12px; display: grid; grid-template-columns: 300px minmax(0,1fr); }
.lesson-panel, .browser-shell { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; overflow: hidden; }
.lesson-panel { padding: 18px; display: flex; flex-direction: column; }
.text-button { margin-bottom: 24px; }
.lesson-panel h2 { font: 500 22px/1.25 "Source Serif 4", serif; letter-spacing: -.02em; margin: 8px 0 12px; }
.status-pill { color: var(--muted); display: flex; align-items: center; gap: 8px; font-size: 13px; }
.status-orb { width: 6px; height: 6px; border-radius: 50%; background: #9a8f78; }
.caption-card { margin-top: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.nock-avatar { width: 18px; height: 18px; margin-top: 1px; }
.nock-avatar img { width: 18px; height: 18px; display: block; }
.speaker { font: 500 11px "IBM Plex Sans", sans-serif; letter-spacing: .04em; color: var(--muted); }
#caption { color: var(--text); font-size: 14px; line-height: 1.5; margin: 4px 0 0; max-height: min(42vh, 380px); overflow: auto; }
.activity { min-height: 38px; padding: 12px 2px; color: #757c8c; font-size: 11px; }
.ask-form { margin-top: 8px; }
.ask-form label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.ask-form div { display: flex; gap: 6px; }
.ask-form input, #address { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 10px 12px; outline: 0; }
.ask-form button { border: 0; border-radius: 6px; background: var(--text); color: var(--ink); min-width: 39px; font-weight: 500; }
.ask-form button:hover { background: #f4f0e8; }

.browser-shell { min-width: 0; display: grid; grid-template-rows: 48px minmax(0,1fr) 48px; }
.browser-toolbar { background: #131210; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 12px; }
.traffic { display: flex; gap: 6px; }
.traffic i { width: 8px; height: 8px; border-radius: 50%; background: #3a3732; }
.nav-buttons { display: flex; gap: 3px; }
.nav-buttons button { width: 28px; height: 28px; border: 0; background: transparent; color: #8d94a3; border-radius: 7px; }
.nav-buttons button:hover { background: rgba(255,255,255,.08); color: white; }
#address-form { flex: 1; position: relative; display: flex; align-items: center; }
#address-form span { position: absolute; left: 12px; color: #6f7685; }
#address { width: 100%; height: 34px; padding-left: 32px; border-radius: 9px; font-size: 12px; }
.stop-button { border: 1px solid var(--line); background: transparent; color: #9da3b0; border-radius: 8px; padding: 7px 11px; }
/* The stream is laid over the pane, never sized by it: as an ordinary grid item
   the image's own resolution could push the pane larger, which resized the
   hosted browser, which changed the image — the size kept fluctuating. */
.browser-stage { position: relative; min-height: 0; overflow: hidden; background: #12110f; }
#browser-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; touch-action: none; cursor: default; }
body.login-mode #browser-frame,
body.recording-mode #browser-frame { cursor: none; }
#local-cursor { position: absolute; width: 16px; height: 16px; margin: 0; pointer-events: none; z-index: 4; display: none; }
body.login-mode #local-cursor.visible,
body.recording-mode #local-cursor.visible { display: block; }
.browser-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; color: var(--text); background: #12110f; }
.browser-loading .loader-mark { width: 22px; height: 22px; }
.browser-loading span { color: var(--muted); font-size: 12px; }
.lesson-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #131210; border-top: 1px solid var(--line); padding: 6px 10px; }
.lesson-controls span { color: var(--muted); font-size: 12px; text-align: center; }
.lesson-controls button { height: 32px; min-width: 86px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--text); padding: 0 12px; font-size: 13px; font-weight: 500; }
.lesson-controls button:hover { border-color: #6f685c; background: #24221e; }
.playback-controls { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lesson-controls .arrow-button { min-width: 38px; width: 38px; padding: 0; font-size: 20px; line-height: 1; cursor: pointer; }
.lesson-controls button { cursor: pointer; }
.lesson-controls .demo-toggle { min-width: 84px; }
.lesson-controls .demo-toggle.on { background: var(--text); border-color: var(--text); color: var(--ink); }
.lesson-controls .demo-toggle.on:hover { background: #f4f0e8; }
.lesson-controls .demo-toggle:not(.on) { background: transparent; border-color: var(--line); color: var(--muted); }
.lesson-controls button:disabled { opacity: .4; cursor: default; }
.lesson-controls .play-pause-button { min-width: 96px; background: var(--text); color: var(--ink); border-color: var(--text); }
.lesson-controls .play-pause-button:hover { background: #f4f0e8; }
.lesson-controls .play-pause-button.paused { background: #9a8f78; border-color: #9a8f78; color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%,20px); padding: 10px 14px; color: var(--text); background: #24221e; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 900px) {
  .promise-grid { grid-template-columns: 1fr; margin-top: 60px; }
  .workspace { height: auto; min-height: calc(100vh - 64px); grid-template-columns: 1fr; }
  .lesson-panel { min-height: 330px; }
  .browser-shell { min-height: 610px; }
}
@media (max-width: 600px) {
  .topbar { padding: 0 18px; }.topbar-note { display:none; }
  .welcome { padding-left: 18px; padding-right: 18px; }
  .learn-input-wrap { flex-direction: column; }.learn-input-wrap button { justify-content: center; height: 48px; }
  .workspace { padding: 8px; gap: 8px; }
  .nav-buttons, .traffic { display:none; }
  .lesson-controls span { display:none; }
  .lesson-controls button { min-width: 76px; }
  .lesson-controls .arrow-button { min-width: 34px; width: 34px; }
  .lesson-controls .play-pause-button { min-width: 88px; }
}

/* Tutor presence picker */
#avatar-face { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.picker-note { font-size: 11px; color: var(--muted); }

/* Talk to Nock */
.talk-button { margin-top: 8px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 6px; padding: 9px 12px; font-weight: 500; cursor: pointer; }
.talk-button:hover { border-color: #6f685c; }
.talk-button[aria-pressed="true"] { background: #24221e; border-color: #6f685c; color: var(--text); }
.talk-dot { width: 7px; height: 7px; border-radius: 50%; background: #6f685c; }
.talk-button[aria-pressed="true"] .talk-dot { background: #c45c4a; }
.talk-button.hearing .talk-dot { background: #3ddc84; }
/* Microphone level: the dot grows with the learner's voice. */
.talk-button[aria-pressed="true"] .talk-dot { transform: scale(calc(1 + var(--mic-level, 0) * 0.9)); transition: transform .08s linear; }
.voice-transcript { min-height: 16px; margin: 6px 2px 0; font-size: 12px; color: var(--muted); font-style: italic; }

/* Floating, draggable avatar */
/* Starts above the lesson's Back / Pause / Skip bar so it never covers them. */
.avatar-panel { position: fixed; right: 36px; bottom: 96px; width: 280px; z-index: 50; border-radius: 8px; overflow: hidden; background: #12110f; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0,0,0,.4); touch-action: none; }
.avatar-handle { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; font-size: 12px; font-weight: 600; color: #d8dbe2; background: rgba(255,255,255,.04); cursor: grab; user-select: none; }
.avatar-panel.dragging .avatar-handle { cursor: grabbing; }
.avatar-handle button { border: 0; background: rgba(255,255,255,.08); color: white; border-radius: 6px; width: 24px; height: 22px; cursor: pointer; }
.avatar-handle button:hover { background: rgba(255,255,255,.18); }
#avatar-video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #05070b; cursor: grab; }
.avatar-panel.minimized #avatar-video, .avatar-panel.minimized .avatar-status { display: none; }
.avatar-status { position: absolute; left: 10px; bottom: 10px; font-size: 11px; color: #d8dbe2; background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 999px; }
.avatar-status:empty { display: none; }

/* Start-screen voice option */
.voice-option { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 13px; color: #b7b1a6; cursor: pointer; }
.voice-option input { accent-color: #9a8f78; width: 15px; height: 15px; cursor: pointer; }
.voice-option:hover { color: var(--text); }

/* Recorded tutorials */
.mode-tabs { display: inline-flex; gap: 4px; margin: 32px 0 0; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.mode-tab { border: 0; background: transparent; color: #b7b1a6; border-radius: 6px; padding: 7px 14px; font-size: 13px; font-weight: 500; }
.mode-tab:hover { color: var(--text); }
.mode-tab.active { background: var(--text); color: var(--ink); }
.mode-tabs + .learn-form { margin-top: 20px; }
.record-panel { margin-top: 20px; }
.record-intro { color: #b7b1a6; font-size: 15px; line-height: 1.55; margin: 0 0 16px; max-width: 40em; }
.record-options { display: grid; gap: 12px; }
.record-option { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 16px; }
.record-option h3, .saved-recordings h3 { margin: 0 0 6px; font: 600 15px "IBM Plex Sans", sans-serif; }
.record-option p { margin: 0 0 12px; color: #b7b1a6; font-size: 13px; line-height: 1.5; }
.record-option a { color: var(--text); }
.record-option code, .picker-note code { font-size: 12px; background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 4px; }
.record-option input:not([type=file]), .review-start input, .review-title { width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 6px; padding: 9px 10px; outline: 0; font-size: 14px; }
.record-option input:focus, .review-start input:focus, .review-title:focus, .review-steps textarea:focus { border-color: #6f685c; }
.record-inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.record-inline-form input { flex: 1 1 220px; }
.upload-form { display: grid; gap: 8px; }
.upload-form label { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: #c4beb4; }
.upload-form label em { color: var(--muted); font-style: normal; }
.upload-form input[type=file] { color: #b7b1a6; font-size: 12px; max-width: 100%; }
.record-option > input { margin-bottom: 8px; }
.record-panel button.primary, .review-actions .primary, .saved-recordings .primary { border: 0; background: var(--text); color: var(--ink); border-radius: 6px; padding: 9px 14px; font-weight: 500; font-size: 14px; }
.record-panel button.primary:hover, .review-actions .primary:hover, .saved-recordings .primary:hover { background: #f4f0e8; }
.record-panel button:disabled { opacity: .5; cursor: default; }
.record-panel button.recording, .record-toggle.recording { background: #c9483d; color: white; }
.record-progress { margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: #c4beb4; font-size: 14px; background: var(--panel); }
.saved-recordings { margin-top: 24px; }
.saved-recordings ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.saved-recordings li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.saved-recordings li strong { flex: 1 1 200px; font-weight: 500; }
.saved-recordings li span { color: var(--muted); font-size: 12px; flex: 1 1 160px; }
.saved-recordings li button:not(.primary) { border: 1px solid var(--line); background: transparent; color: #b7b1a6; border-radius: 6px; padding: 7px 11px; font-size: 13px; }
.saved-recordings li button:not(.primary):hover { color: var(--text); border-color: #6f685c; }
.recordings-empty { color: var(--muted); font-size: 13px; border-style: dashed !important; }

.review-panel { max-width: 1100px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 28px) 64px; }
.review-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 16px 0 10px; }
.review-title { flex: 1 1 320px; font: 500 22px "Source Serif 4", serif !important; }
.review-source { color: var(--muted); font-size: 13px; }
.review-start { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #c4beb4; max-width: 640px; }
.review-summary { color: #b7b1a6; font-size: 14px; line-height: 1.5; max-width: 60em; }
.review-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 980px) { .review-body { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } .review-video { position: sticky; top: 16px; } }
.review-video { width: 100%; max-width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #000; }
.review-steps { margin: 8px 0 0; padding: 0 0 0 22px; display: grid; gap: 10px; }
.review-steps li { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--panel); }
.review-step-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.review-step-action { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.review-step-time { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 5px; padding: 2px 7px; font-size: 12px; font-variant-numeric: tabular-nums; }
.review-step-time:hover { color: var(--text); border-color: #6f685c; }
.review-step-remove { border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 5px; }
.review-step-remove:hover { color: #f0a49c; background: rgba(201,72,61,.15); }
.review-steps textarea { width: 100%; resize: vertical; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 6px; padding: 8px; font: 14px/1.45 "IBM Plex Sans", sans-serif; outline: 0; }
.review-step-narration { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.review-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
.review-actions button:not(.primary) { border: 1px solid var(--line); background: transparent; color: #c4beb4; border-radius: 6px; padding: 9px 14px; font-size: 14px; }
.review-actions button:not(.primary):hover { color: var(--text); border-color: #6f685c; }

.record-bar { border: 1px solid rgba(201,72,61,.45); background: rgba(201,72,61,.08); border-radius: 8px; padding: 12px; }
.record-bar-row { display: flex; align-items: center; gap: 12px; }
.record-toggle { border: 0; background: var(--text); color: var(--ink); border-radius: 6px; padding: 9px 14px; font-weight: 600; font-size: 14px; }
.record-toggle:disabled { opacity: .6; cursor: default; }
.record-timer { font-variant-numeric: tabular-nums; color: #f0a49c; font-weight: 600; }
.record-bar .picker-note { margin: 8px 0 0; }
body.recording-mode .lesson-controls, body.recording-mode #ask-form, body.recording-mode .caption-card { display: none !important; }

/* Microphone test and warnings */
.mic-test-open { margin-top: 10px; }
.record-intro .mic-test-open { margin: 0 0 0 6px; vertical-align: middle; }
.mic-test { margin: 20px 0 0; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 14px 16px; max-width: 640px; }
.mic-test-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mic-test-device { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #c4beb4; }
.mic-test-device select { flex: 1; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 7px 8px; font: inherit; font-size: 13px; }
.mic-test-meter, .record-mic-meter { height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.mic-test-meter { margin: 12px 0 8px; }
.record-mic-meter { flex: 1; min-width: 60px; max-width: 160px; }
#mic-test-meter-fill, #record-mic-level { height: 100%; width: 0; background: #7fcf9a; transition: width .1s linear; }
.mic-test-status { margin: 0 0 6px; color: #b7b1a6; font-size: 13px; }
.mic-test-result { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.mic-test-result.good { color: #9fe0b4; }
.mic-test-result.warn { color: #f1d38a; }
.mic-test-result.bad, .record-mic-problem { color: #f0a49c; }
.mic-test .primary { border: 0; background: var(--text); color: var(--ink); border-radius: 6px; padding: 9px 14px; font-weight: 500; font-size: 14px; }
.mic-test .primary:disabled { opacity: .5; cursor: default; }
.record-mic-problem { margin: 8px 0 0; font-size: 13px; line-height: 1.45; }
.voice-transcript.problem { color: #f0a49c; }

/* Admin, logged-in platforms and access links */
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.admin-signin { max-width: 760px; margin: 16px auto 0; padding: 0 28px; }
.admin-signin form { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 14px 16px; }
.admin-signin label { display: block; font-size: 13px; color: #c4beb4; margin-bottom: 8px; }
.admin-signin-row { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-signin-row input { flex: 1 1 220px; min-width: 0; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 6px; padding: 9px 10px; outline: 0; }
.admin-signin .primary, .platforms-panel .primary, .platform-card .primary { border: 0; background: var(--text); color: var(--ink); border-radius: 6px; padding: 9px 14px; font-weight: 500; font-size: 14px; }
.admin-signin .primary:hover, .platforms-panel .primary:hover { background: #f4f0e8; }
.access-card { margin: 24px 0 0; border: 1px solid #5c5445; background: rgba(207,198,184,.06); border-radius: 8px; padding: 16px; max-width: 640px; }
.access-kicker { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.access-card h2 { margin: 6px 0 4px; font: 500 24px "Source Serif 4", serif; }
.access-card p { margin: 4px 0 0; color: #c4beb4; font-size: 14px; }
.platforms-panel { margin-top: 20px; }
.platforms-warning { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid #c9a85c; background: rgba(201,168,92,.08); color: #d8c8a2; font-size: 13px; line-height: 1.5; border-radius: 4px; }
.platform-add-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.platform-add-form input { flex: 1 1 180px; min-width: 0; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 6px; padding: 9px 10px; outline: 0; font-size: 14px; }
.platforms-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.platform-card { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 14px; }
.platform-card-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.platform-card-header strong { font-size: 15px; }
.platform-card-header span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.platform-status { font-size: 12px; margin: 6px 0 10px; }
.platform-status.signed-in { color: #9fe0b4; }
.platform-status.signed-out { color: #f1d38a; }
.platform-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-actions button, .share-form button:not(.primary), .access-links button { border: 1px solid var(--line); background: transparent; color: #c4beb4; border-radius: 6px; padding: 7px 11px; font-size: 13px; }
.platform-actions button:hover, .share-form button:not(.primary):hover, .access-links button:hover { color: var(--text); border-color: #6f685c; }
.platform-actions button:disabled { opacity: .45; cursor: default; }
.platform-actions .danger { color: #f0a49c; }
.share-form { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.share-form label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: #c4beb4; }
.share-form select, .share-form input { flex: 1 1 200px; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 7px 8px; font-size: 13px; }
.share-result { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share-result input { flex: 1 1 260px; font-family: ui-monospace, monospace; font-size: 12px; }
.access-links { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.access-links li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; color: #b7b1a6; }
.access-link-address { flex: 1 1 100%; display: flex; gap: 8px; align-items: center; min-width: 0; }
.access-link-url { flex: 1; min-width: 0; border: 1px solid var(--line); background: #12110f; color: var(--text); border-radius: 6px; padding: 6px 8px; font: 12px ui-monospace, monospace; }
.access-links li.revoked { opacity: .5; }
.login-bar { border: 1px solid rgba(127,207,154,.45); background: rgba(127,207,154,.07); border-radius: 8px; padding: 12px; display: grid; gap: 8px; }
.login-bar input { border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.login-bar .picker-note { margin: 0; }
body.login-mode .lesson-controls, body.login-mode #ask-form, body.login-mode .caption-card { display: none !important; }
body.view-only #address-form, body.view-only .nav-buttons { opacity: .45; pointer-events: none; }
