:root {
  color-scheme: light;
  --ink: #17233b;
  --muted: #68758a;
  --subtle: #8b97aa;
  --paper: #f7fbff;
  --card: rgba(255, 255, 255, 0.96);
  --panel: #eef7fb;
  --line: rgba(42, 72, 107, 0.14);
  --brand: #1769aa;
  --brand-strong: #0b4f8a;
  --clinical: #0e9f9a;
  --clinical-soft: #dff6f4;
  --navy: #102a43;
  --danger: #b42318;
  --success: #087f5b;
  --shadow: 0 18px 48px rgba(31, 71, 112, 0.14);
  --radius: 20px;
  font-family: "Noto Sans SC", "Noto Sans TC", "Source Han Sans SC", "Source Han Sans TC", "HarmonyOS Sans", "MiSans", "Aptos", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 105, 170, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 105, 170, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 15% 0%, rgba(14, 159, 154, 0.16), transparent 30%),
    radial-gradient(circle at 95% 12%, rgba(23, 105, 170, 0.18), transparent 32%),
    linear-gradient(180deg, #f8fcff 0%, #eef7fb 52%, #f7fbff 100%);
  background-size: 22px 22px, 22px 22px, auto, auto, auto;
  background-attachment: fixed;
}

button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }

.app-shell {
  width: min(100%, 500px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 10px max(18px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.brand-mark { display: flex; align-items: center; gap: 9px; min-width: 0; }
.logo-dot {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: transparent;
  background: linear-gradient(145deg, #1f7fbd, #0e9f9a);
  box-shadow: 0 12px 28px rgba(23, 105, 170, 0.22);
}
.logo-dot::before, .logo-dot::after {
  content: "";
  position: absolute;
  border-radius: 2px;
  background: #fff;
}
.logo-dot::before { width: 20px; height: 5px; }
.logo-dot::after { width: 5px; height: 20px; }
.brand-title { font-size: 15px; font-weight: 820; letter-spacing: -0.01em; }
.brand-subtitle { color: var(--muted); font-size: 11px; margin-top: 1px; }

.lang-row { display: flex; gap: 5px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.82); border: 1px solid var(--line); }
.lang-row button {
  min-width: 36px;
  padding: 7px 8px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}
.lang-row button.active { background: var(--brand); color: white; box-shadow: 0 6px 16px rgba(23, 105, 170, 0.2); }

.card {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  backdrop-filter: blur(16px);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--brand), var(--clinical));
}

.hero { padding: 18px; min-height: calc(100dvh - 24px); display: flex; flex-direction: column; justify-content: center; }
.kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 6px 9px;
  border-radius: 999px;
  background: #e8f3fb;
  border: 1px solid rgba(23, 105, 170, 0.12);
}
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--clinical); }

h1, h2, h3 { margin: 0; color: var(--navy); letter-spacing: -0.025em; }
h1 { margin-top: 12px; font-size: clamp(28px, 8vw, 40px); line-height: 1.04; }
h2 { font-size: 24px; line-height: 1.1; }
h3 { font-size: 16px; }
p { color: var(--muted); line-height: 1.5; margin: 9px 0; }

.stage-pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 8px 0 13px; }
.stage-pills span { height: 5px; border-radius: 999px; background: #d9e7f2; }
.stage-pills span.active { background: linear-gradient(90deg, var(--brand), var(--clinical)); }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 14px 0 2px;
  padding: 5px;
  border-radius: 16px;
  background: #eef5fb;
  border: 1px solid var(--line);
}
.auth-tabs button {
  min-height: 42px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}
.auth-tabs button.active { background: #fff; color: var(--brand-strong); box-shadow: 0 8px 20px rgba(31, 71, 112, 0.1); }

.form-grid { display: grid; gap: 12px; margin-top: 14px; }
.compact-form { gap: 10px; }
.field { display: grid; gap: 6px; }
.field label, .field-label { color: var(--navy); font-size: 13px; font-weight: 820; }
.field small, .helper-text { color: var(--subtle); font-size: 12px; line-height: 1.45; }
.input, select, textarea {
  width: 100%;
  min-height: 47px;
  padding: 12px 13px;
  border-radius: 14px;
  color: var(--ink);
  background: #fbfdff;
  border: 1px solid #cfdeeb;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
textarea { min-height: 96px; resize: vertical; }
.input:focus, select:focus, textarea:focus {
  border-color: rgba(23, 105, 170, 0.62);
  box-shadow: 0 0 0 4px rgba(23, 105, 170, 0.12);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-grid.three { grid-template-columns: repeat(3, 1fr); }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #cfdeeb;
  background: #fbfdff;
  color: var(--muted);
  text-align: center;
  font-weight: 780;
}
.choice input { position: absolute; inset: 0; opacity: 0; }
.choice:has(input:checked) { background: var(--clinical-soft); color: #06615e; border-color: rgba(14, 159, 154, 0.36); }
.same-person-card {
  justify-content: flex-start;
  min-height: 56px;
  padding-left: 48px;
  text-align: left;
  background: linear-gradient(135deg, #f7fbff, #eef7fb);
}
.same-person-card::before {
  content: "";
  position: absolute;
  left: 14px;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 2px solid #91a9bd;
  background: white;
}
.same-person-card:has(input:checked)::before {
  border-color: var(--clinical);
  background: var(--clinical);
  box-shadow: inset 0 0 0 4px white;
}
.subject-autofill {
  margin-top: -2px;
  padding: 10px 12px;
  border-radius: 14px;
  color: #075d5a;
  background: var(--clinical-soft);
  border: 1px solid rgba(14, 159, 154, 0.2);
  font-size: 13px;
  line-height: 1.45;
}
.subject-fields.is-disabled { opacity: 0.62; }

.primary, .secondary, .ghost, .danger {
  width: 100%;
  min-height: 49px;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary { color: white; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); box-shadow: 0 14px 26px rgba(23, 105, 170, 0.22); }
.secondary { color: #075d5a; background: var(--clinical-soft); border: 1px solid rgba(14, 159, 154, 0.18); }
.ghost { color: var(--brand-strong); background: #f7fbff; border: 1px solid #cfdeeb; }
.danger { color: white; background: var(--danger); }
.primary[disabled], .secondary[disabled], .ghost[disabled] { opacity: 0.55; }

.actions { display: grid; gap: 10px; margin-top: 16px; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.notice {
  margin: 10px 0;
  padding: 11px 13px;
  border-radius: 14px;
  color: #075d5a;
  background: var(--clinical-soft);
  border: 1px solid rgba(14, 159, 154, 0.22);
}
.notice.error { color: #842029; background: #fff1f0; border-color: rgba(180, 35, 24, 0.22); }

.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.summary-strip div, .duration-list div {
  border-radius: 14px;
  background: #f7fbff;
  border: 1px solid var(--line);
  padding: 11px;
}
.summary-strip b { display: block; font-size: 17px; color: var(--brand-strong); }
.summary-strip span { color: var(--muted); font-size: 12px; }

.capture-card { overflow: hidden; padding: 0; }
.capture-card::before { height: 5px; }
.capture-head { padding: 16px 16px 10px; }
.progress-ring { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.step-count {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--brand), var(--clinical));
  font-size: 19px;
  font-weight: 900;
}
.step-meter { flex: 1; height: 8px; border-radius: 999px; background: #dcebf5; overflow: hidden; }
.step-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--clinical)); }

.guide-frame {
  margin: 0 16px 12px;
  min-height: 230px;
  border-radius: 18px;
  overflow: hidden;
  background: #0f2537;
  position: relative;
  border: 1px solid rgba(16, 42, 67, 0.16);
  display: grid;
  place-items: center;
}
.guide-frame.landscape { min-height: 178px; aspect-ratio: 4 / 3; }
.guide-frame.portrait { min-height: 240px; aspect-ratio: 3 / 4; }
.guide-frame img { width: 100%; height: 100%; min-height: inherit; object-fit: contain; display: block; }
.preview-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 11px;
  border-radius: 999px;
  color: white;
  background: rgba(16, 42, 67, 0.78);
  font-size: 12px;
  font-weight: 820;
  z-index: 4;
}
.preview-badge.pending { background: rgba(180, 118, 0, 0.86); }

.guide-overlay {
  position: absolute;
  inset: 10%;
  z-index: 3;
  pointer-events: none;
  border: 2px dashed rgba(255,255,255,0.9);
  border-radius: 26px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
}
.guide-overlay.cross::before, .guide-overlay.cross::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.18);
}
.guide-overlay.cross::before { width: 2px; top: -5%; bottom: -5%; left: 50%; }
.guide-overlay.cross::after { height: 2px; left: -5%; right: -5%; top: 52%; }
.guide-overlay.bite { inset: 22% 9%; border-radius: 20px; }
.guide-overlay.bite::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 2px;
  background: rgba(255,255,255,0.88);
}
.guide-overlay.face { inset: 9% 17%; border-radius: 46% 44% 40% 42%; }
.guide-overlay.privacy i {
  position: absolute;
  left: 17%;
  right: 17%;
  top: 23%;
  height: 9%;
  border-radius: 7px;
  background: rgba(0,0,0,0.88);
}
.guide-overlay.arch { inset: 15% 18%; border-radius: 50% 50% 42% 42%; }
.guide-overlay.arch::after {
  content: "";
  position: absolute;
  inset: 15% 12%;
  border: 2px solid rgba(255,255,255,0.85);
  border-top: 0;
  border-radius: 0 0 50% 50%;
}
.guide-overlay.arch.upper::after { transform: rotate(180deg); }

.tips { display: grid; gap: 7px; margin: 10px 16px 0; padding: 0 0 12px; }
.tip { display: flex; gap: 8px; color: var(--muted); font-size: 13px; line-height: 1.38; }
.tip::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; margin-top: 6px; border-radius: 999px; background: var(--clinical); }
.photo-input { display: none; }
.capture-actions { padding: 0 16px 16px; display: grid; gap: 9px; }

.camera-panel {
  margin: 0 16px 12px;
  padding: 10px;
  border-radius: 18px;
  background: #0f2537;
  border: 1px solid rgba(16, 42, 67, 0.18);
}
.camera-stage {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #08131d;
  min-height: 220px;
  display: grid;
  place-items: center;
}
.camera-stage.landscape { min-height: 178px; aspect-ratio: 4 / 3; }
.camera-stage.portrait { min-height: 240px; aspect-ratio: 3 / 4; }
.camera-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Use the hand-made transparent dashed guide PNGs on the live camera. */
.camera-guide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 4;
}

.camera-msg {
  position: absolute;
  inset: auto 12px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: white;
  background: rgba(16, 42, 67, 0.78);
  font-size: 13px;
  z-index: 5;
}
.camera-row { margin: 10px 0; }



html.is-shooting,
body.is-shooting {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body.is-shooting {
  position: fixed;
  inset: 0;
  width: 100%;
}
.is-shooting .app-shell {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 500px);
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: max(6px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
}
.is-shooting .topbar {
  flex: 0 0 auto;
  margin-bottom: 6px;
}
.is-shooting .brand-subtitle { display: none; }
.guide-label {
  top: 12px;
  bottom: auto;
  background: rgba(14, 159, 154, 0.86);
}
.photo-status {
  margin: 0 16px 12px;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  background: #f7fbff;
  border: 1px solid var(--line);
}
.photo-status.pending { border-color: rgba(180, 118, 0, 0.26); background: #fff8e8; }
.photo-status img {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f2537;
}
.photo-status b { display: block; color: var(--brand-strong); font-size: 14px; }
.photo-status span { color: var(--muted); font-size: 12px; }
.guide-actions { padding-top: 4px; }
.shoot-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.shoot-card .notice {
  flex: 0 0 auto;
  margin: 10px 12px 0;
}
.shoot-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 12px 10px;
}
.shoot-head h2 { margin-top: 8px; }
.shoot-head p { margin: 5px 0 0; font-size: 13px; }
.shoot-head .ghost {
  width: auto;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  white-space: nowrap;
}
.shoot-stage {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 12px;
  border-radius: 18px;
  overflow: hidden;
  background: #0f2537;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  border: 1px solid rgba(16, 42, 67, 0.16);
}
.shoot-preview,
.shoot-empty {
  position: relative;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0f2537;
}
.shoot-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.shoot-empty {
  padding: 22px;
  text-align: center;
  color: white;
  background:
    radial-gradient(circle at 50% 30%, rgba(14,159,154,0.28), transparent 38%),
    linear-gradient(160deg, #0f2537, #07131e);
}
.shoot-empty h3 { color: white; margin-top: 10px; }
.shoot-empty p { color: rgba(255,255,255,0.74); max-width: 280px; }
.shoot-empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: white;
  border: 2px dashed rgba(255,255,255,0.72);
  font-size: 30px;
  font-weight: 800;
}
.shoot-card .camera-panel {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
}
.shoot-card .camera-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  aspect-ratio: auto;
}
.shoot-card .camera-stage.landscape,
.shoot-card .camera-stage.portrait {
  min-height: 0;
  aspect-ratio: auto;
}
.shoot-card .camera-row,
.shoot-card .camera-panel > .secondary {
  flex: 0 0 auto;
}
.shoot-actions {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), #fff);
}
.shoot-actions .primary,
.shoot-actions .secondary,
.shoot-actions .ghost,
.shoot-card .camera-row .primary,
.shoot-card .camera-row .ghost,
.shoot-card .camera-panel > .secondary {
  min-height: 44px;
  border-radius: 12px;
  padding: 9px 11px;
}

@media (max-height: 700px) {
  .is-shooting .topbar { margin-bottom: 4px; }
  .shoot-head { padding: 10px 10px 8px; }
  .shoot-head h2 { margin-top: 6px; font-size: 21px; }
  .shoot-head p { display: none; }
  .shoot-stage { margin: 0 10px; }
  .shoot-actions { gap: 6px; padding: 8px 10px 10px; }
  .shoot-actions .primary,
  .shoot-actions .secondary,
  .shoot-actions .ghost,
  .shoot-card .camera-row .primary,
  .shoot-card .camera-row .ghost,
  .shoot-card .camera-panel > .secondary { min-height: 40px; padding: 8px 10px; }
  .shoot-card .camera-row { margin: 8px 0; }
}

.upload-status { display: grid; gap: 12px; }
.loader { height: 10px; border-radius: 999px; background: #dcebf5; overflow: hidden; }
.loader i { display: block; height: 100%; width: var(--pct, 0%); background: linear-gradient(90deg, var(--brand), var(--clinical)); transition: width 0.25s ease; }

.check-list { display: grid; gap: 10px; margin-top: 14px; }
.check-list label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  background: #f7fbff;
  border: 1px solid var(--line);
}
.check-list input { margin-top: 4px; }

.duration-list { display: grid; gap: 8px; margin-top: 14px; }
.duration-list div { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.duration-list b { color: var(--brand-strong); }

details.api-box { margin-top: 14px; color: var(--muted); }
details.api-box summary { font-weight: 820; color: var(--brand-strong); }
.footer-note { text-align: center; font-size: 12px; color: var(--muted); margin: 8px 0; }
.hidden { display: none !important; }

@media (max-height: 760px) {
  .app-shell { padding-top: max(6px, env(safe-area-inset-top)); }
  .topbar { margin-bottom: 6px; }
  .brand-subtitle, .stage-pills { display: none; }
  .card { padding: 14px; }
  .hero { justify-content: flex-start; min-height: auto; }
  .form-grid { gap: 9px; }
  .guide-frame.landscape, .camera-stage.landscape { min-height: 150px; }
  .guide-frame.portrait, .camera-stage.portrait { min-height: 205px; }
  .tips { gap: 5px; }
}

@media (max-width: 370px) {
  .two-col, .action-row { grid-template-columns: 1fr; }
  h2 { font-size: 22px; }
  .guide-frame.landscape, .camera-stage.landscape { min-height: 150px; }
}

@media (prefers-reduced-motion: no-preference) {
  .card { animation: clinical-rise 260ms ease both; }
  @keyframes clinical-rise { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
}

/* Keep the shooting screen truly single-viewport even when compact media rules fire. */
.is-shooting .shoot-card { padding: 0; }
.is-shooting .action-row { grid-template-columns: 1fr 1fr; }

/* 20260526 no-scroll capture tightening */

/* Capture flow is intentionally one-screen: no body scroll on guide or shooting pages. */
html.is-capture-flow,
body.is-capture-flow {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body.is-capture-flow {
  position: fixed;
  inset: 0;
  width: 100%;
}
.is-capture-flow.app-shell,
.is-capture-flow .app-shell {
  position: fixed;
  inset: 0 auto 0 50%;
  transform: translateX(-50%);
  width: min(100%, 500px);
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: max(6px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
}
.is-capture-flow .topbar {
  flex: 0 0 auto;
  margin-bottom: 5px;
}
.is-capture-flow .brand-subtitle { display: none; }
.is-capture-flow .logo-dot {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}
.is-capture-flow .logo-dot::before { width: 17px; height: 4px; }
.is-capture-flow .logo-dot::after { width: 4px; height: 17px; }
.is-capture-flow .brand-title { font-size: 14px; }
.is-capture-flow .lang-row { gap: 3px; padding: 3px; }
.is-capture-flow .lang-row button {
  min-width: 32px;
  padding: 6px 7px;
  font-size: 11px;
}
.is-capture-flow .capture-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.is-capture-flow .capture-card::before { height: 4px; }
.is-capture-flow .capture-head {
  flex: 0 0 auto;
  padding: 10px 12px 6px;
}
.is-capture-flow .progress-ring {
  gap: 8px;
  margin-bottom: 6px;
}
.is-capture-flow .step-count {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 16px;
}
.is-capture-flow .step-meter { height: 6px; }
.is-capture-flow h2 { font-size: 21px; }
.is-capture-flow .capture-head p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.28;
}
.is-capture-flow .kicker {
  padding: 5px 8px;
  font-size: 10px;
}
.is-capture-flow .guide-card .guide-frame {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 12px 6px;
  aspect-ratio: auto;
}
.is-capture-flow .guide-card .guide-frame.landscape,
.is-capture-flow .guide-card .guide-frame.portrait {
  min-height: 0;
  aspect-ratio: auto;
}
.is-capture-flow .guide-frame img {
  min-height: 0;
  height: 100%;
  object-fit: contain;
}
.is-capture-flow .tips {
  flex: 0 0 auto;
  gap: 3px;
  margin: 4px 12px 0;
  padding: 0 0 5px;
}
.is-capture-flow .tip {
  gap: 6px;
  font-size: 12px;
  line-height: 1.22;
}
.is-capture-flow .tip::before {
  width: 5px;
  height: 5px;
  flex-basis: 5px;
  margin-top: 5px;
}
.is-capture-flow .photo-status {
  flex: 0 0 auto;
  grid-template-columns: 42px 1fr;
  margin: 0 12px 6px;
  padding: 6px;
}
.is-capture-flow .photo-status img {
  width: 42px;
  height: 42px;
}
.is-capture-flow .capture-actions,
.is-capture-flow .shoot-actions {
  flex: 0 0 auto;
  gap: 6px;
  padding: 6px 12px 10px;
}
.is-capture-flow .primary,
.is-capture-flow .secondary,
.is-capture-flow .ghost,
.is-capture-flow .danger {
  min-height: 40px;
  border-radius: 12px;
  padding: 8px 10px;
}
.capture-progress-note {
  min-height: 22px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}
.is-shooting .topbar { display: none; }
.is-shooting .shoot-card { padding: 0; }
.is-shooting .shoot-head {
  padding: 10px 10px 8px;
}
.is-shooting .shoot-head h2 {
  margin-top: 6px;
  font-size: 20px;
}
.is-shooting .shoot-head p { display: none; }
.is-shooting .shoot-head .ghost {
  min-height: 34px;
  padding: 7px 9px;
}
.is-shooting .shoot-stage {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 10px;
}
.is-shooting .shoot-actions {
  gap: 6px;
  padding: 8px 10px 10px;
}
.is-shooting .camera-panel { padding: 6px; }
.is-shooting .camera-row { margin: 6px 0; }
.is-shooting .action-row { grid-template-columns: 1fr 1fr; }
.is-shooting .shoot-actions .primary,
.is-shooting .shoot-actions .secondary,
.is-shooting .shoot-actions .ghost,
.is-shooting .camera-row .primary,
.is-shooting .camera-row .ghost,
.is-shooting .camera-panel > .secondary {
  min-height: 40px;
  padding: 8px 10px;
}

@media (max-height: 620px) {
  .is-capture-flow .lang-row { display: none; }
  .is-capture-flow .capture-head p { display: none; }
  .is-capture-flow .capture-head { padding-top: 8px; }
  .is-capture-flow .tips { gap: 2px; }
  .is-capture-flow .tip { font-size: 11px; line-height: 1.16; }
  .is-capture-flow .primary,
  .is-capture-flow .secondary,
  .is-capture-flow .ghost,
  .is-capture-flow .danger { min-height: 36px; padding: 7px 9px; }
  .is-shooting .shoot-head { padding: 8px 9px 6px; }
  .is-shooting .shoot-head h2 { font-size: 18px; }
}

/* 20260527 guide ratio lock */

/* Keep the real 375x667 dashed overlay from being squashed in the camera viewport. */
.is-shooting .shoot-stage {
  align-items: center;
  justify-content: center;
  background: #050b10;
}
.is-shooting .shoot-card .camera-panel {
  align-items: center;
  justify-content: center;
  background: #050b10;
}
.is-shooting .shoot-card .camera-stage {
  flex: 1 1 auto;
  align-self: center;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 375 / 667;
}
.is-shooting .camera-guide-img {
  object-fit: contain;
}
.is-shooting .shoot-card .camera-row,
.is-shooting .shoot-card .camera-panel > .secondary {
  width: 100%;
}
