/* Atlas — glass UI. Same tokens on web and iPhone. */
:root {
  --bg: #0A0B0F;
  --ink: #F5F5F7;
  --ink-2: #C7C7CC;
  --ink-3: #A1A1AA;
  --line: rgba(255,255,255,0.08);
  --glass: rgba(255,255,255,0.06);
  --glass-2: rgba(255,255,255,0.1);
  --glass-border: rgba(255,255,255,0.1);
  --blue: #0071E3;
  --blue-ink: #5AA9FF;
  --green: #30D158;
  --orange: #FF9F0A;
  --orange-ink: #FFB340;
  --red: #FF6961;
  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
a { color: var(--blue-ink); text-decoration: none; }
a:hover { color: #8CC4FF; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* background glow */
.glow { position: fixed; border-radius: 50%; filter: blur(150px); pointer-events: none; z-index: 0; }
.glow.a { width: 560px; height: 560px; background: #2F4BFF; opacity: .26; top: -220px; left: 35%; }
.glow.b { width: 480px; height: 480px; background: #8A5CFF; opacity: .16; bottom: -240px; right: 4%; }

.glass { background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%); border: 1px solid var(--glass-border); }

/* layout */
.app { position: relative; z-index: 1; height: 100%; display: flex; gap: 16px; padding: 16px; }
.side { width: 248px; flex: none; border-radius: 24px; padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); overflow-y: auto; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; }
.main.framed { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.panel { width: 320px; flex: none; border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 22px; overflow-y: auto; }

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.brand b { font-size: 18px; letter-spacing: -.02em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); }
.nav a:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.nav a.on { background: var(--glass-2); color: #fff; font-weight: 600; }
.nav svg, .tab svg { width: 18px; height: 18px; flex: none; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--orange); color: #1C1300; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.label { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 0 12px 6px; }
.recents { display: flex; flex-direction: column; gap: 2px; }
.recents a { padding: 8px 12px; border-radius: 10px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.recents a.on { background: rgba(255,255,255,.07); color: var(--ink); }
.recents a .dot { width: 7px; height: 7px; border-radius: 4px; background: var(--blue-ink); flex: none; }
.recents a .spin { flex: none; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: var(--ink); }
.me:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.avatar { width: 32px; height: 32px; border-radius: 16px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }

/* buttons */
.btn { height: 40px; padding: 0 20px; border-radius: 20px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.1); }
.btn.primary { background: var(--blue); border-color: transparent; color: #fff; font-weight: 600; }
.btn.primary:hover { background: #0A7CF0; }
.btn.small { height: 32px; padding: 0 14px; border-radius: 16px; font-size: 14px; }
.btn.link { border: 0; background: none; color: var(--blue-ink); padding: 0 6px; }
.btn.danger { color: var(--red); border-color: transparent; background: none; }
.btn.block { width: 100%; }
.btn.square { width: 40px; padding: 0; border-radius: 20px; border: 0; background: transparent; color: var(--ink-2); }
.btn.square:hover { background: rgba(255,255,255,.08); color: var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }

/* page scaffold */
.page { flex: 1; overflow-y: auto; padding: 28px 32px 120px; }
.page-inner { max-width: 1040px; display: flex; flex-direction: column; gap: 26px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.head h1 { margin: 0 0 4px; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.head p { margin: 0; color: var(--ink-3); }
h2.sec { margin: 0; font-size: 15px; font-weight: 600; }
h2.sec.warn { color: var(--orange-ink); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(118,118,128,.22); }
.seg button { height: 32px; padding: 0 16px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); font-size: 14px; }
.seg button.on { background: rgba(255,255,255,.2); color: #fff; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 34px; padding: 0 16px; border-radius: 17px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: var(--ink-2); font-size: 14px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: transparent; font-weight: 600; }
.tag { padding: 5px 12px; border-radius: 14px; font-size: 13px; font-weight: 600; }
.tag.allow { background: rgba(48,209,88,.16); color: var(--green); }
.tag.ask { background: rgba(255,159,10,.16); color: var(--orange-ink); }
.tag.never { background: rgba(255,105,97,.16); color: var(--red); }

.card { border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.card.warn { background: rgba(255,159,10,.08); border: 1px solid rgba(255,159,10,.28); }
.card.info { background: rgba(90,169,255,.09); border: 1px solid rgba(90,169,255,.28); }
.card.plain { background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.card .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card .title { font-weight: 600; font-size: 16px; }
.card .kicker { font-size: 13px; font-weight: 600; }
.kicker.warn { color: var(--orange-ink); } .kicker.info { color: var(--blue-ink); }
.list { border-radius: var(--radius); padding: 4px 20px; }
.list > .item { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.list > .item:last-child { border-bottom: 0; }
.item .txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.item .txt span:first-child { overflow-wrap: anywhere; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.bar i { display: block; height: 4px; background: var(--blue-ink); border-radius: 2px; width: 10%; transition: width .4s; }
.empty { padding: 28px; text-align: center; color: var(--ink-3); border-radius: var(--radius); border: 1px dashed rgba(255,255,255,.12); }

/* switch */
.switch { flex: none; width: 51px; height: 31px; border-radius: 16px; border: 0; background: rgba(120,120,128,.36); position: relative; padding: 0; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.3); transition: left .2s; }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { left: 22px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lab { font-size: 13px; color: var(--ink-3); }
.input, .textarea, .select { width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.25); outline: none; }
.textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; min-height: 84px; }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(90,169,255,.6); }
.select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #A1A1AA 50%), linear-gradient(135deg, #A1A1AA 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.search { height: 38px; width: 240px; padding: 0 16px; border-radius: 19px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.07); font-size: 14px; outline: none; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }

/* chat */
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; }
.chat-head h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head .sub { font-size: 13px; color: var(--ink-3); }
.chat-head .t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.back { display: none; }
.model { height: 36px; border-radius: 18px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.08); padding: 0 34px 0 14px; font-size: 14px; }
.thread { flex: 1; overflow-y: auto; padding: 8px 24px 24px; }
.thread-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.bubble { align-self: flex-end; max-width: 78%; background: var(--blue); color: #fff; border-radius: 20px 20px 6px 20px; padding: 11px 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply { line-height: 1.6; overflow-wrap: anywhere; }
.reply p { margin: 0 0 10px; } .reply p:last-child { margin-bottom: 0; }
.reply ul, .reply ol { margin: 6px 0 10px; padding-left: 22px; }
.reply code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 5px; }
.reply pre { background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; overflow-x: auto; }
.reply pre code { background: none; padding: 0; }
.reply h3, .reply h4 { margin: 12px 0 6px; font-size: 15px; }
.steps { border-radius: var(--radius); padding: 4px 16px; }
.step { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.step:last-child { border-bottom: 0; }
.step .ic { width: 22px; height: 22px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.step.done .ic { background: rgba(48,209,88,.18); color: var(--green); }
.step.failed .ic, .step.stopped .ic { background: rgba(255,255,255,.08); color: var(--ink-3); }
.step.running { color: var(--ink-2); }
.step.failed, .step.stopped { color: var(--ink-3); }
.steps .more { padding: 8px 0; font-size: 13px; color: var(--ink-3); border: 0; background: none; text-align: left; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--blue-ink); border-right-color: transparent; animation: spin .8s linear infinite; }
.step .spin { width: 22px; height: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 7px; height: 7px; border-radius: 4px; background: var(--ink-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composer { padding: 0 24px 22px; }
.composer form { max-width: 760px; margin: 0 auto; border-radius: 24px; padding: 6px 6px 6px 8px; display: flex; align-items: flex-end; gap: 4px; background: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%); border: 1px solid rgba(255,255,255,.12); }
.composer textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 200px; padding: 10px 8px; background: transparent; border: 0; outline: none; resize: none; font-size: 15px; line-height: 1.4; }
.send { width: 40px; height: 40px; border-radius: 20px; border: 0; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.send.stop { background: rgba(255,255,255,.16); }
.attach-list { max-width: 760px; margin: 0 auto 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.attach-list span { padding: 5px 10px; border-radius: 12px; background: rgba(255,255,255,.08); font-size: 13px; }
.welcome { margin: 10vh auto 0; max-width: 560px; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.welcome h2 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.ideas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.ideas button { text-align: left; border-radius: 16px; padding: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--ink-2); line-height: 1.35; }
.ideas button:hover { background: rgba(255,255,255,.09); color: var(--ink); }
.helpers .h { display: flex; justify-content: space-between; padding: 8px 0; gap: 10px; }
.ok { color: var(--green); } .work { color: var(--blue-ink); } .warn-t { color: var(--orange-ink); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills span { padding: 6px 10px; border-radius: 14px; background: rgba(255,255,255,.08); font-size: 13px; }

/* apps */
.appicon { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex: none; text-transform: uppercase; }
.appcard { border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.appcard.sel { border-color: rgba(90,169,255,.5); }
.status { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.status i { width: 7px; height: 7px; border-radius: 4px; background: currentColor; }

/* two-column pages */
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .l { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.split > .r { flex: 1 1 380px; max-width: 460px; min-width: 0; border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.auto { border-radius: var(--radius); padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); text-align: left; width: 100%; }
.auto.sel { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); }
.auto.off .name { color: var(--ink-2); }

/* login */
.login { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login form { width: 100%; max-width: 360px; border-radius: 28px; padding: 32px 26px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.login .logo { width: 52px; height: 52px; border-radius: 15px; font-size: 24px; margin: 0 auto; }
.err { color: var(--red); font-size: 14px; min-height: 18px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translateX(-50%); z-index: 50; padding: 12px 18px; border-radius: 16px; background: rgba(40,40,46,.85); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,.14); font-size: 14px; }

/* phone tab bar */
.tabbar { display: none; }

/* ---------- phone ---------- */
@media (max-width: 820px) {
  body { font-size: 17px; }
  .app { padding: 0; gap: 0; }
  .side, .panel { display: none; }
  .main, .main.framed { border-radius: 0; border: 0; background: none; }
  .page { padding: calc(58px + var(--safe-t)) 16px calc(120px + var(--safe-b)); }
  .head h1 { font-size: 34px; }
  .head p { display: none; }
  .grid3 { grid-template-columns: 1fr; }
  .split > .r { max-width: none; }
  .search { width: 100%; }
  .tabbar { position: fixed; z-index: 20; left: 16px; right: 16px; bottom: calc(14px + var(--safe-b)); height: 64px; border-radius: 32px; display: flex; justify-content: space-around; align-items: center; padding: 0 6px; background: rgba(40,40,46,.55); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; padding: 6px 4px; border-radius: 26px; color: var(--ink-2); font-size: 11px; }
  .tab svg { width: 22px; height: 22px; }
  .tab.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
  .tab .badge { position: absolute; top: 0; right: 10px; min-width: 16px; height: 16px; font-size: 10px; }
  .chat-head { padding: calc(10px + var(--safe-t)) 12px 10px; }
  .back { display: flex; }
  .round { width: 44px; height: 44px; border-radius: 22px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: center; flex: none; }
  .chat-head .t { align-items: center; text-align: center; flex: 1; }
  .chat-head h1 { font-size: 16px; max-width: 220px; }
  .model { height: 26px; border: 0; background-color: transparent; color: var(--ink-3); font-size: 13px; padding: 0 22px 0 4px; background-position: calc(100% - 12px) 10px, calc(100% - 7px) 10px; }
  .thread { padding: 8px 16px 16px; }
  .bubble { max-width: 82%; padding: 10px 14px; line-height: 1.35; }
  .composer { padding: 8px 12px calc(10px + var(--safe-b)); }
  .composer form { border-radius: 26px; }
  .composer textarea { font-size: 17px; }
  .ideas { grid-template-columns: 1fr; }
  body.in-chat .tabbar { display: none; }
  .toast { bottom: calc(96px + var(--safe-b)); }
}
@media (min-width: 821px) and (max-width: 1180px) { .panel { display: none; } }

/* shared bits */
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.amsg { display: flex; flex-direction: column; gap: 12px; }
.permrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.permrow .select { width: 170px; flex: none; }
.btn.square.on { color: var(--red); }
.login .card { max-width: 380px; text-align: center; }
.login h1 { margin: 0; font-size: 22px; }
.panel b { display: block; margin-bottom: 8px; }
.panel p { margin: 0; }
.panel .pills { margin-bottom: 8px; }
a.card { color: var(--ink); }
a.item { color: var(--ink); }
.appcard .row { justify-content: space-between; width: 100%; }
.recents a span:last-child { overflow: hidden; text-overflow: ellipsis; }
.r .seg button, .card .seg button { flex: 1; }
@media (max-width: 820px) {
  .head:has(.seg) { flex-direction: column; align-items: stretch; }
  .head .seg button { flex: 1; }
  .seg button { padding: 0 8px; font-size: 13px; white-space: nowrap; }
  .head { align-items: center; }
}
.app { height: 100vh; height: 100dvh; }
.main { min-height: 0; }
#msgs { display: flex; flex-direction: column; gap: 18px; }
.model.select { width: auto; flex: none; }
@media (max-width: 820px) {
  .chat-head { display: grid; grid-template-columns: 44px 1fr 44px; grid-template-areas: "back t new" "back m new"; align-items: center; column-gap: 8px; row-gap: 0; }
  .chat-head .backbtn { grid-area: back; }
  .chat-head .newbtn { grid-area: new; }
  .chat-head .t { grid-area: t; }
  .chat-head .model { grid-area: m; justify-self: center; }
  .chat-head .sub { display: none; }
}
details.card summary { cursor: pointer; }
details.card[open] summary { margin-bottom: 8px; }
@media (max-width: 820px) { .tab { min-width: 58px; padding: 6px 2px; font-size: 10.5px; } .tab .badge { right: 6px; } }

/* live browser */
.live-mini { display: block; width: 100%; aspect-ratio: 16 / 10; margin-top: 4px; padding: 0; border-radius: 14px; border: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.35); overflow: hidden; position: relative; }
.live-mini img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.live-mini span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.viewer { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: rgba(10,11,15,.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); padding: calc(8px + var(--safe-t)) 12px calc(10px + var(--safe-b)); gap: 10px; }
.vhead { display: flex; align-items: center; gap: 10px; }
.vurl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vscreen { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: auto; }
.vscreen img { max-width: 100%; max-height: 100%; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); cursor: crosshair; }
.vbar { display: flex; flex-direction: column; gap: 8px; max-width: 900px; width: 100%; margin: 0 auto; }
.vrow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.vrow .input { flex: 1; min-width: 160px; height: 38px; }
.watch-btn { display: none; margin: 0 auto 8px; }
@media (max-width: 820px) { .watch-btn { display: flex; } }
.sidesearch .search { width: 100%; }
.skill { display: block !important; }
.skill summary { cursor: pointer; list-style: none; }
.skill summary::-webkit-details-marker { display: none; }
.skillbody { white-space: pre-wrap; font-size: 13px; color: var(--ink-2); background: rgba(0,0,0,.25); border-radius: 12px; padding: 12px; margin: 10px 0; max-height: 320px; overflow: auto; }
.talkbar { position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(110px + var(--safe-b)); display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 26px; max-width: calc(100% - 32px); }
.talkbar #talkmsg { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pulse { width: 12px; height: 12px; border-radius: 6px; background: var(--blue-ink); animation: pulse 1.2s ease-in-out infinite; flex: none; }
@keyframes pulse { 0%, 100% { transform: scale(.8); opacity: .6; } 50% { transform: scale(1.2); opacity: 1; } }
.mainlink { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; background: rgba(255,255,255,.06); color: var(--ink); font-weight: 600; border: 1px solid rgba(255,255,255,.08); }
.mainlink.on { background: rgba(0,113,227,.22); border-color: rgba(90,169,255,.4); color: #fff; }
.mainlink .spin { margin-left: auto; width: 14px; height: 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.row-between .btn.link { height: 24px; padding: 0 4px; }
.side-empty { padding: 4px 12px; line-height: 1.4; }
.sidecard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; color: var(--ink); max-width: 420px; }
.sidecard:hover { background: rgba(255,255,255,.09); color: var(--ink); }
.sideic { width: 30px; height: 30px; border-radius: 10px; background: rgba(90,169,255,.16); color: var(--blue-ink); display: flex; align-items: center; justify-content: center; flex: none; }
.sideic .spin { width: 16px; height: 16px; }
.mainrow { color: var(--ink); }
#pinfo { display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 820px) { body:not(.in-chat) .composer { padding-bottom: calc(92px + var(--safe-b)); } body:not(.in-chat) .watch-btn { margin-bottom: 6px; } }
.steps { padding-left: 18px; margin: 10px 0; line-height: 1.5; } #icard details summary, #bbcard details summary { list-style: none; display: inline-flex; margin-top: 10px; cursor: pointer; } #icard details summary::-webkit-details-marker, #bbcard details summary::-webkit-details-marker { display: none; } #icard details[open] summary, #bbcard details[open] summary { display: none; }
/* glass dropdowns */
button.gsel { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; text-align: left; color: var(--ink); font: inherit; background-image: none !important; padding-right: 12px !important; }
button.gsel .gl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.gsel svg { width: 14px; height: 14px; flex: none; color: var(--ink-3); transition: transform .18s ease; }
button.gsel[aria-expanded="true"] { border-color: rgba(90,169,255,.6); }
button.gsel[aria-expanded="true"] svg { transform: rotate(180deg); }
button.gsel:focus-visible { outline: 2px solid rgba(90,169,255,.7); outline-offset: 2px; }
.select.gsel { width: 100%; }
.model.gsel { width: auto; }
.gmenu { position: fixed; z-index: 1000; padding: 6px; border-radius: 16px; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(30,32,44,.72); -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 18px 50px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
  animation: gpop .14s ease-out; transform-origin: top center; }
.gmenu.up { transform-origin: bottom center; }
@keyframes gpop { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
.gopt { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; padding: 0 12px; border-radius: 10px; font-size: 15px; color: var(--ink); cursor: pointer; user-select: none; }
.gopt.act { background: rgba(255,255,255,.1); }
.gopt[aria-selected="true"] { color: #fff; font-weight: 600; }
.gopt svg { width: 16px; height: 16px; color: var(--blue-ink); flex: none; }
.gopt[aria-disabled="true"] { opacity: .4; cursor: default; }
@media (prefers-reduced-motion: reduce) { .gmenu { animation: none; } button.gsel svg { transition: none; } }
/* voice call */
.calldock { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(18px + var(--safe-b)); width: min(560px, calc(100vw - 24px));
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "orb mid" "btn btn"; gap: 12px 16px; align-items: center; padding: 16px 18px; border-radius: 26px;
  background: rgba(24,26,38,.72); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%);
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 24px 70px rgba(0,0,0,.5); animation: gpop .2s ease-out; }
.calldock .orb { grid-area: orb; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, rgba(90,169,255,.35), rgba(0,113,227,.12) 70%); }
.calldock .orb i { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #9ccaff, #0071E3 60%, #3a2bd6); box-shadow: 0 0 24px rgba(0,113,227,.6); transition: transform .08s linear; }
.calldock[data-state="thinking"] .orb i, .calldock[data-state="transcribing"] .orb i { animation: breathe 1.4s ease-in-out infinite; }
.calldock[data-state="speaking"] .orb i { background: radial-gradient(circle at 35% 30%, #c7f5d4, #30D158 60%, #0a8f5a); box-shadow: 0 0 24px rgba(48,209,88,.55); }
@keyframes breathe { 50% { transform: scale(1.18); opacity: .8; } }
.callmid { grid-area: mid; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.callstate { font-weight: 600; font-size: 17px; }
.callcap { color: var(--ink-2); font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 1em; }
.callbtns { grid-area: btn; display: flex; align-items: center; gap: 10px; }
.callbtns .cvoice { height: 40px; border-radius: 20px; width: auto !important; margin-right: auto; }
.callbtns .round { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.1); color: var(--ink); cursor: pointer; }
.callbtns .round[aria-pressed="true"] { background: #fff; color: #111; }
.callbtns .round.end { background: #FF3B30; border-color: transparent; color: #fff; }
.callbtns .round svg { width: 22px; height: 22px; }
body.oncall .composer { visibility: hidden; }
@media (max-width: 820px) { .calldock { bottom: calc(12px + var(--safe-b)); } }
@media (prefers-reduced-motion: reduce) { .calldock .orb i { animation: none !important; transition: none; } }
body.oncall #msgs { padding-bottom: 190px; }
.timepick { display: flex; gap: 8px; } .timepick .gsel { width: auto; min-width: 84px; }
.pwork { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--ink); font-size: 14px; } .pwork .spin { width: 12px; height: 12px; flex: none; }
.tablewrap { overflow-x: auto; margin: 8px 0; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); }
.tablewrap table { border-collapse: collapse; width: 100%; font-size: 14px; }
.tablewrap th, .tablewrap td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255,255,255,.07); }
.tablewrap th { background: rgba(255,255,255,.06); font-weight: 600; white-space: nowrap; }
.tablewrap tr:last-child td { border-bottom: 0; }
.filechip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 10px; background: rgba(90,169,255,.14); border: 1px solid rgba(90,169,255,.3); color: var(--ink); font-size: 14px; text-decoration: none; vertical-align: baseline; }
.filechip svg { width: 15px; height: 15px; color: var(--blue-ink); }
.filechip:hover { background: rgba(90,169,255,.24); color: #fff; }
.doc { line-height: 1.6; font-size: 15px; } .doc h3 { margin: 18px 0 6px; } pre.doc { white-space: pre-wrap; }
.docimg { max-width: 100%; border-radius: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0; }
.buildlog { white-space: pre-wrap; max-height: 220px; overflow: auto; font-size: 12px; }
#mobform, #bbform, #icform { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
input[type=file].input { height: auto; padding: 8px; color: var(--ink-3); font-size: 14px; }
input[type=file].input::file-selector-button { margin-right: 12px; height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.1); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
input[type=file].input::file-selector-button:hover { background: rgba(255,255,255,.16); }
#mobcard details summary { cursor: pointer; margin-top: 4px; }
