:root {
  --page: #fcfcfb;
  --panel: #f4f3f1;
  --soft: #f2f1ef;
  --line: #e9e7e3;
  --text: #0b0b0b;
  --muted: #6e6b66;
  --faint: #a19d97;
  --ink: #000;
  --blue: #0b84fe;
  --green: #34c759;
  --gray-bubble: #e9e9eb;
  --red: #ff3b30;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body { background: var(--page); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Orbs ---------- */
.orb { position: relative; border-radius: 50%; overflow: hidden; isolation: isolate; flex: none; clip-path: circle(50% at 50% 50%); -webkit-mask-image: -webkit-radial-gradient(white, black); /* Safari won't clip the blurred, animated layer to the circle without these */ background: radial-gradient(circle at 50% 55%, var(--b, #ddd), var(--a, #bbb) 78%); animation: breathe 8s ease-in-out infinite; }
.orb::before { content: ""; position: absolute; inset: -30%; background: radial-gradient(circle at 30% 28%, var(--c), transparent 38%), radial-gradient(circle at 74% 70%, var(--d), transparent 42%), radial-gradient(circle at 72% 22%, var(--b), transparent 36%), radial-gradient(circle at 22% 78%, var(--a), transparent 46%); filter: blur(10px); animation: swirl 18s linear infinite; }
.orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.45), transparent 42%), radial-gradient(circle at 50% 50%, transparent 58%, rgba(0,0,0,.16) 100%), var(--grain); mix-blend-mode: soft-light; }
.orb.speaking { animation: speak .45s ease-in-out infinite alternate; }
.orb.speaking::before { animation-duration: 4s; }
@keyframes swirl { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes speak { from { transform: scale(1); } to { transform: scale(1.07); } }
.orb-xs { width: 18px; height: 18px; }

/* ---------- Page chrome ---------- */
.nav { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px 40px; background: rgba(252,252,251,.94); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 28px; font-size: 15px; }
.nav-links a { color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 14px; justify-self: end; }
.engine { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.engine i { width: 7px; height: 7px; border-radius: 50%; background: #e0a526; }
.engine i.live { background: var(--green); }
.pill { border: 1px solid var(--ink); background: var(--ink); color: #fff; border-radius: 999px; padding: 11px 22px; font-size: 15px; font-weight: 500; transition: transform .2s var(--ease), opacity .2s, background .2s; display: inline-flex; align-items: center; gap: 8px; }
.pill:hover { transform: translateY(-1px); }
.pill:active { transform: scale(.97); }
.pill.ghost { background: #fff; color: var(--text); border-color: var(--line); }
.pill.sm { padding: 8px 14px; font-size: 13.5px; }
.pill:disabled { opacity: .45; transform: none; }
.pill svg { width: 16px; height: 16px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 13.5px; transition: all .2s var(--ease); white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.chip:hover { border-color: #cfcbc5; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip i.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip small { color: var(--faint); }
.chip.on small { color: rgba(255,255,255,.6); }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(340px, 540px) 1fr; gap: 40px; padding: 8px 40px 56px; align-items: start; scroll-margin-top: 80px; }
.intro { padding-top: 36px; }
h1 { font-size: clamp(44px, 5.4vw, 76px); font-weight: 400; letter-spacing: -0.045em; line-height: 1.02; margin: 0 0 24px; }
.lede { font-size: 18px; line-height: 1.55; color: #2b2a28; margin: 0 0 28px; max-width: 480px; }
.number-card { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 24px; padding: 18px 20px; max-width: 480px; margin-bottom: 14px; }
.number-card .num { font-size: 28px; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.num-acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.num-acts .pill { flex: 1 1 auto; justify-content: center; }
.num-acts .pill svg { width: 15px; height: 15px; }
.save-contact { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--blue); margin-top: 4px; }
.number-card p { grid-column: 1 / -1; margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.badges { display: flex; gap: 6px; }
.badge { font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.badge.im { background: rgba(11,132,254,.1); color: var(--blue); }
.badge.sms { background: rgba(52,199,89,.12); color: #1f9b45; }

.demo { border: 1px solid var(--line); background: #fff; border-radius: 24px; padding: 18px 20px; max-width: 480px; }
.demo .clock { font-size: 30px; letter-spacing: -0.03em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.demo .state { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 0 0 14px; }
.demo .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.demo .row + .row { margin-top: 12px; }
.demo .why { font-size: 13px; color: var(--faint); line-height: 1.5; margin-top: 12px; }
.demo .why b { color: var(--muted); font-weight: 500; }
.mini-seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; }
.mini-seg button { border: 0; background: none; border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); transition: all .25s var(--ease); }
.mini-seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.stage { position: relative; background: var(--panel); border-radius: 32px; clip-path: inset(0 round 32px); min-height: calc(100vh - 110px); display: grid; place-items: center; padding: 28px; overflow: hidden; }
.drift { position: absolute; opacity: .9; }
.drift-a { width: 220px; height: 220px; left: -60px; top: 12%; animation: breathe 8s ease-in-out infinite, float1 22s ease-in-out infinite; }
.drift-b { width: 150px; height: 150px; right: 6%; top: -40px; animation: breathe 9s ease-in-out infinite, float2 26s ease-in-out infinite; }
.drift-c { width: 260px; height: 260px; right: -90px; bottom: -70px; animation: breathe 10s ease-in-out infinite, float1 30s ease-in-out infinite reverse; }
@keyframes float1 { 0%, 100% { translate: 0 0; } 50% { translate: 30px -24px; } }
@keyframes float2 { 0%, 100% { translate: 0 0; } 50% { translate: -26px 30px; } }

/* ---------- Phone: Messages ---------- */
.phone { position: relative; z-index: 1; width: 380px; height: min(800px, calc(100vh - 150px)); min-height: 620px; background: #fff; border-radius: 48px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 40px 80px -20px rgba(40,30,20,.25), 0 12px 24px -12px rgba(40,30,20,.15); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, sans-serif; }
.statusbar { height: 46px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; font-size: 15px; font-weight: 600; position: relative; z-index: 5; background: rgba(250,250,250,.94); }
.island { position: absolute; left: 50%; top: 10px; translate: -50% 0; width: 104px; height: 28px; background: #000; border-radius: 20px; }
.sb-icons { display: flex; gap: 3px; align-items: flex-end; }
.sb-icons i { width: 3px; background: #000; border-radius: 1px; }
.sb-icons i:nth-child(1) { height: 5px; } .sb-icons i:nth-child(2) { height: 8px; } .sb-icons i:nth-child(3) { height: 11px; }
.screen { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; display: flex; flex-direction: column; position: relative; }
.screen::-webkit-scrollbar { display: none; }

.im-head { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: 60px 1fr 60px; align-items: start; padding: 2px 12px 8px; background: rgba(250,250,250,.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: .5px solid #d8d8dc; }
.im-back { color: var(--blue); display: flex; align-items: center; gap: 2px; font-size: 17px; padding-top: 12px; }
.im-back svg { width: 24px; height: 24px; stroke-width: 2.2; }
.im-back span { background: var(--blue); color: #fff; border-radius: 999px; font-size: 13px; font-weight: 600; padding: 1px 7px; }
.im-who { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 0; }
.im-who .orb { width: 48px; height: 48px; }
.im-who b { font-weight: 400; font-size: 12px; display: flex; align-items: center; gap: 2px; }
.im-who b svg { width: 10px; height: 10px; stroke-width: 2.4; color: var(--faint); }
.im-call { justify-self: end; margin-top: 10px; width: 36px; height: 36px; border: 0; background: none; color: var(--blue); display: grid; place-items: center; border-radius: 50%; transition: background .2s; }
.im-call:hover { background: rgba(11,132,254,.08); }

.thread { flex: 1; padding: 8px 12px 6px; display: flex; flex-direction: column; }
.stamp { text-align: center; font-size: 11.5px; color: #8e8e93; margin: 14px 0 8px; line-height: 1.35; }
.stamp b { font-weight: 600; }
.row-msg { display: flex; flex-direction: column; max-width: 76%; margin-top: 2px; position: relative; }
.row-msg.gap { margin-top: 10px; }
.row-msg.them { align-self: flex-start; align-items: flex-start; }
.row-msg.me { align-self: flex-end; align-items: flex-end; }
.row-msg.new { animation: pop .4s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.b { padding: 7px 12px; border-radius: 18px; font-size: 16px; line-height: 1.32; white-space: pre-wrap; overflow-wrap: anywhere; letter-spacing: -0.01em; }
.them .b { background: var(--gray-bubble); color: #000; }
.me .b { background: var(--blue); color: #fff; }
.sms .me .b, .sms .me .voice { background: var(--green); }
.them.tail .b { border-bottom-left-radius: 5px; }
.me.tail .b { border-bottom-right-radius: 5px; }
.receipt { font-size: 11px; color: #8e8e93; margin: 3px 4px 0; font-weight: 500; }
.tapback { position: absolute; top: -14px; left: -12px; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 13px; background: var(--gray-bubble); border: 2px solid #fff; display: grid; place-items: center; font-size: 13px; line-height: 1; animation: tap .5s var(--ease) both; z-index: 1; }
.tapback.love { color: #ff2d55; } .tapback.like, .tapback.emphasize { color: #0b84fe; font-weight: 800; }
.row-msg.has-tap { margin-top: 16px; }
@keyframes tap { 0% { transform: scale(0); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.sms-react { font-size: 13px; color: #8e8e93; align-self: flex-start; max-width: 80%; background: var(--gray-bubble); padding: 6px 12px; border-radius: 16px; margin-top: 4px; animation: pop .4s var(--ease) both; }

.voice { display: flex; align-items: center; gap: 9px; padding: 7px 12px 7px 8px; border-radius: 18px; min-width: 200px; }
.them .voice { background: var(--gray-bubble); }
.me .voice { background: var(--blue); color: #fff; }
.voice .vp { width: 28px; height: 28px; border-radius: 50%; border: 0; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.95); color: #000; transition: transform .2s var(--ease); }
.them .voice .vp { background: #fff; }
.voice .vp:active { transform: scale(.9); }
.voice .vp svg { width: 11px; height: 11px; fill: currentColor; stroke: none; }
.wave { display: flex; align-items: center; gap: 2.5px; height: 24px; flex: 1; }
.wave i { width: 2.5px; border-radius: 2px; background: currentColor; opacity: .5; height: var(--h); }
.playing .wave i { animation: bar .9s ease-in-out infinite alternate; animation-delay: calc(var(--k) * -70ms); opacity: .95; }
@keyframes bar { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.voice .dur { font-size: 12.5px; opacity: .8; font-variant-numeric: tabular-nums; }
.tx { font-size: 12.5px; color: #8e8e93; padding: 4px 6px 0; max-width: 250px; line-height: 1.4; }

.photo { width: 210px; height: 250px; border-radius: 18px; background-size: cover; background-position: center; }
.placeholder { background: linear-gradient(180deg, #ffd9a8 0%, #ff9a62 45%, #7b6fd8 100%); position: relative; overflow: hidden; }
.placeholder::after { content: ""; position: absolute; inset: 0; background: var(--grain); mix-blend-mode: soft-light; }
.linkcard { width: 250px; border-radius: 18px; overflow: hidden; background: var(--gray-bubble); text-align: left; border: 0; padding: 0; display: block; }
.linkcard .art { height: 120px; position: relative; overflow: hidden; display: grid; place-items: center; background: #f4f3f1; }
.linkcard .art .orb { width: 90px; height: 90px; }
.linkcard .meta { padding: 9px 12px 11px; }
.linkcard .meta b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.linkcard .meta span { font-size: 12.5px; color: #8e8e93; }

.typing { display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--gray-bubble); border-radius: 18px; border-bottom-left-radius: 5px; align-self: flex-start; margin-top: 10px; animation: pop .3s var(--ease) both; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #999; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }

.composer { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px 22px; background: rgba(255,255,255,.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.plus { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--gray-bubble); color: #555; display: grid; place-items: center; transition: transform .3s var(--ease); flex: none; }
.plus.open { transform: rotate(45deg); }
.plus svg { width: 18px; height: 18px; stroke-width: 2.2; }
.field { flex: 1; min-width: 0; display: flex; align-items: center; border: 1px solid #d1d1d6; border-radius: 18px; padding: 2px 3px 2px 13px; min-height: 36px; background: #fff; }
.field input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 16px; padding: 6px 0; background: none; }
.send { width: 29px; height: 29px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; flex: none; animation: popIn .25s var(--ease); }
.sms .send { background: var(--green); }
.send svg { width: 16px; height: 16px; stroke-width: 2.6; }
.send.mic { background: none; color: #8e8e93; }
.send.mic svg { stroke-width: 1.8; width: 19px; height: 19px; }
@keyframes popIn { from { transform: scale(.5); opacity: 0; } }
.rec { flex: 1; display: flex; align-items: center; gap: 10px; border-radius: 18px; background: var(--gray-bubble); padding: 3px 3px 3px 12px; min-height: 36px; min-width: 0; animation: popIn .25s var(--ease); }
.rec .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; flex: none; }
.rec .t { font-variant-numeric: tabular-nums; font-size: 14px; }
.rec .live { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; }
.rec .x { width: 29px; height: 29px; border: 0; background: none; color: #8e8e93; display: grid; place-items: center; }
.attach { position: absolute; left: 10px; bottom: calc(100% - 6px); background: rgba(255,255,255,.98); border: 1px solid var(--line); border-radius: 18px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.14); animation: pop .25s var(--ease); }
.attach button { display: flex; align-items: center; gap: 12px; width: 190px; border: 0; background: none; padding: 10px 12px; border-radius: 12px; font-size: 15.5px; text-align: left; }
.attach button:hover { background: var(--soft); }
.attach button span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.attach svg { width: 16px; height: 16px; }

.empty-thread { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 30px; color: #8e8e93; font-size: 14px; line-height: 1.5; }
.empty-thread .orb { width: 88px; height: 88px; margin-bottom: 16px; }
.empty-thread b { color: #000; font-weight: 600; font-size: 17px; display: block; margin-bottom: 4px; }

/* Banner (iOS notification) */
.banner { position: absolute; top: 50px; left: 10px; right: 10px; z-index: 20; display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; background: rgba(245,245,247,.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-radius: 22px; box-shadow: 0 16px 40px rgba(0,0,0,.16); cursor: pointer; animation: drop .6s var(--ease); }
.banner.out { animation: rise .4s var(--ease) forwards; }
.banner .ic { position: relative; flex: none; }
.banner .ic .orb { width: 38px; height: 38px; }
.banner .ic .app { position: absolute; right: -4px; bottom: -3px; width: 17px; height: 17px; border-radius: 5px; background: var(--green); display: grid; place-items: center; border: 1.5px solid #f5f5f7; }
.banner .ic .app svg { width: 10px; height: 10px; fill: #fff; stroke: none; }
.banner .top { display: flex; justify-content: space-between; font-size: 14px; }
.banner .top b { font-weight: 600; }
.banner .top span { color: #8e8e93; font-size: 12.5px; }
.banner .body { font-size: 14px; line-height: 1.35; margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes drop { from { transform: translateY(-150%); } to { transform: none; } }
@keyframes rise { to { transform: translateY(-150%); } }

/* Call */
.talk { position: absolute; inset: 0; z-index: 30; background: #fff; display: flex; flex-direction: column; align-items: center; padding: 70px 26px 36px; animation: talkIn .5s var(--ease); }
@keyframes talkIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.talk .status { font-size: 12.5px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }
.talk .nm { font-size: 28px; letter-spacing: -0.03em; margin-top: 6px; font-family: Inter, sans-serif; }
.talk .big { position: relative; width: 200px; height: 200px; margin: 40px 0 26px; display: grid; place-items: center; flex: none; }
.talk .big .orb { width: 200px; height: 200px; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.12); animation: ripple 2s var(--ease) infinite; }
.ring:nth-child(2) { animation-delay: .66s; } .ring:nth-child(3) { animation-delay: 1.33s; }
@keyframes ripple { from { transform: scale(1); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }
.talk .line { min-height: 70px; text-align: center; font-size: 17px; line-height: 1.45; color: #2b2a28; max-width: 300px; animation: fadeUp .4s var(--ease); }
.talk .line.you { color: var(--faint); }
.talk .ctrls { margin-top: auto; display: flex; gap: 22px; align-items: center; }
.round { width: 64px; height: 64px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--soft); color: var(--text); transition: transform .25s var(--ease), background .2s; }
.round:active { transform: scale(.92); }
.round.hot { background: var(--ink); color: #fff; }
.round.end { background: var(--red); color: #fff; }
.round svg { width: 24px; height: 24px; }
.talk .type { display: flex; gap: 8px; width: 100%; margin-top: 14px; }
.talk .type input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; outline: none; font-size: 15px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Panel ---------- */
.panel-section { padding: 24px 40px 80px; scroll-margin-top: 70px; }
.panel-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 28px; }
.panel-head h2 { font-size: clamp(36px, 4vw, 56px); font-weight: 400; letter-spacing: -0.04em; line-height: 1.05; margin: 0; }
.panel-head p { font-size: 17px; line-height: 1.55; color: #2b2a28; margin: 0; max-width: 460px; }
.panel { background: var(--panel); border-radius: 32px; padding: 20px; }
.ptabs-wrap { display: flex; justify-content: center; margin-bottom: 20px; }
.ptabs { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #eceae7; border-radius: 999px; padding: 5px; }
.ptabs button { position: relative; z-index: 1; border: 0; background: none; padding: 11px 22px; font-size: 15.5px; color: var(--muted); border-radius: 999px; transition: color .3s; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ptabs button.on { color: var(--text); }
.ptabs button small { font-size: 12px; color: var(--faint); }
.ptabs .knob { position: absolute; top: 5px; bottom: 5px; left: 5px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05); transition: transform .5s var(--ease); width: calc((100% - 10px) / var(--n)); transform: translateX(calc(var(--i) * 100%)); }
.pview { background: #fff; border-radius: 24px; padding: 28px; min-height: 420px; }
.pview.enter { animation: fadeUp .45s var(--ease); }
.pgrid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.side-card { border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.side-card + .side-card { margin-top: 12px; }
.side-card h4 { margin: 0 0 12px; font-weight: 500; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.side-card h4 small { color: var(--faint); font-weight: 400; font-size: 13px; }
.fact { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 14px; line-height: 1.45; color: #33312e; border-top: 1px solid var(--line); }
.fact:first-of-type { border-top: 0; padding-top: 0; }
.fact button { margin-left: auto; border: 0; background: none; color: var(--faint); padding: 2px; opacity: .4; transition: opacity .2s; }
.fact:hover button { opacity: 1; }
.fact button svg { width: 14px; height: 14px; }
.fact.new { animation: flash 1.6s var(--ease); }
@keyframes flash { 0% { background: #fff5d6; } 100% { background: transparent; } }
.side-card .mini-commit { font-size: 14px; padding: 8px 0; border-top: 1px solid var(--line); line-height: 1.4; }
.side-card .mini-commit:first-of-type { border-top: 0; padding-top: 0; }
.side-card .mini-commit small { display: block; color: var(--faint); font-size: 12.5px; margin-top: 2px; }

/* Journal feed */
.feed-day { font-size: 12.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 22px 0 6px; }
.feed-day:first-child { margin-top: 0; }
.entry { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; padding: 14px 8px; margin: 0 -8px; border-top: 1px solid var(--line); animation: fadeUp .45s var(--ease) both; border-radius: 12px; }
.feed-day + .entry { border-top: 0; }
.entry.new { animation: fadeUp .45s var(--ease) both, flash 2.2s var(--ease); }
.entry .ico { width: 38px; height: 38px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; color: var(--muted); }
.entry .ico svg { width: 17px; height: 17px; }
.entry .ttl { font-weight: 500; font-size: 15.5px; letter-spacing: -0.01em; }
.entry p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; color: #3a3834; }
.entry .reply { margin-top: 8px; font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.entry .reply .orb { width: 16px; height: 16px; }
.entry .when { font-size: 12.5px; color: var(--faint); text-align: right; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 8px; margin-right: 12px; }
.tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.entry .voice, .card-a .voice { background: var(--soft); margin-top: 8px; max-width: 320px; }
.entry .thumb { width: 180px; height: 120px; border-radius: 12px; margin-top: 8px; background-size: cover; background-position: center; }

/* Archive */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters + .filters { margin-top: 10px; }
.masonry { columns: 3 260px; column-gap: 14px; margin-top: 22px; }
.card-a { break-inside: avoid; border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 14px; background: #fff; animation: fadeUp .45s var(--ease) both; transition: transform .25s var(--ease), box-shadow .25s; }
.card-a:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.05); }
.card-a .top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--faint); }
.card-a .top span { display: inline-flex; gap: 6px; align-items: center; }
.card-a .top svg { width: 13px; height: 13px; }
.card-a .ttl { font-weight: 500; font-size: 16px; letter-spacing: -0.01em; margin: 10px 0 4px; }
.card-a p { margin: 0; font-size: 14px; line-height: 1.5; color: #3a3834; }
.card-a .thumb { height: 160px; border-radius: 12px; margin: 10px 0 4px; background-size: cover; background-position: center; }
.card-a .src { font-size: 12.5px; color: var(--faint); margin-bottom: 8px; }
.empty { text-align: center; color: var(--faint); font-size: 15px; padding: 60px 10px; line-height: 1.6; }

/* Commitments */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.col h4 { margin: 0 0 12px; font-weight: 500; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.col h4 small { color: var(--faint); font-weight: 400; }
.col h4 i { width: 8px; height: 8px; border-radius: 50%; }
.col .none { color: var(--faint); font-size: 14px; border: 1px dashed var(--line); border-radius: 18px; padding: 16px; line-height: 1.5; }
.commit { border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; background: #fff; animation: fadeUp .45s var(--ease) both; }
.commit + .commit { margin-top: 10px; }
.commit.new { animation: fadeUp .45s var(--ease) both, flash 2.2s var(--ease); }
.commit .what { font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.35; }
.commit .meta { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.commit .acts { display: flex; gap: 8px; margin-top: 12px; }
.commit.done .what { color: var(--muted); }

/* Your Cadence */
.cad-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; }
.carousel { position: relative; height: 260px; touch-action: pan-y; user-select: none; overflow: hidden; background: var(--panel); border-radius: 24px; clip-path: inset(0 round 24px); }
.slide { position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; border: 0; padding: 0; background: none; border-radius: 50%; transform: translate(calc(-50% + var(--o) * 165px), -50%) scale(var(--s, 1)); opacity: var(--op, 1); transition: transform .7s var(--ease), opacity .7s var(--ease); }
.slide .orb { width: 100%; height: 100%; }
.slide.center::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid rgba(0,0,0,.07); }
.play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 0; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.12); transition: transform .25s var(--ease), opacity .4s; z-index: 2; }
.play:hover { transform: scale(1.06); }
.play svg { width: 18px; height: 18px; fill: #000; stroke: none; }
.slide:not(.center) .play { opacity: 0; pointer-events: none; }
.arrows { display: flex; justify-content: space-between; position: absolute; left: 14px; right: 14px; top: 50%; translate: 0 -50%; pointer-events: none; z-index: 3; }
.arrow { pointer-events: auto; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.06); display: grid; place-items: center; color: var(--muted); transition: color .2s, transform .2s, opacity .2s; }
.arrow:hover { color: var(--text); transform: scale(1.08); }
.arrow:disabled { opacity: .3; }
.cad-info { text-align: center; margin-top: 16px; min-height: 80px; }
.cad-info .name { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.cad-info .tone { font-size: 12.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.cad-info .desc { color: var(--muted); font-size: 15px; line-height: 1.45; margin-top: 8px; }
.fade-in { animation: fadeUp .5s var(--ease) both; }
.label { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.block { margin-bottom: 24px; }
.how-line { font-size: 16px; line-height: 1.55; color: #2b2a28; margin: 0 0 14px; }
.how-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; }
.how-row b { font-weight: 500; }
.how-row span { color: var(--muted); }
.how-sample { background: var(--panel); border-radius: 18px; padding: 16px; margin-top: 12px; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, sans-serif; }
.how-sample .b { display: inline-block; background: var(--gray-bubble); border-radius: 18px; border-bottom-left-radius: 5px; max-width: 85%; }
.persona-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.persona-line { color: var(--muted); font-size: 14px; margin: 10px 0 0; min-height: 20px; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.setting small { display: block; color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.time-in { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: #fff; font-size: 14px; }
.switch { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: #e6e4e0; position: relative; flex: none; cursor: pointer; transition: background .3s var(--ease); margin: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: transform .35s var(--ease); }
.switch:checked { background: var(--ink); }
.switch:checked::after { transform: translateX(18px); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; padding: 0 16px 40px; }
  .intro { padding-top: 12px; }
  .stage { min-height: 0; padding: 24px 12px; }
  .nav { padding: 14px 16px; grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .panel-section { padding: 16px 16px 60px; }
  .panel-head { grid-template-columns: 1fr; gap: 12px; }
  .pgrid, .cad-grid { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ptabs-wrap { margin-bottom: 12px; }
  .ptabs { width: 100%; }
  .ptabs button { padding: 10px 6px; font-size: 14px; }
  .ptabs button small { display: none; }
  .pview { padding: 16px; border-radius: 20px; min-height: 0; }
  .panel { padding: 8px; border-radius: 26px; }
  .entry { grid-template-columns: 32px 1fr; }
  .entry .when { grid-column: 2; text-align: left; order: -1; }
  /* Your Cadence: one column that fits, settings that wrap instead of squeezing */
  .cad-grid { gap: 24px; }
  .carousel { height: 220px; }
  .slide { width: 140px; height: 140px; transform: translate(calc(-50% + var(--o) * 130px), -50%) scale(var(--s, 1)); }
  .how-row { grid-template-columns: 96px 1fr; }
  .setting { flex-wrap: wrap; }
  .setting > span:first-child { flex: 1 1 180px; }
  .coins { flex-direction: row; align-items: center; }
  .dash { padding-top: 16px; }
  .login { min-height: calc(100svh - 70px); align-items: start; padding-top: 8svh; }
  .login-title { font-size: 38px; }
  /* iPhones zoom into any text box under 16px; keep them all at 16 */
  input, select, textarea, .search input, .thought-form input, .time-in, .talk .type input { font-size: 16px; }
}
/* Grid children otherwise grow to fit their widest content and spill off small screens */
.cad-grid > *, .pgrid > *, .kanban > * { min-width: 0; }
/* Hover lifts stick after a tap on touch screens */
@media (hover: none) {
  .card-a:hover, .tab-card:hover, .subject-card:hover, .pill:hover, .linked-entry:hover, .back:hover { transform: none; }
  .fact button, .mc-acts { opacity: 1; }
}
@media (max-width: 520px) {
  .nav { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  .wordmark { font-size: 18px; gap: 8px; }
  .nav .pill.sm { padding: 8px 14px; font-size: 13px; }
  .panel-section, .hero { scroll-margin-top: 64px; }
  .slide.center::before { inset: -5px; }
  .arrows { left: 8px; right: 8px; }
  .arrow { width: 32px; height: 32px; }
  .phone { height: min(620px, 74svh); }
  .demo .row { gap: 6px; }
  .nav-right { gap: 8px; }
  .engine, .nav-right [data-act="wipe"], .text-number { display: none; }
  .hero { gap: 24px; padding-bottom: 28px; }
  .intro { padding-top: 8px; }
  h1 { font-size: 44px; margin-bottom: 16px; }
  .lede { font-size: 16.5px; margin-bottom: 20px; }
  .number-card { grid-template-columns: 1fr; padding: 16px; border-radius: 20px; }
  .number-card .num { font-size: 30px; }
  .demo { padding: 16px; border-radius: 20px; }
  .stage { padding: 16px 10px; border-radius: 28px; }
  .drift-a { width: 140px; height: 140px; }
  .drift-b { width: 100px; height: 100px; }
  .drift-c { width: 170px; height: 170px; }
  .phone { width: 100%; height: min(680px, 80svh); min-height: 520px; border-radius: 40px; }
  .statusbar { padding: 0 24px; }
  .panel-head h2 { font-size: 34px; }
  .panel-head p { font-size: 16px; }
}

/* ---------- Web journal: login ---------- */
.text-number { font-size: 14px; color: var(--muted); }
.text-number b { color: var(--text); font-weight: 500; }
.login { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: 24px 16px 60px; }
.login-card { width: 100%; max-width: 420px; text-align: center; animation: fadeUp .6s var(--ease); }
.login-orb { display: grid; place-items: center; margin-bottom: 26px; }
.login-orb .orb { width: 120px; height: 120px; }
.login-title { font-size: 44px; margin: 0 0 10px; }
.login-sub { color: var(--muted); font-size: 16px; line-height: 1.5; margin: 0 0 26px; }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form input { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 15px 20px; font-size: 18px; text-align: center; outline: none; transition: border-color .2s; letter-spacing: .02em; }
.login-form input:focus { border-color: var(--ink); }
.login-form .pill { justify-content: center; padding: 15px; font-size: 16px; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 14px; padding: 8px; }
.link-btn:hover { color: var(--text); }
.login-error { color: #c0392b; font-size: 14.5px; line-height: 1.5; min-height: 22px; margin: 14px 0 0; }
.login-tip { color: var(--faint); font-size: 14px; margin-top: 26px; }
.login-tip b { color: var(--muted); font-weight: 500; }
.dash { padding-top: 32px; }
.pill.danger { color: #c0392b; }
a.pill { text-decoration: none; }

/* ---------- Shared: expanding sections (pages, weeks, library items) ---------- */
.page-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.page-inner { overflow: hidden; min-height: 0; opacity: 0; transform: translateY(-6px); transition: opacity .35s var(--ease), transform .45s var(--ease); }
.open > .page-body { grid-template-rows: 1fr; }
.open > .page-body > .page-inner { opacity: 1; transform: none; }
.page-sheet .page-body { grid-template-rows: 1fr; }
.page-sheet .page-inner { opacity: 1; transform: none; }
.page-label { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 22px 0 10px; }
.muted-note { color: var(--faint); font-size: 14px; line-height: 1.5; margin: 0; }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 14px; }
.sec-head h3 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.sec-head small { color: var(--faint); font-size: 13.5px; }
.sec-head:not(:first-child) { margin-top: 34px; }
::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }

/* ---------- Journal pages ---------- */
.writing { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14.5px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 16px; margin-bottom: 18px; animation: fadeUp .4s var(--ease); }
.writing .orb { width: 26px; height: 26px; animation: speak .6s ease-in-out infinite alternate; }
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.subject-card { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 6px; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; animation: fadeUp .5s var(--ease) both; }
.subject-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.06); }
.subject-card.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.subject-card b { font-weight: 500; font-size: 17px; letter-spacing: -0.015em; }
.subject-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sc-top { display: flex; align-items: center; gap: 8px; }
.sc-top small { color: var(--faint); font-size: 12px; }
.sc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: .7; }
.page-sheet { margin-top: 14px; border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; background: #fff; animation: fadeUp .45s var(--ease); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; }
.sheet-head small { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.sheet-head h4 { margin: 4px 0 0; font-size: 26px; font-weight: 400; letter-spacing: -0.03em; }
.page-summary { font-size: 16.5px; line-height: 1.65; color: #24231f; margin: 14px 0 0; max-width: 680px; }
.quotes { display: grid; gap: 8px; margin-top: 16px; }
.quotes blockquote, blockquote.thought { margin: 0; padding: 10px 14px; border-left: 2px solid var(--c, #cfcbc5); background: var(--soft); border-radius: 0 12px 12px 0; font-size: 15px; line-height: 1.5; color: #33312e; }
.timeline { margin-top: 18px; display: grid; gap: 0; border-left: 1px solid var(--line); margin-left: 4px; }
.tl-row { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 6px 0 6px 16px; position: relative; font-size: 14px; }
.tl-row::before { content: ""; position: absolute; left: -4px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: #fff; border: 1.5px solid var(--muted); }
.tl-row span { color: var(--faint); }
.tl-row b { font-weight: 400; color: #33312e; }
.page-commit { display: flex; align-items: center; gap: 8px; font-size: 14.5px; padding: 4px 0; }
.page-commit svg { width: 15px; height: 15px; }
.page-commit.kept svg { color: #1f9b45; }
.page-commit.let_go { color: var(--faint); }
.dot-open { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--blue); margin: 0 4px; }
.sources { display: grid; gap: 10px; }
.src-entry { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.src-entry p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; color: #33312e; }
.src-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); }
.src-meta svg { width: 13px; height: 13px; }
.src-entry .voice { background: var(--soft); margin-top: 8px; max-width: 340px; }
.src-entry .thumb { width: 200px; height: 130px; border-radius: 12px; margin-top: 8px; background-size: cover; background-position: center; }
.tx-fold { margin-top: 6px; }
.tx-fold summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; }
.tx-fold summary::-webkit-details-marker { display: none; }
.tx-fold summary::before { content: "▸ "; }
.tx-fold[open] summary::before { content: "▾ "; }
.week-list { display: grid; gap: 8px; }
.week { border: 1px solid var(--line); border-radius: 18px; background: #fff; animation: fadeUp .5s var(--ease) both; transition: box-shadow .3s, border-color .3s; }
.week.open { border-color: #d6d2cc; box-shadow: 0 10px 28px rgba(0,0,0,.05); }
.week-head { width: 100%; display: grid; grid-template-columns: 120px 1fr 24px; gap: 16px; align-items: center; text-align: left; border: 0; background: none; padding: 16px 18px; }
.wk-date { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.wk-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wk-main b { font-weight: 500; font-size: 16px; letter-spacing: -0.01em; }
.wk-main span { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s; }
.week.open .wk-main span { opacity: 0; }
.wk-chev { color: var(--faint); display: grid; place-items: center; transition: transform .4s var(--ease); }
.wk-chev svg { width: 18px; height: 18px; }
.open > button .wk-chev { transform: rotate(90deg); }
.week .page-inner { padding: 0 18px; }
.week.open .page-inner { padding-bottom: 20px; }
.week .page-summary { margin-top: 0; }
.mini-commit { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mc-acts { display: flex; gap: 2px; opacity: .35; transition: opacity .2s; }
.mini-commit:hover .mc-acts { opacity: 1; }
.mc-acts button { border: 0; background: none; color: var(--muted); padding: 3px; border-radius: 6px; display: grid; place-items: center; }
.mc-acts button:hover { background: var(--soft); color: var(--text); }
.mc-acts svg { width: 14px; height: 14px; }

/* ---------- Archive: library as Safari-style tabs ---------- */
.lib-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.search { flex: 1; min-width: 220px; max-width: 460px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--soft); border-radius: 999px; padding: 0 16px; height: 44px; transition: border-color .2s, background .2s, box-shadow .2s; }
.search:focus-within { background: #fff; border-color: #cfcbc5; box-shadow: 0 0 0 4px rgba(0,0,0,.03); }
.search svg { width: 17px; height: 17px; color: var(--faint); }
.search input { flex: 1; border: 0; background: none; outline: none; font-size: 15px; min-width: 0; }
.search input::-webkit-search-cancel-button { opacity: .5; }
.tab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.tab-card { min-width: 0; text-align: left; border: 0; padding: 0; background: none; display: flex; flex-direction: column; border-radius: 20px; animation: fadeUp .5s var(--ease) both; transition: transform .35s var(--ease), filter .35s; }
.tab-card:hover { transform: translateY(-3px) scale(1.01); }
.tab-card:active { transform: scale(.99); }
.tab-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: color-mix(in srgb, var(--c) 16%, #fff); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); border-bottom: 0; border-radius: 16px 16px 0 0; }
.tab-bar b { font-weight: 500; font-size: 14.5px; }
.tab-bar small { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tab-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.tab-page { background: #fff; border: 1px solid var(--line); border-top: 0; padding: 12px 14px 10px; min-height: 132px; display: flex; flex-direction: column; gap: 9px; box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 12px 24px -16px rgba(0,0,0,.18); transition: box-shadow .35s; }
.tab-card:hover .tab-page { box-shadow: 0 20px 40px -18px rgba(0,0,0,.25); }
.tp-row { display: flex; align-items: center; gap: 9px; font-size: 14px; color: #33312e; white-space: nowrap; overflow: hidden; }
.tp-row span:last-child { overflow: hidden; text-overflow: ellipsis; }
.tp-empty { color: var(--faint); font-size: 13.5px; margin: auto; }
.tab-foot { background: #fff; border: 1px solid var(--line); border-top: 1px dashed var(--line); border-radius: 0 0 16px 16px; padding: 9px 14px 11px; font-size: 12.5px; color: var(--muted); font-style: italic; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.tab-card.is-empty { opacity: .7; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.status-dot.queue { border: 1.5px solid var(--c, var(--muted)); }
.status-dot.reviewed { background: var(--c, var(--muted)); }
.folder-view { animation: fadeUp .4s var(--ease); }
.folder-head { padding: 4px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.back { border: 0; background: none; display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 14px; padding: 4px 8px 4px 0; transition: color .2s, transform .2s var(--ease); }
.back:hover { color: var(--text); transform: translateX(-2px); }
.back svg { width: 16px; height: 16px; }
.folder-head h3 { display: flex; align-items: center; gap: 12px; font-size: 32px; font-weight: 400; letter-spacing: -0.035em; margin: 8px 0 6px; }
.folder-head h3 .tab-dot { width: 12px; height: 12px; }
.taste { margin: 0; color: var(--muted); font-size: 15.5px; font-style: italic; max-width: 640px; line-height: 1.5; }
.feed { display: grid; gap: 8px; }
.item { border: 1px solid var(--line); border-radius: 16px; background: #fff; animation: fadeUp .45s var(--ease) both; transition: box-shadow .3s, border-color .3s; }
.item.open { border-color: #d6d2cc; box-shadow: 0 10px 28px rgba(0,0,0,.05); }
.item.new { animation: fadeUp .45s var(--ease) both, flash 2.2s var(--ease); }
.item-head { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 0; background: none; padding: 14px 16px; }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-main b { font-weight: 500; font-size: 15.5px; letter-spacing: -0.01em; }
.item-main span { color: var(--faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-sm { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.chip-sm.q { background: transparent; border: 1px solid var(--line); }
.chip-sm.v-loved { background: #ffe9ef; color: #c2185b; }
.chip-sm.v-liked { background: #e8f3ff; color: #1565c0; }
.chip-sm.v-mixed { background: #fff4e0; color: #a86400; }
.chip-sm.v-disliked { background: #f1f1f1; color: #666; }
.item-body { padding: 0 16px 0 36px; }
.item.open .item-body { padding-bottom: 16px; }
.overview { margin: 0; font-size: 15px; line-height: 1.55; color: #33312e; }
.why-box { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; background: var(--panel); border-radius: 12px; font-size: 14px; line-height: 1.5; color: #33312e; }
.why-box .orb, .cad-note .orb { width: 18px; height: 18px; margin-top: 2px; }
.why-box small { display: block; font-size: 11.5px; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 2px; }
blockquote.thought { margin-bottom: 8px; border-left-color: var(--c); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
blockquote.thought svg { width: 13px; height: 13px; color: var(--faint); }
blockquote.thought small { margin-left: auto; color: var(--faint); font-size: 12px; }
.cad-note { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.thought-form { display: flex; gap: 8px; margin-top: 12px; }
.thought-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font-size: 14.5px; outline: none; transition: border-color .2s; }
.thought-form input:focus { border-color: #cfcbc5; }
.item-acts { display: flex; align-items: center; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.item-acts .link-btn { padding: 6px 8px; font-size: 13px; }
.item-acts .added { margin-left: auto; font-size: 12px; color: var(--faint); }

/* Archive records: a filing cabinet, not a to-do list */
.lib-count { font-size: 13px; color: var(--faint); }
.feed { grid-template-columns: minmax(0, 1fr); }
.item, .page-body > .page-inner { min-width: 0; }
.rec-glyph { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 70%, #000); }
.rec-glyph svg { width: 17px; height: 17px; }
.item.record .thumb-sm { width: 38px; height: 38px; border-radius: 10px; }
.unopened { width: 8px; height: 8px; border-radius: 50%; flex: none; border: 1.5px solid var(--c, var(--muted)); }
.rec-date { font-size: 12.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.item.record .item-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.record .item-body { padding-left: 66px; }
.kept-text { margin: 0 0 8px; padding: 2px 0 2px 14px; border-left: 2px solid var(--c); font-size: 16.5px; line-height: 1.55; color: var(--text); }
.rec-meta { margin: 0; font-size: 13px; color: var(--faint); }
.rec-timeline { display: grid; gap: 0; border-left: 1px solid var(--line); margin-left: 4px; }
.rt-row { position: relative; display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 6px 0 6px 16px; }
.rt-row::before { content: ""; position: absolute; left: -4px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: #fff; border: 1.5px solid var(--c, var(--muted)); }
.rt-row span { font-size: 12.5px; color: var(--faint); padding-top: 2px; }
.rt-row p { margin: 0; font-size: 15px; line-height: 1.5; color: #33312e; }
.rt-row p svg { width: 13px; height: 13px; color: var(--faint); margin-right: 6px; vertical-align: -1px; }
.folder-head h3 small { font-size: 15px; color: var(--faint); letter-spacing: 0; }
.tidy-note { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.tidy-note .orb { width: 16px; height: 16px; }
.tp-mark { width: 6px; height: 6px; border-radius: 50%; background: var(--c); opacity: .7; flex: none; }
.tp-mark.unopened { background: none; border: 1.5px solid var(--c); opacity: 1; width: 7px; height: 7px; }
.tp-row.kept span:last-child { color: #3a3834; }
.tab-ghost { min-height: 180px; border: 1.5px dashed var(--line); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; text-align: center; color: var(--faint); font-size: 13.5px; line-height: 1.5; }
.tab-ghost span { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; }
.tab-ghost svg { width: 16px; height: 16px; }
.archive-empty { text-align: center; padding: 48px 16px 56px; max-width: 460px; margin: 0 auto; }
.archive-empty b { display: block; font-weight: 500; font-size: 20px; letter-spacing: -0.02em; margin: 22px 0 8px; }
.archive-empty p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.ghost-tabs { display: flex; justify-content: center; gap: 6px; }
.ghost-tabs span { padding: 8px 14px; border: 1.5px dashed var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; font-size: 13px; color: var(--faint); animation: fadeUp .6s var(--ease) both; }
.ghost-tabs span:nth-child(2) { animation-delay: .1s; } .ghost-tabs span:nth-child(3) { animation-delay: .2s; } .ghost-tabs span:nth-child(4) { animation-delay: .3s; }

@media (max-width: 640px) {
  .item.record .item-body { padding-left: 12px; }
  .item.record .wk-chev { display: none; }
  .rt-row { grid-template-columns: 1fr; gap: 2px; }
  .tab-ghost { min-height: 0; grid-column: 1 / -1; flex-direction: row; text-align: left; padding: 14px; }
  .lib-count { display: none; }
  .week-head { grid-template-columns: 1fr 20px; }
  .wk-date { grid-column: 1 / -1; }
  .item-body { padding-left: 16px; }
  .tab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tab-page { min-height: 96px; padding: 10px 12px; }
  .tab-bar { padding: 9px 12px; }
  .tab-bar small, .tab-foot { display: none; }
  .tab-page { border-radius: 0 0 16px 16px; border-bottom: 1px solid var(--line); }
  .item-head { padding: 12px; gap: 10px; }
}

/* Style notes: what Cadence learned about how you like to be talked to */
.style-notes { margin-top: 8px; }
.note-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; font-size: 14.5px; line-height: 1.45; background: #fff; }
.note-row.new { animation: flash 2s var(--ease); }
.note-row button { margin-left: auto; border: 0; background: none; color: var(--faint); padding: 2px; display: grid; place-items: center; }
.note-row button:hover { color: var(--text); }
.note-row svg { width: 14px; height: 14px; }

/* Link thumbnails */
.thumb-sm { width: 56px; height: 38px; border-radius: 8px; background: var(--soft) center / cover; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
.hero-link { display: block; position: relative; margin: 2px 0 12px; border-radius: 14px; overflow: hidden; max-width: 420px; text-decoration: none; }
.hero-img { display: block; aspect-ratio: 16 / 9; background: var(--soft) center / cover; transition: transform .6s var(--ease); }
.hero-link:hover .hero-img { transform: scale(1.03); }
.hero-cap { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); font-size: 12.5px; color: var(--text); }
.hero-cap svg { width: 13px; height: 13px; }
.open-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; color: var(--text); text-decoration: none; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; transition: border-color .2s, background .2s; }
.open-link:hover { border-color: #cfcbc5; background: var(--soft); }
.open-link svg { width: 14px; height: 14px; }
.tp-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: -2px 0 2px; }
.tp-thumbs span { aspect-ratio: 16 / 10; border-radius: 6px; background: var(--soft) center / cover; }
.linkcard .art.has-img { background-size: cover; background-position: center; }

/* ---------- Journal entries: the same cards, type and greys as the rest of the panel ---------- */
.journal-book { display: grid; gap: 8px; }
.entry-page { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; animation: fadeUp .5s var(--ease) both; transition: box-shadow .3s, border-color .3s; }
.entry-page:hover { border-color: #d6d2cc; }
.entry-page.open { border-color: #d6d2cc; box-shadow: 0 10px 28px rgba(0,0,0,.05); }
.ep-head { width: 100%; text-align: left; border: 0; background: none; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.ep-date { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ep-date i { font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; }
.ep-date em { font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); background: var(--soft); padding: 2px 8px; border-radius: 999px; }
.ep-date em svg { width: 11px; height: 11px; }
.ep-title { font-size: 17px; font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; color: var(--text); }
.ep-preview { font-size: 14.5px; line-height: 1.5; color: var(--muted); transition: opacity .3s, max-height .4s var(--ease); max-height: 66px; overflow: hidden; }
.entry-page.open .ep-preview { opacity: 0; max-height: 0; }
.entry-page .page-inner { padding: 0 18px; }
.entry-page.open .page-inner { padding-bottom: 20px; }
.ep-body { font-size: 16px; line-height: 1.7; color: #2b2a28; max-width: 640px; }
.ep-body p { margin: 0 0 1em; }
.ep-body p:last-child { margin-bottom: 0; }
.ep-voice { margin-bottom: 16px; }
.ep-voice small { display: block; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.ep-voice .voice { background: var(--soft); max-width: 360px; }
.ep-photos { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ep-photos span { width: 160px; height: 120px; border-radius: 12px; background: var(--soft) center / cover; }
.ep-subs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.ep-subs .chip { font-size: 12.5px; }
.originals { margin-top: 14px; }
.originals summary { font-size: 13px; color: var(--muted); }
.orig-list { display: grid; gap: 6px; margin-top: 10px; padding: 12px; background: var(--soft); border-radius: 12px; }
.orig { font-size: 13.5px; line-height: 1.45; color: #3a3834; }
.orig span { display: inline-block; min-width: 64px; font-size: 11.5px; color: var(--faint); }
.linked { display: grid; gap: 6px; }
.linked-entry { display: grid; grid-template-columns: 64px 1fr 18px; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; transition: transform .25s var(--ease), border-color .2s; }
.linked-entry:hover { transform: translateX(2px); border-color: #d6d2cc; }
.linked-entry span { font-size: 12.5px; color: var(--faint); }
.linked-entry b { font-weight: 500; font-size: 15px; }
.linked-entry svg { width: 15px; height: 15px; color: var(--faint); }
@media (max-width: 640px) {
  .ep-head { padding: 14px; }
  .entry-page .page-inner { padding: 0 14px; }
  .ep-body { font-size: 15.5px; }
}

/* Pay-phone call meter */
.coin-row { align-items: flex-start; }
.coin-bar { display: block; height: 6px; border-radius: 3px; background: var(--soft); margin-top: 10px; max-width: 260px; overflow: hidden; }
.coin-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #e3c88f, #ff7a2f); transition: width .6s var(--ease); }
.coins { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 22px; letter-spacing: -0.02em; white-space: nowrap; }
.coins small { font-size: 12.5px; color: var(--faint); }
.coins .pill { font-size: 12.5px; }
