/* One narrow column for phones; the form reads top to bottom, the photo grid is 3 across. One dark palette, no theme switch.
   Look: a dark field of soft gaussian blobs (splats) behind sharp hairline glass cards with viewfinder corners,
   numbered section heads and monospace figures, like the readout of a 3D reconstruction. */
:root {
  --bg: #09080d;
  --panel: rgba(20, 18, 30, 0.74);
  --panel-solid: #14121e;
  --ink: #ece8f4;
  --muted: #9a93ad;
  --line: rgba(236, 232, 244, 0.14);
  --line-strong: rgba(236, 232, 244, 0.32);
  --accent: #ff4a3d;   /* vermilion: the band's 。 and the primary action */
  --cyan: #6fe3ff;
  --violet: #8b6bff;
  --gold: #e8c35a;
  --warn: #ffb547;
  --bad: #ff5a5f;
  --good: #6be3a1;
  --sans: "Space Grotesk", "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); font: 16px/1.75 var(--sans); min-height: 100vh; } /* no background: html paints it, so the splats behind body show */
/* Splats: soft anisotropic blobs, fixed behind everything. Gradients only (no blur filter), so phones scroll smoothly. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38% 22% at 12% 18%, rgba(139, 107, 255, 0.34), transparent 70%),
    radial-gradient(26% 30% at 88% 10%, rgba(255, 74, 61, 0.22), transparent 70%),
    radial-gradient(30% 18% at 78% 62%, rgba(111, 227, 255, 0.16), transparent 70%),
    radial-gradient(22% 34% at 6% 78%, rgba(232, 195, 90, 0.12), transparent 70%),
    radial-gradient(46% 26% at 50% 100%, rgba(139, 107, 255, 0.22), transparent 70%),
    radial-gradient(10% 6% at 64% 30%, rgba(255, 74, 61, 0.28), transparent 70%),
    radial-gradient(7% 11% at 30% 48%, rgba(111, 227, 255, 0.22), transparent 70%);
}
/* Film grain over the splats. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main {
  max-width: 560px; margin: 0 auto; padding-inline: 16px; padding-block: 20px 64px; display: flex; flex-direction: column; gap: 20px;
  counter-reset: sec;
}
h1 { font-weight: 700; font-size: 2rem; line-height: 1.2; margin: 8px 0 0; letter-spacing: -0.02em; text-wrap: balance; }
/* The band's name ends with 。 — every title gets a red one. */
h1::after {
  content: ""; display: inline-block; width: 0.34em; height: 0.34em; margin-left: 0.14em; vertical-align: baseline;
  border: 0.09em solid var(--accent); border-radius: 50%;
}
/* Section heads are numbered like the panels of an instrument. */
h2 { font-weight: 700; font-size: 1.08rem; line-height: 1.4; margin: 0; letter-spacing: 0.01em; counter-increment: sec; display: flex; align-items: baseline; gap: 10px; }
h2::before { content: counter(sec, decimal-leading-zero); font: 500 12px/1 var(--mono); color: var(--accent); letter-spacing: 0.08em; }
/* Break Japanese titles between phrases. keep-all is the fallback. */
h1, h2 { word-break: keep-all; word-break: auto-phrase; overflow-wrap: anywhere; }
p { margin: 0; }
a { color: var(--cyan); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.muted { color: var(--muted); font-size: 14px; }

/* Cards: hairline glass with viewfinder corner ticks. */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 20px 16px 16px;
  display: flex; flex-direction: column; gap: 12px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.panel::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none; --c: var(--line-strong); --l: 12px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) 1px, linear-gradient(var(--c), var(--c)) top left / 1px var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) 1px, linear-gradient(var(--c), var(--c)) top right / 1px var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) 1px, linear-gradient(var(--c), var(--c)) bottom left / 1px var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) 1px, linear-gradient(var(--c), var(--c)) bottom right / 1px var(--l);
  background-repeat: no-repeat;
}
/* Groups of cards that show and hide together (the manage page). */
.stack { display: flex; flex-direction: column; gap: 20px; }

/* Index intro: no box, the splats show through. */
.hero { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 4px 0 0; gap: 14px; }
.hero::before { display: none; }
.hero .intro { font-size: 16px; line-height: 1.8; font-weight: 500; }
.hero a { color: var(--cyan); }
/* The demo clip, framed like a viewport. */
.demo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line-strong); border-radius: 2px; background: #000; }

label { font-weight: 700; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
/* 16px: iOS Safari zooms into any smaller text field on focus and stays zoomed (sideways scrolling). */
input[type="text"], input[type="email"], textarea, select {
  font: inherit; font-size: 16px; font-weight: 400; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 2px;
  background: rgba(236, 232, 244, 0.04); color: var(--ink);
}
input::placeholder, textarea::placeholder { color: rgba(154, 147, 173, 0.7); }
select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background: rgba(236, 232, 244, 0.04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ece8f4' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
}
select option { background: var(--panel-solid); color: var(--ink); }
textarea { min-height: 88px; resize: vertical; }
.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 4px; flex: none; accent-color: var(--accent); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.seg label { flex: 1; flex-direction: row; justify-content: center; padding: 10px 4px; font-weight: 500; cursor: pointer; color: var(--muted); }
.seg label + label { border-left: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; }
.seg label:has(input:checked) { background: var(--ink); color: var(--bg); font-weight: 700; }

button, .button {
  font: inherit; font-weight: 700; letter-spacing: 0.02em; min-height: 50px; padding: 0 20px; border-radius: 2px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
button:hover:not(:disabled), .button:hover { background: #ff6a5f; border-color: #ff6a5f; }
button.secondary, .button.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
button.secondary:hover:not(:disabled), .button.secondary:hover { background: rgba(236, 232, 244, 0.08); border-color: var(--ink); }
button.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
button.danger:hover:not(:disabled) { background: rgba(255, 90, 95, 0.12); }
button:disabled { opacity: 0.35; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tile {
  position: relative; aspect-ratio: 1; max-width: 100%; border-radius: 0; overflow: hidden; background: rgba(236, 232, 244, 0.06);
  border: 1px solid var(--line); padding: 0; min-height: 0;
}
.tile:hover:not(:disabled) { background: rgba(236, 232, 244, 0.06); border-color: var(--line-strong); }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .badge {
  position: absolute; left: 4px; bottom: 4px; max-width: calc(100% - 8px); font: 500 10px/1.6 var(--mono); letter-spacing: 0.04em;
  padding: 0 5px; border-radius: 1px; background: rgba(9, 8, 13, 0.8); color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile .badge.warn { color: var(--warn); }
.tile .badge.bad { color: var(--bad); }
.tile .badge.video { top: 4px; bottom: auto; left: auto; right: 4px; }
.tile .badge.good { color: var(--good); }
.tile.selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.tile .remove {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(9, 8, 13, 0.75); color: var(--ink); font-size: 16px; line-height: 1; font-weight: 400;
}

.notice { border: 1px solid var(--line); border-left: 2px solid var(--warn); padding: 8px 12px; background: rgba(255, 181, 71, 0.06); font-size: 14px; }
.error { color: var(--bad); font-size: 14px; font-weight: 700; }

/* Progress: a thin scan line. */
progress { appearance: none; width: 100%; height: 4px; border: 0; border-radius: 0; background: var(--line); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--violet), var(--accent)); }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--violet), var(--accent)); }
#progressText { font-family: var(--mono); font-size: 14px; }

.counts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
/* Count pinned top right however long the venue name; the meter runs under both. */
.counts li { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.counts li:last-child { border-bottom: 0; }
.counts .ev { min-width: 0; font-size: 15px; }
.counts .ev small { display: block; color: var(--muted); font-size: 12px; }
.counts .n { font: 500 14px/1.6 var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--cyan); }
/* Progress towards the photos a 3D model needs. */
.counts .meters { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; }
.counts .meter { display: block; height: 2px; background: var(--line); overflow: hidden; }
.counts .meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--accent)); box-shadow: 0 0 8px var(--accent); }
.more { align-self: flex-end; font: 500 13px/1.6 var(--mono); letter-spacing: 0.02em; }

/* Pages: submit / photos / 3D models. */
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-top: -4px; }
.tabs a {
  flex: 1; text-align: center; padding: 10px 4px; font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Photos page: one fold per year. */
.years { display: flex; flex-direction: column; }
.years details { border-top: 1px solid var(--line); }
.years details:last-child { border-bottom: 1px solid var(--line); }
.years summary { cursor: pointer; padding: 10px 0; font: 500 15px/1.6 var(--mono); letter-spacing: 0.02em; }

/* 3D models page. */
.models { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.model img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border: 1px solid var(--line); background: #000; }

.link-box { font-family: var(--mono); font-size: 12px; word-break: break-all; background: rgba(9, 8, 13, 0.7); color: var(--good); padding: 12px; border: 1px solid var(--line); user-select: all; }

/* Site header: wordmark and language. */
.langbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { font: 700 2.2rem/1 var(--sans); letter-spacing: -0.01em; white-space: nowrap; text-decoration: none; color: var(--ink); }
.brand::after { content: "。"; color: var(--accent); }
.langbar select { width: auto; padding: 4px 32px 4px 10px; font-size: 13px; background-color: transparent; }

footer { text-align: center; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
footer a { color: var(--ink); }
/* Near the top of every public page: this is not the band's site. */
.unofficial-top { font-size: 11px; line-height: 1.5; color: var(--muted); margin: -10px 0 -6px; white-space: pre-line; }

/* Terms: lists inside cards. */
.panel ul:not(.counts) { margin: 0; padding-left: 1.3em; }

/* A box inside a card: dashed, so cards never nest visually. */
.inset { border: 1px dashed var(--line-strong); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
/* The irreversible "withdraw everything" card. */
.danger-zone { border-color: rgba(255, 90, 95, 0.4); }
.danger-zone::before { --c: var(--bad); }
.danger-zone h2 { color: var(--bad); }

/* Admin review: the selected photo, as large as the column allows. */
.detail-img { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #000; border: 1px solid var(--line); }

/* Admin review: a desktop screen. A narrow column of controls and thumbnails on the left; the open photo fills
   the rest of the window, with its controls in two compact rows under it. Nothing scrolls but the thumbnail list. */
body.admin { height: 100vh; overflow: hidden; }
.admin-app { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: 100vh; }
.admin .side { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-right: 1px solid var(--line); min-height: 0; background: rgba(9, 8, 13, 0.6); }
.admin .side-head { display: flex; align-items: baseline; gap: 10px; }
.admin .brand { font-size: 1.25rem; }
.admin .side select { padding: 8px 32px 8px 10px; font-size: 13px; }
.admin .side .seg label { padding: 6px 4px; font-size: 13px; }
.admin .side #listNote, .admin .side .error { font-size: 12px; }
.admin .grid { grid-template-columns: repeat(3, 1fr); gap: 3px; overflow: auto; min-height: 0; flex: 1; align-content: start; }
.admin .tile .badge { font-size: 9px; }
.admin .keys { font-family: var(--mono); font-size: 11px; }
.admin .detail { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.admin .stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #000; }
.admin .stage img, .admin .stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.admin .stage img, .admin .stage video { width: 100%; height: 100%; } /* the 400 px thumbnail fills the stage until the original arrives */
.admin .stage { position: relative; }
/* While the original loads over the thumbnail: a label and a light running along the top edge. */
.admin .loading { position: absolute; top: 0; left: 0; right: 0; padding: 8px 12px 0; font: 500 12px/1.6 var(--mono); color: var(--ink); text-shadow: 0 0 6px #000; pointer-events: none; }
.admin .loading::before { content: ""; position: absolute; top: 0; left: 0; width: 30%; height: 2px; background: linear-gradient(90deg, transparent, var(--violet), var(--accent), transparent); animation: loading 1.1s linear infinite; }
@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.admin .stage-empty { flex: 1; display: grid; place-items: center; }
.admin .info { border-top: 1px solid var(--line); padding: 8px 16px 10px; display: flex; flex-direction: column; gap: 6px; background: rgba(9, 8, 13, 0.85); }
.admin .info #detailMeta { font-family: var(--mono); font-size: 12px; }
.admin .info-row { display: flex; align-items: flex-start; gap: 16px; } /* buttons stay put however long the comment is */
.admin .info-row .row { flex-wrap: nowrap; align-items: center; }
.admin .info-row .sub { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; }
.admin .info-row .sub p { overflow-wrap: anywhere; } /* comments run to 280 characters; show them whole */
/* Choice buttons: outlined; the current state is filled so it reads at a glance. */
.admin .choice { min-height: 36px; padding: 0 14px; font-size: 13px; background: transparent; color: var(--muted); border-color: var(--line-strong); }
.admin .choice:hover:not(:disabled) { background: rgba(236, 232, 244, 0.08); color: var(--ink); }
.admin .choice.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.admin #approve.on { background: var(--good); border-color: var(--good); color: var(--bg); }
.admin .choice.good.on { background: var(--good); border-color: var(--good); color: var(--bg); }
.admin .choice.bad.on { background: var(--bad); border-color: var(--bad); color: #fff; }
/* Space: the open photo fills the window. */
.lightbox { position: fixed; inset: 0; z-index: 10; background: rgba(9, 8, 13, 0.96); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; cursor: zoom-out; }
.lightbox img, .lightbox video { max-width: 100%; max-height: calc(100vh - 64px); object-fit: contain; }
.lightbox p { font-family: var(--mono); font-size: 13px; }

/* The native file input (its label text follows the browser, not the page) is replaced by a labelled button. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
label.button:has(+ .sr-only:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
