:root {
  --bg: #0f0f12; --bg-2: #1a1a20; --ink: #f4f1ea; --ink-dim: #a7a39a;
  --accent: rgb(89 135 255); --accent-ink: #fff; --danger: #ff6b5e; --line: #2c2c35;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); }
body { overflow-x: hidden; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }

.view { min-height: 100vh; min-height: 100dvh; padding: calc(28px + var(--safe-t)) 24px calc(40px + var(--safe-b)); max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; animation: fade .35s ease; }
.view.center { align-items: center; justify-content: center; text-align: center; position: relative; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Buttons */
.btn { font: inherit; font-weight: 700; font-size: 17px; color: var(--ink); background: #2b2b34; border: 0; border-radius: 999px; padding: 14px 28px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .1s ease; }
.btn:active { transform: scale(.96); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgb(89 135 255 / .6); }
.btn-secondary { background: #2b2b34; }
.btn-ghost { background: transparent; color: var(--ink-dim); border: 2px solid #34343e; }
.btn-danger { background: transparent; color: var(--danger); border: 2px solid #4a2a27; }
.btn-close { background: #8a3a3a; color: #fff; }
.btn.small { padding: 10px 20px; font-size: 15px; }
.btn.xl { padding: 20px 44px; font-size: 22px; }
.icon-btn { width: 64px; height: 64px; border-radius: 50%; border: 2px solid #ffffff40; background: #00000088; color: #fff; font-size: 38px; line-height: 1; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 2px solid #34343e; border-radius: 999px; color: var(--ink-dim); font-weight: 700; font-size: 15px; }
.pill.live { color: var(--accent); border-color: #2b3a66; }
.pill.live i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.err { color: var(--danger); min-height: 1.4em; font-size: 16px; }
.hint { color: var(--ink-dim); font-size: 14px; line-height: 1.5; }
.empty { color: var(--ink-dim); font-size: 19px; text-align: center; margin: 40px 0; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; }

/* Einwahl */
.hero { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.logo { width: 76px; height: 76px; border-radius: 22px; background: var(--accent); display: grid; place-items: center; box-shadow: 0 16px 40px -14px rgb(89 135 255 / .7); }
.logo svg { width: 42px; height: 42px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hero h1 { font-size: clamp(34px, 8vw, 56px); font-weight: 800; letter-spacing: -.01em; }
.lead { color: var(--ink-dim); font-size: 18px; line-height: 1.5; }
.join-form { width: 100%; display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.join-form input { font: inherit; font-size: 28px; font-weight: 700; text-align: center; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: #101015; border: 2px solid #34343e; border-radius: 18px; padding: 18px; outline: none; width: 100%; }
.join-form input[type=password] { letter-spacing: .04em; text-transform: none; font-size: 22px; }
.join-form input:focus { border-color: var(--accent); }
.admin-link { position: absolute; bottom: calc(18px + var(--safe-b)); left: 0; right: 0; text-align: center; color: #5b5a55; font-size: 13px; text-decoration: none; }

/* Kopf */
.g-head { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; justify-content: space-between; }
.kicker { color: var(--accent); font-weight: 700; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; min-height: 1em; }
.g-title h1 { font-size: clamp(30px, 6vw, 54px); font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.sub { color: var(--ink-dim); font-size: 19px; margin-top: 4px; }
.g-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.g-meta { display: flex; gap: 10px; flex-wrap: wrap; }

/* Galerie */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; align-content: start; }
.item { padding: 0; border: 2px solid var(--line); border-radius: 10px; background: var(--bg-2); cursor: pointer; overflow: hidden; aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; position: relative; }
.item img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.item:focus-visible { outline: 3px solid var(--accent); }
.item .tag { position: absolute; left: 8px; top: 8px; background: #000a; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.item.new { animation: pop .6s ease; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* Foto groß */
.lb { position: fixed; inset: 0; z-index: 60; background: #000e; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b)); }
.lb > img { flex: 1; min-height: 0; max-width: 100%; max-width: min(1100px, 100%); object-fit: contain; border-radius: 6px; background: transparent; }
.lb-info { color: var(--ink-dim); font-size: 15px; text-align: center; }
.lb-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.nav { position: absolute; top: 45%; z-index: 2; }
.nav.prev { left: 10px; } .nav.next { right: 10px; }

/* Admin */
.ev-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.ev { background: var(--bg-2); border: 2px solid var(--line); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ev h3 { font-size: 22px; font-weight: 800; }
.ev .meta { color: var(--ink-dim); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ev .code { font-size: 26px; font-weight: 800; color: var(--accent); }
.ev .row { margin-top: 4px; }
.chip { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 2px solid #2b3a66; color: var(--accent); }
.chip.off { border-color: #4a2a27; color: var(--danger); }

/* Fenster */
.modal { position: fixed; inset: 0; background: #000c; backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 20px; z-index: 50; overflow-y: auto; }
.modal-card { background: var(--bg-2); border: 2px solid var(--line); border-radius: 28px; padding: 26px; max-width: 920px; width: 100%; display: flex; flex-direction: column; gap: 16px; margin: auto; }
.modal-card h2 { font-size: 26px; font-weight: 800; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
fieldset { border: 1.5px solid #30303a; border-radius: 16px; padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
legend { padding: 0 8px; color: var(--accent); font-weight: 800; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
label { display: flex; flex-direction: column; gap: 6px; color: var(--ink-dim); font-size: 15px; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 16px; }
label.check small { color: var(--ink-dim); font-size: 13px; font-weight: 400; }
input[type=text], input[type=password], input[type=email] { font: inherit; color: var(--ink); background: #101015; border: 2px solid #34343e; border-radius: 12px; padding: 12px 14px; font-size: 16px; width: 100%; outline: none; }
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus { border-color: var(--accent); }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin-top: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; }
.qr { width: 180px; height: 180px; image-rendering: pixelated; border-radius: 10px; align-self: center; }

/* Hochladen / Hinweise */
.up-panel { position: fixed; left: 16px; right: 16px; bottom: calc(16px + var(--safe-b)); max-width: 460px; margin: 0 auto; z-index: 70; background: var(--bg-2); border: 2px solid var(--line); border-radius: 18px; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 50px -20px #000; }
.bar { height: 10px; border-radius: 99px; background: #101015; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translate(-50%, 20px); background: #fff; color: #111; font-weight: 700; padding: 14px 24px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .cols { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
  .view { padding-left: 16px; padding-right: 16px; }
  .g-actions .btn { padding: 12px 18px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .view, .item.new, .pill.live i { animation: none; } }

/* Diashow */
.ss { position: fixed; inset: 0; z-index: 90; background: #000; }
.ss-stage { position: absolute; inset: 0; }
.ss-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .9s ease; background: transparent; }
.ss-stage img.on { opacity: 1; }
.ss-prog { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: #ffffff1a; z-index: 3; }
.ss-prog i { display: block; height: 100%; width: 0; background: var(--accent); }
.ss-ui { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b)); opacity: 0; pointer-events: none; transition: opacity .3s; background: linear-gradient(#000a, transparent 22%, transparent 70%, #000b); }
.ss-ui.show { opacity: 1; pointer-events: auto; }
.ss-top, .ss-bottom { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.ss-top { justify-content: flex-start; }
.ss-bottom { margin-top: 8px; }
.ss-caption { text-align: center; color: #fff; font-weight: 600; min-height: 1.4em; text-shadow: 0 1px 6px #000; }
.icon-btn.big { width: 76px; height: 76px; font-size: 28px; background: var(--accent); border-color: var(--accent); }
.ss-panel { align-self: center; width: min(460px, 100%); background: #1a1a20ee; border: 2px solid var(--line); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 14px; backdrop-filter: blur(10px); margin-bottom: 8px; }
.ss-panel select { font: inherit; color: var(--ink); background: #101015; border: 2px solid #34343e; border-radius: 12px; padding: 12px 14px; font-size: 16px; width: 100%; }
.ss-panel input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
.ss-panel b { color: var(--accent); }
select { font: inherit; color: var(--ink); background: #101015; border: 2px solid #34343e; border-radius: 12px; padding: 12px 14px; font-size: 16px; width: 100%; }

/* ---------- V4: Kundenbereich, Feed, Interaktionen ---------- */
.join-form input.txt, .join-form input#invName { letter-spacing: 0; text-transform: none; font-size: 20px; }
.join-form input[readonly] { opacity: .7; }
.admin-link a { color: inherit; text-decoration: none; }
.admin-link a:hover { color: var(--ink-dim); }
.hint { color: var(--ink-dim); font-size: 14px; line-height: 1.5; }
.seg { display: inline-flex; border: 2px solid #34343e; border-radius: 999px; overflow: hidden; }
.seg button { font: inherit; font-weight: 700; font-size: 15px; color: var(--ink-dim); background: transparent; border: 0; padding: 8px 18px; cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }
.pill.me { cursor: pointer; background: transparent; font: inherit; font-weight: 700; font-size: 15px; }
.center-modal { align-items: center; }
.invite-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.people { display: flex; flex-direction: column; gap: 8px; }
.person { display: flex; align-items: center; gap: 10px; background: #101015; border: 1.5px solid #30303a; border-radius: 12px; padding: 8px 12px; font-size: 15px; }
.person .who { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.person small { color: var(--ink-dim); display: block; }
.person button { font: inherit; font-size: 13px; font-weight: 700; color: var(--danger); background: transparent; border: 1.5px solid #4a2a27; border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1.5px solid #2b3a66; color: var(--accent); font-size: 12px; font-weight: 700; }
.chip.off { border-color: #4a2a27; color: var(--danger); }

/* Feed */
.feed { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 560px; margin: 0 auto; }
.post { background: var(--bg-2); border: 2px solid var(--line); border-radius: 20px; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--ink-dim); font-size: 14px; font-weight: 600; }
.post-head b { color: var(--ink); }
.post-head .grow { flex: 1; }
.post-head button { font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-dim); background: transparent; border: 1.5px solid #34343e; border-radius: 999px; padding: 5px 12px; cursor: pointer; text-decoration: none; }
.post-head button.del { color: var(--danger); border-color: #4a2a27; }
.post-img { display: block; width: 100%; background: var(--bg-2); cursor: pointer; border: 0; padding: 0; }
.post-img img { display: block; width: 100%; height: auto; min-height: 160px; }
.feed-more { height: 40px; }

.soc { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 14px; }
.soc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.soc button { font: inherit; cursor: pointer; }
.sb { display: inline-flex; align-items: center; gap: 6px; background: #101015; color: var(--ink); border: 1.5px solid #34343e; border-radius: 999px; padding: 6px 12px; font-size: 15px; font-weight: 700; line-height: 1.2; }
.sb.on { border-color: var(--accent); background: #1b2442; }
.sb .heart { font-size: 17px; }
.sb.pick { color: var(--ink-dim); }
.picker { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: #101015; border: 1.5px solid #34343e; border-radius: 16px; }
.picker button { background: transparent; border: 0; font-size: 26px; padding: 4px 6px; border-radius: 10px; line-height: 1.1; }
.picker button.on { background: #1b2442; }
.liked-by { color: var(--ink-dim); font-size: 13px; }
.cmts { display: flex; flex-direction: column; gap: 8px; }
.cmt { font-size: 15px; line-height: 1.4; display: flex; gap: 8px; align-items: flex-start; }
.cmt .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cmt b { font-weight: 800; }
.cmt .x { background: transparent; border: 0; color: var(--ink-dim); font-size: 14px; padding: 0 4px; }
.cmt-form { display: flex; gap: 8px; }
.cmt-form input { flex: 1; min-width: 0; }
.cmt-form .btn { padding: 8px 16px; font-size: 15px; }
.soc-off { color: var(--ink-dim); font-size: 13px; }
.lb-social { width: 100%; max-width: 640px; max-height: 38vh; overflow-y: auto; background: #000a; border: 1.5px solid #ffffff22; border-radius: 16px; }
.lb-social:empty { display: none; }
@media (max-width: 760px) { .invite-row { grid-template-columns: 1fr; } .feed { max-width: 100%; } }
.post-head a { font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-dim); border: 1.5px solid #34343e; border-radius: 999px; padding: 5px 12px; text-decoration: none; }
#invResult { display: flex; flex-direction: column; gap: 10px; }
.g-top { display: flex; justify-content: flex-end; gap: 10px; }
.btn-nav { background: #1f9d6b; color: #fff; box-shadow: 0 10px 30px -12px rgb(31 157 107 / .7); }
.post-head { flex-wrap: wrap; row-gap: 8px; }
.post-head > span:not(.grow) { white-space: nowrap; }
.post-head .grow { min-width: 0; }
.g-foot { margin: 36px auto 0; max-width: 560px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: 28px 20px 8px; border-top: 2px solid var(--line); }
.g-foot img { width: 200px; height: auto; }
.g-foot p { color: var(--ink-dim); font-size: 15px; line-height: 1.55; }
.g-foot p b { color: var(--ink); font-size: 18px; }

/* V7 */
.top-link { position: absolute; top: calc(18px + var(--safe-t)); right: 22px; color: var(--ink-dim); font-size: 14px; font-weight: 600; text-decoration: none; border: 1.5px solid #34343e; border-radius: 999px; padding: 7px 16px; }
.top-link:hover { color: var(--ink); border-color: var(--accent); }
.join-logo { position: absolute; bottom: calc(22px + var(--safe-b)); left: 50%; transform: translateX(-50%); width: 150px; height: auto; opacity: .85; }
.a-tools { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; }
.ev { position: relative; }
.ev.today { border-color: #2b3a66; box-shadow: 0 0 0 1px #2b3a66, 0 18px 40px -26px rgb(89 135 255 / .8); }
.ev-live { position: absolute; top: 16px; right: 16px; padding: 5px 12px; font-size: 13px; }
.ev.today h3 { padding-right: 84px; }
@media (max-width: 760px) { .a-tools { grid-template-columns: 1fr; } }
.person button.plain { color: var(--ink-dim); border-color: #34343e; }
.person { flex-wrap: wrap; }

/* V9 */
.x-btn { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #000b; color: #fff; font-size: 17px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.ss-panel { position: relative; }
.ss-panel .x-btn { background: #2b2b34; }
.up-card { max-width: 640px; }
.up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; max-height: 52vh; overflow-y: auto; padding: 2px; }
.up-cell { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #101015; border: 1.5px solid #34343e; }
.up-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-cell.noprev::before { content: attr(data-name); position: absolute; inset: 0; padding: 8px; font-size: 11px; color: var(--ink-dim); overflow: hidden; overflow-wrap: anywhere; }
.up-cell .x-btn { top: 6px; right: 6px; width: 28px; height: 28px; font-size: 13px; }

/* V10 */
.person .who { flex: 1 1 220px; min-width: 0; }
.sort { width: auto; padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 700; color: var(--ink-dim); background: transparent; border: 2px solid #34343e; }
.qr { cursor: pointer; -webkit-touch-callout: default; user-select: auto; -webkit-user-select: auto; background: #fff; }

/* V11 */
.menu-wrap { position: relative; display: inline-block; }
.pill.sortbtn { cursor: pointer; background: transparent; font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); }
.menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 230px; background: var(--bg-2); border: 2px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: 0 20px 50px -18px #000; display: flex; flex-direction: column; }
.menu button { font: inherit; font-size: 16px; font-weight: 600; text-align: left; color: var(--ink); background: transparent; border: 0; border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.menu button:hover { background: #24242c; }
.menu button.on { color: var(--accent); }
.menu button.on::after { content: ' ✓'; }
.zip-opts { display: flex; flex-direction: column; gap: 14px; }
.zip-opts input[type=radio] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin-top: 2px; }

/* V12: Feed am Computer breiter */
@media (min-width: 900px) {
  .feed { max-width: 880px; }
  .post-img img { max-height: 86vh; object-fit: contain; margin: 0 auto; }
  .g-foot { max-width: 880px; }
}

/* V14 */
.storage { background: var(--bg-2); border: 2px solid var(--line); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.st-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 15px; }
.st-head span { color: var(--ink-dim); }
.st-bar { height: 16px; border-radius: 99px; background: #101015; overflow: hidden; display: flex; border: 1.5px solid #30303a; }
.st-bar i { display: block; height: 100%; transition: width .6s ease; }
#stData { background: var(--accent); }
#stOther { background: #5b5a68; }
.storage.warn #stData { background: #f0a73a; }
.storage.crit #stData { background: var(--danger); }
.st-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-dim); }
.st-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.st-legend .d1 { background: var(--accent); } .st-legend .d2 { background: #5b5a68; } .st-legend .d3 { background: #101015; border: 1.5px solid #4a4a56; }
.st-legend b { color: var(--ink); }
.purge { color: var(--ink-dim); }
.purge.soon { color: var(--danger); font-weight: 700; }
.g-cover { width: 100%; max-width: 1100px; margin: 0 auto; border-radius: 22px; overflow: hidden; aspect-ratio: 21 / 8; background: #101015; border: 2px solid var(--line); }
.g-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-box { width: 100%; aspect-ratio: 21 / 8; border-radius: 14px; overflow: hidden; background: #101015; border: 1.5px dashed #34343e; display: grid; place-items: center; }
.cover-box img { width: 100%; height: 100%; object-fit: cover; }
input[type=color] { width: 56px; height: 40px; padding: 2px; border-radius: 10px; border: 2px solid #34343e; background: #101015; cursor: pointer; }
.notice { background: #3a2a14; border: 1.5px solid #6b4a1c; color: #ffd9a0; border-radius: 14px; padding: 12px 16px; font-size: 15px; line-height: 1.5; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.stat { background: #101015; border: 1.5px solid #30303a; border-radius: 14px; padding: 12px 14px; }
.stat .n { font-size: 24px; font-weight: 800; }
.stat .l { color: var(--ink-dim); font-size: 14px; }
.stat .u { color: var(--ink-dim); font-size: 12px; margin-top: 4px; }
.sub-h { font-size: 15px; font-weight: 800; color: var(--accent); margin: 6px 0 8px; }
.top-list { display: flex; gap: 10px; flex-wrap: wrap; }
.top { display: flex; flex-direction: column; gap: 6px; align-items: center; font-size: 13px; }
.top img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1.5px solid #30303a; }
@media (max-width: 760px) { .g-cover { aspect-ratio: 16 / 9; border-radius: 16px; } }

/* V15 */
.g-cover { width: 100vw; max-width: none; margin: calc(-28px - var(--safe-t)) 0 0 calc(50% - 50vw); border-radius: 0; border: 0; aspect-ratio: auto; height: clamp(180px, 34vw, 460px); }
.g-cover img { object-position: center; }
@media (max-width: 760px) { .g-cover { aspect-ratio: auto; height: clamp(150px, 46vw, 260px); border-radius: 0; } }
.ev .btn, .ev .btn-primary { box-shadow: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #ffffff30; cursor: pointer; padding: 0; }
.sw.on { outline: 3px solid var(--ink); outline-offset: 2px; }
.ev.archived { opacity: .5; filter: grayscale(1); }
.ev.archived .code { color: var(--ink-dim); }
.archive { margin-top: 10px; }
.archive > summary { cursor: pointer; color: var(--ink-dim); font-weight: 700; font-size: 15px; padding: 10px 2px; list-style: none; }
.archive > summary::-webkit-details-marker { display: none; }
.archive > .ev-list { margin-top: 10px; }
.field { display: flex; flex-direction: column; gap: 8px; color: var(--ink-dim); font-size: 15px; }

/* V16 */
.legal { display: flex; justify-content: center; gap: 10px; color: var(--ink-dim); font-size: 13px; margin-top: 8px; }
.legal a { color: var(--ink-dim); text-decoration: none; }
.legal a:hover { color: var(--ink); text-decoration: underline; }
.legal-abs { position: absolute; bottom: calc(6px + var(--safe-b)); left: 0; right: 0; margin: 0; }
.view.center .join-logo { bottom: calc(34px + var(--safe-b)); }
textarea { width: 100%; background: var(--card, #17171c); color: var(--ink); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; resize: vertical; }
.legal-doc { max-width: 760px; margin: 0 auto; padding: 28px 22px 60px; line-height: 1.6; }
.legal-doc h1 { margin: 18px 0 14px; }
.legal-doc h2 { font-size: 18px; margin: 22px 0 6px; }
.legal-doc p { color: var(--ink-dim); margin: 0 0 8px; }
.legal-nav { margin-top: 30px; }
.legal-nav a { color: var(--ink-dim); }

/* V17 */
.g-top { order: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.g-cover { order: 1; margin-top: 0; }
#v-gallery > :not(.g-top):not(.g-cover) { order: 2; }
.g-logo { height: 48px; width: auto; display: block; }
.g-top-r { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 2px solid #34343e; color: var(--ink); cursor: pointer; padding: 0; }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.icon-btn[hidden] { display: none; }
.menu-right { left: auto; right: 0; }
.to-top { position: fixed; right: 18px; bottom: calc(20px + var(--safe-b)); z-index: 25; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink, #fff); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 12px 30px -10px #000; animation: fade .25s ease; }
.to-top[hidden] { display: none; }
.to-top svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 900px) { .to-top { right: 28px; } }
.seg button[hidden] { display: none; }
.g-top { flex-wrap: wrap; }
@media (max-width: 600px) {
  .g-logo { height: 40px; }
  .g-top-r { display: contents; }
  .g-top .menu-wrap { order: 1; }
  .g-top #gBack { order: 2; flex: 1 1 100%; justify-content: center; text-align: center; }
  .g-top #gBack[hidden] { display: none; }
}

/* V18 */
.menu-h { margin: 8px 14px 2px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }
.menu-sep { border: 0; border-top: 2px solid var(--line); margin: 6px 4px; }
.menu hr.menu-sep:last-child { display: none; }
@media (max-width: 600px) {
  #v-gallery .g-actions { flex-wrap: wrap; gap: 8px; }
  #v-gallery .g-actions .btn { flex: 1 1 auto; padding: 12px 7px; font-size: clamp(11px, 3vw, 14px); white-space: nowrap; text-align: center; }
}
.menu-right { min-width: min(280px, calc(100vw - 32px)); }
