/* VOICE: playful, warm, party-night, no fuss for guests
   IDEA: a cardboard disposable camera you pass around at a party
   PICTURE: the camera body itself is the guest UI; the album is a table of white-bordered prints
   COLOUR and TYPE: sunflower field, near-black camera body, tomato shutter; Archivo Black + Archivo, Caveat for captions
   LAYOUT: one column on phones; host page puts QR card beside stats, prints below */
:root{color-scheme:light dark;--bg:light-dark(#ffcf33,#16140f);--ink:light-dark(#1c1a17,#f6f1e4);--soft:light-dark(#5a4a12,#bdb39c);--card:light-dark(#fffdf7,#24211a);--line:light-dark(#1c1a1722,#f6f1e41f);--body:#1c1a17;--tomato:#ff5233;--sun:#ffcf33;--ok:light-dark(#1f7a3a,#7fd69a)}
:root[data-theme=light]{color-scheme:light}:root[data-theme=dark]{color-scheme:dark}
*{box-sizing:border-box;min-width:0}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.55 Archivo,system-ui,sans-serif;overflow-x:clip;min-height:100vh}
h1,h2,h3{font-family:"Archivo Black",Archivo,sans-serif;font-weight:400;line-height:1.05;text-wrap:balance;margin:0 0 12px}
h1{font-size:clamp(32px,6vw,52px)}h2{font-size:clamp(22px,3.4vw,30px)}h3{font-size:20px;margin:0}
p{margin:0 0 12px;max-width:62ch}
a{color:inherit}
.band{padding:clamp(20px,4vw,56px) max(5vw,16px);max-width:1240px;margin:0 auto}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px max(5vw,16px);max-width:1240px;margin:0 auto;flex-wrap:wrap}
.brand{font-family:"Archivo Black";font-size:20px;display:flex;align-items:center;gap:8px;text-decoration:none}
.brand i{width:14px;height:14px;border-radius:50%;background:var(--tomato);display:inline-block}
.who{display:flex;align-items:center;gap:4px 12px;flex-wrap:wrap;justify-content:flex-end}
.who .mail{overflow-wrap:anywhere}
.linkbtn{background:none;border:0;color:inherit;font:700 15px Archivo;text-decoration:underline;text-underline-offset:3px;cursor:pointer;min-height:44px;padding:0 4px;display:inline-flex;align-items:center}
.demo{background:var(--body);color:#f6f1e4;font-size:14px}
.demo .in{max-width:1240px;margin:0 auto;padding:10px max(5vw,16px);display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center}
.demo b{color:var(--sun)}
.demo button{background:#ffffff14;color:#f6f1e4;border:1px solid #ffffff33;border-radius:99px;padding:8px 14px;font:600 14px Archivo;cursor:pointer;min-height:40px}
.demo button.on{background:var(--sun);color:var(--body);border-color:var(--sun)}
button,input,select,textarea{font:inherit}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 22px;border-radius:14px;border:0;background:var(--body);color:#fff;font-weight:700;cursor:pointer;text-decoration:none}
.btn.alt{background:transparent;color:var(--ink);border:2px solid var(--ink)}
.btn.sm{min-height:44px;padding:0 14px}
.btn:focus-visible,.chip:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.shutter:focus-visible,.demo button:focus-visible,.linkbtn:focus-visible,.item:focus-visible{outline:3px solid var(--tomato);outline-offset:2px}
.btn[disabled]{opacity:.5;cursor:default}
.setup{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:clamp(24px,5vw,64px);align-items:center}
.card{background:var(--card);color:var(--ink);border-radius:22px;padding:clamp(18px,3vw,30px);box-shadow:0 18px 40px -22px #0007}
label.f{display:block;font-weight:700;margin:0 0 6px}
.field{margin-bottom:20px}
.hint{font-size:14px;color:var(--soft)}
.card .hint,.item .hint{color:light-dark(#6b6457,#a79f8c)}
input[type=text],input[type=email],input[type=search],input[type=number],input[type=datetime-local],select,textarea{width:100%;min-height:48px;font-size:16px;padding:10px 14px;border-radius:12px;border:2px solid var(--line);background:transparent;color:inherit}
select option{background:var(--card);color:var(--ink)}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.chip{min-height:44px;padding:0 16px;border-radius:99px;border:2px solid var(--line);background:transparent;color:inherit;font-weight:600;cursor:pointer}
.chip.on{background:var(--body);color:#fff;border-color:var(--body)}
:root .card .chip.on{background:light-dark(#1c1a17,#ffcf33);color:light-dark(#fff,#1c1a17);border-color:transparent}
.hero svg{width:100%;height:auto;max-height:440px;display:block}
/* dashboard */
.dash{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(20px,4vw,48px);align-items:start}
.list{display:grid;gap:10px;margin-bottom:28px}
.item{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--card);color:var(--ink);border-radius:16px;padding:14px 16px;text-decoration:none}
a.item:hover{box-shadow:0 8px 20px -14px #000a}
.item .grow{flex:1}
.badge{display:inline-block;font:700 12px/1 Archivo;padding:4px 8px;border-radius:99px;background:var(--line);vertical-align:middle;margin-left:6px;white-space:nowrap}
.badge.ok{color:var(--ok);background:light-dark(#1f7a3a1a,#7fd69a22)}
.badge.warn{color:var(--tomato);background:#ff523322}
.plans{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr));gap:16px}
.plan{display:flex;flex-direction:column;gap:6px}
.plan .price{font:clamp(28px,4vw,36px)/1.1 "Archivo Black";font-variant-numeric:tabular-nums}
.plan ul{margin:4px 0 8px;padding-left:20px;flex:1}
.plan li{margin-bottom:2px}
.plan .head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.plan.off{opacity:.72}
.acts{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:6px}
.switch{display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:14px;cursor:pointer;min-height:44px}
.switch input{appearance:none;width:44px;height:26px;border-radius:99px;background:var(--line);position:relative;cursor:pointer;margin:0;transition:background .15s}
.switch input::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0005;transition:transform .15s}
.switch input:checked{background:var(--ok)}
.switch input:checked::after{transform:translateX(18px)}
.grid2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 14px}
.bar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.bar p{margin:0}
.pill{display:inline-flex;align-items:center;gap:2px;font-size:14px;font-weight:600;border:2px solid var(--line);border-radius:99px;padding:2px 4px 2px 10px;margin:6px 6px 0 0}
.pill.off{opacity:.55;padding-right:10px;text-decoration:line-through}
.pill button{background:none;border:0;color:inherit;cursor:pointer;width:32px;height:32px;border-radius:50%;font-size:18px;line-height:1}
.pill button:hover{background:var(--line)}
.grant{display:flex;gap:8px;align-items:center}
.grant select{width:auto;max-width:200px}
/* camera */
.cam{max-width:460px;margin:0 auto;padding:16px 16px 32px}
.cam h1{font-size:clamp(26px,7vw,36px);text-align:center;margin-bottom:4px}
.cam .sub{text-align:center;color:var(--soft);margin:0 auto 16px}
.body{background:var(--body);color:#f6f1e4;border-radius:28px;padding:16px;box-shadow:0 30px 50px -28px #000a, inset 0 2px 0 #ffffff1a}
.vf{position:relative;aspect-ratio:3/4;border-radius:16px;overflow:hidden;background:#0d0c0b;display:grid;place-items:center;text-align:center}
.vf video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.vf .msg{position:relative;padding:24px;max-width:30ch;color:#d8d0bd}
.vf .msg b{display:block;font:24px "Archivo Black";color:#fff;margin-bottom:8px}
.flash{position:absolute;inset:0;background:#fff;opacity:0;pointer-events:none}
.flash.go{animation:fl .5s ease-out}
@keyframes fl{0%{opacity:1}100%{opacity:0}}
.controls{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin-top:16px}
.counter{justify-self:start;display:flex;flex-direction:column;align-items:center;background:#0d0c0b;border:2px solid #3a362f;border-radius:12px;padding:6px 10px;min-width:80px}
.counter span{font:28px/1 "Archivo Black";color:var(--sun);font-variant-numeric:tabular-nums}
.counter small{font-size:12px;color:#a79f8c;white-space:nowrap}
.shutter{width:84px;height:84px;border-radius:50%;border:6px solid #3a362f;background:var(--tomato);cursor:pointer;box-shadow:inset 0 -6px 0 #0003;transition:transform .08s}
.shutter:active{transform:scale(.93)}
.shutter[disabled]{background:#5a524a;cursor:default}
.flip{justify-self:end;width:52px;height:52px;border-radius:50%;border:2px solid #3a362f;background:transparent;color:#f6f1e4;cursor:pointer;display:grid;place-items:center}
.flip svg{width:24px;height:24px}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);background:var(--body);color:#fff;padding:12px 18px;border-radius:14px;opacity:0;transition:.25s;max-width:calc(100vw - 32px);z-index:50;pointer-events:none;box-shadow:0 10px 30px #0006}
.toast.show{opacity:1;transform:translateX(-50%)}
.overlay{position:fixed;inset:0;background:#000b;display:grid;place-items:center;padding:16px;z-index:30;overflow-y:auto}
.overlay .card{width:min(420px,100%)}
.overlay .card.wide{width:min(560px,100%)}
/* host */
.hostgrid{display:grid;grid-template-columns:minmax(0,340px) minmax(0,1fr);gap:clamp(16px,3vw,32px);align-items:start}
.qr{background:#fff;border-radius:14px;padding:12px;margin:8px 0 12px}
.qr svg{width:100%;height:auto;display:block}
.link{display:flex;gap:8px;align-items:center}
.link code{flex:1;font-size:13px;padding:10px;border-radius:10px;background:light-dark(#f2ede0,#1a1813);overflow-wrap:anywhere}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}
.stats.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.stat{background:var(--card);border-radius:16px;padding:14px 16px}
.stat b{display:block;font:clamp(24px,3.6vw,38px)/1.1 "Archivo Black";font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stat small{color:light-dark(#6b6457,#a79f8c);font-size:14px}
.prints{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:clamp(14px,2.5vw,26px);padding-top:8px}
.print{background:#fffdf7;padding:8px 8px 34px;border-radius:3px;box-shadow:0 10px 22px -12px #000a;rotate:var(--r);cursor:zoom-in;border:0;position:relative;transition:rotate .2s,scale .2s}
.print:hover,.print:focus-visible{rotate:0deg;scale:1.03;outline:none}
.print img{width:100%;aspect-ratio:3/4;object-fit:cover;display:block;background:#ddd}
.print span{position:absolute;left:10px;right:10px;bottom:4px;font:22px/1.2 Caveat,cursive;color:#2b2822;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
.ghost{aspect-ratio:3/4.6;border-radius:3px;background:repeating-linear-gradient(135deg,#3a2a12,#3a2a12 10px,#47331a 10px,#47331a 20px);box-shadow:0 10px 22px -12px #000a;rotate:var(--r);display:grid;place-items:center;color:#e9c98a;font-weight:700;font-size:14px}
.eject{position:fixed;width:92px;background:#fffdf7;padding:5px 5px 20px;border-radius:2px;box-shadow:0 14px 28px -10px #000c;z-index:45;pointer-events:none}
.eject img{display:block;width:100%;aspect-ratio:3/4;object-fit:cover;filter:sepia(1) brightness(.3) contrast(1.2)}
.plans .plan{transition:translate .2s,box-shadow .2s}
.plans .plan:hover{translate:0 -4px;box-shadow:0 24px 44px -22px #0009}
.brand i{will-change:transform}
.empty{background:var(--card);border-radius:18px;padding:28px;text-align:center}
.empty p{margin-inline:auto}
.lb{position:fixed;inset:0;background:#0d0c0bf2;z-index:40;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:12px}
.lb img{max-width:100%;max-height:78vh;border:8px solid #fffdf7;border-bottom-width:28px}
.lb .row{display:flex;gap:10px;align-items:center;color:#f6f1e4}
.lb .row .btn{background:#ffffff1f}
@media(max-width:860px){.stats.four{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
@media(max-width:760px){.setup,.hostgrid,.dash{grid-template-columns:minmax(0,1fr)}.hero svg{max-height:260px}.item.host{flex-direction:column;align-items:stretch}.grant select{flex:1;max-width:none}}
@media(max-width:420px){.stats{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.stats:not(.four) .stat:last-child{grid-column:1/-1}.grid2{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.flash.go{animation:none}.print,.toast,.switch input,.switch input::after,.plans .plan{transition:none}}
/* admin page */
.brand small{font:700 12px/1 Archivo;background:var(--body);color:var(--sun);padding:5px 8px;border-radius:99px;letter-spacing:.04em;text-transform:uppercase}
.tabs .count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;margin-left:6px;border-radius:99px;background:var(--tomato);color:#fff;font-size:12px}
