/* Caurspidigs.lv camera UI – vienots dizains: tokeni + bāzes klases + modifikatori. */
* { box-sizing: border-box; }
html, body { width: 100%; overflow-x: hidden; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: var(--space-sm);
  background: var(--color-bg);
  color: var(--color-text);
}

:root {
  /* Krāsa */
  --color-bg: #020617;
  --color-overlay: rgba(2, 6, 23, 0.82);
  --color-surface: #15202e;
  --color-surface-dark: #080d13;
  --color-surface-overlay: rgba(8, 13, 24, 0.82);
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-muted: rgba(254, 243, 199, 0.85);
  /* Robežas */
  --border-gold: rgba(196, 151, 70, 0.25);
  --border-gold-strong: rgba(232, 175, 72, 0.5);
  --border-overlay: rgba(255, 255, 255, 0.08);
  /* Ēnas */
  --shadow-plate: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-plate-active: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 1px rgba(232, 175, 72, 0.2);
  /* Atstarpes */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 20px;
  /* Rādiusi */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  /* Dock: viens dizains visām pogām */
  --dock-bg: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
  --dock-plate: var(--color-surface);
  --dock-radius: var(--radius-md);
  --dock-gold: #c49746;
  --dock-gold-light: #fef3c7;
  --dock-glow: #e8af48;
  --dock-icon-size: 24px;
  --btn-icon-size: 56px;
  --btn-icon-size-sm: 50px;
  --dock-icon-surface: 58px;
  --dock-primary-height: 62px;
  --results-safe-gap: 18px;
  --results-bottom: 128px;
  --floating-panel-width: min(90vw, 760px);
  --floating-menu-width: min(90vw, 520px);
  /* Gredzens: tieši pogas izmērs (1:1), josla uz pogas malas – ring virs pogas z-index */
  --ring-offset: 0;
  --ring-inset: 2px;
  --ring-radius: var(--dock-radius);
  --ring-radius-primary: var(--dock-radius);
  /* Tipogrāfija: vienots h1/h2/h3 */
  --font-h1: 1.5rem;
  --font-h2: 1rem;
  --font-h3: 1rem;
  --app-screen-width: 100vw;
  --app-screen-height: 100dvh;
  --camera-stage-width: 100vw;
  --camera-stage-height: 100dvh;
  --camera-header-top: 12px;
  --camera-logo-width: 600px;
  --camera-logo-max: 58%;
  --camera-mode-size: clamp(1.12rem, 2.6vw, 1.42rem);
  --camera-hotspot-width: 66vw;
  --camera-hotspot-height: 52dvh;
  --dock-width: min(90vw, 450px);
}

#canvas { display: none; }
.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(circle at center, rgba(30,41,59,0.7), rgba(2,6,23,0.96)),
    linear-gradient(135deg, rgba(29,78,216,0.2), rgba(14,165,233,0.08));
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.boot-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-text);
}
.boot-text {
  font-size: 14px;
  color: var(--color-muted);
}
.boot-gesture {
  position: relative;
  width: 108px;
  height: 76px;
}
.boot-hand {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 54px;
  opacity: 0;
  transform: scale(0.78) rotate(-10deg);
  animation: boot-gesture 1.2s ease-in-out infinite;
  filter: drop-shadow(0 12px 26px rgba(15,23,42,0.35));
}
.boot-scale {
  position: relative;
  min-height: 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #cbd5e1;
}
.boot-scale span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: boot-gestureLabel 1.2s ease-in-out infinite;
}
.boot-hand.phase-good,
.boot-scale .phase-good {
  animation-delay: 0s;
}
.boot-hand.phase-neutral,
.boot-scale .phase-neutral {
  animation-delay: 0.4s;
}
.boot-hand.phase-bad,
.boot-scale .phase-bad {
  animation-delay: 0.8s;
}
.boot-percent {
  min-width: 76px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: 0.04em;
}
@keyframes boot-gesture {
  0% { opacity: 0; transform: scale(0.78) rotate(-10deg) translateY(6px); }
  10% { opacity: 1; transform: scale(0.92) rotate(-4deg) translateY(0); }
  22% { opacity: 1; transform: scale(1.02) rotate(0deg) translateY(0); }
  34% { opacity: 0; transform: scale(0.88) rotate(8deg) translateY(-4px); }
  100% { opacity: 0; transform: scale(0.78) rotate(-10deg) translateY(6px); }
}
@keyframes boot-gestureLabel {
  0% { opacity: 0; transform: translateX(-50%) translateY(6px); }
  12% { opacity: 1; transform: translateX(-50%) translateY(0); }
  28% { opacity: 1; transform: translateX(-50%) translateY(0); }
  40% { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  100% { opacity: 0; transform: translateX(-50%) translateY(6px); }
}
video, canvas { width: 100%; height: auto; background: #111827; border-radius: 20px; }
button { padding: 10px 28px; border-radius: 999px; border: 1px solid rgba(148,163,184,0.4); background: rgba(15,23,42,0.85); color: #e5e7eb; font-weight: 600; cursor: pointer; margin-top: 8px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); touch-action: manipulation; }
.primary { background: rgba(29, 78, 216, 0.92); border-color: rgba(147, 197, 253, 0.55); }
button[disabled] { opacity: 0.7; cursor: default; }
.muted { opacity: 0.7; font-size: 12px; margin-top: 4px; }
.detail-card { margin-top: 0; pointer-events: auto; }
.detail-header { position: relative; display: flex; align-items: center; justify-content: center; min-height: 40px; margin-bottom: 14px; }
.detail-title { font-size: clamp(20px, 2.6vw, 28px); font-weight: 800; margin: 0; line-height: 1.08; letter-spacing: -0.02em; width: 100%; padding: 0 48px; text-align: center; }
.detail-close { position: absolute; right: 0; top: 50%; transform: translateY(-50%); border: none; background: transparent; color: var(--color-text); font-size: 30px; line-height: 1; width: 40px; height: 40px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin: 0; box-shadow: none; }
.detail-close:hover { background: rgba(255,255,255,0.08); }
.detail-status { font-size: 11px; opacity: 0.7; margin-top: 2px; }
.detail-text { font-size: 15px; white-space: pre-wrap; opacity: 0.92; padding: 12px 14px 10px; text-align: left; line-height: 1.6; }
.score-row { margin-top: 0; padding: 0; border-top: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; font-size: 12px; }
.score-col {
  --score-band-color: rgba(255,255,255,0.14);
  --score-band-edge: rgba(255,255,255,0.08);
  --score-band-glow: rgba(255,255,255,0.08);
  flex: 1;
  padding: 16px 12px;
  margin: 0;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18, 31, 48, 0.92), rgba(10, 18, 30, 0.96));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--score-band-edge);
  box-shadow: inset 0 0 0 1px var(--score-band-color);
  min-height: 112px;
  text-align: center;
  min-width: 0;
}
.detail-card .score-row .score-col { box-shadow: inset 0 0 0 1px var(--score-band-color), 0 14px 32px rgba(0,0,0,0.24); }
.detail-card .score-row + .score-row .score-col { padding-top: 14px; padding-bottom: 14px; }
.score-col--button {
  cursor: pointer;
  touch-action: manipulation;
  background: linear-gradient(180deg, rgba(18, 29, 44, 0.92), rgba(12, 20, 33, 0.95));
}
.score-col--button:hover {
  background: linear-gradient(180deg, rgba(22, 34, 50, 0.94), rgba(13, 21, 34, 0.97));
  box-shadow: inset 0 0 0 1px var(--score-band-color), 0 10px 22px rgba(0,0,0,0.22);
}
.score-col-active {
  position: relative;
  border-color: var(--score-band-color) !important;
  background: linear-gradient(180deg, rgba(20, 33, 49, 0.94), rgba(12, 21, 35, 0.98));
  box-shadow: inset 0 0 0 1px var(--score-band-color), 0 0 0 1px rgba(255,255,255,0.04), 0 12px 24px rgba(0,0,0,0.24) !important;
}
.score-col-active .score-value { padding-top: 0; padding-bottom: 0; }
.score-value { font-weight: 900; font-size: clamp(28px, 4vw, 36px); display: block; order: 1; line-height: 1; }
.score-label { font-weight: 600; font-size: 0.82rem; opacity: 0.85; display: block; order: 2; letter-spacing: 0.02em; text-align: center; }
.score-band--elite {
  --score-band-color: rgba(20, 255, 41, 0.95);
  --score-band-edge: rgba(20, 255, 41, 0.46);
  --score-band-glow: rgba(20, 255, 41, 0.18);
}
.score-band--strong {
  --score-band-color: rgba(127, 255, 76, 0.88);
  --score-band-edge: rgba(127, 255, 76, 0.42);
  --score-band-glow: rgba(127, 255, 76, 0.14);
}
.score-band--mid {
  --score-band-color: rgba(193, 245, 158, 0.8);
  --score-band-edge: rgba(193, 245, 158, 0.34);
  --score-band-glow: rgba(193, 245, 158, 0.12);
}
.score-band--weak {
  --score-band-color: rgba(255, 184, 153, 0.8);
  --score-band-edge: rgba(255, 184, 153, 0.34);
  --score-band-glow: rgba(255, 184, 153, 0.12);
}
.score-band--bad {
  --score-band-color: rgba(255, 81, 81, 0.86);
  --score-band-edge: rgba(255, 81, 81, 0.4);
  --score-band-glow: rgba(255, 81, 81, 0.14);
}
.score-band--unknown {
  --score-band-color: rgba(255,255,255,0.16);
  --score-band-edge: rgba(255,255,255,0.08);
  --score-band-glow: rgba(255,255,255,0.08);
}
.detail-tabs { display: flex; gap: 10px; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 18px; padding-top: 18px; margin-bottom: 10px; }
.tab-button { flex: 1; border-radius: 18px; border: 1px solid rgba(148,163,184,0.24); background: rgba(11, 20, 33, 0.88); color: #e5e7eb; font-size: 14px; padding: 12px 14px; cursor: pointer; box-shadow: none; margin-top: 0; }
.tab-button.active { background: linear-gradient(180deg, rgba(22,33,50,0.94), rgba(11,17,29,0.98)); border-color: rgba(255,255,255,0.24); }
.tab-panels { margin-top: 8px; margin-bottom: 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel[data-panel="ingredients"] .detail-text { padding-top: 16px; padding-bottom: 14px; }
.daily-dose-card { margin-top: 8px; margin-bottom: 14px; padding: 14px 14px 12px; border-radius: 18px; background: linear-gradient(180deg, rgba(14, 24, 38, 0.94), rgba(8, 13, 24, 0.98)); border: 1px solid rgba(255,255,255,0.08); box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }
.daily-dose-title { margin: 0 0 4px; font-size: 0.9rem; font-weight: 800; letter-spacing: 0.02em; }
.daily-dose-subtitle { margin: 0 0 12px; font-size: 0.74rem; line-height: 1.35; color: rgba(255,255,255,0.62); }
.daily-dose-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.daily-dose-item { min-height: 72px; padding: 10px 10px 8px; border-radius: 16px; background: linear-gradient(180deg, rgba(18, 29, 44, 0.92), rgba(10, 16, 28, 0.98)); border: 1px solid rgba(255,255,255,0.07); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.daily-dose-value { font-size: 1.2rem; font-weight: 900; line-height: 1; }
.daily-dose-label { font-size: 0.72rem; font-weight: 700; line-height: 1.18; color: rgba(255,255,255,0.72); }
.nut-table { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.nut-row { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; min-height: 72px; padding: 10px 6px; border-radius: 16px; background: linear-gradient(180deg, rgba(14, 24, 38, 0.92), rgba(8, 13, 24, 0.98)); border: 1px solid rgba(255,255,255,0.08); box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); word-break: break-word; text-align: center; }
.nut-label { opacity: 0.78; font-size: 0.72rem; order: 2; line-height: 1.18; }
.nut-value { font-weight: 800; font-size: 1.05rem; order: 1; line-height: 1; }
.shell {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-template-rows: repeat(1, 1fr);
  row-gap: 3px;
  width: var(--app-screen-width);
  height: var(--app-screen-height);
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.camera-wrap {
  position: relative;
  overflow: visible;
  width: var(--camera-stage-width);
  min-height: var(--camera-stage-height);
  height: var(--camera-stage-height);
  max-height: none;
  aspect-ratio: auto;
  background: #08111c;
}

/* Kameras virsraksti: vienots h1/h2/h3 no tokeniem */
h1, .camera-title {
  font-size: var(--font-h1);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin: 0;
  line-height: 1.2;
}
h2, .camera-mode {
  font-size: var(--font-h2);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.3;
}
h3 {
  font-size: var(--font-h3);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin: 0;
  line-height: 1.35;
}

.camera-header {
  position: absolute;
  left: 50%;
  top: var(--camera-header-top);
  transform: translateX(-50%);
  z-index: 30;
  text-align: center;
  pointer-events: none;
}

.camera-title {
  display: block;
  color: var(--color-text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.camera-logo {
  display: block;
  width: var(--camera-logo-width);
  max-width: var(--camera-logo-max);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.camera-mode {
  display: block;
  margin-top: var(--space-sm);
  color: var(--color-text);
  font-size: var(--camera-mode-size);
  font-weight: 700;
}

.camera-wrap video {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center center;
  display: block;
  border-radius: 0;
  background: #020617;
}

.camera-wrap video::-webkit-media-controls,
.camera-wrap video::-webkit-media-controls-panel,
.camera-wrap video::-webkit-media-controls-play-button,
.camera-wrap video::-webkit-media-controls-start-playback-button,
.camera-wrap video::-webkit-media-controls-overlay-play-button,
.camera-wrap video::-webkit-media-controls-enclosure {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0 !important;
}

.camera-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8,17,28,0.06), rgba(8,17,28,0.22)),
    radial-gradient(circle at center, rgba(255,255,255,0.05), transparent 55%);
  pointer-events: none;
}

.camera-gradient-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 28%;
  min-height: 200px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.85) 0%, rgba(2, 6, 23, 0.4) 45%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.camera-gradient-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  min-height: 160px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.35) 50%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.camera-hotspot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(66%, var(--camera-hotspot-width));
  height: min(52%, var(--camera-hotspot-height));
  transform: translate(-50%, -50%);
  border: 2px dashed rgba(255,255,255,0.55);
  border-radius: 28px;
  box-shadow: 0 0 0 9999px rgba(3, 10, 18, 0.07);
  pointer-events: none;
}

.badge-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Premium floating results virs dock ar drošu atstarpi */
.results-area {
  position: absolute;
  left: 0;
  right: 0;
  top: 72px;
  bottom: var(--results-bottom);
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
  pointer-events: none;
  padding: 0 12px;
  overflow-y: auto;
}
.results-area > * {
  pointer-events: auto;
}

.compact-banner-stack {
  position: relative;
  width: var(--floating-panel-width);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: var(--results-safe-gap);
  touch-action: pan-y;
  transition: transform 140ms ease, opacity 140ms ease;
}
.compact-banner-stack.is-swipe-armed {
  transform: translateY(8px);
  opacity: 0.9;
}
.compact-banner-stack.compact-banner-stack--single-detail-open {
  display: none;
}
.compact-banner-stack.compact-banner-stack--compare-2,
.compact-banner-stack.compact-banner-stack--compare-3 {
  display: grid;
}
.compact-banner-stack.compact-banner-stack--compare-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.compact-banner-stack.compact-banner-stack--compare-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.compact-banner-stack:empty {
  display: none;
}

.retry-banner {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 18px 20px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(10, 19, 32, 0.96), rgba(6, 12, 21, 0.98));
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--color-text);
  box-shadow:
    0 24px 44px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.04);
  text-align: center;
}

.retry-banner__title {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 900;
  line-height: 1.1;
}

.retry-banner__text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.85);
}

.compact-banner {
  position: relative;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(10, 19, 32, 0.96), rgba(6, 12, 21, 0.98));
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--color-text);
  box-shadow:
    0 24px 44px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.04);
  min-width: 0;
  padding: 14px;
}

.compact-banner-dismiss {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(11, 20, 33, 0.72);
  color: rgba(226, 232, 240, 0.9);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.24);
  z-index: 2;
}

.compact-banner-dismiss:hover {
  background: rgba(18, 31, 48, 0.88);
}

.compact-banner-line {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  padding: 0 0 0 40px;
  cursor: pointer;
  min-height: 96px;
}
.compact-banner-line:focus-visible {
  outline: 2px solid rgba(255,255,255,0.72);
  outline-offset: 6px;
  border-radius: 22px;
}

.compact-banner-name {
  font-size: clamp(14.5px, 2.25vw, 19.8px);
  font-weight: 800;
  line-height: 1.1;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.compact-banner-scores {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 88px));
  gap: 10px;
  flex-shrink: 0;
}
.compact-banner-score {
  min-height: 0;
  border-radius: 20px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(17, 27, 41, 0.9), rgba(8, 13, 24, 0.96));
  border: 1px solid var(--score-band-edge, rgba(255,255,255,0.08));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), inset 0 0 0 1px var(--score-band-color, rgba(255,255,255,0.12));
}

.compact-banner-score--single {
  width: 100%;
  min-height: 72px;
  flex-direction: column;
  gap: 3px;
}
.compact-banner-score__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.72;
}
.compact-banner-score__value {
  font-size: clamp(33px, 4.5vw, 42px);
  font-weight: 900;
  line-height: 1;
}
.compact-banner:not(.compact-banner--compare) .compact-banner-score__value {
  min-width: 1.6em;
  text-align: center;
}

.compact-banner--compare .compact-banner-line {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 0;
  gap: 10px;
}

.compact-banner--compare .compact-banner-scores {
  order: 1;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.compact-banner--compare .compact-banner-name {
  order: 2;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow-wrap: anywhere;
}

.compact-banner--compare-2 {
  padding: 11px;
  border-radius: 22px;
}

.compact-banner--compare-2 .compact-banner-score {
  min-height: 44px;
  padding: 8px;
  border-radius: 14px;
}

.compact-banner--compare-2 .compact-banner-score__label {
  font-size: 10px;
}

.compact-banner--compare-2 .compact-banner-score__value {
  font-size: clamp(18px, 3vw, 22px);
}

.compact-banner--compare-2 .compact-banner-name {
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.05;
}

.compact-banner--compare-3 {
  padding: 9px;
  border-radius: 20px;
}

.compact-banner--compare-3 .compact-banner-line {
  gap: 8px;
}

.compact-banner--compare-3 .compact-banner-scores {
  gap: 6px;
}

.compact-banner--compare-3 .compact-banner-score {
  min-height: 38px;
  padding: 6px;
  border-radius: 12px;
}

.compact-banner--compare-3 .compact-banner-score__label {
  font-size: 9px;
}

.compact-banner--compare-3 .compact-banner-score__value {
  font-size: clamp(15px, 2.2vw, 18px);
}

.compact-banner--compare-3 .compact-banner-name {
  font-size: clamp(13px, 1.7vw, 15px);
  line-height: 1.02;
}

.compact-banner-expanded {
  display: none;
}

.compact-banner.is-selected {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.18),
    0 0 0 2px rgba(255,255,255,0.32),
    0 24px 44px rgba(0,0,0,0.38);
}
.compact-banner.is-selected::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 27px;
  border: 1px solid rgba(255,255,255,0.72);
  opacity: 0.7;
  pointer-events: none;
  box-shadow: 0 0 24px rgba(255,255,255,0.08);
}

.detail-overlay {
  position: relative;
  width: 100%;
  z-index: 25;
  display: flex;
  justify-content: center;
}

.detail-overlay--info:empty {
  display: none;
}

.detail-overlay .detail-card {
  width: min(var(--floating-panel-width), calc(100vw - 24px));
  pointer-events: auto;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(11,20,32,0.98), rgba(5,10,18,0.99));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    0 32px 60px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.04);
  padding: 22px 22px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: min(68dvh, calc(100dvh - var(--results-bottom) - 92px));
}

.detail-overlay--info .detail-card {
  border-color: rgba(172, 222, 255, 0.16);
  width: min(560px, calc(100vw - 24px));
  max-height: min(72dvh, calc(100dvh - 64px));
  padding: 18px 18px 16px;
}

.detail-overlay--info .detail-card.detail-card--guide {
  width: min(680px, calc(100vw - 20px));
  max-height: min(78dvh, calc(100dvh - 76px));
  padding: 20px 20px 18px;
}

.info-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-card-section {
  padding: 12px 12px 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(14, 24, 38, 0.92), rgba(8, 13, 24, 0.98));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.info-card-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.info-card-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.info-card-heading {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.info-card-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: rgba(255,255,255,0.9);
}

.info-card-note {
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.42;
  color: rgba(255,255,255,0.68);
}

.badge {
  position: absolute;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-overlay);
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-sm) 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 12px 24px rgba(0,0,0,0.28);
}

.badge-name {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.badge-score {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.9;
}

.dock-wrap {
  position: absolute;
  left: 5vw;
  right: 5vw;
  max-width: 500px;
  bottom: 24px;
  z-index: 10;
  display: flex;
  margin: 0 auto;
  justify-content: center;
  align-items: center;
  animation: dock-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.dock-wrap:has(.dock__item--menu.is-active) {
  z-index: 320;
}

@keyframes dock-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dock: viens bloks. Gredzens ir TIKAI .dock__item-ring (tikai zem .dock__item), nekad uz .dock. */
.dock {
  display: grid;
  grid-template-columns: clamp(50px, 14vw, 58px) clamp(50px, 14vw, 58px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  width: var(--dock-width);
  min-height: var(--dock-primary-height);
  background: linear-gradient(180deg, rgba(17, 27, 41, 0.92), rgba(8, 13, 24, 0.97));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 20px 38px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: visible;
}

.dock__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 999px;
  overflow: visible;
  isolation: isolate;
}
.dock__item--menu,
.dock__item--compare {
  height: auto;
  aspect-ratio: 1 / 1;
}
.dock__item--primary {
  min-width: 0;
  height: var(--dock-primary-height);
}

.dock__item-ring {
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.22s ease;
  border: 2px solid rgba(255,255,255,0.72);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 0 22px rgba(255,255,255,0.1);
}
.dock__item--menu.is-active .dock__item-ring,
.dock__item--compare.is-active .dock__item-ring,
.dock__item--primary .dock__item-ring {
  opacity: 1;
}

.dock__item--menu.is-active {
  z-index: 320;
}
.dock__item--primary:has(.dock__btn--primary:disabled) .dock__item-ring {
  opacity: 0.35;
}

.dock__item-ring-glow {
  display: none;
}
.dock__item-ring-clip {
  display: none;
}
.dock__item-ring-rotate {
  display: none;
}
.dock__item-ring-inner {
  display: none;
}

.dock__btn {
  position: relative;
  z-index: 1;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  background: linear-gradient(180deg, rgba(17, 27, 41, 0.9), rgba(8, 13, 24, 0.96));
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 16px 30px rgba(0,0,0,0.26);
  margin-top: 0;
  padding: 0;
}
.dock__btn:active {
  opacity: 0.95;
}
.dock__item .dock__btn.is-active,
.dock__item--primary .dock__btn--primary:not(:disabled) {
  background: linear-gradient(180deg, rgba(19, 31, 48, 0.96), rgba(8, 15, 26, 0.98));
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 18px 34px rgba(0,0,0,0.28);
}
.dock__item .dock__btn.is-active {
  box-shadow: 0 18px 34px rgba(0,0,0,0.28);
}

.dock__btn--icon {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dock__btn--icon .dock__btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  width: var(--dock-icon-size);
  height: var(--dock-icon-size);
}
.dock__btn-label {
  display: none;
}
.dock__btn--icon .dock__icon-burger,
.dock__btn--icon .dock__icon-close,
.dock__btn--icon .dock__icon-compare {
  flex-shrink: 0;
}
.dock__btn--primary {
  width: 100%;
  padding: 0 38px;
  min-height: var(--dock-primary-height);
  min-width: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.06), transparent 45%),
    linear-gradient(180deg, rgba(15, 25, 39, 0.96), rgba(8, 13, 22, 0.99));
}
.dock__btn--primary.is-scan-animating {
  animation: scan-read-pulse 0.5s cubic-bezier(0.22, 1, 0.36, 1) 1;
}
.dock__btn--primary .dock__btn-label--primary {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text);
  opacity: 1;
  white-space: nowrap;
  display: inline-block;
  letter-spacing: 0.03em;
}
.dock__btn--primary:disabled .dock__btn-label--primary {
  color: rgba(248,250,252,0.65);
}
.dock__btn--primary:active {
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.15);
}
.dock__btn--primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  color: rgba(248,250,252,0.65);
}

@keyframes scan-read-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 16px 30px rgba(0,0,0,0.26);
  }
  35% {
    transform: scale(0.985);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.08), 0 18px 34px rgba(0,0,0,0.28);
  }
  65% {
    transform: scale(1.015);
    box-shadow: 0 0 0 5px rgba(113,255,132,0.15), 0 20px 36px rgba(0,0,0,0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 18px 34px rgba(0,0,0,0.28);
  }
}

.dock__icon-burger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: var(--dock-icon-size);
  height: calc(var(--dock-icon-size) * 0.7);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.dock__icon-burger span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: var(--color-text);
  opacity: 0.9;
}
.dock__icon-close {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: var(--color-text);
  font-weight: 300;
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.dock__btn.is-menu-open .dock__icon-burger {
  opacity: 0;
  transform: scale(0.72);
}
.dock__btn.is-menu-open .dock__icon-close {
  opacity: 1;
  transform: scale(1);
}
.dock__icon-compare {
  font-size: var(--dock-icon-size);
  line-height: 1;
  color: var(--color-text);
  opacity: 0.95;
}
.dock__item-count {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  min-width: 16px;
  height: 16px;
  padding: 0 var(--space-xs);
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  color: var(--color-surface-dark);
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}
.dock__item--compare .dock__btn.has-items .dock__item-count {
  display: flex;
}

/* Floating menu bez smaga backdrop efekta */
.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 var(--results-bottom);
  box-sizing: border-box;
  pointer-events: none;
}
.settings-overlay[hidden] {
  display: none;
}
.settings-overlay.settings-overlay-visible {
  pointer-events: auto;
}
.settings-overlay .settings-panel-shell,
.settings-overlay .settings-modal,
.settings-overlay .settings-backdrop {
  pointer-events: auto;
}

.settings-overlay.settings-overlay-visible .settings-backdrop {
  animation: overlay-backdrop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.settings-overlay.settings-overlay-visible .settings-panel-shell {
  animation: overlay-modal-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}

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

@keyframes overlay-modal-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.settings-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(var(--results-bottom) - 20px);
  background: transparent;
  cursor: pointer;
  opacity: 0;
}

.settings-panel-shell {
  position: relative;
  width: var(--floating-menu-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  z-index: 302;
}

.settings-modal {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, rgba(11,20,32,0.98), rgba(6,12,21,0.99));
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 56px rgba(0, 0, 0, 0.42);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 8px;
}

.settings-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.settings-close {
  margin: 0;
  padding: 0;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--color-text);
  font-size: 28px;
  line-height: 1;
  box-shadow: none;
}

.settings-body {
  padding: 0 22px 22px;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
}

.settings-section--actions {
  gap: 10px;
}

.settings-label {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
}

.settings-hint {
  margin: -4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,0.72);
}

.settings-btn-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.settings-btn-row--profile {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 92px;
  padding: 12px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15, 25, 39, 0.94), rgba(8, 13, 24, 0.98));
  color: var(--color-text);
  box-shadow: none;
  margin-top: 0;
}

.settings-chip__key {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.settings-chip__label {
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  color: rgba(255,255,255,0.88);
}

.settings-chip__sub {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  color: rgba(255,255,255,0.64);
}

.settings-chip.active {
  position: relative;
  border-color: rgba(255,255,255,0.24);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.16), 0 0 0 3px rgba(255,255,255,0.08);
}

.settings-chip.active::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 21px;
  border: 2px solid rgba(255,255,255,0.74);
  pointer-events: none;
  box-shadow: 0 0 18px rgba(255,255,255,0.08);
}

.settings-action {
  width: 100%;
  min-height: 56px;
  margin-top: 0;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, rgba(15, 25, 39, 0.94), rgba(8, 13, 24, 0.98));
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
}

.settings-action:hover {
  background: linear-gradient(180deg, rgba(19, 31, 48, 0.96), rgba(9, 16, 27, 0.99));
}

.settings-info {
  margin-top: 14px;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.settings-info p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.84);
}

.settings-guide-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 14px 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(14, 24, 38, 0.92), rgba(8, 13, 24, 0.98));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.settings-guide-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.settings-guide-image {
  display: block;
  width: min(100%, 248px);
  height: auto;
  object-fit: contain;
}

.settings-guide-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
  color: #fff;
}

.impact-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 10px;
}

.impact-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  align-items: flex-start;
}

.impact-flow-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  line-height: 1.14;
  flex: 0 1 auto;
  align-self: flex-start;
}

.impact-flow-item .impact-msg {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 0.89rem;
  line-height: 1.14;
  color: #fff;
  overflow-wrap: anywhere;
}

.detail-reason {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(248,250,252,0.9);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.impact-block {
  border-radius: 20px;
  padding: 14px 14px 12px;
  background: rgba(9, 16, 28, 0.88);
  border: 1px solid rgba(255,255,255,0.08);
}

.impact-title {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.impact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.impact-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 0;
  width: 100%;
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 16px;
  line-height: 1.24;
}

.impact-item .impact-chip { order: 1; flex: 0 0 auto; }
.impact-item .impact-msg { order: 2; flex: 1 1 auto; min-width: 0; font-size: 0.98em; opacity: 0.96; text-wrap: pretty; overflow-wrap: anywhere; }

.impact-chip {
  min-width: 40px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.03em;
}

.impact-chip.positive {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
}

.impact-chip.negative {
  background: rgba(248, 113, 113, 0.16);
  color: #f87171;
}

.impact-chip.neutral {
  background: rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.92);
}

.impact-flow-item.neutral {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.2);
}

@media (max-width: 980px) {
  .camera-wrap {
    min-height: var(--camera-stage-height);
    height: var(--camera-stage-height);
    aspect-ratio: auto;
  }
}

@media (max-width: 760px) {
  body {
    padding: 0;
  }

  .shell {
    padding: 0;
  }

  .camera-wrap {
    border-radius: 0;
    width: var(--camera-stage-width);
    min-height: var(--camera-stage-height);
    height: var(--camera-stage-height);
    max-height: none;
    aspect-ratio: auto;
  }

  .camera-header {
    top: var(--camera-header-top);
  }

  .camera-title {
    font-size: 1.7rem;
  }

  .camera-logo {
    width: var(--camera-logo-width);
    max-width: var(--camera-logo-max);
  }

  .camera-mode {
    font-size: var(--camera-mode-size);
  }

  .dock__btn--icon {
    width: var(--btn-icon-size-sm);
    height: var(--btn-icon-size-sm);
  }

  .camera-hotspot {
    width: min(66%, var(--camera-hotspot-width));
    height: min(52%, var(--camera-hotspot-height));
    border-radius: 20px;
  }

  .dock-wrap {
    left: 5vw;
    right: 5vw;
    bottom: 16px;
  }

  .dock {
    gap: 10px;
    grid-template-columns: clamp(48px, 13vw, 54px) clamp(48px, 13vw, 54px) minmax(0, 1fr);
  }

  .dock__btn--primary {
    flex: 1;
    min-width: 0;
    padding: 0 20px;
    font-size: 18px;
    min-height: 56px;
  }
  .dock__btn--primary .dock__btn-label--primary {
    font-size: 18px;
  }

  .results-area {
    bottom: 118px;
    padding: 0 10px;
  }

  .compact-banner-stack,
  .detail-overlay .detail-card,
  .settings-panel-shell {
    width: min(90vw, 100%);
  }

  .compact-banner {
    padding: 12px;
    border-radius: 22px;
  }

  .compact-banner-dismiss {
    left: 8px;
    top: 8px;
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .compact-banner-line {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding-left: 34px;
  }

  .settings-btn-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .settings-btn-row--profile {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compact-banner-scores {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compact-banner-name {
    font-size: clamp(18px, 4.6vw, 24px);
  }

  .compact-banner-score__value {
    font-size: clamp(24px, 4.8vw, 30px);
  }

  .compact-banner--compare-2 .compact-banner-name {
    font-size: clamp(14px, 3.2vw, 17px);
  }

  .compact-banner--compare-2 .compact-banner-score__value {
    font-size: clamp(16px, 3.5vw, 20px);
  }

  .daily-dose-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-banner--compare-3 .compact-banner-name {
    font-size: clamp(11px, 2.5vw, 13px);
  }

  .compact-banner--compare-3 .compact-banner-score__value {
    font-size: clamp(12px, 2.8vw, 15px);
  }

  .score-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .score-col {
    min-height: 78px;
    padding: 10px 6px;
    border-radius: 16px;
  }

  .score-value {
    font-size: clamp(19px, 4.3vw, 24px);
  }

  .score-label {
    font-size: 0.61rem;
    line-height: 1.02;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  .detail-tabs {
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
  }

  .tab-button {
    padding: 9px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .detail-text {
    font-size: 13px;
    line-height: 1.4;
  }

  .detail-overlay .detail-card {
    padding: 16px 14px 14px;
    border-radius: 24px;
    max-height: min(60dvh, calc(100dvh - 136px));
  }

  .detail-overlay--info .detail-card {
    padding: 14px 12px 12px;
    border-radius: 22px;
    max-height: min(68dvh, calc(100dvh - 78px));
  }

  .detail-overlay--info .detail-card.detail-card--guide {
    max-height: min(74dvh, calc(100dvh - 88px));
    padding: 16px 14px 14px;
  }

  .detail-title {
    font-size: clamp(18px, 4.4vw, 21px);
  }

  .detail-status {
    font-size: 10px;
    line-height: 1.25;
    word-break: break-word;
  }

  .impact-block {
    border-radius: 18px;
    padding: 12px 12px 10px;
  }

  .impact-title {
    margin-bottom: 8px;
    font-size: 11px;
  }

  .impact-list {
    gap: 6px;
  }

  .impact-item {
    min-height: 0;
    padding: 8px 10px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.18;
  }

  .impact-chip {
    min-width: 34px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .impact-flow {
    gap: 6px;
  }

  .impact-flow-item {
    padding: 7px 9px;
    border-radius: 14px;
    flex-basis: fit-content;
  }

  .impact-flow-item .impact-msg {
    font-size: 0.82rem;
  }

  .nut-table {
    gap: 8px;
  }

  .nut-row {
    min-height: 60px;
    padding: 8px 4px;
  }

  .nut-label {
    font-size: 0.6rem;
    line-height: 1.05;
  }

  .nut-value {
    font-size: 0.9rem;
  }

  .settings-chip {
    min-height: 76px;
    padding: 10px 6px;
    gap: 6px;
  }

  .settings-chip__key {
    font-size: 1rem;
  }

  .settings-chip__label {
    font-size: 0.66rem;
    line-height: 1.12;
  }

  .info-card-chip {
    min-width: 38px;
    height: 24px;
    font-size: 0.72rem;
  }

  .info-card-heading {
    font-size: 0.9rem;
  }

  .info-card-text {
    font-size: 0.8rem;
  }

  .info-card-note {
    font-size: 0.72rem;
  }

  .settings-overlay {
    padding-bottom: 118px;
  }

  .settings-guide-card {
    padding: 12px 12px 10px;
    border-radius: 18px;
  }

  .settings-guide-illustration {
    min-height: 180px;
  }

  .settings-guide-image {
    width: min(100%, 210px);
  }

  .settings-guide-text {
    font-size: 13px;
    line-height: 1.4;
  }

  .badge {
    max-width: calc(100vw - 32px);
    padding: 7px 9px;
  }

  .badge-name {
    font-size: 11px;
  }

  .badge-score {
    font-size: 10px;
  }

}

@media (max-width: 430px) {
  .camera-logo {
    max-width: 92%;
  }

  .camera-mode {
    margin-top: 6px;
  }

  .results-area {
    padding: 0 6px;
  }

  .detail-overlay {
    width: 100%;
  }

  .settings-guide-illustration {
    min-height: 160px;
  }

  .settings-guide-image {
    width: min(100%, 188px);
  }

  .settings-guide-text {
    font-size: 12.5px;
  }

  .detail-overlay .detail-card {
    width: calc(100vw - 12px);
    padding: 14px 10px 12px;
    border-radius: 20px;
    max-height: min(60dvh, calc(100dvh - 124px));
  }

  .detail-overlay--info .detail-card {
    width: calc(100vw - 12px);
    max-height: min(70dvh, calc(100dvh - 56px));
    padding: 12px 10px 10px;
    border-radius: 18px;
  }

  .detail-overlay--info .detail-card.detail-card--guide {
    width: calc(100vw - 10px);
    max-height: min(76dvh, calc(100dvh - 64px));
    padding: 14px 12px 12px;
    border-radius: 18px;
  }

  .detail-header {
    margin-bottom: 8px;
  }

  .detail-title {
    font-size: clamp(16px, 4.6vw, 19px);
    padding: 0 40px;
    text-align: center;
  }

  .score-row {
    gap: 4px;
  }

  .score-col {
    min-height: 66px;
    padding: 8px 4px;
    border-radius: 14px;
  }

  .score-value {
    font-size: clamp(16px, 4.6vw, 20px);
  }

  .score-label {
    font-size: 0.54rem;
    line-height: 1;
    white-space: nowrap;
  }

  .detail-tabs {
    gap: 4px;
  }

  .tab-button {
    padding: 8px 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  .detail-text {
    font-size: 12px;
    line-height: 1.34;
    padding: 12px 10px 10px;
  }

  .tab-panel[data-panel="ingredients"] .detail-text {
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .detail-status {
    font-size: 9px;
  }

  .nut-table {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .nut-row {
    min-height: 54px;
    padding: 6px 3px;
    border-radius: 10px;
  }

  .nut-label {
    font-size: 0.54rem;
    line-height: 1.05;
  }

  .nut-value {
    font-size: 0.8rem;
  }

  .impact-block {
    border-radius: 16px;
    padding: 10px 10px 8px;
  }

  .impact-title {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .impact-list {
    gap: 4px;
  }

  .impact-item {
    min-height: 0;
    padding: 7px 8px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.14;
  }

  .impact-chip {
    min-width: 30px;
    padding: 3px 7px;
    font-size: 10px;
  }

  .impact-flow {
    gap: 4px;
  }

  .impact-flow-item {
    padding: 6px 8px;
    border-radius: 12px;
    flex-basis: fit-content;
  }

  .impact-flow-item .impact-msg {
    font-size: 0.74rem;
    line-height: 1.12;
  }

  .settings-btn-row {
    gap: 6px;
  }

  .settings-chip {
    min-height: 68px;
    padding: 8px 4px;
    border-radius: 14px;
  }

  .settings-chip__key {
    font-size: 0.92rem;
  }

  .settings-chip__label {
    font-size: 0.6rem;
  }

  .compact-banner-stack.compact-banner-stack--compare-2,
  .compact-banner-stack.compact-banner-stack--compare-3 {
    width: min(98vw, calc(100vw - 12px));
  }

  .compact-banner-stack.compact-banner-stack--compare-2 {
    gap: 6px;
  }

  .compact-banner-stack.compact-banner-stack--compare-3 {
    gap: 4px;
  }

  .compact-banner--compare-2,
  .compact-banner--compare-3 {
    padding: 6px;
  }

  .compact-banner--compare-2 .compact-banner-line,
  .compact-banner--compare-3 .compact-banner-line {
    gap: 6px;
  }

  .compact-banner--compare-2 .compact-banner-scores,
  .compact-banner--compare-3 .compact-banner-scores {
    gap: 4px;
  }

  .compact-banner--compare-2 .compact-banner-score,
  .compact-banner--compare-3 .compact-banner-score {
    min-height: 34px;
    padding: 4px 3px;
    border-radius: 10px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
  }

  .compact-banner--compare-2 .compact-banner-score__label,
  .compact-banner--compare-3 .compact-banner-score__label {
    font-size: 8px;
    line-height: 1;
    letter-spacing: 0.02em;
  }

  .compact-banner--compare-2 .compact-banner-score__value {
    font-size: clamp(13px, 3vw, 16px);
  }

  .compact-banner--compare-3 .compact-banner-score__value {
    font-size: clamp(10px, 2.5vw, 13px);
  }

  .compact-banner--compare-2 .compact-banner-name {
    font-size: clamp(12px, 3vw, 14px);
    line-height: 1;
  }

  .compact-banner--compare-3 .compact-banner-name {
    font-size: clamp(10px, 2.3vw, 11px);
    line-height: 0.98;
  }
}
