:root {
  --bg: #faf9f5; --side: #f4f2ec; --card: #ffffff; --raised: #fffefb;
  --text: #29261f; --text2: #57534a; --muted: #8b877c; --line: #ebe8df; --line2: #ddd9cc; --hover: #ede9df; --press: #e6e1d4;
  --accent: #c0632f; --accent2: #e08a4f; --accent-soft: #f6e5d8; --accent-ink: #fff;
  --brand1: #0f8a7e; --brand2: #2d5bd7;
  --bubble: #f0ede4; --ok: #3d8b5f; --ok-soft: #e3f1e8; --bad: #c4493d; --bad-soft: #f8e3df; --warn: #a96d07; --warn-soft: #f8edd6;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px; --shadow-s: 0 1px 2px rgba(40,30,10,.05); --shadow: 0 1px 3px rgba(40,30,10,.05), 0 8px 24px rgba(40,30,10,.06); --shadow-l: 0 2px 6px rgba(40,30,10,.05), 0 18px 48px rgba(40,30,10,.10);
  --ease: cubic-bezier(.2,.7,.2,1);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #262522; --side: #1f1e1b; --card: #2f2e2a; --raised: #33322e; --text: #f1eee6; --text2: #cfcac0; --muted: #9c978c; --line: #393733; --line2: #4a4741;
    --hover: #34332f; --press: #3d3b36; --accent: #e08752; --accent2: #f0a36f; --accent-soft: #4a3326; --accent-ink: #1e140d; --bubble: #393834;
    --ok: #6cc391; --ok-soft: #24382c; --bad: #f08a7c; --bad-soft: #432723; --warn: #e7b65a; --warn-soft: #403420;
    --shadow-s: 0 1px 2px #0003; --shadow: 0 1px 3px #0003, 0 8px 24px #0003; --shadow-l: 0 2px 6px #0003, 0 18px 48px #0005; }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.6 var(--sans); -webkit-font-smoothing: antialiased; letter-spacing: -.003em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
code { background: var(--hover); padding: 1px 5px; border-radius: 5px; font-size: .88em; }
::selection { background: var(--accent-soft); }
.muted { color: var(--muted); }
.hidden { display: none !important; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes twinkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(45deg) scale(.92); } }

/* brand mark */
.mark { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(140deg, var(--brand1), var(--brand2)); position: relative; flex-shrink: 0; box-shadow: inset 0 1px 0 #ffffff40, 0 2px 6px #2d5bd733; }
.mark::after { content: ""; position: absolute; inset: 6px; background: #fff; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.mark.lg { width: 44px; height: 44px; border-radius: 13px; }
.mark.lg::after { inset: 9px; animation: twinkle 6s var(--ease) infinite; }
.mark.sm { width: 24px; height: 24px; border-radius: 7px; } .mark.sm::after { inset: 5px; }

/* layout */
.app { display: flex; height: 100vh; }
.sidebar { width: 280px; flex-shrink: 0; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px 12px; transition: transform .25s var(--ease); }
.sbTop { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.brand em { font-style: normal; background: linear-gradient(120deg, var(--brand1), var(--brand2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.newChat { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; font-weight: 550; color: var(--accent); transition: background .15s; }
.newChat .plus { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 18px; line-height: 1; transition: transform .2s var(--ease); box-shadow: 0 2px 6px #c0632f40; }
.newChat:hover { background: var(--hover); } .newChat:hover .plus { transform: rotate(90deg); }
.sbNav { margin-top: 6px; display: grid; gap: 1px; }
.sbNav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; color: var(--text2); transition: background .15s, color .15s; }
.sbNav a:hover { background: var(--hover); color: var(--text); }
.sbNav a.active { background: var(--press); color: var(--text); font-weight: 550; }
.sbNav svg { width: 18px; height: 18px; flex-shrink: 0; }
.badge { margin-left: auto; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; border-radius: 99px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; animation: rise .3s var(--ease); }
.sbScroll { flex: 1; overflow-y: auto; margin: 10px -4px 0; padding: 0 4px; }
.sbLabel { font-size: 11.5px; color: var(--muted); padding: 14px 10px 6px; font-weight: 600; letter-spacing: .02em; }
.sbList a { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 9px; font-size: 13.5px; color: var(--text2); transition: background .15s; }
.sbList a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbList a:hover { background: var(--hover); color: var(--text); }
.sbList a.active { background: var(--press); color: var(--text); }
.sbList .pdot { font-style: normal; width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
.sbEmpty { font-size: 12.5px; color: var(--muted); padding: 4px 10px; }
.sbFoot { display: flex; align-items: center; gap: 10px; border: 1px solid transparent; background: none; text-align: left; padding: 8px; border-radius: 12px; margin-top: 8px; transition: background .15s, border-color .15s; }
.sbFoot:hover { background: var(--card); border-color: var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(140deg, #3b3a36, #191814); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.sbFootText { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.sbFootText b { font-weight: 550; font-size: 13.5px; }
.sbFootText small { color: var(--muted); font-size: 12px; }
.meter { display: flex; gap: 2px; margin-top: 4px; } .meter i { flex: 1; height: 3px; border-radius: 2px; background: var(--line2); } .meter i.on { background: var(--ok); }

.main { flex: 1; overflow-y: auto; position: relative; display: flex; flex-direction: column; scroll-behavior: smooth; }
#view { flex: 1; display: flex; flex-direction: column; min-height: 0; animation: rise .35s var(--ease); }
.iconBtn { border: 0; background: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; }
.iconBtn:hover { background: var(--hover); color: var(--text); }
.mobileOnly { display: none; }
.btn { border: 1px solid var(--line2); background: var(--card); border-radius: 11px; padding: 8px 14px; font-weight: 550; font-size: 13.5px; transition: background .15s, transform .1s, box-shadow .15s; box-shadow: var(--shadow-s); display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { opacity: .9; }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 2px 8px #c0632f40; }
.btn.accent:hover { background: var(--accent2); }
.btn.okb { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: default; }

/* home */
.home { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px 10vh; background: radial-gradient(800px 380px at 50% 0%, var(--accent-soft), transparent 70%); }
.greet { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4.6vw, 46px); letter-spacing: -.025em; display: flex; align-items: center; gap: 16px; margin: 0 0 30px; text-align: center; line-height: 1.15; }
.composerWrap { width: 100%; max-width: 700px; }
.composer { background: var(--card); border: 1px solid var(--line2); border-radius: 22px; box-shadow: var(--shadow-l); padding: 14px 14px 12px 18px; transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: #c9b9a4; box-shadow: var(--shadow-l), 0 0 0 4px var(--accent-soft); }
.composer textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); font: 16px/1.55 var(--sans); min-height: 52px; max-height: 260px; padding: 2px 0; }
.composer textarea::placeholder { color: var(--muted); }
.cRow { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cRow .spacer { flex: 1; }
.chipBtn { border: 1px solid var(--line2); background: transparent; border-radius: 10px; height: 34px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); transition: background .15s; }
.chipBtn:hover { background: var(--hover); color: var(--text); }
.chipBtn svg { width: 16px; height: 16px; }
.chipBtn select { border: 0; background: transparent; color: inherit; font: inherit; outline: 0; max-width: 170px; cursor: pointer; appearance: none; padding-right: 2px; }
.send { width: 36px; height: 36px; border-radius: 11px; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; transition: transform .15s var(--ease), opacity .15s, background .15s; box-shadow: 0 2px 8px #c0632f50; }
.send svg { width: 18px; height: 18px; }
.send:hover:not(:disabled) { background: var(--accent2); transform: translateY(-1px); }
.send:disabled { opacity: .35; cursor: default; box-shadow: none; }
.attachList { display: flex; flex-wrap: wrap; gap: 6px; }
.attachList:not(:empty) { margin-bottom: 8px; }
.attach { font-size: 12.5px; background: var(--bubble); border-radius: 9px; padding: 4px 9px; display: inline-flex; gap: 6px; align-items: center; animation: rise .2s; }
.attach button { border: 0; background: none; padding: 0; color: var(--muted); }
.aiRow { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.aiRow .stack { display: flex; }
.aiRow .stack span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--bg); margin-left: -6px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
.aiRow .stack span.off { filter: grayscale(1); opacity: .45; }
.aiRow a { color: var(--accent); font-weight: 550; cursor: pointer; }
.suggest { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 26px; width: 100%; max-width: 700px; }
.suggest button { border: 1px solid var(--line); background: var(--raised); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; color: var(--text2); text-align: left; display: flex; gap: 11px; align-items: flex-start; transition: background .15s, border-color .15s, transform .15s var(--ease), box-shadow .15s; }
.suggest button:hover { border-color: var(--line2); transform: translateY(-1px); box-shadow: var(--shadow); color: var(--text); }
.suggest .ico { font-size: 18px; line-height: 1.3; }
.suggest b { display: block; color: var(--text); font-weight: 550; font-size: 13.5px; }
.demoBanner { max-width: 700px; width: 100%; margin: 0 0 26px; font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; color: var(--text2); display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-s); }
.demoBanner .pill { background: var(--warn-soft); color: var(--warn); font-weight: 650; font-size: 11px; border-radius: 99px; padding: 2px 8px; flex-shrink: 0; letter-spacing: .03em; }
.demoBanner a { color: var(--accent); font-weight: 550; margin-left: auto; white-space: nowrap; }

/* chat */
.chatHead { position: sticky; top: 0; z-index: 3; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); display: flex; align-items: center; gap: 8px; padding: 12px 22px; font-size: 13.5px; border-bottom: 1px solid transparent; }
.chatHead .crumb { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.chatHead a.crumb:hover { color: var(--text); }
.chatHead .title { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { width: 100%; max-width: 780px; margin: 0 auto; padding: 10px 24px 60px; flex: 1; }
.approval { scroll-margin-bottom: 180px; }
.uMsg { display: flex; justify-content: flex-end; margin: 22px 0 18px; animation: rise .3s var(--ease); }
.uMsg div { background: var(--bubble); border-radius: 18px 18px 6px 18px; padding: 11px 17px; max-width: 82%; white-space: pre-wrap; font-size: 15px; }
.aMsg { display: flex; gap: 14px; margin-bottom: 30px; animation: rise .35s var(--ease); }
.aMsg > .mark { margin-top: 3px; }
.aBody { flex: 1; min-width: 0; }
.aBody > p { margin: 2px 0 14px; font-family: var(--serif); font-size: 17.5px; line-height: 1.55; color: var(--text); letter-spacing: -.005em; }
.planCard { border: 1px solid var(--line); background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.planTop { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); gap: 10px; flex-wrap: wrap; background: var(--raised); }
.planTop b { color: var(--text); font-weight: 600; }
.progress { height: 3px; background: var(--line); }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand1), var(--brand2)); transition: width .6s var(--ease); }
.task { padding: 14px 16px 14px 16px; border-bottom: 1px solid var(--line); position: relative; transition: background .2s; }
.task:last-child { border-bottom: 0; }
.task.running { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); }
.tRow { display: flex; align-items: center; gap: 11px; }
.tIcon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; background: var(--bubble); color: var(--muted); transition: background .3s; position: relative; }
.task.done .tIcon { background: var(--ok); color: #fff; font-size: 12px; }
.task.failed .tIcon, .task.skipped .tIcon { background: var(--bad); color: #fff; }
.task.running .tIcon::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--accent); border-top-color: transparent; animation: spin .9s linear infinite; }
.task.waiting .tIcon { background: var(--warn); color: #fff; }
.tTitle { flex: 1; font-weight: 550; font-size: 14.5px; min-width: 0; }
.tag { font-size: 11.5px; padding: 2px 9px; border-radius: 99px; background: var(--bubble); color: var(--text2); white-space: nowrap; font-weight: 500; }
.tMeta { margin: 4px 0 0 37px; font-size: 13px; color: var(--muted); }
.tMeta .instr { color: var(--text2); margin-bottom: 8px; }
.pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pick select { background: var(--bg); color: var(--text); border: 1px solid var(--line2); border-radius: 9px; padding: 5px 8px; font: inherit; font-size: 13px; max-width: 100%; cursor: pointer; }
.pick .x { border: 0; background: none; color: var(--muted); font-size: 12.5px; padding: 0; }
.pick .x:hover { color: var(--bad); }
.bestHint { margin-top: 6px; font-size: 12.5px; }
.bestHint a { color: var(--accent); font-weight: 550; }
.via { display: inline-flex; align-items: center; gap: 6px; }
.via i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.out { margin: 12px 0 0 37px; font-size: 14.5px; animation: rise .35s var(--ease); }
.out img, .out video { max-width: 100%; max-height: 440px; border-radius: 14px; display: block; border: 1px solid var(--line); box-shadow: var(--shadow); }
.out audio { width: 100%; max-width: 440px; }
.md { line-height: 1.65; color: var(--text); }
.md h1, .md h2, .md h3 { font-family: var(--serif); font-weight: 500; font-size: 18px; margin: 16px 0 6px; letter-spacing: -.01em; }
.md ul { padding-left: 20px; margin: 6px 0; } .md li { margin: 2px 0; }
.md table { border-collapse: collapse; font-size: 13px; display: block; overflow-x: auto; margin: 8px 0; }
.md td, .md th { border: 1px solid var(--line); padding: 5px 9px; text-align: left; } .md th { background: var(--raised); font-weight: 600; }
.md pre { background: var(--bg); border: 1px solid var(--line); padding: 10px; border-radius: 10px; overflow-x: auto; }
.md a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.md hr { border: 0; border-top: 1px solid var(--line); }
.collapse { max-height: 280px; overflow: hidden; position: relative; }
.collapse::after { content: ""; position: absolute; inset: auto 0 0; height: 80px; background: linear-gradient(transparent, var(--card)); }
.more { border: 0; background: none; color: var(--accent); font-size: 13px; padding: 6px 0 0; font-weight: 600; }
.demoTag { display: inline-flex; font-size: 11px; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 1px 7px; margin-bottom: 8px; font-weight: 600; letter-spacing: .02em; }
.err { color: var(--bad); background: var(--bad-soft); font-size: 13px; margin: 8px 0 0 37px; padding: 8px 11px; border-radius: 10px; white-space: pre-wrap; }
.small { font-size: 12.5px; color: var(--muted); }
.small a { color: var(--accent); }
.bottomComposer { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 35%); padding: 22px 24px 20px; }
.bottomComposer .composerWrap { margin: 0 auto; max-width: 740px; }
.bottomComposer .composer textarea { min-height: 26px; }
.bottomComposer .composer { box-shadow: var(--shadow); }
.thinking { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14.5px; font-family: var(--serif); font-style: italic; }
.dots span { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s infinite; }
.dots span:nth-child(2) { animation-delay: .2s; } .dots span:nth-child(3) { animation-delay: .4s; }

/* approvals & browser agent */
.approval { margin: 12px 0 0 37px; border: 1px solid #e7c9a8; background: linear-gradient(180deg, var(--warn-soft), var(--card)); border-radius: 14px; padding: 12px 14px; animation: rise .3s var(--ease); }
.approval h5 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--warn); }
.approval p { margin: 0 0 10px; font-size: 14.5px; color: var(--text); }
.approval img { width: 100%; max-height: 300px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 10px; }
.approval .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.approval input { flex: 1; min-width: 160px; border: 1px solid var(--line2); background: var(--card); color: var(--text); border-radius: 9px; padding: 7px 10px; font: inherit; font-size: 13px; }
.live { margin: 12px 0 0 37px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; }
.live img { width: 100%; max-height: 280px; object-fit: cover; object-position: top; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.steps { font-size: 12.5px; color: var(--text2); max-height: 230px; overflow-y: auto; border-left: 2px solid var(--line); padding-left: 10px; }
.steps div { padding: 2px 0; } .steps div:last-child { color: var(--text); font-weight: 550; }

/* pages */
.page { width: 100%; max-width: 940px; margin: 0 auto; padding: 44px 28px 60px; }
.pageHead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 22px; }
.pageHead h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0; letter-spacing: -.02em; }
.pageHead p { margin: 4px 0 0; color: var(--muted); }
.search { width: 100%; border: 1px solid var(--line2); background: var(--card); color: var(--text); border-radius: 13px; padding: 11px 15px; font: inherit; margin-bottom: 20px; box-shadow: var(--shadow-s); outline: 0; transition: box-shadow .2s, border-color .2s; }
.search:focus { border-color: #c9b9a4; box-shadow: 0 0 0 4px var(--accent-soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.pCard { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 18px; min-height: 140px; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; box-shadow: var(--shadow-s); }
.pCard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line2); }
.pCard .pHead { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.pCard .pIcon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.pCard h3 { margin: 0; font-size: 15.5px; font-weight: 600; }
.pCard p { margin: 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.pCard small { display: block; margin-top: 14px; color: var(--muted); font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 54px 20px; border: 1.5px dashed var(--line2); border-radius: 18px; background: var(--raised); }
.empty .art { font-size: 34px; margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-family: var(--serif); font-size: 20px; font-weight: 500; margin-bottom: 4px; }
.chatList { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; box-shadow: var(--shadow-s); }
.chatList a { display: block; padding: 13px 16px; border-bottom: 1px solid var(--line); transition: background .15s; }
.chatList a:last-child { border-bottom: 0; }
.chatList a:hover { background: var(--raised); }
.chatList b { font-weight: 550; }
.chatList small { display: block; color: var(--muted); font-size: 12.5px; }

.projLayout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; width: 100%; max-width: 1120px; margin: 0 auto; padding: 32px 28px 50px; }
.back { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; margin-bottom: 14px; transition: color .15s; }
.back:hover { color: var(--text); }
.projLayout h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0 0 4px; letter-spacing: -.02em; }
.panel { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow-s); }
.panel h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.panel textarea { width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 11px; padding: 9px 11px; font: 13.5px/1.55 var(--sans); resize: vertical; margin-top: 10px; outline: 0; }
.panel textarea:focus { border-color: #c9b9a4; }
.fileRow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.fileRow:first-child { border-top: 0; }
.fileRow img { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; }
.fileRow .fi { width: 38px; height: 38px; border-radius: 8px; background: var(--bubble); display: grid; place-items: center; font-size: 10px; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.fileRow span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.storeCard { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 16px; box-shadow: var(--shadow-s); }
.storeCard .sTop { display: flex; gap: 12px; align-items: center; }
.storeCard .sLogo { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; }
.storeCard h3 { margin: 0; font-size: 15px; } .storeCard small { color: var(--muted); font-size: 12px; word-break: break-all; }
.storeCard .acts { display: flex; gap: 8px; margin-top: auto; align-items: center; } .storeCard .acts .btn { white-space: nowrap; }
.addStore { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.addStore button { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 9px 13px; display: inline-flex; align-items: center; gap: 8px; font-weight: 550; font-size: 13.5px; transition: transform .15s var(--ease), box-shadow .15s; }
.addStore button:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.addStore i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; }
.note { font-size: 13px; color: var(--text2); background: var(--raised); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 22px; }

dialog { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 20px; width: min(580px, 94vw); padding: 0; box-shadow: var(--shadow-l); }
dialog[open] { animation: rise .25s var(--ease); }
dialog::backdrop { background: rgba(20,16,10,.35); backdrop-filter: blur(2px); }
.dlg { padding: 22px 24px; max-height: 86vh; overflow-y: auto; }
.dlgHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.dlgHead h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 25px; letter-spacing: -.015em; }
.lbl { display: block; font-size: 13.5px; font-weight: 550; margin-top: 16px; }
.lbl input, .lbl textarea, .lbl select { display: block; width: 100%; margin-top: 6px; border: 1px solid var(--line2); background: var(--bg); color: var(--text); border-radius: 11px; padding: 10px 12px; font: 14px var(--sans); outline: 0; }
.lbl input:focus, .lbl textarea:focus { border-color: #c9b9a4; box-shadow: 0 0 0 3px var(--accent-soft); }
.keyGroup { margin-top: 16px; font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.keyRow { display: grid; gap: 5px; padding: 10px 0; border-top: 1px solid var(--line); }
.keyRow label { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 550; align-items: center; }
.keyRow label span { font-weight: 500; color: var(--muted); font-size: 12px; text-align: right; }
.keyRow label span.set { color: var(--ok); background: var(--ok-soft); padding: 1px 8px; border-radius: 99px; }
.keyRow input { border: 1px solid var(--line2); background: var(--bg); color: var(--text); border-radius: 10px; padding: 8px 11px; font: 13.5px var(--sans); outline: 0; }
.keyRow input:focus { border-color: #c9b9a4; }
.dlgActions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

@media (max-width: 900px) { .projLayout { grid-template-columns: 1fr; } .live { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .mobileOnly { display: grid; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; transform: translateX(-100%); box-shadow: var(--shadow-l); }
  .sidebar.open { transform: none; }
  .menuBtn { position: fixed; top: 10px; left: 10px; z-index: 10; background: var(--bg); box-shadow: var(--shadow-s); }
  .chatHead { padding-left: 54px; }
  .page, .projLayout { padding: 60px 16px 40px; }
  .thread { padding: 8px 16px 24px; }
  .bottomComposer { padding: 16px 12px; }
  .suggest { grid-template-columns: 1fr; }
  .out, .tMeta, .err, .approval, .live { margin-left: 0; }
  .aMsg > .mark { display: none; }
}

/* ---------- plans, auth, private, compare, schedules, admin ---------- */
.planPill { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; padding: 1px 7px; border-radius: 99px; background: var(--bubble); color: var(--text2); vertical-align: 1px; }
.planPill.advanced { background: #e3ecfb; color: #2d5bd7; } .planPill.premium { background: linear-gradient(120deg, #f6e5d8, #efe0f7); color: #8a3fa8; }
@media (prefers-color-scheme: dark) { .planPill.advanced { background: #23304d; color: #9db6f5; } .planPill.premium { background: #3d2a44; color: #e0aef3; } }
#toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow-l); animation: rise .25s var(--ease); max-width: min(520px, 92vw); transition: opacity .3s, transform .3s; }
.toast.ok { background: var(--ok); color: #fff; } .toast.bad { background: var(--bad); color: #fff; } .toast.warn { background: #8a5a06; color: #fff; }
.toast.out { opacity: 0; transform: translateY(-6px); }

body.authMode .app { display: none; }
#authView { min-height: 100vh; display: flex; }
.authWrap { flex: 1; display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.authSide { background: radial-gradient(700px 400px at 20% 0%, var(--accent-soft), transparent 70%), var(--side); padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; gap: 18px; border-right: 1px solid var(--line); }
.authSide h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.12; letter-spacing: -.025em; margin: 10px 0 0; }
.authSide > p { color: var(--text2); font-size: 16px; max-width: 520px; margin: 0; }
.authTiers { display: grid; gap: 10px; max-width: 460px; margin-top: 8px; }
.authTier { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-s); }
.authTier div { display: flex; justify-content: space-between; } .authTier b { font-weight: 600; } .authTier span { color: var(--accent); font-weight: 650; } .authTier small { color: var(--muted); }
.authCard { align-self: center; justify-self: center; width: min(420px, 92vw); padding: 40px 0; text-align: left; }
.authCard h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 18px 0 4px; letter-spacing: -.02em; }
.authBtn { width: 100%; justify-content: center; margin-top: 18px; padding: 11px; font-size: 15px; }
.authErr { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 10px; }
.authSwitch { text-align: center; margin-top: 18px; } .authSwitch a { color: var(--accent); font-weight: 600; }

.lockCard { max-width: 460px; margin: 8vh auto 0; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 36px 32px; box-shadow: var(--shadow-l); }
.lockIcon { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 10px; display: grid; place-items: center; font-size: 30px; background: linear-gradient(140deg, #3b3a36, #191814); box-shadow: var(--shadow); }
.lockCard h1 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 8px 0 6px; }
.pinForm { display: grid; gap: 10px; margin-top: 20px; }
.pinForm input { text-align: center; font-size: 22px; letter-spacing: .35em; border: 1px solid var(--line2); background: var(--bg); color: var(--text); border-radius: 12px; padding: 12px; outline: 0; }
.pinForm input::placeholder { font-size: 14px; letter-spacing: 0; }
.pinForm input:focus { border-color: #c9b9a4; box-shadow: 0 0 0 4px var(--accent-soft); }
.pinForm .btn { justify-content: center; padding: 11px; }

.page.wide { max-width: 1180px; }
.modelPick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mChip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line2); background: var(--card); border-radius: 99px; padding: 6px 12px; font-size: 13px; cursor: pointer; transition: background .15s; }
.mChip:hover { background: var(--hover); } .mChip.off { opacity: .5; cursor: default; }
.mChip input { accent-color: var(--accent); }
.cmpGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 18px; }
.cmpCol { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-s); min-width: 0; animation: rise .3s var(--ease); }
.cmpHead { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 10px; }

.schedForm textarea { margin-top: 8px; }
.schedRow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 6px; }
.schedRow select, .schedRow input:not([type=checkbox]) { border: 1px solid var(--line2); background: var(--bg); color: var(--text); border-radius: 10px; padding: 7px 10px; font: inherit; font-size: 13.5px; }
.schedRow input[name=email], .schedRow input[name=password], .schedRow input[name=name] { flex: 1; min-width: 150px; }
.schedItem { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.schedItem:last-child { border-bottom: 0; }
.schedItem small { display: block; color: var(--muted); font-size: 12.5px; }

.planGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.planCard { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.planCard.advanced { border-color: #b8c9f0; } .planCard.premium { background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 50%, var(--card)), var(--card)); }
.planCard.current { outline: 2px solid var(--accent); }
.planCard h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 0; }
.planCard .price { font-size: 30px; font-weight: 700; margin: 6px 0 2px; letter-spacing: -.02em; }
.planCard ul { padding: 0; list-style: none; margin: 14px 0 20px; flex: 1; display: grid; gap: 8px; font-size: 14px; }
.planCard li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 8px; }
.planCard .btn { justify-content: center; }
.ribbon { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700; background: #2d5bd7; color: #fff; border-radius: 99px; padding: 2px 9px; }

.statRow { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-s); }
.stat span { color: var(--muted); font-size: 12.5px; } .stat b { display: block; font-size: 26px; font-weight: 650; letter-spacing: -.02em; }
.tableWrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow-s); }
.uTable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.uTable th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--raised); }
.uTable td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.uTable tr:last-child td { border-bottom: 0; }
.uTable small { display: block; color: var(--muted); }
.uTable tr.dis { opacity: .55; }
.uTable select { border: 1px solid var(--line2); background: var(--bg); color: var(--text); border-radius: 8px; padding: 4px 6px; font: inherit; font-size: 13px; }
.uTable .acts { text-align: right; white-space: nowrap; } .uTable .acts .btn { margin-left: 6px; }
@media (max-width: 860px) { .authWrap { grid-template-columns: 1fr; } .authSide { padding: 32px 22px; border-right: 0; border-bottom: 1px solid var(--line); } .authTiers { display: none; } }

/* phone fixes */
@media (max-width: 640px) {
  .pageHead { flex-direction: column; align-items: stretch; }
  .pageHead > div:last-child:not(:first-child) { justify-content: flex-start; flex-wrap: wrap; }
  .pageHead h1 { font-size: 30px; }
  .schedItem { flex-wrap: wrap; }
  .schedItem > div:first-child { flex: 1 1 100% !important; }
  .statRow { grid-template-columns: 1fr 1fr !important; }
  .uTable td.acts { white-space: normal; }
  .addUser .schedRow > * { flex: 1 1 100%; }
}
.chatList .schedItem a.btn { display: inline-flex; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.authTabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; margin-top: 4px; }
.authTabs button { border: 0; background: transparent; padding: 9px 10px; border-radius: 9px; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.authTabs button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-s); }
