/* AI Studio design tokens. No remote fonts, blur layers or runtime style injection. */
:root {
  --background: #101114;
  --surface: #1d2026;
  --surface-raised: #23262c;
  --surface-hover: #2a2f36;
  --border: #ffffff0f;
  --border-strong: #ffffff1c;
  --lime: #d6ff62;
  --lime-soft: #a7f35c;
  --text-primary: #f3f3f4;
  --text-secondary: #a0a3ab;
  --text-tertiary: #838791;
  --on-lime: #17200c;
  --destructive: #f5a294;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --shadow-card: 0 2px 8px #00000010;
  --shadow-float: 0 8px 24px #00000040;
  --duration-press: 120ms;
  --duration-nav: 190ms;
  --duration-enter: 220ms;
  --ease: cubic-bezier(.2,.7,.2,1);
  --safe-top: calc(max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px)) + var(--tg-content-safe-area-inset-bottom, 0px));
  --safe-left: calc(max(env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, 0px)) + var(--tg-content-safe-area-inset-left, 0px));
  --safe-right: calc(max(env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, 0px)) + var(--tg-content-safe-area-inset-right, 0px));
  color-scheme: dark;
  font-family: Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text-primary); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; cursor: pointer; border: 0; }
a { color: inherit; text-decoration: none; }
button, a, .tool-card { transition: transform var(--duration-press) var(--ease), background var(--duration-nav), border-color var(--duration-nav); }
button:not(:disabled):active, a:active { transform: scale(.975); }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
#screen:focus { outline: none; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(29px, 8vw, 36px); font-weight: 600; line-height: 1.12; letter-spacing: -1.4px; }
h2 { font-size: 19px; font-weight: 600; letter-spacing: -.6px; }
h3 { font-size: 16px; font-weight: 600; letter-spacing: -.4px; }
p { line-height: 1.6; }
[hidden] { display: none !important; }
.accent { color: var(--lime); }
.muted { color: var(--text-secondary); }
.app { width: 100%; max-width: 480px; margin: auto; padding: var(--safe-top) calc(22px + var(--safe-right)) calc(110px + var(--safe-bottom)) calc(22px + var(--safe-left)); min-height: 100dvh; }
.topbar { height: 80px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 19px; letter-spacing: -.7px; font-weight: 650; min-height: 44px; }
.brand-mark { color: var(--lime); font-size: 35px; line-height: 1; font-family: Arial, sans-serif; }
.brand-dot { background: var(--lime); width: 5px; height: 5px; border-radius: 50%; margin: 9px 0 0 -5px; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.account { width: 40px; height: 44px; display: grid; place-items: center; background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: 50%; font-size: 14px; color: #d1d8c9; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-secondary); font-size: 9px; font-weight: 500; letter-spacing: .6px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); line-height: 1.5; }
.notice.error { color: var(--destructive); font-size: 12px; letter-spacing: 0; }
.notice button { min-height: 44px; background: none; color: var(--text-primary); font-size: 12px; padding: 6px; }
.balance-hero { padding: 31px 0 26px; text-align: center; position: relative; isolation: isolate; }
.balance-hero::before { content: ""; position: absolute; inset: 0 -15px; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, #a7f35c09, transparent 68%); }
.balance-caption { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--text-secondary); font-size: 10px; letter-spacing: 1.8px; font-weight: 500; }
.credit-dot { width: 5px; height: 5px; background: var(--lime-soft); border-radius: 50%; }
.balance-number { margin: 8px 0 0; font-size: clamp(54px, 19vw, 82px); font-weight: 500; line-height: 1.1; letter-spacing: -5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.balance-unit { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 7px; color: var(--text-secondary); font-size: 13px; letter-spacing: .4px; }
.balance-unit svg { color: var(--lime); width: 13px; height: 13px; }
.balance-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; min-height: 44px; margin-top: 7px; color: #c4cdba; }
.balance-link svg { width: 13px; height: 13px; }
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 23px; }
.quick-actions a, .quick-actions button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); min-height: 83px; font-size: 11px; }
.quick-actions svg { color: var(--lime); width: 22px; height: 22px; }
.quick-actions span { height: 24px; }
.quick-actions button:disabled { opacity: .45; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 14px; min-height: 26px; }
.section-head a { display: inline-flex; gap: 5px; align-items: center; min-height: 44px; font-size: 11px; color: var(--text-secondary); }
.section-head a svg { width: 14px; height: 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.tool-card { display: flex; flex-direction: column; padding: 15px; min-height: 157px; overflow: hidden; position: relative; }
.tool-card-top { display: flex; align-items: center; justify-content: space-between; gap: 3px; }
.tool-icon { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-raised); }
.tool-icon svg { width: 19px; height: 19px; color: #d6decc; }
.tool-badge { display: flex; align-items: center; gap: 2px; font-size: 8px; color: var(--text-secondary); letter-spacing: .6px; }
.tool-badge svg { width: 13px; height: 13px; }
.tool-card-copy { margin-top: auto; padding-top: 25px; }
.tool-card-copy p { font-size: 10px; line-height: 1.45; color: var(--text-secondary); margin-top: 6px; }
.tool-card.featured { min-height: 186px; isolation: isolate; background: #172119; }
.tool-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .65; }
.featured::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #05080535, #0b100c18 20%, #0b100c 98%); z-index: -1; }
.featured .tool-icon { background: #11170ee6; }
.featured .tool-badge { color: #e6eddc; }
.featured .tool-card-copy p { color: #c3cbb9; }
.unavailable { border-style: dashed; background: #10120f; }
.unavailable .tool-icon, .unavailable h3 { color: var(--text-secondary); }
.unavailable .tool-icon svg { color: var(--text-tertiary); }
.unavailable .tool-badge { font-size: 7px; letter-spacing: .1px; }
.inspiration { display: flex; align-items: center; gap: 12px; padding: 15px; margin-top: 12px; background: linear-gradient(115deg, #1b2417, var(--surface)); }
.inspiration-mark { font-size: 34px; color: var(--lime); line-height: 1; }
.inspiration strong { display: block; font-size: 12px; font-weight: 500; }
.inspiration small { display: block; margin-top: 5px; color: var(--text-secondary); font-size: 10px; }
.inspiration > svg { margin-left: auto; width: 17px; color: var(--text-secondary); }
.job-card { width: 100%; padding: 16px; text-align: left; margin-bottom: 12px; background: linear-gradient(110deg, #1d2417, var(--surface)); border-color: #d6ff621c; }
.job-top { display: flex; gap: 11px; align-items: center; }
.job-top > span:nth-child(2) { flex: 1; min-width: 0; }
.job-top strong { display: block; font-size: 12px; font-weight: 500; }
.job-top small { display: block; color: var(--text-secondary); margin-top: 5px; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-top > svg { width: 16px; color: var(--text-secondary); }
.job-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: #d6ff6210; color: var(--lime); }
.job-icon svg { width: 19px; height: 19px; }
.progress-label { display: flex; justify-content: space-between; gap: 8px; color: var(--text-secondary); font-size: 9px; margin-top: 17px; margin-bottom: 8px; }
.progress-label span:last-child { color: #c0d198; }
progress { width: 100%; display: block; height: 3px; border: none; border-radius: 9px; overflow: hidden; background: var(--surface-hover); color: var(--lime); accent-color: var(--lime); }
progress::-webkit-progress-bar { background: var(--surface-hover); border-radius: 9px; }
progress::-webkit-progress-value { background: var(--lime); border-radius: 9px; transition: width var(--duration-enter); }
progress::-moz-progress-bar { background: var(--lime); border-radius: 9px; }
progress:indeterminate { background: linear-gradient(90deg, var(--lime-soft) 0 28%, var(--surface-hover) 28%); }
progress:indeterminate::-webkit-progress-bar { background: linear-gradient(90deg, var(--lime-soft) 0 28%, var(--surface-hover) 28%); }
.works-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.media-card { padding: 0; text-align: left; overflow: hidden; min-width: 0; }
.media-art { display: flex; position: relative; align-items: center; justify-content: center; aspect-ratio: 1 / 1.03; background: #1e2628; }
.media-art img { width: 100%; height: 100%; object-fit: cover; }
.media-music { background: radial-gradient(ellipse at 70% 20%, #405144, #1c2722 65%); }
.media-video, .media-clip { background: radial-gradient(ellipse at top, #3a3d4a, #1a1e29 70%); }
.media-placeholder { display: flex; flex-direction: column; align-items: center; gap: 14px; color: #bec8b6; }
.media-placeholder > svg { width: 30px; height: 30px; stroke-width: 1.2; }
.waveform { color: #a4b399; font-size: 14px; letter-spacing: 1px; white-space: nowrap; }
.media-kind { position: absolute; top: 10px; left: 10px; background: #10150cc9; border: 1px solid #ffffff17; border-radius: 6px; padding: 4px 6px; font-size: 9px; color: #e3e9db; }
.status { position: absolute; left: 9px; bottom: 9px; display: inline-flex; align-items: center; gap: 5px; background: #10150de8; color: #e3e8dc; font-size: 8px; padding: 5px 7px; border-radius: var(--radius-pill); }
.status > span { width: 4px; height: 4px; border-radius: 50%; background: var(--text-secondary); }
.status.done > span { background: var(--lime-soft); }
.status.running > span { background: #e3ce87; }
.status.failed { color: var(--destructive); }
.status.failed > span { background: var(--destructive); }
.media-copy { display: block; padding: 12px; }
.media-copy strong { display: block; font-size: 11px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-copy small { display: block; font-size: 9px; color: var(--text-secondary); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-error { display: block; padding: 15px; color: var(--text-secondary); font-size: 11px; }
.page-heading { margin: 28px 0 24px; }
.eyebrow, .meta { color: var(--text-secondary); font-size: 9px; font-weight: 500; letter-spacing: 1.5px; }
.eyebrow { margin-bottom: 10px; }
.page-heading p { color: var(--text-secondary); font-size: 12px; margin-top: 12px; }
.search { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 14px; padding: 0 15px; }
.search svg { width: 18px; height: 18px; color: var(--text-secondary); }
.search input { min-width: 0; width: 100%; border: none; background: transparent; color: var(--text-primary); padding: 16px 0; font-size: 16px; }
.search input::placeholder { color: var(--text-secondary); font-size: 12px; }
.count { color: var(--text-secondary); margin-left: 5px; font-weight: 400; font-size: 13px; }
.footnote { margin: 25px 0; text-align: center; font-size: 10px; color: var(--text-secondary); }
.tabs { display: flex; overflow-x: auto; scrollbar-width: none; gap: 6px; padding: 3px 0 5px; }
.tab { flex: 1 0 auto; min-height: 44px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-pill); font-size: 11px; padding: 10px 13px; }
.tab.active { background: var(--lime); color: var(--on-lime); border-color: var(--lime); font-weight: 600; }
.icon-button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 50%; flex-shrink: 0; }
.icon-button svg { width: 18px; height: 18px; }
.icon-button:disabled { color: var(--text-tertiary); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 50px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; padding: 13px 20px; }
.button svg { width: 18px; height: 18px; }
.primary { background: var(--lime); color: var(--on-lime); }
.secondary { background: var(--surface-raised); color: var(--text-primary); border: 1px solid var(--border-strong); }
.button:disabled { background: var(--surface-raised); color: var(--text-secondary); border: 1px solid var(--border-strong); }
.empty { padding: 32px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); text-align: center; color: var(--text-secondary); }
.empty > svg { width: 32px; height: 32px; color: var(--lime); margin-bottom: 17px; }
.empty h2, .empty h1 { font-size: 21px; color: var(--text-primary); margin-bottom: 10px; }
.empty p { font-size: 12px; }
.empty .button { margin-top: 22px; }
.error-state { margin-top: 32px; }
.error-state > svg { color: var(--destructive); }
.back { display: inline-flex; align-items: center; min-height: 44px; margin: 14px 0 20px; color: var(--text-secondary); font-size: 12px; }
.tool-cover { position: relative; height: 260px; border-radius: var(--radius-lg); overflow: hidden; margin: 24px 0; background: var(--surface); }
.tool-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-label { display: inline-flex; align-items: center; gap: 6px; position: absolute; bottom: 14px; left: 14px; border: 1px solid #ffffff22; background: #10150de8; padding: 8px 10px; border-radius: 9px; font-size: 9px; letter-spacing: 1px; }
.cover-label svg { width: 14px; height: 14px; color: var(--lime); }
.tool-description { color: var(--text-secondary); font-size: 13px; margin: 22px 0; }
.steps { padding: 6px 18px; margin-bottom: 24px; }
.step { display: flex; align-items: center; gap: 13px; padding: 14px 0; font-size: 12px; }
.step + .step { border-top: 1px solid var(--border); }
.step b { color: var(--lime); font-size: 10px; font-weight: 500; }
.hint { font-size: 11px; text-align: center; margin: 12px 0; color: var(--text-secondary); }
.low-balance { font-size: 12px; color: var(--destructive); margin: 16px 0 0; }
.profile-head { display: flex; align-items: center; gap: 13px; margin: 28px 0 24px; }
.profile-head > div { min-width: 0; }
.avatar { width: 56px; height: 56px; flex-shrink: 0; display: grid; place-items: center; font-size: 23px; background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: 50%; color: var(--lime); }
.profile-head h1 { font-size: 25px; overflow-wrap: anywhere; }
.profile-head p { color: var(--text-secondary); font-size: 11px; margin-top: 5px; overflow-wrap: anywhere; }
.profile-head .eyebrow { font-size: 8px; margin-bottom: 5px; }
.in-profile { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); padding: 28px 22px 12px; overflow: hidden; }
.in-profile .balance-number { font-size: clamp(44px, 16vw, 68px); }
.in-profile .button { margin-top: 24px; }
.tariff-card { display: flex; align-items: center; gap: 12px; padding: 17px; margin-top: 12px; }
.tariff-icon { color: var(--lime); }
.tariff-card small { display: block; color: var(--text-secondary); font-size: 10px; }
.tariff-card strong { display: block; font-size: 13px; margin-top: 4px; font-weight: 500; overflow-wrap: anywhere; }
.tag { margin-left: auto; color: var(--text-secondary); font-size: 8px; letter-spacing: 1px; }
.profile-menu { padding: 0 16px; margin-bottom: 22px; }
.profile-row { width: 100%; min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; background: none; border-bottom: 1px solid var(--border); }
.profile-row:last-child { border-bottom: none; }
.profile-row > span:first-child { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.profile-row svg { width: 18px; height: 18px; color: var(--text-secondary); }
.profile-row > svg { width: 15px; }
.profile-row small { font-size: 10px; color: var(--text-secondary); white-space: nowrap; }
.profile-row:disabled > span { color: var(--text-secondary); }
.signature { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-secondary); font-size: 10px; letter-spacing: 1px; margin-top: 32px; }
.signature span { font-size: 7px; color: var(--text-tertiary); }
.bottom-nav { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 10; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: #10130ff7; border-top: 1px solid var(--border-strong); padding: 10px calc(10px + var(--safe-right)) calc(13px + var(--safe-bottom)) calc(10px + var(--safe-left)); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 47px; font-size: 9px; font-weight: 500; color: var(--text-secondary); }
.bottom-nav svg { width: 21px; height: 21px; }
.bottom-nav a.active { color: var(--lime); }
.bottom-nav a.active svg { stroke-width: 2; }
dialog { background: var(--background); color: var(--text-primary); border: 1px solid var(--border-strong); padding: 22px; }
dialog::backdrop { background: #000b; }
.viewer { width: 100%; max-width: 640px; height: 100dvh; max-height: 100dvh; margin: auto; padding: calc(16px + var(--safe-top)) calc(20px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(20px + var(--safe-left)); border-radius: 0; overscroll-behavior: contain; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.viewer-bar .eyebrow { margin: 0; }
.dialog-close { font-size: 27px; line-height: 1; }
.viewer-stage { min-height: 35dvh; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.viewer-stage img, .viewer-stage video { width: 100%; max-height: 60dvh; object-fit: contain; border-radius: var(--radius-md); }
.viewer-stage audio { width: 100%; }
.viewer-placeholder, .audio-art { min-height: 35dvh; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px; background: radial-gradient(ellipse at top, #24301c, var(--surface)); border-radius: var(--radius-lg); color: var(--text-secondary); }
.viewer-placeholder svg, .audio-art svg { width: 48px; height: 48px; color: var(--lime); stroke-width: 1; }
.viewer-placeholder p { font-size: 13px; }
.viewer-info { margin-top: 28px; }
.viewer-info h2 { line-height: 1.4; overflow-wrap: anywhere; }
.viewer-info > p { color: var(--text-secondary); font-size: 12px; margin: 12px 0 22px; }
.sheet { width: calc(100% - 20px); max-width: 460px; border-radius: 26px 26px 0 0; margin: auto auto 0; padding-bottom: calc(25px + var(--safe-bottom)); }
.sheet .section-head { margin: 0 0 12px; }
.sheet .muted { font-size: 12px; }
.switch { width: 38px; height: 23px; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface-raised); padding: 3px; }
.switch::before { content: ""; display: block; width: 15px; height: 15px; border-radius: 50%; background: var(--text-secondary); transition: transform var(--duration-nav); }
[aria-pressed="true"] .switch { background: var(--lime); }
[aria-pressed="true"] .switch::before { transform: translateX(14px); background: var(--on-lime); }
#toast { position: fixed; z-index: 30; bottom: calc(92px + var(--safe-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(90%, 420px); padding: 14px 18px; background: var(--text-primary); color: var(--background); border-radius: 15px; box-shadow: var(--shadow-float); font-size: 12px; line-height: 1.5; }
#toast.success { background: var(--lime); animation: toast-success var(--duration-enter) var(--ease); }
.skeleton-card { overflow: hidden; padding-bottom: 10px; }
.skeleton { position: relative; overflow: hidden; background: var(--surface-raised); }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #ffffff07, transparent); transform: translateX(-100%); animation: shimmer 1.5s linear 5; }
.skeleton-media { aspect-ratio: 1; }
.skeleton-line { height: 10px; margin: 14px 12px 0; border-radius: 5px; }
.skeleton-line.short { width: 45%; margin-top: 8px; }
.bootstrap { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--background); padding: calc(30px + var(--safe-top)) 24px calc(30px + var(--safe-bottom)); pointer-events: none; }
.bootstrap-mark { font-size: 68px; animation: mark-enter 600ms var(--ease) both; }
.bootstrap strong { margin-top: 22px; font-weight: 500; font-size: 30px; letter-spacing: -1.4px; }
.bootstrap p { margin-top: 14px; font-size: 11px; color: var(--text-secondary); text-align: center; }
.bootstrap-track { width: 90px; height: 2px; margin-top: 30px; background: var(--surface-raised); overflow: hidden; border-radius: 9px; }
.bootstrap-track::after { content: ""; display: block; width: 40%; height: 100%; background: var(--lime); animation: loading 1.2s var(--ease) 10; }
.bootstrap.leaving { animation: fade-out 180ms ease-out forwards; }
@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes mark-enter { from { transform: rotate(-45deg) scale(.85); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes fade-out { to { opacity: 0; visibility: hidden; } }
@keyframes toast-success { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@media (hover: hover) { a.card:hover, button.card:hover, .quick-actions a:hover { border-color: #d6ff623b; background-color: var(--surface-hover); } }
@media (min-width: 600px) { body { background: #080a07; } .app { background: var(--background); border-inline: 1px solid var(--border); } .bottom-nav { border-inline: 1px solid var(--border); } }
@media (max-width: 360px) { .app { padding-inline: calc(16px + var(--safe-left)) calc(16px + var(--safe-right)); } .tool-card { padding: 12px; } .tool-icon { width: 30px; height: 30px; } .tool-card h3 { font-size: 14px; } .tool-badge { font-size: 7px; letter-spacing: .1px; } .quick-actions { gap: 8px; } .quick-actions a, .quick-actions button { min-height: 77px; } .section-head h2 { font-size: 18px; } .section-head a { font-size: 10px; } .tab { padding-inline: 10px; } .waveform { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .bootstrap.leaving { display: none; } }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.reduce-motion .bootstrap.leaving { display: none; }



/* NOIR: compact photographic layout matched to the supplied reference. */
.app { max-width: 430px; padding-inline: calc(14px + var(--safe-left)) calc(14px + var(--safe-right)); padding-bottom: calc(88px + var(--safe-bottom)); }
.topbar { position: relative; height: 48px; justify-content: center; }
.brand { font-size: 13px; font-weight: 600; letter-spacing: 0; }
.header-home { position: absolute; left: 0; top: 2px; width: 36px; height: 44px; display: grid; place-items: center; font-size: 24px; color: var(--text-secondary); }
.header-actions { position: absolute; right: -6px; top: 2px; flex-direction: row-reverse; gap: 0; }
.header-menu { width: 36px; height: 44px; padding: 0; background: transparent; font-size: 25px; font-weight: 700; line-height: 1; letter-spacing: 1px; }
.header-actions .icon-button { width: 36px; border: 0; background: transparent; }
#account { display: none; }
.notice { font-size: 9px; padding: 0 0 5px; border: 0; border-radius: 0; background: transparent; color: var(--text-secondary); letter-spacing: .25px; }
.notice.error { padding: 9px; border-radius: 8px; background: var(--surface); margin-bottom: 10px; }
h1 { font-size: 25px; line-height: 1.15; font-weight: 600; letter-spacing: -.7px; }
h2 { font-size: 15px; letter-spacing: -.2px; }
h3 { font-size: 13px; letter-spacing: 0; }
.home-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin: 7px 0 14px; }
.home-heading h1 { font-size: clamp(20px, 6vw, 25px); letter-spacing: -.65px; white-space: nowrap; }
.home-heading p { color: var(--text-secondary); font-size: 11px; margin-top: 7px; }
.balance-pill { display: flex; align-items: center; gap: 5px; flex-shrink: 0; min-height: 36px; margin-top: 1px; padding: 7px 8px; border: 1px solid var(--border-strong); background: linear-gradient(120deg,#24291b,#191c22); border-radius: 12px; color: var(--lime); }
.balance-pill svg { width: 15px; height: 15px; }
.balance-pill strong { font-size: 13px; font-weight: 600; white-space: nowrap; }
.balance-pill > span { font-size: 9px; white-space: nowrap; }
.photo-banner { display: block; position: relative; isolation: isolate; aspect-ratio: 1.83; min-height: 182px; max-height: 228px; border-radius: 12px; overflow: hidden; background: var(--surface); }
.photo-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 66% 42%; z-index: -2; }
.photo-banner::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#080a0dcc, #080a0d30 53%,transparent 75%); }
.banner-copy { display: flex; flex-direction: column; align-items: flex-start; padding: 22px 17px 15px; gap: 9px; color: white; }
.banner-copy > strong { font-size: clamp(18px,5.2vw,22px); line-height: 1.1; letter-spacing: .1px; font-weight: 700; }
.banner-copy > span:not(.banner-cta) { font-size: 12px; line-height: 1.3; color: #f0f0f1; }
.banner-cta { display: inline-flex; align-items: center; gap: 10px; background: var(--lime); color: #171b0e; padding: 9px 13px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; min-height: 34px; }
.banner-cta svg { width: 15px; height: 15px; }
.tool-grid { gap: 8px; }
.home-tools { margin-top: 10px; }
.tool-card { flex-direction: row; align-items: center; gap: 13px; padding: 12px 14px; min-height: 70px; border-color: #ffffff04; background: linear-gradient(125deg,#202329,#1d2026); }
.tool-icon { width: 27px; height: 29px; border: 0; background: transparent; border-radius: 0; flex-shrink: 0; }
.tool-icon svg { width: 23px; height: 23px; color: #e2e3e7; }
.tool-card-copy { margin: 0; padding: 0; min-width: 0; }
.tool-card-copy h3 { font-size: 12px; font-weight: 600; }
.tool-card-copy p { margin-top: 4px; font-size: 10px; line-height: 1.25; max-width: 110px; color: #acafb6; }
.unavailable { border: 1px dashed #ffffff17; background: var(--surface); }
.unavailable-label { position: absolute; top: 4px; right: 6px; font-size: 7px; color: var(--text-secondary); }
.autopost-card { margin-top: 8px; }
.autopost-card .tool-card { min-height: 59px; padding-block: 10px; }
.autopost-card .tool-card-copy p { max-width: none; }
.autopost-card .tool-card::after { content: '›'; color: var(--text-secondary); font-size: 24px; margin-left: auto; }
.section-head { margin: 12px 0 8px; min-height: 24px; }
.section-head a { min-height: 30px; font-size: 11px; color: #d1d3d8; }
.section-head a svg { width: 13px; height: 13px; }
.recent-row { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.recent-item { position: relative; padding: 0; aspect-ratio: 1.15; border-radius: 7px; overflow: hidden; background: var(--surface); }
.recent-item img { width: 100%; height: 100%; object-fit: cover; }
.portrait-thumbnail { object-position: 78% 40%; }
.active-strip { margin-top: 10px; display: flex; align-items: center; gap: 8px; padding: 10px; background: var(--surface); border-radius: 8px; font-size: 11px; }
.active-strip svg { width: 16px; height: 16px; }
.active-strip svg:last-child { margin-left: auto; }
.page-heading { margin: 8px 0 16px; }
.page-heading .eyebrow { display: none; }
.page-heading p { margin-top: 5px; font-size: 12px; line-height: 1.4; }
.page-heading .accent { color: inherit; }
.search { border-radius: 9px; margin-bottom: 18px; }
.search input { padding-block: 13px; }
#screen[data-route="create"] .tool-card { min-height: 88px; }
#screen[data-route="create"] .tool-card-copy p { font-size: 11px; }
#screen[data-route="create"] .tool-card-copy h3 { font-size: 13px; }
#screen[data-route="create"] .meta { display: none; }
.works-heading { display: flex; justify-content: space-between; align-items: center; }
.works-heading .icon-button { width: 36px; height: 36px; background: transparent; border-color: transparent; color: var(--text-secondary); }
.tabs { gap: 9px; margin-bottom: 14px; padding: 0; }
.tab { flex: 0 1 auto; padding: 8px 18px; min-height: 34px; background: #1d2026; border: 0; font-size: 11px; }
.works-grid { gap: 10px; }
.media-card { position: relative; border-radius: 9px; min-height: 0; background: var(--surface); }
.media-art { aspect-ratio: 1.36; width: 100%; background: var(--surface); overflow: hidden; }
.media-art img { object-fit: cover; }
.media-card .media-copy { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.status { bottom: 0; left: 0; right: 0; padding: 15px 8px 7px; background: linear-gradient(transparent,#07080ae6); border-radius: 0; font-size: 9px; }
.status > span { width: 6px; height: 6px; }
.status.done > span { background: #83ea5a; }
.play-symbol { display: grid; place-items: center; position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%); width: 39px; height: 39px; background: #11131899; color: white; border: 1px solid #fff9; border-radius: 50%; font-size: 29px; padding-left: 3px; }
.job-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1.36; min-height: 0; margin: 0; padding: 12px 8px; background: #1d2026; border: 1px solid #31353d; border-radius: 9px; text-align: center; }
.job-card > strong { font-size: 11px; font-weight: 500; margin-top: 8px; }
.job-card > small { font-size: 9px; color: var(--text-secondary); margin-top: 5px; }
.job-loader { display: block; width: 29px; height: 29px; border: 1px solid #d4d6db; border-right-color: #d4d6db22; border-bottom-color: #d4d6db55; border-radius: 50%; }
.job-card .progress-label { display: none; }
.job-card progress { width: 48px; height: 2px; margin-top: 8px; opacity: .6; }
.job-kind { position: absolute; left: 8px; bottom: 6px; }
.job-kind svg { width: 15px; height: 15px; }
progress:indeterminate, progress:indeterminate::-webkit-progress-bar { background: repeating-linear-gradient(90deg,#92969e 0 5px,var(--surface-hover) 5px 10px); }
.music-card { display: flex; align-items: center; gap: 9px; padding: 13px 10px 25px; aspect-ratio: 1.36; }
.music-card .media-art { width: 45%; aspect-ratio: .8; border-radius: 5px; background: radial-gradient(ellipse at 50% 10%,#6e697e,#292733 70%); overflow: visible; }
.music-card .status { position: absolute; bottom: -20px; left: 0; width: max-content; padding: 0; background: none; }
.music-card .media-copy { position: static; clip-path: none; width: 55%; height: auto; padding: 0; overflow: hidden; }
.music-card .media-copy strong { font-size: 10px; font-weight: 500; white-space: normal; }
.music-card .media-copy small { font-size: 9px; }
.waveform { display: block; font-size: 10px; letter-spacing: 0; color: #b7bac2; margin-top: 10px; overflow: hidden; }
.studio-notice { color: var(--text-secondary); border-left: 2px solid #d6ff6266; padding: 4px 9px; font-size: 11px; margin: 0 0 17px; line-height: 1.4; }
.studio-preview { min-width: 0; border: 0; padding: 0; margin: 0; }
.field-label { display: block; font-size: 13px; font-weight: 500; margin: 16px 0 9px; }
.field-label:first-of-type { margin-top: 0; }
.reference-row { display: flex; gap: 10px; }
.reference-example, .add-reference { position: relative; width: 39%; aspect-ratio: 1.05; border-radius: 9px; overflow: hidden; }
.reference-example img { width: 100%; height: 100%; object-fit: cover; }
.reference-example > span { position: absolute; right: 5px; bottom: 5px; padding: 3px 5px; border-radius: 4px; background: #101114bb; font-size: 9px; }
.add-reference { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; width: 32%; background: transparent; border: 1px dashed #414651; font-size: 10px; line-height: 1.2; color: #b7bac2; }
.add-reference > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #d6ff62; color: #17200c; }
.add-reference svg { width: 17px; height: 17px; }
.prompt-wrap { position: relative; }
.prompt-wrap textarea { width: 100%; min-height: 80px; padding: 13px 12px 25px; resize: none; border: 1px solid #363a43; border-radius: 9px; background: #1d2026; color: var(--text-primary); font: inherit; font-size: 12px; line-height: 1.5; opacity: 1; -webkit-text-fill-color: #c2c5cc; }
.prompt-wrap > span { position: absolute; bottom: 10px; right: 12px; color: var(--text-secondary); font-size: 9px; }
.style-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.style-option { position: relative; border: 1px solid #363a43; border-radius: 9px; overflow: hidden; aspect-ratio: 1.12; }
.style-option img { width: 100%; height: 100%; object-fit: cover; }
.style-option:first-child img { object-position: 78%; }
.style-option > span { position: absolute; inset: auto 0 0; text-align: center; padding: 14px 4px 7px; background: linear-gradient(transparent,#0d0e11dc); font-size: 11px; color: white; }
.aspect-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid #363a43; border-radius: 9px; overflow: hidden; }
.aspect-options button { min-height: 34px; background: #1d2026; font-size: 11px; color: var(--text-secondary); }
.aspect-options button + button { border-left: 1px solid #363a43; }
.studio-submit { margin-top: 18px; padding: 12px 5px 5px; border-radius: 12px; background: #191b20; }
.studio-submit p { font-size: 11px; text-align: center; margin-bottom: 10px; }
.studio-submit p span { color: var(--lime); }
.studio-submit .button { min-height: 42px; font-size: 12px; }
.studio-submit + .hint { font-size: 10px; margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tool-cover { height: 220px; }
.studio-photo { width: 100%; height: 100%; object-fit: cover; }
.cover-label { background: #101114dd; }
.bottom-nav { max-width: 430px; background: #14161afc; padding-top: 8px; padding-bottom: calc(10px + var(--safe-bottom)); }
.bottom-nav a { font-size: 9px; gap: 5px; min-height: 45px; }
.bottom-nav svg { width: 22px; height: 22px; }
.balance-hero::before { background: none; }
.in-profile { margin-top: 18px; }
.profile-head { margin-top: 12px; }
.profile-menu { margin-top: 14px; }
.profile-row { min-height: 58px; }
.viewer-placeholder, .audio-art { background: var(--surface); }
.viewer-stage img { object-fit: contain; }
.bootstrap { background: #101114; }
@media (min-width:600px) { body { background: #181a1e; } .app { border-inline: 1px solid #ffffff0b; } }
@media (max-width:360px) {
  .app { padding-inline: calc(12px + var(--safe-left)) calc(12px + var(--safe-right)); }
  .home-heading { gap: 4px; }
  .home-heading h1 { font-size: 21px; }
  .home-heading p { font-size: 9px; }
  .balance-pill { gap: 4px; padding: 6px; }
  .balance-pill > span { font-size: 8px; }
  .balance-pill svg { width: 12px; }
  .balance-pill strong { font-size: 12px; }
  .tool-card { gap: 9px; padding: 11px; min-height: 66px; }
  .tool-card h3 { font-size: 12px; }
  .tool-icon { width: 24px; }
  .tool-card-copy p { font-size: 9px; }
  .banner-copy { padding: 18px 14px 14px; gap: 8px; }
  .banner-copy > strong { font-size: 19px; }
  .banner-copy > span:not(.banner-cta) { font-size: 11px; }
  .banner-cta { padding: 8px 11px; min-height: 32px; }
  .section-head h2 { font-size: 14px; }
  .job-card > strong { font-size: 10px; }
  .tab { padding-inline: 15px; }
}
.photo-banner { width: 100%; }
.media-art .portrait-thumbnail, .recent-item .portrait-thumbnail { transform: scale(1.55); transform-origin: 78% 38%; }

/* Native Mini App generation form controls reuse the NOIR palette. */
.generation-form { display: grid; gap: 10px; padding-bottom: 28px; }
.generation-form .field-label { margin-bottom: 0; }
.form-control { width: 100%; min-height: 48px; padding: 12px; border: 1px solid #363a43; border-radius: 9px; background: #1d2026; color: var(--text-primary); font: inherit; font-size: 14px; }
.form-control:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.generation-form textarea.form-control { min-height: 112px; resize: vertical; line-height: 1.5; }
.generation-form select.form-control { color-scheme: dark; }
.generation-form .check-row { justify-content: flex-start; margin: 4px 0; }
.generation-form input[type="checkbox"] { accent-color: var(--lime); width: 18px; height: 18px; vertical-align: middle; margin-right: 8px; }
.account-panel { margin: 18px 0 24px; }
.account-panel h2 { font-size: 17px; margin: 0 0 12px; }
.account-panel .tariff-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.account-panel .tariff-card > div { grid-column: 1 / -1; }
.account-panel .tariff-card .button { min-width: 0; padding-inline: 8px; }
.account-panel .profile-row { padding-inline: 14px; }
.account-panel .hint { overflow-wrap: anywhere; }

.chat-thread { display: grid; gap: 12px; margin: 18px 0; }
.chat-message { max-width: 100%; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-message p { margin: 6px 0 0; }
.chat-message small { opacity: .65; }
.chat-message.from-user { margin-left: 12%; }
.chat-message.from-ai { margin-right: 8%; }

.search-result { margin-top: 18px; overflow-wrap: anywhere; white-space: pre-wrap; }
.search-result ol { padding-left: 22px; }
.search-result a { color: inherit; text-decoration: underline; }

.support-ticket { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0; text-decoration: none; color: inherit; }
.support-ticket small { color: var(--text-secondary); text-align: right; }
.support-attachment { width: 100%; max-height: 280px; object-fit: contain; margin-top: 10px; border-radius: 10px; }
.support-header { margin: 14px 0; }


.continue-form { display: grid; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line, rgba(255,255,255,.14)); }
.continue-form label { font-weight: 700; }
.continue-form textarea { width: 100%; min-height: 100px; resize: vertical; border: 1px solid rgba(255,255,255,.2); border-radius: 14px; background: rgba(255,255,255,.06); color: inherit; padding: 12px; font: inherit; }
.continue-form textarea:focus-visible { outline: 2px solid #8e83ff; outline-offset: 2px; }
.continue-form .hint { margin: 0; }

/* Telegram avatar stays inside the profile and compact account circles. */
.avatar { overflow:hidden; }
.avatar img, .account img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.account { overflow:hidden; }
