/* ===== Tokens ===== */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eff1f5;
  --border: #e1e5ea;
  --text: #0f172a;
  --muted: #667085;
  --accent: #3556d8;
  --accent-hover: #2a45b5;
  --on-accent: #ffffff;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --on-danger: #ffffff;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --warn: #b54708;
  --warn-bg: #fffaeb;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 10px 30px rgba(16, 24, 40, .07);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1015;
  --surface: #151920;
  --surface-2: #1d222b;
  --border: #2a303b;
  --text: #e7e9ee;
  --muted: #9aa3b2;
  --accent: #6f8cff;
  --accent-hover: #8ba2ff;
  --on-accent: #0a0f1f;
  --danger: #ff8a80;
  --danger-bg: #2a1716;
  --on-danger: #1a0a09;
  --ok: #4ade80;
  --ok-bg: #11251a;
  --warn: #fdb022;
  --warn-bg: #2a2110;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== Shared components ===== */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; letter-spacing: -.01em; color: var(--text); }
.brand-mark { width: 28px; height: 28px; color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 550; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 9px; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.segmented button { border: 0; background: transparent; color: var(--muted); padding: 5px 12px; border-radius: 7px; font-size: 13px; font-weight: 550; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.segmented.full { display: flex; }
.segmented.full button { flex: 1; }

.mobile-only { display: none; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  font-size: 14px; max-width: min(92vw, 460px); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 100; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Auth ===== */
.auth { min-height: 100dvh; display: flex; flex-direction: column; }
.auth-top { display: flex; align-items: center; justify-content: space-between; padding: 20px clamp(20px, 5vw, 56px); }
.auth-main {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 420px);
  gap: clamp(32px, 7vw, 96px); align-items: center; justify-content: center;
  padding: 16px clamp(20px, 5vw, 56px) 56px; max-width: 1180px; width: 100%; margin: 0 auto;
}
.auth-pitch h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; letter-spacing: -.025em; font-weight: 700; max-width: 16ch; }
.auth-pitch .lead { margin-top: 18px; color: var(--muted); font-size: 17px; max-width: 52ch; }
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 20px; max-width: 52ch; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 650; border: 1px solid var(--border); background: var(--surface); color: var(--accent); }
.steps strong { display: block; font-weight: 600; }
.steps p { color: var(--muted); font-size: 14px; }

.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 10px; margin-bottom: 24px; }
.tabs button { border: 0; background: transparent; color: var(--muted); padding: 8px; border-radius: 7px; font-weight: 600; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.auth-card h2 { font-size: 22px; letter-spacing: -.015em; }
.auth-card .muted { margin: 6px 0 22px; }
.google-host { display: flex; justify-content: center; min-height: 44px; }
.google-btn { width: 100%; height: 44px; background: var(--surface); }
.note { margin-top: 14px; font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.legal { margin-top: 20px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ===== App shell ===== */
.app { --files-w: 0px; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--files-w); height: 100dvh; }
body.files-open .app { --files-w: clamp(340px, 38vw, 560px); }
.sidebar { display: flex; flex-direction: column; gap: 14px; padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--border); min-height: 0; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 4px; }
.sidebar-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 0; }
.history { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; min-height: 0; margin: 0 -4px; padding: 0 4px; }
.history-empty { color: var(--muted); font-size: 14px; padding: 8px; }
.history-item { position: relative; display: flex; align-items: center; border-radius: 9px; }
.history-item:hover, .history-item.active { background: var(--surface-2); }
.history-link { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border: 0; background: transparent; text-align: left; border-radius: 9px; }
.history-title { width: 100%; font-size: 14px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-date { font-size: 12px; color: var(--muted); }
.history-item.active .history-title { color: var(--accent); }

.scrim { display: none; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px clamp(14px, 3vw, 28px); background: var(--bg); border-bottom: 1px solid var(--border); min-height: 64px; }
.topbar-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.credits { display: inline-flex; align-items: stretch; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.credits-info { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px 0 12px; color: var(--muted); font-size: 14px; }
.credits-info strong { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.topup { display: inline-flex; align-items: center; gap: 5px; border: 0; border-left: 1px solid var(--border); background: var(--accent); color: var(--on-accent); padding: 7px 14px 7px 12px; font-size: 13.5px; font-weight: 600; }
.topup:hover { background: var(--accent-hover); }

.account { position: relative; }
.avatar-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 650; padding: 0; overflow: hidden; display: grid; place-items: center; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 50; }
.menu-user { padding: 10px 10px 12px; border-bottom: 1px solid var(--border); }
.menu-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-email { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-section { padding: 10px; border-bottom: 1px solid var(--border); }
.menu-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.menu-item { width: 100%; text-align: left; border: 0; background: transparent; padding: 10px; border-radius: 8px; margin-top: 4px; }
.menu-item:hover { background: var(--surface-2); }

/* ===== Messages ===== */
.messages { flex: 1; overflow-y: auto; min-height: 0; scroll-behavior: smooth; }
.messages-inner { max-width: var(--content-w); margin: 0 auto; padding: 28px clamp(14px, 3vw, 28px) 12px; display: flex; flex-direction: column; gap: 24px; }
.empty { max-width: var(--content-w); margin: 0 auto; padding: clamp(40px, 12vh, 120px) clamp(14px, 3vw, 28px) 20px; text-align: center; }
.empty h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -.02em; }
.empty p { color: var(--muted); margin-top: 8px; }
.suggestions { margin-top: 28px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); text-align: left; }
.suggestion { padding: 14px 16px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; font-size: 14px; color: var(--text); text-align: left; transition: border-color .15s, background .15s; }
.suggestion:hover { border-color: var(--accent); background: var(--surface-2); }
.suggestion span { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 3px; font-weight: 550; }

.msg { display: flex; gap: 12px; }
.msg.user { justify-content: flex-end; }
.msg-avatar { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.msg-body { min-width: 0; display: flex; flex-direction: column; gap: 10px; max-width: 100%; }
.msg.user .msg-body { align-items: flex-end; max-width: 85%; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user .msg-text { background: var(--surface-2); border: 1px solid var(--border); padding: 10px 14px; border-radius: 14px 14px 4px 14px; }
.msg.assistant .msg-text { padding-top: 4px; }
.msg.error .msg-text { color: var(--danger); background: var(--danger-bg); padding: 10px 14px; border-radius: 12px; }

.attachments { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.attach { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; padding: 6px 10px 6px 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.attach-thumb { flex: none; width: 32px; height: 32px; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-meta { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.attach-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.attach-size { color: var(--muted); font-size: 12px; }

.video-card { width: min(100%, var(--video-w)); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.video-card video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-placeholder { aspect-ratio: 16 / 9; display: grid; place-items: center; background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 12px, var(--surface) 12px, var(--surface) 24px); color: var(--muted); }
.video-placeholder div { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 20px; text-align: center; font-size: 13.5px; }
.video-placeholder .play { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--accent); }
.video-caption { padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

.typing { display: inline-flex; gap: 5px; padding: 12px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .5; animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ===== Composer ===== */
.composer { padding: 8px clamp(14px, 3vw, 28px) 18px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.composer-inner { max-width: var(--content-w); margin: 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; padding: 5px 6px 5px 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.chip .chip-x { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 6px; }
.chip .chip-x:hover { background: var(--surface-2); color: var(--text); }
.composer-box { display: flex; align-items: flex-end; gap: 6px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); transition: border-color .15s; }
.composer-box:focus-within, .composer.dragging .composer-box { border-color: var(--accent); }
.composer textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; line-height: 1.5; padding: 7px 4px; max-height: 200px; }
.composer textarea::placeholder { color: var(--muted); }
.send { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); transition: background .15s, opacity .15s; }
.send:hover:not(:disabled) { background: var(--accent-hover); }
.send:disabled { opacity: .35; cursor: not-allowed; }
.hint { margin-top: 8px; text-align: center; font-size: 12.5px; color: var(--muted); }

/* ===== Responsive ===== */
@media (max-width: 1099px) {
  .auth-main { grid-template-columns: 1fr; justify-content: stretch; }
  .auth-pitch h1 { max-width: none; }
  .auth-card { max-width: 480px; width: 100%; margin: 0 auto; }
}
@media (max-width: 900px) {
  .steps { display: none; }
}
@media (max-width: 820px) {
  .mobile-only { display: inline-grid; }
  .app, body.files-open .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw, 320px); z-index: 60; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow); }
  body.sidebar-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.sidebar-open .scrim { opacity: 1; pointer-events: auto; }
  .credits-label { display: none; }
  .msg.user .msg-body { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ===== Test account ===== */
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ===== Model and effort picker ===== */
.topbar-title { flex: 0 1 auto; }
.badge { flex: none; font-size: 12px; font-weight: 550; padding: 3px 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; white-space: nowrap; }
.composer-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 8px; flex-wrap: wrap; }
.composer-tools .hint { margin: 0; flex: 1; min-width: 200px; text-align: right; }
.picker { position: relative; }
.picker-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; font-size: 13.5px; font-weight: 550; }
.picker-btn:hover, .picker-btn[aria-expanded="true"] { background: var(--surface-2); }
.picker-btn .sep, .picker-btn .effort { color: var(--muted); font-weight: 500; }
.picker-btn svg { color: var(--muted); transition: transform .15s; }
.picker-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.dropup { position: absolute; left: 0; bottom: calc(100% + 8px); width: min(380px, calc(100vw - 28px)); max-height: min(72vh, 580px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; z-index: 40; }
.dropup-section { padding: 6px 2px; }
.dropup-section + .dropup-section { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; }
.dropup-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 10px 6px; }
.dropup-note { font-size: 12.5px; color: var(--muted); padding: 6px 10px 2px; }
.opt { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 0; background: transparent; border-radius: 10px; text-align: left; }
.opt:hover:not(:disabled) { background: var(--surface-2); }
.opt[aria-checked="true"] { background: var(--surface-2); }
.opt[aria-checked="true"] .opt-name { color: var(--accent); }
.opt:disabled { opacity: .5; cursor: not-allowed; }
.opt-text { display: flex; flex-direction: column; min-width: 0; }
.opt-name { font-size: 14px; font-weight: 600; }
.opt-desc { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.opt-check { flex: none; width: 18px; height: 18px; color: var(--accent); display: grid; place-items: center; }
.msg-meta { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) {
  .badge { display: none; }
  .composer-tools .hint { text-align: left; }
}

/* ===== Large screens, tablets, and touch ===== */
:root { --content-w: 780px; --sidebar-w: 280px; --video-w: 560px; }

/* Tablet landscape and small laptops */
@media (min-width: 821px) and (max-width: 1099px) {
  :root { --sidebar-w: 250px; --content-w: 720px; }
}
/* Tablet portrait: the drawer is used, so there is room for the credits label */
@media (min-width: 641px) and (max-width: 820px) {
  .credits-label { display: inline; }
  :root { --content-w: 720px; }
}

/* Desktop and larger */
@media (min-width: 1280px) {
  :root { --sidebar-w: 300px; --content-w: 860px; --video-w: 680px; }
  .messages-inner { padding-top: 36px; gap: 28px; }
}
@media (min-width: 1600px) {
  :root { --sidebar-w: 320px; --content-w: 960px; --video-w: 800px; }
  body { font-size: 16px; }
  .auth-main { max-width: 1360px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 460px); }
  .auth-pitch h1 { font-size: 56px; }
  .auth-pitch .lead { font-size: 18px; }
  .auth-card { padding: 34px; }
}
@media (min-width: 2200px) {
  :root { --sidebar-w: 340px; --content-w: 1080px; --video-w: 920px; }
  body { font-size: 17px; }
  .auth-main { max-width: 1560px; }
}

/* Desktop sidebar collapse (the drawer is used below 821px) */
@media (min-width: 821px) {
  .app { transition: grid-template-columns .22s ease; }
  body.sidebar-collapsed .app { grid-template-columns: 0 minmax(0, 1fr) var(--files-w); }
  body.sidebar-collapsed .sidebar { visibility: hidden; overflow: hidden; padding-left: 0; padding-right: 0; border-right-width: 0; }
}

/* Touch devices: no hover, larger targets */
@media (pointer: coarse) {
  .icon-btn { width: 44px; height: 44px; }
  .avatar-btn { width: 40px; height: 40px; }
  .picker-btn { height: 40px; }
  .history-link { padding: 11px 10px; }
  .segmented button { padding: 8px 14px; }
  .send { width: 40px; height: 40px; }
  .topup { padding-top: 10px; padding-bottom: 10px; }
  .opt { padding: 12px 10px; }
  .chip .chip-x { width: 30px; height: 30px; }
}

/* Notches and home indicators */
.app { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.auth { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.composer { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.sidebar { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }

/* Short landscape screens */
@media (max-height: 520px) {
  .topbar { min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
  .empty { padding-top: 20px; }
  .composer-tools .hint { display: none; }
  .composer { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}

/* ===== Thinking toggle ===== */
.opt.switch-row[aria-checked="true"] { background: transparent; }
.opt.switch-row[aria-checked="true"] .opt-name { color: var(--text); }
.opt.switch-row:hover { background: var(--surface-2); }
.switch { flex: none; position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--border); transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
[aria-checked="true"] > .switch { background: var(--accent); }
[aria-checked="true"] > .switch::after { transform: translateX(16px); background: var(--on-accent); }

/* Keep short labels on one line */
.topup, .credits-info, .picker-btn, .picker-btn span { white-space: nowrap; }

/* ===== Login page showcase video ===== */
.showcase { margin: 28px 0 0; max-width: min(100%, var(--video-w)); }
.showcase-media { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.showcase-media video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.showcase-caption { margin-top: 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 1099px) {
  /* Narrow windows, tablets, phones: headline, then the login card, then the showcase video */
  .auth-main { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .auth-pitch { display: contents; }
  .auth-card { order: 1; margin: 28px auto 0; }
  .showcase { order: 2; width: 100%; margin: 28px auto 0; }
}


/* ===== Side menu links (login page rail and chat sidebar) ===== */
.info-links { display: flex; flex-direction: column; gap: 2px; }
.info-links a { padding: 9px 10px; border-radius: 9px; font-size: 14px; font-weight: 550; color: var(--muted); }
.info-links a:hover { background: var(--surface-2); color: var(--text); }
.sidebar-links { border-top: 1px solid var(--border); padding-top: 10px; margin-top: -4px; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--text); }

/* ===== Login page layout with side menu ===== */
.auth { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.auth-side { position: sticky; top: 0; align-self: start; height: auto; display: flex; flex-direction: column; gap: 22px; padding: 20px 12px 14px; background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0 0 16px 0; }
.auth-side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.auth-col { display: flex; flex-direction: column; min-width: 0; min-height: 100dvh; }
.auth-top .segmented { margin-left: auto; }
.auth-narrow { display: none; }
.auth-scrim { display: none; }
@media (min-width: 1600px) { .auth { grid-template-columns: 280px minmax(0, 1fr); } }
@media (max-width: 1099px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { position: fixed; inset: 0 auto auto 0; width: min(86vw, 320px); height: auto; z-index: 60; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow); }
  body.auth-menu-open .auth-side { transform: none; }
  .auth-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.auth-menu-open .auth-scrim { opacity: 1; pointer-events: auto; }
  button.auth-narrow { display: inline-grid; }
  a.brand.auth-narrow { display: inline-flex; }
  .auth-top { gap: 10px; }
  .auth-col { min-height: 100dvh; }
}

/* ===== Message actions ===== */
.msg-actions { display: flex; gap: 2px; margin-top: -2px; }
.msg.user .msg-actions { justify-content: flex-end; }
.msg.assistant .msg-actions { margin-left: -6px; }
.act { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 0; }
.act:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.act:disabled { opacity: .4; cursor: not-allowed; }
.act[aria-pressed="true"] { color: var(--accent); }
.act[aria-pressed="true"] svg { fill: currentColor; fill-opacity: .22; }
@media (pointer: coarse) { .act { width: 40px; height: 40px; } }

/* ===== Editing a message ===== */
.msg.user.editing .msg-body { width: 100%; max-width: 100%; align-items: stretch; }
.msg.user.editing .attachments { justify-content: flex-end; }
.editor { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--accent); border-radius: 14px; }
.editor-input { display: block; width: 100%; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; line-height: 1.5; padding: 2px; max-height: 320px; }
.editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
.editor-note { font-size: 12.5px; color: var(--muted); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.btn.danger:hover { background: var(--danger); filter: brightness(.92); }

/* ===== Settings menu help text ===== */
.menu-help { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

/* ===== Confirm dialog ===== */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; }
.modal-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.modal-card { position: relative; width: min(100%, 400px); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.modal-card h3 { font-size: 18px; letter-spacing: -.01em; }
.modal-card p { margin-top: 8px; color: var(--muted); overflow-wrap: anywhere; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ===== Info pages (About, Terms, Privacy, Contact) ===== */
.info-top { display: flex; align-items: center; gap: 16px; padding: 18px clamp(16px, 5vw, 48px); border-bottom: 1px solid var(--border); background: var(--surface); }
.info-top .btn { margin-left: auto; height: 36px; }
.info-main { max-width: 760px; margin: 0 auto; padding: clamp(28px, 6vw, 64px) clamp(16px, 5vw, 32px) 64px; }
.prose h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; letter-spacing: -.02em; }
.prose .updated { margin-top: 8px; color: var(--muted); font-size: 14px; }
.prose h2 { margin-top: 32px; font-size: 19px; letter-spacing: -.01em; }
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 22px; }
.prose li { margin-top: 6px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.info-foot { max-width: 760px; margin: 0 auto; padding: 24px clamp(16px, 5vw, 32px) 40px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.info-foot a:hover { color: var(--text); }

/* ===== Top up page ===== */
.tp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px clamp(16px, 5vw, 48px); background: var(--surface); border-bottom: 1px solid var(--border); }
.tp-top-right { display: flex; align-items: center; gap: 12px; }
.tp-balance { font-size: 14px; color: var(--muted); padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); white-space: nowrap; }
.tp-balance strong { color: var(--text); font-variant-numeric: tabular-nums; }
.tp-top .btn.sm { gap: 6px; }
.tp-main { max-width: 1040px; margin: 0 auto; padding: clamp(28px, 6vw, 64px) clamp(16px, 5vw, 32px) 72px; }
.tp-heading h1, .tp-gate h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; letter-spacing: -.02em; }
.tp-heading p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.tp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; margin-top: 32px; align-items: start; }
.tp-panel, .tp-order { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.tp-panel { padding: clamp(18px, 3vw, 30px); }
.tp-order { padding: 24px; position: sticky; top: 20px; }
.tp-panel h2, .tp-order h2 { font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.tp-order h2 { margin-bottom: 14px; }
.tp-panel .tp-sub { margin-top: 30px; }
.tp-n { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); color: var(--accent); }

.tp-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin-top: 14px; }
.tp-preset { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 16px 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; transition: border-color .15s, background .15s, transform .1s; }
.tp-preset strong { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tp-preset span { font-size: 13px; color: var(--muted); }
.tp-preset:hover { border-color: var(--accent); }
.tp-preset:active { transform: scale(.98); }
.tp-preset[aria-pressed="true"] { border-color: var(--accent); background: var(--surface-2); box-shadow: 0 0 0 1px var(--accent); }
.tp-preset[aria-pressed="true"] strong { color: var(--accent); }

.tp-stepper { display: flex; align-items: stretch; gap: 10px; margin-top: 14px; }
.tp-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 18px; height: 60px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.tp-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.tp-field input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 26px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-align: center; padding: 0; }
.tp-field input::placeholder { color: var(--muted); opacity: .5; }
.tp-unit { color: var(--muted); font-size: 14px; font-weight: 550; }
.tp-step { flex: none; width: 60px; height: 60px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; color: var(--text); transition: border-color .15s, background .15s; }
.tp-step:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.tp-step:disabled { opacity: .4; cursor: not-allowed; }
.tp-help { margin-top: 10px; font-size: 13px; color: var(--muted); }
.tp-help.bad { color: var(--danger); }

.tp-rows { margin: 0; display: grid; gap: 10px; }
.tp-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.tp-rows dt { color: var(--muted); }
.tp-rows dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.tp-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 16px 0 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.tp-total span { font-weight: 600; }
.tp-amt { display: flex; flex-direction: column; align-items: flex-end; }
.tp-amt small { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.tp-total strong { font-size: 30px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tp-pay { height: 48px; font-size: 16px; }
.tp-status { margin-top: 12px; font-size: 13.5px; color: var(--danger); background: var(--danger-bg); padding: 10px 12px; border-radius: 10px; }
.tp-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }

.tp-gate { max-width: 460px; margin: 6vh auto 0; text-align: center; padding: 32px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.tp-gate p { margin: 10px 0 22px; color: var(--muted); }
.tp-gate h1 { font-size: 26px; }
.tp-tick { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.tp-done-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tp-ref { margin: 20px 0 0 !important; font-size: 12.5px; word-break: break-all; }

@media (max-width: 860px) {
  .tp-grid { grid-template-columns: 1fr; }
  .tp-order { position: static; }
}
@media (max-width: 420px) {
  .tp-step { width: 52px; height: 52px; }
  .tp-field { height: 52px; padding: 0 12px; }
  .tp-field input { font-size: 22px; }
  .tp-balance { display: none; }
}

.tp-email { margin-bottom: 14px; }
.tp-email label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tp-email input { width: 100%; height: 44px; padding: 0 14px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 12px; }
.tp-email input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

/* ===== Payment history ===== */
.tp-link { font-size: 14px; font-weight: 550; color: var(--muted); }
.tp-link:hover { color: var(--text); }
@media (max-width: 560px) { .tp-link { display: none; } }
.pm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pm-head .tp-heading { flex: 1; min-width: 260px; max-width: 640px; }
.pm-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.pm-item { display: grid; grid-template-columns: minmax(0, 1.6fr) auto auto auto; align-items: center; gap: 12px 24px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.pm-main { display: flex; flex-direction: column; min-width: 0; }
.pm-credits { font-size: 17px; letter-spacing: -.01em; }
.pm-date { font-size: 13.5px; color: var(--muted); }
.pm-ref { font-size: 12px; color: var(--muted); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-amt { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.pm-amt small { font-size: 12.5px; color: var(--muted); }
.pm-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.pm-badge.ok { color: var(--ok); background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.pm-badge.warn { color: var(--warn); background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.pm-badge.bad { color: var(--danger); background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.pm-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.pm-empty { margin-top: 28px; }
@media (max-width: 860px) {
  .pm-item { grid-template-columns: 1fr auto; }
  .pm-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .pm-status { justify-self: end; }
}

/* ===== Receipt ===== */
.receipt-card { width: min(100%, 460px); max-height: 92dvh; overflow-y: auto; }
.rc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.rc-brand { font-size: 13px; font-weight: 650; color: var(--accent); }
.rc-head h2 { font-size: 22px; letter-spacing: -.015em; }
.rc-rows { margin: 14px 0 0; display: grid; gap: 9px; }
.rc-rows div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.rc-rows dt { color: var(--muted); flex: none; }
.rc-rows dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-weight: 550; }
.rc-rows .strong { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 16px; }
.rc-rows .strong dt { color: var(--text); font-weight: 650; }
.rc-note { margin-top: 14px; font-size: 13px; color: var(--muted); background: var(--surface-2); padding: 10px 12px; border-radius: 10px; }
@media print {
  body.printing-receipt > *:not(#receipt) { display: none !important; }
  body.printing-receipt #receipt { position: static; display: block; padding: 0; }
  body.printing-receipt .modal-scrim, body.printing-receipt .rc-actions { display: none; }
  body.printing-receipt .receipt-card { box-shadow: none; border: 0; width: 100%; max-height: none; }
}

/* ===== Background doodles =====
   Two tiled stroke-only SVG layers, used as a mask so the colour follows the theme.
   Painted behind everything (z-index: -1), so they only show where the page is empty. */
:root { --doodle: rgba(53, 86, 216, .13); }
:root[data-theme="dark"] { --doodle: rgba(111, 140, 255, .14); }
@supports (color: color-mix(in srgb, red 10%, transparent)) {
  :root { --doodle: color-mix(in srgb, var(--accent) 14%, transparent); }
  :root[data-theme="dark"] { --doodle: color-mix(in srgb, var(--accent) 15%, transparent); }
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-color: var(--doodle);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='720' viewBox='0 0 720 720'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath transform='translate(245 132) rotate(-26) scale(0.95)' d='M-4,-7 L8,0 L-4,7 Z M14,0 A14,14 0 1 1 13.9,-1.5'/%3E%3Cpath transform='translate(458 81) rotate(30) scale(0.89)' d='M0,-10 L10,8 L-10,8 Z'/%3E%3Cpath transform='translate(383 272) rotate(24) scale(1.07)' d='M-14,10 L0,-14 L14,10 Z M-14,10 L0,2 L14,10 M0,-14 L0,2'/%3E%3Cpath transform='translate(72 365) rotate(-26) scale(1.20)' d='M-9,-9 H9 V9 H-9 Z'/%3E%3Cpath transform='translate(80 93) rotate(18) scale(1.19)' d='M-12,-4 H12 V10 H-12 Z M-9,-4 V-7 H-3 V-4 M3,-4 V-7 H9 V-4'/%3E%3Cpath transform='translate(311 573) rotate(-32) scale(1.17)' d='M-16,4 L-8,-4 L0,4 L8,-4 L16,4'/%3E%3Cpath transform='translate(115 180) rotate(-30) scale(0.84)' d='M5,-12 A5,5 0 1 1 4.9,-12.6 M0,-7 V6 M-9,-2 L0,-4 L9,-2 M0,6 L-7,16 M0,6 L7,16'/%3E%3Cpath transform='translate(443 652) rotate(6) scale(1.13)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3Cpath transform='translate(671 64) rotate(2) scale(1.17)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(594 223) rotate(7) scale(0.95)' d='M-16,0 q4,-8 8,0 q4,8 8,0 q4,-8 8,0'/%3E%3Cpath transform='translate(152 413) rotate(32) scale(1.11)' d='M0,0 C0,-3 4,-3 4,0 C4,6 -6,6 -6,-1 C-6,-10 8,-10 8,0'/%3E%3Cpath transform='translate(478 313) rotate(-29) scale(1.17)' d='M-14,-2 H14 V14 H-14 Z M-14,-2 L-12,-11 L14,-7 L14,-2 M-5,-9.6 L-8,-2 M3,-8.6 L0,-2 M11,-7.6 L8,-2'/%3E%3Cpath transform='translate(239 416) rotate(-28) scale(1.06)' d='M-16,-9 H16 V9 H-16 Z M-8,-9 V9 M8,-9 V9 M-12,-5 h0 M-12,5 h0 M12,-5 h0 M12,5 h0'/%3E%3Cpath transform='translate(552 490) rotate(21) scale(0.72)' d='M0,-16 L14,-8 L14,8 L0,16 L-14,8 L-14,-8 Z M0,0 L0,16 M0,0 L14,-8 M0,0 L-14,-8'/%3E%3Cpath transform='translate(510 222) rotate(-20) scale(1.13)' d='M-12,8 A6,6 0 0 1 -10,-3.5 A8,8 0 0 1 5,-4.5 A6.5,6.5 0 0 1 12,8 Z'/%3E%3Cpath transform='translate(60 470) rotate(23) scale(1.01)' d='M-14,6 Q0,-14 14,0 M8,-6 L14,0 L6,3'/%3E%3Cpath transform='translate(533 408) rotate(18) scale(0.75)' d='M3,-14 L-7,2 H0 L-3,14 L8,-3 H1 Z'/%3E%3Cpath transform='translate(582 650) rotate(7) scale(0.80)' d='M-18,0 q4.5,-9 9,0 t9,0 t9,0 t9,0'/%3E%3Cpath transform='translate(343 467) rotate(27) scale(0.88)' d='M-14,-8 H6 V8 H-14 Z M6,-2 L14,-7 V7 L6,2'/%3E%3Cpath transform='translate(216 305) rotate(-31) scale(0.94)' d='M5,-12 A5,5 0 1 1 4.9,-12.6 M0,-7 V6 M-9,-2 L0,-4 L9,-2 M0,6 L-7,16 M0,6 L7,16'/%3E%3Cpath transform='translate(655 484) rotate(-22) scale(1.04)' d='M-12,-4 H12 V10 H-12 Z M-9,-4 V-7 H-3 V-4 M3,-4 V-7 H9 V-4'/%3E%3Cpath transform='translate(604 554) rotate(9) scale(0.95)' d='M-14,6 Q0,-14 14,0 M8,-6 L14,0 L6,3'/%3E%3Cpath transform='translate(100 271) rotate(-7) scale(0.73)' d='M-14,-2 H14 V14 H-14 Z M-14,-2 L-12,-11 L14,-7 L14,-2 M-5,-9.6 L-8,-2 M3,-8.6 L0,-2 M11,-7.6 L8,-2'/%3E%3Cpath transform='translate(51 604) rotate(23) scale(1.18)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3Cpath transform='translate(338 349) rotate(-31) scale(1.12)' d='M-16,0 q4,-8 8,0 q4,8 8,0 q4,-8 8,0'/%3E%3Cpath transform='translate(574 139) rotate(-19) scale(0.77)' d='M3,-14 L-7,2 H0 L-3,14 L8,-3 H1 Z'/%3E%3Cpath transform='translate(378 130) rotate(-20) scale(1.17)' d='M-14,10 L0,-14 L14,10 Z M-14,10 L0,2 L14,10 M0,-14 L0,2'/%3E%3Cpath transform='translate(143 537) rotate(1) scale(0.85)' d='M-18,0 q4.5,-9 9,0 t9,0 t9,0 t9,0'/%3E%3Cpath transform='translate(266 53) rotate(-20) scale(0.94)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(658 326) rotate(21) scale(0.94)' d='M0,-10 L10,8 L-10,8 Z'/%3E%3Cpath transform='translate(460 555) rotate(-2) scale(0.88)' d='M0,0 C0,-3 4,-3 4,0 C4,6 -6,6 -6,-1 C-6,-10 8,-10 8,0'/%3E%3Cpath transform='translate(375 46) rotate(7) scale(1.17)' d='M-14,-8 H6 V8 H-14 Z M6,-2 L14,-7 V7 L6,2'/%3E%3Cpath transform='translate(196 215) rotate(4) scale(0.85)' d='M-16,4 L-8,-4 L0,4 L8,-4 L16,4'/%3E%3Cpath transform='translate(346 648) rotate(20) scale(1.16)' d='M-16,-9 H16 V9 H-16 Z M-8,-9 V9 M8,-9 V9 M-12,-5 h0 M-12,5 h0 M12,-5 h0 M12,5 h0'/%3E%3Cpath transform='translate(177 655) rotate(-18) scale(0.80)' d='M-4,-7 L8,0 L-4,7 Z M14,0 A14,14 0 1 1 13.9,-1.5'/%3E%3Cpath transform='translate(568 316) rotate(-3) scale(0.81)' d='M-9,-9 H9 V9 H-9 Z'/%3E%3Cpath transform='translate(298 261) rotate(-6) scale(1.10)' d='M0,-16 L14,-8 L14,8 L0,16 L-14,8 L-14,-8 Z M0,0 L0,16 M0,0 L14,-8 M0,0 L-14,-8'/%3E%3Cpath transform='translate(416 379) rotate(14) scale(1.08)' d='M-12,8 A6,6 0 0 1 -10,-3.5 A8,8 0 0 1 5,-4.5 A6.5,6.5 0 0 1 12,8 Z'/%3E%3Cpath transform='translate(672 644) rotate(5) scale(1.02)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(228 516) rotate(22) scale(0.80)' d='M-12,8 A6,6 0 0 1 -10,-3.5 A8,8 0 0 1 5,-4.5 A6.5,6.5 0 0 1 12,8 Z'/%3E%3Cpath transform='translate(182 56) rotate(32) scale(1.03)' d='M-16,0 q4,-8 8,0 q4,8 8,0 q4,-8 8,0'/%3E%3Cpath transform='translate(663 169) rotate(1) scale(0.92)' d='M3,-14 L-7,2 H0 L-3,14 L8,-3 H1 Z'/%3E%3Cpath transform='translate(438 474) rotate(28) scale(1.11)' d='M-14,6 Q0,-14 14,0 M8,-6 L14,0 L6,3'/%3E%3Cpath transform='translate(35 206) rotate(28) scale(1.19)' d='M-9,-9 H9 V9 H-9 Z'/%3E%3Cpath transform='translate(263 652) rotate(14) scale(0.95)' d='M-16,-9 H16 V9 H-16 Z M-8,-9 V9 M8,-9 V9 M-12,-5 h0 M-12,5 h0 M12,-5 h0 M12,5 h0'/%3E%3Cpath transform='translate(556 57) rotate(2) scale(1.20)' d='M-12,-4 H12 V10 H-12 Z M-9,-4 V-7 H-3 V-4 M3,-4 V-7 H9 V-4'/%3E%3Cpath transform='translate(630 403) rotate(-11) scale(1.19)' d='M-14,10 L0,-14 L14,10 Z M-14,10 L0,2 L14,10 M0,-14 L0,2'/%3E%3Cpath transform='translate(71 685) rotate(-19) scale(0.73)' d='M-14,-2 H14 V14 H-14 Z M-14,-2 L-12,-11 L14,-7 L14,-2 M-5,-9.6 L-8,-2 M3,-8.6 L0,-2 M11,-7.6 L8,-2'/%3E%3Cpath transform='translate(428 201) rotate(26) scale(0.78)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3Cpath transform='translate(313 180) rotate(11) scale(0.81)' d='M0,-16 L14,-8 L14,8 L0,16 L-14,8 L-14,-8 Z M0,0 L0,16 M0,0 L14,-8 M0,0 L-14,-8'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1130' height='1130' viewBox='0 0 1130 1130'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath transform='translate(200 772) rotate(-31) scale(0.82)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(712 542) rotate(-22) scale(0.73)' d='M0,-9 V9 M-9,0 H9'/%3E%3Cpath transform='translate(901 579) rotate(-21) scale(0.63)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(571 277) rotate(-31) scale(0.89)' d='M0,-10 L10,8 L-10,8 Z'/%3E%3Cpath transform='translate(23 424) rotate(22) scale(0.82)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3Cpath transform='translate(658 95) rotate(-16) scale(0.89)' d='M-7,-7 L7,7 M7,-7 L-7,7'/%3E%3Cpath transform='translate(885 273) rotate(22) scale(0.67)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(274 66) rotate(13) scale(0.62)' d='M0,-9 V9 M-9,0 H9'/%3E%3Cpath transform='translate(1107 825) rotate(-20) scale(0.86)' d='M-9,-9 H9 V9 H-9 Z'/%3E%3Cpath transform='translate(156 1031) rotate(-16) scale(0.86)' d='M0,-10 L10,8 L-10,8 Z'/%3E%3Cpath transform='translate(514 622) rotate(-11) scale(0.90)' d='M0,-9 V9 M-9,0 H9'/%3E%3Cpath transform='translate(1076 994) rotate(30) scale(0.68)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(843 851) rotate(-7) scale(0.61)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3Cpath transform='translate(653 815) rotate(-15) scale(0.77)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(154 539) rotate(19) scale(0.64)' d='M-9,-9 H9 V9 H-9 Z'/%3E%3Cpath transform='translate(466 418) rotate(16) scale(0.76)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(49 122) rotate(24) scale(0.83)' d='M0,-9 V9 M-9,0 H9'/%3E%3Cpath transform='translate(803 1102) rotate(21) scale(0.86)' d='M-7,-7 L7,7 M7,-7 L-7,7'/%3E%3Cpath transform='translate(217 205) rotate(27) scale(0.68)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(400 1031) rotate(1) scale(0.82)' d='M0,-9 V9 M-9,0 H9'/%3E%3Cpath transform='translate(867 429) rotate(14) scale(0.57)' d='M0,-10 L10,8 L-10,8 Z'/%3E%3Cpath transform='translate(1068 664) rotate(-21) scale(0.81)' d='M-9,-9 H9 V9 H-9 Z'/%3E%3Cpath transform='translate(932 77) rotate(-2) scale(0.59)' d='M-7,-7 L7,7 M7,-7 L-7,7'/%3E%3Cpath transform='translate(301 336) rotate(-11) scale(0.58)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(432 794) rotate(5) scale(0.61)' d='M0,-9 V9 M-9,0 H9'/%3E%3Cpath transform='translate(446 179) rotate(24) scale(0.78)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(601 1010) rotate(17) scale(0.65)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3Cpath transform='translate(729 296) rotate(-12) scale(0.77)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(1032 237) rotate(22) scale(0.80)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(626 417) rotate(-10) scale(0.60)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3C/g%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='720' viewBox='0 0 720 720'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath transform='translate(245 132) rotate(-26) scale(0.95)' d='M-4,-7 L8,0 L-4,7 Z M14,0 A14,14 0 1 1 13.9,-1.5'/%3E%3Cpath transform='translate(458 81) rotate(30) scale(0.89)' d='M0,-10 L10,8 L-10,8 Z'/%3E%3Cpath transform='translate(383 272) rotate(24) scale(1.07)' d='M-14,10 L0,-14 L14,10 Z M-14,10 L0,2 L14,10 M0,-14 L0,2'/%3E%3Cpath transform='translate(72 365) rotate(-26) scale(1.20)' d='M-9,-9 H9 V9 H-9 Z'/%3E%3Cpath transform='translate(80 93) rotate(18) scale(1.19)' d='M-12,-4 H12 V10 H-12 Z M-9,-4 V-7 H-3 V-4 M3,-4 V-7 H9 V-4'/%3E%3Cpath transform='translate(311 573) rotate(-32) scale(1.17)' d='M-16,4 L-8,-4 L0,4 L8,-4 L16,4'/%3E%3Cpath transform='translate(115 180) rotate(-30) scale(0.84)' d='M5,-12 A5,5 0 1 1 4.9,-12.6 M0,-7 V6 M-9,-2 L0,-4 L9,-2 M0,6 L-7,16 M0,6 L7,16'/%3E%3Cpath transform='translate(443 652) rotate(6) scale(1.13)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3Cpath transform='translate(671 64) rotate(2) scale(1.17)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(594 223) rotate(7) scale(0.95)' d='M-16,0 q4,-8 8,0 q4,8 8,0 q4,-8 8,0'/%3E%3Cpath transform='translate(152 413) rotate(32) scale(1.11)' d='M0,0 C0,-3 4,-3 4,0 C4,6 -6,6 -6,-1 C-6,-10 8,-10 8,0'/%3E%3Cpath transform='translate(478 313) rotate(-29) scale(1.17)' d='M-14,-2 H14 V14 H-14 Z M-14,-2 L-12,-11 L14,-7 L14,-2 M-5,-9.6 L-8,-2 M3,-8.6 L0,-2 M11,-7.6 L8,-2'/%3E%3Cpath transform='translate(239 416) rotate(-28) scale(1.06)' d='M-16,-9 H16 V9 H-16 Z M-8,-9 V9 M8,-9 V9 M-12,-5 h0 M-12,5 h0 M12,-5 h0 M12,5 h0'/%3E%3Cpath transform='translate(552 490) rotate(21) scale(0.72)' d='M0,-16 L14,-8 L14,8 L0,16 L-14,8 L-14,-8 Z M0,0 L0,16 M0,0 L14,-8 M0,0 L-14,-8'/%3E%3Cpath transform='translate(510 222) rotate(-20) scale(1.13)' d='M-12,8 A6,6 0 0 1 -10,-3.5 A8,8 0 0 1 5,-4.5 A6.5,6.5 0 0 1 12,8 Z'/%3E%3Cpath transform='translate(60 470) rotate(23) scale(1.01)' d='M-14,6 Q0,-14 14,0 M8,-6 L14,0 L6,3'/%3E%3Cpath transform='translate(533 408) rotate(18) scale(0.75)' d='M3,-14 L-7,2 H0 L-3,14 L8,-3 H1 Z'/%3E%3Cpath transform='translate(582 650) rotate(7) scale(0.80)' d='M-18,0 q4.5,-9 9,0 t9,0 t9,0 t9,0'/%3E%3Cpath transform='translate(343 467) rotate(27) scale(0.88)' d='M-14,-8 H6 V8 H-14 Z M6,-2 L14,-7 V7 L6,2'/%3E%3Cpath transform='translate(216 305) rotate(-31) scale(0.94)' d='M5,-12 A5,5 0 1 1 4.9,-12.6 M0,-7 V6 M-9,-2 L0,-4 L9,-2 M0,6 L-7,16 M0,6 L7,16'/%3E%3Cpath transform='translate(655 484) rotate(-22) scale(1.04)' d='M-12,-4 H12 V10 H-12 Z M-9,-4 V-7 H-3 V-4 M3,-4 V-7 H9 V-4'/%3E%3Cpath transform='translate(604 554) rotate(9) scale(0.95)' d='M-14,6 Q0,-14 14,0 M8,-6 L14,0 L6,3'/%3E%3Cpath transform='translate(100 271) rotate(-7) scale(0.73)' d='M-14,-2 H14 V14 H-14 Z M-14,-2 L-12,-11 L14,-7 L14,-2 M-5,-9.6 L-8,-2 M3,-8.6 L0,-2 M11,-7.6 L8,-2'/%3E%3Cpath transform='translate(51 604) rotate(23) scale(1.18)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3Cpath transform='translate(338 349) rotate(-31) scale(1.12)' d='M-16,0 q4,-8 8,0 q4,8 8,0 q4,-8 8,0'/%3E%3Cpath transform='translate(574 139) rotate(-19) scale(0.77)' d='M3,-14 L-7,2 H0 L-3,14 L8,-3 H1 Z'/%3E%3Cpath transform='translate(378 130) rotate(-20) scale(1.17)' d='M-14,10 L0,-14 L14,10 Z M-14,10 L0,2 L14,10 M0,-14 L0,2'/%3E%3Cpath transform='translate(143 537) rotate(1) scale(0.85)' d='M-18,0 q4.5,-9 9,0 t9,0 t9,0 t9,0'/%3E%3Cpath transform='translate(266 53) rotate(-20) scale(0.94)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(658 326) rotate(21) scale(0.94)' d='M0,-10 L10,8 L-10,8 Z'/%3E%3Cpath transform='translate(460 555) rotate(-2) scale(0.88)' d='M0,0 C0,-3 4,-3 4,0 C4,6 -6,6 -6,-1 C-6,-10 8,-10 8,0'/%3E%3Cpath transform='translate(375 46) rotate(7) scale(1.17)' d='M-14,-8 H6 V8 H-14 Z M6,-2 L14,-7 V7 L6,2'/%3E%3Cpath transform='translate(196 215) rotate(4) scale(0.85)' d='M-16,4 L-8,-4 L0,4 L8,-4 L16,4'/%3E%3Cpath transform='translate(346 648) rotate(20) scale(1.16)' d='M-16,-9 H16 V9 H-16 Z M-8,-9 V9 M8,-9 V9 M-12,-5 h0 M-12,5 h0 M12,-5 h0 M12,5 h0'/%3E%3Cpath transform='translate(177 655) rotate(-18) scale(0.80)' d='M-4,-7 L8,0 L-4,7 Z M14,0 A14,14 0 1 1 13.9,-1.5'/%3E%3Cpath transform='translate(568 316) rotate(-3) scale(0.81)' d='M-9,-9 H9 V9 H-9 Z'/%3E%3Cpath transform='translate(298 261) rotate(-6) scale(1.10)' d='M0,-16 L14,-8 L14,8 L0,16 L-14,8 L-14,-8 Z M0,0 L0,16 M0,0 L14,-8 M0,0 L-14,-8'/%3E%3Cpath transform='translate(416 379) rotate(14) scale(1.08)' d='M-12,8 A6,6 0 0 1 -10,-3.5 A8,8 0 0 1 5,-4.5 A6.5,6.5 0 0 1 12,8 Z'/%3E%3Cpath transform='translate(672 644) rotate(5) scale(1.02)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(228 516) rotate(22) scale(0.80)' d='M-12,8 A6,6 0 0 1 -10,-3.5 A8,8 0 0 1 5,-4.5 A6.5,6.5 0 0 1 12,8 Z'/%3E%3Cpath transform='translate(182 56) rotate(32) scale(1.03)' d='M-16,0 q4,-8 8,0 q4,8 8,0 q4,-8 8,0'/%3E%3Cpath transform='translate(663 169) rotate(1) scale(0.92)' d='M3,-14 L-7,2 H0 L-3,14 L8,-3 H1 Z'/%3E%3Cpath transform='translate(438 474) rotate(28) scale(1.11)' d='M-14,6 Q0,-14 14,0 M8,-6 L14,0 L6,3'/%3E%3Cpath transform='translate(35 206) rotate(28) scale(1.19)' d='M-9,-9 H9 V9 H-9 Z'/%3E%3Cpath transform='translate(263 652) rotate(14) scale(0.95)' d='M-16,-9 H16 V9 H-16 Z M-8,-9 V9 M8,-9 V9 M-12,-5 h0 M-12,5 h0 M12,-5 h0 M12,5 h0'/%3E%3Cpath transform='translate(556 57) rotate(2) scale(1.20)' d='M-12,-4 H12 V10 H-12 Z M-9,-4 V-7 H-3 V-4 M3,-4 V-7 H9 V-4'/%3E%3Cpath transform='translate(630 403) rotate(-11) scale(1.19)' d='M-14,10 L0,-14 L14,10 Z M-14,10 L0,2 L14,10 M0,-14 L0,2'/%3E%3Cpath transform='translate(71 685) rotate(-19) scale(0.73)' d='M-14,-2 H14 V14 H-14 Z M-14,-2 L-12,-11 L14,-7 L14,-2 M-5,-9.6 L-8,-2 M3,-8.6 L0,-2 M11,-7.6 L8,-2'/%3E%3Cpath transform='translate(428 201) rotate(26) scale(0.78)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3Cpath transform='translate(313 180) rotate(11) scale(0.81)' d='M0,-16 L14,-8 L14,8 L0,16 L-14,8 L-14,-8 Z M0,0 L0,16 M0,0 L14,-8 M0,0 L-14,-8'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1130' height='1130' viewBox='0 0 1130 1130'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath transform='translate(200 772) rotate(-31) scale(0.82)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(712 542) rotate(-22) scale(0.73)' d='M0,-9 V9 M-9,0 H9'/%3E%3Cpath transform='translate(901 579) rotate(-21) scale(0.63)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(571 277) rotate(-31) scale(0.89)' d='M0,-10 L10,8 L-10,8 Z'/%3E%3Cpath transform='translate(23 424) rotate(22) scale(0.82)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3Cpath transform='translate(658 95) rotate(-16) scale(0.89)' d='M-7,-7 L7,7 M7,-7 L-7,7'/%3E%3Cpath transform='translate(885 273) rotate(22) scale(0.67)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(274 66) rotate(13) scale(0.62)' d='M0,-9 V9 M-9,0 H9'/%3E%3Cpath transform='translate(1107 825) rotate(-20) scale(0.86)' d='M-9,-9 H9 V9 H-9 Z'/%3E%3Cpath transform='translate(156 1031) rotate(-16) scale(0.86)' d='M0,-10 L10,8 L-10,8 Z'/%3E%3Cpath transform='translate(514 622) rotate(-11) scale(0.90)' d='M0,-9 V9 M-9,0 H9'/%3E%3Cpath transform='translate(1076 994) rotate(30) scale(0.68)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(843 851) rotate(-7) scale(0.61)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3Cpath transform='translate(653 815) rotate(-15) scale(0.77)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(154 539) rotate(19) scale(0.64)' d='M-9,-9 H9 V9 H-9 Z'/%3E%3Cpath transform='translate(466 418) rotate(16) scale(0.76)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(49 122) rotate(24) scale(0.83)' d='M0,-9 V9 M-9,0 H9'/%3E%3Cpath transform='translate(803 1102) rotate(21) scale(0.86)' d='M-7,-7 L7,7 M7,-7 L-7,7'/%3E%3Cpath transform='translate(217 205) rotate(27) scale(0.68)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(400 1031) rotate(1) scale(0.82)' d='M0,-9 V9 M-9,0 H9'/%3E%3Cpath transform='translate(867 429) rotate(14) scale(0.57)' d='M0,-10 L10,8 L-10,8 Z'/%3E%3Cpath transform='translate(1068 664) rotate(-21) scale(0.81)' d='M-9,-9 H9 V9 H-9 Z'/%3E%3Cpath transform='translate(932 77) rotate(-2) scale(0.59)' d='M-7,-7 L7,7 M7,-7 L-7,7'/%3E%3Cpath transform='translate(301 336) rotate(-11) scale(0.58)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(432 794) rotate(5) scale(0.61)' d='M0,-9 V9 M-9,0 H9'/%3E%3Cpath transform='translate(446 179) rotate(24) scale(0.78)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(601 1010) rotate(17) scale(0.65)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3Cpath transform='translate(729 296) rotate(-12) scale(0.77)' d='M-10,0 h0 M0,0 h0 M10,0 h0'/%3E%3Cpath transform='translate(1032 237) rotate(22) scale(0.80)' d='M9,0 A9,9 0 1 1 8.9,-1.2'/%3E%3Cpath transform='translate(626 417) rotate(-10) scale(0.60)' d='M0,-14 Q1.5,-1.5 14,0 Q1.5,1.5 0,14 Q-1.5,1.5 -14,0 Q-1.5,-1.5 0,-14 Z'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-size: 720px 720px, 1130px 1130px;
          mask-size: 720px 720px, 1130px 1130px;
  -webkit-mask-position: 0 0, 310px 190px;
          mask-position: 0 0, 310px 190px;
  -webkit-mask-repeat: repeat; mask-repeat: repeat;
}
@media (max-width: 560px) {
  body::before {
    -webkit-mask-size: 520px 520px, 820px 820px;
            mask-size: 520px 520px, 820px 820px;
  }
}
@media print { body::before { display: none; } }

/* Soft clearing behind headline and body copy so doodles never compete with text */
.auth-pitch h1, .auth-pitch .lead, .steps li, .empty h2, .empty p { position: relative; isolation: isolate; }
.auth-pitch h1::before, .auth-pitch .lead::before, .steps li::before, .empty h2::before, .empty p::before {
  content: ""; position: absolute; z-index: -1; inset: -12px -32px; pointer-events: none;
  background: radial-gradient(closest-side, var(--bg) 55%, transparent); opacity: .92;
}

/* ===== Conversation history: search, sort and group ===== */
.hist-tools { position: relative; display: flex; align-items: center; gap: 6px; margin-top: -6px; }
.hist-search { position: relative; flex: 1; min-width: 0; }
.hist-search > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.hist-search input { width: 100%; height: 36px; padding: 0 32px 0 34px; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 10px; font: inherit; font-size: 14px; outline: 0; transition: border-color .15s; }
.hist-search input::placeholder { color: var(--muted); }
.hist-search input:focus { border-color: var(--accent); }
.hist-search input::-webkit-search-cancel-button, .hist-search input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.hist-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 7px; padding: 0; }
.hist-clear:hover { background: var(--surface-2); color: var(--text); }
.hist-filter-btn { position: relative; flex: none; border: 1px solid var(--border); background: var(--bg); }
.hist-filter-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.hist-filter-btn .dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--bg); }
.hist-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 45; max-height: min(70vh, 520px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; }
.hist-pop .opt { padding: 8px 10px; }
.hist-order { margin: 6px 2px 4px; }
.hist-reset { width: 100%; border: 0; background: transparent; color: var(--accent); font-size: 13.5px; font-weight: 600; padding: 8px; border-radius: 8px; }
.hist-reset:hover { background: var(--surface-2); }

.hist-group + .hist-group { margin-top: 10px; }
.hist-group-label { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 10px 4px; }

/* ===== Chat row actions ===== */
.history-item { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.history-item.menu-open { background: var(--surface-2); }
.history-more { flex: none; width: 30px; height: 30px; margin-right: 4px; display: none; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 7px; padding: 0; }
.history-more:hover { background: var(--border); color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  .history-more { display: grid; opacity: 0; transition: opacity .1s; }
  .history-item:hover .history-more, .history-item:focus-within .history-more, .history-item.menu-open .history-more { opacity: 1; }
}
.history-rename { flex: 1; min-width: 0; height: 38px; margin: 3px 4px; padding: 0 10px; border: 1px solid var(--accent); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; outline: 0; -webkit-user-select: text; user-select: text; }
.history-item.renaming:hover { background: transparent; }
@media (pointer: coarse) { .history-rename { font-size: 16px; } }

.chat-menu { position: fixed; z-index: 90; min-width: 184px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.menu-action { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: transparent; color: var(--text); border-radius: 8px; font-size: 14px; font-weight: 550; text-align: left; }
.menu-action svg { flex: none; color: var(--muted); }
.menu-action:hover, .menu-action:focus-visible { background: var(--surface-2); }
.menu-action.danger, .menu-action.danger svg { color: var(--danger); }
.menu-action.danger:hover, .menu-action.danger:focus-visible { background: var(--danger-bg); }

.sheet-wrap { position: fixed; inset: 0; z-index: 90; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: sheet-fade .18s ease; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: var(--shadow); padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px)); animation: sheet-up .2s ease; }
.sheet::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--border); margin: 2px auto 10px; }
.sheet-title { padding: 0 8px 12px; margin-bottom: 6px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--border); }
.sheet .menu-action { padding: 14px 10px; font-size: 16px; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-fade { from { opacity: 0; } }

/* ===== Message time (hh:mm dd/mm/yy), kept faint ===== */
.msg-time { margin-left: 8px; align-self: center; font-size: 11.5px; line-height: 1; color: var(--muted); opacity: .6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.msg-time.solo { margin: 0; align-self: flex-start; }
.msg.user .msg-time.solo { align-self: flex-end; }

/* ===== Profile button and popup (sidebar bottom) ===== */
.profile { position: relative; border-top: 1px solid var(--border); padding-top: 10px; margin-top: -4px; }
.profile-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; background: transparent; color: var(--text); border-radius: 10px; text-align: left; }
.profile-btn:hover, .profile-btn[aria-expanded="true"] { background: var(--surface-2); }
.profile-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; font-weight: 650; display: grid; place-items: center; overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-chev { flex: none; display: grid; color: var(--muted); transition: transform .15s; }
.profile-btn[aria-expanded="true"] .profile-chev { transform: rotate(180deg); }

/* ===== Files button ===== */
.files-btn { position: relative; }
.files-count { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 650; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.files-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }

/* ===== Files panel (opens beside the chat, like Claude) ===== */
.files-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border-left: 1px solid var(--border); overflow: hidden; }
.files-panel[hidden] { display: none; }
.fp-head { display: flex; align-items: center; gap: 6px; padding: 12px 12px 12px 16px; min-height: 64px; border-bottom: 1px solid var(--border); }
.fp-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; }
.fp-group + .fp-group { margin-top: 22px; }
.fp-group-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.fp-group-count { font-weight: 550; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; font-size: 11.5px; letter-spacing: 0; }
.fp-list { display: flex; flex-direction: column; gap: 6px; }
.fp-file { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; text-align: left; font-size: 14px; }
.fp-file:hover, .fp-file:focus-visible { background: var(--surface-2); border-color: var(--accent); }
.fp-file .attach-thumb { width: 38px; height: 38px; }
.fp-none { font-size: 13.5px; color: var(--muted); padding: 4px 2px; }
.fp-empty { text-align: center; color: var(--muted); padding: 56px 12px; }
.fp-empty strong { display: block; color: var(--text); margin-bottom: 6px; }
.fp-view { height: 100%; display: flex; flex-direction: column; }
.fp-img, .fp-video { display: block; max-width: 100%; max-height: 100%; margin: auto; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.fp-frame { flex: 1; width: 100%; min-height: 420px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.fp-text { margin: 0; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; font-family: var(--mono); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.fp-note { margin: auto; max-width: 320px; text-align: center; color: var(--muted); font-size: 14px; padding: 24px 8px; }
@media (max-width: 820px) {
  .files-panel { position: fixed; inset: 0; z-index: 90; border-left: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .fp-head { min-height: 56px; }
}

/* Keep the top bar usable while the files panel takes space */
.topbar-right { flex: none; }
.topbar-title { min-width: 0; }
body.files-open .credits-label { display: none; }

/* ===== Email / phone code sign-in ===== */
.otp-methods { margin-bottom: 14px; }
.otp-form { display: flex; flex-direction: column; gap: 12px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input { display: block; width: 100%; height: 44px; padding: 0 14px; font: inherit; font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 12px; outline: 0; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: var(--muted); opacity: .6; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.field-error { margin: -2px 0 0; font-size: 13px; color: var(--danger); }
.field-error[hidden] { display: none; }
.cc-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.cc-opt.active, .cc-opt:hover { background: var(--surface-2); }
.cc-opt[aria-selected="true"] .cc-opt-name { color: var(--accent); font-weight: 600; }
.cc-opt-name { min-width: 0; overflow-wrap: anywhere; }
.cc-opt-code { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.cc-none { padding: 12px 10px; font-size: 14px; color: var(--muted); }
.link-btn { border: 0; background: transparent; padding: 0; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; }
.link-btn:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 2px; }
.link-btn:disabled { color: var(--muted); cursor: default; font-weight: 550; }
.link-btn.back { display: inline-flex; align-items: center; gap: 4px; margin: -4px 0 16px -4px; padding: 4px; color: var(--muted); font-weight: 550; }
.link-btn.back:hover { color: var(--text); text-decoration: none; }
#auth-verify h2 { outline: 0; }
#auth-verify .muted { overflow-wrap: anywhere; }
.code-input { height: 56px; font-size: 26px; font-weight: 650; text-align: center; letter-spacing: .5em; padding-left: calc(14px + .5em); font-variant-numeric: tabular-nums; }
.code-input::placeholder { letter-spacing: .5em; }
#auth-verify .note { margin-top: 16px; }
.otp-resend { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: var(--muted); }

/* ===== Field boxes (email, phone) ===== */
.input, .field-shell { height: 48px; border-radius: 12px; }
.field-shell { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 14px; background: var(--bg); border: 1px solid var(--border); cursor: text; transition: border-color .15s, box-shadow .15s; }
.field-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field-shell.invalid { border-color: var(--danger); }
.field-shell.invalid:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.field-shell input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; }
.field-shell input::placeholder { color: var(--muted); opacity: .6; }
.shell-icon { flex: none; color: var(--muted); }
.field-clear { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.field-clear:hover { background: var(--surface-2); color: var(--text); }
.field-clear[hidden] { display: none; }
.phone-shell { padding-left: 0; gap: 0; }
.phone-shell input { padding-left: 12px; }
.shell-sep { flex: none; width: 1px; height: 24px; background: var(--border); }
.cc { position: relative; }
.cc-btn { flex: 0 1 auto; max-width: 52%; height: 100%; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 14px; border: 0; background: transparent; color: var(--text); border-radius: 11px 0 0 11px; font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.cc-btn:hover, .cc-btn[aria-expanded="true"] { background: var(--surface-2); }
.cc-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cc-btn-code { font-weight: 650; font-variant-numeric: tabular-nums; flex: none; }
.cc-btn-name { flex: 1; min-width: 0; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-btn svg { flex: none; color: var(--muted); }

/* Country list: a compact box under the field, with its own scrolling */
.cc-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.cc-pop[hidden] { display: none; }
.cc-search-wrap { position: relative; flex: none; padding: 8px; border-bottom: 1px solid var(--border); }
.cc-search-wrap > svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.cc-search { display: block; width: 100%; height: 36px; padding: 0 12px 0 34px; margin: 0; font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 9px; outline: 0; }
.cc-search:focus { border-color: var(--accent); }
.cc-list { list-style: none; margin: 0; padding: 6px; height: 216px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.cc-list::-webkit-scrollbar { width: 8px; }
.cc-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; border: 2px solid var(--surface); }
.cc-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 7px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.cc-opt.active, .cc-opt:hover { background: var(--surface-2); }
.cc-opt[aria-selected="true"] .cc-opt-name { color: var(--accent); font-weight: 600; }
.cc-opt-name { min-width: 0; overflow-wrap: anywhere; }
.cc-opt-code { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.cc-none { padding: 14px 10px; font-size: 14px; color: var(--muted); text-align: center; }
.code-input { padding: 0 14px 0 calc(14px + .5em); }

/* ===== Profile menu: opens upward from the profile button ===== */
.profile .menu.profile-menu { top: auto; left: 0; right: 0; bottom: calc(100% + 8px); width: auto; display: flex; flex-direction: column; padding: 0; overflow: hidden; border-radius: 14px; transform-origin: 50% 100%; animation: pfm-pop .14s ease-out; }
.profile .menu.profile-menu[hidden] { display: none; }
@keyframes pfm-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.profile-avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.pfm-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px; border-bottom: 1px solid var(--border); }
.pfm-id { flex: 1; min-width: 0; text-align: left; }
.pfm-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 6px 8px; scrollbar-width: thin; }
.pfm-group { padding: 6px 0; }
.pfm-group + .pfm-group { border-top: 1px solid var(--border); }
.pfm-label { padding: 4px 10px 6px; font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pfm-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 36px; padding: 7px 10px; border: 0; background: transparent; color: var(--text); border-radius: 8px; font: inherit; font-size: 14px; font-weight: 550; text-align: left; }
.pfm-item svg { flex: none; color: var(--muted); }
.pfm-item:hover, .pfm-item:focus-visible { background: var(--surface-2); outline: 0; }
.pfm-pref { padding: 4px 10px 8px; }
.pfm-pref-name { font-size: 13px; font-weight: 550; margin-bottom: 6px; }
.pfm-pref .menu-help { margin-top: 6px; }
.pfm-foot { flex: none; padding: 6px; border-top: 1px solid var(--border); }
.pfm-item.danger, .pfm-item.danger svg { color: var(--danger); }
.pfm-item.danger:hover, .pfm-item.danger:focus-visible { background: var(--danger-bg); }

/* ===== Files panel, Claude-style: cards for AI files, tiles for the user's files ===== */
.fp-body { padding: 18px 16px 24px; }
.fp-group + .fp-group { margin-top: 26px; }
.fp-group-title { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.fp-group-count { background: transparent; border: 0; padding: 0; font-size: 13px; font-weight: 500; opacity: .8; }
.fp-list { gap: 8px; }
.fp-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; background: var(--surface-2); color: var(--text); border-radius: 14px; text-align: left; transition: background .15s, box-shadow .15s; }
.fp-card:hover, .fp-card:focus-visible { box-shadow: inset 0 0 0 1px var(--border); outline: 0; filter: brightness(.98); }
.fp-card-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.fp-card-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fp-card-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-card-type { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.fp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fp-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 124px; padding: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 14px; text-align: left; overflow: hidden; transition: border-color .15s; }
.fp-tile:hover, .fp-tile:focus-visible { border-color: var(--accent); outline: 0; }
.fp-tile-name { font-size: 13.5px; font-weight: 550; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.fp-badge { align-self: flex-start; padding: 2px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .04em; }
.fp-tile.has-img { padding: 0; }
.fp-tile.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fp-tile.has-img .fp-badge { position: absolute; left: 8px; bottom: 8px; backdrop-filter: blur(6px); background: color-mix(in srgb, var(--surface) 82%, transparent); }

/* =====================================================================
   Fit to the screen: the app shell is fixed to the viewport, so the
   browser never scrolls the page. Only panels inside the interface scroll.
   ===================================================================== */
html, body { overflow-x: clip; }
img, video, svg { max-width: 100%; }
body.shell { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.shell .app, body.shell .auth {
  position: fixed; top: 0; left: 0; width: 100%; height: var(--vvh, 100%);
  min-height: 0; overflow: hidden;
  grid-template-rows: minmax(0, 1fr);
}
body.shell .auth-col { height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
body.shell .main { height: 100%; }
body.shell .messages { overflow-x: hidden; overscroll-behavior: contain; }
body.shell * { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
@media (max-width: 820px), (pointer: coarse) {
  body.shell * { scrollbar-width: none; }
  body.shell *::-webkit-scrollbar { display: none; }
}

/* ===== New chat: compact row with a pencil icon, first in the sidebar ===== */
.new-chat { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font-size: 14px; font-weight: 600; text-align: left; margin-top: -4px; }
.new-chat svg { flex: none; color: var(--accent); }
.new-chat:hover, .new-chat:focus-visible { background: var(--surface-2); outline: 0; }

/* ===== Composer: the model picker lives inside the input box ===== */
.composer-box { position: relative; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 10px 8px 14px; }
.composer textarea { flex: none; width: 100%; padding: 4px 0; }
.composer-row { display: flex; align-items: center; gap: 4px; margin-left: -6px; min-width: 0; }
.composer-row .send { margin-left: auto; }
.picker { position: static; min-width: 0; flex: 0 1 auto; }
.picker-btn { height: 30px; max-width: 100%; padding: 0 8px 0 10px; gap: 6px; border-color: transparent; background: var(--surface-2); font-size: 13px; }
.picker-btn:hover, .picker-btn[aria-expanded="true"] { border-color: var(--border); }
#model-btn-model { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dropup { left: 0; right: auto; width: min(380px, 100%); }
.composer-tools { margin-top: 0; }

/* ===== Phones: smaller type and icons so everything fits professionally ===== */
@media (max-width: 640px) {
  body { font-size: 14px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand-mark { width: 24px; height: 24px; }
  .btn { height: 38px; padding: 0 14px; font-size: 14px; }
  .btn.sm { height: 30px; padding: 0 11px; font-size: 13px; }
  .icon-btn { width: 32px; height: 32px; border-radius: 8px; }
  .icon-btn svg { width: 17px; height: 17px; }
  .segmented button { padding: 5px 10px; font-size: 12.5px; }

  /* top bar */
  .topbar { min-height: 48px; padding: 6px 10px; gap: 6px; }
  .topbar-title { font-size: 14px; }
  .topbar-right { gap: 2px; }
  .credits-info { font-size: 12.5px; padding: 0 9px; gap: 5px; }
  .credits-info svg { width: 14px; height: 14px; }
  .topup { font-size: 12.5px; padding: 5px 10px 5px 8px; gap: 4px; }
  .topup svg { width: 12px; height: 12px; }
  .files-count { min-width: 14px; height: 14px; line-height: 14px; font-size: 9.5px; padding: 0 3px; }

  /* sidebar */
  .sidebar { gap: 8px; padding: 12px 10px calc(10px + env(safe-area-inset-bottom)); }
  .new-chat { height: 32px; font-size: 13.5px; }
  .sidebar-label { font-size: 11px; padding-top: 2px; }
  .hist-search input { height: 32px; font-size: 13.5px; }
  .history-link { padding: 7px 10px; }
  .history-title { font-size: 13.5px; }
  .history-date { font-size: 11.5px; }
  .profile-btn { padding: 6px; gap: 8px; }
  .profile-avatar { width: 28px; height: 28px; font-size: 11.5px; }
  .profile-avatar.lg { width: 34px; height: 34px; }
  .profile-name { font-size: 13.5px; }
  .pfm-head { padding: 10px 12px; gap: 10px; }
  .pfm-item { min-height: 32px; padding: 6px 10px; font-size: 13.5px; gap: 10px; }
  .pfm-item svg { width: 16px; height: 16px; }
  .pfm-label { font-size: 10.5px; padding: 2px 10px 4px; }
  .pfm-pref-name { font-size: 12.5px; margin-bottom: 5px; }

  /* messages */
  .messages-inner { padding: 14px 12px 6px; gap: 16px; }
  .empty { padding: 28px 12px 12px; }
  .empty h2 { font-size: 19px; }
  .empty p { font-size: 13px; margin-top: 6px; }
  .suggestions { margin-top: 16px; gap: 8px; grid-template-columns: 1fr; }
  .suggestion { padding: 9px 12px; font-size: 13px; }
  .suggestion span { font-size: 11.5px; margin-bottom: 1px; }
  .msg { gap: 8px; }
  .msg-avatar { width: 26px; height: 26px; border-radius: 7px; font-size: 12px; }
  .msg.user .msg-body { max-width: 92%; }
  .msg.user .msg-text, .msg.error .msg-text { padding: 8px 12px; }
  .msg-meta { font-size: 11px; }
  .act { width: 28px; height: 28px; }
  .act svg { width: 15px; height: 15px; }
  .attach, .chip { font-size: 12px; max-width: 190px; }
  .attach-thumb { width: 28px; height: 28px; }
  .attach-size { font-size: 11px; }
  .video-caption { font-size: 12px; padding: 8px 12px; }
  .video-placeholder div { font-size: 12.5px; }
  .video-placeholder .play { width: 38px; height: 38px; }
  .editor { padding: 10px; }

  /* composer */
  .composer { padding: 4px 10px calc(8px + env(safe-area-inset-bottom)); }
  .composer-box { padding: 8px 8px 6px 12px; border-radius: 16px; }
  .composer textarea { font-size: 14px; padding: 3px 0; max-height: 120px; }
  .composer-row { margin-left: -4px; }
  .composer-row .icon-btn svg { width: 18px; height: 18px; }
  .picker-btn { height: 28px; font-size: 12.5px; padding: 0 7px 0 9px; gap: 5px; }
  .picker-btn svg { width: 14px; height: 14px; }
  .send { width: 30px; height: 30px; }
  .send svg { width: 15px; height: 15px; }
  .hint { margin-top: 5px; font-size: 11px; }
  .dropup { max-height: min(58dvh, 440px); }
  .dropup-label { font-size: 11px; }
  .opt { padding: 8px 10px; }
  .opt-name { font-size: 13.5px; }
  .opt-desc { font-size: 12px; }
  .chip .chip-x { width: 24px; height: 24px; }

  /* files panel */
  .fp-head { min-height: 48px; padding: 6px 8px 6px 14px; }
  .fp-title { font-size: 15px; }
  .fp-body { padding: 14px 12px 18px; }
  .fp-group-title { font-size: 13px; }
  .fp-card { padding: 10px; gap: 10px; }
  .fp-card-icon { width: 34px; height: 34px; }
  .fp-card-name { font-size: 13.5px; }
  .fp-card-type { font-size: 11.5px; }
  .fp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fp-tile { min-height: 96px; padding: 10px; }
  .fp-tile-name { font-size: 12.5px; }

  /* dialogs */
  .modal-card { padding: 18px; }
  .modal-card h3 { font-size: 16px; }

  /* login page */
  .auth-top { padding: 8px 12px; }
  .auth-main { padding: 4px 14px 24px; }
  .auth-pitch h1 { font-size: 25px; }
  .auth-pitch .lead { font-size: 13.5px; margin-top: 8px; }
  .showcase { margin-top: 16px; }
  .showcase-caption { font-size: 12px; margin-top: 6px; }
  .auth-card { padding: 16px; margin-top: 16px; border-radius: 14px; }
  .tabs { margin-bottom: 14px; }
  .tabs button { padding: 6px; font-size: 13.5px; }
  .auth-card h2, #auth-verify h2 { font-size: 18px; }
  .auth-card .muted { margin: 4px 0 14px; font-size: 13px; }
  .divider { margin: 12px 0 10px; font-size: 11.5px; }
  .otp-methods { margin-bottom: 10px; }
  .field label { font-size: 12px; margin-bottom: 4px; }
  .input, .field-shell { height: 42px; border-radius: 10px; }
  .field-shell input { font-size: 14px; }
  .cc-btn { font-size: 14px; padding: 0 8px 0 12px; }
  .cc-btn-name { font-size: 12.5px; }
  .cc-list { height: 184px; }
  .cc-opt { font-size: 13.5px; min-height: 34px; }
  .code-input { height: 46px; font-size: 21px; }
  .field-error { font-size: 12px; }
  .note { font-size: 12px; }
  .legal { font-size: 11.5px; }
  .link-btn { font-size: 13px; }
  .otp-resend { font-size: 13px; }

  /* info and payment pages */
  .info-top, .tp-top { padding: 10px 14px; }
  .info-main, .tp-main { padding-top: 22px; padding-bottom: 40px; }
  .prose h1, .tp-heading h1, .tp-gate h1 { font-size: 23px; }
  .prose h2 { font-size: 16px; margin-top: 24px; }
  .tp-heading p { font-size: 14px; }
}
@media (max-width: 400px) {
  .credits-info { padding: 0 7px; }
}

/* iOS zooms into inputs under 16px, which pushes the page out of fit: keep real text fields at 16px there */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 640px) {
    .composer textarea, .field-shell input, .input, .cc-search, .hist-search input, .editor-input { font-size: 16px; }
  }
}
@media (max-width: 560px) { .composer-tools .hint { text-align: center; } }

/* ===== Narrow layouts: intro, then the video preview, then the sign-in card ===== */
@media (max-width: 1099px) {
  .showcase { order: 1; }
  .auth-card { order: 2; scroll-margin-top: 12px; }
}
/* Keep the brand name next to its icon on every phone; make the theme switch compact to make room */
@media (max-width: 420px) {
  .auth-top { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .auth-top .brand { min-width: 0; font-size: 14.5px; gap: 6px; }
  .auth-top .brand-mark { width: 22px; height: 22px; }
  .auth-top .segmented { padding: 2px; }
  .auth-top .segmented button { padding: 4px 7px; font-size: 11.5px; }
}

/* ===== Side menu: Log in / Sign up shortcuts ===== */
.info-links .jump { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-align: left; }
.info-links .jump svg { flex: none; color: var(--muted); }
.info-links .jump:hover, .info-links .jump:focus-visible { background: var(--surface-2); outline: 0; }
.info-links .jump.primary, .info-links .jump.primary svg { color: var(--accent); }
.info-sep { height: 1px; margin: 6px 4px; background: var(--border); }

/* ===== Login header: stays put while the page scrolls; Sign up and a one-tap theme switch ===== */
.auth-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); padding-top: 12px; padding-bottom: 12px; }
.auth-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.auth-signup { flex: none; }
.theme-cycle { width: 36px; height: 36px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 50%; }
.theme-cycle:hover { background: var(--surface-2); }
.theme-cycle .ti { display: none; }
.theme-cycle .ti-system { display: block; }
html[data-theme-pref="light"] .theme-cycle .ti-system, html[data-theme-pref="dark"] .theme-cycle .ti-system { display: none; }
html[data-theme-pref="light"] .theme-cycle .ti-light, html[data-theme-pref="dark"] .theme-cycle .ti-dark { display: block; }
.theme-cycle.tick .ti { animation: theme-tick .3s ease; }
@keyframes theme-tick { from { transform: rotate(-70deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  .auth-top { padding-top: 7px; padding-bottom: 7px; }
  .theme-cycle { width: 32px; height: 32px; }
  .theme-cycle .ti { width: 16px; height: 16px; }
  .auth-signup { height: 30px; padding: 0 12px; font-size: 13px; }
}

/* ===== Credits: mini top-up banner and "credits depleted" pop-up ===== */
.composer-inner { position: relative; }

.depleted { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); z-index: 30; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); font-size: 14px; animation: depleted-in .18s ease; }
.depleted[hidden] { display: none; }
.depleted-icon { flex: none; color: var(--danger); }
.depleted-text { font-weight: 550; min-width: 0; }
.depleted-btn { flex: none; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); padding: 5px 14px; font-size: 13.5px; font-weight: 600; }
.depleted-btn:hover { background: var(--accent-hover); }
.depleted-close { flex: none; margin-left: auto; width: 30px; height: 30px; }
@keyframes depleted-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.mt { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; }
.mt[hidden] { display: none; }
.mt-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.mt-card { position: relative; width: min(100%, 420px); max-height: 100%; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 20px 16px; box-shadow: var(--shadow); animation: depleted-in .18s ease; }
.mt-close { position: absolute; top: 10px; right: 10px; }
.mt-card h3 { font-size: 18px; letter-spacing: -.01em; padding-right: 36px; }
.mt-lead { margin-top: 6px; color: var(--muted); font-size: 14px; }
.mt-bal { margin-top: 10px; font-size: 13px; color: var(--muted); }
.mt-bal strong { color: var(--text); font-variant-numeric: tabular-nums; }
.mt-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 8px; margin-top: 12px; }
.mt-preset { display: flex; flex-direction: column; align-items: center; padding: 9px 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; transition: border-color .15s, background .15s; }
.mt-preset strong { font-size: 17px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.mt-preset span { font-size: 11.5px; color: var(--muted); }
.mt-preset:hover { border-color: var(--accent); }
.mt-preset[aria-pressed="true"] { border-color: var(--accent); background: var(--surface-2); box-shadow: 0 0 0 1px var(--accent); }
.mt-preset[aria-pressed="true"] strong { color: var(--accent); }
.mt-stepper { display: flex; gap: 8px; margin-top: 10px; }
.mt-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 44px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; }
.mt-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.mt-field input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 20px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; padding: 0; }
.mt-field input::placeholder { color: var(--muted); opacity: .5; }
.mt-unit { color: var(--muted); font-size: 13px; font-weight: 550; }
.mt-step { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; color: var(--text); }
.mt-step:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.mt-step:disabled { opacity: .4; cursor: not-allowed; }
.mt-help { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.mt-help.bad { color: var(--danger); }
.mt-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 12px 0 12px; padding-top: 12px; border-top: 1px solid var(--border); font-weight: 600; }
.mt-amt { display: flex; flex-direction: column; align-items: flex-end; }
.mt-amt strong { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mt-amt small { font-size: 12.5px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.mt-email { margin-bottom: 12px; }
.mt-email label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mt-email input { width: 100%; height: 42px; padding: 0 12px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 12px; }
.mt-email input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.mt-pay { height: 44px; font-size: 15px; }
.mt-status { margin-top: 10px; font-size: 13px; color: var(--danger); background: var(--danger-bg); padding: 8px 10px; border-radius: 10px; }
.mt-status[hidden] { display: none; }
.mt-secure, .mt-test { margin-top: 10px; text-align: center; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .mt { padding: 12px; }
  .mt-card { padding: 16px 14px 12px; }
  .mt-field input, .mt-email input { font-size: 16px; }
  .mt-field input { font-size: 18px; }
  .depleted { font-size: 13px; gap: 8px; padding-left: 12px; }
}

/* ===== Credits pill: bird icon, and on phones only the plus sign on the top-up button ===== */
.credits-icon { flex: none; }
@media (max-width: 640px) {
  .topup-label { display: none; }
  .topup { padding: 7px 11px; }
  .topup svg { width: 15px; height: 15px; }
}
