/* Branded guest-facing pages: guest upload, gallery, event chooser */
:root{
  --bg:#131F1B; --accent:#C6A45C; --on-accent:#16120F; --text:#F4EFE6;
  --font-head:"Cormorant Garamond",Georgia,serif; --font-body:"Jost",system-ui,sans-serif; --head-style:italic;
  --hero:none;
  --dim:color-mix(in srgb,var(--text) 68%,transparent);
  --line:color-mix(in srgb,var(--text) 18%,transparent);
  --glass:color-mix(in srgb,var(--bg) 70%,#000 30%);
  --field:color-mix(in srgb,var(--text) 8%,transparent);
}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0}
body{
  min-height:100vh; min-height:100dvh; background:var(--bg); color:var(--text);
  font-family:var(--font-body); font-size:16px; line-height:1.5; -webkit-font-smoothing:antialiased;
}
button,input{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
[hidden]{display:none!important}

.hero{
  position:relative; padding:9vh 22px 30px; text-align:center;
  background:
    linear-gradient(180deg,color-mix(in srgb,var(--bg) 35%,transparent) 0%,var(--bg) 100%),
    var(--hero) center 70%/cover no-repeat, var(--bg);
}
.hero.tall{padding-top:14vh; padding-bottom:44px}
.logo{display:block; max-width:min(260px,68%); max-height:120px; margin:0 auto 26px; object-fit:contain; filter:drop-shadow(0 2px 10px rgba(0,0,0,.45))}
.eyebrow{margin:0 0 10px; font-size:12.5px; letter-spacing:.24em; text-transform:uppercase; font-weight:500; color:var(--dim)}
h1{margin:0 0 10px; font-family:var(--font-head); font-style:var(--head-style); font-weight:500; font-size:clamp(38px,11vw,58px); line-height:1.02; text-wrap:balance}
.occasion{margin:0; color:var(--dim); font-size:15px}

.wrap{max-width:560px; margin:0 auto; padding:0 18px 48px}
.card{background:var(--glass); border:1px solid var(--line); border-radius:14px; padding:20px; margin:0 0 16px}

label.f{display:block; margin:0 0 14px}
label.f span{display:block; font-size:13px; color:var(--dim); margin:0 0 6px}
input.t{
  width:100%; min-height:50px; padding:0 14px; border-radius:10px; border:1px solid var(--line);
  background:var(--field); color:var(--text); font-size:16px;
}
input.t::placeholder{color:color-mix(in srgb,var(--text) 45%,transparent)}
input.code{text-align:center; letter-spacing:.3em; text-transform:uppercase; font-size:22px; font-weight:500}

.btn{
  -webkit-appearance:none; appearance:none; display:flex; align-items:center; justify-content:center; gap:10px;
  width:100%; min-height:56px; padding:0 20px; border-radius:12px; border:1.5px solid var(--accent);
  background:var(--accent); color:var(--on-accent); font-size:16.5px; font-weight:600; letter-spacing:.02em;
  cursor:pointer; text-decoration:none; transition:transform .08s ease, opacity .15s;
}
.btn:active{transform:scale(.985)}
.btn:disabled{opacity:.5; cursor:default}
.btn.ghost{background:transparent; color:var(--text); border-color:var(--line)}
.btn.small{min-height:42px; width:auto; font-size:14.5px; padding:0 16px; border-radius:21px}
.btn svg{width:22px; height:22px; flex:none}
.stack{display:grid; gap:10px}

.msg{min-height:1.4em; margin:10px 0 0; font-size:14px; color:var(--dim); text-align:center}
.msg.bad{color:#FFB4A6}

/* progress */
.progress{margin-top:14px}
.bar{height:6px; border-radius:3px; background:var(--field); overflow:hidden}
.bar i{display:block; height:100%; width:0; background:var(--accent); transition:width .25s ease}
.progress p{margin:8px 0 0; font-size:14px; color:var(--dim); text-align:center}

/* tabs */
.tabs{display:flex; gap:6px; margin:6px 0 14px; border-bottom:1px solid var(--line)}
.tabs button{
  -webkit-appearance:none; appearance:none; background:none; border:0; padding:12px 6px; margin-bottom:-1px;
  border-bottom:2px solid transparent; color:var(--dim); font-size:15px; font-weight:500; cursor:pointer;
}
.tabs button[aria-selected=true]{color:var(--text); border-bottom-color:var(--accent)}

/* grid */
.grid{display:grid; grid-template-columns:repeat(3,1fr); gap:4px}
@media(min-width:720px){.grid{grid-template-columns:repeat(4,1fr)}}
@media(min-width:1024px){.grid{grid-template-columns:repeat(6,1fr)}}
.grid button{
  position:relative; aspect-ratio:1; padding:0; border:0; border-radius:4px; overflow:hidden;
  background:var(--field); cursor:pointer;
}
.grid img{width:100%; height:100%; object-fit:cover; display:block}
.grid .play{position:absolute; inset:auto 6px 6px auto; width:26px; height:26px; border-radius:50%; background:rgba(0,0,0,.55); display:grid; place-items:center}
.grid .play::after{content:""; border-left:9px solid #fff; border-top:6px solid transparent; border-bottom:6px solid transparent; margin-left:2px}
.empty{padding:26px 10px; text-align:center; color:var(--dim); font-size:15px}

/* lightbox */
.lb{position:fixed; inset:0; z-index:50; background:rgba(0,0,0,.94); display:flex; flex-direction:column}
.lb .stage{flex:1; display:flex; align-items:center; justify-content:center; min-height:0; touch-action:pan-y}
.lb img,.lb video{max-width:100%; max-height:100%; object-fit:contain}
.lb .bar2{display:flex; gap:8px; align-items:center; justify-content:space-between; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); color:#fff}
.lb .who{font-size:13.5px; color:rgba(255,255,255,.75); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.lb .x{position:absolute; top:calc(8px + env(safe-area-inset-top)); right:8px; width:46px; height:46px; border-radius:50%; border:0; background:rgba(255,255,255,.14); color:#fff; font-size:26px; line-height:1; cursor:pointer}
.lb .nav{position:absolute; top:50%; transform:translateY(-50%); width:46px; height:64px; border:0; background:rgba(255,255,255,.1); color:#fff; font-size:28px; cursor:pointer; border-radius:8px}
.lb .prev{left:6px} .lb .next{right:6px}
@media(pointer:coarse){.lb .nav{display:none}}
.lb .btn.small{--text:#fff; --line:rgba(255,255,255,.3)}

.foot{margin:30px 0 0; text-align:center; font-size:12.5px; color:var(--dim); letter-spacing:.04em}
.foot a{color:inherit}

.list{display:grid; gap:10px}
.pick{
  display:block; text-align:left; text-decoration:none; color:var(--text);
  background:var(--glass); border:1px solid var(--line); border-radius:14px; padding:18px 18px;
}
.pick strong{display:block; font-family:var(--font-head); font-style:var(--head-style); font-weight:500; font-size:28px; line-height:1.1}
.pick span{display:block; color:var(--dim); font-size:14px; margin-top:4px}

/* join step */
label.tick{display:flex; gap:12px; align-items:flex-start; margin:0 0 14px; font-size:14.5px; line-height:1.45; color:var(--dim); cursor:pointer}
label.tick input{flex:none; width:20px; height:20px; margin:1px 0 0; accent-color:var(--accent)}
label.tick a{color:var(--text); text-underline-offset:2px}
label.tick.need{color:#FFB4A6}
label.tick + .btn{margin-top:6px}
.fine{margin:14px 0 0; font-size:13px; color:var(--dim); text-align:center}
.who{margin:0 0 14px; font-size:14.5px; color:var(--dim)}
.who b{color:var(--text); font-weight:600}
button.link{background:none; border:0; padding:0; color:var(--dim); text-decoration:underline; text-underline-offset:2px; cursor:pointer; font-size:inherit}

/* ---------- messages as polaroids ---------- */
.polas{display:grid; grid-template-columns:repeat(2,1fr); gap:16px 14px; padding:6px 2px 10px}
@media(min-width:720px){.polas{grid-template-columns:repeat(3,1fr)}}
@media(min-width:1024px){.polas{grid-template-columns:repeat(4,1fr)}}
.pola{
  -webkit-appearance:none; appearance:none; display:block; width:100%; text-align:left; cursor:pointer;
  background:#fff; border:0; border-radius:3px; padding:8px 8px 12px; color:#3B2D45;
  box-shadow:0 1px 2px rgba(40,25,50,.12), 0 8px 22px rgba(40,25,50,.14);
  transform:rotate(var(--r,0deg)); transition:transform .15s ease; align-self:start;
}
.pola:active{transform:rotate(0deg) scale(.98)}
.pola .ph{position:relative; aspect-ratio:1; background:#EFE8F0; overflow:hidden}
.pola .ph img{width:100%; height:100%; object-fit:cover; display:block}
.pola .ph .play{position:absolute; inset:auto 6px 6px auto; width:26px; height:26px; border-radius:50%; background:rgba(0,0,0,.55); display:grid; place-items:center}
.pola .ph .play::after{content:""; border-left:9px solid #fff; border-top:6px solid transparent; border-bottom:6px solid transparent; margin-left:2px}
.pola .m{margin:9px 3px 0; font-family:"Caveat",cursive; font-weight:600; font-size:21px; line-height:1.12; white-space:pre-line; overflow-wrap:anywhere}
.pola .by{margin:5px 3px 0; font-size:12px; letter-spacing:.04em; color:#8A7B91}
.pola.note{background:linear-gradient(165deg,#FFFBEF 0%,#FDEFF4 100%)}
.pola.note .card-in{aspect-ratio:1; display:flex; align-items:center; justify-content:center; padding:10px; border:1.5px dashed rgba(201,162,74,.55); border-radius:2px}
.pola.note .m{margin:0; font-size:24px; text-align:center}
.pola.note .m.long{font-size:19px}
.lb .notecard{max-width:min(92vw,520px); background:linear-gradient(165deg,#FFFBEF,#FDEFF4); color:#3B2D45; border-radius:4px; padding:34px 28px; font-family:"Caveat",cursive; font-weight:600; font-size:30px; line-height:1.15; text-align:center; white-space:pre-line; overflow-wrap:anywhere}
.lb .capt{position:absolute; left:0; right:0; bottom:74px; text-align:center; padding:0 18px; font-family:"Caveat",cursive; font-weight:600; font-size:26px; color:#fff; text-shadow:0 2px 8px rgba(0,0,0,.7); white-space:pre-line}

/* message box on the guest page */
.msgbox{margin:0 0 14px}
.msgbox span{display:block; font-size:13px; color:var(--dim); margin:0 0 6px}
textarea.t{width:100%; min-height:92px; padding:12px 14px; border-radius:10px; border:1px solid var(--line); background:var(--field); color:var(--text); font:inherit; font-size:16px; line-height:1.4; resize:vertical}
textarea.t::placeholder{color:color-mix(in srgb,var(--text) 45%,transparent)}
.msgbox .cnt{display:block; text-align:right; font-size:12px; color:var(--dim); margin-top:4px}
.lead{margin:0 0 16px; text-align:center; color:var(--dim); font-size:15.5px; line-height:1.5}

/* ---------- storybook party theme ---------- */
body.theme-storybook{
  --bg:#FBF5E6; --text:#4A3854; --accent:#C9658E; --on-accent:#FFFFFF;
  --dim:rgba(74,56,84,.72); --line:rgba(74,56,84,.16); --glass:rgba(255,255,255,.86); --field:#FFFFFF;
  background:
    radial-gradient(circle at 12% 18%, rgba(201,162,74,.55) 0 1.5px, transparent 2.5px) 0 0/68px 68px,
    radial-gradient(circle at 60% 72%, rgba(201,162,74,.4) 0 1px, transparent 2px) 0 0/44px 44px,
    radial-gradient(120% 70% at 50% 0%, rgba(251,245,230,0) 40%, #FBF5E6 78%),
    repeating-conic-gradient(from -3deg at 50% -8%, #FBF5E6 0deg 7deg, #F7E1E9 7deg 14deg),
    #FBF5E6;
  background-attachment:scroll;
}
body.theme-storybook .msg.bad, body.theme-storybook label.tick.need{color:#B3363F}
.castle{display:none}
body.theme-storybook .castle{display:block; width:min(380px,92vw); aspect-ratio:400/210; margin:0 auto 14px; background:url("/assets/castle.svg") center bottom/contain no-repeat}
body.theme-storybook .hero{background:none; padding-top:70px}
body.theme-storybook .hero::before{
  content:""; position:absolute; left:0; right:0; top:0; height:62px; pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='62' viewBox='0 0 240 62'%3E%3Cpath d='M-2 6 Q60 22 120 6 T242 6' fill='none' stroke='%23C9A24A' stroke-width='1.6'/%3E%3Cpath d='M8 9 L38 13 L22 48 Z' fill='%23F2B8CB'/%3E%3Cpath d='M52 14 L82 15 L68 52 Z' fill='%23A8DDD4'/%3E%3Cpath d='M96 13 L126 11 L112 50 Z' fill='%23CDB8E6'/%3E%3Cpath d='M140 8 L170 8 L156 46 Z' fill='%23F6DE9E'/%3E%3Cpath d='M184 10 L214 15 L198 50 Z' fill='%23F7C3A6'/%3E%3C/svg%3E") repeat-x 0 0/240px 62px;
}
body.theme-storybook .eyebrow{color:#9A7A2E; letter-spacing:.28em}
body.theme-storybook h1{
  font-weight:600; font-size:clamp(46px,14vw,74px); color:#B8872A;
  text-shadow:0 1px 0 #FFF6DA, 0 3px 14px rgba(201,162,74,.35);
}
body.theme-storybook .occasion{color:#7A6385}
body.theme-storybook .card{box-shadow:0 10px 30px rgba(74,56,84,.08)}
body.theme-storybook .btn.ghost{background:#fff}
body.theme-storybook .lb .btn.ghost{background:transparent}
body.theme-storybook .tabs button[aria-selected=true]{border-bottom-color:#C9A24A}
body.theme-storybook .foot{color:#8A7B91}

.band{display:none}
body.theme-storybook .band{
  display:inline-block; margin:2px auto 12px; padding:8px 18px 9px; border-radius:3px;
  font-family:"Fraunces",Georgia,serif; font-style:italic; font-weight:600; font-size:clamp(22px,6.4vw,30px); line-height:1;
  color:#B8872A; text-shadow:0 0 0 #fff, 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
  background:linear-gradient(90deg,#F6D3DF 0 16.6%,#CDEDE7 16.6% 33.3%,#DDD0EE 33.3% 50%,#F8E8BC 50% 66.6%,#F9D6C4 66.6% 83.3%,#E6DDF4 83.3%);
}

/* v15: find your table */
.seat{margin-bottom:18px}
.seat-h{margin:0 0 12px;font-family:var(--font-head);font-style:var(--head-style);font-weight:500;font-size:24px}
.seat-f{display:flex;gap:8px}
.seat-f .t{flex:1;min-width:0}
.seat-f .btn{width:auto;flex:none;padding:0 20px}
.seat-out p{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin:12px 0 0;padding:12px 0 0;border-top:1px solid color-mix(in srgb,var(--text) 15%,transparent)}
.seat-out b{color:var(--accent);font-size:20px;text-align:right}
.seat-out p.none{display:block;opacity:.8;font-size:15px}

/* ---------- light brands (bg luminance > 0.5) ---------- */
html.light{--glass:rgba(255,255,255,.84); --field:#FFFFFF; --line:color-mix(in srgb,var(--text) 14%,transparent)}
html.light .card{box-shadow:0 14px 34px rgba(60,40,25,.08)}
html.light .hero{background:
    linear-gradient(180deg,color-mix(in srgb,var(--bg) 62%,transparent) 0%,var(--bg) 100%),
    var(--hero) center 70%/cover no-repeat, var(--bg)}

/* ---------- sunset theme (Better Pics brand colours) ---------- */
body.theme-sunset .btn:not(.ghost):not(.small){background:linear-gradient(90deg,#FF7A3D,#FF3D7F 55%,#7B5CFF); color:#fff; border-color:transparent}
body.theme-sunset h1{background:linear-gradient(90deg,#FF7A3D,#FF3D7F 55%,#7B5CFF); -webkit-background-clip:text; background-clip:text; color:transparent}
body.theme-sunset .eyebrow{color:#C2366E}

/* Year 12 formal: header sits inside a jersey tilted slightly left */
body.theme-jersey .hero{position:relative;background:none;transform:rotate(-6deg);padding:108px 24px 0;min-height:466px;isolation:isolate;box-sizing:border-box}
body.theme-jersey .hero::before{content:"";position:absolute;z-index:-1;left:50%;top:18px;width:380px;max-width:96vw;aspect-ratio:420/480;
  background:url("/brand/jersey-bg.svg") center/contain no-repeat;transform:translateX(-50%);
  filter:drop-shadow(0 18px 22px rgba(123,92,255,.2))}
body.theme-jersey .hero > *{max-width:168px;text-align:center;margin-left:auto;margin-right:auto}
body.theme-jersey .logo{max-width:150px;margin-bottom:10px;filter:none}
body.theme-jersey .eyebrow{font-size:11px;margin-bottom:4px}
body.theme-jersey .hero h1{font-family:"Graduate","Lexend",serif;font-style:normal;font-size:25px;line-height:1.08;letter-spacing:.02em;
  background:linear-gradient(120deg,#FF7A3D,#FF3D7F 52%,#7B5CFF);-webkit-background-clip:text;background-clip:text;color:transparent}
body.theme-jersey .occasion{font-size:12px;line-height:1.35;margin-top:6px}
body.theme-jersey .occasion .yr{display:block;font:400 13px/1.2 "Graduate",serif;letter-spacing:.1em;text-transform:uppercase;color:#14141C;margin:2px 0 6px}
body.theme-jersey .logo{margin-left:auto;margin-right:auto}
body.theme-jersey main{position:relative;z-index:1}

/* v22: add photo -> border -> message -> upload */
#compose{display:grid; gap:14px}
.step-h{display:flex; justify-content:space-between; align-items:baseline; gap:10px; margin:0 0 8px; font-weight:600}
.step-h small{font-weight:400; opacity:.65; font-size:13px}
.strip{display:flex; overflow-x:auto; scroll-snap-type:x mandatory; border-radius:12px; background:var(--field); scrollbar-width:none}
.strip::-webkit-scrollbar{display:none}
.strip .cell{flex:0 0 100%; scroll-snap-align:center; display:grid; place-items:center; padding:12px; box-sizing:border-box; min-height:220px}
.strip .pv{max-width:100%; max-height:52vh; width:auto; height:auto; display:block; border-radius:4px; box-shadow:0 6px 18px rgba(0,0,0,.25)}
.step-wait{margin:0; padding:40px 0; text-align:center; width:100%; opacity:.7}
.dots{display:flex; justify-content:center; gap:8px; margin-top:10px}
.dots button{width:9px; height:9px; padding:0; border-radius:50%; border:0; background:var(--line); cursor:pointer}
.dots button.on{background:var(--accent)}
.batch-note{margin:8px 0 0; font-size:14px; opacity:.75}

/* v25: artwork header image for an event */
.headimg{display:block; width:100%; max-width:560px; margin:0 auto 14px; border-radius:14px; box-shadow:0 10px 28px rgba(0,0,0,.12)}
.hero.hasimg{padding-top:28px}
.tagline{white-space:pre-line; margin:16px auto 0; max-width:520px; font:400 21px/1.35 "Alfa Slab One",Georgia,serif; color:var(--accent); text-align:center; letter-spacing:.01em}

/* v34: select and save */
.selbar{display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:4px 0 12px}
.selbar .selmsg{flex-basis:100%; margin:0; font-size:13.5px; opacity:.8}
.selbar .selmsg:empty{display:none}
.selecting > *{position:relative}
.selecting > .note{opacity:.35}
.selecting > .sel{outline:3px solid var(--accent); outline-offset:-3px}
.selecting > .sel::after{content:"\2713"; position:absolute; top:6px; right:6px; width:26px; height:26px; border-radius:50%;
  background:var(--accent); color:var(--on-accent); display:grid; place-items:center; font:700 15px/1 sans-serif; z-index:2}
