:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f7f7f8;
  --panel-hover: #f2f2f3;
  --ink: #202124;
  --ink-strong: #111214;
  --muted: #6e7075;
  --faint: #97999e;
  --line: rgba(17, 18, 20, 0.1);
  --line-strong: rgba(17, 18, 20, 0.16);
  --blue: #17181a;
  --blue-dark: #000000;
  --blue-soft: #f0f0f1;
  --green: #128a4b;
  --green-soft: #eaf8f0;
  --rail: 56px;
  --sidebar: 260px;
  --topbar: 58px;
  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 20px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.03), 0 5px 18px rgba(0, 0, 0, 0.035);
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
  --ease-layout: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-pop: cubic-bezier(0, 0, 0.2, 1);
  --motion-fast: 150ms;
  --motion-layout: 290ms;
  --font: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); color: var(--ink); font-family: var(--font); }
body { margin: 0; min-height: 100vh; background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid #292a2d;
  outline-offset: 2px;
}
button, summary { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.prototype-note {
  position: fixed;
  z-index: 80;
  top: 10px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 8px 0 11px;
  transform: translateX(-50%);
  border: 1px solid rgba(17, 18, 20, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  color: #6f7175;
  font-size: 11px;
  white-space: nowrap;
  backdrop-filter: blur(14px);
}
.prototype-note button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: #92949a; cursor: pointer; }
.prototype-note button:hover { background: var(--panel-hover); color: var(--ink); }
.prototype-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--rail);
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid transparent;
  background: #f8f8f8;
  transition: width var(--motion-layout) var(--ease-layout), border-color var(--motion-layout) var(--ease-layout), box-shadow var(--motion-layout) var(--ease-layout);
}
.app-shell[data-sidebar="expanded"] .sidebar { width: var(--sidebar); border-color: rgba(0, 0, 0, 0.06); box-shadow: 5px 0 18px rgba(0, 0, 0, 0.025); }
.sidebar-head { position: relative; display: flex; height: var(--topbar); flex: 0 0 var(--topbar); align-items: center; padding: 7px; }
.brand-button { display: flex; min-width: 246px; height: 44px; align-items: center; gap: 10px; padding: 0 8px 0 0; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.brand-button:hover { background: rgba(0, 0, 0, 0.035); }
.brand-button img { width: 38px; height: 38px; margin-left: 2px; flex: 0 0 38px; border-radius: 10px; object-fit: cover; pointer-events: none; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.12; }
.brand-copy strong { color: var(--ink-strong); font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.brand-copy small { margin-top: 3px; color: var(--faint); font-size: 10px; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; transition: background var(--motion-fast) ease, color var(--motion-fast) ease; }
.icon-button:hover { background: rgba(0, 0, 0, 0.055); }
.icon-button svg { width: 18px; height: 18px; }
.sidebar-toggle { position: absolute; z-index: 2; right: 10px; top: 11px; background: rgba(248, 248, 248, 0.96); }
.app-shell[data-sidebar="collapsed"] .sidebar-toggle { right: 10px; opacity: 0; pointer-events: none; }
.app-shell[data-sidebar="collapsed"] .sidebar:hover .sidebar-toggle { opacity: 1; pointer-events: auto; }
.app-shell[data-sidebar="collapsed"] .sidebar:hover .brand-button img { opacity: 0; pointer-events: none; }

.sidebar-primary { padding: 5px 7px 0; }
.new-chat, .nav-item {
  display: flex;
  width: 100%;
  height: 40px;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
  overflow: hidden;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #383a3e;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease;
}
.new-chat { margin-bottom: 8px; background: #ececed; color: var(--ink-strong); font-weight: 590; }
.new-chat:hover, .nav-item:hover { background: #e9e9ea; color: var(--ink-strong); }
.new-chat svg, .nav-item svg { width: 19px; height: 19px; flex: 0 0 19px; }
.new-chat > svg, .nav-item > svg { display: block; align-self: center; }
.new-chat > .sidebar-copy, .nav-item > .sidebar-copy { display: flex; min-height: 20px; align-items: center; line-height: 20px; }
.new-chat kbd { margin-left: auto; color: #9b9ca0; font-family: var(--font); font-size: 10px; font-weight: 500; }
.nav-list { display: grid; gap: 2px; }
.nav-item.is-active { background: #ececed; color: var(--ink-strong); font-weight: 590; }

.sidebar-copy { opacity: 0; transform: translateX(-3px); transition: opacity 95ms ease, transform 95ms ease; pointer-events: none; }
.app-shell[data-sidebar="expanded"] .sidebar-copy { opacity: 1; transform: translateX(0); transition-delay: 145ms; pointer-events: auto; }
.sidebar-history { min-height: 0; flex: 1; margin: 20px 7px 8px; overflow: hidden auto; }
.sidebar-label { display: flex; height: 28px; align-items: center; justify-content: space-between; padding: 0 10px; color: #929399; font-size: 11px; }
.sidebar-label button { display: grid; width: 26px; height: 26px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #8a8c91; cursor: pointer; }
.sidebar-label button:hover { background: #e9e9ea; color: var(--ink); }
.sidebar-label svg { width: 15px; height: 15px; }
.history-search { display: block; padding: 3px 3px 6px; }
.history-search input { width: 100%; height: 32px; padding: 0 9px; border: 1px solid rgba(0,0,0,.08); border-radius: 9px; outline: 0; background: #fff; color: var(--ink); font-size: 11px; }
.history-search input:focus { border-color: rgba(0,0,0,.18); box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.history-list { display: grid; gap: 2px; }
.history-row { position: relative; min-width: 0; }
.history-item { display: block; width: 100%; height: 36px; padding: 0 36px 0 10px; overflow: hidden; border: 0; border-radius: 9px; background: transparent; color: #66686c; font-size: 12px; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.history-item:hover, .history-item:focus-visible, .history-row:focus-within .history-item { background: #ececed; color: var(--ink); }
.history-delete { position: absolute; top: 5px; right: 5px; display: grid; width: 26px; height: 26px; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #8b8d92; font-size: 16px; line-height: 1; opacity: 0; cursor: pointer; }
.history-row:hover .history-delete, .history-row:focus-within .history-delete, .history-delete[data-confirming="true"] { opacity: 1; }
.history-delete:hover, .history-delete:focus-visible { background: #dedee0; color: #252629; }
.history-delete[data-confirming="true"] { width: auto; padding: 0 7px; background: #202124; color: #fff; font-size: 9px; }
.history-delete[data-deleting="true"] { width: auto; padding: 0 7px; background: #e3e3e5; color: #74767a; font-size: 9px; opacity: 1; cursor: wait; }
.history-empty { margin: 4px 10px; color: #a0a2a6; font-size: 10px; line-height: 1.55; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0; white-space: nowrap; }
.sidebar-foot { flex: 0 0 auto; padding: 7px; border-top: 1px solid rgba(0, 0, 0, 0.045); }
.account-entry { display: flex; width: 100%; height: 44px; align-items: center; gap: 10px; padding: 0 8px; overflow: hidden; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.account-entry:hover { background: #ececed; }
.avatar { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 50%; background: var(--ink-strong); color: white; font-size: 12px; font-weight: 650; }
.account-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; line-height: 1.15; }
.account-copy strong { font-size: 12px; font-weight: 620; }
.account-copy small { margin-top: 3px; color: var(--faint); font-size: 10px; }
.chevron { width: 15px; height: 15px; }

.main-canvas { min-width: 0; min-height: 100vh; margin-left: var(--rail); transition: margin-left var(--motion-layout) var(--ease-layout); }
.app-shell[data-sidebar="expanded"] .main-canvas { margin-left: var(--sidebar); }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; height: var(--topbar); align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid transparent; background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(18px); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 6px; }
.crumb { display: flex; height: 36px; align-items: center; gap: 3px; padding: 0 9px; border: 0; border-radius: 10px; background: transparent; color: #4a4b4f; font-size: 13px; font-weight: 590; cursor: pointer; }
.crumb:hover { background: var(--panel-soft); }
.crumb svg { width: 14px; height: 14px; color: #9a9ca0; }
.mobile-menu { display: none; }
.quiet-button, .login-button, .secondary-button, .primary-button { display: inline-flex; height: 36px; align-items: center; justify-content: center; padding: 0 14px; border-radius: 10px; font-size: 12px; font-weight: 590; cursor: pointer; transition: background var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.quiet-button { border: 0; background: transparent; color: #626469; text-decoration: none; }
.quiet-button:hover { background: var(--panel-soft); color: var(--ink); }
.login-button, .primary-button { border: 1px solid var(--blue); background: var(--blue); color: white; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.13); }
.login-button:hover, .primary-button:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.secondary-button { border: 1px solid var(--line); background: white; color: var(--ink); }
.secondary-button:hover { border-color: var(--line-strong); background: var(--panel-soft); }
.primary-button.full, .secondary-button.full { width: 100%; }

.page-stage { min-width: 0; min-height: calc(100vh - var(--topbar) - 72px); }
.page { display: none; min-width: 0; opacity: 0; transform: translateY(4px); }
.page.is-active { display: block; animation: page-in 180ms var(--ease-pop) forwards; }
@keyframes page-in { to { opacity: 1; transform: translateY(0); } }

.home-page { min-height: calc(100vh - var(--topbar)); }
.home-inner { display: flex; width: 100%; min-height: calc(100vh - var(--topbar) - 34px); flex-direction: column; align-items: center; }
.home-page:not(.is-conversation) .home-inner { justify-content: center; padding-bottom: 11vh; }
.home-empty { display: flex; width: 100%; flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: center; padding: 20px 24px 20px; text-align: center; }
.home-intro { display: flex; flex-direction: column; align-items: center; }
.section-kicker { color: #6f7175; font-size: 11px; font-weight: 620; letter-spacing: 0.05em; text-transform: uppercase; }
.home-mark-stage { position: relative; width: 244px; height: 83px; margin-bottom: 5px; outline: 0; }
.home-mark-stage::before { content: ""; position: absolute; left: 50%; top: 39px; width: 172px; height: 38px; transform: translateX(-50%) scale(.72); border-radius: 50%; background: radial-gradient(ellipse at center, rgba(0,0,0,.075), transparent 68%); opacity: 0; transition: opacity 180ms ease, transform 240ms var(--ease-pop); }
.home-mark-core { position: absolute; z-index: 3; left: 50%; top: 10px; width: 58px; height: 58px; transform: translateX(-50%); overflow: hidden; border-radius: 16px; box-shadow: 0 8px 22px rgba(0,0,0,.11); transition: transform 240ms var(--ease-pop), box-shadow 240ms ease; }
.home-mark-core img { display: block; width: 100%; height: 100%; pointer-events: none; }
.mark-tool { position: absolute; z-index: 2; left: 50%; top: 15px; display: grid; width: 52px; height: 52px; grid-template-rows: 27px 12px; place-items: center; padding: 6px 3px 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 7px 20px rgba(0,0,0,.08); color: #313236; opacity: 0; pointer-events: none; transform: translateX(-50%) scale(.55); transition: opacity 130ms ease, transform 250ms var(--ease-pop), background var(--motion-fast) ease, box-shadow var(--motion-fast) ease; cursor: pointer; }
.mark-tool svg { width: 20px; height: 20px; stroke-width: 1.65; }
.mark-tool span { color: #626469; font-size: 8px; font-weight: 590; }
.mark-tool:hover { background: #f5f5f6; box-shadow: 0 10px 25px rgba(0,0,0,.11); }
.home-mark-stage:hover::before, .home-mark-stage:focus-within::before { opacity: 1; transform: translateX(-50%) scale(1); }
.home-mark-stage:hover .home-mark-core, .home-mark-stage:focus-within .home-mark-core { transform: translateX(-50%) scale(1.055) rotate(-2deg); box-shadow: 0 12px 28px rgba(0,0,0,.16); }
.home-mark-stage:hover .mark-tool, .home-mark-stage:focus-within .mark-tool { opacity: 1; pointer-events: auto; }
.home-mark-stage:hover .tool-code, .home-mark-stage:focus-within .tool-code { transform: translate(-126px, 3px) rotate(-7deg) scale(1); }
.home-mark-stage:hover .tool-doc, .home-mark-stage:focus-within .tool-doc { transform: translate(74px, -3px) rotate(7deg) scale(1); }
.home-mark-stage:hover .tool-search, .home-mark-stage:focus-within .tool-search { transform: translate(-100px, 44px) rotate(5deg) scale(1); }
.home-mark-stage:hover .tool-vision, .home-mark-stage:focus-within .tool-vision { transform: translate(48px, 43px) rotate(-5deg) scale(1); }
.home-brand-label { display: inline-flex; align-items: center; gap: 7px; color: #6f7175; font-size: 10px; font-weight: 620; letter-spacing: .035em; }
.home-brand-label span { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-strong); box-shadow: 0 0 0 4px #f0f0f1; }
.home-empty h1 { margin: 13px 0 9px; color: var(--ink-strong); font-size: clamp(27px, 3.1vw, 38px); font-weight: 590; letter-spacing: -0.045em; line-height: 1.18; }
.home-empty > p { max-width: 560px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.quick-actions-label { display: none; }
.quick-actions { display: flex; max-width: 760px; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 18px; }
.quick-actions button { display: inline-flex; height: 36px; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: white; color: #5e6065; font-size: 11px; cursor: pointer; transition: background var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease; }
.quick-actions button:hover { border-color: var(--line-strong); background: var(--panel-soft); color: var(--ink); }
.quick-actions svg { width: 15px; height: 15px; }

.home-empty.is-personalized { justify-content: flex-start; padding-top: 12px; padding-bottom: 12px; }
.home-overview { width: min(860px, 100%); text-align: left; }
.home-overview-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 0 2px 16px; }
.home-overview-head h1 { margin: 5px 0 5px; font-size: 25px; letter-spacing: 0; }
.home-overview-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.home-overview-account { flex: 0 0 auto; margin-bottom: 1px; }
.home-status-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-status-strip > button { min-width: 0; padding: 14px 16px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.home-status-strip > button:first-child { padding-left: 2px; }
.home-status-strip > button:last-child { padding-right: 2px; border-right: 0; }
.home-status-strip > button:hover { background: #f8f8f9; }
.home-status-strip span, .home-status-strip strong, .home-status-strip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-status-strip span { color: var(--muted); font-size: 10px; }
.home-status-strip strong { margin-top: 5px; color: var(--ink-strong); font-size: 15px; font-weight: 650; }
.home-status-strip small { margin-top: 4px; color: var(--faint); font-size: 9px; }
.home-status-strip > button[data-level="low"] strong { color: #a14823; }
.home-payment-callout { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; margin-top: 12px; padding: 10px 12px; border-left: 3px solid #356fce; background: #f3f6fb; }
.home-payment-callout[data-tone="neutral"] { border-left-color: #8b8d92; background: #f6f6f7; }
.home-payment-icon { display: grid; width: 28px; height: 28px; place-items: center; color: #356fce; }
.home-payment-callout[data-tone="neutral"] .home-payment-icon { color: #686a6f; }
.home-payment-icon svg { width: 18px; height: 18px; }
.home-payment-callout div { min-width: 0; }
.home-payment-callout strong, .home-payment-callout small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-payment-callout strong { font-size: 11px; }
.home-payment-callout small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.home-payment-callout button { height: 30px; padding: 0 9px; border: 0; background: transparent; color: #275cae; font-size: 10px; font-weight: 620; cursor: pointer; }
.home-payment-callout button:hover { background: rgba(53,111,206,.08); }
.home-recent { margin-top: 17px; }
.home-recent-head { display: flex; align-items: end; justify-content: space-between; }
.home-recent-head h2 { margin: 3px 0 0; font-size: 14px; font-weight: 640; }
.home-recent-head .quiet-button { height: 30px; padding: 0 8px; font-size: 10px; }
.home-recent-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 7px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-recent-list > p { grid-column: 1 / -1; margin: 0; padding: 16px 2px; color: var(--faint); font-size: 10px; }
.home-recent-list button { position: relative; min-width: 0; min-height: 58px; padding: 10px 28px 10px 12px; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.home-recent-list button:first-child { padding-left: 2px; }
.home-recent-list button:last-child { border-right: 0; }
.home-recent-list button::after { content: "\2192"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #a1a3a7; font-size: 13px; }
.home-recent-list button:hover { background: #f8f8f9; }
.home-recent-list strong, .home-recent-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-recent-list strong { color: var(--ink); font-size: 11px; font-weight: 590; }
.home-recent-list small { margin-top: 5px; color: var(--faint); font-size: 9px; }
.home-empty.is-personalized .quick-actions-label { display: block; width: min(860px, 100%); margin: 13px 0 0; color: var(--faint); font-size: 9px; text-align: left; }
.home-empty.is-personalized .quick-actions { width: min(860px, 100%); max-width: none; justify-content: flex-start; margin-top: 7px; }

.composer-wrap { position: relative; z-index: 10; width: min(768px, calc(100% - 40px)); padding-bottom: 14px; }
.composer { position: relative; display: flex; min-height: 52px; flex-wrap: wrap; align-items: flex-end; padding: 5px; border: 1px solid rgba(17, 18, 20, 0.14); border-radius: 28px; background: white; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025), 0 4px 16px rgba(0, 0, 0, 0.025); transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.composer:focus-within { border-color: rgba(17, 18, 20, 0.19); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.035), 0 7px 22px rgba(0, 0, 0, 0.04); }
.composer textarea { order: 1; display: block; min-width: 80px; min-height: 40px; max-height: 148px; flex: 1; resize: none; overflow-y: auto; padding: 9px 7px 7px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; line-height: 1.5; }
.composer textarea::placeholder { color: #92949a; }
.composer-actions { display: contents; }
.composer-left, .composer-right { display: flex; min-height: 40px; align-items: center; gap: 2px; }
.composer-left { order: 0; }
.composer-right { order: 2; }
.round-button { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #55575c; cursor: pointer; transition: background var(--motion-fast) ease, color var(--motion-fast) ease; }
.round-button:hover { background: var(--panel-hover); color: var(--ink); }
.round-button svg { width: 19px; height: 19px; }
.mode-button { display: inline-flex; height: 34px; align-items: center; gap: 6px; padding: 0 9px; border: 0; border-radius: 999px; background: transparent; color: #5c5e63; font-size: 13px; cursor: pointer; }
.mode-button:hover, .mode-button[aria-expanded="true"] { background: var(--panel-hover); color: var(--ink); }
.mode-button > svg { width: 15px; height: 15px; }
.mode-button .down { width: 12px; height: 12px; }
.cost-hint { margin-right: 4px; color: #999ba0; font-size: 12px; white-space: nowrap; }
.send-button { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--ink-strong); color: white; cursor: pointer; transition: opacity var(--motion-fast) ease, background var(--motion-fast) ease; }
.send-button:hover:not(:disabled) { background: #000; }
.send-button:disabled { opacity: 0.18; cursor: default; }
.send-button svg { width: 19px; height: 19px; stroke-width: 1.8; }
.composer-footnote { margin: 8px 0 0; color: #9b9da2; font-size: 9px; text-align: center; }
.chat-attachments { order: -1; display: flex; flex: 0 0 100%; flex-wrap: wrap; gap: 6px; padding: 5px 7px 3px; }
.chat-attachment { display: inline-flex; max-width: 210px; height: 29px; align-items: center; gap: 6px; padding: 0 5px 0 9px; border: 1px solid var(--line); border-radius: 9px; background: #f7f7f8; color: #55575c; font-size: 9px; }
.chat-attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-attachment button { display: grid; width: 20px; height: 20px; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #8b8d92; cursor: pointer; }
.chat-attachment button:hover { background: #e8e8ea; color: #202124; }
.composer.is-busy { opacity: .82; }
.composer.is-busy .send-button { cursor: wait; }

.popover { position: absolute; z-index: 30; padding: 7px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow-2); transform-origin: bottom left; animation: pop-in var(--motion-fast) var(--ease-pop) both; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.85) translateY(4px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.mode-menu { bottom: 51px; left: 41px; width: 270px; }
.attachment-menu { bottom: 51px; left: 5px; width: 252px; }
.popover > p { margin: 5px 10px 7px; color: #8b8d92; font-size: 10px; }
.popover button { display: flex; width: 100%; min-height: 50px; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 11px; background: transparent; text-align: left; cursor: pointer; }
.popover button:hover, .popover button.is-selected { background: var(--panel-soft); }
.menu-icon, .card-icon { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 9px; background: #f2f2f3; color: #55575b; }
.menu-icon.blue, .card-icon.blue { background: var(--blue-soft); color: var(--blue); }
.menu-icon svg, .card-icon svg { width: 17px; height: 17px; }
.popover button > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.popover button strong { color: #333438; font-size: 11px; font-weight: 610; }
.popover button small { margin-top: 3px; color: #898b90; font-size: 9px; line-height: 1.35; }
.popover .check { width: 16px; height: 16px; opacity: 0; color: var(--blue); }
.popover button.is-selected .check { opacity: 1; }
.desktop-badge { display: inline-flex; margin-left: 4px; padding: 2px 5px; border-radius: 999px; background: #e9e9ea; color: #72747a; font-size: 7px; font-style: normal; font-weight: 600; vertical-align: 1px; }
.web-url-entry { margin: 4px 2px 2px; padding: 9px; border-top: 1px solid var(--line); }
.web-url-entry label { display: block; margin-bottom: 6px; color: #77797e; font-size: 9px; }
.web-url-entry > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.web-url-entry input { min-width: 0; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: var(--ink); font-size: 9px; }
.web-url-entry input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(0,0,0,.045); }
.web-url-entry button { width: auto; min-height: 34px; padding: 0 10px; border-radius: 9px; background: var(--ink-strong); color: #fff; font-size: 9px; text-align: center; }
.web-url-entry button:hover { background: #000; }

.conversation { width: min(760px, calc(100% - 40px)); flex: 1; padding: 42px 0 30px; }
.conversation-list { min-width: 0; }
.conversation-turn { min-width: 0; }
.message { display: flex; margin-bottom: 31px; }
.user-message { justify-content: flex-end; }
.user-message .message-body { max-width: min(620px, 88%); padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: #f1f1f2; color: #303136; font-size: 13px; line-height: 1.65; }
.assistant-message { align-items: flex-start; gap: 11px; }
.assistant-mark { width: 28px; height: 28px; flex: 0 0 28px; overflow: hidden; border-radius: 8px; }
.assistant-mark img { width: 100%; height: 100%; object-fit: cover; }
.message-content { min-width: 0; flex: 1; padding-top: 2px; }
.thinking { display: flex; height: 26px; align-items: center; gap: 4px; color: #7d7f84; font-size: 11px; }
.thinking span { width: 4px; height: 4px; border-radius: 50%; background: #85878c; animation: think 900ms ease-in-out infinite; }
.thinking span:nth-child(2) { animation-delay: 120ms; }
.thinking span:nth-child(3) { animation-delay: 240ms; }
.thinking em { margin-left: 5px; font-style: normal; }
@keyframes think { 0%, 70%, 100% { opacity: .25; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-2px); } }
.answer { color: #2d2e32; font-size: 13px; line-height: 1.78; white-space: pre-wrap; }
.answer-meta { display: flex; align-items: center; gap: 7px; margin-top: 14px; color: #9b9da2; font-size: 9px; }
.answer-meta i { width: 2px; height: 2px; border-radius: 50%; background: #bbbcc0; }
.answer-actions { display: flex; gap: 2px; margin: 9px 0 0 -8px; }
.answer-actions button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #7e8085; cursor: pointer; }
.answer-actions button:hover { background: var(--panel-soft); color: var(--ink); }
.answer-actions svg { width: 16px; height: 16px; }
.home-page.is-conversation .home-empty { display: none; }
.home-page.is-conversation .composer-wrap { position: sticky; bottom: 0; padding-top: 10px; background: linear-gradient(to bottom, transparent, white 18px); }

.content-page { min-width: 0; padding: 44px 24px 76px; }
.content-shell { width: min(1040px, 100%); max-width: 100%; min-width: 0; margin: 0 auto; }
.page-header { margin-bottom: 34px; }
.page-header.centered { display: flex; flex-direction: column; align-items: center; text-align: center; }
.page-header h1 { max-width: 760px; margin: 12px 0 11px; color: var(--ink-strong); font-size: clamp(28px, 3.5vw, 44px); font-weight: 590; letter-spacing: -0.045em; line-height: 1.14; }
.page-header p { max-width: 640px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.capability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.capability-card { position: relative; display: flex; min-height: 176px; align-items: flex-start; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: white; text-align: left; cursor: pointer; transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.capability-card:hover { border-color: var(--line-strong); background: #fcfcfc; box-shadow: var(--shadow-1); }
.capability-card.feature { grid-column: 1 / -1; min-height: 158px; }
.capability-card .card-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.card-copy small { color: #8c8e93; font-size: 10px; }
.card-copy strong { margin-top: 9px; color: var(--ink-strong); font-size: 17px; font-weight: 610; letter-spacing: -0.025em; }
.card-copy em { max-width: 560px; margin-top: 9px; color: var(--muted); font-size: 12px; font-style: normal; line-height: 1.65; }
.card-arrow { position: absolute; right: 18px; top: 17px; color: #a3a5a9; font-size: 16px; transition: color var(--motion-fast) ease; }
.capability-card:hover .card-arrow { color: var(--ink); }
.inline-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 38px; padding: 22px 24px; border-radius: 18px; background: #f6f6f7; }
.inline-cta > div { display: flex; flex-direction: column; }
.inline-cta strong { font-size: 14px; }
.inline-cta span { margin-top: 5px; color: var(--muted); font-size: 11px; }

.detail-shell { max-width: 880px; }
.back-link { height: 34px; padding: 0 6px; border: 0; background: transparent; color: #77797e; font-size: 11px; cursor: pointer; }
.back-link:hover { color: var(--ink); }
.detail-hero { display: flex; flex-direction: column; align-items: flex-start; padding: 68px 0 46px; border-bottom: 1px solid var(--line); }
.detail-hero .card-icon { width: 44px; height: 44px; margin-bottom: 28px; border-radius: 13px; }
.detail-hero h1 { max-width: 720px; margin: 13px 0 14px; color: var(--ink-strong); font-size: clamp(32px, 4.3vw, 54px); font-weight: 580; letter-spacing: -0.05em; line-height: 1.08; }
.detail-hero p { max-width: 650px; margin: 0 0 28px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.detail-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 34px; }
.detail-point { padding: 18px 2px; }
.detail-point span { color: var(--blue); font-size: 10px; font-weight: 650; }
.detail-point strong { display: block; margin-top: 8px; font-size: 14px; font-weight: 610; }
.detail-point p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }

.billing-toggle { display: inline-flex; height: 38px; gap: 2px; margin-top: 25px; padding: 3px; border-radius: 11px; background: #f0f0f1; }
.billing-toggle button { height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: #77797e; font-size: 11px; cursor: pointer; }
.billing-toggle button.is-active { background: white; color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.billing-toggle span { color: var(--blue); font-size: 9px; }
.membership-sigil { position: relative; width: 72px; height: 60px; margin-bottom: 10px; }
.sigil-core { position: absolute; z-index: 2; left: 50%; top: 7px; display: grid; width: 45px; height: 45px; place-items: center; transform: translateX(-50%); border-radius: 14px; background: var(--ink-strong); color: white; font-size: 16px; font-weight: 700; box-shadow: 0 9px 24px rgba(0,0,0,.13); transition: transform 260ms var(--ease-pop); }
.sigil-dot { position: absolute; left: 50%; top: 28px; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #a6a8ad; transform-origin: 3px 3px; transition: transform 300ms var(--ease-pop), background 180ms ease; }
.dot-1 { transform: translate(-33px,-12px); }.dot-2 { transform: translate(-25px,22px); }.dot-3 { transform: translate(0,31px); }.dot-4 { transform: translate(25px,22px); }.dot-5 { transform: translate(33px,-12px); }
.membership-sigil:hover .sigil-core { transform: translateX(-50%) rotate(-5deg) scale(1.06); }
.membership-sigil:hover .dot-1 { transform: translate(-36px,-15px) scale(1.25); background:#222; }.membership-sigil:hover .dot-2 { transform: translate(-30px,25px) scale(1.1); background:#444; }.membership-sigil:hover .dot-3 { transform: translate(0,36px) scale(.9); background:#666; }.membership-sigil:hover .dot-4 { transform: translate(30px,25px) scale(1.1); background:#444; }.membership-sigil:hover .dot-5 { transform: translate(36px,-15px) scale(1.25); background:#222; }
.pricing-shell { width: min(1180px, 100%); }
.pricing-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.price-card { position: relative; display: flex; min-height: 500px; flex-direction: column; overflow: hidden; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: white; transition: transform 210ms var(--ease-pop), border-color 180ms ease, box-shadow 210ms ease; }
.price-card::after { content:""; position:absolute; inset:-70% 35% auto -40%; height:220px; transform: rotate(-18deg) translateY(-35px); background: linear-gradient(90deg, transparent, rgba(255,255,255,.68), transparent); opacity:0; pointer-events:none; transition: opacity 180ms ease, transform 420ms var(--ease-pop); }
.price-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: 0 16px 38px rgba(0,0,0,.075); }
.price-card:hover::after { opacity:1; transform: rotate(-18deg) translate(180px, 35px); }
.price-card.recommended { border-color: #151618; background: #151618; color: white; box-shadow: 0 10px 30px rgba(0, 0, 0, .13); }
.recommend-badge { position: absolute; top: 12px; right: 12px; padding: 4px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 9px; font-weight: 650; }
.plan-glyph { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: #f6f6f7; color: #333438; transition: transform 240ms var(--ease-pop), background 180ms ease; }
.plan-glyph svg { width: 23px; height: 23px; stroke-width: 1.55; }
.price-card:hover .plan-glyph { transform: rotate(-5deg) scale(1.06); background: #eeeeef; }
.price-card:nth-child(even):hover .plan-glyph { transform: rotate(5deg) scale(1.06); }
.price-card.recommended .plan-glyph { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.1); color: white; }
.price-head { min-height: 128px; }
.price-head small { color: #77797e; font-size: 11px; font-weight: 620; }
.price-head h2 { margin: 12px 0 8px; font-size: 15px; font-weight: 610; letter-spacing: -0.025em; line-height: 1.35; }
.price-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.price { display: flex; height: 65px; align-items: baseline; gap: 4px; }
.price strong { color: var(--ink-strong); font-size: 29px; font-weight: 620; letter-spacing: -0.04em; }
.price span { color: var(--muted); font-size: 11px; }
.price-card ul { display: grid; gap: 13px; margin: 24px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); list-style: none; }
.price-card li { position: relative; padding-left: 20px; color: #56585d; font-size: 11px; line-height: 1.45; }
.price-card li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--blue); font-weight: 700; }
.price-card.recommended .price-head small, .price-card.recommended .price-head p, .price-card.recommended .price span, .price-card.recommended li { color: rgba(255,255,255,.65); }
.price-card.recommended .price-head h2, .price-card.recommended .price strong { color: white; }
.price-card.recommended ul { border-top-color: rgba(255,255,255,.14); }
.price-card.recommended li::before { color: white; }
.price-card.recommended .primary-button { border-color: white; background: white; color: #151618; box-shadow: none; }
.price-card.recommended .primary-button:hover { border-color: #e7e7e8; background: #e7e7e8; }
.pricing-note { display: flex; align-items: center; gap: 10px; margin: 13px 0 38px; padding: 15px 18px; border-radius: 14px; background: var(--panel-soft); font-size: 11px; }
.pricing-note span { flex: 1; color: var(--muted); }
.pricing-note button { border: 0; background: transparent; color: var(--blue); font-size: 11px; cursor: pointer; }
.plan-compare { margin: 0 0 36px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.plan-compare .section-row { align-items: end; }
.plan-compare h2 { margin: 8px 0 0; font-size: 20px; font-weight: 610; letter-spacing: -.03em; }
.plan-compare .section-row > small { color: var(--faint); font-size: 9px; }
.compare-scroll { margin-top: 19px; overflow-x: auto; }
.plan-compare table { min-width: 720px; }
.plan-compare th, .plan-compare td { height: 45px; text-align: center; }
.plan-compare th:first-child, .plan-compare td:first-child { width: 28%; padding-left: 0; text-align: left; }
.plan-compare th { color: #797b80; }
.plan-compare td { color: #4f5156; }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; min-height: 54px; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font-size: 12px; font-weight: 590; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: #8a8c91; font-size: 18px; font-weight: 400; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin: -2px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.7; }

.billing-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .7fr); gap: 14px; align-items: start; }
.recharge-panel, .billing-summary, .usage-card, .orders-card { border: 1px solid var(--line); border-radius: 18px; background: white; }
.recharge-panel { padding: 24px; }
.balance-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; padding: 15px 16px; border-radius: 13px; background: var(--panel-soft); }
.balance-row span { color: var(--muted); font-size: 11px; }
.balance-row strong { font-size: 20px; font-weight: 620; }
.balance-row small { color: var(--muted); font-size: 10px; font-weight: 500; }
.recharge-panel h2 { margin: 21px 0 12px; font-size: 12px; font-weight: 620; }
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amount-grid button { height: 48px; border: 1px solid var(--line); border-radius: 11px; background: white; font-size: 13px; cursor: pointer; }
.amount-grid button:hover { border-color: var(--line-strong); background: var(--panel-soft); }
.amount-grid button.is-selected { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); font-weight: 620; }
.payment-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.payment-methods button { position: relative; display: flex; height: 62px; min-width: 0; align-items: center; gap: 10px; padding: 0 32px 0 11px; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: left; cursor: pointer; }
.payment-methods button.is-selected { border-color: var(--blue); background: var(--blue-soft); }
.payment-methods button > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.payment-methods strong { font-size: 11px; line-height: 1.2; white-space: nowrap; }
.payment-methods small { overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.payment-methods i { position: absolute; right: 10px; top: 10px; width: 7px; height: 7px; border: 1px solid #b7b9bd; border-radius: 50%; }
.payment-methods button.is-selected i { border: 2px solid white; background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.payment-methods button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.pay-icon { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 9px; color: white; font-size: 11px; font-weight: 700; }
.pay-icon.alipay { background: #1677ff; }
.pay-icon.wechat { background: #10b766; }
.pay-icon svg { width: 19px; height: 19px; stroke-width: 1.65; }
.custom-amount { display: grid; gap: 6px; margin-top: 10px; }
.custom-amount > span { color: var(--muted); font-size: 9px; }
.custom-amount > div { display: flex; height: 40px; align-items: center; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.custom-amount b { color: #77797e; font-size: 12px; font-weight: 550; }
.custom-amount input { width: 100%; height: 100%; padding: 0 0 0 6px; border: 0; outline: 0; color: var(--ink-strong); font-size: 11px; }
.pay-button { margin-top: 18px; }
.safe-note { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 11px 0 0; color: #989aa0; font-size: 9px; }
.safe-note svg { width: 12px; height: 12px; }
.billing-summary { padding: 24px; }
.billing-summary h2 { margin: 18px 0 9px; font-size: 16px; font-weight: 610; }
.billing-summary > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.billing-summary dl { margin: 22px 0 16px; }
.billing-summary dl div { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.billing-summary dt { color: var(--muted); }
.billing-summary dd { margin: 0; color: var(--ink); font-weight: 590; }

.download-shell { max-width: 900px; }
.app-icon-large { width: 72px; height: 72px; margin-bottom: 19px; overflow: hidden; border-radius: 19px; box-shadow: 0 10px 30px rgba(0, 0, 0, .09); }
.app-icon-large img { width: 100%; height: 100%; object-fit: cover; }
.download-button { height: 42px; gap: 9px; margin-top: 24px; padding: 0 18px; border-radius: 12px; }
.download-button svg { width: 16px; height: 16px; }
.version-line { margin-top: 10px; color: #999ba0; font-size: 9px; }
.download-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 56px; }
.download-features div { padding: 20px; border-top: 1px solid var(--line); }
.download-features span { color: var(--blue); font-size: 9px; font-weight: 650; }
.download-features strong { display: block; margin-top: 13px; font-size: 13px; font-weight: 610; }
.download-features p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.system-note { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 40px; padding: 19px 22px; border-radius: 15px; background: var(--panel-soft); }
.system-note > div { display: flex; flex-direction: column; }
.system-note strong { font-size: 12px; }
.system-note span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.system-note button { height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: 10px; cursor: pointer; }

.help-shell { max-width: 880px; }
.help-search { display: flex; width: min(580px, 100%); height: 48px; align-items: center; gap: 10px; margin-top: 26px; padding: 0 12px 0 15px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow-1); }
.help-search:focus-within { border-color: var(--line-strong); }
.help-search svg { width: 18px; height: 18px; color: #8b8d92; }
.help-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 12px; }
.help-search kbd { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel-soft); color: #999ba0; font-family: var(--font); font-size: 8px; }
.help-categories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 42px 0; }
.help-categories button { display: flex; min-height: 132px; flex-direction: column; align-items: flex-start; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: white; text-align: left; cursor: pointer; }
.help-categories button:hover { border-color: var(--line-strong); background: #fcfcfc; }
.help-categories strong { margin-top: 13px; font-size: 11px; }
.help-categories small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.help-results { margin-top: 20px; }
.help-results h2 { margin: 0 0 10px; font-size: 13px; }
.help-results button { display: flex; width: 100%; height: 48px; align-items: center; justify-content: space-between; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: #424449; font-size: 11px; text-align: left; cursor: pointer; }
.help-results button:hover { color: var(--blue); }
.support-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 34px; color: var(--muted); font-size: 10px; }
.support-row button { border: 0; background: transparent; color: var(--blue); font-size: 10px; cursor: pointer; }

.account-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.account-header h1 { font-size: 34px; }
.account-overview { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.plan-card, .balance-card { display: flex; min-height: 150px; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px; border-radius: 18px; }
.plan-card { background: var(--ink-strong); color: white; }
.balance-card { border: 1px solid var(--line); background: white; }
.plan-card > div, .balance-card > div { display: flex; flex-direction: column; }
.plan-card button, .balance-card button { align-self: flex-end; }
.plan-card span, .balance-card span { font-size: 10px; opacity: .65; }
.plan-card strong, .balance-card strong { margin-top: 10px; font-size: 25px; font-weight: 600; letter-spacing: -.03em; }
.plan-card small, .balance-card small { margin-top: 5px; font-size: 9px; opacity: .6; }
.account-balance-split { display: flex; flex-wrap: wrap; gap: 5px 12px; opacity: 1 !important; }
.account-balance-split span { font-size: 9px; opacity: .7; }
.account-balance-split b { color: var(--ink-strong); font-weight: 650; }
.plan-card button, .balance-card button { height: 34px; padding: 0 11px; border: 1px solid rgba(255,255,255,.22); border-radius: 9px; background: rgba(255,255,255,.08); color: inherit; font-size: 10px; cursor: pointer; }
.balance-card button { border-color: var(--line); background: var(--panel-soft); }
.usage-card, .orders-card { margin-top: 10px; padding: 22px; }
.section-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-row h2 { margin: 0; font-size: 13px; }
.section-row p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.usage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 25px; }
.usage-grid > div { display: flex; flex-direction: column; }
.usage-grid span { color: var(--muted); font-size: 9px; }
.usage-grid strong { margin-top: 7px; font-size: 12px; }
.progress { height: 5px; margin: 13px 0 8px; overflow: hidden; border-radius: 999px; background: #ececed; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.usage-grid small { color: #9b9da2; font-size: 8px; }
.table-wrap { margin-top: 18px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { height: 42px; padding: 0 12px; border-bottom: 1px solid var(--line); font-size: 9px; text-align: left; }
th { color: #8d8f94; font-weight: 570; }
td { color: #515359; }
.status { display: inline-flex; height: 22px; align-items: center; padding: 0 8px; border-radius: 999px; font-size: 8px; }
.status.success { background: var(--green-soft); color: var(--green); }
.status.failed, .status.interrupted, .status.cancelled { background: #f7eeee; color: #9a3838; }
.status.empty, .status.pending, .status.unknown { background: var(--panel-soft); color: var(--muted); }

.legal-shell { max-width: 760px; }
.legal-copy { color: #484a4f; font-size: 12px; line-height: 1.8; }
.legal-copy h2 { margin: 32px 0 9px; color: var(--ink-strong); font-size: 15px; }
.legal-copy p { margin: 0; }

.site-footer { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 18px; padding: 0 24px; border-top: 1px solid rgba(0, 0, 0, .055); color: #92949a; font-size: 9px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 5px; }
.site-footer button { padding: 5px 7px; border: 0; border-radius: 7px; background: transparent; color: #85878c; font-size: 9px; cursor: pointer; }
.site-footer button:hover { background: var(--panel-soft); color: var(--ink); }

.drawer-scrim { display: none; }
.modal-layer { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 16px; }
.modal-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .26); backdrop-filter: blur(2px); animation: fade-in 160ms ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.auth-dialog, .payment-dialog, .feedback-dialog { position: relative; z-index: 1; width: min(408px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 29px; border: 1px solid rgba(255,255,255,.55); border-radius: 22px; background: white; box-shadow: 0 24px 70px rgba(0,0,0,.18); overscroll-behavior: contain; animation: dialog-in 180ms var(--ease-pop) both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.close-button { position: absolute; right: 12px; top: 12px; }
.auth-logo { width: 44px; height: 44px; border-radius: 12px; }
.auth-dialog h2, .payment-dialog h2, .feedback-dialog h2 { margin: 18px 0 7px; color: var(--ink-strong); font-size: 22px; font-weight: 610; letter-spacing: -.03em; }
.auth-dialog > p, .payment-dialog > p, .feedback-dialog > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 22px 0 18px; padding: 3px; border-radius: 10px; background: var(--panel-soft); }
.auth-tabs button { height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.auth-tabs button.is-active { background: white; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.auth-dialog form { display: grid; gap: 13px; }
.auth-dialog form > label { display: grid; gap: 6px; }
.auth-dialog label > span { color: #606267; font-size: 10px; }
.auth-dialog input[type="text"], .auth-dialog input[type="password"] { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; font-size: 11px; }
.auth-dialog input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(0,0,0,.055); }
.auth-meta { display: flex; align-items: center; justify-content: space-between; }
.checkbox { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 6px !important; }
.checkbox input { accent-color: var(--blue); }
.auth-meta button { border: 0; background: transparent; color: var(--blue); font-size: 9px; cursor: pointer; }
.or { position: relative; margin: 18px 0; border-top: 1px solid var(--line); text-align: center; }
.or span { position: relative; top: -8px; padding: 0 9px; background: white; color: #a0a2a6; font-size: 9px; }
.quick-login { display: flex; width: 100%; height: 42px; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 10px; cursor: pointer; }
.quick-login:hover { background: var(--panel-soft); }
.quick-login span { color: var(--blue); }
.auth-terms { display: block; margin-top: 14px; color: #a1a3a7; font-size: 8px; text-align: center; }
.auth-page-link { display: block; width: fit-content; margin: 9px auto 0; color: #686a6f; font-size: 9px; text-decoration: none; }
.auth-page-link:hover { color: var(--ink-strong); text-decoration: underline; text-underline-offset: 3px; }
.payment-dialog { display: flex; max-width: 404px; flex-direction: column; align-items: center; padding: 31px 34px 29px; text-align: center; }
.payment-total { font-size: 22px; font-weight: 620; }
.payment-dialog > small { margin: 7px 0 18px; color: #9b9da2; font-size: 8px; }
.payment-actions { display: grid; width: 100%; gap: 8px; }
.payment-actions a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.payment-qr { display: grid; justify-items: center; gap: 7px; margin: 18px 0 2px; }
.payment-qr img { width: 178px; height: 178px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; image-rendering: pixelated; }
.payment-qr span { color: var(--muted); font-size: 9px; }
.payment-qr[data-mode="merchant"] img { width: 172px; height: 252px; padding: 0; object-fit: contain; image-rendering: auto; }
.manual-payment-reference { display: grid; width: 100%; gap: 4px; margin: 16px 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fafafa; text-align: left; }
.manual-payment-reference > span { color: var(--muted); font-size: 8px; }
.manual-payment-reference code { overflow-wrap: anywhere; color: var(--ink-strong); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.manual-payment-reference small { color: #93959a; font-size: 8px; line-height: 1.45; }
.payment-proof-form { display: grid; width: 100%; gap: 9px; margin: 2px 0 5px; text-align: left; }
.payment-proof-form > label:not(.payment-proof-upload) { display: grid; gap: 5px; }
.payment-proof-form label > span { color: #5f6267; font-size: 9px; font-weight: 560; }
.payment-proof-form label em { color: #9c9ea3; font-size: 8px; font-style: normal; font-weight: 450; }
.payment-proof-form input[type="text"] { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; outline: 0; font-size: 10px; }
.payment-proof-form input[type="text"]:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(0,0,0,.045); }
.payment-proof-upload { display: flex; min-height: 54px; align-items: center; padding: 10px 12px; border: 1px dashed #cfd1d4; border-radius: 10px; background: #fbfbfb; cursor: pointer; }
.payment-proof-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.payment-proof-upload > span { display: grid; gap: 3px; }
.payment-proof-upload strong { color: var(--ink-strong); font-size: 10px; }
.payment-proof-upload small { color: var(--muted); font-size: 8px; font-weight: 450; }
.payment-proof-form .form-status { margin: 0; }
.payment-proof-form .form-status:empty { display: none; }
.payment-order-list { display: grid; gap: 8px; margin-top: 16px; }
.payment-order-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; }
.payment-order-item strong { overflow: hidden; color: var(--ink-strong); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.payment-order-item span { color: var(--muted); font-size: 9px; }
.payment-order-item b { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--ink-strong); font-size: 10px; font-weight: 620; }
.payment-order-item b[data-status="FULFILLED"] { color: var(--green); }
.payment-order-item b[data-status="UNDER_REVIEW"] { color: #a35b0b; }
.payment-order-item b[data-status="FAILED"], .payment-order-item b[data-status="EXPIRED"], .payment-order-item b[data-status="REJECTED"] { color: #a43a3a; }
.payment-order-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.payment-order-action { min-height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink-strong); font: inherit; font-size: 9px; cursor: pointer; }
.payment-order-action:hover { background: var(--soft); }
.payment-order-action:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 2px; }
.payment-order-action.is-danger { color: #9f3333; }
.payment-orders-empty { margin: 0; padding: 12px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); font-size: 9px; text-align: center; }
.feedback-dialog { width: min(560px, 100%); padding: 28px 30px 26px; }
.feedback-dialog > .section-kicker { display: inline-flex; margin-top: 2px; }
.feedback-dialog h2 { margin-top: 9px; font-size: 20px; }
.feedback-dialog form { display: grid; gap: 12px; margin-top: 20px; }
.feedback-dialog form > label, .feedback-field-row label { display: grid; gap: 6px; min-width: 0; }
.feedback-dialog label > span { color: #5f6267; font-size: 10px; font-weight: 560; }
.feedback-dialog label em { color: #a0a2a6; font-size: 8px; font-style: normal; font-weight: 450; }
.feedback-dialog input, .feedback-dialog select, .feedback-dialog textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #fff; color: var(--ink-strong); font: inherit; font-size: 11px; }
.feedback-dialog input, .feedback-dialog select { height: 40px; padding: 0 11px; }
.feedback-dialog textarea { min-height: 108px; padding: 10px 11px; line-height: 1.6; resize: vertical; }
.feedback-dialog input:focus, .feedback-dialog select:focus, .feedback-dialog textarea:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(0,0,0,.05); }
.feedback-dialog label > small { justify-self: end; margin-top: -3px; color: #a0a2a6; font-size: 8px; }
.feedback-dialog label > small b { color: #686b70; font-weight: 550; }
.feedback-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feedback-upload { display: flex; min-height: 70px; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed #cfd1d4; border-radius: 12px; background: #fbfbfb; cursor: pointer; transition: border-color 150ms ease, background 150ms ease; }
.feedback-upload:hover, .feedback-upload:focus-visible, .feedback-upload.is-dragging { border-color: #85888d; background: #f7f7f7; outline: 0; }
.feedback-upload > svg { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: #5e6166; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.feedback-upload > div { display: grid; gap: 3px; }
.feedback-upload strong { color: #292b2e; font-size: 10px; font-weight: 620; }
.feedback-upload small { color: #8b8e93; font-size: 8px; line-height: 1.4; }
.feedback-previews { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.feedback-preview { position: relative; overflow: hidden; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 9px; background: #f3f3f3; }
.feedback-preview img { width: 100%; height: 100%; object-fit: cover; }
.feedback-preview button { position: absolute; top: 4px; right: 4px; display: grid; width: 20px; height: 20px; place-items: center; border: 0; border-radius: 999px; background: rgba(20,20,20,.78); color: white; font-size: 13px; line-height: 1; cursor: pointer; }
.feedback-privacy { padding: 9px 10px; border-radius: 9px; background: #f6f6f6; color: #777a7f; font-size: 8px; line-height: 1.55; }
.feedback-dialog .form-status.is-success { border-color: #c9e8d8; background: #f3fbf6; color: #23704a; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 25px; display: flex; min-height: 40px; align-items: center; gap: 8px; padding: 0 14px; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: #202124; box-shadow: 0 14px 40px rgba(0,0,0,.2); color: white; font-size: 10px; animation: toast-in 180ms var(--ease-pop) both; }
.toast svg { width: 15px; height: 15px; color: #74d99d; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 7px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 1180px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 920px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .price-card { min-height: auto; }
  .price-head { min-height: auto; }
  .price { margin: 22px 0 8px; }
  .billing-layout { grid-template-columns: 1fr; }
  .help-categories { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  :root { --sidebar: 296px; }
  .prototype-note { z-index: 45; top: 66px; bottom: auto; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
  .sidebar { z-index: 60; width: var(--sidebar); transform: translateX(-100%); border-right-color: rgba(0,0,0,.07); box-shadow: 8px 0 28px rgba(0,0,0,.12); transition: transform 300ms var(--ease-layout); }
  .app-shell[data-drawer="open"] .sidebar { transform: translateX(0); }
  .app-shell[data-sidebar="collapsed"] .sidebar-copy, .app-shell[data-sidebar="expanded"] .sidebar-copy { opacity: 1; transform: none; pointer-events: auto; transition: none; }
  .app-shell[data-sidebar="collapsed"] .sidebar:hover .brand-button img { opacity: 1; }
  .sidebar-toggle { display: none; }
  .drawer-scrim { position: fixed; z-index: 50; inset: 0; display: block; background: rgba(17,18,20,.22); opacity: 0; pointer-events: none; transition: opacity 300ms ease; }
  .app-shell[data-drawer="open"] .drawer-scrim { opacity: 1; pointer-events: auto; }
  .main-canvas, .app-shell[data-sidebar="expanded"] .main-canvas { margin-left: 0; transition: none; }
  .topbar { height: 56px; padding: 0 10px 0 8px; }
  .mobile-menu { display: grid; }
  .desktop-only { display: none; }
  .page-stage { min-height: calc(100vh - 56px); }
  .home-inner { min-height: calc(100vh - 88px); }
  .home-page:not(.is-conversation) .home-inner { justify-content: center; padding-bottom: 9vh; }
  .home-empty { justify-content: center; padding: 18px 18px 16px; }
  .home-empty h1 { font-size: 28px; }
  .home-mark-stage { transform: scale(.9); margin-bottom: -1px; }
  .home-empty > p { max-width: 330px; font-size: 11px; }
  .quick-actions { max-width: 360px; margin-top: 16px; }
  .quick-actions button { height: 34px; font-size: 10px; }
  .home-page:not(.is-conversation) .home-inner:has(.home-empty.is-personalized) { justify-content: flex-start; padding-bottom: 0; }
  .home-empty.is-personalized { padding: 12px 14px 10px; }
  .home-overview-head { align-items: flex-start; padding-bottom: 13px; }
  .home-overview-head h1 { font-size: 23px; }
  .home-overview-head p { max-width: 270px; }
  .home-overview-account { display: none; }
  .home-status-strip { display: flex; width: calc(100vw - 28px); overflow-x: auto; scroll-snap-type: x proximity; }
  .home-status-strip > button { width: 154px; min-width: 154px; padding: 12px; scroll-snap-align: start; }
  .home-status-strip > button:first-child { padding-left: 2px; }
  .home-payment-callout { grid-template-columns: auto minmax(0, 1fr); }
  .home-payment-callout button { grid-column: 2; justify-self: start; height: 26px; padding: 0; }
  .home-recent { margin-top: 14px; }
  .home-recent-list { grid-template-columns: 1fr; }
  .home-recent-list button { min-height: 50px; border-right: 0; border-bottom: 1px solid var(--line); }
  .home-recent-list button:first-child { padding-left: 2px; }
  .home-recent-list button:last-child { border-bottom: 0; }
  .home-empty.is-personalized .quick-actions { width: 100%; max-width: none; margin-top: 7px; }
  .home-empty.is-personalized .quick-actions-label { width: 100%; }
  .composer-wrap { width: calc(100% - 24px); padding-bottom: 9px; }
  .composer { min-height: 52px; padding: 5px; border-radius: 26px; }
  .composer textarea { min-height: 40px; padding: 9px 5px 7px; font-size: 12px; }
  .cost-hint, .voice-button { display: none; }
  .mode-menu { left: 4px; max-width: calc(100vw - 32px); }
  .composer-footnote { display: none; }
  .conversation { width: calc(100% - 28px); padding-top: 25px; }
  .content-page { padding: 28px 16px 62px; }
  .page-header { margin-bottom: 26px; }
  .page-header h1 { font-size: 31px; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability-card.feature { grid-column: auto; }
  .capability-card { min-height: 144px; padding: 18px; }
  .inline-cta { align-items: flex-start; flex-direction: column; }
  .detail-hero { padding: 45px 0 34px; }
  .detail-hero h1 { font-size: 36px; }
  .detail-points { grid-template-columns: 1fr; }
  .pricing-grid { gap: 9px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-note { align-items: flex-start; flex-wrap: wrap; }
  .pricing-note span { min-width: 70%; }
  .billing-layout { gap: 9px; }
  .recharge-panel, .billing-summary { padding: 18px; }
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .payment-methods { grid-template-columns: 1fr; }
  .download-features { grid-template-columns: 1fr; margin-top: 36px; }
  .system-note { align-items: flex-start; flex-direction: column; }
  .help-categories { grid-template-columns: 1fr 1fr; }
  .account-header { align-items: flex-start; flex-direction: column; }
  .account-overview { grid-template-columns: 1fr; }
  .usage-grid { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; padding: 20px 16px 54px; }
  .site-footer nav { margin-left: -7px; }
  .auth-dialog { padding: 25px 20px; }
}

@media (max-width: 430px) {
  .quick-actions button:nth-child(n+4) { display: none; }
  .help-categories { grid-template-columns: 1fr; }
  .help-categories button { min-height: 112px; }
  .plan-card, .balance-card { align-items: flex-start; flex-direction: column; }
  .modal-layer { align-items: end; padding: 0; }
  .auth-dialog, .payment-dialog, .feedback-dialog { width: 100%; max-width: none; max-height: calc(100dvh - 12px); border-radius: 22px 22px 0 0; }
  .feedback-dialog { padding: 24px 20px 20px; }
  .feedback-field-row { grid-template-columns: 1fr; }
  .feedback-previews { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Production website refinements — account, plans and anchored footer */
.main-canvas { display: flex; min-width: 0; flex-direction: column; overflow-x: clip; }
.page-stage { flex: 1 0 auto; }
.sidebar-foot { margin-top: auto; padding: 4px 7px 7px; border-top: 0; background: #f8f8f8; }
.sidebar-utility { display: grid; gap: 2px; padding: 0 0 5px; }
.sidebar-utility button { display: flex; width: 100%; height: 38px; align-items: center; gap: 12px; padding: 0 11px; overflow: hidden; border: 0; border-radius: 10px; background: transparent; color: #4c4e52; font-size: 12px; line-height: 18px; text-align: left; white-space: nowrap; cursor: pointer; }
.sidebar-utility button:hover { background: #ececed; color: var(--ink-strong); }
.sidebar-utility svg { width: 18px; height: 18px; flex: 0 0 18px; }
.account-entry { height: 52px; border-top: 1px solid rgba(0,0,0,.055); border-radius: 0; padding: 0 8px 0 5px; }
.account-entry:hover { border-radius: 11px; }
.avatar { overflow: hidden; }
.avatar img, .profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.pricing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.price-card { min-height: 478px; padding: 20px; }
.price-card li strong { color: inherit; font-weight: 680; }
.price-card.recommended li strong { color: white; }

.download-button { text-decoration: none; }
.download-button[aria-disabled="true"] { opacity: .52; cursor: not-allowed; box-shadow: none; }

.help-article { position: relative; margin-top: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: #4d4f54; font-size: 11px; line-height: 1.75; }
.help-article > button { position: absolute; top: 11px; right: 11px; width: 30px; height: 30px; border: 0; border-radius: 9px; background: var(--panel-soft); color: var(--muted); cursor: pointer; }
.help-article h2 { margin: 8px 38px 14px 0; color: var(--ink-strong); font-size: 17px; }
.help-article h3 { margin: 20px 0 6px; color: var(--ink-strong); font-size: 12px; }
.help-article p { margin: 0 0 8px; }

.account-header-actions, .profile-actions { display: flex; align-items: center; gap: 7px; }
.account-guest { display: grid; min-height: 310px; place-items: center; align-content: center; gap: 11px; padding: 38px; border: 1px solid var(--line); border-radius: 20px; background: #fff; text-align: center; }
.account-guest .site-state-mark { display: block; width: 54px; height: 54px; border-radius: 14px; object-fit: cover; }
.account-guest h2 { margin: 4px 0 0; font-size: 18px; }
.account-guest p { max-width: 360px; margin: 0 0 7px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.profile-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; margin-bottom: 10px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.profile-avatar { display: grid; width: 54px; height: 54px; overflow: hidden; place-items: center; border-radius: 50%; background: #202124; color: #fff; font-size: 17px; font-weight: 680; }
.profile-copy { display: flex; min-width: 0; flex-direction: column; }
.profile-copy span { color: var(--faint); font-size: 9px; }
.profile-copy strong { margin-top: 5px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.profile-actions label { cursor: pointer; }
.profile-name-form { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 9px; padding-top: 12px; border-top: 1px solid var(--line); }
.profile-name-form label { display: grid; gap: 6px; }
.profile-name-form label span { color: var(--muted); font-size: 9px; }
.profile-name-form input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--ink); background: #fff; font-size: 11px; }
.profile-name-form input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(0,0,0,.045); }
.account-service-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 10px 0; }
.account-service-card { min-width: 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.account-service-card > span { color: var(--faint); font-size: 9px; }
.account-service-card h2 { margin: 7px 0 5px; color: var(--ink-strong); font-size: 14px; }
.account-service-card p { min-height: 34px; margin: 0 0 13px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.account-service-card > div { display: flex; flex-wrap: wrap; gap: 7px; }
.account-service-card a { text-decoration: none; }
.account-service-card.is-targeted { border-color: #202124; box-shadow: 0 0 0 3px rgba(0,0,0,.045); }
.admin-access-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 10px; padding: 22px; border: 1px solid #242527; border-radius: 18px; background: #202124; color: #fff; }
.admin-access-card h2 { margin: 7px 0 5px; font-size: 16px; }
.admin-access-card p { margin: 0; color: rgba(255,255,255,.62); font-size: 10px; }
.admin-access-card > div:last-child { display: flex; gap: 8px; }
.admin-access-card .secondary-button { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.admin-access-card .primary-button { border-color: #fff; background: #fff; color: #202124; text-decoration: none; }

.form-status { padding: 9px 11px; border: 1px solid #f0c7c7; border-radius: 9px; background: #fff5f5; color: #a43a3a; font-size: 10px; line-height: 1.45; }
.payment-state-icon { display: grid; width: 46px; height: 46px; margin-top: 4px; place-items: center; border-radius: 14px; background: #f1f1f2; color: #4f5156; }
.payment-state-icon svg { width: 23px; height: 23px; stroke-width: 1.55; }
.payment-dialog .payment-total { max-width: 100%; margin-top: 20px; font-size: 15px; line-height: 1.45; text-wrap: balance; }

.site-footer { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); min-height: 62px; padding: 0 22px; }
.site-footer nav { justify-self: end; }
.footer-copyright { justify-self: start; white-space: nowrap; }
.footer-note { margin: 0; color: #92949a; font-size: 9px; line-height: 1.5; text-align: center; }

@media (min-width: 761px) {
  .app-shell[data-sidebar="collapsed"] .sidebar-utility button {
    justify-content: center;
    gap: 0;
    padding-inline: 0;
  }

  .app-shell[data-sidebar="collapsed"] .sidebar-utility .sidebar-copy,
  .app-shell[data-sidebar="collapsed"] .account-entry .sidebar-copy {
    display: none;
  }

  .app-shell[data-sidebar="collapsed"] .account-entry {
    justify-content: center;
    gap: 0;
    padding: 0;
  }
}

@media (max-width: 980px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-card { min-height: 455px; }
}

@media (max-width: 760px) {
  .sidebar-foot { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .sidebar-utility { padding-top: 6px; border-top: 1px solid rgba(0,0,0,.055); }
  .account-entry { border-top: 0; border-radius: 11px; }
  .profile-card { grid-template-columns: auto minmax(0,1fr); }
  .account-service-grid { grid-template-columns: 1fr; }
  .profile-actions { grid-column: 1 / -1; }
  .profile-name-form { grid-column: 1 / -1; }
  .admin-access-card { align-items: flex-start; flex-direction: column; }
  .site-footer { grid-template-columns: 1fr; gap: 8px; min-height: 118px; padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); }
  .site-footer nav, .footer-copyright { justify-self: start; }
  .footer-note { order: 3; text-align: left; }
}

@media (max-width: 560px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .price-card { min-height: 0; }
  .profile-name-form { grid-template-columns: 1fr; }
  .account-header-actions, .profile-actions { width: 100%; flex-wrap: wrap; }
}

/* Compact usage and attachment states */
.usage-shell { max-width: 1120px; }
.usage-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.usage-tabs { display: flex; min-width: 0; max-width: 100%; gap: 4px; margin: 24px 0 14px; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #f7f7f8; }
.usage-tabs button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.usage-tabs button:hover, .usage-tabs button.is-active { background: #fff; color: var(--ink-strong); box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.usage-account-strip, .usage-balance-grid, .usage-period-grid, .usage-breakdown-grid { display: grid; min-width: 0; gap: 10px; }
.usage-account-strip { grid-template-columns: repeat(3, minmax(0,1fr)); padding: 17px 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.usage-account-strip div, .usage-balance-card { display: flex; min-width: 0; flex-direction: column; }
.usage-account-strip span, .usage-balance-card span, .usage-card-head span { color: var(--faint); font-size: 9px; }
.usage-account-strip strong { margin-top: 6px; overflow: hidden; color: var(--ink-strong); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.usage-balance-grid { grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 10px; }
.usage-balance-card { padding: 17px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.usage-balance-card strong { margin-top: 8px; color: var(--ink-strong); font-size: 20px; letter-spacing: -.03em; }
.usage-mini-progress { height: 5px; margin-top: 13px; overflow: hidden; border-radius: 99px; background: #ededee; }
.usage-mini-progress i { display: block; width: var(--usage-width, 0%); height: 100%; border-radius: inherit; background: #202124; }
.usage-balance-rule { height: 1px; margin-top: 15px; background: var(--line); }
.usage-balance-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.usage-balance-card.emphasis { border-color: #202124; background: #202124; }
.usage-balance-card.emphasis span, .usage-balance-card.emphasis small { color: rgba(255,255,255,.62); }
.usage-balance-card.emphasis strong { color: #fff; }
.usage-balance-card.emphasis .usage-mini-progress { background: rgba(255,255,255,.2); }
.usage-balance-card.emphasis .usage-mini-progress i { background: #fff; }
.usage-period-grid { grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 10px; }
.usage-card { min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.usage-period { padding: 18px; }
.usage-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.usage-card-head strong { display: block; margin-top: 7px; color: var(--ink-strong); font-size: 17px; }
.usage-card-head small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.usage-progress { height: 5px; margin-top: 17px; overflow: hidden; border-radius: 99px; background: #ededee; }
.usage-progress i { display: block; width: var(--usage-width, 0%); height: 100%; border-radius: inherit; background: #202124; }
.usage-period p { margin: 12px 0 0; color: var(--muted); font-size: 9px; }
.usage-breakdown-grid { grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: 10px; }
.usage-breakdown, .usage-detail-card { padding: 20px; }
.usage-breakdown h2, .usage-detail-card h2 { margin: 5px 0 0; color: var(--ink-strong); font-size: 15px; }
.usage-breakdown .section-row p, .usage-detail-card .section-row p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.usage-list { display: grid; gap: 14px; margin-top: 18px; }
.usage-list-row { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 12px; align-items: center; }
.usage-list-row strong { overflow: hidden; color: #4d4f54; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.usage-list-row span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.usage-list-row i { grid-column: 1 / -1; display: block; width: 100%; height: 4px; overflow: hidden; border-radius: 99px; background: linear-gradient(to right, #202124 var(--usage-width, 0%), #ededee var(--usage-width, 0%)); }
.usage-list-empty { margin: 0; color: var(--muted); font-size: 10px; }
.usage-empty { display: grid; min-height: 300px; place-items: center; align-content: center; gap: 10px; padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: #fff; text-align: center; }
.usage-empty .site-state-mark { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: #f0f0f1; color: var(--muted); font-size: 20px; }
.usage-empty h2 { margin: 3px 0 0; color: var(--ink-strong); font-size: 17px; }
.usage-empty p { max-width: 340px; margin: 0 0 7px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.usage-detail-card .section-row { align-items: flex-start; }
.usage-detail-card .table-wrap { margin-top: 18px; }
.account-role-line { display: flex; align-items: center; gap: 8px; margin: -1px 0 13px; color: var(--muted); font-size: 9px; }
.account-role-line strong { color: var(--ink-strong); font-size: 10px; }
.chat-attachments { align-items: center; }
.chat-attachment { min-height: 39px; height: auto; padding: 4px 5px 4px 6px; border-radius: 10px; }
.chat-attachment.is-error { border-color: #e1b2b2; background: #fff8f8; }
.chat-attachment-preview { display: grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; border-radius: 7px; outline: 0; transition: opacity var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.chat-attachment-preview[href] { cursor: zoom-in; }
.chat-attachment-preview[href]:hover { opacity: .78; }
.chat-attachment-preview[href]:focus-visible { box-shadow: 0 0 0 2px rgba(32,33,36,.22); }
.chat-attachment-thumb, .chat-attachment-type { display: grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; overflow: hidden; border-radius: 7px; background: #e6e6e8; color: #5b5d62; font-size: 8px; font-weight: 700; object-fit: cover; }
.chat-attachment-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.chat-attachment-copy strong { max-width: 126px; overflow: hidden; color: #4d4f54; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.chat-attachment-copy small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.attachment-retry, .attachment-reselect { height: 23px; padding: 0 6px; border: 1px solid #d8b5b5; border-radius: 6px; background: #fff; color: #9a4646; font-size: 8px; cursor: pointer; }
.attachment-reselect { border-color: var(--line); color: var(--muted); }
.attachment-remove { display: grid; width: 20px; height: 20px; place-items: center; margin-left: 2px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #8b8d92; cursor: pointer; }
.attachment-remove:hover { background: #e8e8ea; color: #202124; }
.attachment-remove:disabled { opacity: .35; cursor: wait; }
.composer.is-dragging { border-color: #202124; box-shadow: 0 0 0 3px rgba(0,0,0,.07); }

@media (max-width: 760px) {
  .content-page, .content-shell, .usage-panel, .usage-card, .usage-detail-card { max-width: 100%; }
  .usage-header { align-items: flex-start; flex-direction: column; }
  .usage-account-strip, .usage-balance-grid, .usage-period-grid, .usage-breakdown-grid { grid-template-columns: 1fr; }
  .usage-tabs button { flex: 0 0 auto; }
  .usage-detail-card .section-row { flex-wrap: wrap; }
}
