@charset "UTF-8";
/* Still: one calm column, like a page in a journal. The piece on top, your words below it, and the message box and player
   always in reach at the bottom. Everything is defined once here: colours, spacing, type, shapes. */
:root {
  color-scheme: light;
  --bg: #fbf9f4;
  --surface: #fffefb;
  --surface-2: #f6f2ea;
  --surface-3: #ebe5da;
  --line: #e8e1d5;
  --line-strong: #d6cdbe;
  --ink: #1f1d1a;
  --ink-soft: #3d3933;
  --muted: #7d776d;
  --faint: #a39c90;
  --accent: #a2512f;
  --accent-strong: #8a4123;
  --accent-soft: rgba(162, 81, 47, 0.08);
  --accent-line: rgba(162, 81, 47, 0.45);
  --accent-ink: #fbf9f4;
  --warm: #f5ece2;
  --warm-line: #e3cdb9;
  --danger: #a3443c;
  --danger-ink: #fff;
  --ok: #6f9e78;
  --orb-rgb: 31, 29, 26;
  --serif: Georgia, 'Times New Roman', 'Songti SC', 'Noto Serif SC', 'Noto Serif CJK SC', STSong, SimSun, serif;
  /* type, space and shape */
  --sans: 'Segoe UI', system-ui, -apple-system, Arial, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --t-xs: 11px;
  --t-sm: 13px;
  --t-md: 15px;
  --t-lg: 18px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --pill: 999px;
  --column: 720px;
  --wide: 980px;
  --dock-h: 170px; /* measured by the app */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-bottom: calc(var(--dock-h) + 24px); }
body {
  margin: 0;
  min-height: 100dvh;
  background: radial-gradient(1200px 600px at 50% -200px, #221e24 0%, transparent 70%), var(--bg);
  color: var(--ink);
  font: var(--t-md)/1.55 var(--sans);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--dock-h) + var(--s4));
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s, transform 0.15s; }
button:disabled { opacity: 0.4; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small-note { font-size: 12px; color: var(--faint); margin: var(--s1) 0 0; }
.count { display: inline-block; min-width: 18px; margin-left: var(--s1); padding: 0 6px; border-radius: var(--pill); background: var(--surface-3); color: var(--muted); font-size: var(--t-xs); text-align: center; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--pill); padding: 9px 18px; font-size: var(--t-sm); font-weight: 500; white-space: nowrap; }
.btn-primary, .send, .seal { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:not(:disabled):hover, .send:not(:disabled):hover, .seal:not(:disabled):hover { background: var(--accent-strong); }
.btn-primary:not(:disabled):active { transform: scale(0.98); }
.btn-secondary { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-secondary:not(:disabled):hover { border-color: var(--accent-line); }
.btn-quiet { color: var(--muted); padding: 6px 8px; }
.btn-quiet:not(:disabled):hover { color: var(--ink); }
.danger { background: var(--danger); color: var(--danger-ink); }
.chip { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--pill); padding: 7px 14px; font-size: var(--t-sm); color: var(--ink-soft); white-space: nowrap; }
.chip:not(:disabled):hover { border-color: var(--accent-line); color: var(--ink); }
.chip-strong { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-strong); }
.select { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; color: var(--ink); }
.field { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); color: var(--muted); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) var(--s5); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 21px; letter-spacing: -0.5px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); font: italic 20px var(--serif); }
nav { display: flex; gap: var(--s1); }
.nav-link { padding: 6px 10px; border-radius: var(--pill); font-size: var(--t-sm); color: var(--muted); }
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.owner-link { color: var(--faint); border: 1px dashed var(--line-strong); }
.new-link { color: var(--accent); }
.new-link:hover { color: var(--accent-strong); background: var(--accent-soft); }

/* ---------- the column ---------- */
.room { width: 100%; max-width: calc(var(--column) + 2 * var(--s5)); margin: 0 auto; padding: var(--s2) var(--s5) var(--s5); display: flex; flex-direction: column; gap: var(--s5); }
.talk { display: flex; flex-direction: column; gap: var(--s4); }

/* welcome: the question, before there is a piece */
.welcome { text-align: center; padding: 12vh 0 var(--s2); }
.welcome h1 { font: 400 clamp(36px, 6vw, 56px)/1.08 var(--serif); letter-spacing: -1px; margin: 0 0 var(--s3); }
.prompt-guide { color: var(--muted); margin: 0 auto var(--s5); max-width: 500px; }
.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); }
.continue-piece { margin-top: var(--s4); color: var(--accent); }
body.has-piece .welcome { text-align: left; padding: 0; }
body.has-piece .welcome h1 { font-size: 22px; letter-spacing: -0.3px; margin: 0 0 2px; }
body.has-piece .prompt-guide { margin: 0; font-size: var(--t-sm); max-width: none; }

/* ---------- the stage: what is playing ---------- */
.stage { display: flex; flex-direction: column; gap: var(--s3); }
.art { position: relative; height: clamp(230px, 36vw, 300px); border-radius: var(--r-xl); overflow: hidden; border: 1px solid #3a3237; background: radial-gradient(ellipse at 68% 45%, #4a343b 0%, #2c242a 42%, #1c191e 78%); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
#orb { position: absolute; inset: 0; width: 100%; height: 100%; }
.art-label { position: absolute; inset: 0 auto 0 0; width: min(62%, 420px); display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: var(--s5); background: linear-gradient(to right, rgba(18, 16, 20, 0.88) 0%, rgba(18, 16, 20, 0.55) 70%, transparent); }
.art-label h2 { font: 400 clamp(28px, 4.4vw, 38px)/1.08 var(--serif); letter-spacing: -0.5px; margin: 0; }
.instruments { margin: 0; color: var(--ink-soft); font-size: var(--t-sm); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tag-group { display: contents; }
.tag { display: inline-block; padding: 3px 10px; border-radius: var(--pill); background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.tag:empty { display: none; }
.tag-group .tag.surprise { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-strong); }

/* the shape of the piece */
.timeline { display: grid; gap: 5px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); position: relative; }
.timeline:empty { display: none; }
.tl-row { display: flex; align-items: center; gap: var(--s2); height: 10px; }
.tl-row > span { width: 84px; font-size: var(--t-xs); color: var(--faint); flex: none; }
.tl-track { flex: 1; display: flex; gap: 2px; height: 6px; }
.tl-cell { border-radius: 3px; background: var(--surface-3); }
.tl-cell.on { background: #7c6250; }
.tl-sec { display: flex; gap: 1px; }
.tl-sec i { flex: 1; border-radius: 2px; background: var(--surface-3); }
.tl-sec i.on { background: #8a6b55; }
.tl-row.sections { height: auto; margin-bottom: 2px; }
.tl-row.sections .tl-track { height: auto; }
.tl-row.sections .tl-cell { background: none; font-size: var(--t-xs); color: var(--muted); height: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 1px solid var(--line-strong); padding-left: 6px; }
.tl-head { position: absolute; top: 10px; bottom: 10px; width: 2px; background: var(--accent); border-radius: 2px; box-shadow: 0 0 8px var(--accent); transition: left 0.3s linear; pointer-events: none; }

/* ---------- the conversation ---------- */
.conversation { display: flex; flex-direction: column; gap: var(--s3); }
.conversation:focus-visible { outline-offset: 6px; }
.chat-message { max-width: 86%; padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); animation: rise 0.35s var(--ease); }
.chat-message.user { align-self: flex-end; background: var(--warm); border-color: var(--warm-line); border-bottom-right-radius: var(--r-sm); }
.chat-message.assistant { align-self: flex-start; border-bottom-left-radius: var(--r-sm); }
.chat-speaker { display: block; font-size: var(--t-xs); letter-spacing: 0.4px; color: var(--faint); margin-bottom: 2px; }
.chat-text { margin: 0; white-space: pre-wrap; }
.chat-outcome { display: block; margin-top: 6px; font-size: var(--t-xs); color: var(--faint); }
.earlier { display: flex; flex-direction: column; gap: var(--s3); }
.earlier > summary { align-self: center; list-style: none; cursor: pointer; font-size: 12px; color: var(--muted); padding: 4px 12px; border: 1px solid var(--line); border-radius: var(--pill); }
.earlier > summary::-webkit-details-marker { display: none; }
.earlier[open] > summary { margin-bottom: var(--s1); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.care-card { border: 1px solid #6b574a; background: var(--warm); border-radius: var(--r-lg); padding: var(--s4) 18px; line-height: 1.6; }
.care-card p { margin: 0 0 var(--s2); }
.care-card .btn-quiet { padding: 0; font-size: 12px; text-decoration: underline; }

/* ---------- the dock: message box and player, always in reach ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: linear-gradient(to top, rgba(21, 20, 23, 0.97) 75%, rgba(21, 20, 23, 0.82)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.composer { width: 100%; max-width: calc(var(--column) + 2 * var(--s5)); margin: 0 auto; padding: var(--s3) var(--s5) var(--s2); display: flex; flex-direction: column; gap: var(--s2); }
#direction-form { display: flex; align-items: flex-end; gap: var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s2) var(--s2) var(--s2) var(--s4); transition: border-color 0.2s; }
#direction-form:focus-within { border-color: var(--accent-line); }
#direction-form.is-paused { opacity: 0.45; }
#music-prompt { flex: 1; resize: none; background: none; border: 0; outline: none; min-height: 40px; max-height: 160px; line-height: 1.5; padding: 8px 0; }
#music-prompt::placeholder { color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-actions { display: flex; gap: var(--s1); align-items: center; }
.send { padding: 10px 20px; border-radius: var(--r-md); }
.nudges { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.nudges::-webkit-scrollbar { display: none; }
.hum-link { align-self: center; font-size: var(--t-sm); color: var(--muted); padding: 2px 6px; }
.hum-link:hover { color: var(--accent); }
.hum-chip { margin: 0; font-size: var(--t-sm); color: var(--accent); }
.hum-chip .btn-quiet { font-size: 12px; text-decoration: underline; padding: 0 4px; }
.reply-suggestions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.reply-suggestions > span { font-size: 12px; color: var(--faint); width: 100%; }
.reply-suggestions button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--pill); padding: 7px 14px; font-size: var(--t-sm); color: var(--ink-soft); }
.reply-suggestions button:hover { border-color: var(--accent-line); color: var(--ink); }
.status-line { margin: 0; font-size: var(--t-sm); color: var(--muted); }
.idea-stage { display: inline-block; font-size: var(--t-xs); letter-spacing: 0.4px; padding: 1px 9px; border-radius: var(--pill); background: var(--surface-3); color: var(--muted); margin-right: 6px; }
.idea-stage[data-phase='thinking'], .idea-stage[data-phase='queued'] { color: var(--accent); animation: breathe 1.6s ease-in-out infinite; }
.idea-stage[data-phase='failed'] { color: #f0a39a; }
@keyframes breathe { 50% { opacity: 0.45; } }

.player { width: 100%; max-width: var(--wide); margin: 0 auto; display: flex; align-items: center; gap: var(--s4); padding: var(--s2) var(--s5) var(--s3); }
.play { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 16px; display: grid; place-items: center; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4); }
.play:hover { background: #fff; }
.player-info { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); flex: none; }
.clock { font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.beat-dots { display: flex; gap: 4px; }
.beat-dots i { width: 5px; height: 5px; border-radius: 50%; background: #3a363b; }
.beat-dots i.active { background: var(--accent); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4a4548; }
.status-dot.active { background: var(--ok); }
.director-status { flex: 1; margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.director-status.pending { color: var(--accent); }
.undo { flex: none; }
.volume input { width: 100px; accent-color: var(--accent); }
.keep-moment { display: flex; align-items: center; gap: 6px; flex: none; }
.seal { padding: 10px 18px; }
#duration { font-size: 12px; padding: 6px 8px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 12px); transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 10px var(--s4); font-size: var(--t-sm); z-index: 30; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: rise 0.25s var(--ease); }

/* ---------- panels and dialogs ---------- */
dialog { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-xl); padding: var(--s5); max-width: min(520px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
dialog::backdrop { background: rgba(8, 8, 10, 0.6); backdrop-filter: blur(2px); }
dialog h2 { font: 400 24px/1.2 var(--serif); margin: 0 0 var(--s2); }
.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100dvh; width: min(440px, 100vw); max-width: 100vw; border-radius: 0; border-width: 0 0 0 1px; overflow-y: auto; animation: slide-in 0.28s var(--ease); }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s2); }
.drawer-head h2 { margin: 0; }
.drawer h3 { font-size: 12px; letter-spacing: 0.5px; text-transform: uppercase; margin: var(--s5) 0 var(--s2); color: var(--faint); font-weight: 600; }
.dialog-close { width: 34px; height: 34px; border-radius: 50%; font-size: 20px; color: var(--muted); display: grid; place-items: center; }
.dialog-close:hover { color: var(--ink); background: var(--surface-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s4); flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.setting { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.setting:last-of-type { border-bottom: 0; }
.setting .btn-quiet { padding: 0; text-decoration: underline; font-size: 12px; }

/* Shape the piece */
.parts { display: grid; gap: var(--s2); }
.part { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); min-width: 0; }
.part.kept { border-color: var(--accent-line); background: var(--warm); }
.part label { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); font-size: var(--t-sm); min-width: 0; }
.part select { flex: none; width: 150px; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); font-size: 12px; cursor: pointer; }
.part select:disabled { opacity: 0.55; cursor: default; }
.part select option { background: var(--surface-2); color: var(--ink); }
.part-glyph { color: var(--accent); width: 16px; text-align: center; flex: none; }
.lock-state { flex: none; font-size: var(--t-xs); color: var(--muted); border: 1px solid var(--line-strong); border-radius: var(--pill); padding: 2px 10px; }
.part .lock-state[hidden] { display: inline-block !important; visibility: hidden; } /* a part that is off keeps the grid even */
.lock-state[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.touch-card { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--accent-line); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--t-sm); }
.touch-card > span:nth-child(2) { flex: 1; }
.touch-card small { display: block; color: var(--faint); font-size: var(--t-xs); }
.cue-row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.scope { flex-wrap: wrap; }
.ideas { display: grid; gap: var(--s2); }
.idea { display: grid; text-align: left; gap: 2px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--t-md); color: var(--ink); }
.idea:hover { border-color: var(--accent-line); }
.idea small { color: var(--faint); font-size: 12px; line-height: 1.35; }
.idea.wander[aria-pressed='true'] { border-color: var(--accent-line); background: var(--warm); color: var(--accent-strong); }
.idea.wander[aria-pressed='true'] small { color: #c9a184; }

/* Owner tools */
.lab { display: grid; gap: var(--s2); font-size: var(--t-sm); }
.mutes label { margin-right: 10px; white-space: nowrap; }
.instrument-controls { display: grid; gap: var(--s2); }
.instrument-controls label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: var(--t-sm); }
.instrument-controls select { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px 8px; }
.rehearsal { margin-top: var(--s5); font-size: var(--t-sm); }
.rehearsal summary { cursor: pointer; color: var(--muted); }
.rehearsal ol { padding-left: 18px; }
.rehearsal li { margin: 10px 0; }
.rehearsal small { display: block; color: var(--faint); white-space: pre-wrap; }
.idea-outcome { display: block; font-size: var(--t-xs); color: var(--faint); }
.rate-rows { display: grid; gap: var(--s2); margin: var(--s3) 0; }
.rate { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); }
.rate span { flex: 1; }
.rate button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--muted); }
.rate button[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
#note-text { width: 100%; min-width: 280px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; color: var(--ink); margin-top: var(--s2); }

/* Hum */
.hum-meter { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin: 14px 0 10px; }
.hum-meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.08s linear; }
.hum-preview { display: flex; align-items: flex-end; gap: 3px; height: 64px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-md); }
.hum-preview i { display: block; height: 6px; border-radius: 3px; background: #8a6b55; }

/* Moments */
#album-list { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s4); }
.moment { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); min-width: 0; }
.moment-head { display: flex; gap: var(--s3); align-items: center; min-width: 0; }
.moment-info { flex: 1; min-width: 0; }
.moment-disc { flex: none; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle, var(--accent) 0 12%, #3a2e2a 13% 60%, #2a2427 61%); }
.moment-title { background: none; border: 0; border-bottom: 1px solid transparent; width: 100%; font-weight: 600; padding: 2px 0; }
.moment-title:focus { border-bottom-color: var(--line-strong); outline: none; }
.moment-meta, .moment-error { display: block; font-size: var(--t-xs); color: var(--faint); }
.moment-error { color: #f0a39a; }
.moment-quote { margin: 0; font: italic 14px/1.45 var(--serif); color: var(--ink-soft); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.moment-feel, .moment-note { margin: 0; font-size: 12px; color: var(--muted); }
.moment-map { display: flex; flex-direction: column; gap: 3px; padding: 2px 0; }
.moment-map .tl-track { flex: none; height: 4px; }
.moment-hum { display: flex; align-items: flex-end; gap: 2px; height: 30px; padding: 2px 0; }
.moment-hum i { display: block; height: 4px; border-radius: 2px; background: #8a6b55; }
.moment-again { display: flex; gap: var(--s2); flex-wrap: wrap; }
.moment-again button { flex: 1; min-width: 120px; border: 1px solid var(--line-strong); border-radius: var(--pill); padding: 9px 12px; font-size: var(--t-sm); color: var(--ink); }
.moment-again button:hover { border-color: var(--accent-line); }
.moment-again .moment-hear { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.moment-recording span { display: block; font-size: var(--t-xs); color: var(--faint); margin-bottom: 2px; }
.moment audio { width: 100%; height: 34px; }
.moment-actions { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.delete { color: var(--muted); font-size: 18px; width: 30px; height: 30px; border-radius: 50%; }
.delete:hover { color: var(--ink); background: var(--surface-2); }
.empty-album { display: flex; gap: var(--s3); align-items: center; color: var(--muted); }
.empty-album h3 { margin: 0; color: var(--ink); font-size: 14px; text-transform: none; letter-spacing: 0; }
.empty-album p { margin: 2px 0 0; font-size: var(--t-sm); }
.empty-disc { font-size: 28px; color: var(--faint); }

/* ---------- narrower screens ---------- */
@media (max-width: 760px) {
  .topbar { padding: var(--s3) var(--s4); }
  .brand { font-size: 19px; }
  .nav-link { padding: 6px 8px; }
  .owner-link { display: none; }
  .room { padding: var(--s2) var(--s4) var(--s4); gap: var(--s4); }
  .welcome { padding-top: 7vh; }
  .art { height: 210px; }
  .art-label { width: 100%; padding: var(--s4); background: linear-gradient(to top, rgba(18, 16, 20, 0.9) 10%, rgba(18, 16, 20, 0.35) 70%, transparent); }
  .composer { padding: 10px var(--s4) 6px; }
  .player { flex-wrap: wrap; gap: 4px 10px; padding: 4px var(--s4) 10px; }
  .director-status { order: -1; flex-basis: 100%; text-align: center; font-size: var(--t-xs); }
  .keep-moment { margin-left: auto; }
  .nudges { gap: 6px; }
  .nudges .chip { padding: 7px 11px; }
  .tl-row > span { width: 64px; }
  .part select { width: 128px; }
  .beat-dots, .volume, #duration { display: none; }
  .undo-label { display: none; }
  .seal { padding: 9px 14px; }
  .chat-message { max-width: 92%; }
  .drawer.sheet { margin: auto 0 0; width: 100%; height: auto; max-height: 86dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; border-width: 1px 0 0; animation: sheet-up 0.3s var(--ease); }
  .drawer { padding: var(--s4); }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- the journal look: a page in a diary (chosen by the owner, 2026-11-14) ---------- */
body { background: var(--bg); }
.brand-mark { display: none; }
.brand { font: italic 26px Georgia, serif; letter-spacing: -0.5px; color: var(--ink); text-decoration: none; }
.topbar { border-bottom: 1px solid var(--line); }
.nav-link { border-radius: 0; }
.nav-link:hover { background: none; color: var(--accent); }
.welcome h1 { font-size: clamp(34px, 5vw, 48px); }
body:not(.has-piece) .welcome { text-align: left; }
body:not(.has-piece) .examples { justify-content: flex-start; }
.examples .chip { background: none; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; padding: 4px 0; margin-right: 12px; font: italic 15px var(--serif); color: var(--ink-soft); }
.examples .chip:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* the entry */
.art { height: auto; border: 0; background: none; box-shadow: none; border-radius: 0; overflow: visible; display: flex; flex-direction: column; }
.art-label { position: static; order: 0; width: 100%; padding: 26px 0 0; background: none; gap: 8px; justify-content: flex-start; }
#orb { position: relative; order: 1; height: 70px; margin-top: 18px; }
.scene-when { display: block; margin: 0; font: 14px var(--serif); color: var(--accent); }
.art-label h2 { font-size: clamp(36px, 6vw, 50px); line-height: 1.08; letter-spacing: -0.6px; }
.scene-quote { display: block; margin: 0; font: italic 18px/1.55 var(--serif); color: var(--ink); max-width: 40ch; }
.instruments { font: 16px/1.55 var(--serif); color: var(--ink-soft); }
.tags { display: block; line-height: 1.7; }
.tags .tag, .tags .tag-group .tag { display: inline; }
.tag, .tag-group .tag.surprise { background: none; border: 0; border-radius: 0; padding: 0; color: var(--muted); font: 13px var(--sans); }
.tags .tag:not(:empty) ~ .tag:not(:empty)::before, .tags .tag:not(:empty) ~ .tag-group .tag::before, .tag-group .tag + .tag::before { content: '·'; margin: 0 8px; color: var(--faint); }
.tag-group .tag.surprise { color: var(--accent); }
.timeline { background: none; border: 0; border-radius: 0; padding: 4px 0 0; }
.tl-cell { background: var(--surface-3); height: 2px; align-self: center; }
.tl-cell.on { background: var(--ink); }
.tl-sec { height: 2px; align-self: center; }
.tl-sec i { background: var(--surface-3); }
.tl-sec i.on { background: var(--ink); }
.tl-row.sections .tl-cell { font: 12px var(--sans); color: var(--muted); border-left-color: var(--line-strong); }
.tl-head { background: var(--accent); box-shadow: none; width: 2px; }

/* the conversation, as notes in the margin */
body.has-piece .welcome h1 { font-size: 20px; }
.chat-message { background: none; border: 0; border-radius: 0; padding: 12px 0 0; border-top: 1px dashed var(--line-strong); max-width: 100%; align-self: stretch !important; }
.chat-speaker { text-transform: uppercase; letter-spacing: 1.2px; font-size: 11px; color: var(--faint); }
.chat-text { font: italic 16px/1.55 var(--serif); color: var(--ink-soft); }
.chat-message.user { background: none; border-color: var(--line-strong); }
.chat-message.user .chat-text { font-style: normal; color: var(--ink); }
.earlier > summary { border-radius: 0; border: 0; border-bottom: 1px solid var(--line-strong); padding: 2px 0; }

/* dock: a line to write on */
.dock { background: var(--bg); border-top: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
#direction-form { background: none; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; padding: 4px 0; }
#direction-form:focus-within { border-bottom-color: var(--accent); }
#music-prompt { font: italic 17px/1.5 var(--serif); }
.send { background: none; color: var(--accent); padding: 8px 4px; font-weight: 600; }
.send::after { content: ' →'; }
.send:not(:disabled):hover { background: none; color: var(--accent-strong); }
.nudges { gap: 18px; }
.nudges .chip, .chip { background: none; border: 0; border-radius: 0; padding: 4px 0; color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px; }
.chip:not(:disabled):hover { color: var(--accent); text-decoration-color: var(--accent); }
.chip-strong { color: var(--accent); text-decoration-color: var(--accent); }
.reply-suggestions button { background: none; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; padding: 3px 0; margin-right: 10px; font: italic 15px var(--serif); }
.play { background: none; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: none; }
.play:hover { background: var(--ink); color: var(--bg); }
.seal { border-radius: 6px; }
.beat-dots i, .status-dot { background: var(--line-strong); }
.toast { background: var(--ink); color: var(--bg); border-color: var(--ink); border-radius: 4px; }
dialog { border-radius: 6px; }
dialog::backdrop { background: rgba(40, 35, 30, 0.3); }
.part, .idea, .touch-card { border-radius: 6px; background: var(--surface); }
.moment { background: var(--surface); border-radius: 4px; border-color: var(--line); }
.moment-disc { background: none; border: 1.5px solid var(--accent); }
.moment-again .moment-hear { border-radius: 6px; }
.moment-again button { border-radius: 6px; }
.care-card { border-radius: 6px; border-color: var(--warm-line); }

@media (max-width: 760px) {
  .art-label { padding: 18px 0 0; background: none; }
  .art-label h2 { font-size: 34px; }
  .nudges { gap: 14px; }
}

/* ---------- language ---------- */
.lang-switch { font-size: 13px; border: 1px solid var(--line-strong) !important; border-radius: 4px !important; padding: 3px 8px !important; margin-left: 4px; }
.lang-switch:hover { border-color: var(--accent) !important; }
.setting-label { display: block; font-size: var(--t-sm); color: var(--muted); margin-bottom: 6px; }
.lang-choice { display: flex; gap: 8px; }
.lang-choice button { padding: 6px 16px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: var(--t-sm); }
.lang-choice button[aria-pressed='true'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.about-link { padding: 0 !important; font-size: var(--t-sm) !important; text-decoration: underline; color: var(--muted); }
/* Chinese: no slanted type (Chinese has no italics), a little more line height, no letter-spacing tricks */
html[lang^='zh'] body { line-height: 1.7; }
html[lang^='zh'] :is(em, i, .scene-quote, .chat-text, #music-prompt, .examples .chip, .reply-suggestions button, .moment-quote, .prompt-guide) { font-style: normal; }
html[lang^='zh'] #music-prompt::placeholder { font-style: normal; }
html[lang^='zh'] :is(.welcome h1, .art-label h2, dialog h2) { letter-spacing: 0; }
.bot-check { display: flex; justify-content: center; min-height: 0; }
/* optional sign-in */
.account-row { display: flex; gap: 8px; margin-top: 8px; }
.field-input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; }
.field-input:focus { outline: none; border-color: var(--accent); }
.account-google { margin-top: 8px; width: 100%; }
.account-who { margin: 2px 0 6px; font-weight: 600; overflow-wrap: anywhere; }
.status-line .sign-in-now { margin-left: 8px; font-size: var(--t-sm); color: var(--accent); text-decoration: underline; }
/* how to use it */
.steps { list-style: none; counter-reset: step; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 0 0 var(--s5); font-size: var(--t-sm); color: var(--ink-soft); }
.steps li { counter-increment: step; display: flex; align-items: baseline; gap: 6px; }
.steps li::before { content: counter(step); font: 600 12px var(--serif); color: var(--accent); }
body:not(.has-piece) .welcome .steps { justify-content: flex-start; }
.tip { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 4px 6px 10px; border-left: 2px solid var(--accent); background: var(--accent-soft); font-size: var(--t-sm); color: var(--ink-soft); animation: rise 0.3s var(--ease); }
.tip span { flex: 1; }
.tip-close { width: 26px; height: 26px; font-size: 16px; color: var(--muted); border-radius: 50%; }
.tip-close:hover { color: var(--ink); }
