/* Skalia · Pocket Chat — warm-light, mobile-first conversation */
:root {
  --paper: #f6f2ea;
  --paper2: #efe9de;
  --card: #fffdf9;
  --ink: #1c1a17;
  --ink2: #5d564c;
  --ink3: #978e81;
  --line: #e4dccd;
  --line2: #ede6da;
  --gold: #d4a537;
  --gold-ink: #94701c;
  --green: #2e7a57;
  --amber: #b06f12;
  --red: #b0443a;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Geist', 'Inter', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.22, .9, .3, 1);
  --spring: cubic-bezier(.3, 1.35, .45, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.45 var(--sans);
  color: var(--ink);
  background: #e9e3d8;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
kbd { font: 600 11px/1 var(--sans); display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line); color: var(--ink2); }
.eyebrow { font: 600 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink3); }

/* ---------------- desktop stage ---------------- */
.stage {
  position: fixed; inset: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 56px;
  padding: 24px 48px;
  background:
    radial-gradient(900px 600px at 50% 40%, #f7f2e9 0%, transparent 70%),
    radial-gradient(500px 400px at 85% 90%, rgba(212, 165, 55, .10), transparent 70%),
    #e7e0d4;
}
.note { max-width: 350px; }
.note-l { justify-self: end; }
.note-r { justify-self: start; display: flex; flex-direction: column; gap: 16px; }
.note h1 { font: 400 29px/1.16 var(--serif); letter-spacing: -.01em; margin: 16px 0 14px; color: var(--ink); }
.note h1 em { color: var(--ink2); }
.note p { margin: 0 0 22px; color: var(--ink2); font-size: 14.5px; line-height: 1.55; }
.note-try { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.note-try li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink2); }
.note-try b { color: var(--ink); font-weight: 600; }
.qr-card { display: flex; gap: 16px; align-items: center; padding: 16px; background: rgba(255, 253, 249, .7); border: 1px solid var(--line); border-radius: 18px; }
.qr { width: 84px; height: 84px; flex: none; background: #fff; border-radius: 8px; padding: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.qr rect { fill: var(--ink); }
.qr-card b { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.qr-card span { font-size: 12.5px; color: var(--ink2); line-height: 1.45; }
.keys { padding: 16px; border: 1px solid var(--line); border-radius: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; font-size: 12.5px; color: var(--ink2); }
.keys .eyebrow { grid-column: 1 / -1; margin-bottom: 2px; }
.keys div { display: flex; gap: 8px; align-items: center; }
.note-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); padding: 0 4px; }
.note-foot button { color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; font-size: 12px; }

/* ---------------- device ---------------- */
.device-wrap { zoom: var(--z, 1); }
.device {
  position: relative; width: 418px; height: 872px; padding: 14px; border-radius: 66px;
  background: linear-gradient(145deg, #3a3835, #1c1b1a 40%, #2a2826);
  box-shadow: 0 0 0 1.5px #5a5650, 0 50px 90px -30px rgba(40, 30, 15, .45), 0 24px 40px -20px rgba(40, 30, 15, .35), inset 0 0 0 2px #121110;
  transition: transform .5s var(--spring);
}
.hw { position: absolute; width: 4px; background: #2b2926; border-radius: 2px; left: -3px; }
.hw-a { top: 150px; height: 32px; } .hw-b { top: 210px; height: 62px; } .hw-c { top: 285px; height: 62px; }
.hw-d { left: auto; right: -3px; top: 240px; height: 96px; }
.screen {
  position: relative; width: 390px; height: 844px; border-radius: 52px; overflow: hidden;
  background: var(--paper); display: flex; flex-direction: column; isolation: isolate;
}
.island { position: absolute; top: 11px; left: 50%; width: 122px; height: 35px; margin-left: -61px; border-radius: 20px; background: #000; z-index: 60; }
.sbar { height: 50px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 6px 34px 0 46px; font: 600 15.5px/1 var(--sans); letter-spacing: -.01em; }
.sbar-r { display: flex; gap: 6px; align-items: center; }
.sbar svg { fill: var(--ink); }
.batt { display: inline-block; width: 25px; height: 12px; border: 1.3px solid rgba(28, 26, 23, .45); border-radius: 4px; padding: 1.5px; position: relative; }
.batt i { display: block; height: 100%; width: 78%; background: var(--ink); border-radius: 1.5px; }
.homebar { position: absolute; bottom: 8px; left: 50%; width: 136px; margin-left: -68px; height: 5px; border-radius: 3px; background: var(--ink); opacity: .85; z-index: 90; pointer-events: none; }

/* ---------------- header ---------------- */
.top { flex: none; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: 2px 8px 8px; position: relative; z-index: 5; background: var(--paper); }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -18px; height: 18px; background: linear-gradient(var(--paper), rgba(246, 242, 234, 0)); pointer-events: none; }
.ibtn { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; color: var(--ink2); transition: background .2s; }
.ibtn:active, .ibtn:hover { background: var(--paper2); }
.who { justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 14px; border-radius: 14px; min-height: 44px; }
.who:hover { background: var(--paper2); }
.who-name { font: 600 16px/1 var(--sans); letter-spacing: -.01em; display: flex; align-items: center; gap: 7px; }
.mark { width: 20px; height: 20px; border-radius: 6px; font: italic 500 14px/20px var(--serif); text-align: center; color: #fff; background: var(--ink); box-shadow: inset 0 -2px 0 rgba(212, 165, 55, .8); }
.who-sub { font: 500 12px/1 var(--sans); color: var(--ink3); display: flex; gap: 6px; align-items: center; }
.live { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(46, 122, 87, .5); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(46, 122, 87, .45); } 70% { box-shadow: 0 0 0 6px rgba(46, 122, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 122, 87, 0); } }

/* ---------------- feed ---------------- */
.feed { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scroll-behavior: smooth; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.feed-in { padding: 22px 20px 18px; display: flex; flex-direction: column; min-height: 100%; justify-content: flex-end; }
.day { align-self: center; font: 500 11.5px/1 var(--sans); color: var(--ink3); letter-spacing: .02em; margin: 4px 0 22px; text-align: center; }
.day small { display: block; margin-top: 6px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #b4ab9d; }

.msg { margin: 0 0 14px; animation: rise .45s var(--ease) both; max-width: 100%; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.msg.sk { font: 400 18px/1.42 var(--serif); color: var(--ink); padding-right: 18px; letter-spacing: -.003em; text-wrap: pretty; }
.msg.sk b { font-weight: 600; }
.msg.sk .lead { display: block; }
.msg.sk.small { font-size: 16.5px; color: var(--ink2); }
.msg.me { align-self: flex-end; max-width: 82%; background: var(--ink); color: #f6f1e7; font: 400 15.5px/1.4 var(--sans); padding: 10px 15px; border-radius: 20px 20px 6px 20px; margin-top: 4px; margin-bottom: 16px; }
.msg.done { font: 500 12.5px/1.3 var(--sans); color: var(--ink3); display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; }
.msg.done i { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-style: normal; font-size: 10px; flex: none; }
.msg.done.pass i { background: var(--ink3); }
.msg.done.chg i { background: var(--gold); }
.msg.done em { font-style: normal; color: var(--ink2); }
.msg .more { color: var(--ink3); font: 500 13px/1 var(--sans); margin-left: 4px; text-decoration: underline; text-underline-offset: 3px; }
.srcs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.src { font: 500 12px/1 var(--sans); color: var(--ink2); background: var(--paper2); border: 1px solid var(--line); padding: 7px 10px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; }
.src.go { background: var(--card); color: var(--ink); }
.src svg { opacity: .6; }

.typing { display: flex; gap: 5px; padding: 8px 0 18px; animation: rise .3s var(--ease) both; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink3); animation: blink 1.2s infinite both; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* count pips in the morning message */
.pips { display: flex; gap: 5px; margin-top: 12px; }
.pips i { width: 22px; height: 4px; border-radius: 2px; background: var(--line); transition: background .5s; }
.pips i.on { background: var(--ink); }

/* ---------------- desk status (updates in place) ---------------- */
.desk { margin: 4px 0 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 249, .55); animation: rise .45s var(--ease) both; overflow: hidden; }
.desk-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px 2px; font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.desk-h .live { margin-right: 2px; }
.desk-row { display: grid; grid-template-columns: 1fr auto 14px; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 14px; min-height: 44px; position: relative; }
.desk-row + .desk-row { border-top: 1px solid var(--line2); }
.desk-row:active { background: var(--paper2); }
.desk-row b { font-weight: 500; font-size: 14.5px; display: block; letter-spacing: -.005em; }
.desk-row small { display: none; font-size: 12.5px; color: var(--ink3); margin-top: 2px; }
.desk-row.you small { display: block; }
.desk-row .st { font: 500 12.5px/1 var(--sans); color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.desk-row .st.ok { color: var(--green); }
.desk-row .st.you { color: var(--gold-ink); font-weight: 600; }
.desk-row .chev { color: var(--ink3); }
.desk-row .bar { position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: transparent; }
.desk-row .bar i { display: block; height: 100%; width: 0; background: var(--ink); opacity: .55; border-radius: 1px; transition: width .9s var(--ease); }
.desk-row.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { background: rgba(212, 165, 55, .22); } 100% { background: transparent; } }

/* ---------------- decision card ---------------- */
.card {
  background: var(--card); border-radius: 22px; padding: 18px 18px 14px; margin: 2px 0 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 0 0 1px var(--line), 0 12px 30px -16px rgba(60, 45, 20, .28);
  animation: cardIn .55s var(--spring) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.card.out { animation: cardOut .32s var(--ease) both; }
@keyframes cardOut { to { opacity: 0; transform: scale(.97) translateY(-6px); height: 0; } }
.c-eye { display: flex; justify-content: space-between; align-items: center; font: 500 11.5px/1 var(--sans); color: var(--ink3); letter-spacing: .02em; }
.c-eye .n { font-variant-numeric: tabular-nums; }
.c-co { font: 600 20px/1.2 var(--sans); letter-spacing: -.015em; margin: 12px 0 5px; }
.c-rec { font: 400 18px/1.38 var(--serif); color: var(--ink); margin: 0; text-wrap: pretty; }
.c-flag { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #f8ece8; color: #7c2f27; font: 500 13.5px/1.4 var(--sans); display: flex; gap: 9px; }
.c-flag i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: none; margin-top: 6px; }
.c-meta { display: flex; align-items: center; gap: 12px; margin: 14px 0 14px; font: 500 12.5px/1 var(--sans); color: var(--ink2); }
.conf { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.conf .m { width: 44px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.conf .m i { display: block; height: 100%; background: var(--ink); border-radius: 2px; }
.whyb { margin-left: auto; font: 500 13px/1 var(--sans); color: var(--ink); padding: 8px 10px; margin-right: -10px; border-radius: 10px; display: flex; align-items: center; gap: 5px; min-height: 34px; }
.whyb svg { transition: transform .3s var(--ease); }
.whyb[aria-expanded='true'] svg { transform: rotate(180deg); }
.why { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.why > div { overflow: hidden; }
.why.open { grid-template-rows: 1fr; }
.why ul { list-style: none; margin: 0 0 14px; padding: 2px 0 0 12px; border-left: 2px solid var(--line); }
.why li { font: 400 13.5px/1.45 var(--sans); color: var(--ink2); padding: 3px 0; }
.why .why-more { font: 500 12.5px/1 var(--sans); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; margin: 6px 0 0; padding: 6px 0; }
.range-mini { margin: 14px 0 2px; }
.btns { display: grid; grid-template-columns: 1.35fr 1fr auto; gap: 8px; }
.b { height: 48px; border-radius: 14px; font: 600 15px/1 var(--sans); letter-spacing: -.005em; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: transform .15s, background .2s, opacity .2s; padding: 0 16px; white-space: nowrap; }
.b:active { transform: scale(.97); }
.b.pri { background: var(--ink); color: #faf6ee; }
.b.pri:hover { background: #2e2b26; }
.b.sec { background: var(--paper2); color: var(--ink); }
.b.sec:hover { background: #e8e0d2; }
.b.ter { color: var(--ink2); padding: 0 12px; }
.b.ter:hover { color: var(--ink); }
.b[disabled] { opacity: .45; pointer-events: none; }

/* change options inline */
.alts { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.alt { text-align: left; padding: 13px 14px; border-radius: 14px; background: var(--paper2); font: 500 14.5px/1.3 var(--sans); min-height: 48px; }
.alt small { display: block; color: var(--ink3); font-size: 12.5px; margin-top: 3px; font-weight: 400; }
.alt:active { background: #e8e0d2; }
.linkb { font: 500 13px/1 var(--sans); color: var(--ink2); padding: 12px 4px 4px; align-self: flex-start; }

/* pass with reason: negative space */
.passbox { margin-top: 2px; }
.passbox label { display: block; font: 400 15.5px/1.4 var(--serif); font-style: italic; color: var(--ink2); margin-bottom: 10px; }
.pass-row { display: flex; gap: 8px; align-items: center; }
.pass-field { flex: 1; position: relative; height: 48px; }
.pass-field input { width: 100%; height: 100%; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; font: 400 16px/1 var(--sans); padding: 0 2px; outline: none; border-radius: 0; }
.pass-field input::placeholder { color: #b9b0a2; }
.pass-field .wave { position: absolute; inset: 0; }
.round { width: 48px; height: 48px; border-radius: 24px; display: grid; place-items: center; flex: none; background: var(--paper2); color: var(--ink); transition: background .2s, transform .15s; }
.round:active { transform: scale(.94); }
.round.go { background: var(--ink); color: #fff; }
.round.rec { background: var(--red); color: #fff; }
.pass-hint { font: 400 12px/1.3 var(--sans); color: var(--ink3); margin-top: 10px; display: flex; justify-content: space-between; }
.pass-hint button { color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }

/* simulated waveform */
.wave { display: none; align-items: center; gap: 3px; padding: 0 12px; pointer-events: none; }
.listening .wave { display: flex; }
.listening input { color: transparent !important; }
.listening input::placeholder { color: transparent !important; }
.wave i { flex: 1; max-width: 3px; min-width: 2px; height: 30%; border-radius: 2px; background: var(--red); animation: wv .9s ease-in-out infinite; }
@keyframes wv { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* ---------------- dock / composer ---------------- */
.dock { flex: none; position: relative; z-index: 6; background: var(--paper); padding: 0 12px; }
.dock::before { content: ''; position: absolute; left: 0; right: 0; top: -22px; height: 22px; background: linear-gradient(rgba(246, 242, 234, 0), var(--paper)); pointer-events: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 2px 8px 10px; margin: 0 -12px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); font: 500 13.5px/1 var(--sans); color: var(--ink); white-space: nowrap; scroll-snap-align: start; animation: rise .4s var(--ease) both; }
.chip:active { background: var(--paper2); }
.composer { display: flex; align-items: center; gap: 8px; padding: 0 0 0; }
.field { flex: 1; position: relative; height: 48px; border-radius: 24px; background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 4px 14px -8px rgba(60, 45, 20, .25); }
.field input { width: 100%; height: 100%; border: 0; background: transparent; outline: none; padding: 0 18px; font: 400 16px/1 var(--sans); border-radius: 24px; }
.field input::placeholder { color: var(--ink3); }
.field .wave { position: absolute; inset: 0; padding: 0 20px; }
.cbtn { width: 48px; height: 48px; border-radius: 24px; flex: none; display: grid; place-items: center; transition: transform .15s, background .2s; }
.cbtn:active { transform: scale(.93); }
.mic { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.mic.rec { background: var(--red); color: #fff; box-shadow: none; }
.send { background: var(--ink); color: #fff; display: none; }
.composer.has .send { display: grid; }
.composer.has .mic { display: none; }
.foot { height: 52px; display: flex; align-items: center; justify-content: flex-end; padding: 0 10px 6px 170px; font: 500 10.5px/1.2 var(--sans); color: #b2a999; letter-spacing: .02em; }

/* ---------------- push notifications ---------------- */
.push-host { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 70; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.push {
  pointer-events: auto; display: grid; grid-template-columns: 38px 1fr; gap: 11px; align-items: center; text-align: left; width: 100%;
  padding: 11px 14px 12px 11px; border-radius: 24px; background: rgba(250, 247, 241, .86); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 16px 40px -12px rgba(30, 20, 5, .35);
  transform: translateY(-130%); opacity: 0; transition: transform .55s var(--spring), opacity .3s;
}
.push.in { transform: none; opacity: 1; }
.push .pi { width: 38px; height: 38px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font: italic 500 21px/1 var(--serif); box-shadow: inset 0 -3px 0 rgba(212, 165, 55, .85); }
.push .pt { display: flex; justify-content: space-between; font: 600 13.5px/1.2 var(--sans); }
.push .pt span { font-weight: 400; color: var(--ink3); font-size: 12px; }
.push .pb { font: 400 13.5px/1.35 var(--sans); color: var(--ink); margin-top: 2px; }

/* ---------------- bottom sheet ---------------- */
.scrim { position: absolute; inset: 0; background: rgba(28, 24, 18, .32); opacity: 0; pointer-events: none; transition: opacity .35s; z-index: 40; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 41; max-height: calc(100% - 64px);
  background: var(--card); border-radius: 28px 28px 0 0; box-shadow: 0 -10px 40px -10px rgba(30, 20, 5, .3);
  transform: translateY(105%); transition: transform .5s var(--ease); display: flex; flex-direction: column;
  padding-bottom: max(18px, var(--sab));
}
.sheet.on { transform: none; }
.sheet.drag { transition: none; }
.grab { flex: none; height: 24px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.grab::before { content: ''; width: 38px; height: 5px; border-radius: 3px; background: #d9d0c1; }
.sheet-in { overflow-y: auto; overscroll-behavior: contain; padding: 4px 22px 8px; -webkit-overflow-scrolling: touch; }
.sh-eye { font: 500 12px/1 var(--sans); color: var(--ink3); margin-bottom: 8px; }
.sh-t { font: 600 22px/1.2 var(--sans); letter-spacing: -.02em; margin: 0 0 4px; }
.sh-sub { font: 400 14px/1.45 var(--sans); color: var(--ink2); margin: 0 0 18px; }
.sh-big { font: 400 46px/1 var(--serif); letter-spacing: -.02em; margin: 6px 0 4px; font-variant-numeric: lining-nums; }
.sh-big small { font: 500 13px/1 var(--sans); color: var(--ink3); letter-spacing: 0; margin-left: 6px; }
.sh-sec { font: 600 10.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); margin: 24px 0 10px; }
.sh-foot { display: flex; gap: 8px; margin-top: 22px; }
.sh-foot .b { flex: 1; }
.sh-note { font: 400 13px/1.45 var(--sans); color: var(--ink2); margin: 12px 0 0; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 9px 0; font-size: 14.5px; color: var(--ink3); }
.steps li.done { color: var(--ink2); }
.steps li.now { color: var(--ink); font-weight: 500; }
.steps .dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; display: grid; place-items: center; font-size: 10px; color: #fff; }
.steps li.done .dot { background: var(--green); border-color: var(--green); }
.steps li.now .dot { border-color: var(--ink); border-top-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line2); min-height: 52px; }
.rows li:last-child { border-bottom: 0; }
.rows .r-main { flex: 1; min-width: 0; }
.rows b { display: block; font-weight: 550; font-size: 15px; }
.rows small { display: block; color: var(--ink3); font-size: 12.5px; margin-top: 2px; }
.rows .r-v { font: 500 13px/1 var(--sans); color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sev { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sev.critical { background: var(--red); } .sev.high { background: var(--amber); } .sev.medium { background: #c9a35a; } .sev.low { background: #c8c0b3; }
.deal-row { width: 100%; text-align: left; }
.deal-row:active { background: var(--paper2); }
.stage-w { font: 500 12.5px/1 var(--sans); color: var(--ink2); padding: 6px 10px; border-radius: 999px; background: var(--paper2); }
.stage-w.hot { background: #f4e8c8; color: #6d5212; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--paper2); border-radius: 12px; margin: 0 0 8px; }
.seg button { flex: 1; height: 36px; border-radius: 9px; font: 500 13.5px/1 var(--sans); color: var(--ink2); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.empty { color: var(--ink3); font-size: 14px; padding: 18px 0; text-align: center; }
.menu-list button { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line2); font-size: 15.5px; min-height: 52px; }
.menu-list button span { color: var(--ink3); font-size: 13px; }
.mail { padding: 12px 0; border-bottom: 1px solid var(--line2); }
.mail-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.mail-h b { font-weight: 600; font-size: 14.5px; }
.mail-h span { font-size: 12px; color: var(--ink3); white-space: nowrap; }
.mail p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink2); line-height: 1.4; }
.mail .draft { margin-top: 8px; font: italic 400 14.5px/1.45 var(--serif); color: var(--ink); padding-left: 11px; border-left: 2px solid var(--gold); }
.mail .tag { display: inline-block; margin-top: 6px; font: 500 11.5px/1 var(--sans); color: var(--ink3); }
.memo-page { background: #fffefb; border: 1px solid var(--line); border-radius: 6px; padding: 22px 20px; box-shadow: 0 10px 24px -18px rgba(60, 45, 20, .4); }
.memo-page h4 { font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); margin: 18px 0 6px; }
.memo-page h4:first-child { margin-top: 0; }
.memo-page p { font: 400 15.5px/1.5 var(--serif); margin: 0; color: var(--ink); }
.memo-page p.you { color: var(--gold-ink); font-style: italic; }

/* charts (single series, ink + gold range) */
.rbar { position: relative; height: 54px; margin: 4px 0 0; }
.rbar .track { position: absolute; left: 0; right: 0; top: 22px; height: 6px; border-radius: 3px; background: var(--paper2); }
.rbar .band { position: absolute; top: 18px; height: 14px; border-radius: 4px; background: var(--gold); opacity: .9; }
.rbar .tick { position: absolute; top: 12px; width: 2px; height: 26px; background: var(--ink); border-radius: 1px; }
.rbar .tl { position: absolute; top: 0; font: 600 11px/1 var(--sans); color: var(--ink); transform: translateX(-50%); white-space: nowrap; }
.rbar .ax { position: absolute; top: 40px; font: 500 11px/1 var(--sans); color: var(--ink3); transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.ff { position: relative; }
.ff-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; height: 30px; position: relative; }
.ff-row span { font: 500 12px/1.1 var(--sans); color: var(--ink2); }
.ff-track { position: relative; height: 100%; }
.ff-bar { position: absolute; top: 9px; height: 12px; border-radius: 4px; background: var(--ink); opacity: .78; cursor: default; }
.ff-bar:hover { opacity: 1; }
.ff-band { position: absolute; top: -4px; bottom: -4px; background: rgba(212, 165, 55, .16); border-left: 1.5px dashed var(--gold); border-right: 1.5px dashed var(--gold); pointer-events: none; }
.ff-ax { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.ff-ax div { position: relative; height: 16px; border-top: 1px solid var(--line); }
.ff-ax span { position: absolute; top: 4px; transform: translateX(-50%); font: 500 10.5px/1 var(--sans); color: var(--ink3); font-variant-numeric: tabular-nums; }
.ff-tip { position: absolute; z-index: 3; pointer-events: none; background: var(--ink); color: #fff; font: 500 12px/1.2 var(--sans); padding: 6px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .15s; }
.ff-tip.on { opacity: 1; }
.meter { height: 6px; border-radius: 3px; background: var(--paper2); overflow: hidden; margin: 8px 0 0; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 3px; transition: width .8s var(--ease); }

/* ---------------- exit celebration ---------------- */
.celebrate { position: absolute; inset: 0; z-index: 80; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 70px 26px 40px; background: radial-gradient(500px 420px at 50% 38%, #2d2820 0%, #151310 70%); color: #efe7d6; text-align: center; overflow: hidden; }
.celebrate.on { display: flex; animation: fadeIn .5s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
.cel-eye { font: 600 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); opacity: 0; animation: rise .6s .3s var(--ease) both; }
.tomb {
  position: relative; width: 236px; margin: 24px 0 26px; padding: 30px 22px 26px; border-radius: 10px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04) 45%, rgba(255, 255, 255, .09));
  border: 1px solid rgba(255, 255, 255, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 80px -20px rgba(212, 165, 55, .35);
  backdrop-filter: blur(6px); animation: drop .9s .5s var(--spring) both;
}
@keyframes drop { from { opacity: 0; transform: translateY(-60px) rotateX(25deg) scale(.9); } to { opacity: 1; transform: none; } }
.tomb::after { content: ''; position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .28) 48%, transparent 62%); background-size: 250% 100%; animation: sheen 2.4s 1.4s ease both; pointer-events: none; }
@keyframes sheen { from { background-position: 120% 0; } to { background-position: -60% 0; } }
.tomb .t-co { font: 500 24px/1.1 var(--serif); letter-spacing: -.01em; }
.tomb .t-by { font: italic 400 14px/1.4 var(--serif); color: #bfb39c; margin: 10px 0 4px; }
.tomb .t-buy { font: 600 15px/1.2 var(--sans); }
.tomb hr { border: 0; height: 1px; background: rgba(255, 255, 255, .2); margin: 18px 22px; }
.tomb .t-x { font: 400 40px/1 var(--serif); color: #f3d98f; letter-spacing: -.02em; }
.tomb .t-irr { font: 500 12.5px/1 var(--sans); color: #c9bda5; margin-top: 8px; letter-spacing: .04em; }
.tomb .t-f { font: 500 10px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #9d927d; margin-top: 18px; }
.cel-line { font: 400 18px/1.4 var(--serif); max-width: 300px; margin: 0 0 22px; color: #e8dfcc; animation: rise .6s 1.5s var(--ease) both; }
.cel-acts { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 8px; animation: rise .6s 1.8s var(--ease) both; }
.cel-act { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 13px 16px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); text-align: left; font: 500 14px/1.3 var(--sans); color: #efe7d6; min-height: 52px; }
.cel-act small { display: block; color: #a99f8b; font-weight: 400; font-size: 12px; margin-top: 2px; }
.cel-act em { font-style: normal; font: 600 13px/1 var(--sans); color: #1a1712; background: var(--gold); padding: 8px 12px; border-radius: 10px; flex: none; }
.cel-act.ok em { background: transparent; color: #9fd1b5; padding-right: 0; }
.cel-close { margin-top: 18px; color: #a99f8b; font: 500 13.5px/1 var(--sans); padding: 12px 18px; animation: rise .6s 2s var(--ease) both; }
.spark { position: absolute; left: 50%; top: 38%; width: 2px; height: 16px; border-radius: 1px; background: var(--gold); opacity: 0; transform-origin: 50% 0; pointer-events: none; }
.spark.go { animation: burst 1.3s var(--ease) forwards; }
@keyframes burst { 0% { opacity: 0; transform: rotate(var(--a)) translateY(20px) scaleY(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(var(--d)) scaleY(1); } }
.buzz { animation: buzz .42s linear 2; }
@keyframes buzz { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-3px) rotate(-.3deg); } 40% { transform: translateX(3px) rotate(.3deg); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }

/* ---------------- help overlay ---------------- */
.help { position: fixed; inset: 0; z-index: 2147483100; display: grid; place-items: center; background: rgba(30, 25, 18, .35); backdrop-filter: blur(4px); }
.help[hidden] { display: none; }
.help-card { background: var(--card); border-radius: 22px; padding: 24px 26px; width: min(380px, calc(100vw - 32px)); box-shadow: 0 30px 60px -20px rgba(30, 20, 5, .45); }
.help-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; margin: 16px 0 18px; font-size: 14px; color: var(--ink2); }
.kk { display: flex; gap: 4px; }
.help-x { width: 100%; height: 44px; border-radius: 12px; background: var(--paper2); font-weight: 600; }

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) { .note-l { display: none; } .stage { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } }
@media (max-width: 860px) and (min-width: 761px) { .note { display: none; } }
@media (min-width: 761px) { .foot { height: 30px; font-size: 0; } }
@media (max-width: 760px) {
  body { background: var(--paper); }
  .stage { display: block; padding: 0; background: var(--paper); }
  .note, .hw, .island, .sbar, .homebar { display: none; }
  .device-wrap { zoom: 1; }
  .device { position: fixed; left: 0; right: 0; top: 0; width: auto; height: var(--vvh, 100dvh); padding: 0; border-radius: 0; background: var(--paper); box-shadow: none; }
  .screen { width: 100%; height: 100%; border-radius: 0; }
  .top { padding-top: calc(var(--sat) + 4px); }
  .push-host { top: calc(var(--sat) + 6px); }
  .foot { height: max(52px, calc(var(--sab) + 18px)); }
  .sheet { padding-bottom: max(60px, calc(var(--sab) + 48px)); }
  .kbd-open .foot { height: 10px; font-size: 0; }
  .kbd-open .chips { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.cel-sub { font: 500 11.5px/1 var(--sans); color: #8d846f; margin-top: 9px; animation: rise .6s .4s var(--ease) both; }
.note h1 { text-wrap: balance; }
.celebrate.on ~ .homebar { background: #efe7d6; }
.sheet-in .sh-foot { position: sticky; bottom: -8px; background: linear-gradient(rgba(255, 253, 249, 0), var(--card) 14px); padding: 18px 0 8px; margin-top: 8px; }
