:root {
  color-scheme: light;
  --bg: #f4f1ec;
  --paper: #faf8f4;
  --card: #fffdf9;
  --ink: #1d1b18;
  --ink-2: #3a362f;
  --muted: #7a736b;
  --line: rgba(29, 27, 24, 0.12);
  --line-2: rgba(29, 27, 24, 0.22);
  --soft: #ebe6de;
  --accent: #9c4f3a;
  --accent-soft: #f3e3dc;
  --good: #2f6a3d;
  --good-soft: #e3efe2;
  --danger: #9a3131;
  --shadow: 0 18px 40px rgba(29, 27, 24, 0.10);
  --display: "Cormorant Garamond", "Sarabun", Georgia, serif;
  --sans: "Sarabun", "Leelawadee UI", system-ui, sans-serif;
  --pad: clamp(1rem, 4vw, 3.5rem);
  --radius: 4px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.2; letter-spacing: 0; margin: 0; }

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem var(--pad);
  background: rgba(244, 241, 236, 0.86);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.brand {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  text-decoration: none;
}
.brand b {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand span { color: var(--muted); font-size: 0.85rem; }
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav a:hover { color: var(--ink); }
.nav a.is-on { color: var(--ink); background: var(--soft); }
.nav a.nav-room {
  margin-left: 0.4rem;
  border: 1px solid var(--line-2);
  color: var(--ink);
}
.nav a.nav-room.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.nav a.nav-room.is-online::before,
.nav a.nav-room.is-offline::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 0.45rem;
  vertical-align: middle;
  background: var(--good);
}
.nav a.nav-room.is-offline::before { background: #b9b1a6; }

/* ---------- shared bits ---------- */
.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.display { font-family: var(--display); font-weight: 500; }
.muted { color: var(--muted); }
.page { padding: 0 var(--pad) 4rem; animation: rise 0.45s ease both; }
.page-head { padding: 2.6rem 0 1.4rem; }
.page-head h1 { font-family: var(--display); font-size: clamp(2.2rem, 4vw, 3.2rem); }
.page-head p { margin: 0.4rem 0 0; color: var(--muted); }
.section { padding: 3rem 0 0; }
.section-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.section-row h2 { font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.3rem); }
.link-more { color: var(--muted); text-decoration: none; font-size: 0.95rem; white-space: nowrap; }
.link-more:hover { color: var(--ink); }
.empty { color: var(--muted); margin: 0.5rem 0; }
.center-row { justify-content: center; margin-top: 2rem; }
.row > input.small-input { flex: 0 1 12rem; min-width: 8rem; padding: 0.35rem 0.6rem; }
.sub { margin: 0.3rem 0 0; }
.empty-box {
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.62rem 1.15rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
button:hover, .btn:hover { background: var(--ink-2); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.ghost, button.ghost, .btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.ghost:hover, button.ghost:hover, .btn.ghost:hover { background: var(--soft); }
button.danger, .btn.danger { background: transparent; color: var(--danger); border-color: rgba(154, 49, 49, 0.4); }
button.danger:hover { background: #f6e6e3; }
button.small, .btn.small { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
.text-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  border-radius: 0;
  font-weight: 400;
}
.text-btn:hover { background: none; color: var(--ink); }

label { display: block; margin-bottom: 0.3rem; font-size: 0.9rem; color: var(--ink-2); }
input, select, textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 0.62rem 0.75rem;
}
textarea { min-height: 4.5rem; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--ink); }
.field { display: grid; gap: 0.3rem; }
.row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.row > input { flex: 1; min-width: 8rem; }
.stack { display: grid; gap: 0.75rem; align-content: start; }
.error { min-height: 1.3em; color: var(--danger); margin: 0.4rem 0 0; font-size: 0.92rem; }
.good {
  background: var(--good-soft);
  border: 1px solid #bcd5b8;
  color: var(--good);
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  margin: 0 0 1rem;
}

/* ---------- home ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  min-height: calc(100vh - 70px);
  padding: 1.5rem 0 2rem;
}
.hero-text h1 {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(2.8rem, 5.5vw, 4.4rem);
  line-height: 1;
  margin-bottom: 1rem;
}
.hero-text p { color: var(--ink-2); max-width: 26rem; margin: 0 0 1.4rem; }
.stats {
  display: flex;
  gap: 1.8rem;
  margin: 0 0 1.8rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats div { display: grid; }
.stats b { font-family: var(--display); font-size: 1.9rem; font-weight: 500; line-height: 1.1; }
.stats span { color: var(--muted); font-size: 0.85rem; }
.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: min(80vh, 860px);
}
.hero-stage button {
  all: unset;
  cursor: zoom-in;
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s ease, visibility 0s linear 1.1s;
}
.hero-stage button.is-on { opacity: 1; visibility: visible; z-index: 1; transition: opacity 1.1s ease; }
.hero-stage img,
.lb-stage img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: min(100%, var(--nw, 100%));
  max-height: min(100%, var(--nh, 100%));
  width: auto;
  height: auto;
  object-fit: contain;
}
.hero-stage img { box-shadow: var(--shadow); }
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.hero-meta a { text-decoration: none; color: var(--ink); }
.dots { display: flex; gap: 0.35rem; }
.dots button {
  all: unset;
  cursor: pointer;
  width: 22px;
  height: 2px;
  background: var(--line-2);
  transition: background 0.3s ease, width 0.3s ease;
}
.dots button.is-on { background: var(--ink); width: 34px; }

/* ---------- people ---------- */
.people-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(150px, 17vw, 220px);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.8rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 210px), 1fr));
  gap: 1.6rem 1rem;
}
.person-card { text-decoration: none; scroll-snap-align: start; display: block; }
.person-card .frame {
  aspect-ratio: 3 / 4;
  background: var(--soft);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 2px;
}
.person-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(.2, .7, .2, 1), opacity 0.4s ease;
}
.person-card:hover img { transform: scale(1.02); }
.person-card h3 { font-size: 1rem; font-weight: 500; margin-top: 0.6rem; }
.person-card p { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.85rem; }

/* ---------- masonry ---------- */
.masonry { display: flex; gap: var(--gap, 12px); align-items: flex-start; }
.masonry-col { flex: 1; display: grid; gap: var(--gap, 12px); min-width: 0; }
.tile {
  all: unset;
  display: block;
  cursor: zoom-in;
  background: var(--soft);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.tile img {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1);
}
.tile img.is-in { opacity: 1; }
.tile:hover img { transform: scale(1.015); }
.tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tile .who {
  position: absolute;
  left: 0.6rem;
  bottom: 0.5rem;
  color: #fff;
  font-size: 0.82rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.tile:hover .who { opacity: 1; transform: none; }

.chips {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0 0 1.4rem;
}
.chip {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  padding: 0.38rem 0.95rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 400;
  text-decoration: none;
}
.chip:hover { background: var(--soft); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip small { opacity: 0.6; margin-left: 0.3rem; }

.person-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem 0 1.6rem;
}
.person-head h1 { font-family: var(--display); font-size: clamp(2.2rem, 4.5vw, 3.4rem); word-break: break-word; }
.back { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.back:hover { color: var(--ink); }
.set-block + .set-block { margin-top: 2.4rem; padding-top: 2.4rem; border-top: 1px solid var(--line); }

/* ---------- lightbox ---------- */
dialog.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 18, 16, 0.96);
  color: #f5f1ea;
}
dialog.lightbox::backdrop { background: rgba(20, 18, 16, 0.9); }
.lb-stage {
  position: absolute;
  inset: 56px 64px 40px;
  touch-action: pan-y;
}
.lb-stage img {
  user-select: none;
  -webkit-user-drag: none;
  animation: fade 0.35s ease;
}
.lb-top {
  position: absolute;
  inset: 0 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem 0 1.2rem;
  font-size: 0.92rem;
}
.lb-top a { color: #f5f1ea; text-decoration: none; }
.lb-top a:hover { text-decoration: underline; }
.lb-count { color: rgba(245, 241, 234, 0.6); font-variant-numeric: tabular-nums; }
.lb-btn {
  background: transparent;
  border: 1px solid rgba(245, 241, 234, 0.25);
  color: #f5f1ea;
}
.lb-btn:hover { background: rgba(245, 241, 234, 0.12); }
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 1.5rem;
  border-radius: 50%;
  background: rgba(245, 241, 234, 0.06);
  border: 1px solid rgba(245, 241, 234, 0.18);
  color: #f5f1ea;
  z-index: 2;
}
.lb-arrow:hover { background: rgba(245, 241, 234, 0.16); }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-actions { display: flex; gap: 0.5rem; align-items: center; }

/* ---------- footer ---------- */
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem var(--pad) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot .brand b { font-size: 1.1rem; }

/* ---------- login ---------- */
.gate {
  max-width: 25rem;
  margin: 8vh auto 4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow);
}
.gate h1 { font-family: var(--display); font-size: 2.2rem; margin-bottom: 0.4rem; }
.gate p { color: var(--muted); margin: 0 0 1.4rem; font-size: 0.95rem; }
.pass-row { display: flex; gap: 0.4rem; }
.gate + .panel { max-width: 25rem; margin: -2rem auto 3rem; }
.pass-row input { flex: 1; }

/* ---------- private room & console ---------- */
.room-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2.2rem 0 1.4rem;
}
.room-top h1 { font-family: var(--display); font-size: clamp(2rem, 3.5vw, 2.8rem); }
.room-top p { margin: 0.3rem 0 0; color: var(--muted); }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 1.2rem;
}
.shoot-card {
  all: unset;
  cursor: pointer;
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.shoot-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.shoot-card .frame { aspect-ratio: 4 / 5; background: var(--soft); display: grid; place-items: center; position: relative; overflow: hidden; }
.shoot-card .frame img,
.item-frame img,
.sc-item .frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.shoot-card .frame span { color: var(--muted); font-size: 0.9rem; }
.shoot-card .body { padding: 0.85rem 1rem 1rem; }
.shoot-card h3 { font-size: 1.05rem; }
.shoot-card p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.85rem; }
.badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.55rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink-2);
  font-size: 0.75rem;
  white-space: nowrap;
}
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.good { background: var(--good-soft); color: var(--good); border: 0; margin: 0; padding: 0.05rem 0.5rem; }
.badge.dark { background: var(--ink); color: var(--paper); }

.tabs {
  display: flex;
  gap: 0.2rem;
  border-bottom: 1px solid var(--line);
  margin: 0.5rem 0 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.tabs button {
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  padding: 0.7rem 0.9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
}
.tabs button:hover { color: var(--ink); background: none; }
.tabs button.is-on { color: var(--ink); border-bottom-color: var(--ink); }

.toolbar {
  position: sticky;
  top: 62px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.8rem;
  margin-bottom: 1rem;
  background: rgba(250, 248, 244, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.toolbar .spacer { flex: 1; }
.toolbar select { width: auto; padding: 0.35rem 0.6rem; border-radius: 999px; }
.toolbar input { width: auto; flex: 0 1 16rem; padding: 0.35rem 0.8rem; border-radius: 999px; }
.toolbar .count { color: var(--muted); font-size: 0.9rem; padding: 0 0.3rem; }

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 190px), 1fr));
  gap: 0.8rem;
}
.item {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.item.is-selected { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.item.is-hidden .item-frame img { opacity: 0.45; }
.item-frame {
  all: unset;
  cursor: zoom-in;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--soft);
}
.item-frame .raw-mark { font-family: var(--display); font-size: 1.6rem; color: var(--muted); }
.item-info { padding: 0.45rem 0.6rem 0.55rem; display: grid; gap: 0.25rem; }
.item-name { font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-select {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  width: 22px;
  height: 22px;
  margin: 0;
  z-index: 2;
}
.pick {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
}
.pick:hover { background: #fff; color: var(--accent); }
.pick.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.picked-by {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  display: flex;
  gap: 0.2rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  margin: 0 0 1rem;
}
.panel h3 { font-size: 1.05rem; margin-bottom: 0.7rem; }
.panel-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.panel-row select { width: auto; }
.drop {
  border: 1.5px dashed var(--line-2);
  border-radius: 6px;
  padding: 1.6rem 1rem;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  background: var(--paper);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.drop.is-over { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.drop strong { color: var(--ink); font-weight: 500; display: block; margin-bottom: 0.2rem; }
.drop p { margin: 0 0 0.8rem; font-size: 0.88rem; }
.queue { display: grid; gap: 0.35rem; margin-top: 0.8rem; font-size: 0.85rem; }
.queue-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 0.6rem; align-items: center; }
.queue-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 4px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); width: 0; transition: width 0.2s ease; }
.bar.is-done i { background: var(--good); }
.bar.is-fail i { background: var(--danger); width: 100% !important; }
.meter { display: grid; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); }
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.switch:last-child { border-bottom: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.checks label { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 0.92rem; }
.recovery-key { font-size: 1.25rem; letter-spacing: 0.08em; text-align: center; }
#pub-log { max-height: 16rem; overflow: auto; font-size: 0.8rem; }
.cred {
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.console { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 2rem; padding-top: 1.5rem; }
.side { position: sticky; top: 80px; align-self: start; display: grid; gap: 0.2rem; }
.side button {
  justify-content: flex-start;
  background: none;
  border: 0;
  color: var(--muted);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-weight: 500;
}
.side button:hover { background: var(--soft); color: var(--ink); }
.side button.is-on { background: var(--ink); color: var(--paper); }
.side .who { padding: 0 0.8rem 0.8rem; color: var(--muted); font-size: 0.85rem; }

.people-list { display: grid; gap: 0.8rem; }
.person-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem 1.1rem;
}
.person-row summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.person-row summary::-webkit-details-marker { display: none; }
.person-row summary h3 { font-size: 1.02rem; }
.person-row summary p { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.85rem; }
.person-body { display: grid; gap: 0.9rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.person-thumb { width: 40px; height: 52px; object-fit: contain; background: var(--soft); border-radius: 2px; display: inline-block; flex: none; }
.contacts { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.9rem; }
.person-card .handle { color: var(--muted); font-size: 0.8rem; margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }

.sc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr));
  gap: 0.6rem;
}
.sc-item { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.sc-item.is-selected { box-shadow: 0 0 0 2px var(--ink); border-color: var(--ink); }
.sc-item.is-hidden img { opacity: 0.35; }
.sc-item .frame { aspect-ratio: 3 / 4; background: var(--soft); display: grid; place-items: center; cursor: pointer; position: relative; overflow: hidden; }
.sc-item .meta { padding: 0.35rem 0.45rem; font-size: 0.75rem; display: grid; gap: 0.15rem; }
.sc-item .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-item .flags { position: absolute; top: 0.3rem; right: 0.3rem; display: flex; gap: 0.2rem; z-index: 2; }

dialog.sheet {
  border: 0;
  border-radius: 10px;
  padding: 1.4rem;
  width: min(92vw, 30rem);
  background: var(--card);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}
dialog.sheet::backdrop { background: rgba(29, 27, 24, 0.45); }
dialog.sheet h3 { font-family: var(--display); font-size: 1.6rem; margin-bottom: 0.8rem; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-size: 0.92rem;
  z-index: 60;
  box-shadow: var(--shadow);
  animation: rise 0.3s ease;
}

.lock-screen { max-width: 36rem; margin: 10vh auto; padding: 0 1.2rem 3rem; }
.lock-screen h1 { font-family: var(--display); font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 0.8rem; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 1rem; }
  .hero-stage { height: 68vh; order: -1; }
  .hero-text h1 { font-size: 2.8rem; }
  .console { grid-template-columns: 1fr; gap: 1rem; }
  .side { position: static; display: flex; overflow-x: auto; gap: 0.3rem; }
  .side .who { display: none; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top { gap: 0.6rem; padding: 0.7rem 1rem; }
  .brand span { display: none; }
  .brand b { font-size: 0.95rem; letter-spacing: 0.14em; }
  .nav a { padding: 0.35rem 0.55rem; font-size: 0.9rem; }
  .nav a.nav-room { margin-left: 0.1rem; }
  .stats { gap: 1.2rem; }
  .lb-stage { inset: 56px 0 32px; }
  .lb-arrow { display: none; }
  .toolbar { border-radius: 12px; top: 56px; }
  .gate { margin-top: 4vh; padding: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
