:root {
  --bg: #0d0a08;
  --ink: #efe8dc;
  --muted: #a39887;
  --amber: #e9a23b;
  --danger: #e2574c;
  --font: 'Heebo', -apple-system, 'Segoe UI', Arial, sans-serif;
  --engrave: 'Oswald', 'Arial Narrow', sans-serif;
  --chrome: conic-gradient(from 20deg, #f4f1ea, #9a958c 14%, #fbfaf6 28%, #87827a 42%, #e6e2d9 56%, #8e897f 70%, #f7f4ee 84%, #f4f1ea);
  --metal: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 1px, transparent 1px 3px), linear-gradient(#e6e2d9, #aaa49a 62%, #8f897f);
  --vf: min(calc(100vw - 76px), 330px, calc(100dvh - 500px));
  --L: min(62vw, 270px, calc(100dvh - 500px));
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(120% 70% at 50% 0%, #241c16, var(--bg) 70%);
  color: var(--ink);
  font-family: var(--font);
  overscroll-behavior: none;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Gear illustrations draw their own fills and strokes. */
svg.art { fill: #000; stroke: none; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; }
#video { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.engrave {
  font-family: var(--engrave);
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--case-ink, rgba(232, 220, 198, .55));
  text-shadow: var(--case-shadow, 0 -1px 0 rgba(0,0,0,.7));
  white-space: nowrap;
  text-transform: uppercase;
}

/* ================= Stage & 3D flip ================= */
.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
  perspective: 1800px;
  z-index: 0;
  isolation: isolate;
}
.cam {
  position: relative;
  width: min(100%, 440px);
  height: min(100%, 880px);
  transform-style: preserve-3d;
  transition: transform .85s cubic-bezier(.65, .05, .3, 1);
  direction: ltr;
}
.cam.flipped { transform: rotateY(180deg); }
.cam { --case-1: #3b2f26; --case-2: #1c1611; --case-text: #efe8dc; }
.cam[data-case="noir"] { --case-1: #303030; --case-2: #0c0c0c; }
.cam[data-case="cherry"] { --case-1: #a3302c; --case-2: #4b0f0d; }
.cam[data-case="navy"] { --case-1: #33507a; --case-2: #111c2e; }
.cam[data-case="silver"] { --case-1: #d6d6d2; --case-2: #8b8b86; --case-ink: rgba(30,30,30,.72); --case-shadow: 0 1px 0 rgba(255,255,255,.4); --case-text: #1d1d1d; }
.cam[data-case="plum"] { --case-1: #6a3466; --case-2: #26101f; }
.cam[data-case="mint"] { --case-1: #a3d6c3; --case-2: #5f9a86; --case-ink: rgba(18,48,38,.75); --case-shadow: 0 1px 0 rgba(255,255,255,.35); --case-text: #12302a; }
.cam[data-case="sand"] { --case-1: #e3d0ae; --case-2: #a68d64; --case-ink: rgba(60,44,22,.78); --case-shadow: 0 1px 0 rgba(255,255,255,.4); --case-text: #3a2a16; }

.face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: 32px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.04) 0 .8px, transparent 1.3px) 0 0 / 4px 4px,
    radial-gradient(circle at 70% 70%, rgba(0,0,0,.4) 0 .9px, transparent 1.4px) 0 0 / 6px 6px,
    radial-gradient(130% 90% at 50% 0%, var(--case-1), var(--case-2) 72%);
  transition: background .4s;
  box-shadow: 0 30px 70px rgba(0,0,0,.75), 0 0 0 1px #000;
  overflow: hidden;
}
.front { transform: rotateY(180deg); }
.front::after { top: 164px; }
.front-bottom { margin-top: auto; }

/* chrome rim */
.face::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 6px;
  background: linear-gradient(160deg, #f1ede5, #8b857b 35%, #dcd7cd 60%, #6f6961);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  z-index: 2;
}
/* stitching */
.face::after {
  content: '';
  position: absolute;
  inset: 15px;
  top: 108px;
  border-radius: 22px;
  border: 1.5px dashed rgba(255, 240, 220, .09);
  pointer-events: none;
}

.screw {
  position: absolute;
  width: 11px; height: 11px;
  border-radius: 50%;
  z-index: 3;
  background:
    linear-gradient(45deg, transparent 44%, #3e3a33 44% 56%, transparent 56%),
    radial-gradient(circle at 35% 35%, #fbf9f4, #8e897f 60%, #4d4942);
  box-shadow: 0 1px 1px rgba(0,0,0,.6);
}
.screw.tl { top: 13px; left: 13px; }
.screw.tr { top: 13px; right: 13px; transform: rotate(70deg); }
.screw.bl { bottom: 13px; left: 13px; transform: rotate(20deg); }
.screw.br { bottom: 13px; right: 13px; transform: rotate(110deg); }

/* ================= Back ================= */
.top-plate {
  position: relative;
  margin: 6px 6px 0;
  height: 96px;
  flex: none;
  border-radius: 26px 26px 12px 12px;
  background: var(--metal);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 4px rgba(0,0,0,.25), 0 5px 12px rgba(0,0,0,.55);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  color: #2f2a24;
}
.top-plate .engrave, .front-top .engrave { color: rgba(45,40,34,.7); text-shadow: 0 1px 0 rgba(255,255,255,.6); }

.counter { display: flex; flex-direction: column; align-items: center; gap: 5px; justify-self: start; }
.counter-win {
  width: 48px; height: 30px;
  border-radius: 8px;
  overflow: hidden;
  display: grid; place-items: center;
  background: linear-gradient(#050404, #1a1612);
  box-shadow: 0 0 0 3px #8c867c, 0 0 0 4px #4a453e, inset 0 3px 6px rgba(0,0,0,.9);
  font-family: var(--engrave);
  font-size: 18px;
  color: #f4ead6;
}
.counter-win span { display: block; }
.counter-win span.roll { animation: roll .45s ease; }
@keyframes roll { 0% { transform: translateY(0); } 45% { transform: translateY(-120%); } 46% { transform: translateY(120%); } 100% { transform: translateY(0); } }

.brand { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 27px;
  line-height: 1;
  color: #2c271f;
  text-shadow: 0 1px 0 rgba(255,255,255,.75), 0 -1px 0 rgba(0,0,0,.25);
}

.shutter-group { justify-self: end; display: flex; align-items: center; gap: 10px; }
.shutter-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.shutter.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 6px 10px rgba(0,0,0,.5), inset 0 1px 1px #fff, 0 0 0 1px #5c574f, 0 0 0 8px rgba(233,162,59,.35); } }
.brand { cursor: pointer; padding: 4px 8px; border-radius: 10px; }
.brand:active { background: rgba(0,0,0,.06); }
.model-name { margin-top: 3px; padding: 2px 7px; border-radius: 99px; background: rgba(0,0,0,.08); }
.led {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #3b2219;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.8), 0 0 0 2px #6d675e;
  transition: background .2s, box-shadow .2s;
}
.led.on { background: var(--gel, #fff); box-shadow: 0 0 10px var(--gel, #fff), 0 0 0 2px #6d675e; }
.led.blink { animation: blink .18s steps(2) infinite; }
@keyframes blink { 50% { background: #3b2219; box-shadow: inset 0 1px 2px rgba(0,0,0,.8), 0 0 0 2px #6d675e; } }

.shutter {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--chrome);
  box-shadow: 0 6px 10px rgba(0,0,0,.5), inset 0 1px 1px #fff, 0 0 0 1px #5c574f;
  transition: transform .08s;
}
.shutter span {
  width: 42px; height: 42px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(80,55,15,.18) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 38% 30%, #fff6dc 0 8%, #f0cf86 30%, #b88a37 66%, #7a5718);
  box-shadow: inset 0 -4px 6px rgba(0,0,0,.35), inset 0 3px 3px rgba(255,255,255,.55), 0 2px 2px rgba(0,0,0,.4);
  transition: transform .08s;
}
.shutter.down, .shutter:active { transform: translateY(2px); }
.shutter.down span, .shutter:active span { transform: scale(.9); box-shadow: inset 0 3px 6px rgba(0,0,0,.45); }

/* Viewfinder */
.vf-housing {
  margin: auto auto 0;
  padding: 13px;
  flex: none;
  border-radius: 28px;
  background: linear-gradient(#1b1612, #0a0807);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 8px 16px rgba(0,0,0,.65), 0 0 0 2px #090706;
}
.vf {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--vf);
  height: var(--vf);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.vf canvas { display: block; }
.vf-glass {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255,255,255,.17) 0%, rgba(255,255,255,.04) 26%, transparent 38%),
    radial-gradient(circle, transparent 62%, rgba(0,0,0,.4));
  box-shadow: inset 0 0 20px rgba(0,0,0,.85);
}
.vf.optic .vf-glass::after {
  content: '';
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 3px;
  box-shadow: 0 0 2px rgba(0,0,0,.5);
}
.vf.optic .vf-glass::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
}
.vf-mode {
  position: absolute;
  top: 21px; left: 56px;
  font-family: var(--engrave);
  font-size: 10px;
  letter-spacing: .25em;
  color: rgba(255,255,255,.55);
  pointer-events: none;
}
.curtain { position: absolute; inset: 0; background: #000; transform: scaleY(0); pointer-events: none; }
.curtain.fire { animation: curtain .26s ease-in-out; }
@keyframes curtain {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.vf-msg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px;
  text-align: center;
  background: rgba(6,5,4,.9);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.vf-btn {
  position: absolute;
  z-index: 2;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15);
}
.vf-btn svg { width: 21px; height: 21px; }
.vf-selfie { top: 9px; left: 9px; }
.vf-selfie.on { background: rgba(233,162,59,.85); color: #1d140a; }
.vf-zoom { bottom: 9px; right: 9px; width: 34px; height: 34px; }
.vf-exit { top: 9px; right: 9px; display: none; }
body.editing .vf-selfie { display: none; }
.vf-badge, .vf-count {
  position: absolute;
  font-family: var(--engrave);
  color: #fff;
  pointer-events: none;
}
.vf-badge { top: 14px; left: 50%; transform: translateX(-50%); font-size: 11px; letter-spacing: .2em; padding: 3px 9px; border-radius: 99px; background: rgba(233,162,59,.85); color: #1d140a; }
.vf-count { inset: 0; display: grid; place-items: center; font-size: 96px; text-shadow: 0 4px 20px rgba(0,0,0,.7); }
body.editing .vf-exit { display: grid; }

/* Film window + switches */
.mid-row {
  display: flex;
  gap: 16px;
  margin: 18px 22px 0;
  align-items: center;
  flex: none;
}
.dial-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: auto 30px 14px;
  flex: none;
}
.speed-dial { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.dial-knurl {
  --rot: 0deg;
  position: relative;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: repeating-conic-gradient(from var(--rot), #2a2622 0 6deg, #8f897f 6deg 12deg);
  box-shadow: 0 5px 9px rgba(0,0,0,.55), 0 0 0 2px #1a1714;
  transition: background .2s;
}
.dial-win {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #2a2622, #0b0908);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.9), 0 0 0 2px #b7b1a6;
}
.dial-win b { font-family: var(--engrave); font-weight: 500; font-size: 14px; color: #f4ead6; }
.speed-dial:active .dial-knurl { transform: scale(.96); }
.back-plate {
  margin: auto auto 18px;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--metal);
  box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 1px 0 #fff;
}
.back-plate .engrave { color: rgba(45,40,34,.75); text-shadow: 0 1px 0 rgba(255,255,255,.6); font-size: 8px; }
.film-window { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
.film-label {
  position: relative;
  display: block;
  width: 100%;
  height: 54px;
  border-radius: 7px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(0,0,0,.08) 22px 24px),
    linear-gradient(var(--a, #888) 0 58%, var(--b, #444) 58%);
  box-shadow: 0 0 0 3px #908a80, 0 0 0 4px #3a352f, 0 4px 8px 4px rgba(0,0,0,.4);
  text-align: left;
}
.film-label::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.35), rgba(255,255,255,.05) 35%, transparent 50%);
}
.film-label b {
  position: absolute;
  left: 8px; top: 7px;
  padding: 1px 7px;
  border-radius: 3px;
  background: rgba(0,0,0,.45);
  font-family: var(--engrave);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .04em;
  color: #fff;
}
.film-label i {
  position: absolute;
  right: 9px; bottom: 5px;
  font-style: normal;
  font-family: var(--engrave);
  font-size: 11px;
  color: rgba(255,255,255,.85);
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.film-window:active .film-label { transform: scale(.98); }

.switches { display: flex; flex-direction: column; gap: 9px; flex: none; }
.switch { justify-content: flex-end; }
.switch { display: flex; align-items: center; gap: 7px; direction: ltr; }
.track {
  position: relative;
  width: 36px; height: 17px;
  border-radius: 99px;
  background: #0b0908;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.08);
}
.knob {
  position: absolute;
  top: 1.5px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--chrome);
  box-shadow: 0 1px 2px rgba(0,0,0,.7);
  transition: transform .18s cubic-bezier(.3,1.6,.6,1);
}
.switch.on .knob { transform: translateX(18px); }

/* Bottom row */
.bottom-row, .front-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  padding: 0 26px 26px;
  flex: none;
}
.knob-btn { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.knob-btn svg {
  width: 48px; height: 48px;
  padding: 12px;
  border-radius: 50%;
  background: var(--chrome);
  color: #3a342c;
  box-shadow: 0 5px 9px rgba(0,0,0,.55), inset 0 1px 1px #fff, 0 0 0 1px #4f4a43;
  transition: transform .1s;
}
.knob-btn.big svg { width: 62px; height: 62px; padding: 16px; }
.knob-btn:active svg { transform: translateY(2px) scale(.96); }
#importBtn { justify-self: end; }
.front-gear { display: flex; justify-content: center; gap: 10px; margin: -6px 0 16px; flex: none; }
.gear-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px 8px 12px;
  border-radius: 99px;
  background: var(--chrome);
  color: #2f2a24;
  font-family: var(--engrave);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 4px 8px rgba(0,0,0,.5), inset 0 1px 1px #fff, 0 0 0 1px #4f4a43;
}
.gear-pill svg { width: 18px; height: 18px; }
.gear-pill:active { transform: translateY(1px); }
/* Shutter sits in the thumb zone at the bottom; the top plate keeps the small LOAD knob. */
.bottom-row .shutter { width: 86px; height: 86px; }
.bottom-row .shutter span { width: 62px; height: 62px; }
.knob-btn.small { gap: 4px; }
.knob-btn.small svg { width: 40px; height: 40px; padding: 10px; }

.prints { justify-self: start; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.stack { position: relative; width: 56px; height: 56px; display: block; }
.stack:empty { border: 1.5px dashed rgba(255,240,220,.22); border-radius: 6px; }
.stack .mini {
  position: absolute;
  inset: 0;
  background: #f3efe6;
  padding: 3px 3px 9px;
  box-shadow: 0 3px 6px rgba(0,0,0,.6);
}
.stack .mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stack .mini:nth-child(1) { transform: rotate(-9deg) translate(-3px, 1px); }
.stack .mini:nth-child(2) { transform: rotate(5deg) translate(2px, -1px); }
.stack .mini:nth-child(3) { transform: rotate(-2deg); }
.prints.pop .stack { animation: pop .4s ease; }
@keyframes pop { 50% { transform: scale(1.15); } }

/* ================= Front ================= */
.front-top {
  margin: 6px 6px 0;
  height: 146px;
  flex: none;
  border-radius: 26px 26px 12px 12px;
  background: var(--metal);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 4px rgba(0,0,0,.25), 0 5px 12px rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.flash-unit {
  width: 158px; height: 66px;
  padding: 7px;
  border-radius: 11px;
  background: linear-gradient(#2c2723, #121010);
  box-shadow: 0 0 0 4px #bdb7ac, 0 0 0 5px #57524a, 0 7px 12px rgba(0,0,0,.55);
  transition: transform .1s;
}
.flash-unit:active { transform: scale(.97); }
.reflector {
  display: block;
  width: 100%; height: 100%;
  border-radius: 5px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.2) 0 2px, transparent 2px 7px),
    radial-gradient(ellipse at 50% 50%, #fff 0 8%, var(--gel, #888) 42%, #1a1714 100%);
  box-shadow: inset 0 0 8px rgba(0,0,0,.7);
}
.reflector.off {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 2px, transparent 2px 7px),
    linear-gradient(#34302b, #1c1916);
}
.reflector.fire { animation: strobe .35s ease-out; }
@keyframes strobe { 0% { filter: brightness(3); } 100% { filter: none; } }
.plate { font-family: var(--engrave); font-size: 11px; letter-spacing: .2em; color: rgba(45,40,34,.75); text-shadow: 0 1px 0 rgba(255,255,255,.6); }

.front-brand {
  margin: 18px auto 0;
  font-family: var(--engrave);
  font-size: 13px;
  letter-spacing: .7em;
  padding-left: .7em;
  color: var(--case-ink, rgba(235, 222, 200, .45));
  text-shadow: var(--case-shadow, 0 -1px 0 rgba(0,0,0,.7));
}

.lens-zone {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  touch-action: pan-y;
}
.lens-arrow { width: 34px; height: 60px; font-size: 34px; line-height: 1; color: rgba(235,222,200,.5); }
.lens-arrow:active { color: #fff; }
.lens-mount {
  width: var(--L);
  height: var(--L);
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 11px #17120f, 0 0 0 13px #7a7368, 0 0 0 14px #0c0a08, 0 0 0 22px rgba(0,0,0,.25), 0 25px 50px rgba(0,0,0,.7);
  cursor: grab;
}
.lens {
  --ring: conic-gradient(#e9e9e9, #8f8f8f 12%, #f7f7f7 25%, #7c7c7c 38%, #dedede 50%, #8a8a8a 63%, #f2f2f2 75%, #7f7f7f 88%, #e9e9e9);
  --k1: #3a3a3a; --k2: #8a8a8a;
  position: relative;
  width: 100%; height: 100%;
  transition: transform .3s cubic-bezier(.3, .7, .3, 1), opacity .3s;
  will-change: transform;
}
.lens[data-ring="black"] {
  --ring: conic-gradient(#444, #111 12%, #525252 25%, #0d0d0d 38%, #444 50%, #121212 63%, #4a4a4a 75%, #0f0f0f 88%, #444);
  --k1: #0e0e0e; --k2: #2e2e2e;
}
.lens[data-ring="brass"] {
  --ring: conic-gradient(#f0d79a, #9a7433 12%, #ffe9b0 25%, #8a652a 38%, #e8cc8a 50%, #94702f 63%, #fbe3a6 75%, #8c682c 88%, #f0d79a);
  --k1: #5a4220; --k2: #b8944f;
}
.lens.dragging { transition: none; }
.lens.swap-out { transition-duration: .22s; opacity: 0; }
.lens.no-anim { transition: none; }
.lens > * { position: absolute; border-radius: 50%; }
.l-ring { inset: 0; background: var(--ring); box-shadow: inset 0 2px 3px rgba(255,255,255,.55), inset 0 -3px 6px rgba(0,0,0,.5); }
.l-knurl { inset: 6%; background: repeating-conic-gradient(var(--k1) 0 2.5deg, var(--k2) 2.5deg 5deg); box-shadow: inset 0 0 6px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.6); }
.l-barrel { inset: 13%; background: radial-gradient(circle, #040404 0 57%, #262626 60%, #0a0a0a 64%, #141414 100%); box-shadow: inset 0 2px 6px rgba(0,0,0,.9); }
.l-text { inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.l-text text { font-family: var(--engrave); font-size: 4.3px; letter-spacing: .55px; fill: rgba(240,234,222,.82); stroke: none; }
.l-glass {
  inset: 29%;
  background:
    radial-gradient(circle at 36% 31%, rgba(255,255,255,.9) 0 4%, transparent 7%),
    radial-gradient(circle at 63% 67%, rgba(255,255,255,.28) 0 5%, transparent 9%),
    radial-gradient(circle at 50% 50%, var(--a) 0%, var(--b) 52%, #020202 86%);
  box-shadow: inset 0 0 0 2px #000, inset 0 0 26px rgba(0,0,0,.9);
}
.l-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 210deg, transparent 0 8%, color-mix(in srgb, var(--a) 70%, transparent) 17%, transparent 28%, transparent 58%, rgba(255,255,255,.16) 66%, transparent 76%);
  mix-blend-mode: screen;
}

.lens-plate { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 10px 0 16px; flex: none; }
.lens-plate strong { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 23px; direction: ltr; }
.lens-plate strong { color: var(--case-text); }
.lens-plate span { font-size: 13px; color: var(--case-ink, var(--muted)); }
.lens-plate .lens-hint { font-size: 11px; opacity: .8; margin-top: 4px; }
.plate-hint { font-size: 10px; color: rgba(45,40,34,.6); }
.lens-arrow { color: var(--case-ink, rgba(235,222,200,.5)); }
#caseBtn { justify-self: end; }
.hint { justify-self: end; text-align: center; font-size: 11px; line-height: 1.4; color: var(--muted); padding-bottom: 10px; }
#shuffleBtn { justify-self: start; }

/* ================= Film door ================= */
.door {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: flex-end;
  animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } }
.door-panel {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 20px 18px calc(26px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0 2px, transparent 2px 6px),
    linear-gradient(#17120e, #0b0907);
  box-shadow: 0 -2px 0 #8f897f, 0 -3px 0 #3d3832, 0 -20px 50px rgba(0,0,0,.6);
  transform-origin: bottom;
  animation: doorOpen .4s cubic-bezier(.2,.9,.3,1);
}
@keyframes doorOpen { from { transform: translateY(100%); } }
.door.closing .door-panel { transition: transform .3s ease-in; transform: translateY(100%); }
.door-head { display: flex; align-items: center; justify-content: space-between; }
.door-head h2 { margin: 0; font-size: 20px; }
.door-sub { margin: 4px 0 18px; font-size: 13px; color: var(--muted); }
.cans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 6px; }
.can { display: flex; flex-direction: column; align-items: center; gap: 9px; transition: transform .12s; }
.can:active { transform: scale(.94); }
.can-body {
  position: relative;
  width: 50px; height: 74px;
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.55), rgba(255,255,255,.2) 28%, rgba(255,255,255,.04) 46%, rgba(0,0,0,.5)),
    linear-gradient(var(--a) 0 56%, var(--b) 56%);
  box-shadow: 0 7px 12px rgba(0,0,0,.6);
}
.can-body::before, .can-body::after {
  content: '';
  position: absolute;
  left: 3px; right: 3px;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(90deg, #2e2e2e, #c4c4c4 35%, #555 70%, #2a2a2a);
}
.can-body::before { top: -6px; }
.can-body::after { bottom: -5px; }
.can-body .leader {
  position: absolute;
  right: -13px; top: 22px;
  width: 15px; height: 32px;
  border-radius: 0 3px 3px 0;
  background:
    repeating-linear-gradient(#2a170c 0 3px, #000 3px 5px) left / 3px 100% no-repeat,
    repeating-linear-gradient(#2a170c 0 3px, #000 3px 5px) right / 3px 100% no-repeat,
    linear-gradient(90deg, #3a2213, #5a3720);
}
.can-body .iso {
  position: absolute;
  left: 0; right: 0; top: 12px;
  text-align: center;
  font-family: var(--engrave);
  font-size: 13px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.7);
}
.can-name { font-size: 11px; direction: ltr; color: #d9cfbf; white-space: nowrap; }
.can.loaded .can-name { color: var(--amber); }
.can.loaded .can-body { box-shadow: 0 0 0 2px var(--amber), 0 7px 12px rgba(0,0,0,.6); }

/* ================= Developing ================= */
.develop {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: rgba(6,5,4,.85);
  animation: fade .25s;
}
.develop-print {
  position: relative;
  width: min(76vw, 330px);
  transform: translateY(80vh) rotate(5deg);
  transition: transform .75s cubic-bezier(.2, .85, .25, 1);
  box-shadow: 0 24px 60px rgba(0,0,0,.85);
}
.develop.in .develop-print { transform: translateY(0) rotate(-1.5deg); }
.develop.fly .develop-print { transition: transform .45s cubic-bezier(.5, 0, .8, .4), opacity .45s; transform: var(--fly); opacity: 0; }
.develop-print img { display: block; width: 100%; }
.develop-print .emulsion {
  position: absolute;
  background: linear-gradient(160deg, #2b231b, #120e0b);
  opacity: 1;
  transition: opacity 3.2s cubic-bezier(.5, 0, .4, 1);
}
.develop.dev .emulsion { opacity: 0; }
.develop.instant .emulsion { background: linear-gradient(160deg, #3c463f, #1d2420); transition-duration: 14s; transition-timing-function: cubic-bezier(.3, 0, .6, 1); }
.develop.digital .emulsion { display: none; }
.develop.digital .develop-print { transition-duration: .35s; }
.develop-hint { margin: 0; font-size: 14px; color: var(--muted); min-height: 20px; }

.screen-flash { position: fixed; inset: 0; z-index: 50; background: #fff; opacity: 0; pointer-events: none; }
.screen-flash.fire { animation: sflash .5s ease-out; }
@keyframes sflash { 0% { opacity: .95; } 100% { opacity: 0; } }

/* ================= Prints box / viewer ================= */
.close-x {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  font-size: 16px;
}
.pill-btn {
  padding: 10px 18px;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.13);
  font-size: 14px;
  font-weight: 500;
}
.pill-btn:active { background: rgba(255,255,255,.16); }
.pill-btn.danger { color: var(--danger); border-color: rgba(226,87,76,.35); }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.025) 0 1px, transparent 1.5px) 0 0 / 5px 5px,
    linear-gradient(#1c1510, #0e0b09);
  animation: up .28s ease;
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 920px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
  background: rgba(20,15,12,.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.sheet-head h2 { margin: 0; font-size: 20px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px 10px;
  max-width: 920px;
  margin: 0 auto;
  padding: 10px 16px 40px;
}
.grid button { display: grid; place-items: center; aspect-ratio: 1; }
.grid img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 8px 16px rgba(0,0,0,.65);
  transform: rotate(var(--r, 0deg));
  transition: transform .2s;
}
.grid button:active img { transform: scale(.96) rotate(var(--r, 0deg)); }
.empty { text-align: center; color: var(--muted); margin-top: 30vh; }

.viewer {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0,0,0,.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: calc(64px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}
.viewer img { max-width: 100%; max-height: 62vh; object-fit: contain; box-shadow: 0 12px 40px rgba(0,0,0,.8); }
.viewer-close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; }
.viewer-meta { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.viewer-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(160px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px);
  z-index: 60;
  padding: 10px 18px;
  border-radius: 99px;
  background: #efe8dc;
  color: #1b1712;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= Enlarged viewfinder ================= */
.bigvf {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: calc(16px + env(safe-area-inset-top)) 12px calc(20px + env(safe-area-inset-bottom));
  background: #050403;
  animation: fade .2s;
}
.bigvf-frame {
  position: relative;
  width: min(100%, calc(100dvh - 190px), 720px);
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 8px #15110e, 0 0 0 9px #3d3731;
}
.bigvf-frame { display: grid; place-items: center; background: #000; }
.bigvf-frame canvas { display: block; }
.bigvf-bar { display: flex; align-items: center; gap: 48px; }
.bigvf .shutter { width: 76px; height: 76px; }
.bigvf .shutter span { width: 54px; height: 54px; }

/* ================= Favorites ================= */
.fav-save { display: flex; gap: 8px; margin: 14px 0 4px; }
.fav-save input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.favs { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.fav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  text-align: start;
}
.fav.active { border-color: var(--amber); background: rgba(233,162,59,.1); }
.fav-gear { display: flex; align-items: center; gap: 5px; flex: none; direction: ltr; }
.mini-lens { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, rgba(255,255,255,.8) 0 8%, transparent 11%), radial-gradient(circle, var(--a) 0 30%, var(--b) 55%, #0a0a0a 60%, #777 68%, #222 76%); }
.mini-can { width: 15px; height: 26px; border-radius: 3px; background: linear-gradient(#333 0 12%, var(--a) 12% 56%, var(--b) 56% 88%, #333 88%); }
.mini-flash { width: 12px; height: 12px; border-radius: 50%; background: var(--a); box-shadow: 0 0 6px var(--a); }
.mini-flash.off { background: #444; box-shadow: none; }
.fav-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fav-text b { font-size: 15px; }
.fav-text span { font-size: 11px; color: var(--muted); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-del { width: 30px; height: 30px; border-radius: 50%; flex: none; color: var(--muted); font-size: 13px; }

/* ================= First-run tips ================= */
.coach { position: fixed; inset: 0; z-index: 70; }
.coach-ring {
  position: fixed;
  border-radius: 20px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.72), 0 0 0 3px var(--amber);
  transition: all .35s cubic-bezier(.3,.8,.3,1);
  pointer-events: none;
}
.coach-bubble {
  position: fixed;
  left: 16px; right: 16px;
  max-width: 400px;
  margin: 0 auto;
  padding: 16px 18px 12px;
  border-radius: 18px;
  background: #f3ecdf;
  color: #1b1712;
  box-shadow: 0 12px 30px rgba(0,0,0,.6);
  transition: top .35s cubic-bezier(.3,.8,.3,1);
}
.coach-bubble p { margin: 0 0 12px; font-size: 16px; line-height: 1.5; }
.coach-foot { display: flex; align-items: center; justify-content: space-between; }
.coach-foot span { font-size: 12px; color: #7a6f60; }
.coach-foot .pill-btn { background: #1b1712; color: #f3ecdf; border: 0; }

/* ================= End of roll ================= */
.rollend {
  position: fixed;
  inset: 0;
  z-index: 36;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6,5,4,.88);
  animation: fade .3s;
}
.rollend-card {
  width: min(100%, 360px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.rollend-can { margin-bottom: 14px; transform: scale(1.4); animation: rewind 1.2s cubic-bezier(.3,.7,.3,1); }
@keyframes rewind { from { transform: scale(1.4) rotate(-540deg); } }
.rollend h2 { margin: 0; font-size: 30px; }
.rollend p { margin: 0 0 12px; color: var(--muted); line-height: 1.55; }
.rollend-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.pill-btn.primary { background: var(--amber); color: #1d140a; border-color: transparent; font-weight: 700; }

/* ================= Camera bag ================= */
.bag { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 58vh; overflow-y: auto; padding-bottom: 4px; }
.bag-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  text-align: start;
}
.bag-card.active { border-color: var(--amber); background: rgba(233,162,59,.1); }
.bag-card:active { transform: scale(.98); }
.bag-art {
  position: relative;
  width: 100%;
  height: 62px;
  margin-bottom: 4px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.05) 0 .8px, transparent 1.3px) 0 0 / 4px 4px,
    radial-gradient(130% 90% at 50% 0%, var(--c1), var(--c2) 75%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), inset 0 8px 0 rgba(255,255,255,.12);
  direction: ltr;
}
.bag-lens {
  position: absolute;
  left: 12px; top: 50%;
  width: 36px; height: 36px;
  margin-top: -18px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(255,255,255,.8) 0 7%, transparent 10%), radial-gradient(circle, #5f8a9e 0 28%, #0c1a22 52%, #0a0a0a 58%, #8a8a8a 68%, #222 78%);
  box-shadow: 0 2px 4px rgba(0,0,0,.6);
}
.bag-lens.fish { width: 42px; height: 42px; margin-top: -21px; left: 9px; background: radial-gradient(circle at 38% 30%, rgba(255,255,255,.85) 0 9%, transparent 13%), radial-gradient(circle, #7fd0e0 0 40%, #0c1a22 62%, #0a0a0a 66%, #8a8a8a 74%, #222 82%); }
.bag-fmt {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 3px;
  background: rgba(0,0,0,.35);
}
.bag-fmt.round { border-radius: 50%; }
.bag-card b { font-size: 15px; direction: ltr; }
.bag-card i { font-style: normal; font-size: 11px; color: var(--amber); }
.bag-card span:last-child { font-size: 12px; line-height: 1.4; color: var(--muted); }
.link-btn { display: block; margin: 14px auto 0; font-size: 13px; color: var(--muted); text-decoration: underline; }

/* ================= Gear illustrations ================= */
.flash-unit { width: 172px; height: 76px; padding: 0; background: none; box-shadow: none; border-radius: 0; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); }
.reflector, .reflector.off { background: none; box-shadow: none; border-radius: 0; }
.reflector svg { display: block; width: 100%; height: 100%; }
.film-label .film-can { position: absolute; right: 6px; top: 2px; width: 34px; height: 50px; z-index: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.film-label .film-can svg, .can-art svg, .rollend-can svg, .bag-art svg, .fav-gear svg { display: block; width: 100%; height: 100%; }
.film-label i { right: 46px; }
.can-art { display: block; width: 58px; height: 84px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.55)); }
.rollend-can { display: block; width: 74px; height: 108px; margin-bottom: 18px; animation: rewind 1.2s cubic-bezier(.3,.7,.3,1); transform: none; filter: drop-shadow(0 10px 16px rgba(0,0,0,.6)); }
@keyframes rewind { from { transform: rotate(-540deg) scale(.6); } }
.bag-art { position: relative; display: block; width: 100%; height: 84px; margin-bottom: 2px; background: radial-gradient(120% 90% at 50% 20%, rgba(255,255,255,.07), transparent 70%); border-radius: 12px; box-shadow: none; }
.mini-lens { width: 32px; height: 32px; background: none; }
.mini-can { width: 22px; height: 32px; background: none; border-radius: 0; }
.mini-flash, .mini-flash.off { width: 42px; height: 19px; border-radius: 0; background: none; box-shadow: none; }

/* ================= Zoom rocker ================= */
.vf, .bigvf-frame { touch-action: none; }
.zoom-rocker {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 99px;
  background: rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(255,255,255,.15);
}
.zoom-rocker button {
  width: 30px; height: 26px;
  border-radius: 99px;
  font-family: var(--engrave);
  font-size: 12px;
  color: #fff;
  background: rgba(255,255,255,.1);
  touch-action: none;
}
.zoom-rocker button:active { background: rgba(255,255,255,.3); }
.zoom-rocker span { min-width: 38px; text-align: center; font-family: var(--engrave); font-size: 12px; color: rgba(255,255,255,.8); }
.zoom-rocker.zoomed span { color: var(--amber); }

/* ================= Settings ================= */
.settings { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  text-align: start;
}
.set-text { display: flex; flex-direction: column; gap: 3px; }
.set-text b { font-size: 15px; }
.set-text i { font-style: normal; font-size: 12px; line-height: 1.4; color: var(--muted); }
.set-row .track { flex: none; }
.set-row.on .knob { transform: translateX(18px); }
.set-row.on .track { background: rgba(233,162,59,.45); }
.storage { margin: 14px 2px; font-size: 12px; line-height: 1.5; color: var(--muted); min-height: 18px; }
.set-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.notice {
  max-width: 900px;
  margin: 4px auto 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(233,162,59,.12);
  border: 1px solid rgba(233,162,59,.35);
  font-size: 13px;
  line-height: 1.5;
  color: #f2e2c4;
}
.sheet .notice { margin-left: 16px; margin-right: 16px; }

/* ================= Brand & guide ================= */
.brand-by { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 10px; margin-top: -2px; color: rgba(45,40,34,.7); text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.bag-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.bag-links .link-btn { margin-left: 0; margin-right: 0; }
.guide { max-height: 72vh; overflow-y: auto; padding: 4px 2px 8px; font-size: 14px; line-height: 1.55; color: #ddd3c4; }
.guide-lead { margin: 8px 0 14px; color: var(--ink); }
.guide section { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.08); }
.guide h3 { margin: 0 0 8px; font-size: 16px; color: var(--amber); }
.guide ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.guide b { color: #fff; font-weight: 600; }
.guide .fmt { font-size: 12px; color: var(--amber); }
.guide .credits p { margin: 0 0 10px; }
.guide .fine { font-size: 12px; color: var(--muted); }
.site-link { display: inline-block; text-decoration: none; margin-top: 4px; }
