:root {
  --bg: #fff8f0; --card: #ffffff; --ink: #15101c; --muted: #6e6478; --line: #f1e4da;
  --accent: #e0246f; --on-accent: #ffffff; --accent-soft: #ffe1ee; --blush: #ffe1ee;
  --party: linear-gradient(100deg, #ff3d8b, #7b2ff7); --danger: #b3261e; --ok: #2e7d4f;
  --radius: 18px; --shadow: 0 1px 2px rgba(29,26,36,.06), 0 8px 24px rgba(29,26,36,.06);
  --display: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif; --sans: 'Inter', system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0b16; --card: #1b1424; --ink: #fff8f0; --muted: #b3a8bf; --line: #2c2238;
    --accent: #ff5c9e; --on-accent: #ffffff; --accent-soft: #3a1830; --blush: #3a1830; --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0b16; --card: #1b1424; --ink: #fff8f0; --muted: #b3a8bf; --line: #2c2238;
  --accent: #ff5c9e; --on-accent: #ffffff; --accent-soft: #3a1830; --blush: #3a1830; --shadow: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 1.08; margin: 0 0 .4em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 520px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 600; color: var(--accent); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.btn { appearance: none; border: 0; border-radius: 999px; padding: 12px 20px; font: 600 15px var(--sans); cursor: pointer;
  background: var(--ink); color: var(--bg); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.btn:hover { opacity: .9; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.gold { background: var(--party); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.block { width: 100%; }
label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); font: 16px var(--sans); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.err { color: var(--danger); font-size: .9rem; min-height: 1.2em; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 999px; font-weight: 600; z-index: 99; max-width: calc(100% - 32px); text-align: center; }

.code { font-family: var(--display); font-size: clamp(2.2rem, 9vw, 3.4rem); letter-spacing: .12em; font-weight: 900; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.logo { display: inline-block; width: 123px; height: 42px; background: url(/logo-light.png) left center / contain no-repeat;
  font-size: 0; color: transparent; text-decoration: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo { background-image: url(/logo-dark.png); } }
:root[data-theme="dark"] .logo { background-image: url(/logo-dark.png); }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 20px 0; overflow-x: auto; }
.tab { padding: 10px 14px; border: 0; background: none; font: 600 15px var(--sans); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.on { color: var(--ink); border-color: var(--accent); }

.gallery { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--line); }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.tile .badge { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.tile .meta { position: absolute; inset: auto 0 0 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff; font-size: 12px; display: flex; justify-content: space-between; align-items: end; gap: 4px; }
.tile .acts { display: flex; gap: 4px; }
.tile .acts button { background: rgba(255,255,255,.18); border: 0; color: #fff; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 14px; }
.tile .acts button.on { background: var(--accent); }
.tile.hidden-m { opacity: .4; }
.tile.locked img, .tile.locked video { filter: blur(18px) saturate(.6); cursor: default; }
.tile.locked::after { content: '🔒'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; }

.lightbox { position: fixed; inset: 0; background: rgba(10,8,12,.92); z-index: 50; display: grid; place-items: center; padding: 16px; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 86vh; border-radius: 10px; }
.lightbox .close { position: absolute; top: 12px; right: 16px; color: #fff; font-size: 32px; background: none; border: 0; cursor: pointer; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.stat { font-family: var(--display); font-size: 2rem; font-weight: 600; }
.lock-note { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; font-size: .9rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

.app-note { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft);
  color: var(--ink); text-decoration: none; font-size: .92rem; line-height: 1.35; }
a.app-note:hover { opacity: .9; }
.paybox { display: grid; gap: 10px; }
.secure { font-size: .78rem; color: var(--muted); text-align: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 14px; border-radius: 999px; font: 600 14px var(--sans); color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--ink); color: var(--bg); }

.site-foot { padding: 24px 0 40px; text-align: center; }
.site-foot a { color: inherit; }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.swatch { height: 54px; border-radius: 12px; border: 2px solid var(--line); cursor: pointer; position: relative; padding: 0; overflow: hidden; }
.swatch span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.88); color: #15101c; font: 600 10.5px var(--sans); padding: 2px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.swatch.custom { background: conic-gradient(#ff3d8b, #ffc93d, #c6f432, #3de0ff, #7b2ff7, #ff3d8b); }
