:root {
  /* Dark charcoal and gold, matching the Rayden dashboard */
  --navy: #0b0c0f; --navy-2: #d9b866; --ink: #ece8df; --ivory: #121418; --paper: #181b21;
  --gold: #c8a04a; --orange: #c8a04a; --line: #2a2e37; --muted: #9a9fa9; --red: #c62828;
  --field: #1f232b; --bubble: #262a33; --on-gold: #14161a;
  color-scheme: dark;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow-x: hidden; }
body { font: 16px/1.5 var(--sans); color: var(--ink); background: var(--navy); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--navy-2); }
[hidden] { display: none !important; }

/* Splash */
#splash { position: fixed; inset: 0; z-index: 50; background: var(--navy); color: #fff; display: grid; place-content: center; justify-items: center; gap: 14px; transition: opacity .25s; }
#googleWrap { margin-top: 12px; } #googleBtn { display: flex; justify-content: center; min-height: 44px; }
.or { color: #9aa3b8; font-size: 13px; margin: 2px 0 10px; }
#splash b { font: 600 28px var(--serif); letter-spacing: .04em; }
#splash.out { opacity: 0; pointer-events: none; }

/* Sign in */
#auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; color: #fff; }
.auth-card { width: min(100%, 360px); text-align: center; }
.auth-card h1 { font: 600 30px var(--serif); margin: 12px 0 6px; }
.auth-card .lead { color: #c9cfdd; margin: 0 0 20px; }
.field { display: block; text-align: left; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; color: #c9cfdd; margin-bottom: 4px; }
.field input, .code { width: 100%; height: 50px; padding: 0 14px; font: inherit; border-radius: 12px; border: 1px solid var(--gold); background: var(--field); color: var(--ink); outline: none; }
.code { text-align: center; font-size: 24px; letter-spacing: .4em; margin-bottom: 4px; }
.check { display: flex; gap: 10px; text-align: left; font-size: 14px; color: #dfe3ec; margin: 4px 0 14px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--orange); flex: none; }
.check a { color: var(--gold); }
.primary { width: 100%; min-height: 50px; border-radius: 12px; background: var(--gold); color: var(--on-gold); font-weight: 700; padding: 0 16px; }
.primary:disabled { opacity: .6; }
.fine { font-size: 13px; color: #9aa3b8; margin: 10px 0 0; }
.msg { min-height: 1.5em; color: #ffc9a8; font-size: 14px; margin: 10px 0 0; }
.auth-card .link { display: block; margin: 12px auto 0; color: var(--gold); text-decoration: underline; font-size: 14px; padding: 6px; }

/* App shell */
#app { height: 100dvh; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; background: var(--ivory); overflow: hidden; }
.bar { border-bottom-color: var(--line) !important; display: flex; align-items: center; gap: 6px; padding: calc(env(safe-area-inset-top) + 6px) 8px 6px; background: var(--navy); color: #fff; border-bottom: 2px solid var(--gold); transition: background .3s; }
.brand { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand img { border-radius: 50%; display: block; flex: none; }
.brand strong { font: 600 19px/1 var(--serif); letter-spacing: .02em; }
.icon-btn { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #fff; }
.icon-btn:active { background: rgba(255,255,255,.12); }
.icon-btn.dark { color: var(--ink); font-size: 26px; }
.icon-btn.soft { color: var(--navy-2); }
.icon-btn.soft:active, .icon-btn.dark:active { background: rgba(0,0,0,.06); }
.icon-btn.on { background: var(--red); color: #fff; animation: pulse 1.2s infinite; }
.dot { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); border: 2px solid var(--navy); }
.pill { flex: none; max-width: 42vw; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(200,160,74,.6); color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Alarm: a reminder is waiting */
body.alarm .bar { background: var(--red); border-color: #ff8a80; }
body.alarm { background: var(--red); }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; font-size: 14px; border-bottom: 1px solid var(--line); background: #221e14; }
.banner p { flex: 1 1 200px; margin: 0; }
.banner.red { background: var(--red); color: #fff; border-color: #a31515; }
.banner.red p b { display: block; font-size: 16px; }
.banner button { font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 999px; background: var(--field); color: var(--ink); border: 1px solid var(--line); }
.banner.red button { border-color: transparent; }
.banner button.x { background: none; border: 0; font-size: 20px; padding: 2px 6px; }

/* Thread */
#thread { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; }
.msg-u, .msg-b, .msg-e { max-width: 88%; padding: 10px 14px; border-radius: 18px; overflow-wrap: anywhere; }
.msg-u { align-self: flex-end; background: var(--bubble); color: var(--ink); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.msg-u .file { display: block; font-size: 13px; opacity: .8; margin-bottom: 4px; }
.msg-u .file::before { content: "Attached: "; }
.msg-b { align-self: stretch; max-width: 100%; background: none; border: 0; padding: 4px 2px; }
.msg-e { align-self: center; background: #2a1714; border: 1px solid #5a2a22; color: #f3b5a5; font-size: 14px; text-align: center; }
.msg-e button { display: block; margin: 8px auto 0; font-weight: 700; text-decoration: underline; }
.searching { font-size: 13px; color: var(--muted); font-style: italic; margin-bottom: 6px; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .7em; }
.md h2 { font: 600 20px/1.25 var(--serif); margin: .9em 0 .35em; }
.md h3 { font: 700 13px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--navy-2); margin: 1.1em 0 .35em; }
.md h4 { font: 600 15px/1.3 var(--sans); margin: .9em 0 .25em; }
.md ul, .md ol { margin: 0 0 .7em; padding-left: 1.25em; }
.md li { margin: .15em 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: .9em 0; }
.md code { font: 14px ui-monospace, Menlo, monospace; background: var(--bubble); padding: 1px 5px; border-radius: 5px; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.acts button, .task button { font-size: 13px; font-weight: 600; color: var(--navy-2); padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); }
.acts button:active { background: var(--ivory); }
.task { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--ivory); border: 1px solid var(--gold); }
.task .what { font-weight: 700; }
.task .when { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.task button.do { background: var(--gold); color: var(--on-gold); border-color: var(--orange); }
.task .state { font-size: 14px; font-weight: 700; color: var(--navy-2); }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i, .wave i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: bob 1s infinite ease-in-out; }
.typing i:nth-child(2), .wave i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3), .wave i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(198,40,40,.25); } }

.hello { margin: auto 0; padding: 8px 4px 16px; text-align: center; }
.hello img { width: 104px; height: 104px; border-radius: 50%; }
.hello h1 { font: 600 25px/1.2 var(--serif); margin: 12px 0 4px; }
.hello p { margin: 0 auto 16px; color: var(--muted); max-width: 32ch; }
.starters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.starters button { padding: 12px 13px; min-height: 52px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--gold); font-weight: 600; font-size: 15px; line-height: 1.25; }
.starters button:active { background: var(--field); border-color: var(--gold); }

/* Composer */
.composer { padding: 6px 8px calc(env(safe-area-inset-bottom) + 8px); background: var(--paper); border-top: 1px solid var(--line); }
.composer .row { display: flex; align-items: flex-end; gap: 4px; }
.tools { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 2px 6px; }
.tools::-webkit-scrollbar { display: none; }
.chip, .styles button { flex: none; font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); color: var(--navy-2); white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.chip.ghost { border-style: dashed; }
.styles { display: flex; gap: 6px; }
.styles button:active { background: var(--ivory); }
#input { flex: 1; min-width: 0; resize: none; max-height: 140px; min-height: 44px; font: inherit; color: inherit; line-height: 1.4; padding: 10px 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--field); outline: none; }
#input:focus { border-color: var(--gold); }
.send { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--on-gold); }
.send:disabled { opacity: .45; }
.att-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin: 0 0 6px; padding: 5px 6px 5px 12px; background: var(--ivory); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.att-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-chip button { width: 24px; height: 24px; border-radius: 50%; font-size: 18px; line-height: 1; }
.voice-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 6px 8px 6px 12px; border-radius: 12px; background: var(--navy); color: #fff; font-size: 14px; }
.voice-bar #voiceLabel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-bar button { font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.14); }
.wave { display: inline-flex; gap: 3px; }

/* Drawer and sheets */
#scrim { position: fixed; inset: 0; background: rgba(8,14,30,.5); z-index: 10; }
#drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 11; width: min(86vw, 330px); background: var(--paper); display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 6px) 0 calc(env(safe-area-inset-bottom) + 8px); box-shadow: 8px 0 30px rgba(0,0,0,.25); }
.drawer-head, .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 6px 16px; }
.drawer-head strong, .sheet-head strong { font: 600 19px var(--serif); }
.menu { display: grid; padding: 0 8px; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 15px; }
.menu button:active, .menu a:active { background: var(--ivory); }
.menu .badge { margin-left: auto; font-size: 12px; font-weight: 700; color: #fff; background: var(--red); border-radius: 999px; padding: 1px 8px; }
.label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 18px 4px; border-top: 1px solid var(--line); margin-top: 6px; }
.chat-list { flex: 1; overflow-y: auto; padding: 0 8px; }
.chat-list .item { display: flex; align-items: center; border-radius: 10px; }
.chat-list .item.on { background: var(--ivory); }
.chat-list .open { flex: 1; min-width: 0; text-align: left; padding: 10px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.chat-list .del { width: 40px; height: 40px; color: var(--muted); font-size: 20px; }
.chat-list .none { color: var(--muted); padding: 8px; font-size: 14px; }

#sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; max-height: 88dvh; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; background: var(--paper); border-radius: 18px 18px 0 0; padding-top: 10px; box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
.sheet-body { overflow-y: auto; padding: 4px 16px calc(env(safe-area-inset-bottom) + 18px); }
.sheet-body h3 { font: 700 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.sheet-body p { margin: 0 0 10px; }
.meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 6px 0 4px; }
.meter i { display: block; height: 100%; background: var(--gold); }
.meter.warn i { background: var(--orange); }
.small { font-size: 13px; color: var(--muted); }
.plans { display: grid; gap: 8px; }
.plan { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); text-align: left; width: 100%; }
.plan b { font-size: 16px; }
.plan .price { font-weight: 800; font-size: 17px; white-space: nowrap; }
.plan .save { display: block; font-size: 12px; color: var(--orange); font-weight: 700; }
.plan[aria-pressed="true"] { border: 2px solid var(--gold); background: #221e14; }
#payBox { margin-top: 14px; min-height: 60px; }
.rem { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rem:last-child { border-bottom: 0; }
.rem .txt { flex: 1; min-width: 0; }
.rem .txt b { display: block; overflow-wrap: anywhere; }
.rem.fired .txt b { color: var(--red); }
.rem.done .txt b { text-decoration: line-through; color: var(--muted); }
.rem .btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rem .btns button { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle span small { display: block; color: var(--muted); font-size: 13px; }
.toggle input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--orange); flex: none; }
select { width: 100%; height: 44px; font: inherit; border-radius: 10px; border: 1px solid var(--line); background: var(--field); padding: 0 10px; }
.steps { padding-left: 1.2em; } .steps li { margin: 8px 0; }
.btn { display: inline-block; font-weight: 700; padding: 10px 16px; border-radius: 12px; background: var(--gold); color: var(--on-gold); }
.btn.light { background: var(--field); color: var(--navy-2); border: 1px solid var(--line); }

#print { display: none; }
@media print {
  body { background: #fff; }
  body > :not(#print) { display: none !important; }
  #print { display: block; color: #000; font: 11pt/1.45 var(--serif); }
  #print h2 { font: 700 20pt/1.2 var(--serif); margin: 0 0 4pt; }
  #print h3 { font: 700 10pt/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; margin: 14pt 0 4pt; padding-bottom: 2pt; border-bottom: 1px solid #999; }
  #print h4 { font: 700 11pt/1.3 var(--serif); margin: 8pt 0 2pt; }
  #print p { margin: 0 0 6pt; } #print ul, #print ol { margin: 0 0 6pt; padding-left: 16pt; }
  @page { margin: 18mm 16mm; }
}
@media (min-width: 761px) { #app { border-left: 1px solid var(--navy-2); border-right: 1px solid var(--navy-2); } }
@media (prefers-reduced-motion: reduce) { .typing i, .wave i, .icon-btn.on { animation: none; } }
.plan .small { display: block; }

/* Blank start screen */
.hello { margin: auto 0; text-align: center; padding: 0 8px 24px; }
.hello img { width: 56px; height: 56px; }
.hello h1 { font: 600 24px/1.3 var(--sans); margin: 14px 0 0; color: var(--ink); }
.hello p, .hello .starters { display: none; }
.field input, .code { background: var(--field); color: var(--ink); border-color: var(--line); }
.field input:focus, .code:focus { border-color: var(--gold); }
#input { background: var(--field); color: var(--ink); border-color: var(--line); }
.plan, .rem .btns button, .acts button, .task button, .chip, .styles button, select, .btn.light { color: var(--ink); }
.md a, a { color: var(--navy-2); }

/* Claude-like sizing: calmer, smaller text */
body { font-size: 15px; }
.msg-u { font-size: 15px; padding: 9px 13px; border-radius: 18px; }
.msg-b { font-size: 15px; line-height: 1.6; }
.md h2 { font: 600 17px/1.3 var(--sans); }
.md h3 { font-size: 12px; }
.md h4 { font-size: 15px; }
.md li { margin: .2em 0; }
.brand strong { font-size: 17px; }
.pill { font-size: 11px; }
.chip, .styles button, .acts button, .task button { font-size: 12px; }
.hello h1 { font: 400 26px/1.25 var(--serif); letter-spacing: -.01em; }
.hello .sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.hello img { width: 44px; height: 44px; }
.name-ask { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.name-ask span { width: 100%; }
.name-ask input { width: 170px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font: inherit; font-size: 16px; }
.name-ask button { height: 38px; padding: 0 14px; border-radius: 10px; background: var(--gold); color: var(--on-gold); font-weight: 700; }
#input { font-size: 16px; }
.sheet-body, .menu button, .menu a, .chat-list .open { font-size: 14px; }
.banner { font-size: 13px; }

/* Claude-style menu */
.brand { text-align: left; color: inherit; padding: 4px 6px; border-radius: 10px; }
.brand:active { background: rgba(255,255,255,.06); }
#drawer { width: min(84vw, 320px); background: var(--paper); border-right: 1px solid var(--line); }
.drawer-head { padding: 4px 6px 8px 16px; }
.drawer-head strong { font: 400 20px var(--serif); }
.menu { gap: 2px; padding: 0 8px 6px; }
.menu button, .menu a { gap: 12px; padding: 10px; color: var(--ink); font-size: 14px; }
.menu svg { color: var(--muted); flex: none; }
.menu .new { font-weight: 600; }
.menu .new svg { color: var(--on-gold); background: var(--gold); border-radius: 50%; padding: 2px; width: 22px; height: 22px; }
.search { padding: 4px 12px 2px; }
.search input { width: 100%; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); color: var(--ink); padding: 0 12px; font: inherit; font-size: 14px; outline: none; }
.search input:focus { border-color: var(--gold); }
.label { border-top: 0; margin-top: 4px; padding: 12px 18px 4px; font-size: 11px; }
.chat-list .open { color: var(--ink); padding: 9px 10px; }
.chat-list .item:hover { background: var(--field); }
.chat-list .item.on { background: var(--field); }
.chat-list .del { opacity: .5; }
.account { display: flex; align-items: center; gap: 10px; margin: 6px 8px 0; padding: 10px; border-top: 1px solid var(--line); text-align: left; color: var(--ink); border-radius: 0; }
.account .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--on-gold); font-weight: 700; flex: none; }
.account .who { flex: 1; min-width: 0; display: grid; }
.account .who b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .who small { color: var(--muted); font-size: 12px; }
.account svg { color: var(--muted); }

/* Claude-style phone layout: plain header, one rounded composer card */
.bar { border-bottom: 0 !important; background: var(--ivory); padding-bottom: 4px; }
body.alarm .bar { background: var(--red); }
.brand { justify-content: center; }
.brand img { width: 26px; height: 26px; }
.brand strong { font: 500 16px var(--sans); }
.composer { background: var(--ivory); border-top: 0; padding: 4px 10px calc(env(safe-area-inset-bottom) + 10px); }
.composer .row {
  display: grid; grid-template-columns: auto auto 1fr auto auto; grid-template-areas: "in in in in in" "att res . mic send";
  align-items: center; gap: 6px; background: var(--field); border: 1px solid var(--line); border-radius: 22px; padding: 8px 8px 6px;
}
.composer .row:focus-within { border-color: #3a3f4a; }
#input { grid-area: in; border: 0 !important; background: transparent !important; padding: 6px 8px; min-height: 40px; }
#attachBtn { grid-area: att; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; }
#researchBtn { grid-area: res; display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; background: transparent; color: var(--muted); }
#researchBtn[aria-pressed="true"] { color: var(--on-gold); background: var(--gold); }
#micBtn { grid-area: mic; width: 36px; height: 36px; }
.send { grid-area: send; width: 36px; height: 36px; }
.tools { padding: 0 2px 6px; }
.tools:empty, .tools:not(:has(button:not([hidden]))) { display: none; }
.msg-u { background: var(--bubble); border-radius: 18px; max-width: 82%; }
.msg-b .acts { border-top: 0; padding-top: 2px; }
.msg-b .acts button { background: transparent; border-color: transparent; color: var(--muted); padding: 4px 8px; }
#thread { padding: 12px 16px 8px; gap: 14px; }

/* Projects */
.scroll-wrap { flex: 1; overflow-y: auto; }
#projList .add { color: var(--muted); }
.proj-home .proj-icon { width: 52px; height: 52px; margin: 0 auto; border-radius: 14px; display: grid; place-items: center; background: var(--gold); color: var(--on-gold); font: 700 22px var(--sans); }
.proj-home .sub { max-width: 34ch; margin: 6px auto 0; }
.proj-acts { margin-top: 14px; }
.proj-chats { margin: 18px auto 0; max-width: 420px; text-align: left; display: grid; gap: 4px; }
.proj-chats .label { padding: 0 4px 4px; }
.proj-chats button { text-align: left; padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-size: 14px; }
.proj-form { display: grid; gap: 12px; }
.proj-form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.proj-form input, .proj-form textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; resize: vertical; }
.proj-form input:focus, .proj-form textarea:focus { border-color: var(--gold); }
.plus-opts { display: grid; gap: 8px; }
.plus-opts button { display: grid; gap: 2px; text-align: left; padding: 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); color: var(--ink); }
.plus-opts small { color: var(--muted); font-size: 13px; }

/* Top bar: logo only, right next to the menu */
.brand { justify-content: flex-start; padding: 2px; }
.brand strong { display: none; }
.brand img { width: 30px; height: 30px; }

/* Top bar: menu left, chat title in the middle, plus right */
.brand { flex: 1; justify-content: center; min-width: 0; padding: 0 8px; }
.brand img { display: none; }
#chatTitle { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font: 500 14px var(--sans); }

#chatTitle.upsell { display: inline-block; width: auto; padding: 5px 12px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
#chatTitle.upsell b { color: var(--navy-2); font-weight: 600; }

/* "+" sheet like Claude */
.tile-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.tile-row button { display: grid; justify-items: center; gap: 6px; padding: 16px 8px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.tile-row svg, .opt-list svg { color: var(--muted); }
.opt-list { display: grid; gap: 2px; }
.opt-list button { display: flex; align-items: center; gap: 12px; text-align: left; padding: 11px 6px; border-radius: 10px; color: var(--ink); }
.opt-list button:active { background: var(--field); }
.opt-list span { flex: 1; display: grid; }
.opt-list b { font-weight: 500; font-size: 14px; }
.opt-list small { color: var(--muted); font-size: 12px; }
.tick { width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; flex: none; }
.tick::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: left .15s; }
.tick.on { background: var(--gold); } .tick.on::after { left: 19px; background: var(--on-gold); }
/* Research chip only shows while it's switched on */
#researchBtn[aria-pressed="false"] { display: none; }

.gimg { display: block; margin-top: 10px; }
.gimg img { width: 100%; max-width: 420px; border-radius: 14px; border: 1px solid var(--line); display: block; }
.memnote { font-size: 12px; color: var(--muted); margin-top: 6px; }
.memnote::before { content: "\2713  "; color: var(--gold); }
.mem-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.mem-row span { flex: 1; }
.mem-row button { width: 30px; height: 30px; border-radius: 50%; color: var(--muted); font-size: 18px; }
.msg-b .acts button.rate { font-size: 14px; filter: grayscale(1); opacity: .6; }
.msg-b .acts button.rate.on { filter: none; opacity: 1; background: var(--field); border-color: var(--line); }

/* Claude desktop style composer: usage card, one input box with send inside, tools and note underneath */
.composer .usage-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 16px; padding: 8px 8px 8px 14px; margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.usage-card svg { flex: none; }
.usage-card p { flex: 1; min-width: 0; margin: 0; }
.usage-card .get { background: var(--field); color: var(--ink); border-radius: 10px; padding: 7px 12px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.usage-card .x { width: 32px; height: 32px; color: var(--muted); font-size: 20px; }
.composer .row { display: flex !important; align-items: flex-end; gap: 6px; grid-template-areas: none; background: var(--field); border: 1px solid var(--line); border-radius: 16px; padding: 6px 6px 6px 8px; }
.composer .row #input { flex: 1; }
.composer .send { background: transparent; color: var(--muted); width: 36px; height: 36px; border-radius: 10px; }
.composer .send:not(:disabled) { background: var(--gold); color: var(--on-gold); }
.composer .under { display: flex; align-items: center; gap: 4px; padding: 6px 2px 0; min-width: 0; }
.composer .under #attachBtn, .composer .under #micBtn { width: 34px; height: 34px; border: 0; background: transparent; color: var(--ink); }
.composer .under #researchBtn { height: 30px; font-size: 12px; }
.composer .under #researchBtn[aria-pressed="false"] { display: inline-flex; }
.disclaim { flex: 1; min-width: 0; text-align: right; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 4px; }
@media (max-width: 380px) { .disclaim { font-size: 11px; } }
@media (max-width: 480px) { .composer .under #researchBtn { font-size: 0; gap: 0; padding: 0 9px; } .disclaim { font-size: 11.5px; white-space: normal; line-height: 1.25; } }
.msg-b .acts button.pdfbtn { color: var(--gold); border-color: var(--gold) !important; }

/* goals, project files, charts */
.task .steps { margin: 6px 0 8px 18px; padding: 0; font-size: 14px; }
.task .steps .when { color: var(--muted); font-size: 12px; }
.goal { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.ghead { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.gbar { height: 6px; background: var(--field); border-radius: 4px; margin: 8px 0; overflow: hidden; }
.gbar i { display: block; height: 100%; background: var(--gold); }
.gstep { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 8px 0; background: none; border: 0; color: var(--ink); }
.gstep span { display: flex; flex-direction: column; } .gstep small { color: var(--muted); font-size: 12px; }
.gstep.done span { text-decoration: line-through; color: var(--muted); }
.proj-files { margin: 14px auto 0; max-width: 420px; text-align: left; }
.pfile { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-top: 6px; font-size: 14px; }
.pfile button { background: none; border: 0; color: var(--muted); font-size: 20px; }
.chart { margin: 10px 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; max-width: 100%; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; } .chart .ax { fill: var(--muted); font-size: 10px; }
.chart-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.md pre { overflow-x: auto; background: var(--field); padding: 10px; border-radius: 10px; font-size: 12.5px; }
.task.auto { border-style: dashed; } .task .state .link { background: none; border: 0; color: var(--gold); padding: 0 2px; font: inherit; text-decoration: underline; }
.eico { font-size: 20px; width: 28px; text-align: center; flex: none; }
.habit { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
.habit span { flex: 1; display: flex; flex-direction: column; } .habit small { color: var(--muted); font-size: 12px; }
.habit .hcheck, .habit .x { background: none; border: 0; color: var(--muted); font-size: 20px; }
.inline-add { display: flex; gap: 8px; margin: 6px 0 14px; } .inline-add input { flex: 1; min-width: 0; }
.partner-form { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .partner-form span { width: 100%; } .partner-form input { flex: 1; min-width: 120px; }
.topic-ico { font-size: 44px; margin-bottom: 6px; }
.welcome { text-align: center; padding: 6px 4px 10px; } .welcome h2 { margin: 6px 0; } .welcome p { color: var(--muted); }
.welcome .dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0; } .welcome .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); } .welcome .dots i.on { background: var(--gold); }
/* signed-out landing above the sign-in box */
#auth { display: block; padding: 0 16px 24px; overflow-y: auto; }
#auth .auth-card { margin: 8px auto 0; }
.landing { max-width: 760px; margin: 0 auto; text-align: center; padding-top: max(28px, env(safe-area-inset-top)); }
.l-hero img { border-radius: 50%; }
.l-hero h1 { font-size: clamp(24px, 6vw, 34px); line-height: 1.2; margin: 14px 0 10px; text-wrap: balance; }
.l-hero p { color: rgba(255,255,255,.75); max-width: 560px; margin: 0 auto 16px; line-height: 1.5; }
.l-cta { display: inline-block; padding: 13px 28px; border-radius: 14px; text-decoration: none; font-weight: 600; }
.l-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 26px 0 14px; text-align: left; }
.l-grid div, .l-price div { border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; background: rgba(255,255,255,.03); }
.l-grid span, .l-price span { color: rgba(255,255,255,.7); font-size: 14px; line-height: 1.4; }
.l-price { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; text-align: left; margin-bottom: 18px; }
.l-price div:last-child { border-color: var(--gold); }
.l-foot { text-align: center; color: rgba(255,255,255,.55); font-size: 13px; margin: 22px 0 8px; line-height: 1.8; } .l-foot a { color: rgba(255,255,255,.75); }
#auth { height: 100dvh; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.composer .under .level { height: 30px; font-size: 12px; }
.tier{margin:10px 0 4px}.tier>p{margin:0 0 6px}
.u-wrap{align-self:flex-end;display:flex;flex-direction:column;align-items:flex-end;max-width:88%}.u-wrap .msg-u{max-width:100%}.uacts{display:flex;gap:4px;margin-top:2px;opacity:.75}.uacts button{background:none;border:0;color:var(--muted,#9aa3b2);font-size:12px;padding:4px 6px;cursor:pointer}
#sendBtn.stop svg{display:none}#sendBtn.stop::after{content:'';width:12px;height:12px;background:currentColor;border-radius:3px;display:block}
.msg-e.note{background:var(--bubble);color:var(--ink);border-color:transparent}.msg-e.note button{margin-left:8px}
