/* LayerCode's shared visual language. Keep product screens aligned with the landing page. */
:root {
  color-scheme: light;
  --ink: #161616; --muted: #656565; --line: #e5e5e5;
  --surface: #f1f4f5; --paper: #fff; --wash: #f5f7f8;
  --glass: rgba(255,255,255,.68); --glass-edge: rgba(255,255,255,.9);
  --glass-shadow: 0 18px 60px #2536440c, inset 0 1px 0 #ffffff;
  --blue: #161616; --blue-dark: #393939; --blue-soft: #f3f3f3;
  --accent: #161616; --accent-dark: #393939; --accent-soft: #f6f6f6;
  --navy: #161616;
  --font: Inter, "Noto Sans JP", "Hiragino Sans", sans-serif;
}
html, body { background: #fff; color: var(--ink); }
body { font-family: var(--font); font-size: 16px; line-height: 1.8; }
button, input, select, textarea { font-family: inherit; }
::selection { background: #ddd; color: #111; }
:focus-visible { outline: 2px solid #222; outline-offset: 4px; }
.brand, .doc-brand { color: var(--ink); font-size: 24px; font-weight: 600; letter-spacing: -.04em; }
.brand-mark, .brand img, .doc-brand img { filter: grayscale(1) brightness(0); box-shadow: none; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 500; }
.eyebrow > span { display: none; }
.portal-shell { background: #fff; padding: 48px 24px; }
.portal-card { border: 0; border-radius: 0; box-shadow: none; background: #fff; padding: 36px; }
.portal-brand { margin-bottom: 52px; }
.portal-card h1 { color: var(--ink); font-size: clamp(30px,4vw,40px); font-weight: 500; line-height: 1.45; letter-spacing: -.05em; }
.portal-copy { color: var(--muted); font-size: 15px; line-height: 1.8; }
.portal-copy strong, .profile strong { color: var(--ink); }
.primary { min-height: 52px; border-radius: 999px; background: var(--ink); box-shadow: none; font-size: 15px; font-weight: 500; transition: background .2s; }
.primary:hover { background: #393939; }
.secondary, .auth-switch { color: var(--muted); font-size: 14px; }
.auth-switch a { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.security, .auth-caption { color: var(--muted); font-size: 12px; }
.auth-form { gap: 20px; }
.auth-field { color: #414141; font-size: 14px; font-weight: 500; }
.auth-field input { min-height: 54px; color: var(--ink); border: 1px solid #d9d9d9; border-radius: 10px; background: #fff; font-size: 16px; }
.auth-field input:focus { border-color: #333; background: #fff; box-shadow: 0 0 0 2px #ededed; }
.auth-field input::placeholder { color: #858585; }
.auth-separator { color: #777; font-size: 12px; margin-top: 24px; }
.auth-separator::before, .auth-separator::after { background: var(--line); }
.error, .auth-error { font-size: 14px; }
.code-box, .profile { background: var(--surface); border-color: var(--line); border-radius: 10px; }
.code-box strong { color: var(--ink); }
.code-box span, .profile span { color: var(--muted); font-size: 13px; }
.success-mark { color: var(--ink); background: var(--surface); }
.portal-shell.dashboard-shell { padding: 0; background: #fff; }
.portal-card.dashboard-card { width: 100%; max-width: none; min-height: 100svh; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.dashboard-card #portal-content, .dashboard-layout { min-height: 100svh; }
.dashboard-layout { grid-template-columns: 250px minmax(0,1fr); }
.dashboard-sidebar { padding: 34px 18px 22px; background: #f7f7f7; border-color: var(--line); }
.dashboard-brand { margin: 0 12px 46px; font-size: 22px; }
.dashboard-brand .brand-mark { width: 29px; height: 29px; }
.dashboard-nav { gap: 6px; }
.dashboard-nav button { color: #656565; font-size: 14px; font-weight: 500; border-radius: 8px; }
.dashboard-nav button:hover { color: var(--ink); background: #ededed; }
.dashboard-nav button.is-active { color: var(--ink); background: #e8e8e8; }
.dashboard-nav button > span, .dashboard-nav button.is-active > span { color: inherit; font-weight: 400; }
.dashboard-user { border-color: var(--line); }
.dashboard-avatar { background: #222; border-radius: 50%; font-weight: 500; }
.dashboard-user strong { color: #414141; font-size: 13px; font-weight: 500; }
.dashboard-user small { color: var(--muted); font-size: 12px; }
.dashboard-logout { color: var(--muted); font-size: 13px; font-weight: 400; }
.dashboard-main { padding: 48px clamp(24px,5vw,76px) 64px; }
.dashboard-head { border-color: var(--line); margin-bottom: 36px; }
.dashboard-head h1 { color: var(--ink); font-weight: 500; font-size: 34px; }
.dashboard-head p { color: var(--muted); font-size: 14px; }
.account-status { color: var(--muted); font-size: 12px; letter-spacing: 0; font-weight: 400; }
.account-status i { background: #555; box-shadow: none; }
.dashboard-stats, .dashboard-stats article, .dashboard-stats article:last-child { border-color: var(--line); }
.dashboard-stats article { min-height: 220px; padding: 28px; }
.dashboard-stats article > span, .panel-heading span { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .04em; }
.dashboard-stats article > strong { color: var(--ink); font-weight: 500; }
.dashboard-stats article > p, .dashboard-stats article > b { color: var(--muted); font-size: 14px; font-weight: 400; }
.dashboard-stats .token-balance { background: #f6f6f6; }
.dashboard-stats .token-balance > strong { color: var(--ink); font-size: clamp(44px,5vw,64px); }
.dashboard-panel { background: #fff; border-color: var(--line); border-radius: 10px; box-shadow: none; }
.panel-heading { border-color: var(--line); }
.panel-heading h2 { color: var(--ink); font-size: 22px; font-weight: 500; }
.panel-heading > b { color: var(--muted); font-size: 12px; font-weight: 400; }
.usage-list li { border-color: var(--line); color: #555; font-size: 14px; grid-template-columns: minmax(80px,1fr) auto auto; }
.usage-model { color: var(--ink); font-weight: 500; }
.usage-tokens, .usage-list time, .usage-list .usage-empty { color: var(--muted); }
.start-panel { background: var(--surface); }
.start-panel > p { color: var(--muted); font-size: 14px; }
.dashboard-command { color: var(--ink); background: #fff; border-color: #ddd; font-size: 14px; font-weight: 400; }
.dashboard-command span { color: #777; }
.token-detail, .connection-detail { border-color: var(--line); border-radius: 10px; background: #fff; }
.token-detail-balance { background: var(--surface); }
.token-detail-balance > span, .token-detail-action > span { color: var(--muted); font-size: 12px; font-weight: 500; }
.token-detail-balance strong { color: var(--ink); font-weight: 500; }
.token-detail-balance p, .token-detail-action > p { color: var(--muted); font-size: 15px; }
.token-detail-action h2 { color: var(--ink); font-weight: 500; }
.token-rules p { border-color: var(--line); }
.token-rules b { color: var(--ink); font-size: 14px; font-weight: 500; }
.token-rules span { color: var(--muted); font-size: 13px; }
.usage-summary article { border-color: var(--line); background: var(--surface); border-radius: 10px; }
.usage-summary span, .usage-summary p { color: var(--muted); font-size: 13px; font-weight: 400; }
.usage-summary strong { color: var(--ink); font-weight: 500; }
.connection-detail-status { border-color: var(--line); background: var(--surface); }
.connection-detail-status small { color: var(--muted); font-size: 12px; font-weight: 400; }
.connection-detail-status h2, .connection-detail-body h3 { color: var(--ink); font-weight: 500; }
.connection-detail-status p, .connection-detail-body > p, .dashboard-error p:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.dashboard-loading span { background: linear-gradient(100deg,#f2f2f2 20%,#fafafa 40%,#f2f2f2 60%); background-size: 220% 100%; }
.doc-nav { background: rgba(255,255,255,.96); border-color: var(--line); backdrop-filter: none; }
.doc-nav nav a { color: var(--muted); font-size: 14px; font-weight: 400; }
.doc-nav nav a:hover { color: var(--ink); }
.doc-nav .doc-cta { color: #fff; background: var(--ink); border-radius: 999px; }
.doc-kicker { color: var(--muted); font-size: 12px; font-weight: 400; }
.doc-hero h1, .article-header h1 { font-weight: 500; line-height: 1.35; }
.doc-hero p, .article-header p, .article p, .article li { color: #555; font-size: 16px; }
.doc-index { border-color: var(--line); border-radius: 10px; }
.doc-index a:hover { background: var(--surface); }
.doc-index small, .doc-index span { color: var(--muted); font-size: 14px; }
.doc-index strong { font-weight: 500; }
.article { border: 0; border-radius: 0; padding-top: 16px; box-shadow: none; }
.article h2, .article h3 { color: var(--ink); font-weight: 500; }
.article-toc a, .article-toc small { color: var(--muted); font-size: 14px; font-weight: 400; }
.article code { color: var(--ink); background: #f3f3f3; }
.article pre { color: #f5f5f5; background: #161616; }
.article pre code { color: inherit; background: none; }
.note { border: 0; border-radius: 8px; color: #555; background: var(--surface); font-size: 15px; }
.flow-list li, .spec-table th, .spec-table td { border-color: var(--line); }
.flow-list li::before { color: var(--ink); font-weight: 500; }
.spec-table { font-size: 14px; }
.spec-table th { color: var(--ink); font-weight: 500; }
.spec-table td { color: #555; }
.related a { color: var(--ink); background: var(--surface); border-color: var(--line); font-size: 14px; font-weight: 400; }
.related a:hover { border-color: #aaa; color: var(--ink); }
.legal-meta { color: var(--muted); font-size: 12px; }
.doc-footer { background: #fff; color: var(--muted); border-color: var(--line); }
.doc-footer a, .doc-footer p { font-size: 12px; font-weight: 400; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.chat-panel { max-width: 880px; margin: 0 auto; min-height: min(660px,75svh); display: flex; flex-direction: column; }
.chat-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 15px; }
.chat-toolbar > span { font-weight: 500; }
.chat-toolbar button { padding: 8px 15px; background: #f6f6f6; border: 0; border-radius: 999px; color: #555; font-size: 14px; cursor: pointer; }
.chat-messages { flex: 1; max-height: 56svh; min-height: 280px; overflow-y: auto; padding: 28px 4px; overscroll-behavior: contain; }
.chat-empty { min-height: 280px; display: grid; place-items: center; text-align: center; }
.chat-empty h2 { font-size: clamp(25px,3vw,34px); font-weight: 500; letter-spacing: -.05em; }
.chat-message { display: flex; margin: 0 0 26px; color: #161616; font-size: 16px; line-height: 1.9; }
.chat-message > div { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-user { justify-content: flex-end; }
.chat-user > div { max-width: 85%; background: #f3f3f3; padding: 12px 20px; border-radius: 20px; }
.chat-composer { display: flex; align-items: flex-end; gap: 14px; border: 1px solid #e2e2e2; background: #f7f7f7; border-radius: 24px; padding: 17px 18px; }
.chat-composer:focus-within { border-color: #888; }
.chat-composer textarea { flex: 1; min-width: 0; resize: vertical; min-height: 56px; max-height: 220px; background: transparent; border: 0; outline: none; color: #161616; font-size: 16px; line-height: 1.7; }
.chat-composer button { flex: 0 0 38px; height: 38px; border: 0; border-radius: 50%; background: #161616; color: #fff; font-size: 25px; cursor: pointer; }
.chat-composer button:disabled, .chat-toolbar button:disabled { opacity: .35; cursor: default; }
.chat-status { min-height: 22px; margin: 10px 4px 0; font-size: 14px; color: #656565; }
.chat-note { margin: 4px 0 0; color: #777; font-size: 12px; text-align: center; }
@media (max-width: 1000px) { .dashboard-layout { grid-template-columns: 210px minmax(0,1fr); } }
@media (max-width: 650px) {
  .portal-shell { padding: 24px 16px; }
  .portal-card { padding: 24px 8px; }
  .dashboard-layout { display: block; }
  .dashboard-sidebar { padding: 20px 16px 0; background: #f7f7f7; backdrop-filter: none; }
  .dashboard-brand { margin: 0; }
  .dashboard-nav button { border-radius: 8px 8px 0 0; font-size: 14px; }
  .dashboard-main { padding: 28px 20px 48px; }
  .dashboard-head h1 { font-size: 30px; }
  .account-status { display: none; }
  .dashboard-stats article { min-height: 180px; }
  .token-detail-balance { padding: 28px; }
  .usage-list li { grid-template-columns: 1fr auto; column-gap: 10px; font-size: 13px; }
  .doc-nav .doc-cta { font-size: 13px; }
  .article { padding: 28px 10px 48px; }
}
.account-chat-link { padding: 12px; margin-bottom: 18px; font-size: 14px; color: #161616; text-decoration: none; }
/* Account navigation stays put; only the right-hand content scrolls. */
.portal-shell.dashboard-shell { height: 100dvh; min-height: 0; overflow: hidden; }
.portal-card.dashboard-card, .dashboard-card #portal-content, .dashboard-layout { height: 100%; min-height: 0; }
.dashboard-layout { grid-template-rows: minmax(0,1fr); }
.dashboard-sidebar { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.dashboard-sidebar > * { flex-shrink: 0; }
.dashboard-main { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-behavior: auto; }
.dashboard-view { animation: none; transform: none; }
.dashboard-nav button { transition: background .15s, color .15s; }
[data-reward-message] { margin: 12px 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 650px) {
  .dashboard-layout { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); }
  .dashboard-sidebar { position: static; max-height: 45dvh; }
  .dashboard-sidebar .account-chat-link { grid-column: 1; grid-row: 2; margin: 4px 0 0; padding: 6px 0; }
  .dashboard-sidebar .dashboard-nav { grid-row: 3; margin-top: 4px; }
}
/* The chat is its own working surface, not a dashboard card. */
.portal-shell.chat-shell { display: block; padding: 0; height: 100dvh; min-height: 0; overflow: hidden; }
.portal-card.chat-card { width: 100%; max-width: none; height: 100%; padding: 0; margin: 0; }
.chat-card > .portal-brand { display: none; }
.chat-card #portal-content { height: 100%; }
.chat-workspace { display: grid; grid-template-columns: 260px minmax(0,1fr); height: 100%; background: #fff; letter-spacing: 0; }
.chat-workspace button, .chat-workspace a { -webkit-tap-highlight-color: transparent; }
.chat-sidebar { min-height: 0; display: flex; flex-direction: column; padding: 22px 12px 14px; background: #f7f7f7; }
.chat-sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 25px; }
.chat-wordmark { font-size: 20px; font-weight: 600; color: #181818; text-decoration: none; letter-spacing: -.04em; }
.chat-sidebar-top button { display: none; }
.chat-new { display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; border-radius: 8px; background: transparent; color: #222; font-size: 14px; text-align: left; cursor: pointer; }
.chat-new > span { font-size: 23px; line-height: 1; }
.chat-session-list { flex: 1; min-height: 0; overflow: auto; padding-top: 28px; }
.chat-session-list button { display: block; width: 100%; padding: 10px 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border: 0; border-radius: 8px; background: transparent; color: #454545; text-align: left; font-size: 14px; cursor: pointer; }
.chat-session-list button.is-active, .chat-session-list button:hover, .chat-new:hover, .chat-sidebar-bottom a:hover { background: #ebebeb; }
.chat-sidebar-bottom { display: grid; gap: 2px; padding-top: 16px; }
.chat-sidebar-bottom a { padding: 10px 12px; border-radius: 8px; color: #454545; font-size: 14px; text-decoration: none; }
.chat-sidebar-bottom .chat-profile { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.chat-profile-avatar { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #ddd; color: #333; font-size: 14px; }
.chat-profile-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.chat-topbar { flex: 0 0 64px; display: flex; align-items: center; gap: 14px; padding: 0 26px; }
.chat-topbar > span { font-size: 20px; font-weight: 500; color: #555; }
.chat-topbar > a { margin-left: auto; color: #666; font-size: 14px; text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.chat-topbar > button { display: none; }
.chat-stage { flex: 1; min-height: 0; }
.chat-workspace .chat-panel { width: 100%; max-width: none; height: 100%; min-height: 0; margin: 0; }
.chat-workspace .chat-toolbar { display: flex; flex: 0 0 auto; padding: 10px 24px; gap: 12px; }
.chat-workspace .chat-toolbar [data-new-chat] { display: none; }
.chat-model-label { display: block; font-size: 12px; color: #637480; margin-bottom: 8px; }
.chat-workspace .chat-messages { flex: 1; min-height: 0; max-height: none; padding: 28px max(24px,calc((100% - 760px)/2)); scrollbar-gutter: stable; }
.chat-workspace .chat-message { margin-bottom: 32px; line-height: 1.9; }
.chat-workspace .chat-composer { flex: 0 0 auto; width: calc(100% - 48px); max-width: 760px; margin: 0 auto; padding: 15px 17px 13px 23px; border-color: #e8e8e8; background: #f4f4f4; border-radius: 26px; box-shadow: 0 2px 8px #00000004; }
.chat-workspace .chat-composer textarea { min-height: 52px; resize: none; }
.chat-workspace .chat-status { flex: 0 0 auto; min-height: 0; width: calc(100% - 48px); max-width: 760px; margin: 8px auto 0; }
.chat-workspace .chat-status:empty { display: none; }
.chat-workspace .chat-note { flex: 0 0 auto; margin: 10px 24px 14px; font-size: 12px; }
.chat-workspace .is-empty .chat-messages { flex: 0 0 auto; overflow: visible; padding-top: 0; padding-bottom: 28px; margin-top: clamp(40px,22dvh,240px); }
.chat-workspace .chat-empty { min-height: 0; }
.chat-workspace .chat-empty h2 { margin: 0; font-weight: 500; font-size: clamp(26px,3vw,34px); line-height: 1.5; letter-spacing: -.04em; }
.chat-workspace .is-empty .chat-note { margin-top: 16px; }
.chat-backdrop { display: none; }
@media (max-width: 760px) {
  .chat-workspace { grid-template-columns: minmax(0,1fr); }
  .chat-sidebar { position: fixed; z-index: 102; inset: 0 auto 0 0; width: min(290px,85vw); transform: translateX(-100%); visibility: hidden; transition: transform .18s ease, visibility .18s; }
  .sidebar-open .chat-sidebar { visibility: visible; transform: translateX(0); }
  .chat-topbar { padding: 0 16px; flex-basis: 58px; }
  .chat-topbar > button, .chat-sidebar-top button { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 8px; color: #333; background: transparent; font-size: 23px; cursor: pointer; }
  .chat-backdrop:not([hidden]) { display: block; position: fixed; z-index: 101; inset: 0; border: 0; background: #0005; }
  .chat-workspace .chat-messages { padding: 20px; }
  .chat-workspace .chat-composer { width: calc(100% - 28px); }
  .chat-workspace .chat-note { margin-bottom: max(12px,env(safe-area-inset-bottom)); }
  .chat-workspace .is-empty .chat-messages { margin-top: 18dvh; }
}
/* Liquid surfaces: stationary atmosphere, translucent controls, opaque reading areas.
   No mouse tracking, full-screen filters, or animated backdrop blur. */
html { background: #f5f7f8; }
body { background: radial-gradient(ellipse at 13% 12%,#dce8eb 0,transparent 38%),radial-gradient(ellipse at 90% 28%,#e1e6f4 0,transparent 40%),linear-gradient(145deg,#f9fbfc,#eef2f3 65%,#f9fafb); }
.site-nav { position: relative; z-index: 10; max-width: 1200px; margin: 20px auto 0; min-height: 72px; padding: 14px 24px; border: 1px solid var(--glass-edge); border-radius: 24px; background: var(--glass); box-shadow: var(--glass-shadow); backdrop-filter: blur(18px) saturate(1.25); -webkit-backdrop-filter: blur(18px) saturate(1.25); }
.site-nav .brand { font-size: 23px; }
.site-nav .nav-join { background: #20272c; color: #fff; font-weight: 500; }
.site-nav .nav-join:hover { background: #37444e; }
.hero-inner { max-width: 1120px; padding: 84px 32px 52px; }
.launch-label { display: none; }
.hero h1 { font-size: clamp(44px,6.2vw,82px); font-weight: 600; line-height: 1.26; letter-spacing: -.065em; color: #19232b; }
.hero-description { margin: 24px 0 28px; font-size: 20px; color: #55616a; }
.model-names { gap: 10px; }
.model-names > span { padding: 10px 17px; border: 1px solid #fff; border-radius: 999px; background: #ffffff75; box-shadow: inset 0 1px 0 #fff,0 3px 12px #273b4b05; color: #3d4a54; font-size: 15px; }
.model-names .and-more { border: 0; box-shadow: none; background: none; color: #616d76; }
.model-bar p { color: #64717b; font-size: 13px; }
.primary-button, .primary { background: #20272c; color: white; box-shadow: inset 0 1px 0 #ffffff28,0 6px 18px #182d4020; }
.primary-button:hover, .primary:hover { background: #37444e; }
.secondary-button { border: 1px solid white; background: #ffffff8c; box-shadow: var(--glass-shadow); }
.hero-actions .primary-button, .hero-actions .secondary-button { min-height: 56px; padding: 14px 28px; font-size: 16px; }
.platforms { margin-top: 26px; }
.platforms span { color: #65707a; }
.product-preview { max-width: 1180px; padding: 0 28px; margin: 4px auto 90px; }
.product-preview-frame { padding: 18px; border: 1px solid white; border-radius: 30px; background: #ffffff65; box-shadow: 0 28px 70px #20374515,inset 0 1px 0 #fff; }
.product-preview img { border: 1px solid #ffffff7a; border-radius: 18px; }
.product-preview figcaption { color: #626f77; font-size: 13px; }
.install-section { max-width: 1180px; }
.install-option { border: 1px solid var(--glass-edge); border-radius: 24px; background: var(--glass); box-shadow: var(--glass-shadow); }
.install-heading h2, .manifesto h2, .faq-inner h2 { color: #1f2b34; font-weight: 600; }
.install-command { gap: 20px; }
.install-command button { border-color: #fff; background: #fff9; box-shadow: 0 2px 6px #2037450a; }
.manifesto { background: #ffffff70; border-block: 1px solid #fff; }
.manifesto-copy p { color: #56626a; }
.faq-list details { border-color: #dbe2e6; }
.site-footer { border-color: #dbe2e6; }
.portal-shell { background: transparent; }
.portal-card { border: 1px solid var(--glass-edge); border-radius: 30px; background: var(--glass); box-shadow: var(--glass-shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.auth-field input { border-color: #dce3e7; background: #ffffffc9; border-radius: 14px; }
.auth-field input:focus { border-color: #8296a5; box-shadow: 0 0 0 3px #8296a51f; }
.portal-shell.dashboard-shell, .portal-shell.chat-shell { background: transparent; padding: 12px; }
.portal-card.dashboard-card, .portal-card.chat-card { height: 100%; min-height: 0; border: 1px solid #fff; border-radius: 26px; overflow: hidden; background: #ffffff8c; box-shadow: var(--glass-shadow); backdrop-filter: none; -webkit-backdrop-filter: none; }
.dashboard-card #portal-content, .dashboard-layout { min-height: 0; }
.dashboard-sidebar, .chat-sidebar { background: #f3f6f8b8; border-right: 1px solid #fff; }
.dashboard-main, .chat-main { background: #ffffffb3; }
.dashboard-nav button, .chat-new, .chat-session-list button, .chat-sidebar-bottom a { border-radius: 12px; }
.dashboard-nav button.is-active, .chat-session-list button.is-active { background: #fff; box-shadow: 0 3px 12px #20374509; }
.dashboard-nav button:hover, .chat-session-list button:hover, .chat-new:hover, .chat-sidebar-bottom a:hover { background: #ffffffb0; }
.dashboard-panel, .token-detail, .connection-detail { border: 1px solid #e1e7eb; border-radius: 20px; background: #ffffffb3; }
.dashboard-stats { gap: 14px; border: 0; }
.dashboard-stats article, .dashboard-stats article:last-child { border: 1px solid #e1e7eb; border-radius: 20px; background: #fff9; }
.dashboard-stats .token-balance, .token-detail-balance { background: linear-gradient(120deg,#edf3f5,#f1f0f8); }
.dashboard-command { border-color: #e1e7eb; border-radius: 14px; }
.dashboard-avatar, .chat-profile-avatar { color: #fff; background: #344651; }
.chat-workspace { background: transparent; }
.chat-topbar { border-bottom: 1px solid #e5ebee80; }
.chat-topbar > span { color: #354551; }
.chat-workspace .chat-composer { background: #ffffffbd; border: 1px solid #fff; box-shadow: 0 8px 40px #263f5210,inset 0 1px 0 #fff; border-radius: 26px; }
.chat-workspace .chat-user > div { background: #eaf0f3; color: #23333e; border-radius: 22px; }
.chat-workspace .chat-empty h2 { font-size: clamp(28px,3.4vw,42px); font-weight: 500; color: #23333e; }
.chat-model-picker { position: relative; min-width: 0; margin-right: auto; }
.chat-toolbar .chat-model-trigger { display: flex; align-items: center; gap: 12px; max-width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: #202020; font: inherit; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.025em; transition: background .15s, border-color .15s; }
.chat-model-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-model-chevron { flex: 0 0 16px; color: #737373; transition: transform .15s; }
.chat-toolbar .chat-model-trigger:hover, .chat-toolbar .chat-model-trigger[aria-expanded="true"] { background: #ffffffc9; border-color: #e9e9e9; }
.chat-model-trigger[aria-expanded="true"] .chat-model-chevron { transform: rotate(180deg); }
.chat-model-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; width: min(320px,calc(100vw - 64px)); max-height: min(420px,50dvh); overflow-y: auto; padding: 7px; border: 1px solid #fff; border-radius: 20px; background: #fffffff5; box-shadow: 0 18px 50px #00000012,0 2px 8px #00000008,inset 0 0 0 1px #00000004; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.chat-model-menu[hidden] { display: none; }
.chat-toolbar .chat-model-option { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 54px; padding: 12px; border: 0; border-radius: 13px; background: transparent; color: #252525; font: inherit; font-size: .9375rem; text-align: left; }
.chat-model-icon { flex: 0 0 22px; width: 22px; height: 22px; object-fit: contain; filter: grayscale(1); }
.chat-model-option-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.chat-model-check { flex: 0 0 auto; font-size: 1rem; opacity: 0; }
.chat-model-option[aria-checked="true"] .chat-model-check { opacity: 1; }
.chat-toolbar .chat-model-option[aria-checked="true"] { background: #f2f2f2; }
.chat-toolbar .chat-model-option:not(:disabled):hover, .chat-toolbar .chat-model-option:focus-visible { background: #eaeaea; }
.chat-toolbar .chat-model-option:disabled { opacity: .45; }
.chat-model-option:disabled .chat-model-check { opacity: 1; font-size: .8125rem; }
.chat-toolbar .chat-model-trigger:focus-visible, .chat-toolbar .chat-model-option:focus-visible { outline: 2px solid #606060; outline-offset: 2px; }
@media (prefers-reduced-transparency: reduce) { .chat-model-menu { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; } }
.doc-nav { background: #ffffffb8; border-color: #fff; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.article { border: 1px solid #fff; border-radius: 26px; background: #ffffffd9; padding: 44px; box-shadow: var(--glass-shadow); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-nav, .portal-card, .doc-nav { background: #f9fbfc; }
}
@media (max-width: 1250px) { .site-nav { margin-inline: 24px; } }
@media (max-width: 760px) {
  .site-nav { margin: 12px 16px 0; padding: 12px 16px; min-height: 64px; border-radius: 20px; }
  .site-nav nav { gap: 12px; }
  .hero-inner { padding: 56px 22px 32px; }
  .hero h1 { font-size: clamp(40px,8.3vw,62px); }
  .hero-description { font-size: 17px; }
  .product-preview { padding: 0 16px; margin-bottom: 54px; }
  .product-preview-frame { padding: 10px; border-radius: 20px; }
  .product-preview img { border-radius: 12px; }
  .portal-shell.dashboard-shell, .portal-shell.chat-shell { padding: 0; }
  .portal-card.dashboard-card, .portal-card.chat-card { border: 0; border-radius: 0; }
  .chat-sidebar { background: #f4f7f9; }
  .article { padding: 26px 20px; border-radius: 20px; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-nav, .portal-card, .doc-nav, .install-option, .chat-sidebar, .dashboard-sidebar { background: #f8fafb; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .chat-main, .dashboard-main, .chat-workspace .chat-composer { background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
.welcome-notice { flex: 0 0 auto; margin: 0 20px 8px; padding: 10px 14px; border: 1px solid #e3e7ea; border-radius: 12px; background: #f4f7f9; color: #49525a; font-size: 14px; line-height: 1.65; }
.welcome-notice a { color: #20252a; text-decoration: underline; }
.dashboard-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
.dashboard-stats article:last-child { grid-column: auto; }
.portal-shell.chat-shell { padding: 0; background: #fff; }
.portal-card.chat-card { border: 0; border-radius: 0; box-shadow: none; background: #fff; }
.chat-card .chat-main { background: #fff; }
.chat-card .chat-sidebar { background: #f7f7f7; border-right: 1px solid #ededed; }
.chat-card .chat-topbar { border-bottom: 0; }
.chat-card .chat-toolbar-host { flex: 1; min-width: 0; }
.chat-card .chat-toolbar { padding: 0; min-width: 0; }
.chat-card .chat-panel { padding-bottom: 24px; }
.chat-card .chat-composer { background: #f8f8f8; border: 1px solid #e6e6e6; box-shadow: 0 2px 8px #00000004; }
.chat-card .chat-empty h2, .chat-card .chat-topbar a { color: #202020; }
.chat-toolbar [data-delete-chat] { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; background: transparent; color: #777; }
.chat-toolbar [data-delete-chat]:hover { color: #242424; background: #f3f3f3; }
.chat-toolbar [data-delete-chat][hidden] { display: none; }
.chat-history-status { padding: 28px; font-size: 14px; color: #666; }
.workspace-route { height: 100%; min-height: 0; }
.account-dialog { width: min(520px, calc(100vw - 40px)); height: auto; max-width: none; max-height: calc(100dvh - 64px); margin: auto; padding: 0; border: 1px solid #e5e5e5; border-radius: 20px; color: #202020; background: #fff; box-shadow: 0 24px 80px #0003; overflow: hidden; }
.account-dialog::backdrop { background: #0005; }
.account-dialog[open] { display: flex; flex-direction: column; }
.account-dialog-bar { display: flex; align-items: center; justify-content: space-between; flex: 0 0 64px; padding: 0 22px; border-bottom: 1px solid #eee; }
.account-dialog-bar h2 { margin: 0; font-size: 18px; font-weight: 600; }
.account-dialog-bar button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #444; font-size: 28px; cursor: pointer; }
.account-dialog-bar button:hover { background: #f2f2f2; }
.account-dialog :focus-visible { outline: 2px solid #555; outline-offset: 3px; }
.account-dialog > .workspace-route { flex: 1 1 auto; height: auto; min-height: 0; overflow-y: auto; }
.account-settings { width: 100%; max-width: 560px; margin: 0 auto; padding: 28px; color: #202020; text-align: left; box-sizing: border-box; }
.dashboard-card .workspace-route { overflow-y: auto; }
.account-settings .account-chat-link { display: inline-block; margin-bottom: 28px; color: #666; font-size: 14px; }
.account-dialog .account-chat-link { display: none; }
.account-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-identity .dashboard-avatar { flex: 0 0 40px; }
.account-identity > div { min-width: 0; }
.account-identity strong, .account-identity small { display: block; overflow-wrap: anywhere; }
.account-identity strong { font-size: 15px; font-weight: 600; }
.account-identity small { margin-top: 4px; color: #777; font-size: 13px; }
.account-balance { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 28px 0; padding: 24px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.account-balance > span { font-size: 15px; color: #666; }
.account-balance strong { min-width: 0; overflow-wrap: anywhere; font-size: clamp(26px, 6vw, 36px); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.account-earn h2 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.account-earn .primary { width: 100%; min-height: 46px; border-radius: 10px; }
.account-earn [data-reward-message] { margin: 12px 0; font-size: 13px; color: #666; }
.account-earn [data-reward-message]:empty { display: none; }
.account-earn .video-reward-link { margin-top: 12px; }
.account-signout { display: block; margin: 28px 0 0; padding: 14px 0 0; width: 100%; border: 0; border-top: 1px solid #eee; background: transparent; color: #666; text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.account-signout:hover { color: #161616; }
@media (max-width: 640px) {
  .account-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 32px); border-radius: 16px; }
  .account-settings { padding: 22px; }
}
.ad-controls { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 24px; }
.ad-controls button { padding: 2px 0; border: 0; background: none; color: #737373; font: inherit; text-decoration: underline; cursor: pointer; }
.ad-slot { display: flex; justify-content: center; }
.ad-slot iframe { display: block; flex: 0 0 auto; border: 0; }
.context-ad-settings { flex: 0 0 auto; padding: 0 16px 8px; text-align: center; }
.context-ad-settings > button { border: 0; padding: 4px; background: none; color: #737373; font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; }
.context-ad-settings[hidden] { display: none; }
.context-ad { margin-top: 16px; }
.context-ad > small { display: block; margin-bottom: 6px; color: #737373; font-size: 12px; }
.context-ad:not(:has(iframe)):not(.context-ad-agentads) { display: none; }
.context-ad-agentads { padding: 16px 18px; border: 1px solid #e5e5e5; border-radius: 12px; background: #fafafa; }
.context-ad-agentads strong { display: block; font-size: 15px; }
.context-ad-agentads p { margin: 6px 0 10px; font-size: 14px; color: #525252; }
.context-ad-agentads a { color: #171717; font-size: 14px; text-underline-offset: 3px; }
.registration-consent { display: grid; gap: 12px; margin: 20px 0; text-align: left; }
.registration-consent[hidden] { display: none; }
.registration-consent label { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.6; }
.registration-consent input { flex: none; width: 16px; height: 16px; margin-top: 3px; accent-color: #171717; }
.auth-shell { padding: 40px 20px; background: #fff; }
.auth-shell .portal-card { width: min(480px,100%); padding: 32px 40px; border: 0; border-radius: 0; background: #fff; box-shadow: none; backdrop-filter: none; }
.auth-shell .portal-brand { display: flex; justify-content: center; margin-bottom: 40px; }
.auth-shell h1 { margin: 0 0 32px; font-size: clamp(26px,5vw,32px); font-weight: 600; letter-spacing: -.04em; text-align: center; }
.auth-shell [hidden] { display: none !important; }
.auth-shell .google-auth { position: relative; min-height: 44px; margin-bottom: 16px; visibility: visible; opacity: 1; }
.auth-shell #google-button { visibility: hidden; }
.auth-shell .google-auth-ready #google-button { visibility: visible; }
.google-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: 14px; }
.google-auth-ready .google-loading { display: none; }
.email-auth > summary { padding: 11px 16px; border: 1px solid #d9d9d9; border-radius: 4px; color: var(--ink); text-align: center; font-size: 15px; cursor: pointer; list-style: none; }
.email-auth > summary::-webkit-details-marker { display: none; }
.email-auth > summary:hover { background: #f6f6f6; }
.email-auth .auth-form { margin-top: 24px; gap: 16px; }
.auth-shell .auth-field input { border-radius: 8px; background: #fff; }
.auth-shell .primary { border-radius: 8px; font-size: 16px; }
.auth-shell .auth-switch { margin-top: 28px; line-height: 1.8; }
.auth-shell .auth-error { margin-top: 20px; }
.auth-shell .auth-caption { font-size: 14px; margin: 0 0 16px; }
.auth-shell .registration-consent { margin: 0; gap: 24px; }
.auth-shell .registration-consent input { width: 18px; height: 18px; margin: 3px 0 0; }
.auth-shell .registration-consent label { gap: 12px; }
.registration-consent a { color: inherit; text-underline-offset: 3px; }
.registration-ad-option { padding-top: 24px; border-top: 1px solid var(--line); }
.registration-ad-option small { margin-left: 6px; color: var(--muted); font-size: 13px; }
.registration-detail { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.registration-consent .secondary { margin: -8px 0 0; font-size: 14px; }
@media (max-width: 480px) { .auth-shell .portal-card { padding: 24px 0; } }
.earn-options {display:grid;gap:20px;margin-top:20px;}
.earn-options h3 {margin:0 0 8px;font-size:16px;}
.video-reward-link {display:flex;flex-direction:column;gap:8px;padding:18px 20px;margin-top:16px;border:1px solid #ddd;border-radius:14px;text-decoration:none;color:#171717;background:#fff;}
.video-reward-link span {font-size:16px;font-weight:600;}
.video-reward-link small {font-size:14px;color:#737373;}
.video-reward-link:hover {background:#f5f5f5;border-color:#aaa;}
.ad-status { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 14px; padding: 6px 0; }
.ad-status button { border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.ad-status[hidden], .ad-status button[hidden] { display: none; }
.ad-consent { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; margin: 0 auto 8px; max-width: 760px; font-size: 14px; }
.ad-consent p { margin: 0; width: 100%; text-align: center; }
.ad-consent a { color: #555; }
.ad-consent button { border: 1px solid #ddd; border-radius: 7px; padding: 5px 12px; color: #333; background: #fff; font: inherit; cursor: pointer; }
.ad-consent button:hover { background: #f3f3f3; }
.ad-slot[hidden], .ad-consent[hidden] { display: none; }
.navigation-error { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 40px); padding: 12px 18px; border: 1px solid #e5e5e5; border-radius: 12px; background: #fff; color: #444; font-size: 14px; box-shadow: 0 4px 20px #0000000d; }
@media (max-width: 560px) { .dashboard-stats { grid-template-columns: 1fr; } }
