:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5d6676;
  --soft: #eef2f6;
  --line: #d9e1ea;
  --paper: #ffffff;
  --stage: #101828;
  --teal: #12b3a8;
  --coral: #e85d75;
  --amber: #d79a16;
  --blue: #3b82f6;
  --green: #178a5c;
  --shadow: 0 18px 55px rgba(16, 24, 40, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: #f7f9fc;
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, #ffffff 0, #f6f8fb 430px, #eef2f6 100%);
  color: var(--ink);
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.app {
  min-height: 100vh;
}

.preload-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.preload-shell p {
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.preload-shell p:first-child {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.preload-shell h1 {
  margin: 0;
  font-size: 52px;
  line-height: 1.02;
}

.preload-shell h2 {
  margin: 40px 0 10px;
  font-size: 28px;
  line-height: 1.15;
}

.preload-shell h3 {
  margin: 22px 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.preload-shell img {
  display: block;
  width: min(320px, 100%);
  height: auto;
  margin: 22px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--stage);
}

.preload-shell nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.preload-shell a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 820;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -42px;
  z-index: 40;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  padding: 9px 12px;
  font-weight: 800;
}

.skip-link:focus {
  top: 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(217, 225, 234, 0.92);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  width: min(1420px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  min-width: max-content;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.brand span {
  font-size: 17px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.main-nav a,
.top-action {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 11px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.main-nav a[aria-current="page"],
.main-nav a:hover,
.top-action:hover {
  border-color: var(--line);
  background: #f7f9fc;
  color: var(--ink);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.top-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}

.top-action.primary {
  border-color: #172033;
  background: #172033;
  color: white;
}

.main {
  width: min(1420px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.route-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 9px;
  font-size: clamp(32px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.25;
}

p {
  color: var(--muted);
}

.lead {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.65;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: 5px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.pill.good {
  border-color: rgba(23, 138, 92, 0.35);
  background: #edf9f3;
  color: var(--green);
}

.pill.warn {
  border-color: rgba(215, 154, 22, 0.38);
  background: #fff8e7;
  color: #8b5e05;
}

.pill.dark {
  border-color: #172033;
  background: #172033;
  color: white;
}

.plaza-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.stage {
  overflow: hidden;
  border: 1px solid #1f2937;
  border-radius: var(--radius);
  background: var(--stage);
  color: white;
  box-shadow: var(--shadow);
}

.stage-media {
  position: relative;
  display: grid;
  min-height: 510px;
  isolation: isolate;
}

.stage-media img,
.stage-media video {
  width: 100%;
  height: 100%;
  min-height: 510px;
  object-fit: cover;
  display: block;
}

.stage-media video {
  background: #111827;
}

.stage-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 24, 40, 0.05), rgba(16, 24, 40, 0.68)),
    linear-gradient(90deg, rgba(16, 24, 40, 0.78), rgba(16, 24, 40, 0.05) 65%);
  z-index: 1;
}

.stage-caption {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 28px;
  max-width: 760px;
}

.stage-caption h2 {
  margin-bottom: 10px;
  font-size: clamp(27px, 4vw, 48px);
  line-height: 1.04;
  color: white;
}

.stage-caption p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.6;
}

.stage-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(16, 24, 40, 0.96);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 13px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease;
}

.button:hover {
  border-color: #9aa8ba;
  transform: translateY(-1px);
}

.button.primary {
  border-color: #172033;
  background: #172033;
  color: white;
}

.button.coral {
  border-color: var(--coral);
  background: var(--coral);
  color: white;
}

.button.ghost {
  background: transparent;
  color: inherit;
}

.button.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.side-stack {
  display: grid;
  gap: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
}

.panel.pad {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}

.panel-header p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.channel-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.channel-tab {
  display: grid;
  gap: 6px;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 11px;
  text-decoration: none;
}

.channel-tab:hover,
.channel-tab[aria-current="page"] {
  border-color: #172033;
  box-shadow: inset 0 0 0 1px #172033;
}

.channel-tab strong {
  font-size: 14px;
  line-height: 1.2;
}

.channel-tab span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.swatch-row {
  display: flex;
  gap: 5px;
}

.swatch {
  width: 24px;
  height: 6px;
  border-radius: 999px;
}

.vote-list,
.clip-list,
.event-list,
.memory-list {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.vote-option {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.vote-option strong {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.vote-option span {
  min-width: 48px;
  border-radius: 999px;
  background: #eef2f6;
  padding: 5px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.vote-option[aria-pressed="true"] {
  border-color: var(--teal);
  background: #effcf9;
  box-shadow: inset 0 0 0 1px rgba(18, 179, 168, 0.4);
}

.generation {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}

.generation p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.5;
}

.clip-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
  color: inherit;
  text-decoration: none;
  padding: 8px;
}

.clip-card img {
  width: 104px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
  background: #172033;
}

.clip-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.clip-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.clip-tile {
  display: grid;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  text-decoration: none;
}

.clip-tile img,
.clip-tile video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #172033;
}

.clip-tile-body {
  padding: 13px;
}

.clip-tile-body p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.5;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.detail-media {
  border: 1px solid #172033;
  border-radius: var(--radius);
  overflow: hidden;
  background: #172033;
}

.detail-media img,
.detail-media video {
  width: 100%;
  min-height: 430px;
  object-fit: cover;
  display: block;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink);
  padding: 9px 10px;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.button:focus,
.vote-option:focus,
.channel-tab:focus {
  outline: 3px solid rgba(18, 179, 168, 0.24);
  outline-offset: 2px;
}

.inline-message {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.inline-message.good {
  color: var(--green);
}

.inline-message.error {
  color: #b42318;
}

.room-console {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}

.room-scene {
  min-height: 360px;
  border: 1px solid #172033;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(23, 32, 51, 0.96), rgba(39, 54, 78, 0.92)),
    #172033;
  color: white;
  padding: 26px;
}

.room-scene p {
  color: rgba(255, 255, 255, 0.78);
}

.event-item,
.memory-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
  padding: 11px;
}

.event-item p,
.memory-item p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.5;
}

.event-item strong,
.memory-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  text-transform: uppercase;
}

.price-grid,
.journey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.price-card,
.journey-card,
.test-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 16px;
}

.price-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 26px;
}

.list-plain {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.list-plain li {
  margin-bottom: 6px;
}

.age-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.66);
  backdrop-filter: blur(12px);
}

.age-dialog {
  width: min(520px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 30px 90px rgba(16, 24, 40, 0.34);
}

.age-dialog h2 {
  font-size: 28px;
}

.age-check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin: 18px 0;
  color: var(--ink);
  font-weight: 800;
}

.loading {
  min-height: 360px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--muted);
  font-weight: 850;
}

.empty {
  border: 1px dashed #adb8c7;
  border-radius: var(--radius);
  background: #fbfcfe;
  padding: 18px;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1120px) {
  .topbar-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 0;
  }

  .main-nav,
  .top-actions {
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 2px;
  }

  .plaza-layout,
  .detail-layout,
  .room-console {
    grid-template-columns: 1fr;
  }

  .stage-media,
  .stage-media img,
  .stage-media video {
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  .main {
    width: min(100% - 20px, 1420px);
    padding-top: 18px;
  }

  .route-head {
    grid-template-columns: 1fr;
  }

  .status-row {
    justify-content: flex-start;
  }

  .channel-rail {
    grid-template-columns: repeat(6, 150px);
  }

  .stage-media,
  .stage-media img,
  .stage-media video,
  .detail-media img,
  .detail-media video {
    min-height: 330px;
  }

  .stage-caption {
    padding: 18px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 38px;
  }
}
