@charset "UTF-8";

:root {
  color-scheme: dark;
  --bg: #0D0F14;
  --bg-deep: #090B0F;
  --surface: rgba(26, 29, 36, 0.84);
  --surface-solid: #1A1D24;
  --surface-raised: #20242D;
  --surface-soft: #12151B;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.11);
  --text: #F7F7F5;
  --muted: #949AA8;
  --subtle: #747B89;
  --emerald: #F5A623;
  --emerald-soft: #FFD27A;
  --blue: #FFC35C;
  --pink: #FFB844;
  --gold: #F5A623;
  --danger: #FF8A65;
  --gradient-gold: linear-gradient(135deg, #D98400 0%, #F5A623 52%, #FFD27A 100%);
  --tg-accent: #F5A623;
  --tg-surface: #1A1D24;
  --tg-divider: rgba(255, 255, 255, 0.07);
  --tg-text-primary: #F7F7F5;
  --tg-text-secondary: #949AA8;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.24);
  --max: 1180px;
  --header-h: 74px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% -8%, rgba(245, 166, 35, 0.07), transparent 28%),
    radial-gradient(circle at 88% 4%, rgba(217, 132, 0, 0.08), transparent 25%),
    var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(52, 211, 153, .25); color: white; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  padding: 9px 14px;
  border-radius: 10px;
  background: white;
  color: #071019;
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 17, .72);
  backdrop-filter: blur(18px) saturate(140%);
  transition: border-color .25s ease, background .25s ease;
}
.site-header.scrolled { border-color: transparent; background: rgba(7, 10, 17, .9); }
.header-inner {
  width: min(var(--max), calc(100% - 40px));
  height: var(--header-h);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 760; letter-spacing: -.025em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.brand-name { font-size: 18px; }
.desktop-nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.desktop-nav a, .footer-links a, .mobile-nav a { color: var(--muted); font-size: 14px; font-weight: 560; transition: color .2s ease; }
.desktop-nav a:hover, .footer-links a:hover, .mobile-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-button { display: none; width: 42px; height: 42px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: transparent; cursor: pointer; }
.menu-button span { display: block; height: 1.5px; margin: 4px 0; border-radius: 2px; background: var(--text); }
.mobile-nav { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; padding: 8px 0 20px; }
.mobile-nav a { display: block; padding: 10px 4px; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s ease, background .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:focus-visible, .field input:focus-visible, .menu-button:focus-visible, .feature-card:focus-visible { outline: 3px solid rgba(245, 166, 35, .35); outline-offset: 2px; }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-sm { min-height: 40px; padding: 0 15px; }
.button-lg { min-height: 52px; padding: 0 22px; border-radius: 14px; }
.button-block { width: 100%; }
.button-primary {
  color: #201200;
  background: var(--gradient-gold);
  box-shadow: 0 12px 32px rgba(245, 166, 35, .22), inset 0 1px rgba(255,255,255,.35);
}
.button-primary:hover { box-shadow: 0 16px 38px rgba(245, 166, 35, .32), inset 0 1px rgba(255,255,255,.35); }
.button-blue { color: #201200; background: linear-gradient(135deg, #F5A623 0%, #FFCA70 100%); box-shadow: 0 12px 30px rgba(245,166,35,.22); }
.button-gold { color: #201200; background: linear-gradient(135deg, #D98400 0%, #F5A623 52%, #FFD27A 100%); box-shadow: 0 12px 30px rgba(245,191,36,.2); }
.button-pink { color: #201200; background: linear-gradient(135deg, #E89112 0%, #FFC35C 100%); box-shadow: 0 12px 30px rgba(255,195,92,.2); }
.button-secondary { border-color: var(--line-strong); background: rgba(255,255,255,.035); }
.button-secondary:hover, .button-ghost:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.065); }
.button-ghost { color: var(--muted); }
.button svg { width: 17px; height: 17px; }
.button-loader { width: 15px; height: 15px; border: 2px solid rgba(0,0,0,.25); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }

main { flex: 1; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.section { position: relative; padding: 108px 0; }
.section-tight { padding: 80px 0; }
.section-label, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--emerald-soft);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.section-heading { max-width: 680px; margin-bottom: 44px; }
.section-heading h2 { margin: 14px 0 14px; font-size: clamp(34px, 5vw, 58px); line-height: 1.04; letter-spacing: -.052em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 18px; }
.section-heading.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-heading.center .section-label { justify-content: center; }

.hero { position: relative; overflow: hidden; padding: 88px 0 92px; }
.hero::before {
  content: "";
  position: absolute;
  width: 760px;
  height: 760px;
  right: -300px;
  top: -250px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, rgba(245,166,35,.18), rgba(245,166,35,.18), rgba(255,184,68,.16), transparent 70%);
  filter: blur(28px);
  opacity: .72;
  animation: breathe 10s ease-in-out infinite alternate;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 76px; }
.hero-copy h1 { max-width: 760px; margin: 18px 0 22px; font-size: clamp(52px, 7.4vw, 88px); line-height: .98; letter-spacing: -.065em; }
.hero-copy h1 span { color: transparent; background: linear-gradient(100deg, #FFD27A 5%, #F5A623 52%, #FFC35C 96%); background-clip: text; -webkit-background-clip: text; }
.hero-copy > p { max-width: 620px; margin: 0; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { display: flex; align-items: center; gap: 12px; margin-top: 24px; color: var(--subtle); font-size: 13px; }
.avatar-stack { display: flex; }
.avatar-stack span { width: 27px; height: 27px; display: grid; place-items: center; margin-left: -7px; border: 2px solid var(--bg); border-radius: 50%; font-size: 10px; font-weight: 800; color: #071019; }
.avatar-stack span:first-child { margin-left: 0; background: var(--emerald); }
.avatar-stack span:nth-child(2) { background: var(--blue); }
.avatar-stack span:nth-child(3) { background: var(--pink); }

.studio-preview {
  position: relative;
  min-height: 510px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(22,29,46,.96), rgba(9,13,22,.94));
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.08);
  overflow: hidden;
  transform: perspective(1100px) rotateY(-4deg) rotateX(2deg);
}
.studio-preview::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 72% 8%, rgba(245,166,35,.18), transparent 32%), radial-gradient(circle at 5% 88%, rgba(245,166,35,.12), transparent 30%); pointer-events: none; }
.preview-bar { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.preview-dots { display: flex; gap: 6px; }
.preview-dots i { width: 7px; height: 7px; border-radius: 50%; background: #3b4458; }
.preview-live { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 650; }
.preview-live i, .system-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 14px var(--emerald); }
.preview-body { position: relative; z-index: 1; padding: 26px; }
.preview-kicker { color: var(--subtle); font-size: 11px; text-transform: uppercase; letter-spacing: .13em; }
.preview-body h3 { margin: 8px 0 22px; font-size: 25px; letter-spacing: -.04em; }
.command-box { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(4,7,13,.62); color: #F7F7F5; font-size: 13px; line-height: 1.55; }
.command-box span { color: var(--emerald-soft); }
.preview-progress { height: 5px; margin: 18px 0 22px; border-radius: 9px; background: rgba(255,255,255,.07); overflow: hidden; }
.preview-progress i { display: block; width: 74%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--emerald), var(--blue), var(--pink)); animation: progress-glow 3.5s ease-in-out infinite alternate; }
.preview-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-output { min-height: 118px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.035); }
.mini-output strong { display: block; margin: 12px 0 4px; font-size: 13px; }
.mini-output small { color: var(--subtle); font-size: 11px; }
.output-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; }
.output-icon svg { width: 16px; height: 16px; }
.output-green { color: var(--emerald-soft); background: rgba(245,166,35,.12); }
.output-blue { color: #FFC35C; background: rgba(245,166,35,.12); }
.floating-pill { position: absolute; z-index: 3; display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; background: rgba(13,18,29,.9); box-shadow: var(--shadow-soft); color: #F7F7F5; font-size: 11px; font-weight: 700; backdrop-filter: blur(12px); }
.floating-pill svg { width: 14px; height: 14px; }
.pill-top { top: 88px; right: -28px; color: #fcd34d; }
.pill-bottom { bottom: 42px; left: -32px; color: var(--emerald-soft); }

.trust-strip { padding: 18px 0; background: rgba(255,255,255,.012); }
.trust-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.trust-inner > span { color: var(--subtle); font-size: 12px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.trust-list { display: flex; flex-wrap: wrap; gap: 28px; color: #8e99ae; font-size: 13px; font-weight: 650; }
.trust-list span { display: flex; align-items: center; gap: 8px; }
.trust-list svg { width: 15px; height: 15px; color: var(--emerald); }

.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(245px, auto); gap: 16px; }
.bento-card { position: relative; overflow: hidden; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(20,26,42,.9), rgba(11,15,25,.85)); transition: transform .3s var(--ease), border-color .3s ease; }
.bento-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.24); }
.bento-card h3 { margin: 20px 0 8px; font-size: 21px; letter-spacing: -.03em; }
.bento-card p { max-width: 440px; margin: 0; color: var(--muted); font-size: 14px; }
.bento-card.large { grid-column: span 7; }
.bento-card.medium { grid-column: span 5; }
.bento-card.third { grid-column: span 4; }
.capability-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; }
.capability-icon svg { width: 20px; height: 20px; }
.accent-emerald { color: var(--emerald-soft); background: rgba(245,166,35,.11); }
.accent-blue { color: #FFC35C; background: rgba(245,166,35,.11); }
.accent-pink { color: #FFC35C; background: rgba(255,184,68,.11); }
.accent-gold { color: #fcd34d; background: rgba(251,191,36,.11); }
.card-art { position: absolute; pointer-events: none; }
.story-lines { right: 24px; bottom: 28px; width: 44%; display: grid; gap: 8px; }
.story-lines i { height: 7px; border-radius: 8px; background: linear-gradient(90deg, rgba(245,166,35,.4), rgba(245,166,35,.05)); }
.story-lines i:nth-child(2) { width: 82%; }
.story-lines i:nth-child(3) { width: 64%; }
.visual-orb { width: 180px; height: 180px; right: -40px; bottom: -55px; border-radius: 46% 54% 60% 40%; background: conic-gradient(from 70deg, #2563eb, #ec4899, #22c55e, #2563eb); filter: blur(1px); opacity: .48; box-shadow: inset 0 0 35px rgba(255,255,255,.2); }
.sound-bars { right: 22px; bottom: 26px; display: flex; align-items: end; gap: 5px; height: 80px; }
.sound-bars i { width: 7px; border-radius: 9px; background: linear-gradient(to top, var(--pink), var(--blue)); animation: sound 1.8s ease-in-out infinite alternate; }
.sound-bars i:nth-child(1) { height: 30%; }
.sound-bars i:nth-child(2) { height: 66%; animation-delay: -.4s; }
.sound-bars i:nth-child(3) { height: 100%; animation-delay: -.8s; }
.sound-bars i:nth-child(4) { height: 54%; animation-delay: -.2s; }
.sound-bars i:nth-child(5) { height: 78%; animation-delay: -.6s; }

.course-section { padding-top: 84px; padding-bottom: 108px; }
.course-container { max-width: 980px; }
.course-card { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 24px; background: linear-gradient(145deg, rgba(32,36,45,.94), rgba(13,15,20,.98)); box-shadow: var(--shadow-soft); }
.course-banner { width: 100%; height: auto; aspect-ratio: 1328 / 975; object-fit: cover; background: var(--surface-soft); }
.course-copy { padding: clamp(24px, 4vw, 44px); }
.course-copy h2 { max-width: 780px; margin: 14px 0 12px; font-size: clamp(30px, 4.5vw, 52px); line-height: 1.06; letter-spacing: -.045em; }
.course-author { margin: 0; color: var(--emerald-soft); font-size: 15px; font-weight: 700; }
.course-note { max-width: 760px; margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.course-cta { margin-top: 26px; }

.cta-panel { position: relative; overflow: hidden; padding: 64px; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-xl); background: linear-gradient(135deg, rgba(18,28,38,.96), rgba(17,18,35,.96)); box-shadow: var(--shadow); }
.cta-panel::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -210px; border-radius: 50%; background: conic-gradient(var(--emerald), var(--blue), var(--pink), var(--emerald)); filter: blur(55px); opacity: .22; }
.cta-content { position: relative; max-width: 690px; }
.cta-panel h2 { margin: 14px 0 16px; font-size: clamp(38px, 5.5vw, 64px); line-height: 1.03; letter-spacing: -.055em; }
.cta-panel p { color: var(--muted); font-size: 18px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.auth-page { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 64px 20px 96px; }
.auth-layout { width: min(1040px, 100%); display: grid; grid-template-columns: .92fr 1.08fr; border: 1px solid var(--line); border-radius: 28px; background: rgba(11,15,25,.86); box-shadow: var(--shadow); overflow: hidden; }
.auth-aside { position: relative; overflow: hidden; padding: 52px; background: linear-gradient(145deg, #111c25, #111426 55%, #171226); }
.auth-aside::before { content: ""; position: absolute; width: 380px; height: 380px; right: -160px; bottom: -180px; border-radius: 50%; background: conic-gradient(var(--emerald), var(--blue), var(--pink), var(--emerald)); filter: blur(42px); opacity: .26; }
.auth-aside-content { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; }
.auth-aside .eyebrow { margin-bottom: 28px; }
.auth-aside h1 { margin: 0 0 18px; font-size: clamp(36px, 4.5vw, 54px); line-height: 1.02; letter-spacing: -.055em; }
.auth-aside p { max-width: 400px; margin: 0; color: var(--muted); }
.auth-benefits { display: grid; gap: 13px; margin: auto 0 0; padding-top: 48px; }
.auth-benefit { display: flex; align-items: center; gap: 12px; color: #d5dbea; font-size: 13px; }
.auth-benefit i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: var(--emerald-soft); background: rgba(245,166,35,.1); }
.auth-benefit svg { width: 13px; height: 13px; }
.auth-card { padding: 52px; background: rgba(9,13,22,.8); }
.auth-card-head { margin-bottom: 28px; }
.auth-card-head h2 { margin: 0 0 7px; font-size: 28px; letter-spacing: -.04em; }
.auth-card-head p { margin: 0; color: var(--muted); font-size: 14px; }
.auth-card-head a { color: var(--emerald-soft); font-weight: 700; }
.form-stack { display: grid; gap: 17px; }
.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { color: #dce2ee; font-size: 13px; font-weight: 680; }
.input-wrap { position: relative; }
.input-wrap svg { position: absolute; left: 15px; top: 50%; width: 17px; height: 17px; color: var(--subtle); transform: translateY(-50%); pointer-events: none; }
.field input {
  width: 100%; height: 50px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 13px; outline: none; background: rgba(4,7,13,.6); color: var(--text); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field .input-wrap input { padding-left: 44px; }
.field input::placeholder { color: #596379; }
.field input:hover { border-color: rgba(255,255,255,.24); }
.field input:focus { border-color: rgba(245,166,35,.72); background: rgba(7,11,19,.88); box-shadow: 0 0 0 4px rgba(245,166,35,.1); }
.field-help { color: var(--subtle); font-size: 12px; }
.password-row { display: flex; justify-content: space-between; gap: 12px; }
.password-row a, .text-link { color: var(--emerald-soft); font-size: 12px; font-weight: 700; }
.form-divider { display: flex; align-items: center; gap: 13px; margin: 4px 0; color: var(--subtle); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.form-divider::before, .form-divider::after { display: none; }
.form-note { margin: 0; color: var(--subtle); font-size: 12px; text-align: center; }
.form-note a { color: var(--text); font-weight: 700; }
.form-error { display: flex; align-items: center; gap: 9px; padding: 12px 13px; border: 1px solid rgba(251,113,133,.28); border-radius: 12px; background: rgba(251,113,133,.08); color: #fecdd3; font-size: 12px; }
.form-error svg { width: 18px; height: 18px; flex-shrink: 0; }
.form-success { border-color: rgba(245,166,35,.28); background: rgba(245,166,35,.08); color: #a7f3d0; }
.otp-input { height: 64px !important; padding-left: 15px !important; text-align: center; font-size: 28px; font-weight: 760; letter-spacing: .35em; font-variant-numeric: tabular-nums; }
.otp-meta { display: flex; align-items: center; justify-content: space-between; color: var(--subtle); font-size: 12px; }
.otp-meta button { padding: 0; border: 0; background: transparent; color: var(--emerald-soft); font-weight: 700; cursor: pointer; }
.otp-meta button:disabled { color: var(--subtle); cursor: default; }
.claim-gate { margin-bottom: 18px; padding: 13px 14px; border: 1px solid rgba(251,191,36,.22); border-radius: 12px; background: rgba(251,191,36,.06); color: #fde68a; font-size: 12px; }

.dashboard-page { min-height: calc(100vh - var(--header-h)); padding: 36px 0 88px; }
.dashboard-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; }
.dashboard-sidebar { position: sticky; top: 102px; height: fit-content; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(13,18,29,.72); }
.sidebar-user { padding: 7px 8px 19px; }
.sidebar-avatar { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 11px; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; background: linear-gradient(135deg, rgba(245,166,35,.2), rgba(245,166,35,.18)); font-weight: 800; }
.sidebar-user strong, .sidebar-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user span { color: var(--subtle); font-size: 11px; }
.sidebar-nav { display: grid; gap: 5px; padding-top: 15px; }
.sidebar-nav button { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 11px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; text-align: left; cursor: pointer; }
.sidebar-nav button.active { color: var(--text); background: rgba(255,255,255,.07); }
.sidebar-nav svg { width: 17px; height: 17px; }
.dashboard-main { min-width: 0; }
.dashboard-top { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.dashboard-top h1 { margin: 0 0 4px; font-size: clamp(30px, 5vw, 44px); line-height: 1; letter-spacing: -.05em; }
.dashboard-top p { margin: 0; color: var(--muted); font-size: 14px; }
.balance-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 24px; padding: 30px; border: 1px solid rgba(255,255,255,.15); border-radius: 22px; background: linear-gradient(135deg, rgba(17,32,34,.96), rgba(16,21,40,.96)); box-shadow: var(--shadow-soft); }
.balance-card::after { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -140px; border-radius: 50%; background: linear-gradient(135deg, var(--emerald), var(--blue)); filter: blur(46px); opacity: .2; }
.balance-copy { position: relative; z-index: 1; }
.balance-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .11em; }
.balance-value { margin: 7px 0 4px; font-size: clamp(42px, 7vw, 68px); line-height: 1; font-weight: 760; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.balance-value small { margin-left: 8px; color: var(--emerald-soft); font-size: 15px; font-weight: 700; letter-spacing: 0; }
.balance-sub { color: var(--subtle); font-size: 12px; }
.balance-actions { position: relative; z-index: 1; display: flex; align-items: center; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0 34px; }
.metric-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); }
.metric-card span { color: var(--subtle); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.metric-card strong { display: block; margin-top: 5px; font-size: 22px; letter-spacing: -.03em; }
.dashboard-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dashboard-section-head h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.dashboard-section-head p { margin: 3px 0 0; color: var(--subtle); font-size: 12px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-card { position: relative; min-height: 188px; display: flex; flex-direction: column; align-items: flex-start; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(20,26,42,.82), rgba(10,14,23,.82)); text-align: left; cursor: pointer; transition: transform .25s var(--ease), border-color .25s ease, background .25s ease; }
.feature-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.23); background: linear-gradient(145deg, rgba(24,31,50,.92), rgba(12,17,28,.9)); }
.feature-card .capability-icon { width: 38px; height: 38px; }
.feature-card h3 { margin: 22px 0 5px; font-size: 16px; letter-spacing: -.02em; }
.feature-card p { margin: 0; color: var(--subtle); font-size: 12px; line-height: 1.5; }
.feature-status { position: absolute; top: 16px; right: 16px; padding: 4px 8px; border-radius: 999px; background: rgba(245,166,35,.09); color: var(--emerald-soft); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.feature-status.soon { background: rgba(251,191,36,.08); color: #fcd34d; }
.dashboard-empty { padding: 44px 24px; border: 1px dashed var(--line-strong); border-radius: 18px; text-align: center; color: var(--muted); }
.dashboard-empty svg { width: 28px; margin: 0 auto 12px; color: var(--subtle); }

.site-footer { padding: 64px 0 24px; background: transparent; }
.footer-grid { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: 1.6fr .6fr .6fr; gap: 60px; }
.footer-summary { max-width: 430px; margin: 18px 0 0; color: var(--subtle); font-size: 14px; }
.footer-links { display: grid; align-content: start; gap: 10px; }
.footer-links h2 { margin: 0 0 5px; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.footer-bottom { width: min(var(--max), calc(100% - 40px)); margin: 48px auto 0; padding-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--subtle); font-size: 11px; }
.system-status { display: flex; align-items: center; gap: 8px; }
body.route-auth .site-footer, body.route-dashboard .site-footer { display: none; }

.loading-screen { min-height: calc(100vh - var(--header-h)); display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--subtle); font-size: 13px; }
.loading-orbit { width: 32px; height: 32px; border: 2px solid rgba(255,255,255,.1); border-top-color: var(--emerald); border-right-color: var(--blue); border-radius: 50%; animation: spin .9s linear infinite; }
.toast-region { position: fixed; z-index: 300; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(360px, calc(100% - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(17,23,36,.96); box-shadow: var(--shadow-soft); color: #dce3ef; font-size: 13px; animation: toast-in .3s var(--ease); }
.toast.success { border-color: rgba(245,166,35,.28); }
.toast.error { border-color: rgba(251,113,133,.32); }
.toast svg { width: 17px; min-width: 17px; margin-top: 2px; }
.noscript { position: fixed; inset: auto 12px 12px; z-index: 500; padding: 14px; border-radius: 12px; background: #fee2e2; color: #7f1d1d; text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { to { transform: scale(1.1) translate(-24px, 18px); } }
@keyframes progress-glow { to { width: 94%; filter: brightness(1.25); } }
@keyframes sound { to { height: 28%; filter: hue-rotate(40deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

@media (max-width: 1040px) {
  .desktop-nav { display: none; }
  .menu-button { display: block; }
  .hero-grid { grid-template-columns: 1fr; gap: 58px; }
  .hero-copy { max-width: 760px; }
  .studio-preview { max-width: 680px; margin: 0 auto; transform: none; }
  .bento-card.large, .bento-card.medium { grid-column: span 6; }
  .bento-card.third { grid-column: span 4; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  :root { --header-h: 68px; }
  .header-inner { width: min(100% - 28px, var(--max)); }
  .header-actions .button-ghost { display: none; }
  .section { padding: 84px 0; }
  .hero { padding-top: 62px; }
  .trust-inner { align-items: flex-start; flex-direction: column; }
  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento-card.large, .bento-card.medium, .bento-card.third { grid-column: auto; min-height: 245px; }
  .cta-panel { padding: 44px 30px; }
  .auth-layout { grid-template-columns: 1fr; max-width: 620px; }
  .auth-aside { min-height: 320px; padding: 40px; }
  .auth-benefits { margin-top: 46px; }
  .auth-card { padding: 40px; }
  .dashboard-shell { grid-template-columns: 1fr; }
  .dashboard-sidebar { position: static; display: none; }
  .dashboard-top { align-items: flex-start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1.2fr .6fr .6fr; gap: 32px; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 28px, var(--max)); }
  .header-actions .button-sm { display: none; }
  .hero { padding-bottom: 70px; }
  .hero-copy h1 { font-size: clamp(46px, 14vw, 68px); }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
  .hero-note { align-items: flex-start; }
  .studio-preview { min-height: 460px; border-radius: 22px; }
  .preview-body { padding: 20px; }
  .preview-cards { grid-template-columns: 1fr; }
  .mini-output:nth-child(2) { display: none; }
  .pill-top { top: 72px; right: 12px; }
  .pill-bottom { bottom: 18px; left: 12px; }
  .trust-list { gap: 14px 22px; }
  .section-heading p { font-size: 16px; }
  .story-lines { width: 52%; }
  .cta-panel { padding: 38px 22px; border-radius: 22px; }
  .cta-actions { display: grid; }
  .auth-page { padding: 30px 14px 64px; align-items: start; }
  .auth-layout { border-radius: 20px; }
  .auth-aside { display: none; }
  .auth-card { padding: 30px 22px; }
  .field-row { grid-template-columns: 1fr; }
  .dashboard-page { padding-top: 24px; }
  .balance-card { grid-template-columns: 1fr; padding: 24px; }
  .balance-actions .button { width: 100%; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card:last-child { grid-column: span 2; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: span 2; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
}

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

/* Mini app feature grid (exact layout) */
.feature-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--tg-surface); border: 0.5px solid var(--tg-divider);
  border-radius: var(--tg-radius-card); padding: 18px 14px; gap: 10px;
  cursor: pointer; transition: border-color .2s ease, transform .2s ease;
  font-family: var(--font-stack); color: var(--tg-text-primary);
}
.feature-tile:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.feature-tile.construction { opacity: .6; border-color: color-mix(in srgb, var(--feature-accent) 55%, var(--tg-divider)); }
.feature-tile.construction:hover { opacity: .72; border-color: var(--feature-accent); }
.tile-emoji { font-size: 28px; line-height: 1; }
.tile-title { font-size: 13px; font-weight: 700; letter-spacing: -.01em; color: var(--tg-text-primary); }
.feature-tile.construction .tile-title { color: var(--feature-accent); }
.tile-desc { font-size: 11px; line-height: 1.45; color: var(--tg-text-secondary); }
.tile-status { margin-top: auto; color: var(--feature-accent); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

.info-page { min-height: calc(100vh - var(--header-h)); padding: 72px 0 96px; }
.info-shell { max-width: 820px; }
.info-card { padding: clamp(28px, 6vw, 64px); border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(145deg, rgba(20,26,42,.9), rgba(10,14,23,.9)); box-shadow: 0 24px 80px rgba(0,0,0,.24); }
.info-card h1 { margin: 16px 0 12px; max-width: 680px; font-size: clamp(34px, 6vw, 60px); line-height: .98; letter-spacing: -.055em; }
.info-lead { margin: 0; max-width: 680px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.info-body { max-width: 680px; margin: 30px 0 34px; color: var(--subtle); font-size: 15px; line-height: 1.75; }
.info-body p { margin: 0 0 18px; }


/* Professional SaaS refinement — round 2 */
:root {
  --bg: #0d0f14;
  --bg-deep: #090b0f;
  --surface: #171a21;
  --surface-solid: #171a21;
  --surface-raised: #1d2028;
  --surface-soft: #12151b;
  --line: rgba(255,255,255,.075);
  --line-strong: rgba(255,255,255,.14);
  --shadow: 0 20px 56px rgba(0,0,0,.3);
  --shadow-soft: 0 12px 32px rgba(0,0,0,.22);
  --tg-radius-card: 16px;
  --font-stack: "Plus Jakarta Sans", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --border-hover: rgba(255,255,255,.18);
}

body { background: var(--bg); }
body::before { display: none; }
.site-header,
.site-header.scrolled { background: rgba(13,15,20,.96); backdrop-filter: none; }
.site-header.scrolled { border-color: transparent; }
.button { transition: border-color .18s ease, background .18s ease, color .18s ease, opacity .18s ease; }
.button:hover,
.button:active { transform: none; }
.button-primary,
.button-primary:hover { color: #211400; background: #f5a623; box-shadow: none; }
.button-secondary { background: transparent; }

.hero { padding: 76px 0 84px; }
.hero::before { display: none; }
.hero-grid { grid-template-columns: minmax(0, .92fr) minmax(420px, .78fr); gap: clamp(48px, 7vw, 88px); }
.hero-copy h1 { max-width: 720px; font-size: clamp(48px, 6.6vw, 78px); line-height: 1; }
.hero-copy h1 span { color: #f5a623; background: none; -webkit-text-fill-color: currentColor; }
.hero-note { max-width: 580px; padding-top: 3px; }

.character-showcase {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: #12151b;
  box-shadow: var(--shadow-soft);
}
.showcase-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 22px 18px; }
.showcase-head h2 { max-width: 390px; margin: 7px 0 0; font-size: clamp(21px, 2.2vw, 28px); line-height: 1.15; letter-spacing: -.035em; }
.showcase-count { flex: 0 0 auto; color: var(--subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.showcase-count b { color: var(--text); font-weight: 700; }
.character-stage { position: relative; aspect-ratio: 4 / 5; background: #0f1218; }
.character-slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s ease; }
.character-slide.active { opacity: 1; visibility: visible; }
.character-slide img { width: 100%; height: 100%; object-fit: cover; }
.character-slide figcaption { position: absolute; inset: auto 0 0; display: grid; gap: 2px; padding: 50px 20px 18px; background: linear-gradient(to top, rgba(6,8,12,.92), transparent); }
.character-slide figcaption strong { font-size: 14px; }
.character-slide figcaption span { color: #bcc1cb; font-size: 12px; }
.showcase-controls { display: flex; justify-content: center; gap: 8px; padding: 16px; }
.showcase-dot { width: 24px; height: 4px; padding: 0; border: 0; border-radius: 10px; background: #343944; cursor: pointer; transition: background .2s ease, width .2s ease; }
.showcase-dot.active { width: 38px; background: #f5a623; }
.showcase-dot:focus-visible { outline: 2px solid #f5a623; outline-offset: 4px; }

.section { padding: 92px 0; }
.section-tight { padding: 72px 0 96px; }
.section-heading h2 { font-size: clamp(34px, 4.5vw, 52px); }
.bento-grid { grid-auto-rows: minmax(220px, auto); }
.bento-card,
.info-card,
.auth-layout,
.dashboard-sidebar,
.balance-card,
.metric-card,
.feature-tile { background: #151820; box-shadow: none; }
.bento-card { transition: border-color .18s ease, background .18s ease; }
.bento-card:hover { transform: none; border-color: var(--line-strong); background: #181b23; }
.auth-aside { background: #13171e; }
.auth-aside::before,
.balance-card::after { display: none; }
.balance-card { border-color: var(--line-strong); }
.feature-tile { min-height: 172px; justify-content: flex-start; transition: border-color .18s ease, background .18s ease, opacity .18s ease; }
.feature-tile:hover { transform: none; border-color: var(--line-strong); background: #191c24; }
.feature-tile.construction:hover { opacity: .68; }

.site-footer { padding: 0; background: transparent; }
.footer-bottom { margin-top: 0; padding: 22px 0; }
.footer-bottom-simple { justify-content: center; text-align: center; }
body.route-auth .site-footer,
body.route-dashboard .site-footer { display: none; }

@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; }
  .character-showcase { width: min(620px, 100%); margin: 0 auto; }
}

@media (max-width: 820px) {
  .header-actions .button-primary { display: inline-flex; }
  .hero { padding-top: 54px; }
  .section { padding: 76px 0; }
}

@media (max-width: 620px) {
  .header-actions .button-sm { display: none; }
  .hero-copy h1 { font-size: clamp(42px, 13vw, 58px); }
  .character-showcase { border-radius: 18px; }
  .showcase-head { padding: 18px; }
  .showcase-head h2 { font-size: 21px; }
  .character-slide figcaption { padding-inline: 16px; }
  .footer-bottom { align-items: center; }
}

/* Mini-app matched information pages */
.info-page { padding: 64px 0 88px; }
.info-shell { max-width: 900px; }
.info-shell-narrow { max-width: 680px; }
.info-card { padding: clamp(28px, 5vw, 54px); border-radius: 20px; }
.info-card h1 { margin: 14px 0 12px; font-size: clamp(34px, 5vw, 52px); line-height: 1.05; }
.info-lead { max-width: 740px; }
.info-body { max-width: none; }
.legal-copy h2 { margin: 34px 0 10px; color: var(--text); font-size: 20px; letter-spacing: -.025em; }
.legal-copy h2:first-child { margin-top: 0; }
.legal-copy p { margin: 0 0 15px; }
.legal-copy ul { display: grid; gap: 9px; margin: 0 0 18px; padding-left: 22px; }
.legal-copy li { padding-left: 4px; }
.legal-copy a,
.info-back { color: #f5a623; }
.legal-copy a:hover,
.info-back:hover { color: #ffc45e; }
.legal-meta { margin-top: 32px !important; padding-top: 20px; color: var(--subtle); font-size: 13px; }
.info-back { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.info-back svg { width: 16px; transform: rotate(180deg); }
.support-form { display: grid; gap: 18px; margin: 32px 0 28px; }
.support-form select,
.support-form textarea,
.support-form input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: none;
  background: #0d1016;
  color: var(--text);
  font: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.support-form select { min-height: 50px; }
.support-form textarea { min-height: 120px; resize: vertical; }
.support-form select:focus,
.support-form textarea:focus,
.support-form input:focus { border-color: rgba(245,166,35,.72); box-shadow: 0 0 0 3px rgba(245,166,35,.1); }
.support-form .button { width: 100%; min-height: 50px; }
.support-form .form-error[hidden] { display: none; }

@media (max-width: 620px) {
  .info-page { padding: 34px 0 64px; }
  .info-card { padding: 26px 20px; border-radius: 16px; }
  .info-card h1 { font-size: 34px; }
  .legal-copy h2 { margin-top: 28px; }
}

/* Combined sign-in / sign-up page */
.access-page { display: block; padding: 54px 20px 82px; }
.access-shell { width: min(1080px, 100%); margin: 0 auto; }
.access-heading { max-width: 720px; margin-bottom: 28px; }
.access-heading h1 { margin: 12px 0 10px; font-size: clamp(38px, 5vw, 56px); line-height: 1.04; letter-spacing: -.05em; }
.access-heading p { max-width: 620px; margin: 0; color: var(--muted); font-size: 16px; }
.access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.access-card { min-width: 0; padding: clamp(26px, 4vw, 42px); border: 1px solid var(--line); border-radius: 20px; background: #151820; }
.access-card-label { display: inline-block; margin-bottom: 9px; color: #f5a623; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.access-card .auth-card-head { margin-bottom: 24px; }
.access-card .auth-card-head h2 { font-size: 30px; }
.field-help-inline { color: var(--subtle); font-weight: 500; }

@media (max-width: 820px) {
  .access-grid { grid-template-columns: 1fr; }
  .access-shell { max-width: 640px; }
}

@media (max-width: 620px) {
  .access-page { padding: 32px 14px 58px; }
  .access-heading { margin-bottom: 22px; }
  .access-heading h1 { font-size: 38px; }
  .access-card { padding: 26px 20px; border-radius: 16px; }
}

/* Authenticated feature workflow dialogs */
body.feature-dialog-open { overflow: hidden; }
.feature-dialog { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 24px; }
.feature-dialog-backdrop { position: absolute; inset: 0; background: rgba(4,5,8,.78); }
.feature-dialog-panel {
  position: relative;
  width: min(860px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #14171e;
  box-shadow: 0 24px 72px rgba(0,0,0,.5);
}
.feature-dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding: 26px 28px 22px; background: #14171e; }
.feature-dialog-header h2 { margin: 8px 0 5px; font-size: clamp(26px, 4vw, 36px); line-height: 1.08; letter-spacing: -.04em; }
.feature-dialog-header p { max-width: 650px; margin: 0; color: var(--muted); font-size: 14px; }
.feature-dialog-close { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #0f1218; color: var(--muted); font-size: 25px; line-height: 1; cursor: pointer; }
.feature-dialog-close:hover { border-color: var(--line-strong); color: var(--text); }
.feature-workflow-form { padding: 28px; }
.feature-form-section { display: grid; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #11141a; }
.feature-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #9ca3af; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.feature-section-heading > div { display: inline-flex; align-items: center; gap: 10px; }
.feature-step-number { width: 27px; height: 27px; display: inline-grid; place-items: center; border: 1px solid rgba(245,166,35,.7); border-radius: 50%; color: #f5a623; font-size: 12px; letter-spacing: 0; }
.feature-recents { flex: 0 0 auto; padding: 7px 12px; border: 1px solid rgba(245,166,35,.7); border-radius: 999px; background: transparent; color: #f5a623; font: inherit; font-size: 10px; letter-spacing: .04em; text-transform: none; cursor: pointer; }
.feature-recents:hover { background: rgba(245,166,35,.08); }
.feature-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature-field { min-width: 0; display: grid; align-content: start; gap: 8px; }
.feature-field-wide { grid-column: 1 / -1; }
.feature-field > span,
.feature-choice-group legend,
.feature-inline-label { color: #9ca3af; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.feature-field em { color: var(--subtle); font-size: 10px; font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; }
.feature-field small,
.feature-help { color: var(--subtle); font-size: 11px; line-height: 1.55; }
.feature-field input,
.feature-field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: #0d1016;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.feature-field input { min-height: 48px; }
.feature-field textarea { min-height: 112px; resize: vertical; }
.feature-field input[type="file"] { padding: 10px; color: var(--muted); }
.feature-field input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: #1c2029; color: var(--text); cursor: pointer; }
.feature-field input:focus,
.feature-field textarea:focus { border-color: rgba(245,166,35,.8); box-shadow: 0 0 0 3px rgba(245,166,35,.1); }
.feature-choice-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.feature-choice-group legend { margin-bottom: 9px; padding: 0; }
.feature-choice-inline { margin: 0; }
.feature-choice-inline legend:empty { display: none; }
.feature-chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.feature-chip { position: relative; flex: 1 1 150px; min-width: 0; margin: 0; cursor: pointer; }
.feature-chip input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.feature-chip span,
.feature-chip-button { min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 11px 13px; border: 1px solid #3a404b; border-radius: 10px; background: #171a22; color: #a8adb8; font-size: 12px; font-weight: 700; line-height: 1.35; text-align: center; transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease; }
.feature-chip:hover span,
.feature-chip-button:hover { border-color: rgba(245,166,35,.6); color: #f4c36c; }
.feature-chip input:checked + span { border-color: #f5a623; background: rgba(245,166,35,.1); color: #f5a623; box-shadow: 0 0 0 1px rgba(245,166,35,.12); }
.feature-chip-button { flex: 0 1 auto; min-height: 38px; padding: 9px 12px; cursor: pointer; font: inherit; }
.feature-chip-button:focus-visible,
.feature-chip input:focus-visible + span { outline: 2px solid rgba(245,166,35,.75); outline-offset: 2px; }
.feature-help { display: block; margin-top: 8px; }
.feature-source-pane[hidden] { display: none; }
.feature-quick-chips { display: grid; gap: 9px; }
.feature-upload-pair { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #0f1218; }
.feature-upload-pair .feature-choice-group { align-self: start; }
.feature-check { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #101319; color: var(--muted); font-size: 13px; }
.feature-check input { width: 17px; height: 17px; accent-color: #f5a623; }
.feature-form-note { margin: 0; padding: 14px 16px; border-left: 3px solid #f5a623; background: rgba(245,166,35,.06); color: var(--muted); font-size: 13px; }
.feature-credit-info { margin: 20px 0 0; color: var(--subtle); font-size: 11px; line-height: 1.65; text-align: center; }
.feature-credit-balance { display: block; margin-top: 4px; color: #b9bec8; }
.feature-dialog-actions { display: grid; gap: 10px; margin-top: 18px; padding-top: 20px; }
.feature-dialog .feature-dialog-actions .button-primary { width: 100%; background: #f5a623; color: #111318; box-shadow: 0 10px 24px rgba(245,166,35,.16); }
.feature-dialog .feature-dialog-actions .button-primary:hover { background: #ffc15a; color: #111318; }
.feature-result { margin: 0 28px 28px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #0f1218; }
.feature-result[hidden] { display: none; }
.feature-result.working { border-color: rgba(245,166,35,.28); }
.feature-result.success { border-color: rgba(34,197,94,.28); }
.feature-result.partial { border-color: rgba(245,166,35,.34); }
.feature-result.error { border-color: rgba(255,138,101,.34); }
.feature-result > strong,
.feature-result-head strong { display: block; color: var(--text); font-size: 15px; }
.feature-result > p,
.feature-result-head span { display: block; margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.feature-result-head { margin-bottom: 16px; }
.feature-result-image { width: min(520px, 100%); max-height: 620px; margin: 16px auto; border: 1px solid var(--line); border-radius: 12px; object-fit: contain; background: #090b0f; }
.feature-result-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 16px 0; }
.feature-result-data { max-height: 360px; overflow: auto; margin: 16px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #090b0f; color: #c9ced8; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }

@media (max-width: 720px) {
  .feature-dialog { align-items: end; padding: 0; }
  .feature-dialog-panel { width: 100%; max-height: 94vh; border-width: 0; border-radius: 18px 18px 0 0; }
  .feature-dialog-header { padding: 21px 18px 17px; }
  .feature-workflow-form { padding: 20px 18px; }
  .feature-form-grid { grid-template-columns: 1fr; gap: 15px; }
  .feature-field-wide { grid-column: auto; }
  .feature-form-section { padding: 16px; }
  .feature-section-heading { align-items: flex-start; }
  .feature-chip { flex-basis: 135px; }
  .feature-upload-pair { grid-template-columns: 1fr; }
  .feature-dialog-actions .button { width: 100%; }
  .feature-result { margin: 0 18px 22px; }
}

/* Keep ornamental capability artwork quiet and non-distracting. */
.bento-card .card-art { opacity: .28; filter: saturate(.42); }
.sound-bars i,
.preview-progress i { animation: none; }

/* FAQ accordion and plain section labels */
.section-label, .eyebrow { gap: 0; }

.faq-section { padding-top: 96px; padding-bottom: 104px; }
.faq-container { max-width: 880px; }
.faq-list { display: grid; gap: 12px; max-width: 820px; }
.faq-item {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-soft);
  transition: border-color .22s ease, background-color .22s ease;
}
.faq-item[open] { border-color: rgba(245,166,35,.45); background: var(--surface-raised); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 21px 24px;
  cursor: pointer;
  list-style: none;
  color: #F5A623;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  flex: 0 0 auto;
  color: #F5A623;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  transition: transform .25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease;
}
.faq-item[open] .faq-answer { grid-template-rows: 1fr; }
.faq-answer > div {
  min-height: 0;
  overflow: hidden;
  padding: 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.faq-item[open] .faq-answer > div { padding-bottom: 22px; }
@media (max-width: 640px) {
  .faq-item summary { padding: 18px; font-size: 15px; }
  .faq-answer > div { padding-left: 18px; padding-right: 18px; font-size: 14px; }
}

/* ==========================================================================
   Verified mini-app parity additions: dashboard + generation lifecycle
   Palette source: /opt/infoxchange-miniapp/static/index.html
   ========================================================================== */
:root {
  --miniapp-bg: #0D0F14;
  --miniapp-surface: #1A1D24;
  --miniapp-surface-alt: #12151B;
  --miniapp-card-border: rgba(255, 255, 255, 0.07);
  --miniapp-gold: #F5A623;
  --miniapp-gold-hover: #FFB844;
  --miniapp-grey-text: #949AA8;
  --miniapp-white-text: #F7F7F5;
}

.dashboard-view {
  min-height: calc(100vh - var(--header-h));
  background: var(--miniapp-bg);
  color: var(--miniapp-white-text);
}

.rank-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .8fr);
  align-items: center;
  gap: 24px;
  padding: 22px 24px;
  margin-bottom: 14px;
  border: 1px solid var(--miniapp-card-border);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 166, 35, .14), rgba(26, 29, 36, .96));
}
.rank-title,
.stat-label {
  color: var(--miniapp-grey-text);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.rank-name {
  margin-top: 3px;
  color: var(--miniapp-gold);
  font-size: 21px;
  font-weight: 780;
}
.rank-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
}
.rank-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--miniapp-gold);
  transition: width .3s ease;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.stat-box {
  padding: 19px 20px;
  border: 1px solid var(--miniapp-card-border);
  border-radius: 14px;
  background: var(--miniapp-surface);
  text-align: center;
}
.stat-value {
  color: var(--miniapp-gold);
  font-size: 25px;
  font-weight: 780;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat-value small {
  margin-left: 5px;
  color: #FFD27A;
  font-size: 11px;
  font-weight: 700;
}
.stat-label { margin-top: 6px; }

.generation-progress,
.generation-complete,
.generation-error {
  padding: 12px 4px;
  text-align: center;
}
.generation-progress strong,
.generation-error strong { display: block; }
.generation-progress p,
.generation-error p {
  margin: 6px 0 0;
  color: var(--miniapp-grey-text);
  font-size: 13px;
}
.generation-spinner {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  border: 3px solid rgba(255, 255, 255, .14);
  border-top-color: var(--miniapp-gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.download-buttons {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.feature-result .download-buttons .button,
.feature-result .button-primary {
  width: 100%;
  justify-content: center;
  border-color: var(--miniapp-gold);
  background: var(--miniapp-gold);
  color: #111318;
  font-weight: 780;
}
.feature-result .download-buttons .button:hover,
.feature-result .button-primary:hover {
  border-color: var(--miniapp-gold-hover);
  background: var(--miniapp-gold-hover);
  color: #111318;
}
.feature-result-actions .button { flex: 1 1 210px; }
.generation-error { color: #FF8A65; }

@media (max-width: 720px) {
  .rank-card { grid-template-columns: 1fr; gap: 14px; }
  .stats-row { gap: 10px; }
  .stat-box { padding: 16px 12px; }
  .stat-value { font-size: 22px; }
}

/* Support confirmation: compact, formal success state. */
#support-form-message.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  padding: 16px 20px;
  color: #d7e5d9;
  text-align: center;
}
#support-form-message.form-success svg {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  color: #86efac;
}
#support-form-message.form-success span {
  display: block;
  color: #d7e5d9;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
}

/* ═══ Dashboard tabs, rank card, compact stats, activity, account form ═══ */
.dashboard-tab-hidden { display: none !important; }

.rank-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px;
  margin-bottom: 14px;
  border: 1px solid var(--miniapp-card-border);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 166, 35, .12), rgba(26, 29, 36, .96));
}
.rank-card-identity { display: flex; align-items: center; gap: 16px; }
.rank-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  font-size: 26px;
  border-radius: 14px;
  background: rgba(245, 166, 35, .15);
  border: 1px solid rgba(245, 166, 35, .35);
}
.rank-earned {
  margin-top: 2px;
  color: var(--miniapp-white-text);
  font-size: 13px;
  font-weight: 650;
}
.rank-next {
  margin-top: 2px;
  color: var(--miniapp-grey-text);
  font-size: 12.5px;
  font-weight: 600;
}
.rank-card-id { margin-top: 12px; color: var(--miniapp-grey-text); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.rank-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.rank-progress-label {
  color: var(--miniapp-grey-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.stat-box { padding: 13px 14px; }
.stat-box.stat-box-wide { grid-column: span 2; }
.stat-value { font-size: 20px; }

.activity-list {
  display: grid;
  gap: 8px;
  padding: 2px 0;
}
.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--miniapp-card-border);
  border-radius: 11px;
  background: var(--miniapp-surface);
}
.activity-item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.activity-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--miniapp-white-text);
  font-size: 13.5px;
  font-weight: 620;
}
.activity-when { color: var(--miniapp-grey-text); font-size: 11.5px; }
.activity-credit {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.activity-credit-positive { color: var(--miniapp-gold); }
.activity-credit-negative { color: var(--muted); }
.activity-loading,
.activity-empty {
  padding: 26px 4px;
  text-align: center;
  color: var(--miniapp-grey-text);
  font-size: 13px;
}
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .12);
  border-top-color: var(--miniapp-gold);
  border-radius: 50%;
  animation: dashboard-spin .7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}
@keyframes dashboard-spin { to { transform: rotate(360deg); } }

.account-form {
  display: grid;
  gap: 14px;
  max-width: 440px;
}
.account-form .form-row { display: grid; gap: 6px; }
.account-form label {
  color: var(--miniapp-grey-text);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.account-form input {
  padding: 12px 14px;
  border: 1px solid var(--miniapp-card-border);
  border-radius: 11px;
  background: var(--miniapp-surface);
  color: var(--miniapp-white-text);
  font-size: 14px;
  outline: none;
  transition: border-color .2s ease;
}
.account-form input:focus { border-color: var(--miniapp-gold); }
.account-form .form-divider {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 4px 0;
  color: var(--miniapp-grey-text);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.account-form .form-divider::before,
.account-form .form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--miniapp-card-border);
}
.account-form .form-note {
  margin: 0;
  color: var(--miniapp-grey-text);
  font-size: 12px;
  text-align: center;
}
@media (max-width: 768px) {
  .rank-card { padding: 16px 16px; }
  .stat-box { padding: 11px 10px; }
  .stat-box.stat-box-wide { grid-column: span 1; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ */
/* Recents panel (inside feature dialogs)                             */
/* ------------------------------------------------------------------ */
.recents-panel { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); padding: 12px; }
.recents-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.recents-head strong { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.recents-close { border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 8px; }
.recents-close:hover { color: var(--text); background: rgba(255,255,255,.08); }
.recents-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.recents-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); }
.recents-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.recents-date { margin-top: 2px; font-size: 11.5px; color: var(--subtle); }
.recents-status { font-size: 11px; font-weight: 700; text-transform: lowercase; }
.recents-ok { color: var(--emerald-soft); }
.recents-failed { color: #ef6b6b; }
.recents-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.recents-download { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
.recents-meta { font-size: 11.5px; color: var(--subtle); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recents-empty, .recents-error-body { padding: 22px 10px; text-align: center; color: var(--muted); font-size: 13px; }
.recents-loading-body { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px 10px; color: var(--muted); font-size: 13px; }
.recents-loading-body .spinner { width: 14px; height: 14px; }
.feature-recents { border: 0; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; cursor: pointer; padding: 3px 10px; border-radius: 20px; }
.feature-recents:hover { color: var(--text); background: rgba(255,255,255,.08); }
/* Dashboard top bar without greeting */
.dashboard-top-status { margin-bottom: 18px; }

/* Account-tab Telegram linking */
.account-link-card {
  max-width: 440px;
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid var(--miniapp-card-border);
  border-radius: 14px;
  background: var(--miniapp-surface);
}
.account-link-card .form-divider { margin-top: 0; }
.account-link-form { display: grid; gap: 14px; }
.account-link-form .form-row { display: grid; gap: 6px; }
.account-link-form label {
  color: var(--miniapp-grey-text);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.account-link-form input {
  padding: 12px 14px;
  border: 1px solid var(--miniapp-card-border);
  border-radius: 11px;
  background: var(--miniapp-bg);
  color: var(--miniapp-white-text);
  font-size: 14px;
  outline: none;
}
.account-link-form input:focus { border-color: var(--miniapp-gold); }
.account-link-message { min-height: 18px; }
.account-link-message.success { color: #83d7a0; }
.account-link-message.error { color: #ff9b87; }
.account-link-form input[readonly] { opacity: .68; }



/* Clean result views and in-place Recents. */
.feature-result-prompt-card, .feature-result-readable-card { margin: 14px 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #0b0e13; }
.feature-result-prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.feature-result-prompt-head strong, .feature-result-readable-card > strong { color: var(--text); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.feature-result-prompt-text, .feature-result-readable-text { color: #d6dae2; font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.feature-copy-button { flex: 0 0 auto; padding: 7px 11px; font-size: 11px; }
.feature-result-credits { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.feature-result-summary { display: grid; gap: 7px; margin-top: 14px; }
.feature-result-summary-row { display: grid; grid-template-columns: minmax(110px, .35fr) minmax(0, 1fr); gap: 12px; padding: 9px 0; color: var(--muted); font-size: 12px; }
.feature-result-summary-row > span:last-child { color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.recents-panel { margin: 0 28px 28px; }
.recents-back { flex: 0 0 auto; padding: 7px 11px; font-size: 11px; }
/* Remove every separator-style element and horizontal separator pseudo-element. */
hr, .divider, .separator, .sidebar-divider { display: none !important; }
.form-divider, .form-divider::before, .form-divider::after { display: none !important; border: 0 !important; background: none !important; }
.sidebar-user, .feature-dialog-header, .feature-dialog-actions { }
@media (max-width: 720px) {
  .recents-panel { margin: 0 18px 22px; }
  .feature-result-prompt-head { align-items: flex-start; flex-direction: column; }
  .feature-copy-button { width: 100%; }
  .feature-result-summary-row { grid-template-columns: 1fr; gap: 4px; }
}
/* Remove all header borders */
.site-header, .site-header.scrolled { border: none; border-bottom: none; box-shadow: none; }
/* Gold download buttons in recents */
.recents-panel a, .recents-panel button, .recents-item a, .recents-item button, a[href*="download"], button[data-download], .download-btn { background: #F5A623; color: #0D0F14; font-weight: 700; border: none; border-radius: 10px; padding: 10px 18px; text-decoration: none; display: inline-block; cursor: pointer; transition: background .2s ease; }
.recents-panel a:hover, .recents-panel button:hover, .recents-item a:hover, .recents-item button:hover, a[href*="download"]:hover, button[data-download]:hover, .download-btn:hover { background: #FFD27A; }
/* NUCLEAR: Remove ALL possible lines below header */
header, .site-header, .site-header.scrolled, #site-header {
  border: none !important;
  border-bottom: none !important;
  border-top: none !important;
  outline: none !important;
  box-shadow: none !important;
}
header::after, .site-header::after, #site-header::after,
header::before, .site-header::before, #site-header::before {
  display: none !important;
  border: none !important;
}
main, #app, main::before, #app::before {
  border: none !important;
  border-top: none !important;
  outline: none !important;
}
/* Back to form button - dark style, not gold */
.recents-panel .back-btn,
.recents-panel > button:first-child,
button[data-back],
.recents-back {
  background: rgba(255,255,255,0.08) !important;
  color: #949AA8 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
}
.recents-panel .back-btn:hover,
.recents-panel > button:first-child:hover,
button[data-back]:hover,
.recents-back:hover {
  background: rgba(255,255,255,0.14) !important;
  color: #F7F7F5 !important;
}
/* FIX: Both download buttons gold, only back-to-form dark */
.recents-panel a[href*="download"],
.recents-panel a[href*="pdf"],
.recents-panel a[href*="PDF"],
a[download],
.recents-item a {
  background: #F5A623 !important;
  color: #0D0F14 !important;
  border: none !important;
  font-weight: 700 !important;
}
/* FINAL FIX: Target exact classes from features.js */
.recents-download,
button.recents-download,
.recents-actions button,
.recents-actions .button,
button[data-feature-download] {
  background: #F5A623 !important;
  color: #0D0F14 !important;
  border: none !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  padding: 10px 18px !important;
}
.recents-download:hover,
button.recents-download:hover,
.recents-actions button:hover,
button[data-feature-download]:hover {
  background: #FFD27A !important;
}
.recents-back,
button.recents-back,
button[data-recents-back],
.button-ghost {
  background: rgba(255,255,255,0.08) !important;
  color: #949AA8 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
}
.recents-back:hover,
button.recents-back:hover,
button[data-recents-back]:hover {
  background: rgba(255,255,255,0.14) !important;
  color: #F7F7F5 !important;
}


/* Character Forge redesign: complexion circles, selects, color picker, small/accent chips. */
.complexion-circle { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.complexion-circle input { position: absolute; opacity: 0; width: 0; height: 0; }
.complexion-swatch { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.complexion-circle:hover .complexion-swatch { transform: scale(1.08); }
.complexion-circle input:checked + .complexion-swatch { border-color: #f5a623; box-shadow: 0 0 0 2px rgba(245,166,35,.35), inset 0 0 0 1px rgba(255,255,255,.16); }
.complexion-circle input:checked + .complexion-swatch::after { content: "\2713"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.95); font-size: 13px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.complexion-label { color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .04em; }
.complexion-row { justify-content: flex-start; flex-wrap: wrap; gap: 18px; }
.feature-select select { width: 100%; padding: 13px 36px 13px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #13161d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a8adb8' stroke-width='2'/%3E%3C/svg%3E") right 14px center / 12px auto no-repeat; color: var(--text); font: inherit; font-size: 13px; appearance: none; cursor: pointer; }
.feature-select select:focus { outline: 0; border-color: var(--miniapp-gold); box-shadow: 0 0 0 3px rgba(245,166,35,.15); }
.feature-select select option { background: #13161d; color: var(--text); }
.feature-color-picker .feature-color-picker-body { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.feature-color-picker input[type="color"] { width: 44px; height: 44px; padding: 3px; border: 2px solid var(--line-strong); border-radius: 10px; background: #13161d; cursor: pointer; }
.feature-color-picker input[type="color"]:focus { outline: 0; border-color: var(--miniapp-gold); box-shadow: 0 0 0 3px rgba(245,166,35,.15); }
.feature-color-picker-chip { min-width: 74px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: #13161d; color: var(--text); font-size: 12px; font-weight: 700; text-align: center; }
.feature-choice-group-sm .feature-chip { flex-basis: 120px; min-height: 34px; padding: 7px 11px; font-size: 11px; border-radius: 8px; }
.chip-blue.chip-accent input:checked + span { border-color: #60a5fa !important; background: rgba(96,165,250,.1) !important; color: #60a5fa !important; box-shadow: 0 0 0 1px rgba(96,165,250,.25) !important; }
.chip-pink.chip-accent input:checked + span { border-color: #f472b6 !important; background: rgba(244,114,182,.1) !important; color: #f472b6 !important; box-shadow: 0 0 0 1px rgba(244,114,182,.25) !important; }
.chip-green.chip-accent input:checked + span { border-color: #4ade80 !important; background: rgba(74,222,128,.1) !important; color: #4ade80 !important; box-shadow: 0 0 0 1px rgba(74,222,128,.25) !important; }
.chip-red.chip-accent input:checked + span { border-color: #f87171 !important; background: rgba(248,113,113,.1) !important; color: #f87171 !important; box-shadow: 0 0 0 1px rgba(248,113,113,.25) !important; }
.chip-purple.chip-accent input:checked + span { border-color: #c084fc !important; background: rgba(192,132,252,.1) !important; color: #c084fc !important; box-shadow: 0 0 0 1px rgba(192,132,252,.25) !important; }
.chip-orange.chip-accent input:checked + span { border-color: #fb923c !important; background: rgba(251,146,60,.1) !important; color: #fb923c !important; box-shadow: 0 0 0 1px rgba(251,146,60,.25) !important; }
@media (max-width: 720px) { .complexion-row { gap: 14px; } }


/* Voice Image Editor dual preview and speech input. */
.voice-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 2px 0 4px; }
.voice-preview-box { height: 200px; min-width: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px dashed #46505f; border-radius: 12px; background: #0c0f14; }
.voice-preview-placeholder { display: grid; gap: 7px; padding: 18px; color: var(--muted); text-align: center; }
.voice-preview-placeholder strong { color: var(--text); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.voice-preview-placeholder small { color: var(--subtle); font-size: 11px; line-height: 1.45; }
.voice-preview-image { width: 100%; height: 100%; display: block; object-fit: contain; background: #090b0f; }
.voice-instruction-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 10px; align-items: stretch; }
.voice-instruction-row textarea { min-width: 0; }
.voice-mic-button { width: 48px; min-height: 48px; align-self: stretch; border: 1px solid #3a404b; border-radius: 10px; background: #171a22; color: #f5a623; font-size: 20px; cursor: pointer; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.voice-mic-button:hover { border-color: rgba(245,166,35,.75); background: rgba(245,166,35,.1); }
.voice-mic-button.is-recording { border-color: #ef4444; background: rgba(239,68,68,.14); color: #f87171; animation: voice-mic-pulse 1.05s ease-in-out infinite; }
@keyframes voice-mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.22); transform: scale(1); } 50% { box-shadow: 0 0 0 7px rgba(239,68,68,.08); transform: scale(1.04); } }
@media (max-width: 620px) { .voice-preview-grid { grid-template-columns: 1fr; } .voice-preview-box { height: 180px; } }
/* Hair colour picker - smaller, contained click area */
input[type="color"] {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 2px !important;
  border: 2px solid var(--line-strong) !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  overflow: hidden !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0 !important;
}
input[type="color"]::-webkit-color-swatch {
  border: none !important;
  border-radius: 5px !important;
}
/* Force complexion circle colors to show */
.complexion-swatch[style*="FFDBB4"] { background-color: #FFDBB4 !important; }
.complexion-swatch[style*="C68642"] { background-color: #C68642 !important; }
.complexion-swatch[style*="8D5524"] { background-color: #8D5524 !important; }
.complexion-swatch[style*="6B3A1F"] { background-color: #6B3A1F !important; }
.complexion-swatch[style*="3B1F0B"] { background-color: #3B1F0B !important; }
.complexion-swatch[style*="1A0A00"] { background-color: #1A0A00 !important; }
.complexion-swatch {
  background-color: var(--swatch-color, #6B3A1F) !important;
}
label.complexion-circle:nth-child(1) .complexion-swatch { background-color: #FFDBB4 !important; }
label.complexion-circle:nth-child(2) .complexion-swatch { background-color: #C68642 !important; }
label.complexion-circle:nth-child(3) .complexion-swatch { background-color: #8D5524 !important; }
label.complexion-circle:nth-child(4) .complexion-swatch { background-color: #6B3A1F !important; }
label.complexion-circle:nth-child(5) .complexion-swatch { background-color: #3B1F0B !important; }
label.complexion-circle:nth-child(6) .complexion-swatch { background-color: #1A0A00 !important; }

/* Error icon hardening */ .form-error > svg, .form-error svg[width], .form-error svg[height] { width: 18px !important; height: 18px !important; min-width: 18px !important; max-width: 18px !important; min-height: 18px !important; max-height: 18px !important; flex: 0 0 18px !important; display: block !important; }


/* Native dashboard desktop width override */
@media (min-width: 768px) {
  .dashboard-page .dashboard-shell {
    width: min(1400px, calc(100% - 40px));
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }
}


/* Native dashboard staged generation progress */
.feature-dialog-actions[hidden] { display: none !important; }
.generation-progress { display: grid; gap: 12px; padding: 18px; border: 1px solid rgba(245,166,35,.18); border-radius: 14px; background: rgba(245,166,35,.035); }
.generation-progress > strong { color: var(--text); font-size: 15px; }
.generation-progress > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.generation-progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.09); }
.generation-progress-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #D98400, #F5A623, #FFD27A); box-shadow: 0 0 14px rgba(245,166,35,.28); transition: width .35s ease; }
.generation-stage-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.generation-stage { display: flex; align-items: center; gap: 8px; color: var(--subtle); font-size: 12px; line-height: 1.3; }
.generation-stage.current { color: var(--text); font-weight: 700; }
.generation-stage.complete { color: #F5A623; }
.generation-stage-dot { width: 7px; height: 7px; flex: 0 0 7px; border: 1px solid currentColor; border-radius: 50%; }
.generation-stage.current .generation-stage-dot { background: #F5A623; box-shadow: 0 0 0 4px rgba(245,166,35,.12); }
.generation-stage.complete .generation-stage-dot { background: #F5A623; }
.generation-estimate { color: var(--subtle); font-size: 11px; }
/* Force all download buttons gold */
button[data-feature-download], .recents-download, button[onclick*="download"], a[href*="download"] {
  background: #F5A623 !important;
  color: #000 !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
}

/* ───────────────────────────────────────────────────────────────────────────
   Website file delivery: download cards, audio players and the Files panel.
   Files are served by the website itself for 24 hours (audio for 6 hours).
   ─────────────────────────────────────────────────────────────────────────── */

.file-section {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(245, 166, 35, 0.28);
  border-radius: 14px;
  background: rgba(245, 166, 35, 0.05);
}

.file-section-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}

.file-section-head strong {
  font-size: 0.98rem;
  color: #f5a623;
  letter-spacing: 0.01em;
}

.file-section-head span {
  font-size: 0.8rem;
  color: rgba(235, 235, 235, 0.62);
}

.file-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.file-card + .file-card {
  margin-top: 10px;
}

.file-card-urgent {
  border-color: rgba(255, 138, 76, 0.45);
  background: rgba(255, 138, 76, 0.07);
}

.file-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 240px;
  min-width: 0;
}

.file-card-name {
  font-size: 0.92rem;
  color: #f2f2f2;
  overflow-wrap: anywhere;
}

.file-card-meta {
  font-size: 0.78rem;
  color: rgba(235, 235, 235, 0.55);
  overflow-wrap: anywhere;
}

.file-card-warning {
  margin-top: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffb27a;
}

.file-card-audio {
  flex: 1 1 260px;
  min-width: 200px;
  height: 36px;
}

.file-card-thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
}

.file-card-download {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Files dashboard panel */

.recent-files {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.recent-files-intro {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(235, 235, 235, 0.6);
}

.recent-files-group h4 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: #f5a623;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.recent-files-empty {
  padding: 26px 18px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: rgba(235, 235, 235, 0.55);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .file-card {
    align-items: stretch;
  }

  .file-card-download {
    width: 100%;
  }
}

/* ───────────────────────────────────────────────────────────────────────────
   Buy Credits: Paystack gateway plus hidden manual MOMO / USDT payment panel.
   ─────────────────────────────────────────────────────────────────────────── */

.credit-package-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.credit-package {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  text-align: left;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.credit-package:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 166, 35, 0.56);
}

.credit-package-active {
  border-color: #f5a623;
  background: rgba(245, 166, 35, 0.1);
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.18);
}

.credit-package-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #f2f2f2;
}

.credit-package-price {
  color: #f5a623;
  font-weight: 800;
}

.credit-package-meta {
  color: rgba(235, 235, 235, 0.58);
  font-size: 0.78rem;
}

.credit-package-badge {
  color: #7ee2a4;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.manual-pay-secure {
  margin: 8px 0 12px;
  color: rgba(235, 235, 235, 0.55);
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: center;
}

.manual-pay-toggle {
  width: 100%;
  border-color: rgba(245, 166, 35, 0.38);
  color: #f5a623;
}

.manual-pay-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(245, 166, 35, 0.28);
  border-radius: 14px;
  background: rgba(245, 166, 35, 0.055);
}

.manual-pay-intro {
  margin: 0;
  color: rgba(235, 235, 235, 0.72);
  font-size: 0.82rem;
  line-height: 1.55;
}

.manual-pay-option {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.18);
}

.manual-pay-option h4 {
  margin: 0 0 9px;
  color: #f5a623;
  font-size: 0.88rem;
}

.manual-pay-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: rgba(235, 235, 235, 0.75);
  font-size: 0.8rem;
  line-height: 1.5;
}

.manual-pay-rows strong {
  color: #f3f3f3;
}

.manual-pay-prices {
  margin-top: 5px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #7ee2a4;
}

.manual-pay-address-label {
  margin-top: 5px;
  color: rgba(235, 235, 235, 0.7);
}

.manual-pay-address {
  display: flex;
  align-items: center;
  gap: 8px;
}

.manual-pay-address code {
  flex: 1;
  min-width: 0;
  padding: 8px 9px;
  overflow-wrap: anywhere;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.28);
  color: #f3f3f3;
  font-size: 0.72rem;
}

.manual-copy-button {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: 6px;
  background: rgba(245, 166, 35, 0.12);
  color: #f5a623;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.manual-copy-button:hover {
  background: rgba(245, 166, 35, 0.22);
}

.manual-pay-send {
  margin: 12px 0 7px;
  color: #f2f2f2;
  font-size: 0.8rem;
  font-weight: 700;
}

.manual-pay-whatsapp {
  width: 100%;
  border: 0;
  background: #25d366;
  color: #fff;
  text-align: center;
}

.manual-pay-whatsapp:hover {
  background: #1fba59;
  color: #fff;
}

/* Buy Credits: one subtle compact link below Available Balance. */
.stat-box {
  min-height: 112px;
}
.stat-buy-credits,
.stat-box .stat-buy-credits {
  display: inline-flex !important;
  width: auto;
  min-height: 0;
  margin: 9px auto 0;
  padding: 4px 9px;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  color: #f5a623 !important;
  box-shadow: none;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.stat-buy-credits::before {
  content: '\1F4B3';
  margin-right: 4px;
}
.stat-buy-credits:hover,
.stat-box .stat-buy-credits:hover {
  background: rgba(245, 166, 35, .12) !important;
  color: #ffd27a !important;
}
@media (max-width: 560px) {
  .credit-package-list {
    grid-template-columns: 1fr;
  }

  .manual-pay-address {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-copy-button {
    width: 100%;
  }
}

/* Voice Image Editor: make the explicit transform control visually obvious. */
.voice-image-editor-form + .feature-dialog-actions [data-feature-submit],
[data-feature-key="voice-image-editor"] [data-feature-submit] {
  min-width: 150px;
}

[data-feature-key="voice-image-editor"] [data-feature-submit]::before {
  content: '\\270E';
  margin-right: 6px;
}

/* Mobile bottom nav for dashboard */
.mobile-bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 900; background: rgba(11,13,18,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 0 max(6px, env(safe-area-inset-bottom)); }
.mobile-bottom-nav-inner { display: flex; justify-content: space-around; align-items: center; max-width: 480px; margin: 0 auto; }
.mobile-bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; border: 0; background: transparent; color: var(--muted); font-size: 10px; font-weight: 600; cursor: pointer; transition: color .2s; }
.mobile-bottom-nav button.active { color: var(--accent); }
.mobile-bottom-nav button svg { width: 20px; height: 20px; }
@media (max-width: 820px) {
  body.route-dashboard .mobile-bottom-nav { display: block; }
  body.route-dashboard .dashboard-main { padding-bottom: 72px; }
}


/* Compact multi-gateway checkout choices */
.payment-choice-instructions { margin: 12px 0 10px; color: var(--muted); font-size: 12px; text-align: center; }
.payment-gateway-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 10px; }
.gateway-button { min-height: 38px; padding: 0 12px; border: 1px solid rgba(245,166,35,.38); border-radius: 10px; background: rgba(245,166,35,.1); color: var(--text); font-size: 11px; font-weight: 750; cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.gateway-button:hover { transform: translateY(-1px); background: rgba(245,166,35,.2); border-color: rgba(245,166,35,.8); }
.gateway-button small { display: inline-block; margin-left: 4px; color: var(--accent); font-size: 9px; font-weight: 800; }
.gateway-paystack { border-color: rgba(0, 193, 155, .6); }
.gateway-flutterwave { border-color: rgba(255, 141, 0, .65); }
.gateway-korapay { border-color: rgba(123, 97, 255, .7); }
.credit-package-currencies { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.credit-package-currencies span { padding: 3px 6px; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; background: rgba(255,255,255,.035); }
.credit-package-currencies b { color: var(--accent); font-size: 9px; letter-spacing: .02em; }

/* Dashboard sidebar slide-in panel for mobile */
.dashboard-sidebar-backdrop { display: none; }
@media (max-width: 820px) {
  .dashboard-sidebar { position: fixed !important; top: 0 !important; left: 0 !important; bottom: 0 !important; z-index: 1200; display: block !important; width: min(86vw, 340px); height: 100vh; max-height: 100vh; overflow-y: auto; padding: 24px 18px; border-radius: 0 20px 20px 0; background: #0b0d12; box-shadow: 18px 0 50px rgba(0,0,0,.48); transform: translateX(-110%); transition: transform .24s ease; }
  body.dashboard-sidebar-open .dashboard-sidebar { transform: translateX(0); }
  .dashboard-sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 1190; background: rgba(4,6,11,.68); opacity: 0; pointer-events: none; transition: opacity .24s ease; }
  body.dashboard-sidebar-open .dashboard-sidebar-backdrop { opacity: 1; pointer-events: auto; }
  body.dashboard-sidebar-open { overflow: hidden; }
  .dashboard-sidebar .sidebar-nav { padding-top: 22px; }
  .dashboard-sidebar .sidebar-nav button { min-height: 46px; font-size: 14px; }
  .dashboard-sidebar .sidebar-user { padding-top: 8px; }
}
@media (min-width: 821px) { .dashboard-sidebar-backdrop { display: none !important; } }

.story-word-count { margin-top: 7px; color: var(--muted); font-size: 11px; font-weight: 750; text-align: right; }
.story-word-count-ready { color: #4ade80; }
.story-word-count-over { color: #f87171; }
.story-word-count-under { color: var(--muted); }
.story-lab-synopsis { margin: 12px 0; color: var(--muted); font-size: 13px; line-height: 1.65; }


.mobile-auth-switch { display: none; margin: 12px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.mobile-auth-switch button { padding: 0; border: 0; background: transparent; color: #f5a623; font: inherit; font-weight: 800; cursor: pointer; }
.mobile-auth-switch button:hover { text-decoration: underline; }
.auth-email-note { margin: -13px 0 18px; color: var(--subtle); font-size: 12px; }
@media (max-width: 820px) {
  .access-grid { display: block; }
  .access-grid > .access-card:nth-child(2) { display: none; }
  .access-grid.access-show-signup > .access-card:nth-child(1) { display: none; }
  .access-grid.access-show-signup > .access-card:nth-child(2) { display: block; }
  .mobile-auth-switch { display: block; }
}

.dashboard-telegram-id { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 700; }
.connected-telegram-id { padding: 14px 16px; border: 1px solid rgba(34,197,94,.28); border-radius: 12px; background: rgba(34,197,94,.06); color: var(--muted); font-size: 13px; }
.connected-telegram-id strong { color: #86efac; letter-spacing: .03em; }

/* Fix oversized checkbox */
.checkbox-field { margin-top: 8px; }
.checkbox-wrap { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox-wrap input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; accent-color: var(--accent); cursor: pointer; }
.checkbox-wrap span { font-size: 14px; color: var(--muted); }
.checkbox-wrap a { color: var(--accent); }

/* Narrow the signup decision card */
.signup-decision-card, .auth-card[data-signup-step="decision"] { max-width: 540px; margin: 0 auto; }
.route-auth .auth-layout { max-width: 680px; }

/* Trend Tags UX transitions: the score result takes over the dialog while the
   original form stays in the DOM for a smooth, reversible reset. */
#feature-dialog[data-feature-key="trend-tags"] [data-feature-form] {
  max-height: 1200px;
  opacity: 1;
  transform: translateY(0);
  overflow: hidden;
  transition: max-height .38s ease, opacity .24s ease, transform .38s ease, padding .38s ease, margin .38s ease;
}
#feature-dialog[data-feature-key="trend-tags"] [data-feature-form].trend-form-collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-12px);
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  pointer-events: none;
  visibility: hidden;
}
#feature-dialog[data-feature-key="trend-tags"] [data-feature-result].trend-result-shell {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .36s ease, transform .36s ease;
}
#feature-dialog[data-feature-key="trend-tags"] [data-feature-result].trend-result-shell.trend-results-visible {
  opacity: 1;
  transform: translateY(0);
}
#feature-dialog[data-feature-key="trend-tags"] [data-feature-result].trend-result-shell.trend-results-hiding {
  opacity: 0;
  transform: translateY(12px);
}

/* ==========================================================================
   Trend Tags — teal / cyan accent system
   Trend Tags is the only feature that reads and rewrites live YouTube data, so
   it carries its own teal identity instead of the studio's gold. Every rule is
   scoped under a .trend-* class so no other feature inherits these colours.
   ========================================================================== */
.trend-tags-result {
  --trend-teal: #2DD4BF;
  --trend-cyan: #22D3EE;
  --trend-teal-soft: rgba(45, 212, 191, 0.12);
  --trend-teal-line: rgba(45, 212, 191, 0.32);
  display: grid; gap: 18px; margin-top: 16px;
}
.trend-tags-result::before {
  content: ''; display: block; height: 3px; border-radius: 999px;
  background: linear-gradient(90deg, var(--trend-teal), var(--trend-cyan));
}
.trend-video-title { margin: 0; font-size: 1.05rem; color: #F4F6FB; }
.trend-detected-niche { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(110deg, rgba(45, 212, 191, 0.16), rgba(34, 211, 238, 0.08)); border: 1px solid rgba(45, 212, 191, 0.42); }
.trend-detected-niche strong { color: #E6FFFB; font-size: 1.05rem; }
.trend-detected-niche small { color: #A5B4C3; font-size: 0.78rem; line-height: 1.4; }
.trend-video-meta { margin: 4px 0 0; font-size: 0.85rem; color: #98A2B3; }
.trend-form-note { margin: 6px 0 0; font-size: 0.85rem; line-height: 1.55; color: #9FB3C8;
  padding: 10px 12px; border-radius: 10px; border-left: 3px solid rgba(45, 212, 191, 0.55);
  background: rgba(45, 212, 191, 0.07); }
.trend-block { display: grid; gap: 10px; }
.trend-block h5 { margin: 0; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: #7FE3D6; }
.trend-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.trend-block-note { margin: 0; font-size: 0.8rem; color: #98A2B3; }
.trend-copy-all { border: 1px solid var(--trend-teal-line); background: var(--trend-teal-soft);
  color: #7FE3D6; border-radius: 999px; padding: 5px 14px; font-size: 0.78rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.trend-copy-all:hover { background: rgba(45, 212, 191, 0.22); border-color: rgba(45, 212, 191, 0.65); color: #E6FFFB; }
.trend-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.trend-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--trend-teal-line); background: var(--trend-teal-soft); color: #A5F3EA;
  font-size: 0.84rem; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease; }
.trend-chip:hover { background: rgba(45, 212, 191, 0.22); border-color: rgba(45, 212, 191, 0.7); transform: translateY(-1px); }
.trend-chip-hash::before { content: '#'; color: var(--trend-cyan); font-weight: 700; opacity: 0.9; }
.trend-chip-count { font-size: 0.72rem; padding: 1px 6px; border-radius: 999px; background: rgba(2, 22, 26, 0.55); color: #7FE3D6; }

/* Score display — deliberately the loudest element in the result */
.trend-score-card { display: grid; gap: 14px; padding: 20px; border-radius: 16px;
  background: linear-gradient(140deg, rgba(45, 212, 191, 0.10), rgba(34, 211, 238, 0.05) 60%, rgba(255, 255, 255, 0.02));
  border: 1px solid var(--trend-teal-line); }
.trend-score-gauge { display: grid; gap: 6px; }
.trend-score-label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: #7FE3D6; }
.trend-score-value { font-size: 3.4rem; line-height: 1; font-weight: 800; color: #F4F6FB; letter-spacing: -0.02em; }
.trend-score-value span { font-size: 1.1rem; font-weight: 600; color: #8FA3B8; margin-left: 6px; }
.trend-score-verdict { font-size: 0.85rem; font-weight: 600; }
.trend-score-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 4px; }
.trend-score-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--trend-teal), var(--trend-cyan)); transition: width 0.5s ease; }
.trend-score-good .trend-score-value { color: #5EEAD4; }
.trend-score-good .trend-score-verdict { color: #5EEAD4; }
.trend-score-good .trend-score-fill { background: linear-gradient(90deg, #14B8A6, #22D3EE); }
.trend-score-fair .trend-score-value { color: #FCD34D; }
.trend-score-fair .trend-score-verdict { color: #FCD34D; }
.trend-score-fair .trend-score-fill { background: linear-gradient(90deg, #F59E0B, #FCD34D); }
.trend-score-poor .trend-score-value { color: #FB7185; }
.trend-score-poor .trend-score-verdict { color: #FB7185; }
.trend-score-poor .trend-score-fill { background: linear-gradient(90deg, #E11D48, #FB7185); }
.trend-score-reason { margin: 0; font-size: 0.9rem; color: #C7CEDB; line-height: 1.55; }

/* Performance / posting-time insights */
.trend-insight-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.trend-insight { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(45, 212, 191, 0.18); display: grid; gap: 4px; }
.trend-insight-label { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: #7FE3D6; }
.trend-insight p { margin: 0; font-size: 0.88rem; line-height: 1.5; color: #E4E9F2; }

.trend-title-cards { display: grid; gap: 10px; }
.trend-title-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(45, 212, 191, 0.16); }
.trend-title-card p { margin: 0; color: #F4F6FB; font-size: 0.92rem; line-height: 1.45; }
.trend-title-index { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
  background: var(--trend-teal-soft); color: var(--trend-teal); font-size: 0.78rem; font-weight: 700; }
.trend-competitors { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.trend-competitors li { display: flex; justify-content: space-between; gap: 12px; font-size: 0.86rem; }
.trend-competitors a { color: #67E8F9; text-decoration: none; }
.trend-competitors a:hover { text-decoration: underline; }
.trend-competitors span { color: #98A2B3; white-space: nowrap; }
.trend-notes { display: grid; gap: 6px; font-size: 0.85rem; color: #98A2B3; }
.trend-notes p { margin: 0; }

/* Recreate panel */
.trend-recreate-panel { display: grid; gap: 12px; padding: 18px; border-radius: 16px;
  background: linear-gradient(150deg, rgba(34, 211, 238, 0.10), rgba(13, 148, 136, 0.06));
  border: 1px solid rgba(34, 211, 238, 0.28); }
.trend-recreate-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.trend-recreate-head h5 { margin: 0; font-size: 0.95rem; color: #E6FFFB; letter-spacing: 0.01em; }
.trend-recreate-badge { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; color: #032B2F;
  background: linear-gradient(90deg, var(--trend-teal, #2DD4BF), var(--trend-cyan, #22D3EE)); }
.trend-recreate-badge-locked { background: rgba(255, 255, 255, 0.12); color: #A5B4C3; }
.trend-recreate-note { margin: 0; font-size: 0.86rem; line-height: 1.55; color: #C7CEDB; }
.trend-recreate-controls { display: grid; gap: 12px; }
.trend-aspect-group, .trend-style-group { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.trend-aspect-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: rgba(2, 22, 26, 0.35); border: 1px solid rgba(45, 212, 191, 0.20); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease; }
.trend-aspect-option:hover { border-color: rgba(45, 212, 191, 0.5); }
.trend-aspect-option input { margin-top: 3px; accent-color: #22D3EE; }
.trend-aspect-option span { display: grid; gap: 2px; }
.trend-aspect-option strong { font-size: 0.86rem; color: #E6FFFB; font-weight: 600; }
.trend-aspect-option small { font-size: 0.75rem; color: #93A7B8; }
.trend-aspect-option:has(input:checked) { border-color: rgba(34, 211, 238, 0.75); background: rgba(34, 211, 238, 0.12); }
.trend-recreate-button { border: none; border-radius: 12px; padding: 12px 18px; font-weight: 700; cursor: pointer;
  color: #04262B; background: linear-gradient(90deg, #2DD4BF, #22D3EE);
  box-shadow: 0 8px 20px rgba(34, 211, 238, 0.18); transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease; }
.trend-recreate-button:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(34, 211, 238, 0.26); }
.trend-recreate-button:disabled { opacity: 0.6; cursor: progress; transform: none; }
.trend-recreate-stage { margin-top: 6px; }
.trend-reset-actions { display: flex; justify-content: center; padding-top: 6px; }
.trend-check-another { width: min(100%, 280px); border: 1px solid rgba(45, 212, 191, 0.42); color: #A5F3EA; background: rgba(45, 212, 191, 0.08); border-radius: 12px; transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.trend-check-another:hover { background: rgba(45, 212, 191, 0.18); border-color: rgba(45, 212, 191, 0.72); color: #E6FFFB; transform: translateY(-1px); }
@media (max-width: 640px) {
  .trend-title-card { grid-template-columns: auto 1fr; }
  .trend-title-card .button { grid-column: 2; justify-self: start; }
  .trend-score-value { font-size: 2.8rem; }
  .trend-recreate-head { flex-wrap: wrap; }
}

/* Payment gateway button colors */
.gateway-button { padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: opacity 0.2s; }
.gateway-button:hover { opacity: 0.85; }
.gateway-paystack { background: #00C3F7; color: #000; }
.gateway-flutterwave { background: #F5A623; color: #000; }
.gateway-korapay { background: #7C3AED; color: #fff; }
.gateway-button small { font-size: 11px; opacity: 0.8; margin-left: 4px; }

/* Foreign Number dialog */
.foreign-number-body { padding: 4px 0 8px; }
.foreign-number-intro p { margin: 0 0 12px; line-height: 1.55; }
.foreign-number-status p { margin: 8px 0; line-height: 1.55; }
.foreign-number-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  margin: 10px 0;
  word-break: break-all;
}
.foreign-number-meta { font-size: 0.85rem; opacity: 0.7; }
.foreign-number-disclaimer {
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 10px 12px;
  border-left: 3px solid #F5A623;
  background: rgba(245, 166, 35, 0.08);
  border-radius: 6px;
}


/* ── Scan My Channel (scan-channel) ───────────────────────────────────────── */
.scan-dialog-panel {
  max-width: 860px;
  width: min(860px, 96vw);
}
.scan-tabs {
  display: flex;
  gap: 10px;
  padding: 0 24px;
  margin-top: 4px;
  border-bottom: 1px solid rgba(245, 166, 35, 0.16);
}
.scan-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 10px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(237, 240, 245, 0.72);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.scan-tab:hover {
  color: #f5a623;
}
.scan-tab.active {
  color: #f5a623;
  border-bottom-color: #f5a623;
}
.scan-tab-cost {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(245, 166, 35, 0.65);
}
.scan-tab-panels {
  padding-top: 4px;
}
.scan-audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 2px;
}
.scan-audience-chip {
  position: relative;
  display: block;
  cursor: pointer;
}
.scan-audience-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.scan-audience-chip span {
  display: block;
  padding: 8px 10px;
  border: 1px solid rgba(245, 166, 35, 0.22);
  border-radius: 999px;
  background: rgba(245, 166, 35, 0.06);
  color: rgba(237, 240, 245, 0.82);
  font-size: 0.82rem;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.scan-audience-chip input:checked + span {
  background: rgba(245, 166, 35, 0.22);
  border-color: #f5a623;
  color: #ffd98a;
}
.scan-audience-chip input:focus-visible + span {
  outline: 2px solid #f5a623;
  outline-offset: 2px;
}
.scan-result-shell {
  margin: 18px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.scan-score-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.scan-score-ring {
  --scan-score: 0;
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background:
    radial-gradient(closest-side, #12151c 78%, transparent 79% 100%),
    conic-gradient(var(--scan-ring-color, #f5a623) calc(var(--scan-score) * 1%), rgba(255, 255, 255, 0.08) 0);
}
.scan-score-good .scan-score-ring { --scan-ring-color: #22c55e; }
.scan-score-mid .scan-score-ring { --scan-ring-color: #f5a623; }
.scan-score-low .scan-score-ring { --scan-ring-color: #ef4444; }
.scan-score-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.scan-score-max {
  font-size: 0.72rem;
  color: rgba(237, 240, 245, 0.55);
}
.scan-score-good .scan-score-value { color: #4ade80; }
.scan-score-mid .scan-score-value { color: #fbbf24; }
.scan-score-low .scan-score-value { color: #f87171; }
.scan-score-body {
  min-width: 0;
}
.scan-score-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 166, 35, 0.85);
  margin-bottom: 6px;
}
.scan-score-reason {
  margin: 0;
  color: rgba(237, 240, 245, 0.85);
  font-size: 0.92rem;
  line-height: 1.5;
}
.scan-cached-note {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  font-size: 0.72rem;
  font-weight: 600;
}
.scan-channel-card,
.scan-kit-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.scan-channel-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.scan-channel-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(245, 166, 35, 0.15);
}
.scan-channel-id {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.scan-channel-id strong {
  color: #fff;
  font-size: 1rem;
}
.scan-channel-id span {
  color: rgba(237, 240, 245, 0.6);
  font-size: 0.8rem;
}
.scan-niche-pill {
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(245, 166, 35, 0.14);
  border: 1px solid rgba(245, 166, 35, 0.35);
  color: #ffd98a !important;
  font-size: 0.72rem !important;
  font-weight: 600;
}
.scan-video-chevron {
  color: rgba(237, 240, 245, 0.5);
  transition: transform 0.2s ease;
  flex: 0 0 auto;
}
.scan-channel-card.open .scan-video-chevron,
.scan-video-card.open .scan-video-chevron {
  transform: rotate(180deg);
}
.scan-channel-body {
  padding: 4px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.scan-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.scan-compare-col {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}
.scan-compare-suggested {
  background: rgba(245, 166, 35, 0.07);
  border-color: rgba(245, 166, 35, 0.28);
}
.scan-suggestion-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(245, 166, 35, 0.8);
  margin-bottom: 6px;
}
.scan-compare-col p,
.scan-keywords p,
.scan-niche-note p,
.scan-suggestion-block p {
  margin: 0;
  color: rgba(237, 240, 245, 0.88);
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.scan-current-text {
  color: rgba(237, 240, 245, 0.6) !important;
}
.scan-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.scan-rating {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  color: rgba(237, 240, 245, 0.55);
  font-style: italic;
}
.scan-suggested-desc {
  max-height: 260px;
  overflow-y: auto;
}
.scan-keywords,
.scan-niche-note {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.scan-videos-head h3 {
  margin: 0 0 2px;
  color: #fff;
  font-size: 1.02rem;
}
.scan-videos-head p {
  margin: 0;
  color: rgba(237, 240, 245, 0.55);
  font-size: 0.82rem;
}
.scan-video-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scan-video-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.scan-video-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.scan-video-thumb-wrap {
  flex: 0 0 auto;
}
.scan-video-thumb {
  width: 120px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: rgba(245, 166, 35, 0.12);
}
.scan-video-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scan-video-title {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.scan-video-stats {
  color: rgba(237, 240, 245, 0.5);
  font-size: 0.76rem;
}
.scan-video-body {
  padding: 4px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scan-suggestion-block {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245, 166, 35, 0.06);
  border: 1px solid rgba(245, 166, 35, 0.2);
}
.scan-video-actions {
  display: flex;
  justify-content: flex-end;
}
.scan-copy-btn {
  padding: 5px 12px !important;
  font-size: 0.76rem !important;
}
.scan-copied {
  border-color: #22c55e !important;
  color: #86efac !important;
}
.scan-result-actions {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}
.scan-result-actions .scan-copy-btn {
  padding: 10px 22px !important;
  font-size: 0.9rem !important;
}
.scan-kit-head h3 {
  margin: 0 0 2px;
  color: #fff;
  font-size: 1.05rem;
}
.scan-kit-head p {
  margin: 0 0 6px;
  color: rgba(237, 240, 245, 0.6);
  font-size: 0.85rem;
}
.scan-kit-card {
  padding: 14px 16px;
}
.scan-kit-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.scan-kit-card-head strong {
  flex: 1;
  color: #fff;
  font-size: 0.95rem;
}
.scan-kit-icon {
  font-size: 1.1rem;
}
.scan-kit-text {
  margin: 0;
  color: rgba(237, 240, 245, 0.88);
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow-y: auto;
}
.scan-kit-hint {
  display: block;
  margin-top: 8px;
  color: rgba(237, 240, 245, 0.5);
  font-size: 0.76rem;
}
.scan-name-list {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: rgba(237, 240, 245, 0.9);
  font-size: 0.92rem;
}
.scan-name-list li::marker {
  color: #f5a623;
  font-weight: 700;
}
@media (max-width: 640px) {
  .scan-dialog-panel {
    width: 100vw;
    max-width: 100vw;
  }
  .scan-tabs {
    padding: 0 14px;
  }
  .scan-tab {
    font-size: 0.82rem;
    padding: 10px 6px 12px;
  }
  .scan-result-shell {
    margin: 14px 14px 18px;
  }
  .scan-score-card {
    flex-direction: column;
    text-align: center;
  }
  .scan-compare {
    grid-template-columns: 1fr;
  }
  .scan-video-grid {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }
  .scan-video-card {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
  .scan-video-head {
    flex-wrap: wrap;
  }
  .scan-video-thumb {
    width: 100%;
  }
  .scan-video-thumb-wrap {
    width: 100%;
  }
  .scan-audience-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
}

/* Mobile dialog scrolling fix */
@media (max-width: 768px) {
  .feature-dialog {
    padding: 0;
    align-items: flex-end;
  }
  .feature-dialog-panel {
    width: 100%;
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .feature-dialog-header {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 18px 20px 14px;
  }
  .feature-dialog-panel .feature-dialog-actions {
    padding-bottom: 20px;
  }
  .foreign-number-body,
  .feature-workflow-form {
    padding-bottom: 16px;
  }
}

/* Mobile dialog bottom nav clearance fix */
@media (max-width: 768px) {
  .feature-dialog-panel {
    max-height: calc(100vh - 130px);
    max-height: calc(100dvh - 130px);
    margin-bottom: 60px;
  }
  .feature-dialog-panel .feature-dialog-actions,
  .feature-dialog-panel .foreign-number-body {
    padding-bottom: 30px;
  }
}
