/* Roll Lab — the native app's look. The iPhone app is dark everywhere (.preferredColorScheme(.dark)): warm darkroom
   browns (0.07, 0.05, 0.03), Color.orange, an amber (1, 0.60, 0.12), the shutter red (0.86, 0.16, 0.10), cream prints
   (0.96, 0.94, 0.89), SF Mono and New York. The camera, darkroom, lab, prints and their sheets stay dark in both
   appearances, as on iPhone; the web-only system sheets (Settings), alerts and toasts follow light / dark like iOS. */
:root {
  --orange: rgb(255, 159, 10);          /* Color.orange (dark) */
  --amber: rgb(255, 153, 31);           /* Color(red: 1, green: 0.60, blue: 0.12) */
  --amber2: rgb(255, 158, 31);          /* Color(red: 1, green: 0.62, blue: 0.12) */
  --shutter-red: rgb(219, 41, 26);      /* Color(red: 0.86, green: 0.16, blue: 0.10) */
  --cream: rgb(245, 240, 227);          /* Color(red: 0.96, green: 0.94, blue: 0.89) */
  --bg: rgb(18, 13, 8);                 /* Color(red: 0.07, green: 0.05, blue: 0.03) */
  --cam-bg: rgb(18, 15, 13);            /* Color(red: 0.07, green: 0.06, blue: 0.05) */
  --gold: var(--orange); --gold-ink: var(--orange);
  --red: rgb(255, 69, 58); --green: rgb(48, 209, 88);
  --sheet-bg: rgb(18, 15, 13);
  --text: #fff; --text2: rgba(255, 255, 255, 0.6);
  --glass: rgba(60, 54, 50, 0.6); --glass-edge: rgba(255, 255, 255, 0.1);
  --sys-bg: #000; --row: #1c1c1e; --sep: rgba(84, 84, 88, 0.55); --fill: rgba(120, 120, 128, 0.32); --fill2: rgba(118, 118, 128, 0.24);
  --alert: rgba(44, 44, 46, 0.86); --sys-text: #fff; --sys-text2: rgba(235, 235, 245, 0.6); --tint: rgb(10, 132, 255);
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --sys-bg: #f2f2f7; --row: #fff; --sep: rgba(60, 60, 67, 0.22); --fill: rgba(120, 120, 128, 0.16); --fill2: rgba(118, 118, 128, 0.12);
    --alert: rgba(250, 250, 250, 0.86); --sys-text: #000; --sys-text2: rgba(60, 60, 67, 0.6); --tint: rgb(0, 122, 255);
    --red: rgb(255, 59, 48); --green: rgb(52, 199, 89); --sys-glass: rgba(255, 255, 255, 0.82); --sys-glass-edge: rgba(0, 0, 0, 0.06);
  }
}
:root[data-theme="light"] {
  --sys-bg: #f2f2f7; --row: #fff; --sep: rgba(60, 60, 67, 0.22); --fill: rgba(120, 120, 128, 0.16); --fill2: rgba(118, 118, 128, 0.12);
  --alert: rgba(250, 250, 250, 0.86); --sys-text: #000; --sys-text2: rgba(60, 60, 67, 0.6); --tint: rgb(0, 122, 255);
  --red: rgb(255, 59, 48); --green: rgb(52, 199, 89); --sys-glass: rgba(255, 255, 255, 0.82); --sys-glass-edge: rgba(0, 0, 0, 0.06);
}


* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: #fff; font: 17px/1.29 var(--sys); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; letter-spacing: inherit; }
button:disabled { cursor: default; }
html.touch #app button { min-height: 0; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nav-title:focus, .screen:focus { outline: none; }
[hidden] { display: none !important; }
p, h1, h2 { margin: 0; font-weight: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
.sf { display: inline-block; vertical-align: -0.125em; flex: none; overflow: visible; }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.label { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.label > .sf { font-size: 1.05em; width: 22px; }

#app { position: fixed; inset: 0; overflow: hidden; }
#stage { position: absolute; inset: 0; }
.stage { position: absolute; inset: 0; }
#sheets { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
#sheets > * { pointer-events: auto; }
#overlays { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
#overlays > * { pointer-events: auto; }
#toast { position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 110px); z-index: 50; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.screen { position: absolute; inset: 0; overflow: hidden; }

/* ---------- spinner ---------- */
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: spin 0.8s linear infinite; flex: none; }
.spinner.dark { border-color: rgba(0, 0, 0, 0.2); border-top-color: #000; width: 20px; height: 20px; border-width: 2.5px; }
@keyframes spin { to { transform: rotate(360deg); } }
.compositing, .preparing { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(0, 0, 0, 0.5); }
.comp-box { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px; border-radius: 18px; background: rgba(40, 40, 40, 0.72); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); color: rgba(255, 255, 255, 0.7); font: 600 13px var(--mono); }
.comp-box .spinner { width: 34px; height: 34px; }

/* ================================================================ sheets */
.sheet-wrap { position: absolute; inset: 0; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--sat) + 10px); display: flex; flex-direction: column; border-radius: 38px 38px 0 0; overflow: hidden; background: var(--sys-bg); color: var(--sys-text); box-shadow: 0 -2px 30px rgba(0, 0, 0, 0.3); }
.sheet.dark-sheet { background: var(--sheet-bg); color: var(--text); }
.sheet-grabber { position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: currentColor; opacity: 0.25; z-index: 5; }
.sheet-body { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-bottom: calc(var(--sab) + 20px); }
.navbar { display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; align-items: center; gap: 8px; min-height: 60px !important; padding: 14px 16px 8px; flex: none; }
.nav-title { grid-column: 2; font: 600 17px/22px var(--sys); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-leading { grid-column: 1; display: flex; gap: 8px; justify-self: start; }
.nav-trailing { grid-column: 3; display: flex; gap: 8px; justify-self: end; }
.glass { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; min-width: 44px; padding: 0 16px; border-radius: 22px; font-size: 17px; color: inherit;
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.8); backdrop-filter: blur(16px) saturate(1.8); box-shadow: 0 0 0 0.5px var(--glass-edge), 0 4px 16px rgba(0, 0, 0, 0.1); transition: transform 0.15s var(--ease), opacity 0.15s; white-space: nowrap; }
.glass-icon { padding: 0; width: 44px; }
.glass .sf { font-size: 20px; }
.glass-bold { font-weight: 600; }
.dark-sheet .glass-bold { color: var(--gold-ink); }
.glass:active:not(:disabled) { transform: scale(0.94); }
.glass:disabled { opacity: 0.35; }
@media (min-width: 700px) and (min-height: 600px) {
  .sheet { top: 50% !important; left: 50%; right: auto; bottom: auto; width: min(600px, calc(100% - 48px)); height: min(860px, calc(100% - 64px)); translate: -50% -50%; border-radius: 32px; }
  .sheet-grabber { display: none; }
  .deco-sheet { width: min(760px, calc(100% - 48px)); }
}

/* ---------- toast, alert, action sheet, menu ---------- */
.toast { display: flex; align-items: center; gap: 10px; max-width: 520px; padding: 12px 18px; border-radius: 999px; color: #fff; background: rgba(0, 0, 0, 0.86); font-size: 15px; font-weight: 500; opacity: 0; transform: translateY(14px); transition: opacity 0.25s, transform 0.35s var(--ease); pointer-events: auto; }
.toast.on { opacity: 1; transform: none; }
.toast .sf { color: var(--green); font-size: 18px; }
.alert-wrap { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.35); padding: 24px; }
.alert { width: 300px; max-width: 100%; border-radius: 30px; background: var(--alert); color: var(--sys-text); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); padding: 22px 18px 16px; }
.alert-title { font-weight: 600; font-size: 17px; }
.alert-message { font-size: 15px; line-height: 20px; margin-top: 6px; }
.alert-field { display: block; width: 100%; margin-top: 14px; padding: 10px 14px; border-radius: 14px; border: 0; outline: none; background: var(--fill2); font-size: 17px; color: var(--sys-text); }
.alert-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.alert-buttons.two { flex-direction: row; }
.alert-btn { flex: 1; min-height: 48px !important; border-radius: 24px; background: var(--fill2); font-size: 17px; font-weight: 500; text-align: center; color: var(--sys-text); }
.alert-btn:not(.cancel):not(.destructive) { background: var(--tint); color: #fff; font-weight: 600; }
.alert-btn.destructive { color: var(--red); }
.alert-buttons:not(.two) .alert-btn.cancel:only-child { background: var(--tint); color: #fff; font-weight: 600; }
.alert-btn:active { opacity: 0.7; }
.asheet-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.asheet-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); }
.asheet { position: relative; width: 100%; max-width: 440px; padding: 0 8px calc(var(--sab) + 8px); display: flex; flex-direction: column; gap: 8px; }
.asheet-group { border-radius: 26px; overflow: hidden; background: var(--alert); color: var(--sys-text); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); }
.asheet-head { padding: 14px 18px 12px; text-align: center; border-bottom: 0.5px solid var(--sep); }
.asheet-title { font-size: 13px; font-weight: 600; color: var(--sys-text2); }
.asheet-msg { font-size: 13px; line-height: 17px; margin-top: 3px; color: var(--sys-text2); }
.asheet-btn { display: block; width: 100%; min-height: 56px !important; text-align: center; font-size: 19px; color: var(--tint); }
.asheet-group .asheet-btn + .asheet-btn { border-top: 0.5px solid var(--sep); }
.asheet-btn.destructive { color: var(--red); }
.asheet-btn:active { background: var(--fill2); }
.asheet-cancel { border-radius: 26px; background: var(--alert); font-weight: 600; -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); }
@media (min-width: 700px) { .asheet-wrap { justify-content: center; } }
.menu-scrim { position: absolute; inset: 0; }
.menu { position: fixed; min-width: 230px; max-width: 300px; border-radius: 22px; overflow: hidden; padding: 6px 0; background: var(--alert); color: var(--sys-text); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 0 0 0.5px var(--glass-edge), 0 16px 48px rgba(0, 0, 0, 0.3); }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 44px !important; padding: 10px 18px; font-size: 17px; text-transform: none; }
.menu-item .sf { font-size: 18px; }
.menu-item:active, .menu-item:focus-visible { background: var(--fill2); outline: none; }
.menu-item.destructive { color: var(--red); }

/* ---------- Settings (insetGrouped) ---------- */
.settings-col { max-width: 640px; margin: 0 auto; padding: 0 16px 24px; }
.group { margin-top: 24px; }
.group:first-child { margin-top: 6px; }
.group-header { padding: 0 20px 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--sys-text2); }
.group-footer { padding: 8px 20px 0; font-size: 13px; line-height: 18px; color: var(--sys-text2); }
.group-rows { background: var(--row); border-radius: 26px; overflow: hidden; }
.row { position: relative; display: flex; align-items: center; width: 100%; min-height: 52px !important; padding: 12px 20px; gap: 10px; text-align: left; color: var(--sys-text); }
.group-rows > .row + .row::before { content: ""; position: absolute; left: 52px; right: 20px; top: 0; border-top: 0.5px solid var(--sep); }
.group-rows > .toggle-row + .row::before, .group-rows > .row + .toggle-row::before { left: 20px; }
.row-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.row-value { color: var(--sys-text2); }
.row-btn:active { background: var(--fill2); }
.row-tint { color: var(--tint); }
.row-destructive { color: var(--red); }
.row-chevron { color: var(--sys-text2); opacity: 0.6; font-size: 13px; }
.pro-row .sf { color: var(--gold-ink); }
.toggle-row { cursor: pointer; }
.toggle-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.toggle-sub { font-size: 13px; color: var(--sys-text2); }
.switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 63px; height: 28px; margin: 0; border-radius: 14px; background: var(--fill); cursor: pointer; transition: background 0.25s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 37px; height: 24px; border-radius: 12px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16); transition: transform 0.3s var(--ease); }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(22px); }


/* ---------- shared bits ---------- */
.settings-sheet .glass { background: var(--sys-glass, var(--glass)); box-shadow: 0 0 0 0.5px var(--sys-glass-edge, var(--glass-edge)), 0 4px 16px rgba(0, 0, 0, 0.1); }
.settings-sheet .glass-bold { color: var(--tint); }
.dark-sheet .glass { color: var(--orange); }
.glass-subtle { color: rgba(255, 255, 255, 0.62); background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); }
.glass-subtle .sf { font-size: 18px; }
.glass-subtle:hover { color: rgba(255, 255, 255, 0.85); }
.settings-col { max-width: 640px; margin: 0 auto; padding: 0 16px 24px; }
.circle-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 17px; transition: transform 0.15s var(--ease), opacity 0.15s; }
.circle-btn.big { width: 48px; height: 48px; font-size: 18px; }
.circle-btn:active:not(:disabled) { transform: scale(0.92); }
.circle-btn:disabled { opacity: 0.35; }
.red-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; border-radius: 14px; background: var(--shutter-red); color: #fff; font: 900 15px var(--mono); letter-spacing: 2px; transition: transform 0.15s var(--ease), filter 0.15s; }
.red-btn:active { transform: scale(0.98); filter: brightness(0.92); }
.outline-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px rgba(255, 159, 10, 0.4); color: var(--orange); font: 700 13px var(--mono); letter-spacing: 2px; }
.outline-btn:active { background: rgba(255, 159, 10, 0.08); }
.spinner.amber { border-color: rgba(255, 153, 31, 0.25); border-top-color: var(--amber); width: 22px; height: 22px; border-width: 2.5px; }
.safelight { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(140, 10, 10, 0.35) 0, rgba(140, 10, 10, 0) 320px); }
.screen-tools { position: absolute; top: calc(var(--sat) + 14px); left: 16px; display: flex; gap: 10px; z-index: 3; }
.screen-tools .glass, .intro-tools .glass, .hist-tools .glass { width: 40px; height: 40px; }

/* ---------- the notification banner ---------- */
.nbanner { position: absolute; top: calc(var(--sat) + 8px); left: 50%; width: min(400px, calc(100% - 16px)); margin-left: max(-200px, calc(-50% + 8px)); display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 24px; text-align: left; color: var(--sys-text);
  background: var(--alert); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), 0 0 0 0.5px var(--glass-edge); z-index: 60; }
.nb-icon { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.nb-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nb-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--sys-text2); letter-spacing: 0.3px; }
.nb-title { font-size: 15px; font-weight: 600; margin-top: 1px; }
.nb-body { font-size: 15px; line-height: 1.25; }

/* ================================================================ intro (choose your film) */
.intro { background: var(--bg); color: #fff; transition: opacity 0.4s ease-in; }
.intro.leaving { opacity: 0; pointer-events: none; }
.intro-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(255, 159, 10, 0.22) 20px, rgba(255, 159, 10, 0) 360px); }
.intro-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.intro-scroll::-webkit-scrollbar { display: none; }
.intro-tools { position: absolute; top: calc(var(--sat) + 14px); left: max(16px, calc(50% - 220px)); display: flex; gap: 10px; z-index: 2; }
.intro-col { position: relative; max-width: 440px; margin: 0 auto; padding: calc(var(--sat) + 28px) 0 calc(var(--sab)); display: flex; flex-direction: column; align-items: stretch; }
.intro-icon { width: 72px; height: 72px; border-radius: 16px; align-self: center; box-shadow: 0 7px 28px rgba(0, 0, 0, 0.5); }
.intro-title { align-self: center; margin-top: 10px; font: 900 34px/1.15 var(--serif); letter-spacing: 6px; padding-left: 6px; color: #fff; }
.intro-kicker { align-self: center; margin: 8px 0 24px; font: 700 10px var(--mono); letter-spacing: 3px; color: var(--amber); }
.film-list { display: flex; flex-direction: column; gap: 10px; padding: 0 24px; }
.film-row { display: flex; height: 120px; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.35); position: relative; transition: box-shadow 0.28s cubic-bezier(0.3, 1.2, 0.4, 1), transform 0.28s cubic-bezier(0.3, 1.2, 0.4, 1); -webkit-user-select: none; user-select: none; }
.film-row::after { content: ""; position: absolute; inset: 0; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.35); pointer-events: none; transition: box-shadow 0.28s; }
.film-row.on { box-shadow: 0 0 24px rgba(255, 159, 10, 0.45); }
.film-row.on::after { box-shadow: inset 0 0 0 2.5px var(--orange); }
.film-row:active { transform: scale(0.985); }
.film-art { flex: 1 1 0; min-width: 0; overflow: hidden; }
.film-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-label { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 18px; background: rgb(240, 227, 199); text-align: left; }
.film-name { font: 900 16px var(--mono); color: rgb(36, 26, 13); white-space: nowrap; }
.film-desc { font: 500 13px var(--mono); color: rgb(82, 61, 36); white-space: nowrap; }
.intro-label { font: 700 10px var(--mono); letter-spacing: 3px; color: var(--orange); }
.exp-label { align-self: center; margin-top: 24px; }
.exp-row { display: flex; height: 42px; margin: 8px 42px 0; border-radius: 21px; overflow: hidden; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.65), 0 3px 10px rgba(0, 0, 0, 0.5); }
.exp-tab { flex: 1; display: grid; place-items: center; font: 900 18px var(--mono); color: var(--orange); text-align: center; transition: background 0.25s, color 0.25s; }
.exp-tab.on { background: linear-gradient(var(--orange), rgb(199, 82, 13)); color: #000; }
.stamp-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 44px 0; }
.stamp-label { font: 700 10px var(--mono); letter-spacing: 2px; color: rgba(255, 255, 255, 0.65); }
.stamp-toggle { display: inline-flex; align-items: center; gap: 6px; }
.stamp-state { font: 900 9px var(--mono); color: rgba(255, 255, 255, 0.35); min-width: 20px; text-align: right; }
.stamp-toggle.on .stamp-state { color: var(--orange); }
.stamp-track { position: relative; width: 50px; height: 26px; border-radius: 13px; background: rgba(0, 0, 0, 0.7); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.stamp-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(rgba(142, 142, 147, 0.7), rgba(142, 142, 147, 0.35)); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); transition: transform 0.32s cubic-bezier(0.3, 1.35, 0.5, 1), background 0.2s; }
.stamp-toggle.on .stamp-knob { transform: translateX(24px); background: linear-gradient(var(--orange), rgb(168, 64, 10)); }
.title-block .intro-label { white-space: pre; }
.title-block { display: flex; flex-direction: column; gap: 8px; padding: 22px 44px 0; }
.roll-title { height: 46px; padding: 0 14px; border-radius: 10px; border: 0; outline: none; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.35); font: 500 15px var(--serif); color: #fff; caret-color: var(--orange); width: 100%; }
.roll-title::placeholder { color: rgba(255, 255, 255, 0.35); }
.roll-title:focus { box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.7); }
.mission-block { display: flex; flex-direction: column; gap: 10px; padding: 22px 44px 0; }
.mission-head { display: flex; justify-content: space-between; align-items: baseline; }
.mission-brief { font: 700 8px var(--mono); color: rgba(255, 255, 255, 0.25); }
.mission-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.mission-scroll::-webkit-scrollbar { display: none; }
.mission-card { flex: none; width: 166px; height: 130px; padding: 12px; border-radius: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; color: #fff; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.24); scroll-snap-align: start; transition: background 0.25s, color 0.25s, transform 0.25s cubic-bezier(0.3, 1.2, 0.4, 1); }
.mission-card .sf { font-size: 18px; }
.mission-card.on { background: var(--orange); color: #000; box-shadow: inset 0 0 0 1px var(--orange); }
.mission-card:active { transform: scale(0.97); }
.mc-title { font: 900 10px var(--mono); letter-spacing: 1px; }
.mc-prompt { font: 400 10px/1.3 var(--serif); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.load-btn { display: flex; align-items: center; gap: 12px; height: 58px; margin: 28px 36px; padding: 0 22px; border-radius: 14px; background: var(--shutter-red); color: #fff; font: 900 15px var(--mono); letter-spacing: 2px; transition: transform 0.15s var(--ease), filter 0.15s; }
.load-btn:active { transform: scale(0.98); filter: brightness(0.92); }
.load-can { width: 30px; height: 38px; object-fit: contain; }
.load-text { flex: 1; text-align: left; }
.load-btn .sf { font-size: 17px; }

/* ================================================================ camera */
.camera { background: var(--cam-bg); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.cam-col { position: absolute; inset: 0; margin: 0 auto; max-width: 440px; display: flex; flex-direction: column; padding: var(--sat) 0 var(--sab); background: rgb(14, 13, 12); }
.chrome { position: relative; flex: none; width: 100%; container-type: inline-size; overflow: hidden; }
.chrome-top { aspect-ratio: 1290 / 430; }
.chrome-bottom { aspect-ratio: 1290 / 900; }
.chrome-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.lamp-glow { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; pointer-events: none; animation: lampIn 0.12s ease-out; }
@keyframes lampIn { from { opacity: 0; } }
.chrome-tools { position: absolute; top: 1.6cqw; left: 3cqw; display: flex; gap: 2cqw; }
.chrome-glass { width: 8.2cqw !important; height: 8.2cqw !important; min-width: 0; max-width: 36px; max-height: 36px; padding: 0; }
.chrome-glass .sf { font-size: min(4.4cqw, 18px); }
.flip-counter { position: absolute; left: 58cqw; top: 20cqw; width: 12cqw; height: 12cqw; display: flex; background: rgb(227, 222, 199); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.42); border-radius: 1px; overflow: hidden; }
.flip-digit { position: relative; flex: 1; margin: 0 -1px; perspective: 60px; }
.fd-half { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; backface-visibility: hidden; }
.fd-half.top { top: 0; background: linear-gradient(rgb(245, 240, 219), rgb(214, 209, 186)); transform-origin: 50% 100%; }
.fd-half.bottom { bottom: 0; background: linear-gradient(rgb(214, 209, 186), rgb(240, 235, 214)); transform-origin: 50% 0%; }
.fd-half.top::after, .fd-half.bottom::before { content: ""; position: absolute; left: 0; right: 0; height: 1px; }
.fd-half.top::after { bottom: 0; background: rgba(0, 0, 0, 0.05); }
.fd-half.bottom::before { top: 0; background: rgba(0, 0, 0, 0.16); }
.fd-num { position: absolute; left: 0; right: 0; height: 12cqw; display: grid; place-items: center; font: 600 5.6cqw var(--mono); color: rgb(31, 28, 23); }
.fd-half.top .fd-num { top: 0; }
.fd-half.bottom .fd-num { bottom: 0; }
.flap { z-index: 2; }
.flap-top { box-shadow: 0 3px 4px rgba(0, 0, 0, 0.65); }
.flap-bottom { box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.55); }
.fd-split { position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: rgba(0, 0, 0, 0.38); z-index: 3; }
.viewfinder { position: relative; flex: 1 1 auto; min-height: 120px; background: rgb(14, 13, 12); }
.vf-frame { position: absolute; inset: 13px 16px; border-radius: 18px; overflow: hidden; background: #000; }
.vf-feed { position: absolute; inset: 0; }
.cam-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.24s; }
.cam-video.mirrored { transform: scaleX(-1); }
.camera.switching .cam-video { opacity: 0.25; }
.vf-ring1 { position: absolute; inset: 0; border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); pointer-events: none; }
.vf-ring2 { position: absolute; inset: 1.5px; border-radius: 15.5px; border: 7px solid rgba(0, 0, 0, 0.96); pointer-events: none; }
.vf-mission { position: absolute; top: 14px; left: 14px; max-width: calc(100% - 28px); display: flex; flex-direction: column; gap: 4px; padding: 9px 12px; border-radius: 9px; background: rgba(0, 0, 0, 0.58); box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.55); color: #fff; pointer-events: none; z-index: 1; }
.vfm-title { display: inline-flex; align-items: center; gap: 6px; font: 900 9px var(--mono); letter-spacing: 1.4px; }
.vfm-title .sf { font-size: 11px; }
.vfm-prompt { font: 600 12px var(--serif); }
.vf-nocam { position: absolute; inset: 0; display: grid; place-items: center; padding: 70px 22px 18px; background: radial-gradient(circle at 50% 40%, rgb(38, 32, 27), #000 75%); z-index: 0; }
.nc-box { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; max-width: 300px; }
.nc-box > .sf { font-size: 34px; color: rgba(255, 159, 10, 0.7); }
.nc-title { font: 900 13px var(--mono); letter-spacing: 2px; text-transform: uppercase; }
.nc-text { font: 400 12px/1.45 var(--mono); color: rgba(255, 255, 255, 0.55); }
.nc-retry { margin-top: 6px; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); font: 700 11px var(--mono); letter-spacing: 1px; color: var(--orange); }
/* the bottom chrome: positions from DisposableCameraView (x, y as fractions of the artwork; H = 69.767cqw) */
.cb { position: absolute; display: block; }
.shutter-glow { left: 38cqw; top: 11.72cqw; width: 24cqw; height: 24cqw; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0) 14cqw); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1);
  transition: transform 0.18s cubic-bezier(0.3, 1.3, 0.5, 1), box-shadow 0.18s, background 0.18s; }
.camera.pressed .shutter-glow { transform: translateY(1.26cqw) scale(0.88); background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.28) 0, rgba(255, 255, 255, 0) 14cqw); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.42), 0 7px 8px rgba(0, 0, 0, 0.95); }
.lamp { width: 2.6cqw; height: 2.6cqw; border-radius: 50%; left: 21.5cqw; background: rgba(0, 0, 0, 0.65); transition: background 0.18s, box-shadow 0.18s; pointer-events: none; }
.flash-lamp { top: 6.37cqw; }
.flash-lamp.on { background: var(--orange); box-shadow: 0 0 8px rgba(255, 159, 10, 0.9); }
.timer-lamp { top: 26.96cqw; background: rgba(0, 0, 0, 0.7); }
.timer-lamp[data-mode="3s"] { background: var(--orange); box-shadow: 0 0 7px rgba(255, 159, 10, 0.8); }
.timer-lamp[data-mode="10s"] { background: rgb(255, 69, 58); box-shadow: 0 0 7px rgba(255, 69, 58, 0.8); }
.cam-label { top: 47.79cqw; width: 24cqw; height: 9.77cqw; border-radius: 4px; background: #000; display: grid; place-items: center; font: 900 4cqw var(--mono); color: rgba(255, 159, 10, 0.98); pointer-events: none; transition: color 0.3s; }
.cam-label.rear { left: 9.5cqw; }
.cam-label.front { left: 66.5cqw; color: rgba(255, 159, 10, 0.4); }
.camera.front .cam-label.rear { color: rgba(255, 159, 10, 0.4); }
.camera.front .cam-label.front { color: rgba(255, 159, 10, 0.98); }
.cam-capsule { left: 39cqw; top: 47.79cqw; width: 22cqw; height: 9.77cqw; border-radius: 5cqw; background: rgba(0, 0, 0, 0.88); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); pointer-events: none; }
.cam-knob { left: 34.85cqw; top: 49cqw; width: 7.3cqw; height: 7.33cqw; border-radius: 5px; background: rgba(0, 0, 0, 0.96); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.75); display: flex; align-items: center; justify-content: center; gap: 2px; pointer-events: none; transition: transform 0.45s cubic-bezier(0.3, 1.4, 0.45, 1); }
.cam-knob i { width: 1.5px; height: 5.23cqw; background: rgba(255, 255, 255, 0.16); }
.camera.front .cam-knob { transform: translateX(23cqw); }
.wheel { left: 78.45cqw; top: 18.98cqw; width: 8.5cqw; height: 17.09cqw; border-radius: 1.8cqw; overflow: hidden; pointer-events: none; }
.wheel img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.24s cubic-bezier(0.3, 1.5, 0.5, 1); }
.wheel.advancing img { transform: translateY(4.07cqw) scaleY(0.985); transition: transform 0.14s ease-in; }
.hit { border-radius: 14px; touch-action: manipulation; }
.hit:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.hit-flash { left: 0.5cqw; top: 4.19cqw; width: 25cqw; height: 15.35cqw; }
.hit-timer { left: 0.5cqw; top: 20.23cqw; width: 25cqw; height: 15.35cqw; }
.hit-history { left: 73.5cqw; top: 4.19cqw; width: 25cqw; height: 15.35cqw; }
.hit-history:disabled { cursor: default; }
.hit-shutter { left: 28cqw; top: 11.16cqw; width: 44cqw; height: 32.09cqw; border-radius: 50%; }
.hit-switch { left: 18cqw; top: 48.49cqw; width: 64cqw; height: 17.44cqw; }
.white-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 6; }
.timer-count { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 5; }
.tc-num { grid-area: 1 / 1; font: 900 130px/1 var(--mono); color: #fff; text-shadow: 0 0 28px rgba(0, 0, 0, 0.6); }
.cam-overlay { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.cam-overlay > * { pointer-events: auto; }
.develop-prompt { position: absolute; inset: 0; display: grid; place-items: center; }
.dp-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.88); }
.dp-col { position: relative; width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 0 36px; }
.dp-can { width: 72px; height: 92px; object-fit: contain; }
.dp-text { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dp-title { font: 900 22px var(--mono); letter-spacing: 3px; }
.dp-sub { font: 500 12px var(--mono); color: rgba(255, 255, 255, 0.45); }
.dp-actions { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dp-keep { margin-top: 4px; padding: 8px 12px; font: 500 12px var(--sys); color: rgba(255, 255, 255, 0.25); }
.onboarding { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.ob-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); }
.ob-card { position: relative; width: calc(100% - 64px); max-width: 376px; margin-bottom: calc(var(--sab) + 60px); padding: 28px; border-radius: 20px; background: rgb(26, 23, 20); box-shadow: 0 10px 60px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.ob-card > .sf { font-size: 34px; color: rgb(255, 204, 56); }
.ob-card > .sf path, .ob-card > .sf circle { stroke-width: 1.2; }
.ob-text { display: flex; flex-direction: column; gap: 6px; }
.ob-title { font: 900 13px var(--mono); letter-spacing: 4px; }
.ob-body { font: 400 12px/1.55 var(--mono); color: rgba(255, 255, 255, 0.55); white-space: pre-line; }
.ob-dots { display: flex; gap: 6px; }
.ob-dots span { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); transition: background 0.2s; }
.ob-dots span.on { background: rgb(255, 204, 56); }
.ob-next { width: 100%; height: 46px; margin-top: 4px; border-radius: 12px; background: rgb(247, 204, 56); color: rgb(26, 18, 5); font: 900 12px var(--mono); letter-spacing: 2px; text-align: center; }
.ob-next:active { filter: brightness(0.92); }

/* ================================================================ the lab (waiting) */
.waiting { background: rgb(13, 10, 15); color: #fff; }
.wait-col { position: absolute; inset: 0; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--sat) 0 var(--sab); }
.wait-can { width: 90px; height: 120px; border-radius: 16px; background: rgb(46, 41, 51); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5); }
.wc-emoji { font-size: 42px; line-height: 1; }
.wc-exp { font: 900 8px var(--mono); letter-spacing: 1px; color: var(--amber2); }
.wait-head { display: flex; flex-direction: column; gap: 8px; margin-top: 36px; padding: 0 24px; }
.wh-kicker { font: 900 11px var(--mono); letter-spacing: 5px; color: var(--amber2); }
.wh-title { font: 900 20px var(--mono); }
.wh-sub { font: 400 11px var(--mono); color: rgba(255, 255, 255, 0.35); }
.wait-status { margin-top: 48px; width: 100%; }
.ws-wait { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ws-label { font: 700 9px var(--mono); letter-spacing: 4px; color: rgba(255, 255, 255, 0.3); }
.ws-time { font: 900 52px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.ws-note { font: 400 10px var(--mono); color: rgba(255, 255, 255, 0.25); }
.ws-ask { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: rgba(255, 158, 31, 0.75); background: rgba(255, 158, 31, 0.07); }
.ws-ask .sf { font-size: 12px; }
.ws-ready { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 0 36px; }
.ws-ready-title { font: 900 13px var(--mono); letter-spacing: 3px; color: var(--amber2); }
.wait-skip { margin-bottom: 48px; padding: 8px 12px; font: 500 11px var(--sys); color: rgba(255, 255, 255, 0.2); }

/* ================================================================ the darkroom (developing) */
.developing { background: rgb(15, 5, 3); color: #fff; }
.dv-glow { background: radial-gradient(circle at 50% 50%, rgba(184, 20, 10, 0.35) 40px, rgba(184, 20, 10, 0) 320px); }
.dv-col { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: var(--sat) 48px var(--sab); }
.dv-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dv-title { font: 900 30px var(--mono); letter-spacing: 7px; padding-left: 7px; color: rgb(184, 20, 10); }
.dv-rule { width: 180px; height: 1px; background: rgba(184, 20, 10, 0.35); }
.dv-can { position: relative; margin-top: 52px; width: 110px; height: 110px; border-radius: 50%; background: rgb(36, 26, 20); box-shadow: inset 0 0 0 1.5px rgba(184, 20, 10, 0.25); display: grid; place-items: center; color: rgb(184, 20, 10); font-size: 38px; }
.dv-sprockets { position: absolute; inset: 0; animation: spin 3s linear infinite; }
.dv-sprockets i { position: absolute; left: 50%; top: 50%; width: 7px; height: 11px; margin: -5.5px 0 0 -3.5px; border-radius: 2px; background: rgba(184, 20, 10, 0.55); transform: rotate(var(--a)) translateY(-40px); }
.dv-stage { margin-top: 44px; height: 18px; font: 500 13px var(--mono); letter-spacing: 1px; color: rgba(255, 255, 255, 0.45); overflow: hidden; }
.dv-stage span { display: block; }
.dv-progress { margin-top: 36px; width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dv-track { position: relative; width: 100%; height: 6px; display: flex; align-items: center; justify-content: space-around; }
.dv-track i { width: 6px; height: 4px; border-radius: 1px; background: rgba(255, 255, 255, 0.05); }
.dv-fill { position: absolute; left: 0; top: 0; height: 6px; width: 0; border-radius: 3px; background: rgb(184, 20, 10); }
.dv-pct { font: 700 10px var(--mono); letter-spacing: 1px; color: rgba(184, 20, 10, 0.5); }

/* ================================================================ the developed roll */
.developed { background: var(--bg); color: #fff; }
.dr-col { position: absolute; inset: 0; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; padding: calc(var(--sat) + 16px) 0 calc(var(--sab) + 28px); }
.dr-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; }
.dr-title { font: 900 13px var(--mono); letter-spacing: 4px; text-align: center; min-width: 0; }
.dr-title.named { font: 900 15px var(--serif); letter-spacing: 2px; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-date { margin-top: 8px; font: 700 16px var(--mono); color: var(--orange); }
.dr-count { margin-bottom: 20px; font: 400 11px var(--mono); color: rgba(255, 255, 255, 0.45); }
.dr-mission { width: calc(100% - 32px); display: flex; align-items: flex-start; gap: 10px; padding: 12px; margin-bottom: 14px; border-radius: 10px; background: rgba(255, 159, 10, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.25); }
.dr-mission > .sf { color: var(--orange); font-size: 17px; margin-top: 1px; }
.drm-title { font: 900 10px var(--mono); letter-spacing: 1.5px; }
.drm-prompt { margin-top: 3px; font: 400 13px var(--serif); color: rgba(255, 255, 255, 0.72); }
.dr-scroll { flex: 1 1 auto; min-height: 0; width: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 12px; scrollbar-width: none; }
.dr-scroll::-webkit-scrollbar { display: none; }
.dr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 7px; row-gap: 8px; padding: 4px 2px; }
.polaroid-thumb { display: flex; flex-direction: column; height: 122px; padding: 5px 5px 0; background: var(--cream); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4); transform: rotate(var(--rot)); transition: transform 0.2s var(--ease); }
.polaroid-thumb:active { transform: rotate(var(--rot)) scale(0.96); }
.pt-photo { flex: 1 1 auto; min-height: 0; background: rgb(38, 31, 26); overflow: hidden; }
.pt-photo img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.3s; }
.polaroid-thumb.loaded .pt-photo img { opacity: 1; }
.pt-stamp { height: 18px; flex: none; display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; font: 700 6px var(--mono); color: var(--orange); }
.dr-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 0 24px; }
.dr-print { height: 52px; }
.dr-print .sf { font-size: 17px; }

/* ================================================================ print detail (full screen) */
.cover { position: absolute; inset: 0; z-index: 1; }
.cover > .screen { position: absolute; inset: 0; }
.print-detail { background: rgb(18, 15, 13); color: #fff; }
.pd-col { position: absolute; inset: 0; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; padding: calc(var(--sat) + 16px) 0 calc(var(--sab) + 36px); }
.pd-top { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; gap: 8px; }
.pd-count { flex: 1; text-align: center; font: 500 12px var(--mono); color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; }
.pd-actions { display: flex; gap: 8px; }
.pd-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px 24px; touch-action: pan-y; container-type: size; }
.pd-card { width: min(100%, calc((100cqh - 104px) * 0.82 + 24px)); padding: 12px 12px 0; background: var(--cream); box-shadow: 0 8px 40px rgba(0, 0, 0, 0.55); }
.pd-photo { position: relative; aspect-ratio: 0.82; overflow: hidden; background: linear-gradient(135deg, rgba(255, 159, 10, 0.55), rgb(162, 132, 94) 50%, rgba(0, 0, 0, 0.7)); }
.pd-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
.pd-placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.pd-placeholder .spinner { border-color: rgba(255, 255, 255, 0.2); border-top-color: rgba(255, 255, 255, 0.5); width: 22px; height: 22px; border-width: 2.5px; }
.pd-stamp { position: absolute; right: 10px; bottom: 10px; font: 700 12px var(--mono); color: rgb(255, 149, 0); text-shadow: 0 0 5px rgba(255, 149, 0, 0.7); pointer-events: none; }
.pd-foot { height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pd-title { font: italic 700 14px var(--serif); color: rgb(51, 36, 20); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pd-date { font: 700 11px var(--mono); letter-spacing: 1px; color: rgb(107, 82, 46); }
.pd-hint { text-align: center; font: 500 10px var(--mono); letter-spacing: 2px; color: rgba(255, 255, 255, 0.22); }
.pd-saved { position: absolute; left: 50%; bottom: calc(var(--sab) + 70px); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: rgb(31, 77, 36); font: 600 13px var(--mono); color: #fff; white-space: nowrap; z-index: 3; }
.pd-saved { translate: -50% 0; transform: none; }

/* ================================================================ contact sheet (sheet) */
.contact-sheet { background: var(--bg) !important; color: #fff !important; }
.contact-sheet .sheet-body { overflow: hidden; padding: 0; display: flex; }
.cs-col { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cs-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 0; }
.cs-top .circle-btn { color: rgba(255, 255, 255, 0.6); font-size: 15px; }
.cs-title { font: 900 11px var(--mono); letter-spacing: 3px; color: rgba(255, 255, 255, 0.6); }
.cs-view { flex: 1 1 auto; min-height: 0; position: relative; display: grid; place-items: center; overflow: hidden; touch-action: none; padding: 16px; }
.cs-printing { display: flex; flex-direction: column; align-items: center; gap: 12px; font: 700 10px var(--mono); letter-spacing: 3px; color: rgba(255, 255, 255, 0.4); }
.cs-holder { max-width: 100%; max-height: 100%; display: grid; place-items: center; transform-origin: 50% 50%; }
.cs-img { display: block; max-width: 100%; max-height: calc(100cqh - 32px); height: auto; box-shadow: 0 6px 32px rgba(0, 0, 0, 0.5); -webkit-user-drag: none; user-select: none; }
.cs-view { container-type: size; }
.cs-hint { padding: 4px 0 calc(var(--sab) + 12px); text-align: center; font: 700 9px var(--mono); letter-spacing: 1.8px; color: rgba(255, 255, 255, 0.28); }

/* ================================================================ roll history */
.history { background: var(--bg); color: #fff; }
.hist-col { position: absolute; inset: 0; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; padding-top: var(--sat); }
.hist-head { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 22px 16px 14px; }
.hist-head > .circle-btn { color: rgba(255, 255, 255, 0.6); font-size: 15px; }
.hist-title { position: absolute; left: 50%; transform: translateX(-50%); font: 900 13px var(--mono); letter-spacing: 4px; white-space: nowrap; pointer-events: none; }
.hist-tools { display: flex; gap: 8px; }
.hist-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: var(--sab); }
.hist-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding-bottom: 80px; }
.he-emoji { font-size: 48px; line-height: 1; }
.he-title { font: 900 13px var(--mono); letter-spacing: 3px; color: rgba(255, 255, 255, 0.4); }
.he-sub { font: 400 10px var(--mono); color: rgba(255, 255, 255, 0.22); }
.hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 16px; }
.hist-card { display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; background: rgb(33, 28, 23); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); text-align: left; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform 0.15s var(--ease); }
.hist-card:active { transform: scale(0.97); }
.hc-thumb { position: relative; aspect-ratio: 1; background: rgb(31, 26, 20); overflow: hidden; }
.hc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hc-badge { position: absolute; left: 6px; bottom: 6px; padding: 3px 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.55); font: 900 8px var(--mono); }
.hc-meta { display: flex; align-items: center; gap: 6px; padding: 8px; }
.hc-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hc-date { font: 700 9px var(--mono); color: rgba(255, 255, 255, 0.75); }
.hc-frames { font: 400 8px var(--mono); color: rgba(255, 255, 255, 0.35); }
.hc-mission { font: 900 7px var(--mono); letter-spacing: 0.7px; color: rgba(255, 159, 10, 0.8); }
.hc-meta > .sf { font-size: 9px; color: rgba(255, 255, 255, 0.25); }
@media (min-width: 600px) { .hist-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }

/* ================================================================ Print Your Roll (sheet) */
.print-roll-sheet { background: rgb(18, 15, 13) !important; color: #fff !important; }
.print-roll-sheet .glass { font: 400 17px var(--sys); }
.pr-col { max-width: 520px; margin: 0 auto; padding: 8px 20px 32px; display: flex; flex-direction: column; gap: 12px; }
.pr-hero { text-align: center; margin-top: 12px; font: 900 22px var(--serif); }
.pr-sub { text-align: center; margin-bottom: 16px; font: 400 12px var(--mono); color: rgba(255, 255, 255, 0.55); }
.product-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 12px; text-align: left; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.25); transition: background 0.2s, box-shadow 0.2s; }
.product-card.on { background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 2.5px var(--orange); }
.pc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pc-title { font: 900 17px var(--serif); }
.pc-size { font: 900 16px var(--mono); color: var(--orange); white-space: nowrap; }
.pc-blurb { font: 400 12px var(--mono); color: rgba(255, 255, 255, 0.65); }
.pick-block { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.pr-label { font: 700 9px var(--mono); letter-spacing: 2px; color: rgba(255, 255, 255, 0.55); }
.pick-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.pick-strip::-webkit-scrollbar { display: none; }
.pick-thumb { flex: none; width: 58px; height: 72px; border-radius: 4px; overflow: hidden; background: rgb(38, 31, 26); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-thumb.on { box-shadow: 0 0 0 2.5px var(--orange); }
.pr-preview { display: flex; justify-content: center; margin-top: 8px; min-height: 160px; align-items: center; }
.pr-page-preview { display: block; max-height: 220px; max-width: 70%; width: auto; height: auto; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }
.pr-pages { text-align: center; font: 700 10px var(--mono); letter-spacing: 1px; color: rgba(255, 255, 255, 0.5); margin-bottom: 4px; }
.pr-col .red-btn { height: 54px; border-radius: 12px; letter-spacing: 3px; }
.pr-foot { font-size: 11px; line-height: 1.4; text-align: center; color: rgba(255, 255, 255, 0.45); }

/* ---------- motion, print ---------- */
@media (prefers-reduced-motion: reduce) { .dv-sprockets { animation: none; } .lamp-glow { animation: none; } }
#print-root { display: none; }
@media print {
  @page { margin: 0; }
  html, body { height: auto; overflow: visible; background: #fff; }
  #app { display: none !important; }
  #print-root { display: block !important; }
  .print-page { overflow: hidden; page-break-after: always; break-after: page; }
  .print-page:last-child { page-break-after: auto; break-after: auto; }
  .print-page img { display: block; }
}
.contact-sheet .sheet-grabber { display: none; }
