/* Snapt: Contact Sheet film strips on warm faded grey (approved 2026-11-11). Fonts are OFL lookalikes of the mockups'. */
@font-face { font-family: "Snapt Sans"; src: url(fonts/barlow-semi-condensed-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: block; }
@font-face { font-family: "Snapt Sans"; src: url(fonts/barlow-semi-condensed-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: block; }
@font-face { font-family: "Snapt Type"; src: url(fonts/courier-prime-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Snapt Stamp"; src: url(fonts/share-tech-mono-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Snapt Hand"; src: url(fonts/caveat-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --amber: #f0b24a; --cream: #f3e6cf; --paper: #fff3dd; --tan: #e0c79c; --muted: #cdb894; --edge: #e9a23b;
  --film: #15110d; --card: rgba(31,25,20,.72); --line: #7a5d3a; --chip: #2f2721; --dark: #231a12;
  --easy: #6fbf5a; --medium: #f0b24a; --hard: #e0533a; --red: #e86a4f;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --tabs-h: 62px;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #463c34; overscroll-behavior: none; }
body { font-family: "Snapt Sans", "Segoe UI", sans-serif; font-weight: 600; color: var(--cream); -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* the screen: warm faded grey, film grain, a few dust specks and scratches */
#app { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #6d6157 0%, #554a41 60%, #463c34 100%); }
#app::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: overlay; z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' seed='7'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
#app::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55; z-index: 60;
  background-image: radial-gradient(circle at 12% 18%, rgba(255,255,255,.7) 0 1px, transparent 1.6px), radial-gradient(circle at 78% 9%, rgba(255,255,255,.6) 0 1.2px, transparent 2px),
    radial-gradient(circle at 88% 62%, rgba(255,255,255,.55) 0 1px, transparent 1.6px), radial-gradient(circle at 34% 83%, rgba(255,255,255,.6) 0 1.3px, transparent 2px),
    linear-gradient(97deg, transparent 72.2%, rgba(255,255,255,.14) 72.3%, transparent 72.6%), linear-gradient(89deg, transparent 21.1%, rgba(60,40,20,.1) 21.2%, transparent 21.4%); }

#view { position: absolute; z-index: 1; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-t) + 14px) calc(var(--safe-r) + 16px) calc(var(--safe-b) + 18px) calc(var(--safe-l) + 16px);
  display: flex; flex-direction: column; gap: 12px; max-width: 520px; margin: 0 auto; }
body.has-tabs #view { padding-bottom: calc(var(--safe-b) + var(--tabs-h) + 14px); }
body.dark #app { background: #000; }

/* type */
.logo { font: 700 26px "Snapt Sans"; letter-spacing: 7px; color: var(--amber); }
.h { font: 700 22px "Snapt Sans"; letter-spacing: 3px; color: var(--cream); }
.small { font: 600 11px "Snapt Sans"; letter-spacing: 2px; color: var(--tan); text-transform: uppercase; }
.date { font: 13px "Snapt Stamp", monospace; color: #f3c98a; letter-spacing: 1px; }
.typew { font: 15px/1.5 "Snapt Type", "Courier New", monospace; color: var(--paper); }
.typew .dim { color: #f3c98a; }
.center { text-align: center; }
.amber { color: var(--amber); }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.grow { flex: 1; }

/* header on Today */
.score { font: 700 24px "Snapt Sans"; color: var(--paper); line-height: 1; white-space: nowrap; }
.score .small { margin-left: 4px; }
.chips { display: flex; gap: 6px; }
.chip { flex: 1; background: var(--chip); border: 1.5px solid #8a6a40; border-radius: 8px; padding: 5px 0 4px; text-align: center; min-width: 0; }
.chip b { display: block; font: 700 20px "Snapt Sans"; color: var(--cream); line-height: 1.05; }
.chip span { display: block; font: 600 9px "Snapt Sans"; letter-spacing: 1px; color: var(--tan); white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 3px; vertical-align: 0; }
.dot.easy { background: var(--easy); } .dot.medium { background: var(--medium); } .dot.hard { background: var(--hard); }

/* film strip */
.strip { position: relative; background: var(--film); border-radius: 3px; box-shadow: 0 3px 8px rgba(30,20,10,.35); padding: 4px 26px; display: flex; flex-direction: column; }
.strip::before, .strip::after { content: ""; position: absolute; top: 4px; bottom: 4px; width: 10px; border-radius: 2px;
  background: repeating-linear-gradient(to bottom, #d8cdb8 0 7px, transparent 7px 14px); }
.strip::before { left: 7px; } .strip::after { right: 7px; }
.edge { display: flex; justify-content: space-between; font: 600 9px "Snapt Sans"; letter-spacing: 2px; color: var(--edge); padding: 3px 0 4px; text-transform: uppercase; }
.frame { position: relative; overflow: hidden; border-radius: 2px; background: #2a221c center / cover no-repeat; }
.frame + .edge { margin-top: 6px; }
.today-strip { flex: 1; min-height: 0; }
.today-strip .frame { flex: 1; min-height: 104px; }
.frame .tag { position: absolute; left: 7px; bottom: 6px; max-width: calc(100% - 90px); font: 700 12px "Snapt Sans"; letter-spacing: 1.5px; color: #fff; background: rgba(0,0,0,.6); padding: 3px 7px; border-radius: 3px; text-transform: uppercase; }
.frame .pts { position: absolute; right: 7px; top: 6px; font: 700 12px "Snapt Sans"; color: #16120e; background: var(--amber); padding: 2px 7px; border-radius: 3px; }
.frame .stamp, .stamp { position: absolute; right: 8px; bottom: 6px; font: 13px "Snapt Stamp", monospace; color: #ff8a2a; text-shadow: 0 0 4px rgba(255,120,30,.8); letter-spacing: 1px; }
.frame.empty { background: repeating-linear-gradient(45deg, #1d1813 0 8px, #201a14 8px 16px); border: 1.5px dashed #6b5232; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px; text-align: center; width: 100%; }
.frame.empty .p { font: 700 21px "Snapt Sans"; color: var(--cream); letter-spacing: 1px; text-transform: uppercase; line-height: 1.1; }
.frame.empty .q { font: 600 10px "Snapt Sans"; letter-spacing: 2px; color: var(--edge); text-transform: uppercase; }
.frame.missed .q { color: var(--red); }
.shutter { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--amber); display: flex; align-items: center; justify-content: center; flex: none; }
.shutter i { width: 23px; height: 23px; border-radius: 50%; background: var(--amber); }
.frame.big { aspect-ratio: 4 / 5; }

/* buttons: each in its own row */
.btns { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.btn { min-height: 50px; border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 8px; font: 700 15px "Snapt Sans"; letter-spacing: 2.2px; text-transform: uppercase; padding: 6px 12px; text-align: center; }
.btn small { font: 600 11px "Snapt Sans"; letter-spacing: 1px; opacity: .8; }
.btn.a { background: var(--amber); color: var(--dark); } .btn.b { border: 2px solid var(--tan); color: var(--cream); } .btn.c { background: var(--chip); border: 1.5px solid #8a6a40; color: var(--cream); }
.btn:active { transform: translateY(1px); filter: brightness(1.08); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.card { background: var(--card); border: 1.5px solid var(--line); border-radius: 8px; }
.li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 14px; min-height: 48px; border-bottom: 1px solid rgba(122,93,58,.5); font: 600 15px "Snapt Sans"; letter-spacing: .5px; width: 100%; text-align: left; }
.li:last-child { border-bottom: none; }
.li .v { color: var(--amber); font-weight: 700; white-space: nowrap; }
.toggle { width: 40px; height: 22px; border-radius: 11px; background: var(--amber); position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; right: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--dark); }
.toggle.off { background: #5b4d3f; } .toggle.off::after { right: auto; left: 2px; background: var(--muted); }

/* result stamp */
.rstamp { align-self: center; white-space: nowrap; font: 700 26px "Snapt Sans"; letter-spacing: 5px; border: 4px solid; padding: 3px 14px; border-radius: 6px; transform: rotate(-4deg); margin: 6px 0; }
.rstamp.match { color: var(--amber); } .rstamp.no { color: var(--red); font-size: 22px; } .rstamp.unclear { color: var(--cream); font-size: 22px; }
.result-frame { height: min(46vh, 380px); }
.dev-frame { animation: develop 2.4s ease-out forwards; }
@keyframes develop { from { filter: sepia(.9) brightness(.45) contrast(.7) blur(1.4px); } to { filter: none; } }
.checking .frame { filter: sepia(.9) brightness(.55) contrast(.7) blur(1.2px); }
.bar { height: 6px; border-radius: 3px; background: var(--chip); overflow: hidden; }
.bar i { display: block; height: 100%; width: 10%; background: var(--amber); border-radius: 3px; animation: bar 3s ease-out forwards; }
@keyframes bar { to { width: 92%; } }

/* camera */
.cam { position: absolute; inset: 0; z-index: 5; background: #000; display: flex; flex-direction: column; padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l); }
.cam-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; min-height: 58px; gap: 8px; }
.cam-top .x { font: 700 24px "Snapt Sans"; width: 44px; height: 44px; }
.cam-top .what { text-align: center; flex: 1; min-width: 0; }
.cam-top .what b { display: block; font: 700 20px "Snapt Sans"; letter-spacing: 2px; color: var(--amber); text-transform: uppercase; }
.cam-view { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.cam-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-view .c { position: absolute; width: 30px; height: 30px; border: 0 solid var(--cream); }
.cam-view .c1 { left: 22px; top: 22px; border-left-width: 3px; border-top-width: 3px; } .cam-view .c2 { right: 22px; top: 22px; border-right-width: 3px; border-top-width: 3px; }
.cam-view .c3 { left: 22px; bottom: 22px; border-left-width: 3px; border-bottom-width: 3px; } .cam-view .c4 { right: 22px; bottom: 22px; border-right-width: 3px; border-bottom-width: 3px; }
.cam-view .stamp { right: 34px; bottom: 30px; }
.cam-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 30px; text-align: center; }
.cam-bottom { display: flex; align-items: center; justify-content: space-between; padding: 18px 40px 22px; }
.cam-bottom .side { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cam-bottom .flip { background: var(--chip); font-size: 18px; }
.snap { width: 78px; height: 78px; border-radius: 50%; border: 4px solid var(--cream); display: flex; align-items: center; justify-content: center; }
.snap i { width: 62px; height: 62px; border-radius: 50%; background: var(--amber); display: block; }
.snap:active i { transform: scale(.92); }

/* tabs */
.tabs { position: absolute; z-index: 10; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-h) + var(--safe-b)); background: rgba(28,22,18,.94); border-top: 1px solid #6b5232; display: flex; padding: 7px calc(var(--safe-r) + 8px) var(--safe-b) calc(var(--safe-l) + 8px); }
.tabs button { flex: 1; font: 600 9.5px "Snapt Sans"; letter-spacing: 1.2px; color: #b9a585; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.tabs svg .f { fill: currentColor; stroke: none; }
.tabs button.on { color: var(--amber); }

/* streaks, store, history */
.srow { display: flex; align-items: center; padding: 10px 14px; gap: 8px; }
.srow .lbl { width: 100px; font: 700 14px "Snapt Sans"; letter-spacing: 1.5px; }
.srow .now { flex: 1; font: 700 30px "Snapt Sans"; color: var(--paper); }
.srow .best { text-align: right; } .srow .best b { display: block; font: 700 18px "Snapt Sans"; color: var(--amber); }
.badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { width: 60px; height: 60px; border-radius: 50%; background: var(--chip); border: 2px solid #6b5232; display: flex; align-items: center; justify-content: center; font: 700 18px "Snapt Sans"; color: #8a7660; }
.badge.on { background: var(--amber); border-color: var(--cream); color: var(--dark); }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.item .ic { width: 40px; height: 40px; border-radius: 6px; background: var(--film); display: flex; align-items: center; justify-content: center; font: 700 15px "Snapt Sans"; color: var(--amber); flex: none; }
.item .t { flex: 1; min-width: 0; } .item .t b { display: block; font: 700 15px "Snapt Sans"; letter-spacing: 1px; }
.item .price { background: var(--amber); color: var(--dark); font: 700 14px "Snapt Sans"; padding: 8px 12px; border-radius: 5px; flex: none; }
.sheet { background: var(--film); border-radius: 3px; padding: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cell { position: relative; aspect-ratio: 4 / 3; background: #2a221c center / cover no-repeat; border-radius: 2px; overflow: hidden; }
.cell .stamp { font-size: 10px; right: 4px; bottom: 3px; }
.cell.none { border: 1.5px dashed #6b5232; background: #211a15; display: flex; align-items: center; justify-content: center; }
.cell .n { position: absolute; left: 5px; top: 4px; font: 700 10px "Snapt Sans"; color: var(--tan); }
.cell .ticks { position: absolute; left: 4px; bottom: 4px; display: flex; gap: 3px; }

/* milestone */
.medal { align-self: center; width: 170px; height: 170px; border-radius: 50%; background: var(--amber); border: 5px solid var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--dark); box-shadow: 0 8px 24px rgba(0,0,0,.35); margin-top: 6vh; }
.medal b { font: 700 66px "Snapt Sans"; line-height: 1; } .medal span { font: 700 12px "Snapt Sans"; letter-spacing: 3px; }

.toast { position: absolute; z-index: 80; left: 16px; right: 16px; bottom: calc(var(--safe-b) + var(--tabs-h) + 14px); background: rgba(21,17,13,.95); border: 1.5px solid var(--line); color: var(--paper); border-radius: 8px; padding: 12px 14px; font: 14px/1.4 "Snapt Type", monospace; max-width: 488px; margin: 0 auto; }
.devbar { display: flex; gap: 6px; flex-wrap: wrap; font: 600 11px "Snapt Sans"; color: var(--tan); }
.devbar button, .devbar label { border: 1px dashed var(--tan); padding: 4px 8px; border-radius: 4px; }
.devbar .on { background: var(--tan); color: var(--dark); }

/* share picker */
.share-preview { display: block; align-self: center; height: min(46vh, 540px); width: auto; max-width: 100%; object-fit: contain; aspect-ratio: 9 / 16; border-radius: 6px; box-shadow: 0 10px 26px rgba(0,0,0,.45); }
.share-opts { display: flex; gap: 7px; }
.share-opt { flex: 1 1 0; max-width: 80px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.share-opt img { width: 100%; height: auto; display: block; aspect-ratio: 9 / 16; border-radius: 4px; border: 1.5px solid var(--line); }
.share-opt.on img { border: 3px solid var(--amber); }
.share-opt.on .small { color: var(--amber); }
.share-opt .small { font-size: 9.5px; letter-spacing: 1px; text-align: center; }
.share-picks { display: flex; gap: 8px; }
.share-picks .btn { flex: 1; min-height: 40px; font-size: 13px; }

/* Kalei Games page */
.kg-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.kg-icon { width: 56px; height: 56px; border-radius: 12px; flex: none; }
.kg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kg-text b { font: 700 16px "Snapt Sans"; letter-spacing: .5px; }
.kg-text span { font: 13px "Snapt Type"; color: var(--tan); }
.kg-get { flex: none; background: var(--amber); color: var(--dark); font: 700 14px "Snapt Sans"; letter-spacing: 1.5px; padding: 8px 16px; border-radius: 6px; text-decoration: none; }
.kg-soon { flex: none; font: 600 10px "Snapt Sans"; letter-spacing: 1.5px; color: var(--muted); text-align: right; max-width: 64px; }
