:root {
  color-scheme: dark;
  --background: #080808;
  --surface: #141414;
  --ink: #f1f1ef;
  --muted: #b0b0ae;
  --line: #393939;
  font-family: Inter, "Malgun Gothic", "Noto Sans JP", system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
h1, h2, p, figure { margin: 0; }
h1 { font-size: clamp(1.35rem, 3vw, 2.1rem); font-weight: 550; letter-spacing: -.035em; }
h2 { font-size: 1.08rem; font-weight: 650; }
p { line-height: 1.55; }
.top { background: #1a1a1a; border-bottom: 1px solid #292929; }
.bar {
  max-width: 1240px; min-height: 52px; margin: auto; padding: 6px 16px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px;
}
.brand { grid-area: 1 / 2; color: #ededeb; font-size: .88rem; font-weight: 650; text-align: center; }
.header-action {
  grid-area: 1 / 1; justify-self: start; display: inline-flex; align-items: center;
  min-height: 36px; padding: 3px 0; border: 0; background: transparent;
  color: #dadad8; font-size: .79rem; text-decoration: none;
}
.header-action:hover { color: white; text-decoration: underline; text-underline-offset: 4px; }
.language { grid-area: 1 / 3; justify-self: end; }
.language select { width: auto; min-height: 32px; padding: 3px 5px; font-size: .79rem; background: #1a1a1a; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.shell { max-width: 1240px; min-height: calc(100vh - 99px); margin: auto; padding: 26px 30px 44px; display: grid; align-content: start; gap: 17px; }
.page-heading, .event-heading { padding: 1px 0; }
.event-heading { gap: 14px; }
.event-heading p, .muted { color: var(--muted); font-size: .88rem; }
.event-cover { display: block; width: 100%; height: auto; background: #111; }
.panel { min-width: 0; padding: clamp(14px, 3vw, 24px); display: grid; gap: 14px; align-content: start; border: 1px solid var(--line); background: var(--surface); }
.access-form { width: min(100%, 380px); margin: 32px auto 0; display: grid; gap: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 7px 13px; border: 1px solid #555; background: transparent; color: var(--ink); text-decoration: none; font-size: .87rem; white-space: nowrap; }
.button:hover { background: #292929; border-color: #9c9c9c; }
.button.primary { background: #ededeb; border-color: #ededeb; color: #101010; font-weight: 650; }
.button.primary:hover { background: #fff; }
.form, .field { display: grid; gap: 7px; }
.form { gap: 13px; }
.field { min-width: 0; font-size: .87rem; font-weight: 600; }
input, select, textarea { min-width: 0; width: 100%; min-height: 42px; padding: 8px 9px; border: 1px solid #505050; border-radius: 0; background: #111; color: var(--ink); }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.between { justify-content: space-between; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; align-items: start; }
.recipient-picker, .photo-assignment { padding: 10px; border: 1px solid var(--line); }
.recipient-picker > summary, .photo-assignment > summary { cursor: pointer; font-size: .9rem; font-weight: 600; }
.recipient-picker > div { display: grid; gap: 6px; max-height: 190px; overflow: auto; padding-top: 9px; }
.recipient-picker label { display: flex; align-items: center; gap: 6px; }
.recipient-picker input { width: 17px; min-height: 17px; accent-color: #eee; }
.photo-assignment summary img { width: 55px; height: 38px; object-fit: cover; vertical-align: middle; margin-right: 7px; }
.photo-assignment .form { margin-top: 10px; }
.photo-filters { gap: 5px 19px; border-bottom: 1px solid var(--line); }
.photo-filters button { min-height: 42px; padding: 3px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: .87rem; }
.photo-filters button[aria-pressed="true"] { border-bottom-color: #f1f1ef; color: #f1f1ef; }
.photo-series { display: grid; gap: clamp(25px, 5vw, 60px); }
.photo-open { display: block; padding: 0; width: 100%; border: 0; background: #111; cursor: zoom-in; }
.photo-open img { display: block; width: 100%; height: auto; }
.caption { display: flex; gap: 10px 18px; justify-content: space-between; align-items: flex-start; padding: 13px 0 0; }
.caption strong, .lightbox-caption strong { font-weight: 650; font-size: .95rem; }
.caption p, .lightbox-caption p { margin-top: 3px; color: #d2d2cf; overflow-wrap: anywhere; }
.caption p:empty, .lightbox-caption p:empty { display: none; }
.caption time, .lightbox-caption time { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; }
.download-link { min-height: 36px; font-size: .78rem; }
.status { min-height: 1.2em; color: #eab9b9; }
.address { overflow-wrap: anywhere; font-size: .87rem; }
.gallery-dialog { width: min(1210px, calc(100% - 20px)); max-height: 95dvh; padding: 11px 13px; border: 1px solid var(--line); background: #0c0c0c; color: var(--ink); }
.gallery-dialog::backdrop { background: #000e; }
.photo-view { display: grid; gap: 10px; }
.photo-controls { color: var(--muted); font-size: .82rem; }
.photo-stage { position: relative; background: #080808; }
.photo-stage img { display: block; width: 100%; max-height: 72dvh; object-fit: contain; }
.photo-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 43px; min-height: 48px; border: 1px solid #555; background: #111c; color: white; font-size: 1.85rem; }
.photo-arrow.prev { left: 7px; }
.photo-arrow.next { right: 7px; }
footer { padding: 14px; text-align: center; border-top: 1px solid #292929; color: var(--muted); background: #141414; font-size: .8rem; }
@media (max-width: 630px) {
  .shell { padding: 16px 13px 30px; }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .caption { align-items: start; }
  .download-link { padding-inline: 8px; }
}
