:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --paper-2: #ebe6dc;
  --card: #fffdf8;
  --ink: #1c1915;
  --muted: #6d675e;
  --line: rgba(28, 25, 21, 0.1);
  --spruce: #0e6b57;
  --spruce-ink: #f7fffb;
  --spruce-soft: rgba(14, 107, 87, 0.12);
  --danger: #9c3b2e;
  --login-orange: #ff7417;
  --shadow: 0 10px 30px rgba(40, 32, 20, 0.06);
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --composer-height: calc(210px + var(--safe-bottom));
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #101412;
  --paper-2: #1a211e;
  --card: #18211d;
  --ink: #f3f0e8;
  --muted: #b7b1a6;
  --line: rgba(243, 240, 232, 0.12);
  --spruce: #3dbe9a;
  --spruce-ink: #06241c;
  --spruce-soft: rgba(61, 190, 154, 0.16);
  --danger: #ffb4a8;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    color-scheme: dark;
    --paper: #101412;
    --paper-2: #1a211e;
    --card: #18211d;
    --ink: #f3f0e8;
    --muted: #b7b1a6;
    --line: rgba(243, 240, 232, 0.12);
    --spruce: #3dbe9a;
    --spruce-ink: #06241c;
    --spruce-soft: rgba(61, 190, 154, 0.16);
    --danger: #ffb4a8;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
}

button, input, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; border: 0; background: transparent; }

input, textarea, select {
  font-size: 16px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 12px 14px;
}

textarea { resize: none; min-height: 48px; max-height: 140px; }

img, video, audio { max-width: 100%; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.app {
  height: 100%;
  overflow: auto;
  overflow-x: hidden;
}

.view { min-height: 100%; }

.view[hidden] { display: none !important; }

.overlay-body, .thread {
  width: min(720px, 100%);
  margin: 0 auto;
}

body[data-view="home"] .app, body[data-view="create"] .app,
body[data-view="reminders"] .app, body[data-view="memory"] .app, body[data-view="focus"] .app,
body[data-view="projects"] .app, body[data-view="project"] .app { overflow: hidden; }

/* The home feed uses document scrolling so iOS can paint content through the
   bottom safe area behind the floating glass dock. A 100dvh locked body plus
   a nested scroll root leaves an opaque strip below fixed navigation. */
body[data-view="home"] {
  height: auto;
  min-height: 100%;
  overflow: visible;
}

html[data-view="home"] {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body[data-view="home"] .app {
  height: auto;
  min-height: 100%;
  overflow: visible;
}

.view-home {
  height: auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  margin: 0 auto;
  overflow: visible;
}

.view-chat, .view-create {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  margin: 0 auto;
}

.view-create { overflow: hidden; }
.create-main { position: relative; flex: 1; min-height: 0; overflow: hidden; padding: 0 16px 172px; }
.create-heading { position: absolute; inset: 0 16px 138px; display: grid; place-items: center; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.create-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; transform: translateY(-22px); }
.create-hero-logo { display: block; width: clamp(136px, 38vw, 190px); height: auto; object-fit: contain; }
.create-heading h1 { margin: 0; color: var(--ink); font-size: clamp(30px, 8vw, 42px); font-weight: 480; line-height: 1.08; letter-spacing: -.045em; text-align: center; }
.view-create.composer-active .create-heading { opacity: 0; transform: translateY(-12px); }
body.auth-open .create-heading { opacity: 0; transform: translateY(-12px); }
html[data-theme="dark"] .create-hero-logo { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .create-hero-logo { filter: invert(1) hue-rotate(180deg); } }
.create-categories { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.create-category { min-width: 0; min-height: 112px; padding: 14px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: left; display: grid; align-content: space-between; }
.create-category[aria-selected="true"] { background: var(--spruce); color: var(--spruce-ink); box-shadow: none; }
.create-category-icon { font-size: 28px; line-height: 1; }
.create-category strong { font-size: 19px; }
.create-category small { display: block; margin-top: 3px; opacity: .72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-card { position: fixed; z-index: 5; left: 50%; bottom: max(8px, var(--safe-bottom)); transform: translateX(-50%); width: min(688px, calc(100% - 24px)); padding: 10px; border-radius: 26px; background: color-mix(in srgb, var(--card) 97%, transparent); box-shadow: 0 12px 32px rgba(19,31,25,.1), inset 0 0 0 1px var(--line); backdrop-filter: blur(18px); }
.quick-card:focus-within { box-shadow: 0 16px 42px rgba(19,31,25,.12), inset 0 0 0 1.5px var(--spruce); }
.quick-card textarea { width: 100%; box-sizing: border-box; border: 0; outline: 0; resize: none; overflow-y: auto; background: transparent; color: var(--ink); padding: 4px 8px 7px; min-height: 44px; max-height: 150px; box-shadow: none; font: inherit; font-size: 16px; line-height: 1.4; }
.quick-card textarea::placeholder { color: var(--muted); }
.quick-actions { display: flex; align-items: center; gap: 7px; min-width: 0; }
.quick-round-action { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; border-radius: 50%; background: var(--paper-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.quick-round-action svg { width: 20px; height: 20px; }
.quick-model { min-width: 0; max-width: min(58vw, 280px); height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 999px; background: var(--paper-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.quick-model > span:first-child { flex: 0 0 auto; font-size: 15px; line-height: 1; }
.quick-model strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.quick-model-chevron { flex: 0 0 auto; opacity: .72; font-size: 13px; transform: translateY(-1px); }
.quick-meta { min-width: 0; display: flex; align-items: center; gap: 9px; margin: 7px 2px 0; }
.quick-meta .estimate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.quick-actions .voice-status { text-align: right; }
.quick-actions #quick-mic-btn { width: 40px; height: 40px; margin-left: auto; background: var(--paper-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.quick-actions .send { width: 42px; height: 42px; border-radius: 50%; }
.quick-actions .send:disabled { background: var(--paper-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); opacity: 1; }

@media (max-width: 390px) {
  .quick-card { width: calc(100% - 16px); padding: 10px; }
  .quick-actions { gap: 5px; }
  .quick-model { max-width: 58vw; padding: 0 9px; }
}

/* Projects: client app workspaces */
.projects-body,.project-body{width:min(720px,100%);margin:auto;padding:14px 16px calc(110px + var(--safe-bottom));overflow:auto}.project-new{padding:9px 15px;border-radius:999px;background:var(--spruce);color:var(--spruce-ink);font-weight:700}.project-list{display:grid;gap:10px}.project-card{width:100%;min-width:0;display:grid;grid-template-columns:48px minmax(0,1fr) 20px;gap:12px;align-items:center;padding:15px;border-radius:20px;background:var(--card);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line);text-align:left}.project-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;background:color-mix(in srgb,var(--spruce) 14%,var(--paper));color:var(--spruce);font-size:25px}.project-card-copy{min-width:0;display:grid;gap:4px}.project-card-copy strong,.project-card-copy small,.project-card-copy em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-card-copy strong{font-size:17px}.project-card-copy small,.project-card-copy em{color:var(--muted);font-size:13px;font-style:normal}.project-arrow{color:var(--muted);font-size:25px}.project-empty{padding:56px 18px;text-align:center}.project-empty>span{width:64px;height:64px;margin:0 auto 16px;display:grid;place-items:center;border-radius:20px;background:color-mix(in srgb,var(--spruce) 14%,var(--paper));color:var(--spruce)}.project-empty>span svg{width:34px;height:34px}.project-empty p{color:var(--muted)}.project-preview{display:block;width:100%;height:min(54vh,480px);border:1px solid var(--line);border-radius:22px;background:#fff}.project-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.project-summary>div{min-width:0;padding:12px;border-radius:16px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);display:grid;gap:4px}.project-summary small{color:var(--muted);font-size:11px}.project-summary strong{overflow:hidden;text-overflow:ellipsis;font-size:13px}.project-builder,.project-history{display:grid;gap:11px;margin-top:12px;padding:16px;border-radius:20px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line)}.project-builder h3,.project-history h3{margin:0}.project-builder label{display:grid;gap:6px;color:var(--muted);font-size:13px}.project-builder input,.project-builder textarea,.project-create-card input,.project-create-card textarea,.project-create-card select{width:100%;min-width:0;max-width:100%;box-sizing:border-box}.project-fields{display:grid;grid-template-columns:minmax(0,1fr) 72px;gap:10px}.project-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.project-actions .btn{text-align:center;text-decoration:none}.project-version-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}.project-version-row strong,.project-version-row span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-version-row span{color:var(--muted);font-size:12px}.project-version-row>.btn{min-height:36px;padding:8px 12px}.project-create-card label{display:grid;gap:6px;margin-top:10px;color:var(--muted);font-size:13px}@media(max-width:360px){.project-summary{grid-template-columns:1fr}.project-actions{grid-template-columns:1fr}}
.template-store{min-width:0;margin-bottom:24px}.template-store-head,.projects-section-head{min-width:0;display:flex;align-items:end;justify-content:space-between;gap:12px;margin:4px 2px 12px}.template-store-head h3,.projects-section-head h3{margin:2px 0 0}.template-store-head small,.template-store-head>span,.projects-section-head>span{color:var(--muted);font-size:12px}.template-store-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.template-card{min-width:0;overflow:hidden;border-radius:22px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);display:grid}.template-card>img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:var(--paper-2)}.template-card-body{min-width:0;padding:14px;display:grid;gap:10px}.template-card-title{min-width:0;display:flex;align-items:start;justify-content:space-between;gap:8px}.template-card-title h4{margin:0;font-size:18px}.template-category{width:max-content;max-width:100%;padding:4px 9px;border-radius:999px;background:color-mix(in srgb,var(--spruce) 12%,var(--paper));color:var(--spruce);font-size:11px;font-weight:700}.template-card p{min-height:42px;margin:0;color:var(--muted);font-size:13px;line-height:1.45}.template-stats{display:flex;flex-wrap:wrap;gap:5px 10px;color:var(--muted);font-size:12px}.template-stats span{white-space:nowrap}.template-card-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}.template-card-actions .btn{min-width:0;padding-inline:8px}.template-detail-card{width:min(560px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow:auto;padding-bottom:calc(18px + var(--safe-bottom))}.template-detail-card>img{display:block;width:calc(100% + 32px);max-width:none;aspect-ratio:16/9;object-fit:cover;margin:-16px -16px 16px}.template-detail-card h2{margin:10px 0 0}.template-detail-card>p{line-height:1.5}.template-social-actions{display:grid;grid-template-columns:1fr 1.5fr;gap:8px}.template-rating{min-height:44px;display:grid;grid-template-columns:repeat(5,1fr);gap:2px;padding:3px;border-radius:14px;background:var(--paper-2)}.template-rating button{min-width:0;min-height:38px;border-radius:11px;color:var(--muted);font-size:20px}.template-rating button.is-active{color:#e89a18;background:var(--card)}.template-comments{display:grid;gap:8px;margin-top:14px}.template-comment{padding:11px 13px;border-radius:15px;background:var(--paper-2);display:grid;gap:3px}.template-comment strong{font-size:13px}.template-comment p{margin:0;color:var(--muted);font-size:13px;overflow-wrap:anywhere}.template-comment-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin:12px 0}.template-comment-form label{grid-column:1/-1;color:var(--muted);font-size:12px}.template-comment-form textarea{width:100%;min-width:0;max-width:100%;box-sizing:border-box}.project-onboarding{margin:2px 0;padding:0;list-style:none;display:grid;gap:8px;counter-reset:onboarding}.project-onboarding li{min-width:0;display:grid;grid-template-columns:28px minmax(0,1fr);gap:1px 9px;padding:10px;border-radius:14px;background:var(--paper-2);counter-increment:onboarding}.project-onboarding li:before{content:counter(onboarding);grid-row:1/3;width:28px;height:28px;display:grid;place-items:center;border-radius:10px;background:var(--spruce);color:var(--spruce-ink);font-weight:800}.project-onboarding span{color:var(--muted);font-size:12px;line-height:1.4}@media(max-width:560px){.template-store-list{grid-template-columns:1fr}.template-card p{min-height:0}}@media(max-width:360px){.template-store-head{align-items:start;flex-direction:column}.template-social-actions,.template-comment-form{grid-template-columns:1fr}.template-comment-form label{grid-column:auto}.template-card-actions{grid-template-columns:1fr}.project-onboarding li{padding:9px}}

@media (max-height: 560px) {
  .create-heading { opacity: 0; }
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(16px);
  z-index: 2;
}

.chat-top { position: static; }
#view-create .chat-top { position: relative; }
#view-create #create-menu-open { position: absolute; left: 50%; top: calc(var(--safe-top) + 10px); margin: 0; transform: translateX(-50%); z-index: 1; }
#view-create #create-menu-open:active { transform: translateX(-50%) scale(.98); }
#view-create #create-tab-chats { position: absolute; left: max(16px, env(safe-area-inset-left)); top: calc(var(--safe-top) + 11px); margin: 0; z-index: 1; }
#view-create .create-profile { position: absolute; right: max(16px, env(safe-area-inset-right)); top: calc(var(--safe-top) + 11px); margin: 0; z-index: 1; }
.create-menu-trigger { min-width: 142px; min-height: 48px; margin: 0 auto; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); font-size: 17px; font-weight: 680; }
.create-menu-trigger svg { width: 19px; height: 19px; transition: transform .18s ease; }
.create-menu-trigger:active { transform: scale(.98); }
.create-menu-overlay { z-index: 46; overflow: hidden; }
.create-menu-head { min-height: calc(68px + var(--safe-top)); padding: var(--safe-top) max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left)); display: grid; grid-template-columns: minmax(72px,1fr) auto minmax(72px,1fr); align-items: center; background: var(--paper); }
.create-menu-head > span { min-width: 0; }
#create-menu-profile { justify-self: end; }
.create-menu-body { width: min(760px,100%); flex: 1; min-height: 0; margin: 0 auto; padding: 30px max(18px,env(safe-area-inset-right)) calc(28px + var(--safe-bottom)) max(18px,env(safe-area-inset-left)); overflow: auto; }
.create-menu-body h1 { margin: 22px 0 26px; text-align: center; font-size: clamp(34px,9vw,50px); letter-spacing: -.045em; }
.create-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.create-menu-grid button { min-width: 0; min-height: 148px; padding: 18px; display: grid; align-content: space-between; justify-items: start; border-radius: 25px; background: var(--card); color: var(--ink); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); text-align: left; }
.create-menu-grid button:active { transform: scale(.985); }
.create-menu-grid .create-menu-wide { grid-column: 1/-1; min-height: 116px; grid-template-columns: 38px minmax(0,1fr); column-gap: 13px; align-items: center; align-content: center; }
.create-menu-grid .create-menu-wide strong,.create-menu-grid .create-menu-wide small { grid-column: 2; }
.create-menu-icon { width: 30px; height: 30px; display: grid; place-items: center; color: var(--spruce); }
.create-menu-icon svg { width: 28px; height: 28px; }
.create-menu-grid strong { font-size: 21px; line-height: 1.15; }
.create-menu-grid small { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.3; }
.create-menu-grid .create-menu-art-card { padding: 14px 16px 18px; align-content: start; grid-template-rows: 128px auto 1fr; border-radius: 24px; background: radial-gradient(ellipse at 50% 25%, rgba(103,174,150,.10), transparent 75%), var(--card); }
.create-menu-art { display: block; justify-self: center; width: 100%; max-width: 180px; height: 128px; object-fit: contain; pointer-events: none; }
.create-menu-art-card strong { margin-top: 8px; }
.create-menu-art-card small { max-width: 100%; }
.create-menu-grid .create-menu-wide { min-height: 94px; border-radius: 22px; }
.create-menu-grid .create-menu-art-row { grid-template-columns: 64px minmax(0,1fr); column-gap: 12px; }
.create-menu-row-art { width: 64px; height: 64px; object-fit: contain; grid-row: 1 / span 2; align-self: center; pointer-events: none; }
@media(max-width:350px) {
  .create-menu-grid .create-menu-art-row { grid-template-columns: 48px minmax(0,1fr); column-gap: 10px; }
  .create-menu-row-art { width: 48px; height: 48px; }
}
@media(max-width:350px) {
  .create-menu-grid { gap: 10px; }
  .create-menu-grid .create-menu-art-card { padding: 10px 12px 15px; grid-template-rows: 106px auto 1fr; }
  .create-menu-art { height: 106px; }
  .create-menu-grid .create-menu-art-card strong { font-size: 18px; }
  .create-menu-grid .create-menu-art-card small { font-size: 12px; }
}
.create-menu-section { margin: 34px 0 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 13px; text-transform: uppercase; letter-spacing: .09em; }
.create-tool-links { display: grid; }
.create-tool-links button { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 20px; }
.create-tool-links button span { color: var(--muted); font-size: 31px; }
.create-menu-footer { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; justify-items: center; gap: 14px; color: var(--muted); }
.create-menu-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.create-menu-footer button,.create-menu-footer a { min-height: 36px; padding: 6px 0; border: 0; background: transparent; color: inherit; text-decoration: none; font-size: 15px; }
.create-menu-footer a { min-height: 0; font-size: 13px; }

.info-page { z-index: 48; overflow: hidden; }
.info-page-shell { width: min(920px,100%); height: 100%; margin: 0 auto; display: flex; flex-direction: column; background: var(--paper); }
.info-page-head { min-height: calc(58px + var(--safe-top)); padding: var(--safe-top) max(14px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left)); display: grid; grid-template-columns: 48px minmax(0,1fr) 48px; align-items: center; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.info-page-head h2 { margin: 0; text-align: center; font-size: 19px; }
.info-page-head button { width: 44px; height: 44px; border-radius: 50%; background: var(--paper-2); color: var(--ink); font-size: 31px; line-height: 1; }
.info-page-body { flex: 1; min-height: 0; overflow: auto; padding: 0 max(18px,env(safe-area-inset-right)) calc(34px + var(--safe-bottom)) max(18px,env(safe-area-inset-left)); }
.info-hero { padding: 54px 0 42px; text-align: center; }
.info-hero > span,.info-kicker { color: var(--spruce); font-size: 13px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.info-hero h1 { max-width: 760px; margin: 10px auto 15px; font-size: clamp(36px,9vw,64px); line-height: 1.02; letter-spacing: -.05em; }
.info-hero p { max-width: 620px; margin: 0 auto 24px; color: var(--muted); font-size: clamp(17px,4.4vw,21px); line-height: 1.45; }
.info-hero .btn { min-height: 52px; padding-inline: 24px; }
.info-tabs { display: flex; gap: 8px; overflow: auto; padding: 4px 0 14px; scrollbar-width: none; }
.info-tabs button { min-height: 42px; padding: 0 16px; border-radius: 999px; white-space: nowrap; background: var(--card); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.info-tabs button[aria-selected="true"] { background: var(--spruce); color: var(--spruce-ink); box-shadow: none; }
.info-search { min-height: 48px; margin-bottom: 12px; padding: 0 15px; display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 8px; border-radius: 16px; background: var(--paper-2); }
.info-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; }
.public-price-list { display: grid; gap: 8px; }
.public-price-row { min-width: 0; padding: 15px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 14px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.public-price-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-price-row small { color: var(--muted); }
.public-price-row b { grid-row: 1/3; grid-column: 2; align-self: center; color: var(--spruce); }
.info-section { padding: 54px 0 8px; }
.info-section h2 { max-width: 720px; margin: 8px 0 16px; font-size: clamp(28px,7vw,42px); line-height: 1.08; letter-spacing: -.035em; }
.info-section > p { max-width: 660px; color: var(--muted); font-size: 17px; line-height: 1.5; }
.info-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.info-card-grid article { min-width: 0; min-height: 132px; padding: 20px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.info-card-grid strong { font-size: 19px; }
.info-card-grid p { margin: 9px 0 0; color: var(--muted); line-height: 1.45; }
.info-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.info-steps li { padding: 16px; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; align-items: center; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.info-steps b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--spruce); color: var(--spruce-ink); }
.info-steps span { display: grid; gap: 4px; }.info-steps small { color: var(--muted); }
.info-faq details { border-bottom: 1px solid var(--line); }.info-faq summary { padding: 18px 2px; font-size: 18px; font-weight: 650; cursor: pointer; }.info-faq details p { margin: 0 2px 18px; color: var(--muted); line-height: 1.5; }.info-faq .btn { margin-top: 24px; }
@media(max-width:520px){.create-menu-body{padding-top:14px}.create-menu-body h1{margin:14px 0 22px}.create-menu-grid button{min-height:132px;padding:15px}.create-menu-grid strong{font-size:19px}.info-card-grid{grid-template-columns:1fr}.info-hero{padding-top:38px}.info-section{padding-top:42px}}

.brand { display: flex; gap: 12px; align-items: center; }
.brand.compact { gap: 8px; }
.brand h1 { margin: 0; font-size: 28px; letter-spacing: -0.04em; }
.brand strong { font-size: 20px; letter-spacing: -0.03em; }

.mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--spruce);
  color: var(--spruce-ink);
  font-weight: 700;
  flex: 0 0 auto;
}

.lede { margin: 4px 0 0; color: var(--muted); }

form { display: grid; gap: 12px; margin-top: 22px; }

label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }

.btn, .icon-btn, .pill, .chip, .pack {
  border: 0;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn {
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 600;
}

.btn.primary { background: var(--spruce); color: var(--spruce-ink); box-shadow: none; }
.btn.slim { padding: 8px 14px; }
.btn.quiet { background: transparent; box-shadow: none; color: var(--spruce); }
.btn.danger { color: var(--danger); }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.icon-btn svg, .send svg { width: 20px; height: 20px; }

.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.chip, .pill {
  border-radius: 999px;
  padding: 8px 12px;
  max-width: 100%;
}

.balance { font-variant-numeric: tabular-nums; font-weight: 650; }

.home-head, .catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 0;
}

.home-head h2, .overlay h2, .chat-title-wrap h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.session-list, .history, .catalog-list { list-style: none; margin: 0; padding: 8px 16px 32px; }

.session, .model, .family, .history li {
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 8px;
}

.session { display: flex; justify-content: space-between; gap: 12px; }
.session b, .model b, .family b { display: block; letter-spacing: -0.02em; }
.session span, .meta { color: var(--muted); font-size: 13px; }

.banner, .form-error, .fine, .empty, .estimate, .duration-note { color: var(--muted); font-size: 13px; }
.form-error { color: var(--danger); }
.banner, .empty { padding: 0 16px 8px; }
.form-error { min-height: 1.2em; margin: 0; }

.thread {
  flex: 1;
  overflow: auto;
  padding: 8px 16px calc(var(--composer-height) + 12px);
  width: 100%;
}

.bubble {
  max-width: min(100%, 560px);
  padding: 12px 14px;
  border-radius: 18px;
  margin: 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}

.bubble.user { margin-left: auto; background: var(--spruce-soft); }
.bubble .charge { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.media { display: grid; gap: 8px; margin-top: 8px; }
.media img, .media video { border-radius: 12px; }

.composer {
  position: fixed;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  max-width: 720px;
  margin-inline: auto;
  padding: 0 max(10px, env(safe-area-inset-right, 0px)) calc(8px + var(--safe-bottom)) max(10px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-top: 1px solid var(--line);
}

.pill { min-width: 0; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13px; padding: 7px 12px; flex: 0 1 auto; }
.estimate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; }
.model-stack { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; }
.model-stack-agent, .model-stack-gen { display: flex; align-items: center; gap: 6px; min-width: 0; }
.model-stack .estimate { flex: 1 1 auto; }
.generator-add { width: 46px; height: 46px; min-width: 46px; }
.generator-price { flex: 0 0 auto; white-space: nowrap; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.generator-help, .catalog-pair-help-btn {
  position: relative;
  flex: 0 0 auto; width: 32px; height: 32px; min-width: 32px; border: 0; border-radius: 50%;
  background: var(--paper-2); color: var(--ink); font-weight: 700; font-size: 15px;
}
.generator-help-text, .catalog-pair-help {
  margin: 0; padding: 8px 10px; border-radius: 12px; background: var(--paper-2); color: var(--ink);
  font-size: 13px; line-height: 1.35;
}
.model-stack.has-generator .model-stack-gen .pill { max-width: none; }
.model-stack.has-generator .generator-price { flex: 0 0 auto; overflow: visible; text-overflow: unset; }
.prompt-card { margin-top: 8px; display: grid; gap: 8px; }
.prompt-card-label { font-size: 12px; color: var(--muted); }
.prompt-card-text {
  width: 100%; min-height: 72px; max-height: 180px; resize: vertical; border: 0; border-radius: 12px;
  padding: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.35;
}
.prompt-generate { min-height: 40px; scroll-margin-bottom: calc(var(--composer-height) + 16px); }
.cat-row.is-disabled .cat-row-main { opacity: 0.45; }
.catalog-nav button:disabled { opacity: 0.38; }
.duration-note { margin: 8px 6px 0; }

.input-box {
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 25px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-box:focus-within { box-shadow: inset 0 0 0 1.5px var(--spruce); }
.input-box textarea#draft {
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 16px;
  line-height: 1.4;
  font-family: inherit;
  color: inherit;
  padding: 4px 6px 0;
  min-height: 24px;
  max-height: 230px;
  overflow-y: auto;
}
.input-toolbar { width: 100%; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 6px; overflow: hidden; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.toolbar-left { width: auto; flex: 0 1 auto; overflow: hidden; }
.toolbar-right { flex: 0 0 auto; }
/* Chat composer: icon row (attach/settings + mic/send) always on top.
   All selected models stack together in their own left-aligned row below,
   so one model or two models look like the same harmonious block. */
#composer .input-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 6px;
  row-gap: 6px;
  overflow: visible;
}
#composer .toolbar-left { grid-column: 1; grid-row: 1; overflow: visible; align-self: center; }
#composer .toolbar-right { grid-column: 3; grid-row: 1; justify-self: end; align-self: center; margin-left: 0; }
#composer .model-stack { grid-column: 1 / -1; grid-row: 2; align-self: start; }
#composer .model-stack .pill { max-width: none; }
#composer .model-stack.has-generator .generator-help-text { margin-top: 4px; }
.model-tools-btn { overflow: visible; }
.model-tools-dot { position: absolute; top: 1px; right: 1px; width: 8px; height: 8px; border-radius: 50%; background: var(--login-orange); box-shadow: 0 0 0 2px var(--card); }
.model-tools-popover {
  position: absolute; left: 12px; right: 12px; bottom: calc(100% + 8px); z-index: 9;
  max-height: min(70dvh, calc(100dvh - 24px)); overflow: auto;
  padding: 8px; border-radius: 22px; background: color-mix(in srgb, var(--card) 97%, transparent);
  box-shadow: 0 18px 46px rgba(0,0,0,.24), inset 0 0 0 1px var(--line); backdrop-filter: blur(22px);
}
.model-tools-popover[hidden] { display: none; }
.model-tool-row { min-height: 58px; padding: 9px 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.model-tool-row > span:first-child { min-width: 0; display: grid; gap: 2px; }
.model-tool-row strong { font-size: 15px; }
.model-tool-row small { color: var(--muted); font-size: 12px; }
.model-tool-row select, .model-setting-block select { max-width: 145px; min-height: 38px; border: 0; border-radius: 12px; padding: 0 10px; background: var(--paper-2); color: var(--ink); font: inherit; }
.reasoning-pill.is-active { background: color-mix(in srgb, var(--login-orange) 22%, var(--paper-2)); color: var(--login-orange); font-weight: 650; }
.model-tool-status { flex: 0 0 auto; color: var(--muted); font-size: 13px; }
.model-tool-controls { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.model-tool-edit { min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--paper-2); color: var(--ink); font-size: 13px; font-weight: 600; }
.model-settings-link { width: 100%; min-height: 52px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-size: 16px; font-weight: 650; text-align: left; }
.model-settings-panel { max-height: min(88dvh, 760px); }
.model-settings-body { display: grid; padding: 0 20px max(28px, calc(18px + var(--safe-bottom))); }
.model-setting-block { min-width: 0; padding: 18px 0; display: grid; gap: 14px; border-bottom: 1px solid var(--line); }
.model-setting-block > span:first-child { display: grid; gap: 5px; }
.model-setting-block strong { font-size: 18px; }
.model-setting-block small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.model-setting-block.is-inline { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.temperature-control { display: grid; grid-template-columns: minmax(0,1fr) 48px; gap: 12px; align-items: center; }
.temperature-control input { width: 100%; accent-color: var(--login-orange); }
.temperature-control output { padding: 7px 5px; border-radius: 12px; background: var(--paper-2); text-align: center; font-variant-numeric: tabular-nums; }

.voice-status {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  transition: opacity 160ms ease, color 160ms ease;
}
.voice-status[hidden] { display: none; }
.voice-status.success { color: var(--spruce); }
.voice-status.error { color: var(--danger); }

.toolbar-icon-btn {
  position: relative;
  overflow: visible;
  border: 0;
  background: #eee;
  box-shadow: none;
  color: #444;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.toolbar-icon-btn svg { width: 20px; height: 20px; }
.toolbar-icon-btn:disabled { opacity: 0.45; }
.toolbar-icon-btn.recording { background: var(--danger); color: #fff; box-shadow: none; }
.toolbar-icon-btn.transcribing { pointer-events: none; }
.toolbar-icon-btn.transcribing .mic-icon-mic { visibility: hidden; }
.toolbar-icon-btn.transcribing::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid color-mix(in srgb, var(--muted) 32%, transparent);
  border-top-color: var(--spruce);
  border-radius: 50%;
  animation: mic-ring-spin 0.75s linear infinite;
}
.mic-icon-stop { display: none; }
.toolbar-icon-btn.recording .mic-icon-mic { display: none; }
.toolbar-icon-btn.recording .mic-icon-stop { display: flex; }
.mic-ring {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  border: 3px dotted var(--danger);
  animation: mic-ring-spin 1.6s linear infinite;
  pointer-events: none;
}
.toolbar-icon-btn.recording .mic-ring { display: block; }
@keyframes mic-ring-spin { to { transform: rotate(360deg); } }

.attach-preview { display: none; flex-wrap: wrap; gap: 8px; padding: 8px 2px 0; }
.attach-preview.has-items { display: flex; }
.attach-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 160px;
  padding: 6px 26px 6px 6px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 12px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
}
.attach-chip img, .attach-chip video { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #000; }
.attach-chip .file-icon, .attach-chip .read-progress {
  width: 40px; height: 40px; border-radius: 8px; background: var(--paper);
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; position: relative;
}
.attach-chip .read-progress { font-size: 10px; font-weight: 600; }
.attach-chip .read-progress::before {
  content: ''; position: absolute; inset: 0; border-radius: 8px;
  border: 2px solid var(--line); border-top-color: var(--spruce);
  animation: mic-ring-spin 0.8s linear infinite;
}
.attach-chip .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.attach-chip .remove-att {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: 0;
  border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.attach-chip .remove-att svg { width: 11px; height: 11px; }

.message-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.message-attachment-image { width: 120px; height: 120px; border-radius: 12px; object-fit: cover; }
.message-attachment-file {
  display: grid; gap: 8px; padding: 8px 10px; border-radius: 12px;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; text-decoration: none; color: inherit;
}
.file-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.file-actions button { border: 0; border-radius: 9px; padding: 6px 9px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: 12px; }
.result-link-card { display: grid; gap: 8px; margin: 8px 0; padding: 10px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.result-link-card > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--spruce); }
.file-viewer-open { overflow: hidden; }
.file-lightbox { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto minmax(0,1fr); background: #171717; color: #fff; }
.file-lightbox-head { position: relative; z-index: 2; min-height: calc(58px + env(safe-area-inset-top)); padding: max(10px, env(safe-area-inset-top)) 12px 8px 16px; display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: center; gap: 10px; background: #171717; }
.file-lightbox-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.file-lightbox-body { min-height: 0; display: grid; place-items: center; padding: 8px 12px max(18px, env(safe-area-inset-bottom)); overflow: auto; background: rgba(0,0,0,.88); }
.file-lightbox-content:is(img, video) { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.file-lightbox-content:is(iframe) { width: 100%; height: 100%; border: 0; border-radius: 12px; background: #fff; }
.file-lightbox-content:is(audio) { width: min(560px, 100%); }
.file-lightbox-close { position: relative; z-index: 3; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); color: #fff; }
.file-lightbox-close svg { width: 22px; height: 22px; }
.generated-media-card { display: grid; gap: 8px; }
.generated-media-card > img, .generated-media-card > video { max-width: 100%; border-radius: 14px; }
.generated-media-card > audio { width: 100%; }

.chat-empty { margin: 40% auto 0; color: var(--muted); font-size: 16px; text-align: center; }
.chat-status { display: block; font-size: 12px; color: var(--muted); }

.send {
  position: relative;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff9a4d, var(--login-orange));
  color: #fff;
  box-shadow: 0 6px 18px rgba(255,116,23,.38);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.send:disabled, .btn:disabled { opacity: 0.45; }

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .composer .toolbar-icon-btn { background: #2c2d32; color: #e6e6e6; }
}
html[data-theme="dark"] .composer .toolbar-icon-btn { background: #2c2d32; color: #e6e6e6; }

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 40;
  flex-direction: column;
}

.overlay.show { display: flex; }

.sheet-overlay {
  justify-content: flex-end;
  background: rgba(12, 15, 13, 0.42);
  backdrop-filter: blur(4px);
}

.sheet-panel {
  width: min(720px, 100%);
  max-height: calc(100% - var(--safe-top));
  margin: 0 auto;
  overflow: auto;
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.2);
  padding-bottom: var(--safe-bottom);
}

.sheet-panel .topbar { position: sticky; }
.sheet-panel .topbar h2 { flex: 1; }
.auth-card { padding: 0 20px 28px; }
#auth-sheet {
  z-index: 90;
  align-items: center;
  padding: max(12px, var(--safe-top)) 12px max(12px, var(--safe-bottom));
}
#auth-sheet .sheet-panel {
  max-width: 540px;
  max-height: min(82dvh, 680px);
  border-radius: 24px;
  padding-bottom: 0;
}
#auth-sheet .topbar { min-height: 60px; padding-bottom: 4px; }
#auth-sheet .topbar h2 { font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
#auth-sheet .topbar .icon-btn { width: 44px; height: 44px; }
#auth-sheet .auth-card { padding: 0 20px 22px; }
#rename-sheet .rename-card { padding: 12px 20px max(28px, calc(18px + var(--safe-bottom))); }
#rename-sheet #rename-form { margin-top: 0; gap: 14px; }
#rename-sheet #rename-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  border-radius: 16px;
}
#rename-sheet #rename-form .primary {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  font-size: 17px;
}
#rename-sheet .rename-delete {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  padding: 10px 14px;
  background: transparent;
  box-shadow: none;
  text-align: center;
  font-size: 16px;
}
#rename-sheet .form-error:empty { display: none; }
.auth-lede { margin: 0 0 18px; color: var(--muted); text-align: left; font-size: 15px; }
.legal-action-note {
  max-width: 430px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.legal-action-note a { color: inherit; text-decoration-color: color-mix(in srgb, var(--ink) 42%, transparent); text-underline-offset: 3px; }
.legal-action-note a:hover { color: var(--login-orange); text-decoration-color: currentColor; }
.yandex-login {
  width: 100%; border: 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--login-orange);
  color: #fff;
  box-shadow: 0 7px 20px rgba(255, 116, 23, .24);
  text-decoration: none;
  font-weight: 650;
}
.yandex-login { transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
.yandex-login:not(:disabled):active { transform: scale(.985); }
.yandex-login:disabled {
  opacity: 1;
  color: var(--muted);
  background: color-mix(in srgb, var(--ink) 8%, var(--paper));
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: not-allowed;
}
.yandex-login:disabled .yandex-mark { opacity: .5; }
#auth-submit:disabled { opacity: .42; box-shadow: none; cursor: not-allowed; }
.yandex-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 30px;
  color: #fff;
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
}
.google-login {
  width: 100%;
  min-height: 50px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 600;
  transition: transform .18s ease, background-color .18s ease;
}
.google-login:not(:disabled):active { transform: scale(.985); }
.google-mark { width: 22px; height: 22px; flex: none; }
.passkey-login {
  width: 100%;
  min-height: 50px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 600;
  transition: transform .18s ease, background-color .18s ease;
}
.passkey-login[hidden] { display: none; }
.passkey-login:not(:disabled):active { transform: scale(.985); }
.passkey-login:disabled { opacity: .6; cursor: progress; }
.passkey-mark { width: 22px; height: 22px; flex: none; }
#passkey-card[hidden] { display: none; }
.passkey-when { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.passkey-success { margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, #0f6b57 12%, var(--paper)); color: #0f6b57; font-weight: 600; font-size: 14px; }
.passkey-success[hidden] { display: none; }
.password-auth-toggle {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  font-weight: 500;
}
.password-auth-toggle:hover { color: var(--ink); background: var(--paper-2); }
.oauth-error { margin: 10px 0 0; text-align: center; }
#password-auth-panel { margin-top: 14px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 16px; background: var(--paper-2); }
.auth-tabs button { min-width: 0; padding: 10px 8px; border-radius: 12px; color: var(--muted); }
.auth-tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

.overlay-body { flex: 1; overflow: auto; padding-bottom: calc(24px + var(--safe-bottom)); width: min(720px, 100%); }

.search { display: block; padding: 0 16px 8px; position: relative; }

.tabs { display: flex; gap: 6px; padding: 0 16px 8px; overflow: auto; }
.tabs button {
  border: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  white-space: nowrap;
}
.tabs button[aria-selected="true"] { background: var(--spruce); color: var(--spruce-ink); box-shadow: none; }

.section-label { margin: 12px 16px 4px; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }

.model, .family { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: start; }
.model .pick {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 0;
  text-align: left;
  min-width: 0;
}
.model .pick b { overflow-wrap: anywhere; }
.model p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 14px; }
.price { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.star { border: 0; background: transparent; color: var(--spruce); font-size: 18px; padding: 0 4px; }

/* Fullscreen model catalog: mobile-first, compact rows and fixed category dock.
   Catalog is earlier in the DOM than analytics/profile, so without this it opens
   underneath them. Analytics then stays visible and inert, and its back/close die. */
#catalog.show { z-index: 47; }
/* Info pages sit earlier in the DOM than analytics, and the later .overlay rule resets z-index to 40. */
.info-page.show { z-index: 48; }
#catalog {
  --catalog-bg: #fff;
  --catalog-ink: #171717;
  --catalog-muted: #777;
  --catalog-faint: #969696;
  --catalog-line: rgba(20, 20, 20, .08);
  --catalog-control: #f3f3f3;
  --catalog-mark: #f5f5f5;
  --catalog-price: #f1f1f1;
  --catalog-price-ink: #555;
  --catalog-active: #292929;
  --catalog-active-ink: #fff;
  --catalog-title-weight: 550;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  background: var(--catalog-bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--catalog-ink);
}
html[data-theme="dark"] #catalog {
  --catalog-bg: #101412;
  --catalog-ink: #f3f0e8;
  --catalog-muted: #b7b1a6;
  --catalog-faint: #8f948f;
  --catalog-line: rgba(243, 240, 232, .12);
  --catalog-control: #252c29;
  --catalog-mark: #202724;
  --catalog-price: #252c29;
  --catalog-price-ink: #dedad1;
  --catalog-active: #f3f0e8;
  --catalog-active-ink: #171a18;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] #catalog {
    --catalog-bg: #101412;
    --catalog-ink: #f3f0e8;
    --catalog-muted: #b7b1a6;
    --catalog-faint: #8f948f;
    --catalog-line: rgba(243, 240, 232, .12);
    --catalog-control: #252c29;
    --catalog-mark: #202724;
    --catalog-price: #252c29;
    --catalog-price-ink: #dedad1;
    --catalog-active: #f3f0e8;
    --catalog-active-ink: #171a18;
  }
}
#catalog .overlay-body { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; padding: 0 0 calc(88px + var(--safe-bottom)); }
.catalog-top {
  gap: 10px;
  min-height: calc(78px + var(--safe-top));
  padding: calc(14px + var(--safe-top)) 12px 10px;
  background: color-mix(in srgb, var(--catalog-bg) 94%, transparent);
  border-bottom: 1px solid var(--catalog-line);
}
.catalog-search { position: relative; flex: 1; min-width: 0; display: block; }
.catalog-search input {
  min-height: 44px;
  padding: 8px 12px 8px 36px;
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
  color: var(--catalog-ink);
  font-size: 17px;
  box-shadow: none;
}
.catalog-search input::placeholder { color: var(--catalog-faint); opacity: 1; }
.catalog-search-icon {
  position: absolute; left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  color: var(--catalog-faint);
  pointer-events: none;
}
#catalog .icon-btn.round { flex: 0 0 44px; width: 44px; height: 44px; background: var(--catalog-control); color: var(--catalog-ink); }
#catalog .icon-btn.round svg { width: 22px; height: 22px; }
#catalog .icon-btn.round.catalog-pair-help-btn {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-width: 22px;
  max-width: 22px;
  min-height: 22px;
  max-height: 22px;
  font-size: 13px;
}
#catalog .icon-btn.round.catalog-pair-help-btn::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
}

#catalog.family-view .catalog-top {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
}
#catalog.family-view .catalog-search { display: none; }
#catalog.family-view #catalog-back { grid-column: 1; grid-row: 1; }
#catalog.family-view #catalog-title {
  grid-column: 2;
  grid-row: 1;
  position: static;
  width: auto;
  height: auto;
  overflow: hidden;
  clip: auto;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
#catalog.family-view #catalog-close { grid-column: 3; grid-row: 1; }

.catalog-nav {
  position: fixed; z-index: 3; left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 4px;
  width: 100%; max-width: 720px; min-width: 0; margin: 0 auto;
  padding: 6px 7px calc(7px + var(--safe-bottom));
  background: color-mix(in srgb, var(--catalog-bg) 94%, transparent);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--catalog-line);
}
.catalog-nav button {
  flex: 1 1 0;
  width: 20%;
  min-width: 0;
  min-height: 58px;
  display: grid; place-content: center; justify-items: center; gap: 2px;
  padding: 5px 3px;
  border-radius: 16px;
  color: var(--catalog-ink);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.catalog-nav button svg { width: 26px; height: 26px; }
.catalog-nav button[aria-selected="true"] { background: var(--catalog-active); color: var(--catalog-active-ink); }

#catalog .catalog-list { width: 100%; max-width: 720px; min-width: 0; overflow-x: hidden; margin: 0 auto; padding: 14px 7px 16px; }
#catalog .section-label { min-height: 24px; margin: 1px 4px 7px; display: flex; align-items: center; gap: 8px; color: var(--catalog-faint); font-size: 15px; letter-spacing: 0; text-transform: none; }
#catalog .section-label svg { width: 19px; height: 19px; flex: 0 0 19px; }
#catalog .cat-row + .section-label { margin-top: 9px; }
#catalog .section-label + .cat-row { margin-top: 0; }

.cat-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 1px 0;
  text-align: left;
}
button.cat-row { border-radius: 16px; }
button.cat-row:active { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.cat-row-main {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 52px;
  padding: 3px 4px;
  border-radius: 12px;
  text-align: left;
}
.cat-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--catalog-mark);
  color: var(--catalog-muted);
  font-weight: 700;
  font-size: 16px;
  flex: 0 0 auto;
  overflow: hidden;
}
.cat-mark svg { width: 24px; height: 24px; }
.cat-mark-openai, .cat-mark-anthropic, .cat-mark-google, .cat-mark-deepseek,
.cat-mark-qwen, .cat-mark-seed, .cat-mark-recraft, .cat-mark-xai,
.cat-mark-alibaba, .cat-mark-runway { background: var(--catalog-mark); color: var(--catalog-muted); box-shadow: none; }
.cat-text { min-width: 0; max-width: 100%; overflow: hidden; display: grid; gap: 1px; }
.cat-heading { display: flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; overflow: hidden; }
.cat-text b { min-width: 0; font-size: 16px; line-height: 1.16; font-weight: var(--catalog-title-weight); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-badges { display: flex; gap: 5px; flex: 0 0 auto; }
.cat-badge { padding: 3px 8px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 500; line-height: 1.15; }
.cat-badge-new { background: #ff7900; }
.cat-badge-discount { background: #7467f5; }
.cat-badge-demo { background: var(--spruce); color: var(--spruce-ink); }
.cat-selected {
  position: absolute;
  z-index: 1;
  left: 34px;
  top: 3px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--spruce);
  color: var(--spruce-ink);
  font-size: 12px;
  vertical-align: 1px;
}
.cat-row.is-selected .cat-row-main { background: transparent; }
.cat-row.is-selected .cat-text b { font-weight: 700; }
.cat-row-recommended { min-height: 60px; margin-bottom: 2px; }
.cat-row-recommended .cat-row-main { min-height: 58px; }
.cat-row-recommended .cat-text b { font-size: 17px; }
.cat-row-recommended .cat-sub { font-size: 13px; }
.cat-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-price { max-width: 84px; overflow: hidden; text-overflow: ellipsis; padding: 3px 7px; border-radius: 999px; background: var(--catalog-price); color: var(--catalog-price-ink); font-size: 13px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cat-arrow { color: var(--catalog-muted); display: grid; place-items: center; }
.cat-arrow svg { width: 18px; height: 18px; }
.cat-actions { min-width: 0; display: flex; gap: 0; align-items: center; }
.cat-info-btn {
  width: 26px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--catalog-muted);
}
.cat-info-btn svg { width: 16px; height: 16px; }
.cat-info-btn[aria-expanded="true"] { background: var(--paper-2); color: var(--ink); }
.cat-row .star { width: 28px; height: 34px; padding: 0; color: var(--catalog-faint); font-size: 23px; font-weight: 300; }
.cat-info {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0 8px 9px 54px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

#catalog .catalog-list.is-family { padding-top: 16px; }
.catalog-list.is-family .cat-row-family-model {
  min-height: 46px;
  padding: 0;
}
.catalog-list.is-family .cat-row-family-model .cat-row-main {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 44px;
  gap: 8px;
  padding: 3px 4px 3px 8px;
}
.catalog-list.is-family .cat-row-family-model .cat-mark,
.catalog-list.is-family .cat-row-family-model .cat-sub { display: none; }
.catalog-list.is-family .cat-row-family-model .cat-text b { font-size: 15px; font-weight: var(--catalog-title-weight); }
.catalog-list.is-family .cat-row-family-model.is-selected .cat-text b { font-weight: 700; }
.catalog-list.is-family .cat-row-family-model .cat-selected { display: none; }
.catalog-list.is-family .cat-row-family-model .cat-price { font-size: 13px; }
.catalog-list.is-family .cat-row-family-model .cat-info { padding-left: 8px; }

@media (min-width: 700px) {
  #catalog .catalog-list { padding-inline: 24px; }
  .catalog-top { padding-inline: max(16px, calc((100% - 720px) / 2)); }
}

@media (max-width: 380px) {
  .cat-selected { left: 31px; top: 2px; }
  .catalog-nav button { font-size: 12px; }
  .catalog-nav button:first-child { font-size: 11px; }
  .catalog-nav button svg { width: 23px; height: 23px; }
  .cat-text b { font-size: 15px; }
  .cat-price { max-width: 76px; font-size: 12px; padding-inline: 6px; }
  .cat-row-main { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 7px; padding-inline: 2px; }
  .cat-mark { width: 38px; height: 38px; }
  .cat-info-btn { width: 24px; }
  .cat-row .star { width: 25px; }
  #catalog.family-view .catalog-top { grid-template-columns: 42px minmax(0, 1fr) 42px; }
  #catalog.family-view #catalog-title { font-size: 17px; }
  .catalog-list.is-family .cat-row-family-model .cat-text b { font-size: 14px; }
}

.balance-xl { font-size: 40px; letter-spacing: -0.04em; margin: 8px 16px; font-variant-numeric: tabular-nums; }
#wallet .topbar h2 { margin-right: auto; }
.wallet-refresh { min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 650; }
.wallet-refresh svg { width: 19px; height: 19px; }
.wallet-refresh:disabled { opacity: .58; }
.wallet-refresh.is-loading svg { animation: wallet-refresh-spin .75s linear infinite; }
@keyframes wallet-refresh-spin { to { transform: rotate(360deg); } }
@media (max-width: 370px) { .wallet-refresh span { display: none; } .wallet-refresh { width: 42px; padding: 0; justify-content: center; } }
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 8px; }
.pack { border-radius: 16px; padding: 16px; font-weight: 700; font-size: 18px; }
.wallet-custom-topup { min-width: 0; margin: 0 16px 14px; padding: 14px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.wallet-custom-topup > label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.wallet-custom-topup-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.wallet-custom-topup input { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; font-size: 16px; }
.wallet-custom-topup .btn { min-width: 112px; padding-inline: 14px; }
.wallet-custom-topup small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
@media (max-width: 370px) { .wallet-custom-topup-row { grid-template-columns: 1fr; } .wallet-custom-topup .btn { width: 100%; } }
.overlay h3 { margin: 16px 16px 0; font-size: 16px; }
.history li { display: flex; justify-content: space-between; gap: 12px; }
.history li[hidden] { display: none; }
.wallet-history-toggle { display: block; width: calc(100% - 32px); min-height: 48px; margin: -20px 16px 24px; border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 650; }
#autotopup-form { padding: 0 16px; }
#autotopup-form .reminder-field label, #autotopup-form .reminder-field > span { font-size: 13px; }
#autotopup-form .reminder-field input { width: calc(100% - 12px); margin-inline: 6px; }
.plus { color: var(--spruce); }
.minus { color: var(--danger); }

.profile-overlay { padding-top: var(--safe-top); }
.profile-panel {
  width: min(720px, 100%);
  height: 100%;
  margin: 0 auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: var(--paper);
  padding: 0 18px calc(18px + var(--safe-bottom));
  min-height: 0;
}
.profile-view { padding-bottom: 8px; }
.profile-main-head { position: sticky; top: 0; z-index: 3; background: var(--paper); min-height: 54px; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; margin-bottom: 4px; }
.profile-main-head h2 { position: absolute; left: 50%; max-width: calc(100% - 200px); margin: 0; overflow: hidden; transform: translateX(-50%); text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }
.profile-head-actions { grid-column: 3; display: flex; gap: 2px; }
.profile-head-actions .icon-btn { position: relative; }
.profile-more-menu { position: fixed; z-index: 4; top: calc(var(--safe-top) + 58px); right: max(18px, calc((100vw - 720px) / 2 + 18px)); width: min(270px, calc(100vw - 36px)); padding: 7px; border-radius: 18px; background: var(--card); box-shadow: 0 12px 36px rgba(0,0,0,.2), inset 0 0 0 1px var(--line); }
.profile-more-menu[hidden] { display: none; }
.profile-more-menu button { width: 100%; min-height: 52px; display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; color: var(--ink); text-align: left; font-size: 15px; }
.profile-more-menu button + button { border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.profile-more-icon { width: 22px; height: 22px; display: grid; place-items: center; border: 1.7px solid currentColor; border-radius: 50%; font-weight: 800; }
.profile-more-menu svg { width: 22px; height: 22px; }
.profile-more-menu .profile-more-logout { color: var(--danger); }
.profile-hero { display: grid; justify-items: center; gap: 8px; padding: 10px 8px 18px; }
.profile-hero .profile-avatar { width: 72px; height: 72px; font-size: 28px; }
.profile-hero > strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 23px; letter-spacing: -.025em; }
.profile-id { min-width: 0; display: flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; color: var(--muted); background: var(--paper-2); font-size: 12px; }
.profile-id svg { width: 15px; height: 15px; }
.profile-account-tabs { min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 10px; padding: 4px; border-radius: 15px; background: var(--paper-2); }
.profile-account-tabs button { min-width: 0; min-height: 42px; padding: 6px 8px; border-radius: 12px; color: var(--muted); font-size: 13px; line-height: 1.15; }
.profile-account-tabs button.is-active { color: var(--ink); background: var(--card); box-shadow: 0 2px 8px rgba(0,0,0,.07); font-weight: 650; }
.profile-account-tabs small { display: block; margin-top: 2px; color: var(--login-orange); font-size: 10px; }
.profile-wallet-card { padding: 17px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.profile-wallet-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.profile-wallet-top button { min-height: 38px; padding: 0 16px; border-radius: 999px; background: var(--login-orange); color: #fff; font-weight: 700; }
.profile-wallet-card > strong { display: block; margin: 8px 0 16px; font-size: 34px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.profile-demo-row { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto 24px; gap: 8px; align-items: center; padding-top: 13px; border-top: 1px solid var(--line); text-align: left; }
.profile-demo-row b { font-variant-numeric: tabular-nums; }
.profile-help { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; }
/* Profile navigation: one column; arrows distinguish transitions and disclosure. */
.profile-menu-group { min-width: 0; margin-top: 22px; }
.profile-menu-group[hidden] { display: none; }
.overlay h3.profile-menu-heading { margin: 0 4px 8px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.profile-menu-list { display: grid; gap: 8px; min-width: 0; }
.profile-menu-row { scroll-margin-top: 64px; width: 100%; min-width: 0; min-height: 64px; display: grid; grid-template-columns: 28px minmax(0,1fr) 18px; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); text-align: left; }
.profile-menu-row[hidden] { display: none; }
.profile-menu-icon, .profile-menu-arrow { display: grid; place-items: center; color: var(--muted); }
.profile-menu-icon svg { width: 23px; height: 23px; }
.profile-menu-arrow svg { width: 18px; height: 18px; }
.profile-menu-copy { min-width: 0; display: grid; gap: 3px; overflow-wrap: anywhere; }
.profile-menu-copy strong { font-size: 15px; line-height: 1.3; font-weight: 650; }
.profile-menu-copy small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.profile-menu-copy .care-dot[hidden] { display: none; }
.profile-menu-copy .care-dot { position: static; display: inline-block; margin-left: 7px; }
.profile-menu-row:hover { background: var(--paper-2); }
.profile-menu-row:focus-visible, .profile-bonus-group > summary:focus-visible, .profile-section-menu > summary:focus-visible { outline: 2px solid var(--login-orange); outline-offset: 3px; }
.profile-bonus-group > summary, .profile-section-menu > summary { list-style: none; display: grid; grid-template-columns: minmax(0,1fr) 20px; align-items: center; gap: 12px; min-height: 56px; padding: 12px 14px; border-radius: 16px; background: var(--paper-2); color: var(--ink); cursor: pointer; }
.profile-bonus-group > summary::-webkit-details-marker, .profile-section-menu > summary::-webkit-details-marker { display: none; }
.profile-bonus-group > summary > span { display: grid; gap: 3px; }
.profile-bonus-group > summary strong { font-size: 15px; font-weight: 650; }
.profile-bonus-group > summary small { color: var(--muted); font-size: 12px; }
.profile-bonus-group > summary > svg, .profile-section-menu > summary > svg { width: 20px; height: 20px; color: var(--muted); transition: transform .15s; }
.profile-bonus-group[open] > summary > svg, .profile-section-menu[open] > summary > svg { transform: rotate(180deg); }
.profile-bonus-group[open] > .profile-menu-list { margin-top: 8px; }
.profile-section-menu { flex: 0 0 auto; min-width: 0; margin: 4px 0 12px; }
.profile-section-menu > summary { min-height: 44px; padding: 10px 12px; font-size: 13px; }
.profile-sections { display: grid; grid-template-columns: minmax(0,1fr); gap: 6px; min-width: 0; }
.profile-section-tabs { margin-top: 6px; padding: 2px; }
.profile-sections button { min-width: 0; width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); color: var(--ink); font-size: 14px; text-align: left; }
.profile-sections button svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); }
.profile-sections button.is-active { background: var(--paper-2); color: var(--login-orange); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .profile-bonus-group > summary > svg, .profile-section-menu > summary > svg { transition: none; } }
.profile-hidden-action { display: none !important; }
.profile-summary { width: 100%; min-width: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr) 24px; gap: 12px; align-items: center; padding: 4px 8px 14px; text-align: left; }
.profile-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--spruce-soft); color: var(--spruce); font-size: 21px; font-weight: 700; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-summary-copy { min-width: 0; display: grid; }
.profile-summary-copy strong { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-summary-copy small, .profile-account-values small { color: var(--muted); font-size: 14px; }
.profile-chevron { color: var(--muted); font-size: 32px; line-height: 1; text-align: right; }
.profile-divider { height: 1px; margin: 0 8px 14px; background: var(--line); }
.profile-section-label { margin: 0 10px 10px; color: var(--muted); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.profile-account { width: 100%; min-height: 64px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 18px; background: var(--paper-2); text-align: left; }
.profile-account-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--login-orange) 14%, transparent); color: var(--login-orange); }
.profile-account-icon svg { width: 21px; height: 21px; }
.profile-account-values { display: grid; justify-items: end; font-variant-numeric: tabular-nums; }
.profile-account-values strong { font-size: 18px; }
.profile-topup { width: 100%; min-height: 58px; margin: 10px 0 16px; display: flex; justify-content: center; align-items: center; gap: 12px; border-radius: 999px; background: var(--login-orange); color: #fff; font-size: 18px; font-weight: 650; box-shadow: 0 6px 18px rgba(255, 116, 23, 0.24); }
.profile-topup svg { width: 26px; height: 26px; }
.profile-menu-item { width: 100%; min-height: 56px; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; color: var(--muted); text-align: left; font-size: 18px; }
.profile-menu-item > span:first-child { text-align: center; }
.profile-menu-icon { display: grid; place-items: center; }
.profile-menu-icon svg { width: 23px; height: 23px; }
.profile-menu-item small { font-size: 14px; }
.profile-logout { margin-top: 6px; color: color-mix(in srgb, var(--danger) 82%, var(--muted)); }
.profile-push-item { cursor: pointer; }
.profile-push-icon { display: grid; place-items: center; }
.profile-push-icon svg { width: 24px; height: 24px; }
.notification-settings { display: grid; gap: 0; padding-bottom: 8px; }
.template-card>img{object-fit:contain!important;padding:18px;box-sizing:border-box;background:var(--paper-2)}
.template-detail-card>img{object-fit:contain!important;padding:24px;box-sizing:border-box;background:var(--paper-2)}
.notification-setting { min-width: 0; min-height: 68px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 11px 8px; border-bottom: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.notification-setting > span { min-width: 0; display: grid; gap: 3px; }
.notification-setting strong { font-size: 16px; font-weight: 650; }
.notification-setting small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.notification-master { margin: 4px 0 10px; padding: 14px; border: 0; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.notification-group-label { margin: 4px 8px 2px; color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.reminder-help-btn { font-size:20px;font-weight:750; }
.panel-head-actions { display:flex;align-items:center;justify-content:flex-end;gap:4px; }
.panel-head-actions .icon-btn { flex:0 0 44px; }
.reminder-help-copy { padding:8px 18px calc(18px + var(--safe-bottom));display:grid;gap:12px; }
.reminder-help-copy p { margin:0;color:var(--muted);line-height:1.45; }
.reminder-example { width:100%;padding:14px;border-radius:16px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);color:var(--ink);text-align:left;font-size:15px; }
.focus-help-example { display:grid;gap:5px;padding:14px;border-radius:16px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line); }
.focus-help-example span { color:var(--muted);line-height:1.4; }
.reminder-receipt { display:block;margin-top:10px;padding:10px 12px;border-radius:14px;background:var(--spruce-soft);color:var(--spruce);font-weight:700;text-align:left; }
.reminder-receipt small { display:block;margin-top:3px;font-weight:500;color:var(--muted); }
.profile-details-head { min-height: 54px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; }
.profile-details-head h2 { text-align: center; }
/* Любая полноэкранная страница .overlay > .xxx-page: без белого списка, чтобы новые страницы не уезжали под статус-бар */
.overlay > [class$="-page"] > .profile-details-head {
  min-height: calc(54px + var(--safe-top));
  padding: var(--safe-top) 16px 0;
  flex: 0 0 auto;
}
.profile-sites-page > .profile-details-head h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(17px, 5vw, 22px); }
.profile-name { font-size: 26px; margin: 18px 0 0; letter-spacing: -0.03em; }
.profile-email { margin: 8px 0 22px; color: var(--muted); overflow-wrap: anywhere; }
.profile-details-identity { display: grid; justify-items: center; margin: 10px 0 18px; }
.profile-avatar-large { width: 88px; height: 88px; font-size: 34px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.profile-details-identity .profile-name { margin-top: 12px; text-align: center; }
.profile-data { margin: 0 0 22px; padding: 0 14px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.profile-data div { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.profile-data div:last-child { border-bottom: 0; }
.profile-data dt { color: var(--muted); }
.profile-data dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.overlay .fine { padding: 0 16px; }
#profile-details .fine { padding: 0; }
.theme-set { border: 0; margin: 8px 0 22px; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.theme-set legend { padding: 0 0 8px; color: var(--muted); font-size: 13px; }
.theme-set button { border-radius: 999px; padding: 8px 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.theme-set button[aria-pressed="true"] { background: var(--spruce); color: var(--spruce-ink); }
#delete-account { margin: 8px 0; width: 100%; min-height: 52px; }

.toast {
  position: fixed;
  left: 50%;
  top: calc(70px + var(--safe-top));
  transform: translate(-50%, -8px);
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  background: #163c31;
  color: #fff;
  border: 1px solid rgba(117, 200, 169, .32);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .24);
  padding: 10px 14px;
  border-radius: 14px;
  z-index: 50;
  max-width: calc(100% - 32px);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  text-align: left;
}
.toast[data-kind="success"]::before {
  content: "✓";
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #38b98b;
  color: #08271f;
  font-size: 14px;
  font-weight: 800;
}
.toast.is-visible { animation: toast-in .2s ease-out both; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -8px) scale(.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .toast.is-visible { animation: none; transform: translate(-50%, 0); }
}

.sessions-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + var(--safe-top)) 14px 8px;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}

.home-sticky-stack {
  position: sticky;
  top: 0;
  z-index: 20;
  flex: 0 0 auto;
  background: var(--paper);
}

.brand-lockup { min-width: 0; }

.wordmark {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.05;
}

.wordmark span { color: #2997ff; }

.connection {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.connection::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--danger);
}

.connection.online::before { background: #1f9d55; box-shadow: 0 0 8px rgba(31, 157, 85, 0.45); }
.connection.checking::before { background: #d0892d; }

.icon-btn.round { border-radius: 50%; }
.push-toggle,.push-help { width:40px;height:40px;border-radius:50%;display:grid;place-items:center;padding:0;flex:0 0 40px;border:1.5px solid rgba(142,142,147,.38);background:rgba(142,142,147,.10);color:#8e8e93;text-decoration:none;transition:.15s; }
.push-toggle svg { width:21px;height:21px; }
.push-toggle.active { color:#fff;background:var(--login-orange);border-color:#ffab6e;box-shadow:0 0 0 3px rgba(255,116,23,.28),0 3px 10px rgba(255,116,23,.32); }
.push-toggle-check { display:none; }
.push-toggle.completing .push-toggle-bell { display:none; }
.push-toggle.completing .push-toggle-check { display:block; }
.push-toggle.completing { color:#fff;background:var(--spruce);border-color:var(--spruce);box-shadow:0 0 0 3px color-mix(in srgb, var(--spruce) 24%, transparent);animation:push-cta-complete .7s ease forwards;pointer-events:none; }
@keyframes push-cta-complete { 0%,55% { opacity:1;transform:scale(1); } 100% { opacity:0;transform:scale(.78); } }
.push-toggle:active { transform:scale(.94); }
.push-help { width:28px;height:28px;flex-basis:28px;font-weight:800; }
.push-toggle[hidden],.push-help[hidden] { display:none; }
.push-toggle,.tabbar>button { position:relative; }
.nav-badge { position:absolute;top:-4px;right:-5px;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:#ff3b30;color:#fff;font-size:10px;font-weight:800;line-height:18px;text-align:center;box-shadow:0 0 0 2px var(--bg); }
.nav-badge[hidden] { display:none!important; }
.tabbar .nav-badge { top:2px;right:calc(50% - 25px);box-shadow:0 0 0 2px var(--card); }
#notifications-center-sheet { z-index:45; }
.notification-center-sheet { width:min(720px,100%);height:100%;min-height:0;margin:0 auto;display:flex;flex-direction:column;padding:var(--safe-top) 18px calc(14px + var(--safe-bottom));background:var(--paper); }
.notification-center-head { min-height:54px;display:grid;grid-template-columns:88px minmax(0,1fr) 88px;align-items:center; }
.notification-center-head h2 { margin:0;text-align:center;font-size:20px; }
.notification-center-head .icon-btn { justify-self:start; }
.notification-clear-all { justify-self:end;color:var(--danger);font-size:12px; }
.notification-clear-all[hidden] { display:none; }
.notification-center-list { flex:1;min-height:0;display:grid;align-content:start;gap:8px;overflow:auto;padding:10px 0 18px; }
.notification-center-item-wrap { min-width:0;display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:6px;align-items:stretch; }
.notification-center-item { width:100%;display:grid;gap:4px;text-align:left;border:1px solid var(--line);border-radius:16px;background:var(--card);color:var(--ink);padding:13px 14px; }
.notification-center-item.is-read { opacity:.58; }
.notification-center-item strong { font-size:15px; }
.notification-center-item span,.notification-center-item time { color:var(--muted);font-size:13px;line-height:1.35; }
.notification-center-delete { width:40px;border-radius:14px;background:var(--card);color:var(--muted);box-shadow:inset 0 0 0 1px var(--line);font-size:20px; }
.notification-center-actions { display:grid;grid-template-columns:1fr 1fr;gap:10px; }

#support { z-index: 60; flex-direction: column; background: var(--paper); }
#support.show { display: flex; }
.support-head { width: min(720px,100%); min-width:0; min-height: calc(62px + var(--safe-top)); margin:0 auto; padding:var(--safe-top) 12px 8px; display:grid; grid-template-columns:42px 42px minmax(0,1fr) 42px 42px; gap:8px; align-items:center; border-bottom:1px solid var(--line); background:var(--paper); }
.support-avatar { width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--spruce-soft);color:var(--spruce); }
.support-avatar svg { width:23px;height:23px; }
.support-title-wrap { min-width:0; }
.support-title-wrap h2 { margin:0;font-size:16px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.support-status { margin:3px 0 0;color:var(--muted);font-size:11px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.support-thread { width:min(720px,100%); min-width:0; flex:1; margin:0 auto; overflow-y:auto; overscroll-behavior:contain; padding:18px 14px calc(164px + var(--safe-bottom)); display:flex; flex-direction:column; gap:10px; }
.support-message { max-width:86%;min-width:0;padding:11px 13px;border-radius:18px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);align-self:flex-start;overflow-wrap:anywhere; }
.support-message.is-user { align-self:flex-end;background:var(--spruce);color:var(--spruce-ink);box-shadow:none;border-bottom-right-radius:6px; }
.support-message.is-support { border-bottom-left-radius:6px; }
.support-message p { margin:0;white-space:pre-wrap;line-height:1.4;font-size:15px; }
.support-message small { display:block;margin-top:6px;color:inherit;opacity:.62;font-size:10px;text-align:right; }
.support-message.is-pending { opacity:.76; }
.support-retry { display:block;margin:8px 0 0 auto;padding:5px 9px;border-radius:999px;background:color-mix(in srgb, currentColor 14%, transparent);color:inherit;font-size:12px;font-weight:650; }
.support-message-file { display:block;min-width:0;margin-top:8px;padding:8px 10px;border-radius:10px;background:color-mix(in srgb, var(--paper) 55%, transparent);color:inherit;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.support-composer { z-index:61;padding-top:8px; }
.support-composer .input-box { min-width:0;margin-top:0;padding:10px;border-radius:25px;box-shadow:inset 0 0 0 1px var(--line),0 8px 28px color-mix(in srgb,var(--ink) 8%,transparent); }
.support-composer textarea { width:100%;min-width:0;min-height:24px;max-height:140px;box-sizing:border-box;border:0;outline:0;resize:none;overflow-y:auto;background:transparent;color:inherit;padding:4px 6px 0;font:inherit;font-size:16px;line-height:1.4; }
.support-composer .input-toolbar { overflow:visible; }
.support-composer .toolbar-left { overflow:hidden; }
.support-composer .toolbar-right { position:relative; }
.support-composer .voice-status { max-width:min(42vw,170px); }
.support-composer .attach-preview { display:flex;gap:8px;overflow-x:auto;padding:0 2px 8px;scrollbar-width:none; }
.support-composer .attach-preview[hidden] { display:none; }
.support-composer .attach-preview::-webkit-scrollbar { display:none; }
.support-pending-file { position:relative;min-width:150px;max-width:190px;height:52px;display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:8px;padding:6px 30px 6px 6px;border-radius:12px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);overflow:hidden; }
.support-pending-file::before { content:'FILE';width:40px;height:40px;border-radius:8px;display:grid;place-items:center;background:var(--paper-2);color:var(--muted);font-size:9px;font-weight:800;letter-spacing:.04em; }
.support-pending-file.is-image::before { content:'';background-image:var(--support-preview);background-size:cover;background-position:center; }
.support-pending-file.is-uploading::after { content:'';position:absolute;left:17px;top:17px;width:16px;height:16px;border:2px solid color-mix(in srgb,var(--muted) 35%,transparent);border-top-color:var(--spruce);border-radius:50%;animation:mic-ring-spin .75s linear infinite; }
.support-pending-file span { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px; }
.support-pending-file button { position:absolute;right:4px;top:4px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;font-size:18px; }
#support-attach-btn,#support-mic-btn,#support-send { width:34px;height:34px;min-width:34px;max-width:34px;min-height:34px;max-height:34px;flex:0 0 34px; }
#support-mic-btn { color:color-mix(in srgb,var(--ink) 78%,var(--muted));background:color-mix(in srgb,var(--paper-2) 76%,var(--card));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--line) 72%,transparent),0 1px 2px color-mix(in srgb,var(--ink) 8%,transparent); }
#support-mic-btn:not(.recording) .mic-icon-mic { width:22px;height:22px;display:grid;place-items:center; }
#support-mic-btn .mic-icon-mic svg { width:22px;height:22px;display:block; }
#support-mic-btn.recording { background:var(--danger);color:#fff;box-shadow:none; }
#support-send:disabled { opacity:1;background:color-mix(in srgb,var(--paper-2) 72%,var(--card));color:var(--muted);box-shadow:inset 0 0 0 1px var(--line); }
#support-send:not(:disabled) { background:var(--spruce);color:var(--spruce-ink);box-shadow:0 4px 12px color-mix(in srgb,var(--spruce) 42%,transparent); }
@media (max-width:350px) { .support-composer .voice-status { max-width:105px; } .support-composer .estimate { font-size:11px; } }
@media (max-width: 350px) { .support-head { grid-template-columns:38px 36px minmax(0,1fr) 38px 38px;gap:5px;padding-inline:7px; } .support-status { font-size:10px; } .support-thread { padding-inline:10px; } }
.promo-overlay { z-index:70;align-items:center;justify-content:center;padding:18px;background:rgba(0,0,0,.42); }
.promo-overlay.show { display:flex; }
.promo-modal-card { position:relative;width:min(420px,100%);min-width:0;padding:26px 20px 20px;border-radius:24px;background:var(--card);box-shadow:0 22px 70px rgba(0,0,0,.25);display:grid;gap:14px; }
.promo-modal-card h2,.promo-modal-card p { margin:0; }
.promo-modal-card>p { color:var(--muted);font-size:14px;line-height:1.4; }
.promo-modal-card label { min-width:0; }
.promo-modal-card input { width:100%;min-width:0;max-width:100%;box-sizing:border-box;text-transform:uppercase;font-size:16px; }
.promo-close { position:absolute;right:10px;top:10px;font-size:24px; }
.promo-result { min-height:20px;color:var(--spruce)!important;font-weight:650; }
#loyalty { z-index:65;background:var(--paper); }
#loyalty.show { display:block; }
.loyalty-page { width:min(720px,100%);height:100%;margin:0 auto;display:flex;flex-direction:column;min-width:0; }
.loyalty-body { flex:1;min-height:0;overflow:auto;padding:16px 16px calc(28px + var(--safe-bottom));display:grid;align-content:start;gap:14px; }
.loyalty-summary,.loyalty-rules { padding:20px;border-radius:24px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line); }
.loyalty-summary { display:grid;gap:8px; }
.loyalty-summary small,.loyalty-summary p,.loyalty-rules p { color:var(--muted); }
.loyalty-summary strong { font-size:30px;letter-spacing:-.04em; }
.loyalty-summary b { color:var(--spruce); }
.loyalty-summary p,.loyalty-rules p { margin:0;font-size:14px;line-height:1.45; }
.loyalty-track { height:9px;border-radius:999px;background:var(--paper-2);overflow:hidden; }
.loyalty-track span { display:block;height:100%;width:0;border-radius:inherit;background:var(--spruce);transition:width .2s ease; }
.loyalty-levels { display:grid;gap:8px; }
.loyalty-level { display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-radius:18px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line); }
.loyalty-level span { display:grid;gap:2px; }.loyalty-level small { color:var(--muted); }.loyalty-level b { color:var(--spruce);font-size:18px; }
.loyalty-level.is-active { background:var(--spruce);color:var(--spruce-ink);box-shadow:none; }.loyalty-level.is-active small,.loyalty-level.is-active b { color:inherit; }
.loyalty-rules { display:grid;gap:10px; }.loyalty-rules h3 { margin:0; }
#referrals{z-index:66;background:var(--paper)}#referrals.show{display:block}.referral-page{width:min(720px,100%);height:100%;margin:auto;display:flex;flex-direction:column}.referral-body{flex:1;overflow:auto;padding:16px 16px calc(28px + var(--safe-bottom));display:grid;align-content:start;gap:14px}.referral-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.referral-summary>div,.referral-card{min-width:0;padding:16px;border-radius:20px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line)}.referral-summary div{display:grid;gap:5px}.referral-summary small,.referral-card p{color:var(--muted)}.referral-summary strong{font-size:18px}.referral-card{display:grid;gap:12px}.referral-card h3,.referral-card p{margin:0}.referral-link{min-width:0;display:flex;gap:8px;align-items:center;padding:10px;border-radius:14px;background:var(--paper-2)}.referral-link span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.referral-link button{color:var(--spruce);font-weight:700;border-radius:999px;padding:6px 12px;transition:background .2s ease,color .2s ease}
.referral-link button.copy-success{background:#38b98b;color:#08271f;animation:copy-pop .38s cubic-bezier(.34,1.56,.64,1)}
.referral-link button.copy-success::before{content:"✓ ";font-weight:800}
@keyframes copy-pop{0%{transform:scale(.88)}55%{transform:scale(1.1)}100%{transform:scale(1)}}
@media (prefers-reduced-motion: reduce){.referral-link button.copy-success{animation:none}}.referral-card ol{margin:0;padding-left:20px;display:grid;gap:8px;color:var(--muted)}@media(max-width:350px){.referral-summary{grid-template-columns:1fr}.referral-summary>div{grid-template-columns:1fr auto}}

.avatar-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--spruce-soft);
  color: var(--spruce);
  font-weight: 700;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
}

.avatar-btn svg { width: 22px; height: 22px; }
.avatar-btn img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.avatar-btn.guest-login, .create-menu-login {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--login-orange);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 7px 20px rgba(255, 116, 23, 0.22);
}

.session-search-bar {
  flex: 0 0 auto;
  padding: 6px 12px 10px;
}

.session-search-wrap { position: relative; }

#session-search {
  height: 48px;
  border-radius: 18px;
  padding: 0 46px 0 42px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236d675e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 21-4.34-4.34' /%3E%3Ccircle cx='11' cy='11' r='8' /%3E%3C/svg%3E") no-repeat 14px center;
  -webkit-appearance: none;
  appearance: none;
}

#session-search::-webkit-search-cancel-button { display: none; }

#session-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink);
  display: grid;
  place-items: center;
}

#session-search-clear[hidden] { display: none; }

#session-search-clear svg { width: 16px; height: 16px; }

.session-list {
  flex: 1;
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 12px calc(120px + var(--safe-bottom));
  list-style: none;
}

.session-list:empty {
  flex: 0 0 auto;
  padding-bottom: 8px;
}

.session-card {
  width: 100%;
  min-height: 96px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  text-align: left;
  padding: 14px;
  border: 0;
  border-radius: 20px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  -webkit-user-select: none;
  user-select: none;
}

.session-card:active { transform: scale(0.985); }

.agent-icon {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--spruce);
  background: var(--spruce-soft);
  border: 1px solid var(--line);
}
.session-unread-badge { position:absolute;top:-3px;right:-3px;min-width:17px;height:17px;padding:0 3px;border-radius:999px;background:#ff3b30;color:#fff;font-size:10px;font-weight:800;line-height:17px;text-align:center;box-shadow:0 0 0 2px var(--card); }

.agent-icon svg { width: 22px; height: 22px; }
.agent-icon.tone-1 { color: #315b86; background: #eef3f8; }
.agent-icon.tone-2 { color: #6b4c2a; background: #f6f0e8; }
.agent-icon.tone-3 { color: #3d5a45; background: #eef4ef; }
.agent-icon.tone-4 { color: #5c456b; background: #f4eef6; }
.agent-icon.tone-5 { color: #6b3d3d; background: #f7eeee; }

html[data-theme="dark"] .agent-icon.tone-1,
html[data-theme="dark"] .agent-icon.tone-2,
html[data-theme="dark"] .agent-icon.tone-3,
html[data-theme="dark"] .agent-icon.tone-4,
html[data-theme="dark"] .agent-icon.tone-5 { background: var(--paper-2); }

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .agent-icon.tone-1,
  html[data-theme="auto"] .agent-icon.tone-2,
  html[data-theme="auto"] .agent-icon.tone-3,
  html[data-theme="auto"] .agent-icon.tone-4,
  html[data-theme="auto"] .agent-icon.tone-5 { background: var(--paper-2); }
}

.session-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.session-card .row1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.session-card .name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-card .time { font-size: 12px; color: var(--muted); flex: 0 0 auto; padding-top: 2px; }
.session-card .meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-card .preview {
  font-size: 13px;
  line-height: 1.38;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.session-card .name .star-icon { color: var(--login-orange); margin-right: 2px; }

.session-status-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; }
.session-status-line > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.general-page{width:min(720px,100%);height:100%;margin:auto;display:flex;flex-direction:column}.general-body{flex:1;overflow:auto;padding:16px 16px calc(28px + var(--safe-bottom));display:grid;align-content:start;gap:14px}.general-card{min-width:0;padding:18px;border-radius:22px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);display:grid;gap:12px}.general-card h3,.general-card p{margin:0}.general-card p{color:var(--muted);font-size:14px}.general-card label{min-width:0}.general-card input,.general-card select{width:100%;min-width:0;max-width:100%;box-sizing:border-box;font-size:16px}
.security-page{width:min(720px,100%);height:100%;margin:auto;display:flex;flex-direction:column}.security-body{flex:1;overflow:auto;padding:16px 16px calc(28px + var(--safe-bottom));display:grid;align-content:start;gap:14px}.security-card{min-width:0;padding:18px;border-radius:22px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);display:grid;gap:12px}.security-card h3,.security-card p{margin:0}.security-card p{color:var(--muted);font-size:14px}.security-card label,.security-card form{min-width:0}.security-card input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;font-size:16px}.security-methods{display:grid;gap:8px}.security-methods>div{display:flex;justify-content:space-between;gap:12px;padding:12px;border-radius:14px;background:var(--paper-2)}.security-methods b{color:var(--spruce);font-size:13px}.security-qr{width:min(240px,100%);aspect-ratio:1;margin:auto;padding:8px;border-radius:16px;background:#fff}.security-qr svg{display:block;width:100%;height:100%}.security-secret{width:100%;min-width:0;padding:12px;border-radius:12px;background:var(--paper-2);overflow-wrap:anywhere;font-family:ui-monospace,monospace;letter-spacing:.08em}.security-backups{padding:14px;border-radius:16px;background:color-mix(in srgb,var(--spruce) 10%,var(--card));display:grid;gap:8px}.security-backups pre{margin:0;padding:12px;border-radius:12px;background:var(--paper-2);white-space:pre-wrap;font-size:15px;line-height:1.6}.security-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.security-card-head h3{min-width:0}.security-card-head .btn{width:auto;margin:0}.security-sessions{display:grid;gap:8px}.security-sessions article{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;border-radius:14px;background:var(--paper-2)}.security-sessions article span{min-width:0;display:grid;gap:3px}.security-sessions strong,.security-sessions small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.security-sessions small{color:var(--muted)}.security-sessions button{flex:none;color:var(--danger);font-weight:650}.security-danger{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--danger) 35%,var(--line))}.security-danger form{display:grid;gap:12px}.security-danger form[hidden]{display:none}
.analytics-page{width:min(720px,100%);height:100%;margin:auto;display:flex;flex-direction:column}.analytics-body{flex:1;overflow:auto;padding:16px 16px calc(28px + var(--safe-bottom));display:grid;align-content:start;gap:14px}.analytics-periods{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:4px;border-radius:15px;background:var(--paper-2)}.analytics-periods button{min-width:0;min-height:40px;padding:4px;border-radius:12px;color:var(--muted);font-size:12px}.analytics-periods button[aria-pressed="true"]{background:var(--card);color:var(--ink);box-shadow:0 2px 8px rgba(0,0,0,.07);font-weight:700}.analytics-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.analytics-summary>div{min-width:0;padding:14px 10px;border-radius:18px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);display:grid;gap:5px}.analytics-summary small{color:var(--muted);font-size:11px}.analytics-summary strong{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:18px;font-variant-numeric:tabular-nums}.analytics-card{min-width:0;padding:18px;border-radius:22px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);display:grid;gap:14px}.analytics-card h3{margin:0}.analytics-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.analytics-card-head small{color:var(--muted)}.analytics-chart{height:150px;display:flex;align-items:flex-end;gap:3px;padding:10px 4px 0;border-bottom:1px solid var(--line);background:linear-gradient(to top,color-mix(in srgb,var(--line) 50%,transparent) 1px,transparent 1px);background-size:100% 25%}.analytics-chart i{flex:1;min-width:1px;border-radius:4px 4px 0 0;background:linear-gradient(180deg,var(--login-orange),color-mix(in srgb,var(--login-orange) 68%,var(--spruce)));transition:height .2s ease}.analytics-breakdown{display:grid;gap:13px}.analytics-breakdown article{display:grid;gap:7px}.analytics-breakdown article>div{min-width:0;display:flex;justify-content:space-between;gap:10px}.analytics-breakdown strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.analytics-breakdown span{flex:none;color:var(--muted);font-size:13px}.analytics-breakdown i{height:7px;border-radius:999px;background:var(--paper-2);overflow:hidden}.analytics-breakdown b{display:block;height:100%;border-radius:inherit;background:var(--spruce)}.analytics-prices{width:100%;min-width:0;min-height:76px;padding:15px 17px;border-radius:20px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);display:flex;align-items:center;justify-content:space-between;text-align:left}.analytics-prices span{min-width:0;display:grid;gap:3px}.analytics-prices small{color:var(--muted)}.analytics-prices b{font-size:28px;color:var(--muted)}.analytics-note{margin:0 4px;line-height:1.45}
.operations-page{width:min(720px,100%);height:100%;margin:auto;display:flex;flex-direction:column}.operations-body{flex:1;overflow:auto;padding:12px 16px calc(28px + var(--safe-bottom));display:grid;align-content:start;gap:12px}.operations-filters{display:flex;gap:7px;overflow-x:auto;padding:3px 0 7px;scrollbar-width:none}.operations-filters::-webkit-scrollbar{display:none}.operations-filters button{flex:none;min-height:38px;padding:0 14px;border-radius:999px;color:var(--muted);background:var(--paper-2);font-size:13px}.operations-filters button[aria-pressed="true"]{color:#fff;background:var(--spruce);font-weight:700}.operations-list{display:grid;gap:9px}.operation-item{min-width:0;border-radius:18px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);overflow:hidden}.operation-main{width:100%;min-width:0;display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center;padding:14px;text-align:left}.operation-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:12px;background:color-mix(in srgb,var(--spruce) 12%,transparent);color:var(--spruce);font-size:20px;font-weight:800}.operation-usage .operation-icon{background:color-mix(in srgb,var(--danger) 10%,transparent);color:var(--danger)}.operation-main>span:nth-child(2){min-width:0;display:grid;gap:3px}.operation-main strong,.operation-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.operation-main small{color:var(--muted);font-size:12px}.operation-main>b{font-variant-numeric:tabular-nums;color:var(--spruce);white-space:nowrap}.operation-usage .operation-main>b{color:var(--ink)}.operation-detail{padding:0 14px 13px 62px;display:grid;gap:7px}.operation-detail[hidden]{display:none}.operation-detail p{min-width:0;margin:0;display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:12px}.operation-detail b{min-width:0;color:var(--ink);text-align:right;overflow-wrap:anywhere}.operations-empty{margin:28px 0;text-align:center;color:var(--muted)}.operations-note{padding:16px;border-radius:18px;background:var(--paper-2);display:grid;gap:7px}.operations-note p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--muted); }
.status-dot.status-idle { background: var(--muted); }
.status-dot.status-running { background: var(--spruce); animation: hovai-status-pulse 1.4s ease-in-out infinite; }
.status-dot.status-error { background: var(--danger); }
@keyframes hovai-status-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--card);
  border-radius: 18px;
  width: min(340px, 90vw);
  max-height: 80vh;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: scale(0.05);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
  will-change: transform;
}
.modal-overlay.open .modal-box { transform: scale(1); }
.sheet-btn {
  display: block;
  width: 100%;
  padding: 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  font: inherit;
  font-size: 16px;
  text-align: center;
  color: var(--spruce);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.sheet-btn:first-child { border-top: none; }
.sheet-btn.sheet-cancel { color: var(--muted); font-weight: 600; }

#new-session-modal .modal-box { width: min(380px, 90vw); }
#new-session-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 10px;
  font-size: 18px;
  font-weight: 700;
}
#new-session-modal .modal-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
#new-session-input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
}
#new-session-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#new-session-chips:empty { display: none; }
.new-session-chip {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  background: var(--paper-2);
  color: var(--ink);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 16px 10px;
  flex: 0 0 auto;
}
.filter-chip-bar:empty { display: none; }
.filter-chip {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  white-space: nowrap;
}
.filter-chip.active { background: var(--spruce); color: var(--spruce-ink); box-shadow: none; }

.new-session-actions { display: flex; gap: 10px; }
.new-session-actions button {
  flex: 1;
  border: 0;
  border-radius: 14px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.new-session-actions button:active { transform: scale(0.98); }
#new-session-ok-btn { background: var(--spruce); color: var(--spruce-ink); }
#new-session-cancel-btn { background: var(--paper-2); color: var(--ink); }

.tabbar {
  --active-pill-x: 5px;
  --active-pill-w: 46px;
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(2px + var(--safe-bottom));
  width: min(420px, calc(100% - 24px));
  transform: translateX(-50%);
  z-index: 25;
  display: none;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  height: 56px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(18, 18, 20, 0.68);
  color: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  overflow: visible;
}

.tabbar-active-pill {
  position: absolute;
  z-index: 0;
  top: 5px;
  left: 0;
  width: var(--active-pill-w);
  height: 46px;
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.18);
  transform: translate3d(var(--active-pill-x), 0, 0);
  transition: transform 340ms cubic-bezier(.22,1,.36,1), width 340ms cubic-bezier(.22,1,.36,1), border-radius 180ms ease, box-shadow 180ms ease;
  will-change: transform, width;
  pointer-events: none;
}
.tabbar.is-pill-moving .tabbar-active-pill {
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 18px rgba(255,255,255,.08);
}

body[data-view="home"] .tabbar,
body[data-view="reminders"] .tabbar,
body[data-view="memory"] .tabbar,
body[data-view="focus"] .tabbar,
body[data-view="projects"] .tabbar { display: grid; }

.tabbar > button {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 46px;
  border: 0;
  border-radius: 23px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}

.tabbar > button.is-active { color: #fff; background: transparent; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar .tab-icon { overflow: visible; transform-origin: center; }
.tabbar .tab-icon,
.tabbar .tab-icon * { transform-box: fill-box; }
.tabbar > button.nav-icon-run { transform-origin: center; }
.tabbar > #tab-chats.nav-icon-run { animation: tab-button-chat 680ms cubic-bezier(.2,.8,.2,1); }
.tabbar > #tab-projects.nav-icon-run { animation: tab-button-folder 680ms cubic-bezier(.2,.8,.2,1); }
.tabbar > #tab-reminders.nav-icon-run { animation: tab-button-bell 720ms cubic-bezier(.2,.8,.2,1); }
.tabbar > #tab-memory.nav-icon-run { animation: tab-button-brain 720ms cubic-bezier(.2,.8,.2,1); }
.tabbar > #tab-focus.nav-icon-run { animation: tab-button-target 720ms cubic-bezier(.2,.8,.2,1); }
.tabbar > #tab-create.nav-icon-run { animation: tab-button-create 720ms cubic-bezier(.2,.8,.2,1); }
.tabbar > button.nav-icon-run .tab-icon { animation: tab-icon-press 560ms cubic-bezier(.2,.8,.2,1); }
.tabbar > button.nav-icon-run .tab-icon-chat .chat-back { animation: tab-chat-pop 620ms cubic-bezier(.2,.8,.2,1); }
.tabbar > button.nav-icon-run .tab-icon-chat .chat-front { animation: tab-chat-lift 620ms cubic-bezier(.2,.8,.2,1); }
.tabbar > button.nav-icon-run .tab-icon-chat .chat-dots circle { animation: tab-chat-dot 560ms ease-out both; }
.tabbar > button.nav-icon-run .tab-icon-chat .chat-dots circle:nth-child(2) { animation-delay: 70ms; }
.tabbar > button.nav-icon-run .tab-icon-chat .chat-dots circle:nth-child(3) { animation-delay: 140ms; }
.tabbar > button.nav-icon-run .tab-icon-folder .folder-lid { animation: tab-folder-open 620ms cubic-bezier(.2,.8,.2,1); transform-origin: 12px 9px; }
.tabbar > button.nav-icon-run .tab-icon-folder .folder-sheet { animation: tab-folder-sheet 620ms cubic-bezier(.2,.8,.2,1); }
.tabbar > button.nav-icon-run .tab-icon-bell .bell-body { animation: tab-bell-ring 640ms ease-in-out; transform-origin: 12px 12px; }
.tabbar > button.nav-icon-run .tab-icon-bell .bell-wave { animation: tab-bell-wave 620ms ease-out both; }
.tabbar > button.nav-icon-run .tab-icon-bell .bell-wave-right { animation-delay: 55ms; }
.tabbar > button.nav-icon-run .tab-icon-brain .brain-left { animation: tab-brain-left 640ms cubic-bezier(.2,.8,.2,1); transform-origin: 10px 12px; }
.tabbar > button.nav-icon-run .tab-icon-brain .brain-right { animation: tab-brain-right 640ms cubic-bezier(.2,.8,.2,1); transform-origin: 14px 12px; }
.tabbar > button.nav-icon-run .tab-icon-brain .brain-detail { animation: tab-brain-detail 620ms ease-out; }
.tabbar > button.nav-icon-run .tab-icon-brain .brain-pulse { animation: tab-brain-pulse 680ms ease-out both; stroke:#5eead4;stroke-width:2.2;filter:drop-shadow(0 0 2px rgba(94,234,212,.9)); }
.tabbar > button.nav-icon-run .tab-icon-brain .brain-pulse-dot { animation: tab-brain-pulse-dot 680ms ease-out both; color:#5eead4;filter:drop-shadow(0 0 2px rgba(94,234,212,.9)); }
.tabbar > button.nav-icon-run .tab-icon-target .target-outer { animation: tab-target-outer 620ms ease-out; transform-origin: 12px 12px; }
.tabbar > button.nav-icon-run .tab-icon-target .target-middle { animation: tab-target-middle 620ms 45ms ease-out; transform-origin: 12px 12px; }
.tabbar > button.nav-icon-run .tab-icon-target .target-core { animation: tab-target-core 620ms 90ms ease-out; transform-origin: 12px 12px; color:#5eead4;filter:drop-shadow(0 0 2px rgba(94,234,212,.9)); }
.tabbar > button.nav-icon-run .tab-icon-target .target-arrow { animation: tab-target-arrow 680ms cubic-bezier(.2,.8,.2,1); stroke:#5eead4;filter:drop-shadow(0 0 2px rgba(94,234,212,.85)); }
.tabbar > button.nav-icon-run .plus { animation: tab-plus-glow 620ms ease-out; }
.tabbar > button.nav-icon-run .plus svg { animation: tab-plus-turn 620ms cubic-bezier(.2,.8,.2,1); }
.tabbar > button.nav-icon-run .plus-ring { animation: tab-plus-ring 680ms ease-out; }

@keyframes tab-icon-press { 0%{transform:translateY(0) scale(1)} 28%{transform:translateY(1px) scale(.88)} 62%{transform:translateY(-2.5px) scale(1.09)} 100%{transform:translateY(0) scale(1)} }
@keyframes tab-button-chat { 0%,100%{transform:translateY(0) scale(1)} 28%{transform:translateY(2px) scale(.92)} 62%{transform:translateY(-5px) scale(1.13)} }
@keyframes tab-button-folder { 0%,100%{transform:translateY(0) scale(1)} 32%{transform:translateY(2px) scale(.93)} 60%{transform:translateY(-6px) scale(1.14)} }
@keyframes tab-button-bell { 0%,100%{transform:rotate(0) scale(1)} 24%{transform:rotate(12deg) scale(1.08)} 48%{transform:rotate(-11deg) scale(1.14)} 70%{transform:rotate(6deg) scale(1.08)} 86%{transform:rotate(-3deg) scale(1.03)} }
@keyframes tab-button-brain { 0%,100%{transform:scale(1)} 30%{transform:scale(.9)} 62%{transform:scale(1.18)} 78%{transform:scale(1.08)} }
@keyframes tab-button-target { 0%,100%{transform:scale(1)} 24%{transform:scale(.88)} 58%{transform:scale(1.22)} 76%{transform:scale(1.08)} }
@keyframes tab-button-create { 0%,100%{transform:scale(1)} 28%{transform:scale(.88)} 60%{transform:scale(1.16)} 78%{transform:scale(1.06)} }
@keyframes tab-chat-pop { 0%,18%{transform:translate(0,0);opacity:.35} 58%{transform:translate(3px,-2.5px);opacity:1} 100%{transform:translate(0,0);opacity:1} }
@keyframes tab-chat-lift { 52%{transform:translate(-1px,-2.5px)} }
@keyframes tab-chat-dot { 0%,24%{transform:translateY(2px) scale(.4);opacity:0} 68%{transform:translateY(0) scale(1.25);opacity:1} 100%{transform:scale(1);opacity:1} }
@keyframes tab-folder-open { 0%,100%{transform:rotateX(0)} 48%{transform:translateY(-3px) rotate(-7deg)} }
@keyframes tab-folder-sheet { 0%,100%{transform:translateY(0)} 52%{transform:translateY(-5px)} }
@keyframes tab-bell-ring { 0%,100%{transform:rotate(0)} 25%{transform:rotate(14deg)} 52%{transform:rotate(-12deg)} 74%{transform:rotate(7deg)} 88%{transform:rotate(-3deg)} }
@keyframes tab-bell-wave { 0%,18%{opacity:0;stroke-dasharray:0 8} 62%{opacity:1;stroke-dasharray:8 0} 100%{opacity:0} }
@keyframes tab-brain-left { 0%,100%{transform:translateX(0) scale(1)} 48%{transform:translateX(-1.8px) scale(1.07)} }
@keyframes tab-brain-right { 0%,100%{transform:translateX(0) scale(1)} 48%{transform:translateX(1.8px) scale(1.07)} }
@keyframes tab-brain-detail { 0%{opacity:.35} 55%{opacity:1} 100%{opacity:1} }
@keyframes tab-brain-pulse { 0%{stroke-dasharray:0 20;stroke-dashoffset:0;opacity:0} 25%{opacity:1} 72%{stroke-dasharray:7 20;stroke-dashoffset:-7} 100%{stroke-dasharray:0 20;stroke-dashoffset:-14;opacity:0} }
@keyframes tab-brain-pulse-dot { 0%{transform:translateY(0) scale(.5);opacity:0} 28%{opacity:1} 78%{transform:translateY(-12px) scale(1);opacity:1} 100%{transform:translateY(-13px) scale(.4);opacity:0} }
@keyframes tab-target-outer { 0%{transform:scale(.82);opacity:.35} 62%{transform:scale(1.045);opacity:1} 100%{transform:scale(1);opacity:1} }
@keyframes tab-target-middle { 0%{transform:scale(.65);opacity:.25} 68%{transform:scale(1.08);opacity:1} 100%{transform:scale(1);opacity:1} }
@keyframes tab-target-core { 0%{transform:scale(.2);opacity:0} 72%{transform:scale(1.25);opacity:1} 100%{transform:scale(1);opacity:1} }
@keyframes tab-target-arrow { 0%{transform:translate(7px,-7px);opacity:0;stroke-dasharray:0 24} 22%{opacity:1} 72%{transform:translate(0,0);stroke-dasharray:24 0} 86%{transform:translate(-1px,1px)} 100%{transform:translate(0,0);opacity:1} }
@keyframes tab-plus-turn { 48%{transform:rotate(45deg) scale(.82)} 72%{transform:rotate(45deg) scale(1.08)} 100%{transform:rotate(0) scale(1)} }
@keyframes tab-plus-glow { 45%{box-shadow:0 5px 22px rgba(255,116,23,.72)} }
@keyframes tab-plus-ring { 0%{transform:scale(.72);opacity:.9} 100%{transform:scale(1.9);opacity:0} }

/* Nav micro-animations intentionally ignore prefers-reduced-motion: short (<700ms), <=6px, owner request 2026-10-16 */
.tabbar .label {
  display: none;
}

.tabbar .plus {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #ff9a4d, var(--login-orange));
  box-shadow: 0 5px 16px rgba(255, 116, 23, 0.42);
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
  position: relative;
}
.tabbar .plus > svg { position: relative; z-index: 1; }
.tabbar .plus-ring { position:absolute;inset:0;border:1px solid rgba(255,154,77,.8);border-radius:50%;opacity:0;pointer-events:none; }

@media (min-width: 700px) {
  .tabbar { width: min(480px, 92vw); }
}

.chat-title-wrap { min-width: 0; flex: 1; }
.chat-title-wrap h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- personal views: reminders, memory, focus ---------- */

.view-panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  margin: 0 auto;
}

.panel-body {
  flex: 1;
  overflow: auto;
  padding: 12px 16px calc(120px + var(--safe-bottom));
}

.reminder-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.reminder-form input[type="text"], .reminder-form textarea, .reminder-form select,
.reminder-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 14px;
  padding: 12px;
  font-size: 16px;
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.reminder-form textarea { resize: vertical; min-height: 56px; }
.reminder-form-row { display: flex; flex-direction: column; gap: 10px; overflow-x: hidden; }
.reminder-field { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.reminder-field label, .reminder-field > span { font-size: 12px; color: var(--muted); }
.reminder-field input[type="date"], .reminder-field input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  background: var(--card);
  border: 0;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
}
.reminder-quick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.reminder-quick-chip {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 600;
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
}
.reminder-quick-chip:active { transform: scale(0.95); }
#reminder-create-btn { width: 100%; }
#reminder-session-hint:empty { display: none; }

.reminders-list { display: flex; flex-direction: column; gap: 10px; }
.reminders-empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
.reminder-slot { display: flex; flex-direction: column; gap: 6px; }
.reminder-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 18px;
  padding: 12px;
}
.reminder-item.is-paused { opacity: 0.55; }
.reminder-item-main { flex: 1; min-width: 0; }
.reminder-item-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reminder-item-sub { font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reminder-item-toggle {
  width: 46px;
  height: 28px;
  border-radius: 14px;
  border: none;
  background: var(--line);
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}
.reminder-item-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: left 0.15s ease;
}
.reminder-item-toggle.is-on { background: var(--spruce); }
.reminder-item-toggle.is-on::after { left: 21px; }
.reminder-item-edit, .reminder-item-delete {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 15px;
  flex: 0 0 auto;
}
.reminder-item-delete { color: var(--danger); font-size: 20px; font-weight: 300; line-height: 1; }
.reminder-item-edit:active, .reminder-item-delete:active { transform: scale(0.92); }
.reminder-item-edit-row {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 16px;
  padding: 10px;
}
.reminder-item-edit-row.open { display: flex; }
.reminder-item-edit-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  padding: 9px 8px;
  font-size: 15px;
  background: var(--paper-2);
  color: var(--ink);
}
.reminder-item-edit-save {
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 700;
  background: var(--spruce);
  color: var(--spruce-ink);
  cursor: pointer;
  flex: 0 0 auto;
}

.confirm-text { margin: 0 0 14px; font-size: 15px; line-height: 1.4; }
#confirm-sheet .modal-box { width: min(340px, 88vw); padding: 18px; }
#confirm-ok-btn { background: var(--danger); color: #fff; }

.memory-search-wrap { display: block; margin-bottom: 10px; }
.memory-list { display: flex; flex-direction: column; gap: 8px; }
.memory-empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
.memory-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 16px;
  padding: 12px;
}
.memory-item.highlight { box-shadow: inset 0 0 0 2px var(--spruce); animation: memory-flash 1.6s ease; }
@keyframes memory-flash {
  0%, 40% { background: color-mix(in srgb, var(--spruce) 22%, var(--card)); }
  100% { background: var(--card); }
}
.memory-item-text {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.memory-item.is-expanded .memory-item-text { -webkit-line-clamp: unset; display: block; }
.memory-delete {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: var(--paper-2);
  color: var(--danger);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  flex: 0 0 auto;
}
.memory-pin {
  width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--paper-2); color: var(--muted); cursor: pointer; flex: 0 0 auto; font-size: 16px;
}
.memory-pin.is-pinned { color: #d79b16; }
.memory-receipt {
  display: block;
  margin: 6px 0 0;
  border: 0;
  padding: 0;
  background: none;
  color: var(--spruce);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.focus-goal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
#focus-goal-label { font-size: 16px; font-weight: 700; }
.focus-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.focus-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--spruce);
  transition: width 0.25s ease;
}
.focus-bar-fill.over-target { background: var(--danger); }
.focus-breakdown-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.focus-empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
.focus-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 12px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
  text-align: left;
}
.focus-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.focus-row.focus-in-goal .focus-check { border-color: var(--spruce); background: var(--spruce); }
.focus-row.focus-in-goal .focus-check::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--spruce-ink);
  border-bottom: 2px solid var(--spruce-ink);
  transform: rotate(-45deg) translateY(-1px);
}
.focus-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-pct { font-weight: 700; color: var(--muted); flex: 0 0 auto; }
.focus-row.focus-in-goal .focus-pct { color: var(--spruce); }
.focus-hint { margin-top: 12px; }

@media (min-width: 900px) {
  body { background: var(--paper-2); }
  .app { background: var(--paper); box-shadow: var(--shadow); }
}

/* Profile API */
.api-page { width:100%; min-width:0; min-height:100%; background:var(--paper); color:var(--ink); }
.api-body { min-width:0; padding:16px max(16px,env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); display:flex; flex-direction:column; gap:14px; }
.api-intro,.api-docs,.api-key { background:var(--card); border-radius:18px; box-shadow:inset 0 0 0 1px var(--line); padding:16px; }
.api-intro { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.api-intro p,.api-docs p { margin:6px 0 0; color:var(--muted); font-size:13px; line-height:1.4; }
.api-intro .btn { flex:0 0 auto; }
.api-search { display:flex; flex-direction:column; gap:6px; color:var(--muted); font-size:13px; min-width:0; }
.api-search input,.api-create-card input { width:100%; min-width:0; max-width:100%; box-sizing:border-box; }
.api-keys { display:flex; flex-direction:column; gap:10px; }
.api-intro-actions { display:flex; flex-wrap:wrap; gap:8px; }
.api-video-consent { display:flex!important; align-items:flex-start; gap:9px; line-height:1.4; }
.api-video-consent input { flex:0 0 auto; margin-top:3px; }
.api-secret-context { white-space:pre-wrap; overflow-wrap:anywhere; max-width:100%; font-size:12px; }
.api-key-head { display:flex; align-items:flex-start; gap:10px; }
.api-key-head > span { flex:1; min-width:0; }
.api-key-head strong,.api-key-head small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.api-key-head small { color:var(--muted); margin-top:4px; }
.api-key-status { border-radius:999px; padding:5px 8px; font-size:12px; background:color-mix(in srgb,var(--spruce) 15%,transparent); color:var(--spruce); }
.api-key-status.off { background:var(--paper-2); color:var(--muted); }
.api-key-meta { margin:12px 0; display:grid; grid-template-columns:1fr 1fr; gap:8px; font-size:12px; color:var(--muted); }
.api-key-models { font-size:12px; line-height:1.4; color:var(--muted); word-break:break-word; }
.api-key-actions { display:flex; gap:8px; margin-top:12px; }
.api-key-actions .btn { flex:1; }
.api-docs h3 { margin:0; }
.api-docs { min-width:0; }
.api-docs > button { width:100%; min-width:0; margin-top:8px; border:0; border-radius:12px; background:var(--paper-2); color:var(--ink); padding:12px; display:flex; justify-content:space-between; gap:8px; text-align:left; }
.api-docs > button code { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.api-docs > button span { flex:none; }
.api-docs code,.api-docs pre { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.api-docs details { margin-top:14px; }
.api-docs summary { cursor:pointer; font-weight:700; }
.api-docs pre { white-space:pre-wrap; word-break:break-word; background:var(--paper-2); border-radius:12px; padding:12px; font-size:11px; line-height:1.5; overflow:auto; }
.api-create-card fieldset { border:0; padding:0; margin:14px 0; min-width:0; }
.api-create-card legend { font-weight:700; margin-bottom:8px; }
.api-models { max-height:240px; overflow:auto; display:flex; flex-direction:column; gap:8px; }
.api-models label { display:flex; flex-direction:row; align-items:center; gap:10px; padding:10px; border-radius:12px; background:var(--paper-2); }
.api-models input { width:20px; height:20px; flex:0 0 auto; }
.api-secret { width:100%; border:0; border-radius:12px; padding:14px; background:var(--paper-2); color:var(--ink); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; word-break:break-all; text-align:left; margin:8px 0 14px; }
@media (max-width:359px) { .api-intro { align-items:stretch; flex-direction:column; } .api-intro .btn { width:100%; } .api-key-meta { grid-template-columns:1fr; } }

/* iOS WebKit can collapse a nested grid row around the horizontal filter scroller. */
.profile-sites-summary{margin:10px 0;display:flex;gap:8px;align-items:center;padding:12px 14px;border-radius:16px;background:var(--paper-2)}.profile-sites-summary>button:first-child{flex:1;text-align:left;color:var(--ink);font-size:13px}.profile-sites-summary.is-warning{box-shadow:inset 0 0 0 1px var(--danger)}.profile-sites-summary.is-warning>button:first-child{color:var(--danger)}
.profile-sites-page{width:min(720px,100%);height:100%;margin:auto;display:flex;flex-direction:column}.profile-sites-body{flex:1;overflow:auto;padding:12px 16px calc(28px + var(--safe-bottom));display:grid;align-content:start;gap:12px}.profile-sites-totals,.profile-site-card{padding:16px;border-radius:18px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line)}.profile-sites-list,.profile-site-card{display:grid;gap:10px}.profile-site-card h3,.profile-site-card p{margin:0}.profile-site-card progress{width:100%;accent-color:var(--spruce)}.profile-site-address{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.profile-site-address span{flex:1;min-width:180px;overflow:hidden;text-overflow:ellipsis}.profile-site-address a,.profile-site-address button{color:var(--spruce)}.profile-site-actions{display:flex;gap:7px;flex-wrap:wrap}.profile-site-domain{display:flex;gap:8px}.profile-site-domain input{min-width:0;flex:1;font-size:16px}.profile-sites-empty{padding:38px;text-align:center}.profile-sites-empty strong{display:block;margin-bottom:14px}
.operations-body { min-height:0; display:flex; flex-direction:column; align-content:normal; }
.operations-filters,.operations-list,.operations-note { flex:none; }

.create-category-icon { display: grid; width: 28px; height: 28px; place-items: center; }
.create-category-icon svg { width: 28px; height: 28px; }
#quick-model-icon { display: grid; place-items: center; }
#quick-model-icon svg { width: 16px; height: 16px; }
.quick-model-chevron { transform: none; }
.quick-model-chevron svg { width: 16px; height: 16px; display: block; }
.tabbar .plus svg { width: 22px; height: 22px; }
.profile-more-menu .profile-more-icon svg { width: 14px; height: 14px; }
.profile-help svg { width: 14px; height: 14px; }
.profile-action-icon svg { width: 20px; height: 20px; }
.profile-referral-mark svg { width: 22px; height: 22px; }
.profile-chevron { display: grid; place-items: center; justify-self: end; }
.profile-chevron svg { width: 22px; height: 22px; }
.push-help svg { width: 16px; height: 16px; }
.support-pending-file button svg { width: 14px; height: 14px; }

/* Plus, mic, and send only. Do not target .send or .toolbar-icon-btn. */
.quick-actions:has(#quick-attach) {
  gap: 8px;
  align-items: center;
}
#toolbar-right:has(#mic-btn) {
  gap: 8px;
  align-items: center;
}
#input-toolbar:has(#mic-btn) {
  overflow: visible;
}
#quick-attach,
#quick-settings,
.quick-actions #quick-mic-btn,
#quick-send,
#attach-btn,
#mic-btn,
#send {
  width: 46px;
  height: 46px;
  min-width: 46px;
  max-width: 46px;
  min-height: 46px;
  max-height: 46px;
  flex: 0 0 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  opacity: 1;
  line-height: 0;
}
#quick-attach svg,
#quick-settings svg,
.quick-actions #quick-mic-btn svg,
#quick-send svg,
#attach-btn svg,
#mic-btn svg,
#send svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
}
#quick-attach,
#quick-settings,
.quick-actions #quick-mic-btn,
#attach-btn,
#mic-btn {
  background: color-mix(in srgb, var(--paper-2) 72%, var(--card));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent);
}
.quick-actions #quick-mic-btn { margin-left: auto; }
#quick-mic-btn .mic-ring,
#mic-btn .mic-ring {
  display: none;
  animation: none;
}
#quick-send:not(:disabled),
#send:not(:disabled) {
  background: var(--spruce);
  color: var(--spruce-ink);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--spruce) 42%, transparent);
}
#quick-send:disabled,
#send:disabled {
  opacity: 1;
  background: color-mix(in srgb, var(--paper-2) 72%, var(--card));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent);
}
#attach-btn[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1.5px var(--spruce), 0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent);
}
.quick-actions #quick-mic-btn.recording,
#mic-btn.recording {
  background: color-mix(in srgb, var(--paper-2) 72%, var(--card));
  color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent), 0 0 0 6px color-mix(in srgb, var(--danger) 18%, transparent);
}
#composer #mic-btn.recording {
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent), 0 0 0 4px color-mix(in srgb, var(--danger) 18%, transparent);
}
#quick-attach:focus-visible,
#quick-settings:focus-visible,
.quick-actions #quick-mic-btn:focus-visible,
#quick-send:focus-visible,
#attach-btn:focus-visible,
#mic-btn:focus-visible,
#send:focus-visible {
  outline: 2px solid var(--spruce);
  outline-offset: 2px;
}
#quick-attach:active,
#quick-settings:active,
#attach-btn:active,
.quick-actions #quick-mic-btn:not(.recording):active,
#mic-btn:not(.recording):active {
  background: color-mix(in srgb, var(--paper-2) 46%, var(--ink));
}
#quick-send:not(:disabled):active,
#send:not(:disabled):active {
  background: color-mix(in srgb, var(--spruce) 82%, #000);
}
@media (hover: hover) {
  #quick-attach:hover,
  #quick-settings:hover,
  #attach-btn:hover,
  .quick-actions #quick-mic-btn:hover:not(.recording),
  #mic-btn:hover:not(.recording) {
    background: color-mix(in srgb, var(--paper-2) 48%, var(--card));
  }
  #quick-send:hover:not(:disabled),
  #send:hover:not(:disabled) {
    background: color-mix(in srgb, var(--spruce) 88%, #000);
  }
}
@media (prefers-reduced-motion: reduce) {
  #quick-mic-btn.transcribing::after,
  #mic-btn.transcribing::after,
  #quick-mic-btn .mic-ring,
  #mic-btn .mic-ring {
    animation: none;
  }
}
@media (max-width: 390px) {
  #quick-model { max-width: 58vw; }
}
.projects-body,.project-body{margin:0 auto;flex:1;min-height:0}
.news-card{--news-accent:#ff8a3d;position:fixed;z-index:80;left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right));bottom:calc(82px + env(safe-area-inset-bottom));max-width:520px;margin:auto;display:grid;grid-template-columns:112px 1fr;background:var(--card);border:1px solid var(--line);border-radius:24px;overflow:hidden;box-shadow:0 18px 50px #0004}
.news-card[hidden]{display:none}.news-card>button:first-child{position:absolute;right:9px;top:7px;z-index:2;border:0;background:#0002;color:inherit;width:28px;height:28px;border-radius:50%;font-size:20px}.news-card-art{background:linear-gradient(145deg,var(--news-accent),color-mix(in srgb,var(--news-accent) 58%,#18242c));color:white;padding:18px 12px;display:flex;flex-direction:column;justify-content:space-between;align-items:center}.news-card-art span{font-size:54px;line-height:1}.news-card-art small{font-size:9px;font-weight:800;letter-spacing:.12em}.news-card-copy{padding:17px 38px 15px 16px}.news-card-copy strong{display:block;font-size:17px}.news-card-copy p{font-size:13px;color:var(--muted);margin:5px 0 12px}.news-card-copy button,.news-story-cta{border:0;border-radius:999px;background:var(--spruce);color:var(--spruce-ink);font-weight:750;padding:10px 16px}
.news-stories{position:fixed;inset:0;z-index:1000;background:linear-gradient(160deg,#ff934b 0%,#e35b44 47%,#372c66 100%);color:white;padding:calc(12px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));overflow:hidden}.news-stories[hidden]{display:none}.news-story-progress{display:flex;gap:5px;height:4px;position:relative;z-index:4}.news-story-progress i{flex:1;border-radius:9px;background:#ffffff55;overflow:hidden}.news-story-progress i.done,.news-story-progress i.active{background:white}.news-stories header{position:relative;z-index:4;display:flex;align-items:center;gap:10px;padding:12px 2px}.news-stories header>button{order:2;margin-left:auto;border:0;background:#ffffff24;color:white;border-radius:50%;width:38px;height:38px;font-size:26px}.news-stories header div{display:flex;flex-direction:column}.news-stories header small{opacity:.7}.news-stories main{height:calc(100% - 72px);display:flex;flex-direction:column;justify-content:flex-end;position:relative;z-index:2;padding:0 22px 8px}.news-story-visual{position:absolute;inset:3% 3% 37%;display:flex;align-items:center;justify-content:center}.news-story-visual span{display:grid;place-items:center;width:min(58vw,280px);aspect-ratio:1;border-radius:34%;font-size:min(30vw,150px);background:linear-gradient(145deg,#ffffff38,#ffffff0d);box-shadow:inset 0 1px 0 #fff6,0 30px 80px #37133955;backdrop-filter:blur(12px)}.news-story-copy small{font-size:13px;font-weight:850;letter-spacing:.15em}.news-story-copy h2{font-size:clamp(34px,10vw,58px);line-height:1.02;margin:9px 0 13px;max-width:720px}.news-story-copy p{font-size:clamp(18px,5vw,25px);line-height:1.35;margin:0 0 22px;max-width:700px;color:#fffde8}.news-story-cta{width:100%;font-size:18px;padding:16px;background:white;color:#171717}.story-hit{position:absolute;z-index:3;top:70px;bottom:0;width:34%;border:0;background:transparent}.story-hit.prev{left:0}.story-hit.next{right:0}.project-code-model{width:100%;min-width:0;max-width:100%;box-sizing:border-box;font-size:16px;margin-top:6px}
.news-open{overflow:hidden}@media(min-width:700px){.news-stories{inset:18px;max-width:520px;margin:auto;border-radius:32px;box-shadow:0 20px 80px #0008}.news-story-visual span{width:240px}.news-story-copy h2{font-size:48px}}

.paywall-tier{margin:14px 0;}
.paywall-tier h3{font-size:15px;margin:0 0 8px;opacity:.85;}
.paywall-packs{display:flex;gap:8px;flex-wrap:wrap;}
#project-publish-paywall h2{padding-right:44px;margin-top:0;}
#project-public-url{white-space:pre-line;word-break:break-all;}

.profile-account-tabs button { position: relative; }
.care-dot { position: absolute; top: 8px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--login-orange); box-shadow: 0 0 0 2px var(--paper-2); }
.care-steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.care-notify-btn { margin-top: 10px; min-height: 40px; padding: 8px 14px; border-radius: 12px; background: var(--login-orange); color: #fff; font-weight: 650; }
#support-help { font-size: 20px; font-weight: 750; }
#support-help-sheet { z-index: 75; }
body:has(#support.show) #news-card { display: none !important; }
body:has(.overlay.show) #news-card { display: none !important; }

/* Projects · compact Apple-style app catalog */
#view-projects {
  --projects-blue: #2997ff;
  --projects-blue-ink: #fff;
  --projects-surface: color-mix(in srgb, var(--card) 96%, var(--ink) 4%);
  --projects-surface-2: color-mix(in srgb, var(--card) 88%, var(--ink) 12%);
}
.projects-body {
  width: min(720px, 100%);
  padding: 8px 16px calc(112px + var(--safe-bottom));
  scroll-padding-bottom: calc(112px + var(--safe-bottom));
}
.project-new {
  min-height: 44px;
  padding: 8px 18px;
  background: var(--projects-blue, #2997ff);
  color: #fff;
  transition: opacity .16s ease, filter .16s ease;
}
.project-new:active { opacity: .72; }
.projects-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 22px;
  padding: 4px;
  border-radius: 14px;
  background: var(--projects-surface-2);
}
.projects-switcher button {
  min-width: 0;
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.projects-switcher button.is-active {
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 1px 5px rgba(0,0,0,.16);
}
.projects-switcher span { color: inherit; }
.template-store { margin: 0; }
.template-store-head {
  align-items: end;
  margin: 0 2px 4px;
}
.template-store-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.template-store-head h3 {
  margin-top: 2px;
  font-size: clamp(25px, 7vw, 34px);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.template-store-head > span { padding-bottom: 4px; }
.template-store-intro {
  margin: 12px 2px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.template-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.template-filters button {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--projects-surface-2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  touch-action: manipulation;
}
.template-filters button.is-active {
  background: var(--ink);
  color: var(--paper);
}
.template-store-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.template-card {
  position: relative;
  min-width: 0;
  min-height: 116px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--projects-surface);
  box-shadow: none;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, opacity .16s ease;
}
.template-card:hover { background: var(--projects-surface-2); }
.template-card:active { opacity: .74; }
.template-card:has(.template-open:focus-visible) { outline: 3px solid color-mix(in srgb, #2997ff 62%, transparent); outline-offset: 2px; }
.template-open {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  border-radius: inherit;
}
.template-app-icon,
.template-detail-icon {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #fff 20%);
  background:
    radial-gradient(circle at 35% 22%, rgba(255,255,255,.28), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--template-accent) 26%, #4a4a4f), #131315 72%);
  color: #e9e9ee;
  text-shadow: 0 1px 1px #000, 0 -1px 0 rgba(255,255,255,.35);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.14), 0 5px 14px rgba(0,0,0,.22);
  font-weight: 750;
  letter-spacing: -.06em;
}
.template-app-icon::after,
.template-detail-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.18) 43%, transparent 60%);
  pointer-events: none;
}
.template-app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  font-size: 39px;
}
.template-card-body {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.template-card-title {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px 8px;
}
.template-card-title h4 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1.15;
}
.template-kind {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, #2997ff 16%, transparent);
  color: var(--projects-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.template-card p {
  min-height: 0;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.template-card .template-category {
  width: max-content;
  max-width: 100%;
  padding: 3px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--projects-surface-2);
  color: var(--muted);
  font-size: 11px;
}
.template-create,
.project-open-pill {
  position: relative;
  z-index: 2;
  min-width: 78px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--projects-blue);
  color: var(--projects-blue-ink);
  font-size: 14px;
  font-weight: 750;
  touch-action: manipulation;
}
.template-create:active { filter: brightness(.8); }
.template-filter-empty {
  margin: 20px 0;
  color: var(--muted);
  text-align: center;
}
#projects-mine-pane .projects-section-head { margin: 2px 2px 14px; }
#projects-mine-pane .projects-section-head h3 { font-size: 26px; letter-spacing: -.03em; }
.project-list { gap: 10px; }
.project-card {
  grid-template-columns: 64px minmax(0,1fr) auto;
  gap: 12px;
  min-height: 100px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--projects-surface);
  box-shadow: none;
}
.project-icon {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(145deg, color-mix(in srgb,var(--spruce) 32%,#56565b),#171719);
  color: #f2f2f5;
  font-size: 31px;
  font-weight: 760;
  text-shadow: 0 1px 1px #000;
}
.project-card-copy { gap: 4px; }
.project-card-title { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; }
.project-card-title strong { min-width: 0; }
.project-card-title b {
  flex: none;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--projects-surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.project-card-title b[data-status="published"] { background: color-mix(in srgb,#32d74b 15%,transparent); color: color-mix(in srgb,#32d74b 82%,var(--ink)); }
.project-card-copy small { display: -webkit-box; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.project-open-pill { min-width: 76px; }
.project-empty {
  padding: min(15vh, 96px) 20px 28px;
}
.project-empty > span { margin-bottom: 18px; }
.project-empty h3 { margin: 0 0 8px; }
.project-empty p { max-width: 310px; margin: 0 auto 20px; }

/* Template details are a real full-screen page, not a card-shaped modal. */
.template-detail-page {
  z-index: 82;
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  background: var(--paper);
}
.template-detail-page.show { display: block; }
.template-detail-shell {
  width: min(720px, 100%);
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.template-detail-nav {
  flex: none;
  min-height: calc(58px + var(--safe-top));
  padding: calc(8px + var(--safe-top)) 16px 6px;
  display: flex;
  align-items: flex-end;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
}
.template-detail-nav button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: -8px;
  padding: 7px 8px;
  color: #2997ff;
  font-size: 17px;
}
.template-detail-nav svg { width: 25px; height: 25px; }
.template-detail-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 20px 26px;
  overscroll-behavior: contain;
}
.template-detail-hero {
  display: grid;
  grid-template-columns: 116px minmax(0,1fr);
  align-items: center;
  gap: 20px;
  margin: 4px 0 26px;
}
.template-detail-icon {
  width: 116px;
  height: 116px;
  border-radius: 27px;
  font-size: 62px;
}
.template-detail-hero h2 {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.04;
  letter-spacing: -.045em;
}
.template-detail-hero p { margin: 0; color: var(--muted); }
.template-detail-hero p span {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--projects-surface-2, var(--card));
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.template-detail-lead {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.42;
  letter-spacing: -.018em;
}
.template-detail-scroll > .template-stats {
  gap: 7px 14px;
  margin-bottom: 28px;
}
.template-info-section,
.template-preview-section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.template-info-section h3,
.template-preview-section h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.template-info-section p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.template-preview-section img {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
}
.template-community {
  margin: 0 0 6px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.template-community summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.template-community .template-social-actions { margin-top: 12px; }
.template-detail-actions {
  flex: none;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
}
.template-detail-actions .btn {
  min-width: 0;
  min-height: 50px;
  padding: 11px 12px;
  border-radius: 999px;
  background: var(--projects-surface-2, var(--card));
  font-weight: 750;
}
.template-detail-actions .btn.primary { background: #2997ff; color: #fff; }

@media (max-width: 430px) {
  .projects-body { padding-inline: 14px; }
  .template-store-head > span { display: none; }
  .template-card { grid-template-columns: 64px minmax(0,1fr) auto; gap: 10px; padding: 12px; }
  .template-app-icon { width: 64px; height: 64px; border-radius: 17px; font-size: 34px; }
  .template-card-title h4 { font-size: 17px; }
  .template-create { min-width: 72px; padding-inline: 11px; }
  .project-card { grid-template-columns: 58px minmax(0,1fr) auto; gap: 10px; padding: 12px; }
  .project-icon { width: 58px; height: 58px; }
}
@media (max-width: 350px) {
  .projects-body { padding-inline: 12px; }
  .template-filters { gap: 6px; }
  .template-filters button { min-height: 38px; padding-inline: 13px; }
  .template-card { grid-template-columns: 56px minmax(0,1fr); }
  .template-app-icon { width: 56px; height: 56px; border-radius: 15px; font-size: 30px; }
  .template-card .template-create { grid-column: 2; width: max-content; min-width: 92px; justify-self: start; }
  .project-card { grid-template-columns: 54px minmax(0,1fr); }
  .project-icon { width: 54px; height: 54px; }
  .project-open-pill { grid-column: 2; width: max-content; }
  .template-detail-scroll { padding-inline: 16px; }
  .template-detail-hero { grid-template-columns: 88px minmax(0,1fr); gap: 15px; }
  .template-detail-icon { width: 88px; height: 88px; border-radius: 22px; font-size: 47px; }
  .template-detail-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .template-card,.project-new { transition: none; }
}
.security-connect { color: var(--login-orange); font-size: 14px; font-weight: 750; }
.screen-mark { position: fixed; top: var(--safe-top, env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 120; max-width: 80vw; pointer-events: none; white-space: nowrap; font: 650 8.5px/1 var(--font, system-ui, -apple-system, "SF Pro Text", "Segoe UI", sans-serif); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); opacity: .8; }
.screen-mark[hidden] { display: none; }

/* Настройки генерации видео и картинок */
.media-settings { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.media-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 0; border-radius: 999px; background: var(--paper-2); color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer;
}
.media-pill svg, .media-menu-row svg { width: 20px; height: 20px; flex: 0 0 auto; }
.media-pill[aria-expanded="true"] { outline: 1px solid var(--line); }
.media-menu {
  position: absolute; z-index: 20; min-width: 190px; max-width: calc(100% - 8px);
  padding: 12px 8px 8px; border: 1px solid var(--line); border-radius: 22px;
  background: var(--paper); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.media-menu[hidden] { display: none; }
.media-menu-title { padding: 0 10px 8px; color: var(--muted); font-size: 15px; }
.media-menu-list { display: grid; gap: 2px; max-height: min(46vh, 330px); overflow-y: auto; overscroll-behavior: contain; }
.media-menu-row {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 10px; border: 0; border-radius: 14px;
  background: transparent; color: var(--ink); font: inherit; font-size: 16px; text-align: left; cursor: pointer;
}
.media-menu-row span { flex: 1 1 auto; }
.media-menu-row:active, .media-menu-row:hover { background: var(--paper-2); }
.media-radio { flex: 0 0 auto; width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 50%; box-sizing: border-box; }
.media-menu-row[aria-checked="true"] .media-radio { border: 6px solid var(--ink); }

/* ---- Ассистенты ---- */
.sessions-header .drawer-btn { flex: 0 0 auto; margin-right: 2px; }
.drawer-overlay { background: transparent; flex-direction: row; z-index: 90; }
.drawer-panel {
  width: min(86vw, 340px); height: 100%; background: var(--paper); display: flex; flex-direction: column;
  padding: calc(10px + var(--safe-top)) 14px calc(14px + var(--safe-bottom)); box-shadow: 8px 0 40px rgba(0,0,0,.25); overflow: hidden;
}
.drawer-scrim { flex: 1; background: rgba(12, 15, 13, .42); backdrop-filter: blur(3px); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer-nav { display: grid; gap: 4px; padding: 6px; background: var(--paper-2); border-radius: 18px; }
.drawer-nav button {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border: 0; border-radius: 14px;
  background: transparent; color: var(--ink); font: inherit; font-size: 17px; text-align: left;
}
.drawer-nav button:active { background: var(--line); }
.drawer-nav svg { width: 22px; height: 22px; flex: 0 0 auto; }
.drawer-label { margin: 18px 6px 6px; color: var(--muted); font-size: 14px; }
.drawer-history { flex: 1; overflow: auto; display: grid; align-content: start; gap: 2px; }
.drawer-history-item {
  border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; padding: 12px 8px;
  border-radius: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.drawer-history-item:active { background: var(--paper-2); }

.assistants-page { z-index: 60; overflow: hidden; }
.assistants-head { display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-top)) 14px 8px; width: min(720px, 100%); margin: 0 auto; }
.assistants-head h2 { margin: 0; font-size: 22px; }
.assistant-detail-titles { min-width: 0; }
.assistant-detail-titles h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistants-tools { display: flex; gap: 8px; padding: 0 14px 8px; width: min(720px, 100%); margin: 0 auto; }
.assistants-tools input { flex: 1; min-width: 0; font-size: 16px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); }
.assistants-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 10px; width: min(720px, 100%); margin: 0 auto; }
.assistants-tabs button { border: 0; border-radius: 999px; padding: 9px 16px; background: var(--paper-2); color: var(--ink); font: inherit; }
.assistants-tabs button.is-active { background: var(--ink); color: var(--paper); }
.assistants-body { flex: 1; overflow: auto; width: min(720px, 100%); margin: 0 auto; padding: 4px 14px calc(110px + var(--safe-bottom)); -webkit-overflow-scrolling: touch; }
.assistant-section { min-width: 0; margin-bottom: 18px; }
.assistant-section h3, .assistants-body h3 { margin: 8px 0 2px; font-size: 21px; line-height: 1.15; }
.assistant-section > .fine { margin: 6px 0 0; line-height: 1.3; }
.assistant-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.assistant-card {
  min-width: 0; overflow: hidden; display: grid; grid-template-rows: auto auto auto; gap: 4px; align-content: start;
  text-align: left; padding: 11px; border: 1px solid var(--line); border-radius: 19px;
  background: var(--paper-2); color: var(--ink); font: inherit; min-height: 124px;
}
.assistant-card:active { transform: scale(.98); }
.assistant-card-top { min-width: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.assistant-card strong {
  min-width: 0; overflow: hidden; overflow-wrap: anywhere; font-size: 15px; line-height: 1.18;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.assistant-card small { min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.assistant-likes { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 12px; line-height: 1; }
.assistant-likes svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.assistant-likes.is-favorite { color: var(--ink); }
.assistant-likes.is-favorite svg { fill: currentColor; }
.assistant-icon {
  width: 48px; height: 48px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 22%, transparent);
}
.assistant-icon svg { width: 54%; height: 54%; }
.assistant-icon.big { width: 84px; height: 84px; border-radius: 24px; font-size: 42px; margin: 0 auto 10px; }
.assistant-modal-overlay { background: rgba(12, 15, 13, .5); backdrop-filter: blur(4px); align-items: center; justify-content: center; z-index: 70; }
.assistant-modal-card { width: min(340px, calc(100% - 40px)); background: var(--paper); border-radius: 26px; padding: 24px 18px 18px; text-align: center; display: grid; gap: 10px; }
.assistant-modal-card h3 { margin: 0; font-size: 22px; }
.assistant-modal-card p { margin: 0 0 6px; }
.assistant-detail { z-index: 72; }
.assistant-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.assistant-detail-footer { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px calc(12px + var(--safe-bottom)); background: linear-gradient(transparent, var(--paper) 30%); display: grid; width: min(720px, 100%); margin: 0 auto; }
#assistant-form-page { z-index: 74; }
.assistant-form { display: grid; gap: 12px; align-content: start; }
.assistant-form label { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.assistant-form input, .assistant-form textarea, .assistant-form select {
  font-size: 16px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); min-width: 0; width: 100%; box-sizing: border-box; font-family: inherit;
}
.assistant-form input[type="color"] { padding: 4px; height: 48px; }
.assistant-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.assistant-form .error { color: var(--danger); margin: 0; min-height: 1em; }
.assistants-page .fine, .assistant-modal-card .fine { padding: 0; }
.assistant-detail-titles h2 { line-height: 1.15; }
.assistant-detail-titles .fine { margin: 2px 0 0; }
.assistant-model-note { margin: 14px 0 6px; padding: 10px 12px; border-radius: 14px; background: var(--paper-2); color: var(--ink); font-size: 14px; line-height: 1.35; }
@media (max-width: 350px) {
  .assistants-body { padding-inline: 10px; }
  .assistant-grid { gap: 8px; }
  .assistant-card { min-height: 120px; padding: 10px; border-radius: 17px; }
  .assistant-icon { width: 44px; height: 44px; border-radius: 13px; font-size: 22px; }
  .assistant-card strong { font-size: 14px; }
}

.features-page{width:min(720px,100%);height:100%;margin:auto;display:flex;flex-direction:column}.features-body{flex:1;overflow:auto;padding:12px 16px calc(28px + var(--safe-bottom));display:grid;align-content:start;gap:18px}.features-tier{display:grid;gap:10px}.features-tier h3{margin:0;font-size:13px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.feature-card{display:grid;grid-template-columns:40px minmax(0,1fr);gap:4px 12px;align-items:start;padding:14px;border-radius:18px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line)}.feature-card.is-soon{opacity:.6}.feature-icon{grid-row:1/3;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--paper);box-shadow:inset 0 0 0 1px var(--line)}.feature-icon svg{width:20px;height:20px}.feature-text{min-width:0;display:grid;gap:4px}.feature-text p{margin:0;color:var(--muted);font-size:13px;line-height:1.4}.feature-go{grid-column:2;justify-self:start;margin-top:6px}
.hint-q{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font-weight:700;color:var(--spruce);background:var(--card);box-shadow:0 1px 4px rgba(0,0,0,.18),inset 0 0 0 1px var(--line);flex:none}
#feature-hint{align-items:flex-end;justify-content:flex-end;background:rgba(0,0,0,.4)}.feature-hint-sheet{width:100%;box-sizing:border-box;padding:20px 18px calc(18px + var(--safe-bottom));border-radius:22px 22px 0 0;background:var(--card);display:grid;gap:10px}.feature-hint-sheet p{margin:0;color:var(--muted);line-height:1.45}.feature-hint-actions{display:flex;gap:8px;flex-wrap:wrap}
.onboarding-page{position:relative;width:min(480px,100%);height:100%;margin:auto;box-sizing:border-box;padding:calc(56px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));display:flex;flex-direction:column;align-items:center;justify-content:space-between}.onboarding-skip{position:absolute;top:calc(14px + var(--safe-top));right:16px;color:var(--muted)}.onboarding-slide{flex:1;display:grid;align-content:center;justify-items:center;gap:14px;text-align:center}.onboarding-icon{width:84px;height:84px;border-radius:24px;display:grid;place-items:center;background:var(--card);box-shadow:inset 0 0 0 1px var(--line)}.onboarding-icon svg{width:38px;height:38px}.onboarding-slide h2{margin:0;font-size:24px}.onboarding-slide p{margin:0;color:var(--muted);line-height:1.5}.onboarding-dots{display:flex;gap:8px;margin:16px 0}.onboarding-dots i{width:8px;height:8px;border-radius:50%;background:var(--line)}.onboarding-dots i.on{background:var(--spruce)}.onboarding-next{width:100%}
.skill-count-badge{display:inline-flex;margin-left:6px;padding:3px 7px;border-radius:999px;background:color-mix(in srgb,var(--spruce) 14%,transparent);color:var(--spruce);font-size:11px;font-style:normal;line-height:1;vertical-align:middle;white-space:nowrap}.skills-hero h1 b{color:var(--spruce)}.skills-proof{display:grid;gap:10px}.skills-proof article{display:grid;grid-template-columns:34px minmax(0,1fr);gap:3px 10px;align-items:start;padding:14px;border-radius:18px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line)}.skills-proof article>b{grid-row:1/3;width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:var(--spruce);color:var(--spruce-ink)}.skills-proof article p,.skills-category-list p{margin:0;color:var(--muted);font-size:14px;line-height:1.4}.skills-category-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.skills-category-list article{min-width:0;padding:15px;border-radius:18px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);display:grid;gap:7px}.skills-category-list small{color:var(--spruce);line-height:1.35}.skills-honesty{border-left:3px solid var(--spruce)}
@media(max-width:520px){.skills-category-list{grid-template-columns:1fr}.skill-count-badge{display:flex;width:max-content;margin:5px 0 0}.skills-proof article{padding:12px}}

.assistant-form-field { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.af-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.af-icon-option { height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2); color: var(--ink); display: grid; place-items: center; padding: 0; }
.af-icon-option svg { width: 22px; height: 22px; }
.af-icon-option.is-selected { border-color: var(--spruce); box-shadow: inset 0 0 0 1.5px var(--spruce); background: var(--card); }
.assistant-starters { display: grid; gap: 8px; padding: 6px 16px 12px; justify-items: start; }
.assistant-starters .fine { padding: 0; margin: 0; }
.assistant-starter { max-width: 100%; text-align: left; padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.3; }
.assistant-starter:active { background: var(--paper-2); }
.mention-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 4px 0; }
.mention-bar[hidden] { display: none; }
.mention-bar .assistant-starter { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; }
.assistant-icon.mini { width: 28px; height: 28px; border-radius: 9px; }

.template-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.template-gallery a{display:block;min-width:0;border-radius:16px;overflow:hidden;box-shadow:inset 0 0 0 1px var(--line)}.template-gallery img{display:block;width:100%;height:auto;aspect-ratio:390/844;object-fit:cover;background:var(--paper-2)}.template-preview-section[hidden]{display:none}
#feature-hint { z-index: 100; }
#features { z-index: 101; }
.assistant-kb { margin-top: 18px; display: grid; gap: 8px; }
.assistant-kb h3 { margin: 0; }
.assistant-kb .fine { padding: 0; margin: 0; }
.assistant-kb-list { display: grid; gap: 6px; }
.assistant-kb-row { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 14px; background: var(--paper-2); }
.assistant-kb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistant-kb-row small { color: var(--muted); flex: 0 0 auto; }
.assistant-kb-del { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--card); color: var(--ink); font-size: 20px; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.assistant-kb .btn { justify-self: start; }

/* Real app logos: shown one to one, with no tile, tint, letter or shine on top of them. */
.template-app-icon.has-brand, .template-detail-icon.has-brand, .project-icon.has-brand {
  padding: 0; border: 0; background: none; box-shadow: 0 5px 14px rgba(0,0,0,.28); text-shadow: none; overflow: hidden; display: block;
}
.template-app-icon.has-brand::after, .template-detail-icon.has-brand::after, .project-icon.has-brand::after { display: none; }
.template-app-icon.has-brand img, .template-detail-icon.has-brand img, .project-icon.has-brand img {
  display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none;
}

/* Быстрые настройки генерации на экране создания */
.quick-media { position: absolute; left: 10px; right: 10px; bottom: calc(100% + 8px); z-index: 29; margin: 0; padding: 10px; border-radius: 18px; background: var(--card); box-shadow: 0 14px 36px rgba(0,0,0,.18), inset 0 0 0 1px var(--line); flex-wrap: wrap; }
.quick-media:not([hidden]) { display: flex; }
.quick-card .media-menu { z-index: 30; }

/* Аудио в текст */
.stt-hero { padding: 36px 0 24px; }
.stt-drop { display: grid; gap: 6px; justify-items: center; padding: 28px 18px; border: 1.5px dashed var(--line); border-radius: 22px; background: var(--card); text-align: center; cursor: pointer; }
.stt-drop strong { overflow-wrap: anywhere; font-size: 17px; }
.stt-drop small { color: var(--muted); }
.stt-run { width: 100%; margin-top: 14px; }
.stt-status { min-height: 22px; margin: 10px 2px; }
.stt-result { width: 100%; box-sizing: border-box; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.45; resize: vertical; }
.stt-copy { width: 100%; margin: 10px 0 14px; }
.voice-sample { display: inline-grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; margin-right: 4px; border-radius: 50%; background: var(--paper-2); color: var(--ink); cursor: pointer; }
.voice-sample svg { width: 16px; height: 16px; }
.media-menu-row .voice-sample { flex: 0 0 34px; }
.stt-tiers { display: grid; gap: 10px; margin-top: 16px; }
.stt-tier { display: grid; gap: 4px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.stt-tier[aria-checked="true"] { border-color: var(--spruce); box-shadow: inset 0 0 0 1px var(--spruce); }
.stt-tier strong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; }
.stt-tier em { padding: 2px 8px; border-radius: 999px; background: var(--paper-2); font-size: 12px; font-style: normal; font-weight: 650; }
.stt-tier small { color: var(--muted); font-size: 14px; }
.stt-tier b { font-size: 16px; font-variant-numeric: tabular-nums; }
.stt-settings { display: grid; gap: 12px; margin-top: 14px; }
.stt-field { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.stt-field select { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; }
.stt-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; }
.stt-check input { width: 22px; height: 22px; }
.stt-estimate { min-height: 20px; margin: 10px 2px 0; }
.stt-history { margin-top: 8px; }
.stt-history h2 { margin: 0 0 10px; font-size: 18px; }
.stt-history-item { display: grid; gap: 4px; width: 100%; margin: 0 0 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.stt-history-item small { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Импорт памяти */
.memory-import-page{width:min(720px,100%);height:100%;margin:auto;display:flex;flex-direction:column}
.mi-body{flex:1;min-width:0;overflow:auto;padding:12px 16px calc(28px + var(--safe-bottom));display:grid;align-content:start;gap:14px}
.mi-section{min-width:0;display:grid;gap:12px}
.mi-section[hidden],.mi-body progress[hidden],.mi-note[hidden]{display:none}
.mi-lead,.mi-note,.mi-how p{margin:0;color:var(--muted);line-height:1.45;overflow-wrap:anywhere}
.mi-section>strong{font-size:18px;overflow-wrap:anywhere}
.mi-drop{display:grid;gap:6px;justify-items:center;padding:28px 18px;border:1.5px dashed var(--line);border-radius:22px;background:var(--card);text-align:center;cursor:pointer}
.mi-drop strong{font-size:17px;overflow-wrap:anywhere}
.mi-drop small{color:var(--muted)}
.mi-how{padding:4px 14px;border-radius:18px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line)}
.mi-how summary{padding:12px 0;font-weight:650;cursor:pointer}
.mi-how h3{margin:14px 0 4px;font-size:15px}
.mi-how .mi-copy-hint{margin-top:14px;font-size:13px}
.mi-how .reminder-example{margin:8px 0 12px}
.mi-link{display:inline;padding:0;background:none;color:var(--spruce);font:inherit;text-decoration:underline;text-underline-offset:2px}
.mi-spinner{width:34px;height:34px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--spruce);animation:mi-spin 0.9s linear infinite}
@keyframes mi-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.mi-spinner{animation:none}}
.mi-body progress{width:100%;accent-color:var(--spruce)}
.mi-actions,.mi-toolbar{display:flex;flex-wrap:wrap;gap:8px}
.mi-actions .btn,.mi-toolbar .btn{flex:1 1 140px;min-width:0;text-align:center}
.mi-list{display:grid;gap:8px}
.mi-row{min-width:0;display:grid;grid-template-columns:24px minmax(0,1fr);gap:10px;align-items:start;padding:12px;border-radius:16px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);cursor:pointer}
.mi-row.is-off{opacity:.6;cursor:default}
.mi-row input{width:22px;height:22px;margin:0;accent-color:var(--spruce)}
.mi-row-copy{min-width:0;display:grid;gap:3px}
.mi-row-text{overflow-wrap:anywhere;line-height:1.35}
.mi-row-copy small{color:var(--muted);font-size:12px}
.mi-empty-cta{margin-top:12px;max-width:100%;white-space:normal}

.connections-page{width:min(720px,100%);height:100%;margin:auto;display:flex;flex-direction:column}
.connection-head{display:flex;gap:12px;align-items:center}.connection-head h3,.connection-head p{margin:0}
.connection-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:var(--spruce-soft);color:var(--spruce);flex:none}.connection-icon svg{width:24px;height:24px}
.connection-list{margin:0;padding-left:18px;color:var(--muted);font-size:14px;display:grid;gap:4px}
.connection-actions{display:flex;flex-wrap:wrap;gap:10px}.connection-actions .btn{flex:1 1 220px;min-width:0}
.connection-note{margin:0;font-size:14px;color:var(--muted)}
.mail-receipt{display:block;width:100%;margin-top:10px;padding:10px 12px;border:0;border-radius:14px;background:var(--spruce-soft);color:var(--spruce);font:inherit;font-weight:700;text-align:left;text-decoration:none;cursor:pointer;box-sizing:border-box}
.mail-receipt small{display:block;margin-top:3px;font-weight:500;color:var(--muted)}
.mail-receipt.is-connect{display:flex;flex-direction:column;gap:8px;align-items:stretch}

/* Сайты и приложения */
.build-hero { padding: 36px 0 22px; }
.build-form { display: grid; gap: 12px; }
.build-form textarea { width: 100%; box-sizing: border-box; min-height: 120px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.45; resize: vertical; }
.build-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.build-chips button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; }
.build-note { margin: 0 2px; }
.build-status { min-height: 22px; margin: 0 2px; }
.build-showcase { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 12px; overflow-x: auto; padding: 4px 0 14px; scroll-snap-type: x proximity; }
.build-template { display: grid; gap: 6px; justify-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; scroll-snap-align: start; }
.build-template strong { font-size: 15px; overflow-wrap: anywhere; }
.build-template small { color: var(--muted); font-size: 13px; }

/* Инструменты */
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 18px; }
.tool-card { display: grid; gap: 8px; justify-items: start; align-content: start; min-height: 148px; padding: 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tool-card[hidden] { display: none; }
.tool-card-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--paper-2); }
.tool-card-icon svg { width: 24px; height: 24px; }
.tool-card strong { font-size: 17px; }
.tool-card small { color: var(--muted); font-size: 14px; line-height: 1.35; }

/* Озвучка */
.speech-hero { padding: 30px 0 18px; }
.speech-hero h1 { font-size: clamp(28px, 7vw, 40px); }
.speech-form { display: grid; gap: 12px; }
.speech-form textarea { width: 100%; box-sizing: border-box; min-height: 110px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.45; resize: vertical; }
.speech-models { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; padding-bottom: 2px; }
.speech-models button { flex: 0 1 auto; min-width: 0; max-width: 100%; min-height: 44px; padding: 10px 16px; white-space: normal; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; }
.speech-models button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.speech-voices { display: grid; gap: 8px; }
.speech-voice { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); font-size: 16px; cursor: pointer; }
.speech-voice span:first-child { flex: 1 1 auto; }
.speech-voice[aria-checked="true"] { border-color: var(--spruce); box-shadow: inset 0 0 0 1px var(--spruce); }
.speech-voice[aria-checked="true"] .media-radio { border: 6px solid var(--ink); }

/* Fixed account facts are information, not disabled controls. */
.general-facts { margin: 0; min-width: 0; }
.general-facts > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.general-facts > div:last-child { border-bottom: 0; }
.general-facts dt { color: var(--muted); }
.general-facts dd { min-width: 0; margin: 0; text-align: right; overflow-wrap: anywhere; }
