/* 1SatSnap app - the website's look, laid over the existing app.
   Loaded after the app's own styles; it changes appearance only. Every id,
   class and behaviour the script relies on is left exactly as it was. */
:root{
  color-scheme:dark;
  --fog:#05070D; --cam:#05070D; --dark:#EAF0F7; --muted:#93A0B5;
  --green:#1FCB9B; --green2:#1FCB9B; --seal:#1FCB9B; --wait:#FFD54A; --alarm:#FF6B61;
  --line:rgba(255,255,255,.10);
  --surf:#0C1322; --surf2:#101A2E; --edge:#060a14; --ice:#9CC3FF; --blue:#3D7BFF;
  --gold:#EAB300; --gold2:#FFD54A; --text:#EAF0F7;
  --body:"IBM Plex Sans",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --display:"Inter Tight","IBM Plex Sans",system-ui,sans-serif;
  --navh:74px;
}
body{background:var(--fog);color:var(--text)}
/* every screen sits on the same lit night sky as the website */
.scr{background:
  radial-gradient(70% 45% at 85% 0%,rgba(61,123,255,.22),transparent 70%),
  radial-gradient(50% 35% at 10% 8%,rgba(234,179,0,.10),transparent 70%),var(--fog)}
.scr.cam{background:#020408}

/* header */
.brand{color:var(--text);font:800 19px/1 var(--display);letter-spacing:-.02em}
.blogo{height:46px;filter:drop-shadow(0 0 14px rgba(234,179,0,.35))}
.chip{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.14);color:var(--ice);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);font-size:10.5px}

/* ── camera ─────────────────────────────────────────────── */
.cam-logo{height:72px;filter:drop-shadow(0 0 18px rgba(234,179,0,.45)) drop-shadow(0 2px 6px rgba(0,0,0,.7))}
.cam-case{background:rgba(12,19,34,.55);border:1px solid rgba(156,195,255,.28);color:var(--text);
  box-shadow:0 4px 0 rgba(0,0,0,.35)}
/* focus brackets that breathe, so the viewfinder reads as an instrument */
.vf::after{content:"";position:absolute;inset:18% 12%;pointer-events:none;z-index:0;
  --c:rgba(255,213,74,.85);
  background:
    linear-gradient(var(--c),var(--c)) 0 0/26px 2px,linear-gradient(var(--c),var(--c)) 0 0/2px 26px,
    linear-gradient(var(--c),var(--c)) 100% 0/26px 2px,linear-gradient(var(--c),var(--c)) 100% 0/2px 26px,
    linear-gradient(var(--c),var(--c)) 0 100%/26px 2px,linear-gradient(var(--c),var(--c)) 0 100%/2px 26px,
    linear-gradient(var(--c),var(--c)) 100% 100%/26px 2px,linear-gradient(var(--c),var(--c)) 100% 100%/2px 26px;
  background-repeat:no-repeat;animation:breathe 3.2s ease-in-out infinite;filter:drop-shadow(0 0 6px rgba(234,179,0,.6))}
@keyframes breathe{0%,100%{transform:scale(1);opacity:.85}50%{transform:scale(.97);opacity:.55}}
.cam-prompt{font:700 14px/1 var(--display);letter-spacing:.02em}
.modes{background:rgba(12,19,34,.6);border:1px solid rgba(255,255,255,.12);box-shadow:0 4px 0 rgba(0,0,0,.35)}
.mode{font:700 13.5px/1 var(--display)}
.mode.on{background:linear-gradient(180deg,var(--gold2),var(--gold));color:#141000;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 3px 0 #6e5100}
/* the shutter: a raised gold ring with a halo that pulses outwards.
   The logo inside is the existing mark, untouched. */
.sbtn{border:4px solid var(--gold2);
  box-shadow:0 0 0 4px rgba(234,179,0,.18),0 6px 0 #6e5100,0 0 40px rgba(234,179,0,.55)}
.sbtn::after{content:"";position:absolute;inset:-6px;border-radius:50%;border:2px solid rgba(255,213,74,.7);
  animation:halo 2.4s ease-out infinite;pointer-events:none}
.sbtn.rec::after{border-color:rgba(255,75,75,.8)}
.sbtn:disabled::after{animation:none;opacity:0}
@keyframes halo{0%{transform:scale(1);opacity:.9}100%{transform:scale(1.45);opacity:0}}
.side{background:rgba(12,19,34,.6);border:1px solid rgba(156,195,255,.25);color:var(--ice);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 5px 0 rgba(0,0,0,.45)}

/* ── surfaces: raised 3D tiles ──────────────────────────── */
.card,.rec{background:linear-gradient(180deg,var(--surf2),var(--surf));border:1px solid rgba(156,195,255,.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 6px 0 var(--edge),0 6px 0 1px rgba(156,195,255,.08),0 22px 34px -14px rgba(0,0,0,.85)}
.card h3{font:800 17px/1.2 var(--display);letter-spacing:-.01em;color:var(--text)}
.rtop b{font:800 15px/1 var(--display);color:var(--text)}
.rec dt{color:var(--muted)}
.rec dd{color:var(--text)}
.meta,.clabel{color:var(--ice)}
.cur{color:var(--gold2);border-color:var(--gold2)}
.thumb{background:#0D2638;border:1px solid rgba(156,195,255,.18);
  box-shadow:0 6px 0 var(--edge),0 24px 40px -14px rgba(0,0,0,.9),0 0 50px -16px rgba(61,123,255,.6)}

/* pills and status */
.p-wait{background:rgba(234,179,0,.14);color:var(--gold2);box-shadow:inset 0 0 0 1px rgba(234,179,0,.4)}
.p-ok{background:rgba(31,203,155,.14);color:var(--green);box-shadow:inset 0 0 0 1px rgba(31,203,155,.45)}
.step:not(:last-child)::before{background:rgba(255,255,255,.12)}
.sdot{background:var(--surf);border-color:rgba(255,255,255,.2)}
.step.done .sdot{background:var(--seal);border-color:var(--seal);color:#03140e;box-shadow:0 0 12px rgba(31,203,155,.6)}
.step.now .sdot{border-color:var(--gold2);box-shadow:0 0 12px rgba(234,179,0,.5)}
.step.now .sdot::after{background:var(--gold2)}
.note{border-top-color:rgba(255,255,255,.12)}
.note.foot b{color:var(--text)}
.note.foot::before{background:var(--gold);color:#141000}
.saveok{background:rgba(31,203,155,.1);border-color:rgba(31,203,155,.4);color:#7FE8C8}
.saveok::before{background:var(--seal);color:#03140e}
.savewarn{background:rgba(234,179,0,.1);border-color:rgba(234,179,0,.5)}
.savewarn b,.savewarn span{color:var(--gold2)}
.checkout{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.12);color:var(--muted)}
.checkout.good{background:rgba(31,203,155,.1);border-color:rgba(31,203,155,.4);color:#7FE8C8}
.checkout.bad{background:rgba(255,107,97,.1);border-color:rgba(255,107,97,.45);color:#FFB3AD}
.txlink{color:var(--ice);border-bottom-color:rgba(156,195,255,.4)}

/* ── buttons: gold, with a pressed-out edge ─────────────── */
.btn{background:linear-gradient(180deg,var(--gold2),var(--gold));color:#141000;font:700 15px/1 var(--display);
  padding:15px;border-radius:15px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 5px 0 #6e5100,0 14px 26px -10px rgba(234,179,0,.6);
  transition:transform .12s,box-shadow .12s}
.btn:active{transform:translateY(4px);box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 1px 0 #6e5100,0 6px 14px -8px rgba(234,179,0,.6)}
.btn.ghost,.btn.chain{background:linear-gradient(180deg,var(--surf2),var(--surf));color:var(--text);
  border:1px solid rgba(156,195,255,.25);box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 5px 0 var(--edge)}
.btn.ghost:active,.btn.chain:active{transform:translateY(4px);box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 1px 0 var(--edge)}
@media (hover:hover){.btn.chain:hover{background:var(--surf2)}}
.chainico{color:var(--ice)}
.link{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.12);color:var(--muted)}
.copylbl{color:var(--gold2)}
.act{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.12);color:var(--text);
  box-shadow:0 4px 0 var(--edge)}
.act:active{transform:translateY(3px);box-shadow:0 1px 0 var(--edge)}
@media (hover:hover){.act:hover{background:rgba(255,255,255,.07);border-color:rgba(234,179,0,.4)}}
.act .aic{background:linear-gradient(160deg,#ffe07a,#eab300 55%,#a87c00);border:0;color:#2a1d00;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 3px 0 #6e5100}
.again{color:var(--gold2);text-decoration-color:rgba(255,213,74,.4);font:700 14px var(--display)}
.qrbox{border-color:rgba(156,195,255,.25);box-shadow:0 5px 0 var(--edge)}
.qrbox.empty{background:rgba(255,255,255,.04)}

/* ── my stamps ──────────────────────────────────────────── */
.row{border-top-color:rgba(255,255,255,.08)}
.row .sq{background:linear-gradient(160deg,rgba(61,123,255,.3),rgba(12,19,34,.9));color:var(--ice);
  border:1px solid rgba(156,195,255,.3);box-shadow:0 3px 0 var(--edge)}
.row .n{color:var(--text)}
.d-ok{box-shadow:0 0 8px var(--green)}.d-wait{background:var(--gold2);box-shadow:0 0 8px var(--gold)}
.empty{color:var(--muted)}
.elogo{filter:drop-shadow(0 0 22px rgba(234,179,0,.4))}

/* ── bottom bar: dark glass, the coin raised out of it ──── */
nav{background:rgba(12,19,34,.82);border:1px solid rgba(156,195,255,.18);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 6px 0 rgba(0,0,0,.5),0 18px 30px -10px rgba(0,0,0,.8)}
.ni{color:var(--ice);opacity:.7}
.ni[aria-current="true"]{opacity:1;color:var(--gold2)}
.ni span{font:700 12px/1 var(--display)}
.nc{margin-top:-26px}
.nc .coin{width:68px;height:68px;border:3px solid var(--gold2);
  box-shadow:0 6px 0 #6e5100,0 0 0 6px rgba(234,179,0,.14),0 0 34px rgba(234,179,0,.6)}
.nc .coin img{width:58px;height:58px}
#toast{background:linear-gradient(180deg,var(--surf2),var(--surf));color:var(--text);
  border:1px solid rgba(156,195,255,.25);box-shadow:0 5px 0 var(--edge),0 16px 30px -10px rgba(0,0,0,.8)}

/* ── the journey: the real progress of this stamp, in 3D ─
   Read straight off the receipt's own step states (#stepChain, #stepBlock),
   so it can never disagree with them. Tilted back on a floor of light. */
.journey{position:relative;margin:4px -4px 16px;padding:18px 6px 4px;display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));perspective:700px;
  background:radial-gradient(60% 80% at 50% 60%,rgba(61,123,255,.16),transparent 70%)}
.rec:has(#oneSteps[hidden]) .journey{display:none}
.jtrack{position:absolute;left:12.5%;right:12.5%;top:44px;height:4px;border-radius:2px;
  background:rgba(255,255,255,.1);transform:rotateX(40deg)}
.jfill{position:absolute;left:0;top:0;bottom:0;width:33.4%;border-radius:2px;
  background:linear-gradient(90deg,var(--ice),var(--gold2));box-shadow:0 0 14px rgba(234,179,0,.7);transition:width .6s}
.rec:has(#stepChain.done) .jfill{width:66.7%}
.rec:has(#stepBlock.done) .jfill{width:100%;background:linear-gradient(90deg,var(--ice),var(--gold2),var(--seal))}
/* a pulse running along the part already travelled */
.jfill::after{content:"";position:absolute;top:-4px;width:12px;height:12px;border-radius:50%;
  background:radial-gradient(circle,#fff,var(--gold2) 40%,transparent 70%);animation:run 1.8s linear infinite}
@keyframes run{from{left:0}to{left:calc(100% - 12px)}}
.jn{position:relative;display:grid;justify-items:center;gap:8px;text-align:center;z-index:1}
.jn b{font:700 10.5px/1.2 var(--display);letter-spacing:.03em;color:var(--muted);text-transform:uppercase}
.jdisc{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;
  background:linear-gradient(180deg,#1a2740,#0e1628);border:2px solid rgba(156,195,255,.25);color:var(--muted);
  transform:rotateX(18deg);box-shadow:0 5px 0 var(--edge),0 12px 18px -8px rgba(0,0,0,.8);transition:all .4s}
.jdisc svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.jdisc.coin img{width:34px;height:34px;opacity:.45;transition:opacity .4s}
/* done: lit gold. now: pulsing. */
.j1 .jdisc,.j2 .jdisc,
.rec:has(#stepChain.done) .j3 .jdisc,.rec:has(#stepBlock.done) .j4 .jdisc{
  border-color:var(--gold2);color:var(--gold2);background:linear-gradient(180deg,rgba(234,179,0,.22),rgba(234,179,0,.06));
  box-shadow:0 5px 0 #6e5100,0 0 22px rgba(234,179,0,.45)}
.j1 b,.j2 b,.rec:has(#stepChain.done) .j3 b,.rec:has(#stepBlock.done) .j4 b{color:var(--text)}
.rec:has(#stepChain.done) .j3 .jdisc.coin img{opacity:1}
.rec:has(#stepBlock.done) .j4 .jdisc{border-color:var(--seal);color:var(--seal);
  background:linear-gradient(180deg,rgba(31,203,155,.22),rgba(31,203,155,.06));box-shadow:0 5px 0 #08523d,0 0 26px rgba(31,203,155,.6)}
.rec:has(#stepChain.now) .j3 .jdisc,
.rec:has(#stepChain.done):not(:has(#stepBlock.done)) .j4 .jdisc{animation:waitpulse 1.6s ease-in-out infinite;border-color:rgba(255,213,74,.7)}
@keyframes waitpulse{0%,100%{box-shadow:0 5px 0 var(--edge),0 0 0 0 rgba(234,179,0,.5)}50%{box-shadow:0 5px 0 var(--edge),0 0 0 9px rgba(234,179,0,0)}}
@media (prefers-reduced-motion:reduce){.vf::after,.sbtn::after,.jfill::after{animation:none}}

/* ── layout clean-up ────────────────────────────────────── */
/* The app's own rule is calc(var(--st)+10px): without spaces round the +,
   calc is invalid and the whole padding is dropped, which is why the logo
   sat on the top edge. */
.cam-hd{padding:calc(var(--st) + 16px) 18px 0}
.hd{padding:calc(var(--st) + 18px) 18px 12px}
/* brackets frame the clear area above the controls, not the controls */
.vf::after{inset:calc(var(--st) + 110px) 9% 300px}
.gridl{opacity:.45}
/* one gold circle at a time: the shutter leads, the bar's coin steps back */
.cam-bot{padding-bottom:30px;gap:16px}
.shoot{gap:30px}
.nc{margin-top:-14px}
.nc .coin{width:58px;height:58px;border-width:2px;box-shadow:0 4px 0 #6e5100,0 0 18px rgba(234,179,0,.4)}
.nc .coin img{width:48px;height:48px}
/* even rhythm in the scrolling screens */
.pad{padding:14px 18px 28px;gap:14px}
/* My stamps: the stamps first, the housekeeping after. Visual order only -
   the list is still built in the same order by the same code. */
#caseList > .card:not(.keycard),#caseList > .empty{order:1}
#caseList > .note{order:2;border:0;margin:0;padding:0 4px;text-align:center}
#caseList > .btn.ghost{order:3;border-style:dashed}
#caseList > .keycard{order:4}
/* the journey replaces the vertical list on screen. The list stays in the
   page - the journey reads its states - but showing both said everything twice. */
#oneSteps{display:none}
.jn b{font-size:9px;letter-spacing:.02em;line-height:1.25;max-width:9ch}
.journey{margin-bottom:20px}

/* ── camera, in depth ───────────────────────────────────── */
/* a floor of light receding into the bottom of the viewfinder */
.cam-ui::before{content:"";position:absolute;left:-30%;right:-30%;bottom:-6%;height:52%;pointer-events:none;z-index:-1;
  background:
    linear-gradient(rgba(156,195,255,.20) 1px,transparent 1px) 0 0/44px 44px,
    linear-gradient(90deg,rgba(156,195,255,.20) 1px,transparent 1px) 0 0/44px 44px;
  transform:perspective(420px) rotateX(64deg);transform-origin:50% 100%;
  -webkit-mask-image:linear-gradient(transparent,#000 45%);mask-image:linear-gradient(transparent,#000 45%);
  animation:floor 6s linear infinite}
@keyframes floor{to{background-position:0 44px,0 0}}
/* the horizon, where the floor meets the scene */
.cam-ui::after{content:"";position:absolute;left:0;right:0;bottom:46%;height:1px;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(255,213,74,.6),transparent);box-shadow:0 0 18px 2px rgba(234,179,0,.35)}
.cam-ui{isolation:isolate}
/* a quiet status line: what this screen is doing, true at all times */
.cam-flex{position:relative}
.cam-flex::before{content:"● LIVE · FINGERPRINTED ON THIS DEVICE";position:absolute;left:50%;top:10px;transform:translateX(-50%);
  white-space:nowrap;font:600 9.5px/1 var(--mono);letter-spacing:.14em;color:var(--ice);
  padding:7px 11px;border-radius:99px;background:rgba(5,7,13,.55);border:1px solid rgba(156,195,255,.25)}
/* the controls sit on a raised glass console */
.cam-bot{margin:0 12px 12px;padding:16px 12px 22px;border-radius:30px;
  background:linear-gradient(180deg,rgba(16,26,46,.72),rgba(8,12,22,.82));
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  border:1px solid rgba(156,195,255,.2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 8px 0 rgba(0,0,0,.55),0 30px 50px -20px rgba(0,0,0,.9),0 -20px 60px -30px rgba(61,123,255,.6)}
.modes{box-shadow:inset 0 2px 6px rgba(0,0,0,.5)}
/* the shutter: an extruded gold dial with a turning ring of ticks */
.sbtn{width:92px;height:92px;
  box-shadow:0 0 0 4px rgba(234,179,0,.18),0 2px 0 #c49600,0 4px 0 #9a7600,0 7px 0 #6e5100,0 16px 26px -6px rgba(0,0,0,.8),0 0 44px rgba(234,179,0,.55)}
.sbtn::before{content:"";position:absolute;inset:-14px;border-radius:50%;pointer-events:none;
  background:repeating-conic-gradient(rgba(255,213,74,.85) 0 2deg,transparent 2deg 12deg);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 6px),#000 calc(100% - 5px));
          mask:radial-gradient(farthest-side,transparent calc(100% - 6px),#000 calc(100% - 5px));
  animation:spin 18s linear infinite}
.sbtn.rec::before{background:repeating-conic-gradient(rgba(255,75,75,.9) 0 2deg,transparent 2deg 12deg);animation-duration:4s}
@keyframes spin{to{transform:rotate(360deg)}}
/* side buttons: bevelled faces with a real edge */
.side{background:linear-gradient(160deg,#22324f,#0c1424 60%);border:1px solid rgba(156,195,255,.3);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),inset 0 -2px 0 rgba(0,0,0,.35),0 2px 0 #0a1120,0 5px 0 #05080f,0 12px 18px -8px rgba(0,0,0,.8)}
.side:active{transform:translateY(3px);box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 1px 0 #05080f}
@media (prefers-reduced-motion:reduce){.cam-ui::before,.sbtn::before{animation:none}}
/* layout pass: brackets frame only the clear area between the status line and
   the console; the floor sits just above the console where it can be seen */
.vf::after{inset:calc(var(--st) + 150px) 9% 360px}
.cam-ui::before{bottom:322px;height:230px;transform:perspective(380px) rotateX(60deg);
  -webkit-mask-image:linear-gradient(transparent,#000 35%,#000 85%,transparent);mask-image:linear-gradient(transparent,#000 35%,#000 85%,transparent)}
.cam-ui::after{display:none}

/* ── compact controls ───────────────────────────────────── */
/* The console took a third of a phone screen. Tighter padding, a smaller
   shutter and side buttons give the viewfinder back about 90px; the
   brackets and the floor follow it down. */
.cam-bot{margin:0 16px 10px;padding:10px 12px 14px;gap:10px;border-radius:24px}
/* only as wide as its controls, centred, not the full screen width */
.cam-bot{align-self:center;width:fit-content;max-width:calc(100% - 32px);padding:8px 26px 12px;gap:8px}
.mode{padding:10px 18px}
.cam-prompt{font-size:12.5px}
.shoot{gap:28px}
.sbtn{width:74px;height:74px}
.sbtn::before{inset:-11px}
.side{width:52px;height:52px}
.side svg{width:22px;height:22px}
.vf::after{inset:calc(var(--st) + 150px) 9% 270px}
.cam-ui::before{bottom:236px;height:200px}

/* Sideways, the console spanning the bottom covered nearly the whole
   picture. It becomes a slim column on the right: modes, shutter, the two
   side buttons. The logo shrinks, the floor goes, the bar gets lower. */
@media (orientation:landscape) and (max-height:600px){
  :root{--navh:54px}
  .cam-logo{height:40px}
  .cam-hd{padding:calc(var(--st) + 8px) 16px 0}
  .cam-flex::before{top:6px}
  .cam-bot{position:absolute;right:max(10px,env(safe-area-inset-right));top:50%;transform:translateY(-50%);
    margin:0;padding:10px 8px;gap:10px;border-radius:22px}
  .cam-prompt{display:none}
  /* the bar below has My stamps too; up here it collided with the column */
  .cam-case{display:none}
  .modes{flex-direction:column;padding:4px}
  .mode{padding:8px 12px}
  .shoot{flex-direction:column;gap:10px}
  .sbtn{width:60px;height:60px}
  .sbtn::before{inset:-9px}
  .side{width:42px;height:42px}
  .side svg{width:20px;height:20px}
  .vf::after{inset:calc(var(--st) + 64px) 150px 14px 9%}
  .cam-ui::before{display:none}
  nav{margin-bottom:calc(var(--sb) + 6px)}
  .nc{margin-top:-10px}
  .nc .coin{width:46px;height:46px}
  .nc .coin img{width:38px;height:38px}
}
