:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif;
  --navy: #061b41;
  --light: #f7faff;
  --blue: #102e66;
  --muted: #aabbd9;
  --red: #f13c46;
  --viewport-h: 100dvh;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--navy); }
body { margin: 0; min-height: 100%; background: radial-gradient(ellipse at 50% -15%, #254f91 0%, #0b295b 42%, #051a3e 85%); color: var(--light); }
button { font: inherit; -webkit-tap-highlight-color: transparent; cursor: pointer; }
button:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible { outline: 3px solid #91bbff; outline-offset: 3px; }
[hidden] { display: none !important; }
.page { width: min(100%, 740px); min-height: var(--viewport-h); margin: auto; display: flex; flex-direction: column; align-items: center; padding: max(13px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)); }
.heading { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; min-height: 48px; }
.heading-mark { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; background: linear-gradient(140deg, #f13f4c 0%, #ec3f40 46%, #ffac54 100%); box-shadow: 0 7px 20px #0003; color: #fff; font-size: 23px; }
.heading-copy h1 { font-size: clamp(17px, 4.2vw, 22px); line-height: 1.24; letter-spacing: .1px; margin: 0 0 3px; }
.heading-copy p { font-size: clamp(10px, 2.65vw, 12px); margin: 0; color: #b8cae9; letter-spacing: .18px; }
.camera-section { min-height: 0; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; width: 100%; padding-top: 8px; padding-bottom: 4px; }
.frame-stage { width: min(100%, 48vh, 475px); width: min(100%, calc((100dvh - 205px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 0.6666667), 480px); aspect-ratio: 2 / 3; position: relative; flex: 0 0 auto; overflow: hidden; filter: drop-shadow(0 10px 20px rgb(0 4 18 / 35%)); }
.frame-art, .final-preview { position: absolute; z-index: 2; inset: 0; display: block; width: 100%; height: 100%; object-fit: fill; user-select: none; pointer-events: none; }
.final-preview { z-index: 3; }
.frame-stage.is-captured .camera-viewport, .frame-stage.is-captured .frame-art { visibility: hidden; }
.camera-viewport { position: absolute; z-index: 1; left: 25.68359375%; top: 31.51041667%; width: 48.92578125%; height: 44.59635417%; border-radius: 5.5% / 4%; overflow: hidden; background: #192d4d; }
#cameraVideo { display: block; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
#cameraVideo.not-mirrored { transform: none; }
.camera-placeholder { position: absolute; inset: 0; background: linear-gradient(145deg, #193863, #081c39); color: white; padding: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.placeholder-icon { width: 52px; height: 52px; padding: 12px; border-radius: 16px; background: #ffffff1c; display: grid; place-items: center; }
.placeholder-icon svg { width: 100%; height: 100%; }
.camera-placeholder p { margin: 0; font-size: clamp(11px, 3vw, 15px); line-height: 1.55; }
.inside-start, .inside-file { padding: 9px 13px; border: 0; border-radius: 12px; background: white; color: #0a2451; font-weight: 750; font-size: 12px; }
.inside-file { background: transparent; color: #e1edff; border: 1px solid #ffffff60; }
.status-area { flex: 0 0 auto; text-align: center; min-height: 24px; max-width: 610px; color: #d3e1fa; font-size: 12px; line-height: 1.45; margin: 3px 0 7px; }
.actions { flex: 0 0 auto; display: flex; width: 100%; justify-content: center; min-height: 65px; }
.live-actions, .result-actions { display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; }
.icon-button { flex: 0 0 54px; height: 54px; display: grid; place-items: center; color: #eaf1fd; background: #ffffff16; border: 1px solid #ffffff36; border-radius: 50%; }
.icon-button svg, .secondary-button svg, .primary-button svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.capture-button { min-width: 172px; max-width: 230px; height: 62px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 6px 19px; border: 1px solid #ff7a83; border-radius: 32px; background: linear-gradient(155deg, #fb4052, #ce1d33); color: #fff; font-weight: 800; font-size: 16px; box-shadow: 0 6px 22px #050f27a1; }
.capture-symbol { border: 2px solid #fff; border-radius: 50%; display: grid; place-items: center; width: 34px; height: 34px; }
.capture-symbol span { width: 24px; height: 24px; display: block; background: #fff; border-radius: 50%; }
.result-actions { flex-wrap: wrap; gap: 9px; }
.secondary-button, .primary-button { border-radius: 14px; padding: 13px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 700; min-height: 50px; }
.secondary-button { border: 1px solid #ffffff38; background: #ffffff16; color: white; }
.primary-button { border: 1px solid #f25b68; background: #ed3947; color: white; }
.note { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; text-align: center; max-width: 550px; font-size: 10px; line-height: 1.45; color: #b5c9e8; }
.note svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 360px) { .page { padding-left: 6px; padding-right: 6px; } .capture-button { min-width: 150px; } .icon-button { flex-basis: 46px; height: 46px; } .live-actions { gap: 8px; } .secondary-button, .primary-button { padding: 10px 9px; font-size: 12px; } }
@media (max-height: 635px) { .heading { min-height: 38px; } .heading-mark { width: 29px; height: 29px; } .frame-stage { width: min(100%, calc((100dvh - 176px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 0.6666667), 480px); } .camera-section { padding-top: 4px; } .status-area { margin-bottom: 3px; } .capture-button { height: 52px; } .note { margin-top: 5px; } }
@media (min-width: 768px) { .page { padding-top: 24px; padding-bottom: 24px; } .frame-stage { width: min(480px, calc((100dvh - 240px) * 0.6666667)); } }
