/* Fadepic — the product itself: sign-in, album, links, account, viewer, moderation. */

body.app { font-size: 0.9375rem; line-height: 1.4; background: var(--bg); min-height: 100svh; }
.app h1 { font-size: 1.5rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.app h2 { font-size: 1.125rem; font-weight: 600; line-height: 1.25; }
.app h3 { font-size: 0.9375rem; font-weight: 600; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.8125rem; }

/* shell */
.bar { display: flex; align-items: center; gap: 28px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.bar .wordmark { font-size: 1.0625rem; }
.bar-nav { display: flex; gap: 4px; flex: 1; }
.bar-nav a { white-space: nowrap; padding: 7px 12px; border-radius: var(--r-control); text-decoration: none; color: var(--muted); font-weight: 500; }
.bar-nav a:hover { color: var(--ink); }
.bar-nav a[aria-current="page"] { color: var(--ink); background: var(--surface); }
.bar-nav .count { margin-left: 6px; padding: 1px 7px; border-radius: 10px; background: var(--negative-bg); color: var(--negative); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.bar-end { display: flex; align-items: center; gap: 14px; }
.bar-user { color: var(--muted); }
.page { max-width: 1180px; margin: 0 auto; padding: 28px 24px 96px; }
.page-narrow { max-width: 920px; }
.head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head .grow { flex: 1; }
.head .stamp { color: var(--muted); font-variant-numeric: tabular-nums; }
section + section, .block + .block { margin-top: 44px; }
/* the page's intro line under its heading, then the first box */
.head ~ .muted + .block { margin-top: 24px; }

/* controls */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--control); border-radius: var(--r-control); background: transparent; color: var(--ink); font-size: 0.875rem; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap; transition: background-color 140ms linear, transform 140ms var(--ease), border-color 140ms linear; }
.b:hover { background: var(--surface); border-color: var(--faint); }
.b:active { transform: scale(0.975); }
.b-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.b-primary:hover { background: #ffffff; border-color: #ffffff; }
.b-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.b-accent:hover { background: #ff6a45; border-color: #ff6a45; }
.b-danger { color: var(--negative); }
.b-sm { height: 30px; padding: 0 10px; font-size: 0.8125rem; }
.b-lg { height: 44px; padding: 0 20px; font-size: 0.9375rem; }
.b[disabled], .b[aria-disabled="true"] { color: var(--faint); border-color: var(--line); background: transparent; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 0.18em; font-size: inherit; }

.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label, .label { font-size: 0.875rem; font-weight: 500; }
.field .hint, .hint { font-size: 0.8125rem; color: var(--muted); }
/* a note standing on its own in a form, right above its buttons */
form > .hint:not(:last-child) { margin-bottom: 14px; }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; background: var(--bg); border: 1px solid var(--control); border-radius: var(--r-control); color: var(--ink); font-size: 0.9375rem; }
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--faint); opacity: 1; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 0.875rem; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.segs { justify-self: start; display: inline-flex; flex-wrap: wrap; border: 1px solid var(--control); border-radius: var(--r-control); overflow: hidden; }
.segs label { position: relative; }
.segs input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segs span { display: block; padding: 8px 15px; font-size: 0.875rem; font-weight: 500; font-variant-numeric: tabular-nums; border-left: 1px solid var(--control); }
.segs label:first-child span { border-left: 0; }
.segs input:checked + span { background: var(--ink); color: var(--bg); }
.segs input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.joined { display: flex; }
.joined .input { border-radius: var(--r-control) 0 0 var(--r-control); border-right: 0; text-overflow: ellipsis; }
.joined .b { height: 40px; border-radius: 0 var(--r-control) var(--r-control) 0; }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 500; background: var(--raised); color: var(--ink); white-space: nowrap; }
a.pill { text-decoration: none; }
.pill-pos { background: var(--positive-bg); color: var(--positive); }
.pill-neg { background: var(--negative-bg); color: var(--negative); }
.pill-acc { background: #33190f; color: #ff8a66; }

.flash { padding: 12px 14px; margin-bottom: 20px; border-radius: var(--r-control); background: var(--positive-bg); color: var(--positive); font-weight: 500; }
.flash-err { background: var(--negative-bg); color: var(--negative); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.notice { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.empty { padding: 36px 20px; border: 1px dashed var(--control); border-radius: var(--r-card); color: var(--muted); text-align: center; }

/* new link */
.newlink { border-color: var(--accent); margin-bottom: 32px; }
.newlink h2 { margin-bottom: 6px; }
.newlink p { color: var(--muted); margin-bottom: 14px; }

/* album */
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.tile:target { border-color: var(--accent); }
.tile-pic { position: relative; aspect-ratio: 4 / 5; background: var(--bg); overflow: hidden; }
.tile-pic img { width: 100%; height: 100%; object-fit: cover; transition: filter 200ms linear; }
.discreet .tile-pic img { filter: blur(18px) brightness(0.8); transform: scale(1.15); }
.discreet .tile-pic:hover img, .discreet .tile-pic:focus-within img { filter: none; transform: none; }
.tile-video { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-weight: 500; }
.tile-pic .pill { position: absolute; left: 8px; top: 8px; }
.tile-foot { display: flex; gap: 8px; padding: 10px; }
.tile-foot .b { flex: 1; }
.tile-foot form { display: contents; }
.tile-foot .b-danger { flex: 0 0 auto; }

/* albums, drop target, one-time pictures */
.tabs .b { margin-left: 6px; }
.tabs .b .pill, .head .b .pill { height: 18px; padding: 0 6px; font-size: 0.6875rem; }
.dropzone { position: relative; }
.dropveil { display: none; position: absolute; inset: -10px; z-index: 5; border: 2px dashed var(--accent); border-radius: 12px; background: rgba(24, 25, 27, 0.9); place-items: center; text-align: center; padding: 24px; font-size: 1.125rem; font-weight: 600; pointer-events: none; }
.dropzone.is-drop .dropveil { display: grid; }
.upstatus { display: grid; gap: 6px; justify-items: start; margin-top: 12px; padding: 12px 14px; border-radius: var(--r-control); background: var(--surface); border: 1px solid var(--line); font-weight: 500; }
.upstatus.is-err { background: var(--negative-bg); border-color: transparent; color: var(--negative); }
.upstatus .b { margin-top: 4px; color: var(--ink); }
.once { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.once h2 { margin-bottom: 4px; }
.once-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.once-item { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg); }
.once-item .thumb { width: 44px; height: 44px; border-radius: var(--r-control); object-fit: cover; }
.once-item form { display: contents; }
.tile-move { padding: 0 10px 10px; }
.tile-move .select { height: 30px; font-size: 0.8125rem; padding: 0 8px; }
.head form[data-upload] { display: contents; }
.head .rowmenu-body { width: 220px; }
.head .rowmenu-body .b { width: 100%; }

/* quiet pointers to Premium */
.upsell { margin-top: 14px; font-size: 0.875rem; color: var(--muted); }
.upsell-quiet { font-size: 0.8125rem; color: var(--faint); }
.dlg-note { margin: -8px 0 16px; font-size: 0.875rem; color: var(--muted); }
.plan-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.plan-table td, .plan-table th[scope="row"] { font-size: 0.9375rem; }
.plan-table th[scope="row"] { font-weight: 500; color: var(--muted); padding: 12px; border-top: 1px solid var(--line); }
.plan-table thead th { font-size: 0.9375rem; color: var(--ink); font-weight: 600; padding-bottom: 12px; }
.plan-table td.is-rec, .plan-table th.is-rec { background: var(--surface); }
.tbl.plan-table th { white-space: normal; }
.page .tbl-wrap.block { margin-top: 24px; }
@media (max-width: 860px) {
  .plan-table th[scope="row"], .plan-table td, .plan-table thead th { padding: 10px 8px; font-size: 0.875rem; }
  .plan-table { table-layout: fixed; }
  .plan-table th[scope="row"] { width: 36%; }
  .plan-table td, .plan-table th { overflow-wrap: anywhere; }
}
.plan-price { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 0.875rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }

/* after a view: an invitation, not a banner */
.invite { margin-top: 28px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.invite h2 { font-size: 1.125rem; margin-bottom: 8px; }
.invite p { color: var(--muted); font-size: 0.9375rem; }
.invite .b { margin-top: 16px; width: 100%; height: 44px; }
.invite .b + p { margin-top: 14px; text-align: center; }
.stage-count { position: absolute; top: 14px; left: 16px; z-index: 3; padding: 6px 12px; border-radius: var(--r-control); background: rgba(0, 0, 0, 0.72); font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.stage-count:empty { display: none; }

.mailset { max-width: 520px; }
.mailset .b { margin-top: 4px; }

.kpis-3 { grid-template-columns: repeat(3, 1fr); }
.invite-link { margin-top: 12px; }
.rules { display: grid; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 0.9375rem; max-width: 62ch; }
.rules li { padding-left: 20px; position: relative; }
.rules li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; background: var(--accent); }
@media (max-width: 860px) { .kpis-3 { grid-template-columns: 1fr; } }

/* bank transfer */
.pay h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; margin-top: 16px; }
.pay-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 18px; margin: 0; font-size: 0.9375rem; align-items: center; }
.pay-facts dt { color: var(--muted); font-size: 0.875rem; }
.pay-facts dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; overflow-wrap: anywhere; }
.pay-scan { text-align: center; margin-bottom: 10px; }
.pay-qrs { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.pay-qr { margin: 0; text-align: center; width: 168px; }
.pay-qr figcaption strong { color: var(--ink); font-weight: 600; }
.sec-row > * + * { margin-top: 10px; }
.sec-row + .sec-row { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.tfa-qr { margin: 14px 0; }
.tfa-key { font-size: 1.0625rem; font-weight: 600; letter-spacing: 0.04em; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.tfa-about { margin-bottom: 18px; }
.tfa-step { margin-bottom: 14px; }
.tfa-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.pay-qr .qr { width: 168px; height: 168px; border-radius: var(--r-control); display: block; }
.pay-qr figcaption { margin-top: 8px; }
.pay form { margin-top: 14px; }
@media (max-width: 700px) { .pay-grid { grid-template-columns: 1fr; } .pay-qr .qr { margin: 0 auto; } }

/* contact messages in the admin */
.msgs { display: grid; gap: 14px; }
.msg-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; }
.msg-card.is-open { border-color: var(--control); }
.msg-card header, .msg-card footer { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.msg-card header .grow { flex: 1; }
.msg-card footer form { display: contents; }
.msg-body { margin: 12px 0; max-width: 80ch; overflow-wrap: anywhere; }
.msg-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; margin: 0 0 12px; font-size: 0.875rem; }
.msg-meta dt { color: var(--muted); }
.msg-meta dd { margin: 0; overflow-wrap: anywhere; }

.code-hit h2 { font-size: 1.375rem; letter-spacing: 0.04em; margin-bottom: 12px; }
.code-hit h3 { margin-top: 22px; }
.code-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 20px; align-items: start; }
.code-pics { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.code-void { display: grid; place-items: center; aspect-ratio: 1; border: 1px dashed var(--control); border-radius: var(--r-control); font-size: 0.6875rem; color: var(--faint); text-align: center; padding: 4px; }
@media (max-width: 760px) { .code-grid { grid-template-columns: 1fr; } }

/* tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 0.75rem; font-weight: 500; color: var(--faint); padding: 0 12px 8px; white-space: nowrap; }
.tbl td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .thumb { width: 44px; height: 44px; border-radius: var(--r-control); object-fit: cover; background: var(--bg); display: block; }
.tbl .void { width: 44px; height: 44px; border-radius: var(--r-control); border: 1px dashed var(--control); }
.tbl .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tbl .actions form { display: inline-flex; gap: 6px; }
.tbl-wrap { overflow-x: auto; }
.life { width: 120px; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 5px; }
.life progress { display: block; }
progress.lifebar { -webkit-appearance: none; appearance: none; width: 120px; height: 4px; border: 0; background: var(--line); border-radius: 2px; overflow: hidden; display: block; margin-bottom: 5px; }
progress.lifebar::-webkit-progress-bar { background: var(--line); }
progress.lifebar::-webkit-progress-value { background: var(--accent); }
progress.lifebar::-moz-progress-bar { background: var(--accent); }

/* dialog */
dialog.dlg { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--control); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6); }
dialog.dlg::backdrop { background: rgba(0, 0, 0, 0.66); }
.dlg-body { padding: 22px; }
.dlg-body h2 { margin-bottom: 18px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
.dlg .locked { color: var(--faint); font-size: 0.8125rem; margin-top: 6px; }

/* settings */
.set { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; padding: 28px 0; border-top: 1px solid var(--line); }
.set:first-of-type { border-top: 0; padding-top: 8px; }
.set-label p { margin-top: 6px; color: var(--muted); font-size: 0.875rem; }
.set .panel { max-width: 560px; }
.set .panel .b { margin-top: 4px; }
.set .panel ~ .panel { grid-column: 2; }
.acc-mail { margin: -2px 0 14px; color: var(--muted); }
.acc-mail .pill { margin-right: 6px; }
.check strong { font-weight: 600; color: var(--ink); }
.plan-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 12px 0 16px; font-size: 0.875rem; }
.plan-facts dt { color: var(--muted); }
.plan-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.code { font-size: 1.5rem; font-weight: 600; letter-spacing: 0.06em; padding: 18px 20px; background: var(--bg); border: 1px dashed var(--control); border-radius: var(--r-card); user-select: all; -webkit-user-select: all; text-align: center; margin: 18px 0; font-variant-numeric: tabular-nums; }

/* sign in */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: clamp(32px, 6vw, 96px); align-items: start; max-width: 1180px; margin: 0 auto; padding: clamp(24px, 6vh, 72px) 24px 96px; }
.auth-lead h1 { font-size: clamp(2rem, 4.4vw, 3.5rem); font-weight: 700; line-height: 0.98; letter-spacing: -0.03em; max-width: 10em; }
.auth-lead p { margin-top: 20px; max-width: 40ch; font-size: 1.0625rem; color: var(--muted); }
.auth-lead ul { margin-top: 28px; display: grid; gap: 10px; font-size: 1rem; }
.auth-lead li { padding-left: 22px; position: relative; }
.auth-lead li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; background: var(--accent); }
.auth .panel { padding: 24px; }
.auth .panel h2 { margin-bottom: 18px; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.auth-actions > .b { flex: 1 1 130px; width: auto; padding: 0 12px; }
.auth-switch { margin-top: 18px; color: var(--muted); font-size: 0.9375rem; }
.auth-switch strong { color: var(--ink); font-weight: 600; }
.b-accent-line { border-color: var(--accent); color: #ff8a66; width: 100%; }
.b-accent-line:hover { background: #33190f; border-color: var(--accent); }
.auth-alt { margin-top: 18px; font-size: 0.875rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* viewer */
body.viewer { background: #0d0e0f; min-height: 100svh; display: flex; flex-direction: column; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
.viewer .bar { border-bottom: 0; }
.gate { flex: 1; display: grid; place-items: center; padding: 16px 20px 64px; }
.gate-box { width: min(440px, 100%); }
.gate-box h1 { font-size: clamp(1.75rem, 5vw, 2.25rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.025em; }
.gate-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; }
.gate-box .b-lg { width: 100%; height: 52px; font-size: 1rem; margin-top: 8px; }
.gate-box .after { margin-top: 12px; color: var(--muted); font-size: 0.8125rem; }
.gate-err { margin-top: 12px; color: var(--negative); font-weight: 500; min-height: 1.4em; }
.report { margin-top: 36px; font-size: 0.875rem; }
.report summary { cursor: pointer; color: var(--muted); }
.report form { margin-top: 14px; }

.stage { position: fixed; inset: 0; background: #000; display: none; touch-action: none; cursor: pointer; }
.stage.is-on { display: block; }
.stage canvas, .stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; visibility: hidden; pointer-events: none; }
.stage.is-shown canvas, .stage.is-shown video { visibility: visible; }
.stage-hint { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.stage.is-shown .stage-hint { display: none; }
.stage-hint small { display: block; margin-top: 10px; font-size: 0.875rem; font-weight: 400; color: var(--muted); }
.stage-clock { position: absolute; top: 14px; right: 16px; z-index: 3; padding: 6px 12px; border-radius: var(--r-control); background: rgba(0, 0, 0, 0.72); font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.stage-bar { position: absolute; left: 0; right: 0; top: 0; height: 4px; z-index: 3; background: rgba(255, 255, 255, 0.16); }
.stage-bar span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left center; }
.stage-mark { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; display: none; }
.stage.is-shown.has-mark .stage-mark { display: block; }
.stage.is-spot { cursor: crosshair; }
.stage-mark span { position: absolute; white-space: nowrap; font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.34); text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5); animation: drift 14s linear infinite alternate; }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(60px, 40px); } }

/* admin */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.kpi { padding: 18px 20px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; }
.kpi dt { font-size: 0.8125rem; color: var(--muted); }
.kpi dd { margin: 6px 0 0; font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi dd small { display: block; margin-top: 2px; font-size: 0.8125rem; font-weight: 400; color: var(--faint); }
.cols { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; align-items: start; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a { padding: 7px 12px; border-radius: var(--r-control); text-decoration: none; color: var(--muted); font-weight: 500; }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); }
.tabs a span { color: var(--faint); margin-left: 4px; font-variant-numeric: tabular-nums; }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); position: sticky; top: 8px; z-index: 5; }
.bulkbar .select-sm { width: auto; height: 32px; padding: 0 8px; font-size: 0.875rem; }
.modcard-pick { margin-bottom: 6px; }
.modgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 16px; }
.modcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.modcard.is-flagged { border-color: var(--negative); }
.modcard-pic { display: block; aspect-ratio: 1; background: var(--bg); position: relative; }
.modcard-pic img { width: 100%; height: 100%; object-fit: cover; }
.modcard-pic .pill { position: absolute; left: 8px; top: 8px; }
.modcard-body { padding: 10px 12px 12px; display: grid; gap: 8px; }
.modcard-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8125rem; color: var(--muted); }
.modcard-meta a { color: var(--ink); }
.modcard-burn { display: grid; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.modcard-burn p { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.block-sm { margin: -6px 0 14px; max-width: 80ch; }
.modcard-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.modcard-actions form { display: contents; }
.modcard details { font-size: 0.8125rem; }
.modcard details summary { cursor: pointer; color: var(--negative); font-weight: 500; padding: 4px 0; }
.modcard details form { display: grid; gap: 6px; margin-top: 6px; }
.mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.mini a { display: block; aspect-ratio: 1; background: var(--bg); border-radius: var(--r-control); overflow: hidden; border: 1px solid var(--line); }
.mini a.is-flagged { border-color: var(--negative); }
.mini img { width: 100%; height: 100%; object-fit: cover; }
.pager { display: flex; gap: 10px; align-items: center; margin-top: 24px; color: var(--muted); }
.search { display: flex; gap: 8px; max-width: 420px; }
.rowmenu { position: relative; }
.rowmenu summary { list-style: none; cursor: pointer; }
.rowmenu summary::-webkit-details-marker { display: none; }
.rowmenu-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: 250px; padding: 12px; background: var(--raised); border: 1px solid var(--control); border-radius: var(--r-card); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); display: grid; gap: 10px; }
.rowmenu-body.is-fixed { position: fixed; right: auto; max-height: calc(100vh - 16px); overflow-y: auto; }
.rowmenu-body form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rowmenu-body .input { height: 30px; width: 70px; font-size: 0.8125rem; }

@media (max-width: 860px) {
  .bar { flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
  .bar-nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .bar-end { margin-left: auto; }
  .page { padding: 20px 16px 72px; }
  .album { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .set { grid-template-columns: 1fr; gap: 14px; }
  .set .panel ~ .panel { grid-column: 1; }
  .auth { grid-template-columns: 1fr; }
  .auth-lead ul { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi { border-left: 0; border-top: 1px solid var(--line); }
  .cols { grid-template-columns: 1fr; }
  .tbl th.opt, .tbl td.opt { display: none; }
}

.viewer input, .viewer textarea, .viewer select { -webkit-user-select: text; user-select: text; }

.album, section > .empty { margin-top: 16px; }
.gate-box h1 + p { margin-top: 14px; }
.gate-box p + p { margin-top: 22px; }
.cols > section { margin-top: 0; }

/* a link that opens only in the app */
.app-why { margin-top: 18px; color: var(--muted); }
.app-get { display: grid; gap: 10px; margin-top: 22px; }
.app-get .b { width: 100%; }

/* live session */
.live-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.live-status .flag-note { color: var(--negative); font-size: 0.875rem; }
.live-pics { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.live-pic { padding: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.live-pic:hover, .live-pic:focus-visible { border-color: var(--accent); }
.live-pic:disabled { cursor: not-allowed; opacity: 0.5; }
.live-pic .tile-pic { display: block; aspect-ratio: 1; }
.live-wait { display: flex; align-items: center; gap: 14px; margin: 36px 0; font-size: 1.0625rem; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

/* live session: setup, the moderator's monitor, who is there */
.lead-narrow { max-width: 64ch; }
.live-setup .panel { max-width: 680px; }
.live-setup h2 { margin-bottom: 18px; }
.protect { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.protect legend { padding: 0; margin-bottom: 4px; }
.protect > .hint { margin-bottom: 12px; }
.check small { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--muted); }
.live-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.live-grid h2 { margin-bottom: 12px; }
.live-side { display: grid; gap: 16px; }
.live-side > * { margin: 0; }
.live-grid + .block { margin-top: 40px; }
.live-side .panel h2 { margin-bottom: 8px; }
.monitor { position: relative; aspect-ratio: 16 / 10; background: #000; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); }
.monitor-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.monitor .stage-mark { display: none; }
.monitor.is-on.has-mark .stage-mark { display: block; }
.monitor .stage-bar { z-index: 3; }
.monitor-idle { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); }
.monitor-note { position: absolute; left: 12px; bottom: 12px; z-index: 3; padding: 4px 10px; border-radius: var(--r-control); background: rgba(0, 0, 0, 0.72); font-size: 0.8125rem; color: var(--ink); }
.monitor-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.people li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.people-code { font-weight: 600; margin-right: 4px; }
.people .flag-note { color: var(--negative); font-size: 0.8125rem; }
.live-pic.is-now { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.live-pic .tile-video { font-size: 0.875rem; }
.stage.is-free { cursor: default; }
.stage-sound { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 4; }
.set-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 0.875rem; }
.set-table th, .set-table td { padding: 6px 8px 6px 0; text-align: left; vertical-align: middle; }
.set-table thead th { font-weight: 600; }
.set-table th[scope="row"] { font-weight: 400; color: var(--muted); }
.set-table .input { width: 100%; max-width: 120px; }
@media (max-width: 860px) { .live-grid { grid-template-columns: 1fr; } }

/* last line of the signed-in pages */
.app-foot { margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- live session comments: a dock at the bottom, above the stage, outside its hold area ---------- */
.chat { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 28px var(--margin) calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.82) 34%); pointer-events: none; }
.chat > * { pointer-events: auto; max-width: 640px; margin-left: auto; margin-right: auto; }
.chat-list { list-style: none; padding: 0; margin-bottom: 8px; max-height: 24vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.chat-list li { font-size: 0.875rem; line-height: 1.35; color: var(--ink); text-shadow: 0 1px 2px #000; overflow-wrap: anywhere; }
.chat-list b { font-weight: 600; color: var(--muted); margin-right: 6px; }
.chat-list .chat-mod b { color: var(--accent); }
.chat-list .chat-me b { color: var(--ink); }
.chat-emoji { font-size: 1.15rem; }
.chat-form { display: flex; gap: 6px; }
.chat-form .input { flex: 1; min-width: 0; height: 38px; background: rgba(24, 25, 27, 0.92); }
.chat-form .b { height: 38px; }
.chat-reacts { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.chat-react-b { width: 40px; height: 34px; padding: 0; font-size: 1.05rem; background: rgba(24, 25, 27, 0.92); }
.chat-err { font-size: 0.8125rem; color: var(--negative); margin-left: 4px; }
body.has-chat .gate { padding-bottom: 40vh; }
.people-nick { font-weight: 600; }
.people-kick { margin-left: auto; color: var(--negative); }
.live-chat .mod-chat { list-style: none; padding: 0; margin: 10px 0 12px; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.mod-chat li { font-size: 0.875rem; line-height: 1.35; overflow-wrap: anywhere; }
.mod-chat b { font-weight: 600; color: var(--muted); margin-right: 6px; }
.mod-chat .chat-mod b { color: var(--accent); }
.mod-chat .chat-del { margin-left: 8px; color: var(--faint); }
.live-chat .chat-err { margin: 6px 0 0; }
