:root {
  --bg: #02070d;
  --panel: rgba(9, 26, 46, .78);
  --panel-solid: #091a2e;
  --line: rgba(255,255,255,.1);
  --text: #f8fbff;
  --muted: #aab8c8;
  --blue: #16488f;
  --blue-bright: #2c78e8;
  --yellow: #fcde07;
  --radius: 26px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; }
body {
  background:
    radial-gradient(circle at 15% 0%, rgba(22,72,143,.26), transparent 38%),
    radial-gradient(circle at 90% 20%, rgba(252,222,7,.08), transparent 28%),
    linear-gradient(180deg, #061526 0%, #02070d 62%);
}
button, input { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
.app-shell { width: min(1240px, calc(100% - 28px)); margin: 0 auto; padding: 24px 0 30px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-weight: 900; color: #061526; background: var(--yellow); box-shadow: 0 14px 34px rgba(252,222,7,.18); }
.brand div { display: grid; gap: 3px; }
.brand strong { font-size: 16px; }
.brand span:last-child { font-size: 12px; color: var(--muted); }
.privacy-badge { font-size: 12px; color: #dce8f7; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.main-grid { display: grid; grid-template-columns: minmax(0, 760px) minmax(280px, 1fr); gap: 24px; align-items: start; }
.editor-card, .info-card { border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(20px); box-shadow: 0 28px 70px rgba(0,0,0,.36); border-radius: var(--radius); }
.editor-card { padding: 18px; }
.stage-wrap { position: relative; width: min(100%, 480px); aspect-ratio: 9 / 16; margin: 0 auto; overflow: hidden; border-radius: 22px; background: #02070d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 20px 50px rgba(0,0,0,.4); touch-action: none; }
#stage { display: block; width: 100%; height: 100%; }
.empty-state { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 42px; background: linear-gradient(180deg, rgba(6,27,52,.7), rgba(2,7,13,.8)); }
.empty-state h1 { margin: 22px 0 10px; font-size: clamp(26px, 5vw, 42px); line-height: 1.02; letter-spacing: -.04em; }
.empty-state p { max-width: 390px; margin: 0; color: var(--muted); line-height: 1.6; font-size: 14px; }
.face-guide { width: 34%; aspect-ratio: .78; border: 2px dashed rgba(255,255,255,.35); border-radius: 50% 50% 46% 46%; box-shadow: 0 0 0 999px rgba(0,0,0,.06); }
.camera-layer { position: absolute; inset: 0; background: #000; }
.camera-layer video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera-guide { position: absolute; left: 50%; top: 36%; translate: -50% -50%; width: 38%; aspect-ratio: .78; border: 2px solid rgba(255,255,255,.55); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.16); }
.camera-actions { position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 18px; }
.icon-button { border: 0; background: rgba(0,0,0,.42); color: white; padding: 10px; border-radius: 12px; }
.capture-button { width: 72px; height: 72px; border-radius: 50%; border: 4px solid white; background: rgba(255,255,255,.22); padding: 5px; }
.capture-button span { display: block; width: 100%; height: 100%; border-radius: inherit; background: white; }
.camera-actions .icon-button:last-child { justify-self: end; }
.working-badge { position: absolute; top: 16px; left: 50%; translate: -50% 0; z-index: 4; padding: 9px 12px; border-radius: 999px; background: rgba(0,0,0,.65); font-size: 12px; }
.hidden { display: none !important; }
.toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.primary-button, .secondary-button, .accent-button, .ghost-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 14px; padding: 0 16px; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .18s ease, opacity .18s ease, background .18s ease; }
.primary-button { color: white; background: linear-gradient(135deg, var(--blue-bright), var(--blue)); }
.secondary-button { color: white; border: 1px solid var(--line); background: rgba(255,255,255,.06); }
.accent-button { color: #061526; background: var(--yellow); }
.ghost-button { color: white; background: transparent; border: 1px solid var(--line); }
button:active, label:active { transform: scale(.98); }
button:disabled { cursor: not-allowed; opacity: .38; }
.adjustments { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.adjustments.disabled { opacity: .45; pointer-events: none; }
.control-row { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 12px; margin: 12px 0; }
.control-row label { color: #dce8f7; font-size: 13px; font-weight: 600; }
input[type="range"] { width: 100%; accent-color: var(--yellow); }
.hint { margin: 13px 0 16px; color: var(--muted); text-align: center; font-size: 12px; }
.action-grid { display: grid; grid-template-columns: .8fr 1fr 1fr; gap: 10px; }
.info-card { padding: 30px; position: sticky; top: 20px; }
.eyebrow { display: inline-block; color: var(--yellow); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.info-card h2 { margin: 12px 0 12px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.04em; line-height: 1.05; }
.info-card > p { color: var(--muted); line-height: 1.65; font-size: 14px; }
.steps { display: grid; gap: 10px; margin: 24px 0; }
.steps > div { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; padding: 13px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.steps span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: #061526; background: var(--yellow); font-weight: 900; }
.steps p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.steps strong { display: block; color: white; font-size: 13px; }
.legal-note { padding: 16px; border-radius: 16px; border: 1px solid rgba(252,222,7,.18); background: rgba(252,222,7,.06); }
.legal-note strong { font-size: 13px; }
.legal-note p { margin: 7px 0 0; color: #c8d3df; font-size: 11px; line-height: 1.55; }
footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; color: #74869b; font-size: 11px; padding: 0 6px; }
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .info-card { position: static; }
}
@media (max-width: 540px) {
  .app-shell { width: min(100% - 16px, 1240px); padding-top: 12px; }
  .topbar { margin-bottom: 12px; }
  .privacy-badge { display: none; }
  .editor-card { padding: 8px; border-radius: 20px; }
  .stage-wrap { border-radius: 16px; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .action-grid { grid-template-columns: 1fr 1fr; }
  .action-grid .ghost-button { grid-column: 1 / -1; order: 3; }
  .info-card { padding: 22px; }
  footer { flex-direction: column; }
}
