/* ==========================================================================
   Magic Ball Tester — design tokens & styles
   Tokens come from the Fishee design system (Figma → Tokens page).
   Light and dark values are the exact Color/* semantic mappings.
   ========================================================================== */

:root {
  /* -------- Light theme (default) -------- */
  --surface-bg: #f2f6f6;          /* Color/Surface/Quinary  (Brand-5) */
  --surface-card: #ffffff;        /* Color/Surface/Primary  (White) */
  --text-1: #000000;              /* Color/Text/Primary     (Black) */
  --text-2: #7c7c7c;              /* Color/Text/Secondary   (Grey-3) */
  --accent: #2a5968;              /* Color/Text/Quaternary  (Brand-1) */
  --grad-1: #18404d;              /* Gradient/Gradient1/Primary   (Brand-3) */
  --grad-2: #2a5968;              /* Gradient/Gradient1/Secondary (Brand-1) */
  --on-grad: #ffffff;             /* Color/Button/Secondary — label on primary btn */
  --btn-outline-border: #18404d;  /* Secondary btn border: Gradient1/Primary */
  --btn-outline-text: #2a5968;    /* Secondary btn label: Color/Button/Primary */
  --line: rgba(0, 0, 0, 0.55);    /* input underline: Text/Primary @ 0.5px */
  --shadow-card: 0 2px 5px rgba(193, 211, 211, 0.24);    /* Shadow/Surface-1 */
  --shadow-control: 0 2px 6px rgba(172, 184, 182, 0.4);  /* Shadow/Control-2 */
  --orb-glow: rgba(42, 89, 104, 0.35);

  /* -------- Shape & spacing -------- */
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-lg: 16px;
  --radius-xl: 32px;
  --radius-full: 360px;
  --sp-xs: 4px;
  --sp-s: 8px;
  --sp-m: 12px;
  --sp-l: 16px;
  --sp-xl: 24px;

  --font: "Inter", system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --surface-bg: #1a2e35;          /* Color/Surface/Quinary  (Grey-1) */
  --surface-card: #283d44;        /* Color/Surface/Primary  (Grey-2) */
  --text-1: #ffffff;              /* Color/Text/Primary     (White) */
  --text-2: #d3d3d3;              /* Color/Text/Secondary   (Grey-5) */
  --accent: #00ffc2;              /* Color/Text/Quaternary  (Brand-7) */
  --grad-1: #00bb8e;              /* Gradient/Gradient1/Primary   (Brand-8) */
  --grad-2: #00ffc2;              /* Gradient/Gradient1/Secondary (Brand-7) */
  --on-grad: #1a2e35;             /* Color/Button/Secondary dark — label on primary btn */
  --btn-outline-border: #00bb8e;  /* Secondary btn border: Gradient1/Primary dark */
  --btn-outline-text: #00ffc2;    /* Secondary btn label */
  --line: rgba(255, 255, 255, 0.5);
  --shadow-card: 0 2px 5px rgba(7, 17, 20, 0.53);        /* Shadow dark */
  --shadow-control: 0 2px 6px rgba(7, 17, 20, 0.53);
  --orb-glow: rgba(0, 255, 194, 0.25);
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  background: var(--surface-bg);
  color: var(--text-1);
  transition: background 0.25s ease, color 0.25s ease;
  padding-bottom: env(safe-area-inset-bottom);
}

img { display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--sp-m) + env(safe-area-inset-top)) var(--sp-l) var(--sp-m);
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface-bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* Vampire wordmark (assets/logo.svg) tinted with a token color via mask,
   so it stays readable in both light and dark mode */
.brand-logo {
  display: block;
  width: 112px;
  height: 28px;
  background: var(--accent);
  mask: url(../assets/logo.svg) no-repeat left center / contain;
  -webkit-mask: url(../assets/logo.svg) no-repeat left center / contain;
}

.header-controls {
  display: flex;
  gap: var(--sp-s);
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-full);
  background: var(--surface-card);
  color: var(--text-1);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-control);
}

/* Language dropdown — pill matching the icon buttons */
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  height: 36px;
  padding: 0 26px 0 12px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--surface-card);
  color: var(--text-1);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-control);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c7c7c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
[data-theme="dark"] .lang-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23d3d3d3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
.lang-select option { color: initial; }

/* show sun in dark mode, moon in light mode */
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ==========================================================================
   Views
   ========================================================================== */

.main {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--sp-m);
}

.view { display: none; }
.view.is-active { display: block; animation: view-in 0.3s ease; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   Landing
   ========================================================================== */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--sp-xl) var(--sp-m) var(--sp-l);
}

.hero-orb-wrap {
  position: relative;
  margin-bottom: var(--sp-l);
}

.hero-orb {
  width: 240px;
  height: auto;
  filter: drop-shadow(0 12px 36px var(--orb-glow));
  animation: orb-float 5s ease-in-out infinite;
}

@keyframes orb-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.hero-title {
  margin: 0 0 var(--sp-m);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 var(--sp-s);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.hero-body {
  margin: 0 0 var(--sp-xl);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}

.hero-hint {
  margin: var(--sp-m) 0 0;
  font-size: 12px;
  color: var(--text-2);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-s);
  border: none;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(to top, var(--grad-1), var(--grad-2));
  color: var(--on-grad);
  box-shadow: 0 4px 14px var(--orb-glow);
}

/* DS "Secondary" button: 1px Gradient1/Primary border, Button/Primary label, semibold */
.btn-outline {
  background: transparent;
  color: var(--btn-outline-text);
  border: 1px solid var(--btn-outline-border);
  font-weight: 600;
}

/* DS "Large" size: h48, 24px horizontal padding */
.btn-lg {
  width: 100%;
  height: 48px;
  padding: var(--sp-s) var(--sp-xl);
}

/* Length type dropdown — styled like the DS "Small" outline pill */
.length-mode-wrap { flex: 0 0 auto; min-width: 0; max-width: 58%; }

.length-mode-select {
  appearance: none;
  -webkit-appearance: none;
  height: 32px;
  max-width: 100%;
  padding: 0 34px 0 16px;   /* room for the chevron on the right */
  line-height: 30px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: transparent;
  border: 1px solid var(--btn-outline-border);
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--btn-outline-text);
  white-space: nowrap;
  cursor: pointer;
  /* chevron */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232a5968' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

[data-theme="dark"] .length-mode-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2300ffc2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.length-mode-select option { color: initial; }

/* ==========================================================================
   CTA cards
   ========================================================================== */

.cta-cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-m);
  /* extra top margin pushes the (less important) app CTA down */
  margin-top: 48px;
  padding: var(--sp-l) var(--sp-xs) var(--sp-xl);
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-m);
  padding: var(--sp-l);
  margin-top: var(--sp-m);
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: transform 0.15s ease;
}

.cta-card:active { transform: scale(0.98); }

.cta-cards .cta-card { margin-top: 0; }

.cta-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cta-card-text strong { font-size: 14px; font-weight: 600; }
.cta-card-text span { font-size: 12px; color: var(--text-2); }

.cta-arrow {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(to top, var(--grad-1), var(--grad-2));
  color: var(--on-grad);
  font-size: 15px;
}

/* ==========================================================================
   Result / validation view
   ========================================================================== */

.view-result { padding-bottom: var(--sp-xl); }

.result-photo-wrap {
  margin: var(--sp-xs) 0 var(--sp-l);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--surface-card);
}

.result-photo-wrap { position: relative; }

.result-photo {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  display: block;
}

/* AI overlay (mask + reference ball + centerline) drawn over the photo */
.result-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Loading + error states layered on the photo */
.photo-spinner,
.photo-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-m);
  text-align: center;
  padding: var(--sp-l);
  background: color-mix(in srgb, var(--surface-card) 70%, transparent);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: var(--text-1);
  font-size: 14px;
  font-weight: 500;
}

.photo-spinner[hidden],
.photo-error[hidden] { display: none; }

.photo-error { background: color-mix(in srgb, var(--surface-card) 85%, transparent); font-weight: 400; }

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.result-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-s);
}

.field-row {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-m);
  min-height: 44px;
}

.field {
  flex: 1;
  min-width: 0;   /* allow shrinking so the length-type dropdown always fits */
  display: flex;
  flex-direction: column;
  border-bottom: 0.5px solid var(--line);
  padding-bottom: var(--sp-xs);
}

.field-label {
  font-size: 11px;
  color: var(--text-2);
}

.field-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-s);
}

.field-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 18px;
  color: var(--text-1);
  padding: 2px 0;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.field-input::-webkit-outer-spin-button,
.field-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.field-input::placeholder { color: var(--text-2); }

.field-unit {
  font-size: 18px;
  color: var(--text-1);
  flex-shrink: 0;
}

.section-label {
  margin: var(--sp-l) 0 var(--sp-xs);
  font-size: 11px;
  color: var(--text-2);
}

/* -------- Fish breed picker -------- */

.fish-picker {
  display: flex;
  gap: var(--sp-s);
  overflow-x: auto;
  padding: var(--sp-xs) var(--sp-xs) var(--sp-m);
  margin: 0 calc(-1 * var(--sp-m));
  padding-left: var(--sp-m);
  padding-right: var(--sp-m);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.fish-picker::-webkit-scrollbar { display: none; }

.fish-card {
  flex-shrink: 0;
  width: 150px;
  padding: 0;
  border: none;
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: left;
  color: var(--text-1);
}

.fish-card-img {
  position: relative;
  display: block;
  height: 122px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.fish-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fish-radio {
  position: absolute;
  top: var(--sp-s);
  right: var(--sp-s);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-card);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fish-radio::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--text-2);
}

.fish-card.is-selected .fish-radio::after {
  border: none;
  background: linear-gradient(to top, var(--grad-1), var(--grad-2));
}

.fish-card-name {
  display: block;
  padding: var(--sp-s);
  font-size: 12px;
  font-weight: 400;
}

.fish-card.is-selected .fish-card-name { font-weight: 600; }

/* -------- Result actions -------- */

.result-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-m);
  margin-top: var(--sp-l);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-m);
  padding: var(--sp-l) var(--sp-l) calc(var(--sp-xl) + env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--text-2);
}

.footer a {
  color: var(--text-2);
  text-decoration: none;
}

.footer-dot { opacity: 0.5; }

/* ==========================================================================
   Photo source bottom sheet
   ========================================================================== */

.sheet-backdrop[hidden] { display: none; }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  animation: backdrop-in 0.2s ease;
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sheet {
  width: 100%;
  max-width: 480px;
  background: var(--surface-bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--sp-xl) var(--sp-l) calc(var(--sp-l) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--sp-m);
  animation: sheet-in 0.25s ease;
}

@keyframes sheet-in {
  from { transform: translateY(100%); }
  to   { transform: none; }
}

.sheet-title {
  margin: 0 0 var(--sp-xs);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.sheet-option {
  display: flex;
  align-items: center;
  gap: var(--sp-m);
  width: 100%;
  padding: var(--sp-l);
  border: none;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  color: var(--text-1);
  font-size: 16px;
  font-weight: 500;
}

.sheet-option svg { color: var(--accent); flex-shrink: 0; }

.sheet-cancel {
  width: 100%;
  padding: var(--sp-m);
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 15px;
}

/* ==========================================================================
   Catch detail page
   ========================================================================== */

.view-detail { padding-bottom: var(--sp-xl); }

/* Sub-header: back + current date */
.detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-s);
  padding: var(--sp-xs) 0 var(--sp-m);
}

.detail-back { box-shadow: none; background: transparent; }

.detail-date {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-1);
}

.detail-bar-spacer { width: 36px; flex-shrink: 0; }

.detail-photo-wrap {
  position: relative;
  margin-bottom: var(--sp-m);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--surface-card);
}

.detail-photo {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* AI overlay on/off toggle, top-right of the detail image */
.overlay-toggle {
  position: absolute;
  top: var(--sp-s);
  right: var(--sp-s);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--surface-card) 80%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow-control);
  color: var(--text-2);          /* muted when overlay is hidden (default) */
  transition: color 0.15s ease, background 0.15s ease;
}

.overlay-toggle.is-on { color: var(--accent); }   /* highlighted when overlay is shown */

/* Fullscreen image viewer */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  animation: backdrop-in 0.2s ease;
}

.image-modal[hidden] { display: none; }

.image-modal-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-modal-close {
  position: absolute;
  top: calc(var(--sp-m) + env(safe-area-inset-top));
  right: var(--sp-m);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* -------- Weather row (4 equal cards) -------- */
.weather-row {
  display: flex;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-m);
}

.weather-card {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-xs);
  padding: var(--sp-m) var(--sp-xs);
  background: var(--surface-card);
  border-radius: var(--radius-m, 12px);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.weather-icon { width: 24px; height: 24px; object-fit: contain; }

.weather-text {
  display: flex;
  flex-direction: column;
  font-size: 10px;
  line-height: 1.3;
  color: var(--text-1);
}

.weather-text b { font-weight: 400; }

/* -------- Fish data (horizontal scroll of pill cards) -------- */
.section-label-lg {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-1);
  margin: var(--sp-m) 0 var(--sp-s);
}

.data-row {
  display: flex;
  gap: var(--sp-xs);
  overflow-x: auto;
  margin: 0 calc(-1 * var(--sp-m));
  padding: var(--sp-xs) var(--sp-m) var(--sp-s);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.data-row::-webkit-scrollbar { display: none; }

.data-card {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-s);
  padding: var(--sp-m);
  background: var(--surface-card);
  border-radius: var(--radius-s, 8px);
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}

.data-icon { width: 22px; height: 22px; object-fit: contain; color: var(--text-1); }

.data-text { font-size: 14px; color: var(--text-1); }

/* Tint monochrome (single-color) SVG icons for dark mode legibility.
   The colored weather-condition icon is intentionally left untouched. */
[data-theme="dark"] .mono-icon { filter: invert(1) brightness(1.7); }

/* -------- Note -------- */
.note-box {
  background: var(--surface-card);
  border-radius: var(--radius-m, 12px);
  box-shadow: var(--shadow-card);
  padding: var(--sp-m);
}

.note-box textarea {
  width: 100%;
  border: none;
  background: transparent;
  resize: none;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-1);
  outline: none;
}

.note-box textarea::placeholder { color: var(--text-2); }

/* -------- CTAs + test again -------- */
.detail-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-m);
  margin-top: var(--sp-l);
}

.detail-actions .cta-card { margin-top: 0; }

/* ==========================================================================
   Larger screens — keep the phone-like column centered
   ========================================================================== */

@media (min-width: 600px) {
  .hero-title { font-size: 32px; }
}

/* ==========================================================================
   In-page camera (getUserMedia)
   ========================================================================== */
.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #000;
  display: flex;
  flex-direction: column;
}

.camera-modal[hidden] { display: none; }

.camera-video {
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.camera-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-l) var(--sp-l) calc(var(--sp-l) + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

.camera-shutter {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: #fff;
  border: 4px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
}

.camera-shutter:active { transform: scale(0.94); }

.camera-cancel {
  min-width: 64px;
  text-align: left;
  border: none;
  background: none;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.camera-spacer { min-width: 64px; }
