
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gf-bg:           #0A0A0B;
  --gf-bg-soft:      #111114;
  --gf-glass:        rgba(20, 20, 24, 0.55);
  --gf-glass-strong: rgba(14, 14, 18, 0.75);
  --gf-glass-thin:   rgba(255, 255, 255, 0.04);

  --gf-line:         rgba(255, 255, 255, 0.10);
  --gf-line-strong:  rgba(255, 255, 255, 0.18);
  --gf-line-faint:   rgba(255, 255, 255, 0.05);
  --gf-shine:        rgba(255, 255, 255, 0.08);  /* inset highlight */

  --gf-text:         #F5F1E8;   /* warm-white display text */
  --gf-text-mute:    rgba(245, 241, 232, 0.55);
  --gf-text-faint:   rgba(245, 241, 232, 0.35);

  --gf-accent:       #F5F1E8;
  --gf-good:         #C7E9C9;   /* soft sage — fits well */
  --gf-warn:         #E8C09A;   /* warm amber — narrow or wide */
  --gf-bad:          #E89A9A;   /* dusty rose — far off */

  --gf-radius-sm:    8px;
  --gf-radius-md:    14px;
  --gf-radius-lg:    22px;
  --gf-radius-pill:  999px;

  --gf-shadow-glass:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 0 0.5px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --gf-shadow-pop:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 0.5px rgba(255, 255, 255, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);

  --gf-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --z-ar:     1;
  --z-top:    50;
  --z-shelf:  60;
  --z-drawer: 80;
  --z-info:   90;
  --z-overlay:200;
  --z-notif:  9999;

  --dock-h:   108px;
}

html, body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--gf-bg);
  font-family: var(--gf-font);
  color: var(--gf-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  letter-spacing: -0.005em;
  overscroll-behavior: none;
  touch-action: manipulation;
}

button, input { font-family: inherit; }

#ar-wrap {
  position: fixed; inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  z-index: var(--z-ar);
  background: #000;
}

#canvas-bg, #canvas-3d {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

#video-el {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

.ar-vignette {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center,
      transparent 55%,
      rgba(0,0,0,0.35) 100%),
    linear-gradient(180deg,
      rgba(0,0,0,0.45) 0%,
      transparent 14%,
      transparent 76%,
      rgba(0,0,0,0.55) 100%);
}

.glass {
  background: var(--gf-glass);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--gf-line);
  box-shadow: var(--gf-shadow-glass);
}

.gf-top {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: var(--z-top);
  height: calc(56px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg,
    rgba(10,10,11,0.72) 0%,
    rgba(10,10,11,0.40) 60%,
    rgba(10,10,11,0.00) 100%);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.gf-top__back {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gf-text-mute);
  text-decoration: none;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 10px 12px 10px 8px;
  border-radius: var(--gf-radius-pill);
  transition: color .2s, background .2s;
}
.gf-top__back:hover {
  color: var(--gf-text);
  background: rgba(255,255,255,0.04);
}
.gf-top__back svg { transition: transform .2s; }
.gf-top__back:hover svg { transform: translateX(-2px); }

.gf-top__brand {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  pointer-events: none;
}
.gf-top__mark {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.32em;
  color: var(--gf-text);
}
.gf-top__sub {
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gf-text-faint);
}

.gf-top__right {
  justify-self: end;
  display: flex; align-items: center; gap: 10px;
}

.gf-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 12px 0 10px;
  background: var(--gf-glass);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--gf-line);
  border-radius: var(--gf-radius-pill);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gf-text-mute);
  transition: color .25s, border-color .25s, background .25s;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}
.gf-pill.is-visible {
  opacity: 1; transform: translateY(0);
  transition: opacity .35s ease, transform .35s ease, color .25s, border-color .25s, background .25s;
}
.gf-pill__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gf-text-faint);
  box-shadow: 0 0 6px currentColor;
}
.gf-pill[data-state="good"] { color: var(--gf-good); border-color: rgba(199, 233, 201, 0.28); }
.gf-pill[data-state="good"] .gf-pill__dot { background: var(--gf-good); color: var(--gf-good); }
.gf-pill[data-state="warn"] { color: var(--gf-warn); border-color: rgba(232, 192, 154, 0.28); }
.gf-pill[data-state="warn"] .gf-pill__dot { background: var(--gf-warn); color: var(--gf-warn); }
.gf-pill[data-state="bad"]  { color: var(--gf-bad);  border-color: rgba(232, 154, 154, 0.28); }
.gf-pill[data-state="bad"]  .gf-pill__dot { background: var(--gf-bad);  color: var(--gf-bad);  }

.gf-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--gf-text-faint);
  font-variant-numeric: tabular-nums;
}

.det-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  transition: background .3s, box-shadow .3s;
}
.det-dot.active {
  background: var(--gf-good);
  box-shadow: 0 0 8px rgba(199, 233, 201, 0.6);
}

.overlay {
  position: fixed; inset: 0;
  z-index: var(--z-overlay);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(245,241,232,0.04) 0%, transparent 55%),
    rgba(7, 7, 9, 0.88);
  backdrop-filter: blur(8px);
  transition: opacity .35s ease;
}

.overlay--start .start-card {
  position: relative;
  width: 100%; max-width: 380px;
  padding: 36px 28px 28px;
  background: var(--gf-glass-strong);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--gf-line);
  border-radius: var(--gf-radius-lg);
  box-shadow: var(--gf-shadow-pop);
  overflow: hidden;
  animation: cardIn .55s cubic-bezier(.16,.84,.32,1.05) both;
}

@keyframes cardIn {
  0%   { opacity: 0; transform: translateY(18px) scale(.97); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0)    scale(1);   filter: blur(0);   }
}

.start-card__halo {
  position: absolute;
  top: -40%; left: 50%;
  width: 320px; height: 320px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle, rgba(245,241,232,0.10) 0%, transparent 60%);
  filter: blur(20px);
  pointer-events: none;
}

.start-glyph {
  position: relative;
  width: 94px; height: 94px;
  margin: 0 auto 22px;
  color: var(--gf-text);
  opacity: 0;
  animation: glyphIn .7s cubic-bezier(.16,.84,.32,1.05) .1s forwards;
}
.start-glyph__path {
  stroke-dasharray: 1700;
  stroke-dashoffset: 1700;
  animation:
    drawGlyph 1.9s cubic-bezier(.45,0,.15,1) .25s forwards,
    glyphPulse 3.4s ease-in-out 2.3s infinite;
}
@keyframes glyphIn {
  0%   { opacity: 0; transform: scale(.78); }
  100% { opacity: .92; transform: scale(1); }
}
@keyframes drawGlyph {
  to { stroke-dashoffset: 0; }
}
@keyframes glyphPulse {
  0%, 100% { opacity: 1;   filter: drop-shadow(0 0 0 transparent); }
  50%      { opacity: .55; filter: drop-shadow(0 0 10px rgba(245,241,232,0.35)); }
}

.start-eyebrow {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.40em;
  color: var(--gf-text-faint);
  margin-bottom: 10px;
}
.start-title {
  font-size: 28px; font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--gf-text);
  margin-bottom: 10px;
}
.start-sub {
  font-size: 13.5px; font-weight: 400;
  line-height: 1.55;
  color: var(--gf-text-mute);
  margin: 0 auto 26px;
  max-width: 280px;
}

.gf-cta {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  background: var(--gf-text);
  color: var(--gf-bg);
  border: none;
  border-radius: var(--gf-radius-pill);
  font-family: var(--gf-font);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  cursor: pointer;
  transition: transform .15s, box-shadow .25s, background .2s;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.4);
  text-decoration: none;
}
.gf-cta:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.5); }
.gf-cta:active { transform: translateY(0); }
.gf-cta svg { transition: transform .2s; }
.gf-cta:hover svg { transform: translateX(2px); }

.gf-cta--secondary {
  background: var(--gf-glass-strong);
  color: var(--gf-text);
  border: 1px solid var(--gf-line-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.gf-cta--ghost {
  background: transparent;
  color: var(--gf-text-mute);
  border: 1px solid var(--gf-line);
  box-shadow: none;
}
.gf-cta--ghost:hover {
  color: var(--gf-text); border-color: var(--gf-line-strong);
  box-shadow: none;
}
.gf-cta--full { width: 100%; }

.start-back {
  display: inline-block;
  margin-top: 18px;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.10em;
  color: var(--gf-text-faint);
  text-decoration: none;
  padding: 6px 8px;
  transition: color .2s;
}
.start-back:hover { color: var(--gf-text-mute); }

.start-tiny {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--gf-line-faint);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--gf-text-faint);
}

.overlay--load .load-card {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 32px 36px;
  background: var(--gf-glass-strong);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--gf-line);
  border-radius: var(--gf-radius-lg);
  box-shadow: var(--gf-shadow-glass);
}
.load-ring {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.10);
  position: relative;
}
.load-ring::after {
  content: '';
  position: absolute; inset: -1.5px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: var(--gf-text);
  animation: spin 1s linear infinite;
}
.load-ring__inner {
  position: absolute; inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,241,232,0.18) 0%, transparent 65%);
}
@keyframes spin { to { transform: rotate(360deg); } }

.load-step {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--gf-text);
}
.load-hint {
  font-size: 11.5px; font-weight: 400;
  color: var(--gf-text-faint);
  max-width: 240px; text-align: center;
  line-height: 1.5;
}

.overlay--error { display: none; }
.overlay--error.visible { display: flex; }

.overlay--error .error-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 36px 32px;
  max-width: 360px; width: 100%;
  background: var(--gf-glass-strong);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--gf-line);
  border-radius: var(--gf-radius-lg);
  box-shadow: var(--gf-shadow-pop);
  color: var(--gf-text);
}
.error-title {
  font-size: 18px; font-weight: 600;
  letter-spacing: -0.01em;
}
.error-msg {
  font-size: 13px; line-height: 1.55;
  color: var(--gf-text-mute);
  margin-bottom: 18px;
}
.error-actions {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  width: 100%;
}

#bottom-shelf {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: var(--z-shelf);
  display: none;
  /* keep entire chrome inside the visual viewport, even on tiny phones */
  padding: 0 12px max(10px, env(safe-area-inset-bottom, 10px));
  max-height: 44dvh;          /* never eat more than 44% of the visible viewport */
  background: linear-gradient(180deg,
    rgba(10,10,11,0) 0%,
    rgba(10,10,11,0.55) 60%,
    rgba(10,10,11,0.85) 100%);
  pointer-events: none;
}
#bottom-shelf.is-visible {
  display: block;
  animation: shelfIn .45s cubic-bezier(.16,.84,.32,1.05) both;
  pointer-events: auto;
}
@keyframes shelfIn {
  0%   { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

.shutter-row {
  display: flex; align-items: center; justify-content: center;
  gap: 28px;
  padding: 6px 0 12px;
}

.shutter {
  position: relative;
  width: 72px; height: 72px;
  background: rgba(245, 241, 232, 0.06);
  border: 1.5px solid rgba(245, 241, 232, 0.55);
  border-radius: 50%;
  cursor: pointer;
  transition: transform .15s, border-color .2s, background .2s;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    0 12px 28px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.15);
  padding: 0;
}
.shutter:hover { border-color: var(--gf-text); }
.shutter:active { transform: scale(0.94); }
.shutter:disabled { opacity: 0.4; cursor: not-allowed; }

.shutter__ring {
  position: absolute; inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(245, 241, 232, 0.25);
}
.shutter__core {
  position: absolute; inset: 12px;
  border-radius: 50%;
  background: var(--gf-text);
  transition: transform .15s, background .15s;
}
.shutter:active .shutter__core {
  transform: scale(0.86);
  background: var(--gf-good);
}

.icon-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gf-glass);
  border: 1px solid var(--gf-line);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--gf-text);
  transition: background .2s, border-color .2s, transform .15s;
  box-shadow: var(--gf-shadow-glass);
  padding: 0;
}
.icon-btn:hover { background: rgba(255,255,255,0.08); border-color: var(--gf-line-strong); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

.dock {
  background: var(--gf-glass-strong);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--gf-line);
  border-radius: var(--gf-radius-lg);
  padding: 12px 14px 14px;
  box-shadow: var(--gf-shadow-glass);
}

.dock__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px 8px;
}
.dock__eyebrow {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gf-text-faint);
}
.dock__count {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--gf-text-faint);
  font-variant-numeric: tabular-nums;
}

.dock__strip {
  display: flex; gap: 10px;
  overflow-x: auto; overflow-y: hidden;
  padding: 4px 2px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.dock__strip::-webkit-scrollbar { display: none; }

.model-thumb {
  flex-shrink: 0;
  position: relative;
  width: 60px; height: 60px;
  border: none; padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  overflow: hidden;
  transition: transform .2s, box-shadow .25s;
  scroll-snap-align: center;
}
.model-thumb::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid var(--gf-line);
  pointer-events: none;
  transition: border-color .25s, inset .25s;
}
.model-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05);
}
.model-thumb span {
  position: absolute; left: 50%; bottom: -16px;
  transform: translateX(-50%);
  font-size: 8.5px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--gf-text-faint);
  white-space: nowrap;
  opacity: 0; transition: opacity .2s, color .2s;
}
.model-thumb:hover { transform: translateY(-2px); }
.model-thumb:hover::before { border-color: var(--gf-line-strong); }
.model-thumb:hover span { opacity: 1; }

.model-thumb.active {
  transform: translateY(-2px);
}
.model-thumb.active::before {
  border: 1.5px solid var(--gf-text);
  inset: -3px;
}
.model-thumb.active span {
  opacity: 1; color: var(--gf-text);
}

/* loading state — a thin progress ring around the just-tapped thumb,
   tells the user their tap registered while the (huge) GLB is fetching. */
.model-thumb.is-loading::before {
  border-color: transparent;
  /* conic-gradient ring rotates → "loading" */
  background:
    conic-gradient(from 0deg,
      var(--gf-text) 0%,
      var(--gf-text) 25%,
      rgba(255,255,255,0.12) 25%,
      rgba(255,255,255,0.12) 100%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%);
          mask: radial-gradient(circle, transparent 60%, #000 62%);
  animation: gfThumbSpin 1s linear infinite;
  inset: -3px;
}
@keyframes gfThumbSpin {
  to { transform: rotate(360deg); }
}

.dock__strip { padding-bottom: 14px; }

.drawer {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: var(--z-drawer);
  margin: 0 auto;
  max-width: 420px; width: calc(100% - 24px);
  transform: translateY(calc(100% + 24px));
  background: var(--gf-glass-strong);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--gf-line);
  border-radius: var(--gf-radius-lg);
  padding: 18px 20px 22px;
  margin-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  box-shadow: var(--gf-shadow-pop);
  transition: transform .35s cubic-bezier(.16,.84,.32,1);
}
.drawer.open { transform: translateY(0); }

.drawer__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
}
.drawer__eyebrow {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gf-text-faint);
  margin-bottom: 4px;
}
.drawer__title {
  font-size: 18px; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--gf-text);
}
.drawer__foot { margin-top: 18px; }

.ctrl { margin-bottom: 18px; }
.ctrl:last-of-type { margin-bottom: 0; }
.ctrl__row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.ctrl__label {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gf-text);
}
.ctrl__hint {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--gf-text-faint);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px;
  background: rgba(255,255,255,0.10);
  border-radius: 999px;
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gf-text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.5), 0 0 0 4px rgba(245,241,232,0.10);
  cursor: grab;
  transition: box-shadow .2s, transform .15s;
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.1); cursor: grabbing; }
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gf-text);
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5), 0 0 0 4px rgba(245,241,232,0.10);
  cursor: grab;
}

.info-card {
  position: fixed;
  top: calc(56px + env(safe-area-inset-top, 0px));
  right: 10px;
  bottom: auto;
  z-index: var(--z-info);
  width: auto;
  min-width: 116px;
  max-width: 168px;
  padding: 8px 11px;
  background: var(--gf-glass-strong);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--gf-line);
  border-radius: var(--gf-radius-md);
  box-shadow: var(--gf-shadow-glass);
  animation: cardIn .35s ease both;
}
.info-card[hidden] { display: none; }
.info-card__row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px;
  padding: 3.5px 0;
  border-bottom: 1px solid var(--gf-line-faint);
  font-size: 11px;
}
.info-card__row:last-child { border-bottom: none; }
.info-card__key {
  color: var(--gf-text-faint);
  font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  font-size: 8.5px;
}
.info-card__val {
  color: var(--gf-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.gf-notif {
  position: fixed;
  top: calc(70px + env(safe-area-inset-top, 0px));
  left: 50%; transform: translateX(-50%) translateY(-8px);
  z-index: var(--z-notif);
  padding: 10px 18px;
  background: var(--gf-glass-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--gf-line);
  border-radius: var(--gf-radius-pill);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gf-text);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  box-shadow: var(--gf-shadow-glass);
}
.gf-notif.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 480px) {
  .gf-top__sub { display: none; }
  .gf-top__back span { display: none; }
  .gf-top__back { padding: 10px; }
  .shutter { width: 64px; height: 64px; }
  .shutter__ring { inset: 5px; }
  .shutter__core { inset: 10px; }
  .icon-btn { width: 44px; height: 44px; }
  .shutter-row { gap: 22px; }
  .model-thumb { width: 54px; height: 54px; }
  .info-card { right: 10px; left: auto; min-width: 110px; max-width: 150px; }
}

@media (min-width: 768px) {
  #bottom-shelf {
    max-width: 520px;
    margin: 0 auto;
  }
  .start-card { max-width: 420px; padding: 44px 36px 32px; }
  .start-title { font-size: 32px; }
}

/* ────────────────────────────────────────────────────────────────────────
   Short viewports — guarantee the bottom shelf (shutter + dock) ALWAYS
   stays visible. The breakpoints below cover every realistic phone, in
   portrait and landscape, including iOS Safari with the URL bar shown.
   ──────────────────────────────────────────────────────────────────────── */

/* tighten slightly under ~iPhone 14 / Galaxy S20 height */
@media (max-height: 760px) {
  .dock { padding: 10px 12px 10px; }
  .model-thumb { width: 54px; height: 54px; }
  .shutter { width: 66px; height: 66px; }
  .shutter__ring { inset: 5px; }
  .shutter__core { inset: 10px; }
  .icon-btn { width: 44px; height: 44px; }
  .shutter-row { padding: 4px 0 10px; gap: 22px; }
  .dock__head { padding: 0 4px 6px; }
  .dock__strip { padding: 2px 2px 6px; }
}

/* iPhone 13 mini / SE 3 portrait */
@media (max-height: 680px) {
  .dock { padding: 8px 10px 8px; }
  .model-thumb { width: 48px; height: 48px; }
  .shutter { width: 60px; height: 60px; }
  .shutter__ring { inset: 5px; }
  .shutter__core { inset: 9px; }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn svg { width: 17px; height: 17px; }
  .shutter-row { padding: 2px 0 8px; gap: 20px; }
  .gf-top { height: calc(50px + env(safe-area-inset-top, 0px)); }
  .gf-top__sub { display: none; }
  .dock__eyebrow { font-size: 8.5px; }
  .dock__count { font-size: 9px; }
}

/* iPhone SE 1/2 portrait, older Androids */
@media (max-height: 600px) {
  .dock { padding: 6px 10px 6px; border-radius: var(--gf-radius-md); }
  .model-thumb { width: 42px; height: 42px; }
  .shutter { width: 54px; height: 54px; }
  .shutter__ring { inset: 4px; }
  .shutter__core { inset: 8px; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn svg { width: 15px; height: 15px; }
  .shutter-row { padding: 2px 0 6px; gap: 16px; }
  .gf-top { height: calc(46px + env(safe-area-inset-top, 0px)); }
  .gf-top__sub { display: none; }
  .gf-top__back span { display: none; }
  .gf-top__back { padding: 8px; }
  .dock__head { padding: 0 4px 4px; }
  .dock__strip { padding: 2px 2px 4px; gap: 8px; }
}

/* Anything tinier than SE 1 (very rare) — collapse the dock head to gain height.
   Visual thumb stays small but ::before is expanded so the tap target hits 44px+. */
@media (max-height: 540px) {
  .dock__head { display: none; }
  .dock { padding: 6px 8px; }
  .model-thumb { width: 38px; height: 38px; }
  .model-thumb::before { inset: -4px; }     /* keep tap-target ≥ 46px */
  .shutter { width: 50px; height: 50px; }
  .shutter-row { padding: 2px 0 4px; gap: 14px; }
}

/* Landscape phones */
@media (max-height: 480px) and (orientation: landscape) {
  .gf-top { height: calc(42px + env(safe-area-inset-top, 0px)); }
  .dock { padding: 6px 10px; }
  .model-thumb { width: 38px; height: 38px; }
  .shutter { width: 50px; height: 50px; }
  .shutter-row { padding: 2px 0 6px; gap: 14px; }
  .dock__head { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .start-glyph { animation: none; opacity: .92; transform: none; }
  .start-glyph__path { animation: none; stroke-dashoffset: 0; }
  .overlay--start .start-card { animation: none; }
  .load-ring::after { animation-duration: 2s; }
}
