:root {
  --bg: #faf6f0; --ink: #1f1b16; --muted: #786e62; --line: #e7dfd3; --card: #fff;
  --accent: #d9603b; --accent-ink: #fff; --ok: #3f8f5a; --warn: #c58a1a; --bad: #c0392b;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1 { font-size: 1.9rem; line-height: 1.15; margin: .3em 0 .3em; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 1.6em 0 .6em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 520px; padding-top: 28px; padding-bottom: 40px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.wrapgap { flex-wrap: wrap; justify-content: flex-start; }
.stack { display: grid; gap: 10px; max-width: 320px; margin: 18px auto; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .02em; color: var(--ink); text-decoration: none; font-size: 1.25rem; }
.logo.small { font-size: .95rem; }
.roll { width: 1.3em; height: 1.3em; border-radius: 50%; background: radial-gradient(circle, var(--bg) 0 22%, var(--accent) 23% 100%); box-shadow: inset 0 0 0 3px #b9472a; }
.tag { font-size: .7rem; background: var(--ink); color: #fff; padding: 2px 7px; border-radius: 99px; font-weight: 600; }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(.95); }
.btn.big { width: 100%; padding: 18px; font-size: 1.15rem; margin: 14px 0 6px; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.tiny { padding: 3px 9px; font-size: .75rem; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: #efc9c4; }
input, select { width: 100%; font: inherit; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus { outline: none; border-color: var(--accent); }
.field { display: block; margin-top: 16px; font-weight: 600; }
.field input { margin-top: 6px; font-weight: 400; }
.error { background: #fbe9e6; color: var(--bad); padding: 10px 14px; border-radius: 10px; }
.notice { background: #fff; border: 1.5px solid var(--line); padding: 16px; border-radius: var(--r); }

/* landing */
.landing main { padding-top: 12vh; padding-bottom: 60px; max-width: 720px; }
.hero { font-size: clamp(2.2rem, 7vw, 3.6rem); margin: .5em 0 .3em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin: 0 auto 32px; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; text-align: left; counter-reset: s; }
.steps li { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 18px; counter-increment: s; }
.steps li b { display: block; font-size: 1.1rem; }
.steps li b::before { content: counter(s) ". "; color: var(--accent); }
.steps li span { color: var(--muted); font-size: .95rem; }

/* gallery */
.ev-head { padding: 26px 0 10px; text-align: center; }
.ev-head .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0 6px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; padding-bottom: 40px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; } }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--line); cursor: zoom-in; border: 0; padding: 0; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.tile:hover img { transform: scale(1.03); }
.play { position: absolute; inset: auto auto 8px 8px; background: rgba(0,0,0,.6); color: #fff; border-radius: 99px; padding: 2px 9px; font-size: .8rem; }

/* lightbox */
.lb { position: fixed; inset: 0; background: rgba(15,12,9,.96); z-index: 50; display: flex; align-items: center; justify-content: center; }
.lb[hidden] { display: none; }
.lb-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 50px 0 70px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; padding: 10px 16px; opacity: .8; }
.lb button:hover { opacity: 1; }
.lb-x { top: 4px; right: 6px; font-size: 1.6rem !important; }
.lb-prev { left: 0; } .lb-next { right: 0; }
.lb-bar { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); color: #ddd; }
.lb-bar .btn { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }

/* upload */
.pick { position: relative; }
.queue { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.qi { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.qi .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qi .st { color: var(--muted); }
.qi .bar { grid-column: 1 / -1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.qi .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.qi.done .bar i { background: var(--ok); }
.qi.fail { border-color: #efc9c4; }
.qi.fail .st { color: var(--bad); }
.qi button { grid-column: 1 / -1; justify-self: start; }
.summary { margin: 4px 0 0; text-align: center; }
.hint { text-align: center; }

/* admin */
.admin-bar { background: #fff; border-bottom: 1.5px solid var(--line); padding: 10px 0; margin-bottom: 18px; }
.admin-bar nav form { margin: 0; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--r); overflow: hidden; border: 1.5px solid var(--line); }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 9px; border-radius: 99px; background: var(--line); color: var(--muted); vertical-align: middle; }
.pill.open { background: #dff1e5; color: var(--ok); }
.pill.before { background: #fbefd5; color: var(--warn); }
.form { display: grid; gap: 14px; max-width: 720px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } }
.slug { display: flex; align-items: center; gap: 6px; }
.slug span { color: var(--muted); font-weight: 400; white-space: nowrap; }
.ev-admin-top { display: grid; grid-template-columns: 1fr 260px; gap: 24px; align-items: start; }
@media (max-width: 760px) { .ev-admin-top { grid-template-columns: 1fr; } }
.qrbox { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 8px; text-align: center; }
.qrbox img { width: 100%; image-rendering: pixelated; }
.qrbox input { font-size: .75rem; padding: 6px 8px; }
.statrow { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.statrow div { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 14px; min-width: 90px; }
.statrow b { display: block; font-size: 1.25rem; }
.statrow span { font-size: .78rem; color: var(--muted); }
.card { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 18px 0; }
.card summary { font-weight: 700; cursor: pointer; }
.card .form { margin-top: 14px; }
.danger-zone form { margin-top: 14px; }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.acell { background: #fff; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.acell a { position: relative; display: block; aspect-ratio: 1; background: var(--line); }
.acell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acell.is-hidden img { opacity: .3; }
.ameta { display: flex; justify-content: space-between; padding: 6px 8px 0; gap: 6px; }
.ameta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aact { display: flex; gap: 6px; padding: 6px 8px 8px; }
.aact form { margin: 0; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; }
.pager a { padding: 4px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; }
.pager a.cur { background: var(--ink); color: #fff; }

/* printable sign */
.sign { background: #fff; }
.sign-page { max-width: 7.5in; margin: 0 auto; padding: .6in .4in; text-align: center; }
.sign-page h1 { font-size: 2.6rem; margin: .4em 0 .1em; }
.sign-page .big { font-size: 1.5rem; font-weight: 600; margin: 0 0 .5em; }
.sign-qr { width: 4.2in; height: 4.2in; image-rendering: pixelated; }
@media print { .noprint { display: none; } .sign-page { padding-top: .3in; } }

/* invite modal */
.modal { position: fixed; inset: 0; background: rgba(15,12,9,.6); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { position: relative; background: #fff; border-radius: 18px; padding: 22px 20px 20px; width: 100%; max-width: 360px; text-align: center; }
.modal-card h2 { margin: 0 0 4px; font-size: 1.25rem; }
.modal-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: var(--muted); }
.invite-qr { width: 100%; max-width: 260px; image-rendering: pixelated; margin: 10px auto; display: block; }
.invite-link { font-size: .8rem; padding: 8px 10px; text-align: center; }
.invite-btns { justify-content: center; margin-top: 12px; }

/* landing v2 */
.lp-nav { padding-top: 16px; padding-bottom: 16px; }
.lp-hero { padding: 7vh 16px 30px; max-width: 760px; }
.btn.big-inline { padding: 15px 28px; font-size: 1.05rem; }
.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 30px; }
.lp-features div { padding: 4px 4px; }
.lp-features b { display: block; margin-bottom: 2px; }
.lp-features span { color: var(--muted); font-size: .95rem; }
.lp-events { margin: 40px auto 10px; }
.lp-events p { margin: 4px 0; }
.lp-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lp-tags span { background: #fff; border: 1.5px solid var(--line); border-radius: 99px; padding: 6px 14px; font-weight: 600; font-size: .9rem; }
.lp-contact { margin-top: 30px; background: #fff; border: 1.5px solid var(--line); border-radius: 20px; padding: 26px 22px; }
.lp-contact h2 { margin-top: 0; font-size: 1.6rem; }
.lp-foot { padding: 30px 0 40px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
textarea { width: 100%; font: inherit; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; resize: vertical; }
textarea:focus, select:focus { outline: none; border-color: var(--accent); }

/* notify form */
.notify { max-width: 440px; margin: 18px auto 0; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-align: left; }
.notify p { margin: 0 0 10px; }
.notify-row { display: flex; gap: 8px; }
.notify-row input { flex: 1; min-width: 0; }
.notify-msg { margin: 0 !important; }
.notify-msg.ok { color: var(--ok); } .notify-msg.bad { color: var(--bad); }

/* admin extras */
.flash { background: #dff1e5; color: var(--ok); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.badge { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; font-size: .75rem; }
.inq-list .card { margin: 12px 0; }
.inq.is-done { opacity: .55; }
.inq-msg { white-space: pre-wrap; background: var(--bg); padding: 10px 12px; border-radius: 10px; }
.inq form { margin: 0; }
