:root {
  color-scheme: light;
  --bg: #f6fbff;
  --ink: #123047;
  --dim: #5f7484;
  --line: rgba(18, 48, 71, 0.16);
  --line-soft: rgba(18, 48, 71, 0.08);
  --red: #ff7d6e;
  --amber: #ffc857;
  --cyan: #24a8db;
  --sky: #8fdcff;
  --panel: rgba(255, 255, 255, 0.78);
  --sea: #dff5ff;
  --paper: #ffffff;
  --leaf: #54b887;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  min-height: 100vh;
  height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 16% 14%, rgba(143, 220, 255, 0.42), transparent 30%),
    radial-gradient(circle at 86% 10%, rgba(255, 200, 87, 0.28), transparent 25%),
    radial-gradient(circle at 70% 78%, rgba(84, 184, 135, 0.18), transparent 30%),
    linear-gradient(135deg, #f8fdff 0%, #dff5ff 48%, #fff6d8 100%);
  color: var(--ink);
  font-family:
    "Arial Narrow", "Roboto Condensed", Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  z-index: 14;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(180deg, rgba(248, 253, 255, 0), rgba(223, 245, 255, 0.88) 46%, rgba(255, 246, 216, 0)),
    linear-gradient(90deg, transparent, rgba(36, 168, 219, 0.16), rgba(255, 200, 87, 0.18), transparent);
  transform: translateY(28vh);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

#particle-field,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#particle-field {
  z-index: 0;
}

.scanlines {
  z-index: 20;
  opacity: 0.12;
  mix-blend-mode: multiply;
  background:
    linear-gradient(rgba(23, 34, 42, 0.05) 1px, transparent 1px) 0 0 / 100% 6px,
    linear-gradient(90deg, transparent 0, rgba(47, 143, 179, 0.06) 50%, transparent 100%);
}

.loader {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  background:
    linear-gradient(120deg, rgba(143, 220, 255, 0.54), transparent 42%),
    radial-gradient(circle at 50% 46%, rgba(255, 200, 87, 0.38), transparent 24%),
    #f8fdff;
  transition: opacity 520ms ease;
  overflow: hidden;
}

.loader.is-complete {
  opacity: 0;
  pointer-events: none;
}

.loader-curtain {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(120deg, rgba(36, 168, 219, 0.34), rgba(255, 255, 255, 0.86) 48%, rgba(255, 200, 87, 0.24)),
    repeating-linear-gradient(90deg, rgba(18, 48, 71, 0.11) 0 2px, transparent 2px 46px);
  transform-origin: right center;
  animation: curtainPulled 2200ms cubic-bezier(0.77, 0, 0.18, 1) forwards;
}

.loader-plane {
  position: absolute;
  z-index: 4;
  left: -34vw;
  top: 39%;
  width: 380px;
  height: 120px;
  animation: planePass 2200ms cubic-bezier(0.2, 0.78, 0.16, 1) forwards;
}

.loader-plane::before {
  content: "";
  position: absolute;
  left: 86px;
  top: 43px;
  width: 250px;
  height: 30px;
  border-radius: 999px 62% 62% 999px;
  background: linear-gradient(90deg, #fff, #dff5ff 58%, var(--cyan));
  box-shadow: 0 20px 52px rgba(36, 168, 219, 0.32);
}

.loader-plane::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 34px;
  width: 0;
  height: 0;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-left: 58px solid var(--cyan);
}

.loader-plane span {
  position: absolute;
  left: 154px;
  top: 12px;
  width: 104px;
  height: 88px;
  background: var(--red);
  clip-path: polygon(0 47%, 100% 0, 78% 52%, 100% 100%);
  opacity: 0.92;
}

.loader-plane i {
  position: absolute;
  left: -26vw;
  top: 24px;
  width: 34vw;
  height: 72px;
  display: block;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(143, 220, 255, 0.46) 34%, rgba(255, 255, 255, 0.9)),
    repeating-linear-gradient(90deg, rgba(18, 48, 71, 0.09) 0 2px, transparent 2px 38px);
  border: 1px solid rgba(36, 168, 219, 0.18);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  filter: drop-shadow(0 18px 30px rgba(36, 168, 219, 0.16));
}

.loader-mark {
  position: relative;
  z-index: 3;
  min-width: min(520px, calc(100vw - 40px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 28px 80px rgba(36, 168, 219, 0.16);
  text-align: center;
  animation: loaderCopyFade 1500ms ease forwards;
}

.loader-mark span,
.brand span,
.section-head p,
.kicker,
.scroll-cue,
.map-overlay span {
  color: var(--red);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

.loader-mark strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(38px, 8vw, 92px);
  line-height: 0.8;
}

.loader-bar {
  position: relative;
  z-index: 3;
  width: min(520px, calc(100vw - 40px));
  height: 7px;
  border-radius: 999px;
  background: rgba(23, 34, 42, 0.12);
  overflow: hidden;
  animation: loaderCopyFade 1500ms ease forwards;
}

.loader-bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky), var(--cyan), var(--amber), var(--red));
  transform-origin: left;
  animation: loadBar 1600ms cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.loader p {
  position: relative;
  z-index: 3;
  margin: 0;
  color: var(--dim);
  font-size: 12px;
  font-weight: 800;
  animation: loaderCopyFade 1500ms ease forwards;
}

@keyframes loadBar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes planePass {
  0% {
    transform: translateX(0) translateY(48px) rotate(-7deg);
  }
  100% {
    transform: translateX(146vw) translateY(-52px) rotate(-3deg);
  }
}

@keyframes curtainPulled {
  0% {
    clip-path: inset(0 0 0 0);
    transform: translateX(0) skewX(0deg);
  }
  44% {
    clip-path: inset(0 0 0 0);
    transform: translateX(0) skewX(0deg);
  }
  100% {
    clip-path: inset(0 0 0 100%);
    transform: translateX(28vw) skewX(-8deg);
  }
}

@keyframes loaderCopyFade {
  0%,
  62% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-14px);
  }
}

.site-frame {
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow: hidden;
}

.hud {
  position: fixed;
  z-index: 16;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 42px rgba(36, 168, 219, 0.1);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  display: grid;
  gap: 3px;
}

.brand strong {
  font-size: 18px;
  line-height: 1;
}

.hud-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-account {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.hud-nav button,
.account-link,
.language-toggle button,
.control-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.hud-nav button {
  padding: 0 15px;
  font-size: 12px;
  font-weight: 900;
}

.account-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.account-primary {
  border-color: rgba(36, 168, 219, 0.42);
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--navy));
  box-shadow: 0 12px 26px rgba(36, 168, 219, 0.18);
}

.birthday-announcement {
  width: clamp(250px, 24vw, 420px);
  min-height: 40px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 4px 5px 4px 12px;
  border: 1px solid rgba(255, 126, 110, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 216, 0.68)),
    rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 34px rgba(255, 126, 110, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.birthday-announcement-label {
  color: var(--red);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.birthday-marquee {
  position: relative;
  min-width: 0;
  display: flex;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.birthday-marquee::before,
.birthday-marquee::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 26px;
  pointer-events: none;
}

.birthday-marquee::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 249, 232, 0.98), transparent);
}

.birthday-marquee::after {
  right: 0;
  background: linear-gradient(270deg, rgba(255, 249, 232, 0.98), transparent);
}

.birthday-marquee span {
  flex: 0 0 auto;
  padding-right: 42px;
  animation: birthdayMarquee 12s linear infinite;
}

#nav-birthday {
  min-height: 32px;
  padding: 0 13px;
  color: #fff;
  border-color: rgba(255, 126, 110, 0.62);
  background: linear-gradient(135deg, var(--red), var(--amber));
}

.language-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.language-toggle button {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
}

.language-toggle button.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--ink);
}

.site-language-dock {
  position: fixed;
  z-index: 90;
  top: 84px;
  right: 34px;
}

body.is-theme-page .site-language-dock,
body.is-paper-page .site-language-dock,
body.is-cyber-page .site-language-dock,
body.is-archive-page .site-language-dock,
body.is-game-page .site-language-dock,
body.is-birthday-page .site-language-dock,
body.is-festival-page .site-language-dock {
  top: 18px;
  right: 18px;
}

body.is-birthday-page .site-language-dock,
body.is-festival-page .site-language-dock {
  display: none;
}

.hud-nav button:hover,
.account-link:hover,
.language-toggle button:hover,
.control-button:hover {
  color: #fff;
  background: var(--cyan);
  transform: translateY(-2px);
}

#nav-themes {
  position: relative;
  color: #fff;
  border-color: rgba(255, 126, 110, 0.58);
  background: linear-gradient(135deg, var(--red), var(--amber));
  box-shadow: 0 10px 28px rgba(255, 126, 110, 0.28);
  animation: themeButtonPulse 1600ms ease-in-out infinite;
}

#nav-themes:hover {
  background: linear-gradient(135deg, #111, var(--cyan));
}

@keyframes birthdayMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .birthday-marquee span {
    animation: none;
  }
}

@keyframes themeButtonPulse {
  0%,
  100% {
    box-shadow: 0 10px 28px rgba(255, 126, 110, 0.28), 0 0 0 0 rgba(255, 126, 110, 0.28);
  }
  50% {
    box-shadow: 0 14px 34px rgba(255, 126, 110, 0.36), 0 0 0 8px rgba(255, 126, 110, 0);
  }
}

.side-index {
  position: fixed;
  z-index: 15;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  justify-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 900;
}

.side-index i {
  width: 1px;
  height: 128px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(36, 168, 219, 0.55);
}

.panel {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  padding: 108px clamp(22px, 5vw, 92px) 58px;
  border-bottom: 1px solid var(--line-soft);
}

.pin-detail,
.birthday-panel,
.theme-panel,
.paper-panel,
.cyber-panel,
.archive-panel,
.game-panel,
.festival-panel {
  display: none;
}

.wp-panel {
  display: none;
}

body.is-detail-page .map-panel {
  display: none;
}

body.is-detail-page .pin-detail {
  display: grid;
}

body.is-birthday-page .map-panel {
  display: none;
}

body.is-birthday-page .birthday-panel {
  display: grid;
}

body.is-theme-page .map-panel {
  display: none;
}

body.is-theme-page .theme-panel {
  display: grid;
}

body.is-paper-page .map-panel {
  display: none;
}

body.is-paper-page .paper-panel {
  display: grid;
}

body.is-cyber-page .map-panel {
  display: none;
}

body.is-cyber-page .cyber-panel {
  display: grid;
}

body.is-archive-page .map-panel {
  display: none;
}

body.is-archive-page .archive-panel {
  display: grid;
}

body.is-game-page .map-panel {
  display: none;
}

body.is-game-page .game-panel {
  display: grid;
}

body.is-festival-page .map-panel {
  display: none;
}

body.is-festival-page .festival-panel {
  display: block;
}

.map-panel {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(22px, 3vw, 42px);
  align-items: center;
  overflow: hidden;
  scroll-margin-top: 0;
}

.map-panel::before,
.pin-detail::before,
.theme-panel::before,
.paper-panel::before,
.cyber-panel::before,
.archive-panel::before,
.game-panel::before,
.festival-panel::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(248, 253, 255, 0.72), transparent 58%, rgba(248, 253, 255, 0.46)),
    linear-gradient(0deg, rgba(248, 253, 255, 0.62), transparent 48%, rgba(248, 253, 255, 0.08));
}

.map-copy,
.map-column,
.map-shell,
.hero-actions,
.preview-wall,
.scroll-cue,
.detail-copy,
.detail-gallery,
.theme-copy,
.paper-copy,
.cyber-shell,
.section-head,
.wp-grid {
  position: relative;
  z-index: 3;
}

.map-copy {
  margin-left: clamp(0px, 2vw, 28px);
}

.map-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.kicker {
  margin: 0 0 12px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 950;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(44px, 6.8vw, 96px);
  line-height: 0.78;
  text-transform: uppercase;
}

h1 span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(36, 168, 219, 0.92);
}

.brief {
  width: min(520px, 100%);
  margin-top: 18px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  border-left: 5px solid var(--cyan);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(36, 168, 219, 0.12);
}

.brief span {
  color: var(--dim);
  font-size: 13px;
  font-weight: 800;
}

.brief strong {
  font-size: 26px;
  text-align: right;
}

.map-shell {
  min-height: min(38vh, 360px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--sea);
  box-shadow: 0 34px 100px rgba(36, 168, 219, 0.2);
  overflow: hidden;
  clip-path: none;
}

#world-map {
  width: 100%;
  height: min(38vh, 360px);
  min-height: 280px;
  background: var(--sea);
}

.leaflet-container {
  background: var(--sea);
  font: inherit;
}

.leaflet-control-attribution,
.leaflet-control-zoom {
  filter: none;
}

.leaflet-tile {
  filter: saturate(1.05) contrast(0.94) brightness(1.08) hue-rotate(8deg);
}

.pin-marker {
  position: relative;
  width: 34px;
  height: 34px;
  transform: translate(-17px, -17px);
}

.pin-marker::before,
.pin-marker::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.pin-marker::before {
  border: 2px solid rgba(36, 168, 219, 0.72);
  animation: pulse 1800ms ease-out infinite;
}

.pin-marker::after {
  inset: 10px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(36, 168, 219, 0.72);
}

.pin-marker.active::after {
  background: var(--amber);
  box-shadow: 0 0 24px rgba(230, 193, 93, 0.95);
}

@keyframes pulse {
  from {
    transform: scale(0.4);
    opacity: 0.9;
  }
  to {
    transform: scale(1.8);
    opacity: 0;
  }
}

.map-overlay {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 500;
  min-width: 210px;
  padding: 12px 14px;
  border-left: 4px solid var(--cyan);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
}

.map-overlay strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  gap: 10px;
}

.preview-wall {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.preview-copy {
  display: grid;
  gap: 8px;
}

.preview-copy .kicker {
  margin: 0;
}

.preview-copy h2 {
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: 0.88;
  overflow-wrap: anywhere;
}

#preview-description {
  width: min(680px, 100%);
  margin: 0;
  color: #43505a;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.preview-hero {
  width: 100%;
  height: clamp(260px, 38vh, 440px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 28px 90px rgba(36, 168, 219, 0.18);
}

.preview-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.04) saturate(1.06);
  transition: transform 260ms ease, filter 260ms ease;
}

.preview-hero:hover img {
  transform: scale(1.03);
  filter: contrast(1.08) saturate(1.08);
}

.preview-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.preview-thumb {
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
}

.preview-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.preview-thumb:hover img,
.preview-thumb.is-active img {
  transform: scale(1.06);
}

.preview-thumb.is-active {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(36, 168, 219, 0.18);
}

.control-button {
  min-width: 104px;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 950;
  backdrop-filter: blur(14px);
}

.control-button.primary,
.control-button.is-armed {
  border-color: var(--cyan);
  background: linear-gradient(135deg, var(--cyan), var(--sky));
  color: #fff;
}

.control-button.danger {
  color: #9d2626;
  border-color: rgba(157, 38, 38, 0.24);
  background: rgba(255, 255, 255, 0.82);
}

.control-button.danger:hover {
  color: #fff;
  border-color: transparent;
  background: #9d2626;
}

.control-button:disabled,
.control-button[hidden] {
  display: none;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  writing-mode: vertical-rl;
}

.pin-detail {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas:
    "media copy"
    "gallery gallery";
  align-items: stretch;
  gap: 18px;
  overflow: hidden;
  scroll-margin-top: 0;
}

.detail-media {
  position: relative;
  z-index: 3;
  grid-area: media;
  width: 100%;
  height: calc(100vh - 260px);
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 32px 100px rgba(36, 168, 219, 0.18);
  overflow: hidden;
}

.detail-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: contrast(1.02) saturate(1.08) brightness(1.02);
  transform: scale(1);
  transition: transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 900ms ease;
}

.detail-media.is-entering img {
  animation: detailEnter 860ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes detailEnter {
  0% {
    clip-path: inset(0 68% 0 0);
    transform: scale(1.08) translateX(-24px);
    filter: grayscale(1) contrast(1.8);
  }
  100% {
    clip-path: inset(0 0 0 0);
    transform: scale(1);
    filter: contrast(1.12) saturate(0.82);
  }
}

.detail-copy {
  grid-area: copy;
  width: 100%;
  align-self: stretch;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 5px solid var(--cyan);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(36, 168, 219, 0.12);
}

.detail-copy h2 {
  font-size: clamp(42px, 5.4vw, 78px);
  line-height: 0.86;
  overflow-wrap: anywhere;
}

#detail-description {
  width: 100%;
  color: #43505a;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.detail-back {
  margin-top: 18px;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-gallery {
  grid-area: gallery;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 60px rgba(36, 168, 219, 0.1);
}

.detail-thumb {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.detail-thumb:focus-visible {
  outline: 3px solid rgba(36, 168, 219, 0.42);
  outline-offset: 2px;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08);
  transition: transform 240ms ease;
}

.detail-thumb:hover img {
  transform: scale(1.08);
}

.theme-switcher {
  position: fixed;
  z-index: 45;
  top: 86px;
  right: clamp(18px, 3vw, 42px);
  width: min(520px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  background: rgba(247, 245, 238, 0.9);
  box-shadow: 0 24px 70px rgba(17, 17, 17, 0.14);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

body.is-theme-menu-open .theme-switcher {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.theme-chip {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  background: rgba(255, 255, 255, 0.64);
  color: #111;
  text-align: left;
  cursor: pointer;
}

.theme-chip:disabled {
  cursor: default;
  opacity: 0.48;
}

.theme-chip.is-ready:hover {
  background: #111;
  color: #f7f5ee;
}

.theme-chip.is-rhine {
  border-color: rgba(0, 166, 154, 0.34);
  background: linear-gradient(135deg, rgba(247, 255, 253, 0.95), rgba(207, 243, 238, 0.84));
  color: #083a3d;
}

.theme-chip.is-game {
  border-color: rgba(255, 115, 72, 0.45);
  background: linear-gradient(135deg, rgba(20, 27, 38, 0.96), rgba(212, 57, 52, 0.78));
  color: #fff7e8;
}

.theme-chip.is-festival {
  border-color: rgba(177, 54, 38, 0.38);
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.96), rgba(181, 37, 34, 0.18)),
    repeating-linear-gradient(90deg, rgba(122, 72, 34, 0.08) 0 1px, transparent 1px 16px);
  color: #5b1f19;
}

.theme-chip span {
  font-size: 12px;
  letter-spacing: 0.12em;
}

.theme-chip strong {
  max-width: 18ch;
  font-family: "Times New Roman", Times, serif;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.02;
}

.theme-panel {
  align-items: start;
  overflow-y: auto;
  background: #f7f5ee;
}

body.is-theme-page .hud,
body.is-paper-page .hud,
body.is-cyber-page .hud,
body.is-archive-page .hud,
body.is-game-page .hud,
body.is-birthday-page .hud,
body.is-festival-page .hud {
  display: none;
}

body.is-theme-page .theme-switcher,
body.is-paper-page .theme-switcher,
body.is-cyber-page .theme-switcher,
body.is-archive-page .theme-switcher,
body.is-game-page .theme-switcher,
body.is-birthday-page .theme-switcher,
body.is-festival-page .theme-switcher {
  display: none;
}

body.is-detail-page .journey-hero,
body.is-detail-page .chapter-panel,
body.is-birthday-page .journey-hero,
body.is-birthday-page .chapter-panel,
body.is-theme-page .journey-hero,
body.is-theme-page .chapter-panel,
body.is-paper-page .journey-hero,
body.is-paper-page .chapter-panel,
body.is-cyber-page .journey-hero,
body.is-cyber-page .chapter-panel,
body.is-archive-page .journey-hero,
body.is-archive-page .chapter-panel,
body.is-game-page .journey-hero,
body.is-game-page .chapter-panel,
body.is-festival-page .journey-hero,
body.is-festival-page .chapter-panel {
  display: none;
}

.theme-copy {
  width: min(1180px, 100%);
  margin: 0 auto;
  color: #111;
  font-family: Inter, Arial, sans-serif;
}

.theme-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(42px, 7vw, 96px);
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.18);
}

.theme-topbar a,
.theme-topbar button {
  border: 0;
  background: transparent;
  color: #111;
  font: 700 13px/1 Inter, Arial, sans-serif;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.theme-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  padding-bottom: clamp(34px, 6vw, 76px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.18);
}

.theme-eyebrow {
  margin: 0 0 18px;
  color: #6a6256;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.theme-hero h2 {
  max-width: 760px;
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(54px, 8vw, 116px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0;
}

.theme-lede {
  max-width: 720px;
  margin: 26px 0 0;
  color: #2c2924;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.55;
}

.theme-read-button {
  min-height: 48px;
  margin-top: 34px;
  padding: 0 24px;
  border: 1px solid #111;
  border-radius: 0;
  background: #111;
  color: #f7f5ee;
  font: 700 12px/1 Inter, Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.theme-hero figure {
  margin: 0;
}

.theme-hero img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  filter: grayscale(0.18) contrast(1.02);
}

.theme-hero figcaption {
  margin-top: 10px;
  color: #6a6256;
  font-size: 13px;
  line-height: 1.45;
}

.theme-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(17, 17, 17, 0.18);
  border-left: 1px solid rgba(17, 17, 17, 0.18);
  margin-top: clamp(34px, 5vw, 62px);
}

.theme-summary section {
  min-height: 300px;
  padding: clamp(20px, 3vw, 34px);
  border-right: 1px solid rgba(17, 17, 17, 0.18);
  border-bottom: 1px solid rgba(17, 17, 17, 0.18);
  background: rgba(255, 255, 255, 0.42);
}

.theme-summary span {
  display: block;
  margin-bottom: 42px;
  color: #6a6256;
  font-size: 13px;
}

.theme-summary h3,
.theme-model h3 {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.08;
}

.theme-summary p,
.theme-conclusion p {
  margin: 18px 0 0;
  color: #2c2924;
  font-size: 16px;
  line-height: 1.78;
}

.theme-model {
  display: grid;
  grid-template-columns: minmax(240px, 0.5fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  padding: clamp(34px, 6vw, 76px) 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.18);
}

.theme-model ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(17, 17, 17, 0.18);
  border-left: 1px solid rgba(17, 17, 17, 0.18);
}

.theme-model li {
  min-height: 132px;
  padding: 18px;
  border-right: 1px solid rgba(17, 17, 17, 0.18);
  border-bottom: 1px solid rgba(17, 17, 17, 0.18);
  font-size: 17px;
  line-height: 1.45;
}

.theme-conclusion {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(260px, 0.28fr);
  gap: clamp(28px, 4vw, 64px);
  padding-top: clamp(28px, 4vw, 48px);
}

.theme-sources {
  display: grid;
  gap: 12px;
  align-content: start;
  padding-left: 22px;
  border-left: 1px solid rgba(17, 17, 17, 0.18);
}

.theme-sources span {
  color: #6a6256;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.theme-sources a {
  color: #111;
  font-size: 14px;
  line-height: 1.4;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.theme-copy .control-button {
  margin-top: 34px;
  font-family: Inter, Arial, sans-serif;
}

.paper-panel {
  align-items: start;
  overflow-y: auto;
  background: #f7f5ee;
}

.birthday-panel {
  padding: 0;
  display: none;
  overflow: hidden;
  background: #fff7f9;
}

.birthday-topbar {
  position: fixed;
  z-index: 70;
  top: 18px;
  right: 18px;
  display: flex;
  justify-content: flex-end;
}

.birthday-topbar button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(101, 48, 71, 0.16);
  border-radius: 999px;
  color: #653047;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 42px rgba(160, 80, 100, 0.14);
  backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.birthday-topbar button:hover,
.birthday-topbar button:focus-visible {
  color: #fff;
  background: #b0032e;
  transform: translateY(-2px);
}

.birthday-frame {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  border: 0;
  display: block;
  background: #fff7f9;
}

.paper-copy {
  width: min(980px, 100%);
  margin: 0 auto;
  color: #111;
}

.paper-copy > h2 {
  max-width: 900px;
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 400;
  line-height: 0.98;
}

.paper-abstract {
  max-width: 820px;
  margin: 34px 0 0;
  color: #2c2924;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.58;
}

.paper-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(17, 17, 17, 0.18);
  border-left: 1px solid rgba(17, 17, 17, 0.18);
  margin-top: clamp(38px, 6vw, 72px);
}

.paper-body section {
  min-height: 260px;
  padding: clamp(22px, 3vw, 36px);
  border-right: 1px solid rgba(17, 17, 17, 0.18);
  border-bottom: 1px solid rgba(17, 17, 17, 0.18);
  background: rgba(255, 255, 255, 0.42);
}

.paper-body h3 {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.08;
}

.paper-body p {
  margin: 18px 0 0;
  color: #2c2924;
  font-size: 16px;
  line-height: 1.78;
}

.paper-sources {
  margin-top: 36px;
  padding-left: 0;
  padding-top: 22px;
  border-left: 0;
  border-top: 1px solid rgba(17, 17, 17, 0.18);
}

.cyber-panel {
  --song-primary: #36dac2;
  --song-accent: #ffc940;
  --song-hot: #f45b82;
  --song-panel: rgba(54, 218, 194, 0.08);
  align-items: start;
  overflow-y: auto;
  color: #f4fbff;
  background:
    radial-gradient(circle at 12% 14%, rgba(54, 218, 194, 0.2), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(255, 201, 64, 0.16), transparent 26%),
    linear-gradient(90deg, rgba(255, 201, 64, 0.05) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(rgba(54, 218, 194, 0.05) 1px, transparent 1px) 0 0 / 42px 42px,
    repeating-linear-gradient(178deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 14px),
    linear-gradient(135deg, #101419 0%, #1b1e24 44%, #14191d 100%);
}

.cyber-panel[data-song="rock"] {
  --song-primary: #ff6b5f;
  --song-accent: #ffd166;
  --song-hot: #ff3f63;
  --song-panel: rgba(255, 107, 95, 0.11);
}

.cyber-panel[data-song="classical"] {
  --song-primary: #d8c48f;
  --song-accent: #f3eee0;
  --song-hot: #9bb7ff;
  --song-panel: rgba(216, 196, 143, 0.12);
}

.cyber-panel[data-song="electronic"] {
  --song-primary: #55d9ff;
  --song-accent: #a987ff;
  --song-hot: #34ffb7;
  --song-panel: rgba(85, 217, 255, 0.1);
}

.cyber-panel[data-song="pop"] {
  --song-primary: #ff8fb7;
  --song-accent: #ffe66d;
  --song-hot: #65e7c3;
  --song-panel: rgba(255, 143, 183, 0.11);
}

.cyber-panel::before {
  background: none;
  opacity: 0;
}

.cyber-panel.is-playing {
  background:
    radial-gradient(circle at 12% 14%, rgba(54, 218, 194, 0.26), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(255, 201, 64, 0.2), transparent 26%),
    linear-gradient(90deg, rgba(255, 201, 64, 0.08) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(rgba(54, 218, 194, 0.08) 1px, transparent 1px) 0 0 / 42px 42px,
    repeating-linear-gradient(178deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 14px),
    linear-gradient(135deg, #111817 0%, #242126 46%, #121c20 100%);
}

.cyber-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  font-family: Inter, Arial, sans-serif;
}

.cyber-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.cyber-topbar div {
  display: grid;
  gap: 4px;
}

.cyber-topbar span,
.cyber-kicker {
  color: #36dac2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cyber-topbar strong {
  color: #fff;
  font-size: 18px;
}

.cyber-topbar button,
.studio-actions button,
.studio-presets button,
.studio-sound {
  min-height: 42px;
  border: 1px solid rgba(54, 218, 194, 0.48);
  background: rgba(54, 218, 194, 0.08);
  color: #f4fbff;
  padding: 0 16px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(54, 218, 194, 0.12);
}

.cyber-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 0.56fr);
  gap: clamp(24px, 4vw, 58px);
  align-items: end;
  padding: clamp(28px, 5vw, 58px) 0 20px;
}

.cyber-hero h2 {
  max-width: 720px;
  margin: 0;
  color: #fff;
  font-size: clamp(52px, 7vw, 108px);
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 3px 0 #f45b82, -3px 0 #36dac2, 0 14px 34px rgba(0, 0, 0, 0.38);
}

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

.cyber-status span {
  color: #ffc940;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.studio-stats div {
  min-height: 110px;
  display: grid;
  align-content: space-between;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 28px rgba(54, 218, 194, 0.04);
}

.cyber-status strong {
  overflow-wrap: anywhere;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 0.95;
}

.studio-board {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 270px;
  gap: 18px;
  align-items: start;
}

.studio-library,
.studio-arrangement,
.studio-control {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 24px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.072), rgba(255, 255, 255, 0.032));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.studio-library,
.studio-control {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.studio-panel-head {
  display: grid;
  gap: 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.studio-panel-head span,
.studio-tempo span {
  color: #36dac2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.studio-panel-head strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.08;
}

.studio-sounds {
  display: grid;
  gap: 9px;
}

.studio-sound {
  min-height: 74px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas:
    "tag name"
    "tag meta";
  gap: 2px 10px;
  align-items: center;
  text-align: left;
}

.studio-sound span {
  grid-area: tag;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 201, 64, 0.42);
  color: #ffc940;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.studio-sound strong {
  grid-area: name;
  font-size: 18px;
  line-height: 1.05;
}

.studio-sound small {
  grid-area: meta;
  color: rgba(244, 251, 255, 0.62);
  font-weight: 800;
}

.studio-sound.is-active,
.studio-sound:focus-visible {
  border-color: #ffc940;
  background: rgba(255, 201, 64, 0.13);
  box-shadow: inset 4px 0 0 #f45b82, 0 0 22px rgba(255, 201, 64, 0.12);
}

.studio-sound.is-previewing {
  transform: translateY(-1px);
  box-shadow: inset 4px 0 0 #36dac2, 0 0 26px rgba(54, 218, 194, 0.18);
}

.studio-arrangement {
  min-height: 560px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
}

.studio-grid-shell {
  overflow-x: auto;
  padding-bottom: 4px;
}

.studio-step-ruler,
.studio-track {
  display: grid;
  grid-template-columns: 86px repeat(32, minmax(38px, 1fr));
  gap: 5px;
}

.studio-step-ruler {
  margin-bottom: 6px;
}

.studio-step-ruler span {
  color: rgba(244, 251, 255, 0.5);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.studio-step-ruler span:first-child {
  text-align: left;
}

.studio-grid {
  display: grid;
  gap: 6px;
  min-width: 1440px;
}

.studio-track-label {
  min-height: 54px;
  display: grid;
  align-content: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(244, 251, 255, 0.74);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-cell {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  color: #101419;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.studio-cell:nth-child(4n + 2) {
  background: rgba(255, 255, 255, 0.07);
}

.studio-step-ruler .is-stage-start,
.studio-cell.is-stage-start {
  border-left: 2px solid rgba(255, 201, 64, 0.72);
}

.studio-step-ruler .is-stage-start {
  color: #ffc940;
}

.studio-cell.is-armed {
  border-color: rgba(255, 201, 64, 0.58);
  background: rgba(255, 201, 64, 0.1);
}

.studio-cell.is-filled {
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.18);
}

.studio-cell.is-current {
  transform: translateY(-2px);
  border-color: #ffc940;
  box-shadow: 0 0 18px rgba(255, 201, 64, 0.28), inset 0 0 0 2px rgba(255, 201, 64, 0.18);
}

.studio-cell.is-drop-target {
  border-color: #36dac2;
  background: rgba(54, 218, 194, 0.16);
}

.studio-cell[data-sound="kick"] { background: linear-gradient(135deg, #f45b82, #ffc940); }
.studio-cell[data-sound="snare"] { background: linear-gradient(135deg, #ff8fa8, #f45b82); }
.studio-cell[data-sound="clap"] { background: linear-gradient(135deg, #ffcad8, #f45b82); }
.studio-cell[data-sound="hat"] { background: linear-gradient(135deg, #fff3a8, #ffc940); }
.studio-cell[data-sound="bass"] { background: linear-gradient(135deg, #36dac2, #178c86); }
.studio-cell[data-sound="sub"] { background: linear-gradient(135deg, #101419, #36dac2); color: #f4fbff; }
.studio-cell[data-sound="pluck"] { background: linear-gradient(135deg, #78bfff, #36dac2); }
.studio-cell[data-sound="cowbell"] { background: linear-gradient(135deg, #d8ff44, #36dac2); }
.studio-cell[data-sound="chord"] { background: linear-gradient(135deg, #d7b2ff, #7d7cff); }
.studio-cell[data-sound="bell"] { background: linear-gradient(135deg, #f4fbff, #93e6ff); }
.studio-cell[data-sound="fx"] { background: linear-gradient(135deg, #cbd0d9, #767f91); }

.studio-playhead {
  height: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.studio-playhead i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #36dac2, #ffc940, #f45b82);
}

.studio-actions,
.studio-presets {
  display: grid;
  gap: 9px;
}

.studio-actions {
  grid-template-columns: 1fr 1fr;
}

.studio-actions #cyber-random {
  grid-column: 1 / -1;
}

.studio-actions button,
.studio-presets button {
  display: grid;
  place-items: center;
}

.studio-tempo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.055);
}

.studio-tempo input {
  width: 100%;
  accent-color: #ffc940;
}

.studio-tempo strong {
  min-width: 34px;
  text-align: right;
}

.studio-presets button {
  justify-content: start;
  text-align: left;
}

.studio-presets button.is-active {
  border-color: #ffc940;
  background: rgba(255, 201, 64, 0.14);
  box-shadow: inset 4px 0 0 #f45b82;
}

.cyber-panel .cyber-topbar span,
.cyber-panel .cyber-kicker,
.cyber-panel .studio-panel-head span,
.cyber-panel .studio-tempo span {
  color: var(--song-primary);
}

.cyber-panel .cyber-topbar button,
.cyber-panel .studio-actions button,
.cyber-panel .studio-presets button,
.cyber-panel .studio-sound {
  border-color: color-mix(in srgb, var(--song-primary) 48%, transparent);
  background: var(--song-panel);
  box-shadow: 0 0 22px color-mix(in srgb, var(--song-primary) 14%, transparent);
}

.cyber-panel .studio-sound.is-active,
.cyber-panel .studio-sound:focus-visible {
  border-color: var(--song-accent);
  background: color-mix(in srgb, var(--song-accent) 15%, transparent);
  box-shadow: inset 4px 0 0 var(--song-hot), 0 0 22px color-mix(in srgb, var(--song-accent) 14%, transparent);
}

.cyber-panel .studio-sound.is-previewing {
  box-shadow: inset 4px 0 0 var(--song-primary), 0 0 26px color-mix(in srgb, var(--song-primary) 22%, transparent);
}

.studio-stage-ruler {
  min-width: 1440px;
  display: grid;
  grid-template-columns: 86px repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 6px;
}

.studio-stage-ruler span,
.studio-stage-ruler strong {
  min-height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(244, 251, 255, 0.68);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.studio-stage-ruler strong {
  border-color: color-mix(in srgb, var(--song-primary) 28%, rgba(255,255,255,0.12));
  background: linear-gradient(90deg, color-mix(in srgb, var(--song-primary) 14%, transparent), rgba(255, 255, 255, 0.045));
  color: #f4fbff;
}

.studio-step-ruler span.is-downbeat {
  color: var(--song-accent);
}

.studio-step-ruler span.is-backbeat {
  color: color-mix(in srgb, var(--song-primary) 72%, #f4fbff);
}

.studio-track-label {
  gap: 7px;
}

.studio-track-label > span {
  overflow-wrap: anywhere;
}

.studio-track-controls {
  display: flex;
  gap: 6px;
}

.studio-track-toggle {
  width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 251, 255, 0.2);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(244, 251, 255, 0.68);
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
}

.studio-track-toggle.is-active {
  border-color: var(--song-accent);
  background: color-mix(in srgb, var(--song-accent) 18%, transparent);
  color: #fff;
}

.studio-track.is-solo .studio-track-label {
  border-color: var(--song-accent);
  box-shadow: inset 3px 0 0 var(--song-accent);
}

.studio-track.is-muted .studio-track-label,
.studio-track.is-dimmed .studio-track-label,
.studio-track.is-dimmed .studio-cell {
  opacity: 0.44;
}

.studio-cell.is-stage-b {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.045), color-mix(in srgb, var(--song-primary) 9%, transparent));
}

.studio-cell.is-downbeat {
  border-top-color: color-mix(in srgb, var(--song-accent) 62%, transparent);
  box-shadow: inset 0 3px 0 color-mix(in srgb, var(--song-accent) 22%, transparent);
}

.studio-cell.is-backbeat {
  border-top-color: color-mix(in srgb, var(--song-primary) 42%, transparent);
}

.cyber-panel .studio-step-ruler .is-stage-start,
.cyber-panel .studio-cell.is-stage-start {
  border-left-color: color-mix(in srgb, var(--song-accent) 72%, transparent);
}

.cyber-panel .studio-step-ruler .is-stage-start {
  color: var(--song-accent);
}

.cyber-panel .studio-cell.is-current {
  border-color: var(--song-accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--song-accent) 32%, transparent), inset 0 0 0 2px color-mix(in srgb, var(--song-accent) 22%, transparent);
}

.cyber-panel .studio-cell.is-drop-target {
  border-color: var(--song-primary);
  background: color-mix(in srgb, var(--song-primary) 18%, transparent);
}

.studio-cell[data-sound="guitar"] { background: linear-gradient(135deg, #ff6b5f, #ffd166); }
.studio-cell[data-sound="piano"] { background: linear-gradient(135deg, #f3eee0, #d8c48f); }
.studio-cell[data-sound="strings"] { background: linear-gradient(135deg, #d8c48f, #9bb7ff); }
.studio-cell[data-sound="arp"] { background: linear-gradient(135deg, #55d9ff, #34ffb7); }
.studio-cell[data-sound="synth"] { background: linear-gradient(135deg, #a987ff, #55d9ff); }
.studio-cell[data-sound="keys"] { background: linear-gradient(135deg, #ffe66d, #ff8fb7); }
.studio-cell[data-sound="vocal"] { background: linear-gradient(135deg, #ff8fb7, #f45b82); }

.studio-actions #cyber-random,
.studio-actions #cyber-fill {
  grid-column: auto;
}

.studio-actions #cyber-fill.is-hot {
  border-color: var(--song-accent);
  background: color-mix(in srgb, var(--song-accent) 18%, transparent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--song-accent) 36%, transparent);
}

.studio-presets button {
  min-height: 92px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "tag bpm"
    "name bpm"
    "mood mood";
  gap: 4px 10px;
  justify-content: stretch;
  align-content: center;
  place-items: stretch;
  padding: 12px;
}

.cyber-panel .studio-presets button.is-active {
  border-color: var(--song-accent);
  background: color-mix(in srgb, var(--song-accent) 13%, transparent);
  box-shadow: inset 4px 0 0 var(--song-hot), 0 0 24px color-mix(in srgb, var(--song-accent) 16%, transparent);
}

.studio-presets button span {
  grid-area: tag;
  color: var(--song-primary);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.studio-presets button strong {
  grid-area: name;
  color: #fff;
  font-size: 18px;
  line-height: 1.05;
}

.studio-presets button small {
  grid-area: mood;
  color: rgba(244, 251, 255, 0.62);
  font-size: 11px;
  line-height: 1.28;
  letter-spacing: 0.02em;
  text-transform: none;
}

.studio-presets button em {
  grid-area: bpm;
  align-self: center;
  color: var(--song-accent);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.cyber-panel:not(.is-playing) #cyber-play,
.cyber-panel:not(.is-playing) .studio-presets button.is-active {
  animation: cyberCallPulse 1.6s ease-in-out infinite;
}

@keyframes cyberCallPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--song-accent) 0%, transparent), inset 4px 0 0 var(--song-hot);
  }
  50% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--song-accent) 16%, transparent), 0 0 26px color-mix(in srgb, var(--song-accent) 24%, transparent), inset 4px 0 0 var(--song-hot);
  }
}

.cyber-sequencer {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.22);
}

#cyber-steps {
  display: grid;
  grid-template-columns: repeat(32, minmax(0, 1fr));
  gap: 4px;
}

.cyber-step {
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.cyber-step.is-filled {
  background: color-mix(in srgb, var(--song-primary) 30%, transparent);
}

.cyber-step.is-stage-start {
  border-left-color: var(--song-accent);
}

.cyber-step.is-stage-b {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.03), color-mix(in srgb, var(--song-primary) 12%, transparent));
}

.cyber-step.is-downbeat {
  border-top-color: var(--song-accent);
}

.cyber-step.is-lit {
  background: var(--song-accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--song-accent) 58%, transparent);
}

.archive-panel {
  align-items: start;
  min-height: 100vh;
  overflow-y: auto;
  color: #12231f;
  background:
    radial-gradient(circle at 85% 9%, rgba(112, 229, 196, 0.32), transparent 24%),
    radial-gradient(circle at 12% 78%, rgba(230, 182, 91, 0.22), transparent 25%),
    linear-gradient(115deg, transparent 0 20%, rgba(255, 255, 255, 0.52) 20% 28%, transparent 28% 62%, rgba(127, 209, 184, 0.2) 62% 68%, transparent 68%),
    repeating-linear-gradient(180deg, rgba(8, 35, 31, 0.04) 0 1px, transparent 1px 9px),
    linear-gradient(135deg, #f5faf5 0%, #e8f1ea 56%, #d8e8de 100%);
}

.archive-panel::before {
  background:
    linear-gradient(90deg, rgba(7, 24, 23, 0.08), transparent 42%, rgba(37, 160, 139, 0.16)),
    repeating-linear-gradient(0deg, rgba(16, 52, 47, 0.12) 0 1px, transparent 1px 20px),
    linear-gradient(rgba(14, 76, 64, 0.08) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, rgba(14, 76, 64, 0.08) 1px, transparent 1px) 0 0 / 42px 42px;
  opacity: 0.82;
}

body.is-archive-page .archive-panel::after {
  content: "ACCESS GRANTED";
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #f4fff9;
  background:
    linear-gradient(90deg, transparent 0 7%, rgba(102, 226, 188, 0.38) 7% 8%, transparent 8% 100%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 7px),
    #10211f;
  font-size: clamp(34px, 8vw, 98px);
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: rhineAccessGate 1180ms cubic-bezier(0.2, 0.7, 0.22, 1) forwards;
}

.archive-shell {
  position: relative;
  z-index: 2;
  width: min(1320px, 100%);
  margin: 0 auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.archive-shell::before {
  content: "INTERNAL DATABASE";
  position: absolute;
  z-index: 0;
  right: 0;
  top: 74px;
  color: rgba(23, 78, 70, 0.055);
  font-size: clamp(76px, 13vw, 178px);
  font-weight: 950;
  line-height: 0.76;
  pointer-events: none;
}

.archive-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(15, 54, 48, 0.28);
  background:
    linear-gradient(90deg, #10211f, #152b28 58%, #29423c),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
  box-shadow: 0 22px 46px rgba(13, 32, 29, 0.12);
}

.archive-topbar div,
.rhine-section-heading,
.rhine-operator-head {
  display: grid;
  gap: 6px;
}

.archive-topbar span,
.archive-card span,
.archive-id p,
.rhine-section-heading span,
.rhine-operator-head span,
.rhine-profile-detail > span {
  color: #2fb695;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.archive-topbar strong {
  color: #f6fff9;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.archive-topbar button {
  min-height: 44px;
  border: 1px solid rgba(135, 236, 202, 0.58);
  background: rgba(244, 255, 249, 0.08);
  color: #f6fff9;
  padding: 0 18px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.archive-topbar button:hover,
.archive-topbar button:focus-visible {
  background: #82e7c8;
  color: #10211f;
}

.archive-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
  gap: clamp(18px, 3vw, 32px);
  align-items: stretch;
  padding: 22px 0 18px;
}

.archive-id {
  min-height: 560px;
  display: grid;
  align-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(20, 70, 62, 0.28);
  border-left: 8px solid #6ee4c1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(235, 247, 239, 0.78)),
    repeating-linear-gradient(90deg, rgba(29, 91, 80, 0.06) 0 1px, transparent 1px 26px);
  box-shadow: 0 32px 70px rgba(11, 38, 34, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(1.16);
}

.rhine-access-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(520px, 100%);
  min-height: 40px;
  padding: 0 14px;
  color: #f3fff8;
  background: #10211f;
  box-shadow: inset 5px 0 0 #e0c06b;
}

.rhine-access-line span,
.rhine-access-line b {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.rhine-access-line b {
  color: #8df0ce;
  text-align: right;
}

.archive-panel.is-accessing .rhine-access-line {
  animation: rhinePulse 820ms ease-in-out 2;
}

.archive-id h2 {
  margin: 0;
  color: #0d2421;
  font-size: clamp(76px, 10.6vw, 154px);
  line-height: 0.86;
  letter-spacing: 0;
}

.rhine-statement {
  display: block;
  width: fit-content;
  margin-top: -10px;
  padding: 10px 14px;
  color: #10211f;
  background: #e3c36b;
  font-size: clamp(16px, 2vw, 27px);
  font-weight: 950;
  line-height: 1.1;
}

.archive-id dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.archive-id dl div,
.archive-card,
.archive-timeline div,
.rhine-section-grid article,
.rhine-profile-detail {
  border: 1px solid rgba(20, 70, 62, 0.24);
  background: rgba(250, 255, 250, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(1.14);
}

.archive-id dt,
.rhine-profile-detail dt {
  color: rgba(13, 36, 33, 0.56);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-id dd,
.rhine-profile-detail dd {
  margin: 6px 0 0;
  color: #10211f;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.16;
}

.archive-id dl div {
  padding: 14px;
}

.archive-portrait {
  position: relative;
  min-height: 560px;
  display: grid;
  align-content: end;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(15, 54, 48, 0.32);
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.14) 0 12%, transparent 12% 30%, rgba(131, 232, 202, 0.14) 30% 39%, transparent 39%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 13px),
    radial-gradient(circle at 50% 28%, rgba(111, 239, 205, 0.22), transparent 38%),
    linear-gradient(180deg, #152b28, #071a18);
  box-shadow: 0 32px 70px rgba(11, 38, 34, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.archive-portrait::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 14px;
  pointer-events: none;
  border: 1px solid rgba(132, 238, 205, 0.28);
  background:
    linear-gradient(100deg, transparent 0 35%, rgba(255, 255, 255, 0.28) 38%, transparent 45%),
    linear-gradient(180deg, transparent 0 72%, rgba(132, 238, 205, 0.13) 72% 100%);
  mix-blend-mode: screen;
}

.rhine-logo-mark {
  position: absolute;
  z-index: 0;
  left: 22px;
  top: 12px;
  color: rgba(132, 238, 205, 0.12);
  font-size: clamp(120px, 18vw, 248px);
  font-weight: 950;
  line-height: 0.86;
}

.archive-portrait img {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 0;
  width: auto;
  height: min(540px, calc(100% - 26px));
  max-width: 118%;
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(-50%);
  filter: drop-shadow(0 34px 42px rgba(0, 0, 0, 0.34));
}

.archive-scan {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 8px;
  padding: 18px;
  border-left: 6px solid #7be4c8;
  background: rgba(244, 255, 249, 0.9);
  box-shadow: 0 22px 46px rgba(1, 19, 16, 0.24);
  backdrop-filter: blur(18px) saturate(1.25);
}

.archive-scan b {
  color: #10211f;
  font-size: 24px;
}

.archive-scan small {
  color: rgba(13, 36, 33, 0.66);
  font-weight: 850;
  letter-spacing: 0.06em;
}

.archive-grid,
.archive-timeline,
.rhine-section-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.archive-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.archive-card {
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}

.archive-main {
  grid-column: span 2;
}

.archive-card h3,
.rhine-section-heading h3,
.rhine-operator-head h3,
.rhine-profile-detail h3 {
  margin: 0;
  color: #0d2421;
  font-size: clamp(26px, 3vw, 45px);
  line-height: 0.98;
}

.archive-card p,
.archive-timeline p,
.rhine-section-grid p,
.rhine-operator-head p,
.rhine-profile-detail p {
  margin: 0;
  color: rgba(13, 36, 33, 0.68);
  line-height: 1.64;
}

.rhine-sections,
.rhine-operator-deck {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  padding-top: 18px;
}

.rhine-section-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rhine-section-grid article {
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
}

.rhine-section-grid span,
.archive-timeline span {
  color: #1ba383;
  font-weight: 950;
}

.rhine-section-grid strong {
  color: #0d2421;
  font-size: 18px;
  line-height: 1.08;
}

.rhine-operator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(340px, 0.84fr);
  gap: 12px;
}

.rhine-operator-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rhine-profile {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(15, 54, 48, 0.22);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.76), rgba(232, 246, 238, 0.72)),
    repeating-linear-gradient(90deg, rgba(12, 68, 58, 0.05) 0 1px, transparent 1px 18px);
  color: #12231f;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, color 180ms ease;
}

.rhine-profile span {
  color: #1ba383;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.rhine-profile strong {
  font-size: 20px;
  line-height: 1.02;
}

.rhine-profile small {
  color: rgba(13, 36, 33, 0.58);
  font-weight: 820;
}

.rhine-profile:hover,
.rhine-profile:focus-visible,
.rhine-profile.is-active {
  border-color: rgba(98, 226, 188, 0.72);
  background:
    linear-gradient(90deg, #10211f, #17352f),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 18px);
  color: #f5fff9;
  transform: translateY(-2px);
}

.rhine-profile:hover small,
.rhine-profile:focus-visible small,
.rhine-profile.is-active small {
  color: rgba(245, 255, 249, 0.66);
}

.rhine-profile-detail {
  position: sticky;
  top: 96px;
  min-height: 458px;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: clamp(24px, 3vw, 36px);
  border-left: 8px solid #e3c36b;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(235, 247, 239, 0.78)),
    repeating-linear-gradient(180deg, rgba(15, 54, 48, 0.05) 0 1px, transparent 1px 18px);
}

.rhine-profile-detail.is-refreshing {
  animation: rhineDetailRefresh 260ms ease both;
}

.rhine-profile-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.rhine-profile-detail dl div {
  padding: 14px;
  border: 1px solid rgba(15, 54, 48, 0.14);
  background: rgba(255, 255, 255, 0.55);
}

.archive-timeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px 0 0;
}

.archive-timeline div {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.archive-timeline strong {
  color: #0d2421;
  font-size: 22px;
}

body.is-archive-page .archive-topbar,
body.is-archive-page .archive-id,
body.is-archive-page .archive-portrait,
body.is-archive-page .archive-card,
body.is-archive-page .rhine-section-grid article,
body.is-archive-page .rhine-profile,
body.is-archive-page .rhine-profile-detail,
body.is-archive-page .archive-timeline div {
  animation: rhineDataIn 640ms ease both;
}

body.is-archive-page .archive-id { animation-delay: 90ms; }
body.is-archive-page .archive-portrait { animation-delay: 150ms; }
body.is-archive-page .archive-card:nth-child(1) { animation-delay: 220ms; }
body.is-archive-page .archive-card:nth-child(2) { animation-delay: 270ms; }
body.is-archive-page .archive-card:nth-child(3) { animation-delay: 320ms; }
body.is-archive-page .archive-card:nth-child(4) { animation-delay: 370ms; }
body.is-archive-page .rhine-section-grid article { animation-delay: 420ms; }
body.is-archive-page .rhine-profile { animation-delay: 500ms; }
body.is-archive-page .rhine-profile-detail { animation-delay: 560ms; }
body.is-archive-page .archive-timeline div { animation-delay: 620ms; }

@keyframes rhineAccessGate {
  0% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateX(0);
  }
  46% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
  72% {
    opacity: 0.82;
    clip-path: inset(0 0 0 38%);
  }
  100% {
    opacity: 0;
    clip-path: inset(0 0 0 100%);
  }
}

@keyframes rhineDataIn {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes rhinePulse {
  0%, 100% { box-shadow: inset 5px 0 0 #e0c06b; }
  50% { box-shadow: inset 5px 0 0 #7be4c8, 0 0 28px rgba(123, 228, 200, 0.42); }
}

@keyframes rhineDetailRefresh {
  0% { opacity: 0.52; transform: translateX(10px); }
  100% { opacity: 1; transform: translateX(0); }
}

.archive-panel {
  align-items: start;
  min-height: 100vh;
  color: #111512;
  overflow-y: auto;
  background:
    linear-gradient(90deg, rgba(18, 22, 18, 0.08) 0 1px, transparent 1px 100%) 16.66% 0 / 1px 100% no-repeat,
    linear-gradient(90deg, transparent 0 52%, rgba(200, 220, 66, 0.2) 52% 52.6%, transparent 52.6%),
    repeating-linear-gradient(0deg, rgba(15, 18, 15, 0.025) 0 1px, transparent 1px 14px),
    #f4f4ef;
}

.archive-panel::before {
  background:
    linear-gradient(120deg, transparent 0 48%, rgba(255, 255, 255, 0.68) 48% 62%, transparent 62%),
    linear-gradient(90deg, rgba(17, 21, 18, 0.04) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(17, 21, 18, 0.035) 1px, transparent 1px) 0 0 / 48px 48px;
  opacity: 1;
}

body.is-archive-page .archive-panel::after {
  content: "ANALYSIS OS";
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #111512;
  background:
    linear-gradient(90deg, transparent 0 49.8%, #b7ff2d 49.8% 50.2%, transparent 50.2%),
    repeating-linear-gradient(0deg, rgba(17, 21, 18, 0.05) 0 1px, transparent 1px 9px),
    #f7f7f2;
  font-size: clamp(34px, 8vw, 104px);
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: rhineAccessGate 1050ms cubic-bezier(0.2, 0.7, 0.22, 1) forwards;
}

.rhine-os-shell {
  position: relative;
  z-index: 2;
  width: min(1440px, 100%);
  display: grid;
  gap: 26px;
  padding-bottom: 58px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rhine-os-shell::before {
  content: "RHINE LAB";
  position: absolute;
  z-index: 0;
  right: 2vw;
  top: 170px;
  color: rgba(17, 21, 18, 0.035);
  font-size: clamp(96px, 15vw, 220px);
  font-weight: 950;
  line-height: 0.78;
  pointer-events: none;
}

.rhine-os-topbar {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: end;
  gap: 18px;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid rgba(17, 21, 18, 0.22);
  background: transparent;
  box-shadow: none;
}

.rhine-os-topbar div {
  display: grid;
  gap: 2px;
}

.rhine-os-topbar span,
.archive-card span,
.rhine-section-heading span,
.rhine-operator-head span,
.rhine-profile-detail > span {
  color: #111512;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rhine-os-topbar strong {
  color: #111512;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.rhine-os-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.rhine-os-topbar button,
.rhine-find-operator {
  min-height: 42px;
  border: 1px solid rgba(17, 21, 18, 0.28);
  background: rgba(255, 255, 255, 0.42);
  color: #111512;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.rhine-os-topbar button:hover,
.rhine-os-topbar button:focus-visible,
.rhine-find-operator:hover,
.rhine-find-operator:focus-visible {
  border-color: #111512;
  background: #111512;
  color: #f6f6f0;
  transform: translateY(-1px);
}

.rhine-os-nav button {
  min-width: 92px;
}

.rhine-os-home {
  position: relative;
  z-index: 2;
  min-height: clamp(560px, calc(100vh - 190px), 760px);
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 54px);
  align-items: stretch;
}

.rhine-os-brand {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 52px 26px 32px 0;
  border-right: 2px solid rgba(17, 21, 18, 0.54);
}

.rhine-os-brand::before {
  content: "";
  position: absolute;
  right: -7px;
  top: 184px;
  width: 14px;
  height: 14px;
  background: #b7ff2d;
  box-shadow: 0 0 22px rgba(183, 255, 45, 0.58);
}

.rhine-os-brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 82px;
  width: 52%;
  height: 1px;
  background: #111512;
}

.rhine-os-brand h2 {
  margin: 0;
  color: #111512;
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: 0;
}

.rhine-os-brand span,
.rhine-os-brand strong,
.rhine-os-brand small {
  color: #111512;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rhine-os-brand span {
  font-size: 15px;
}

.rhine-os-brand strong {
  font-size: clamp(24px, 3.1vw, 42px);
}

.rhine-os-brand i {
  width: 12px;
  height: 2px;
  margin: 72px 0 8px;
  background: #111512;
}

.rhine-os-brand small {
  display: inline-block;
  width: fit-content;
  padding: 2px 8px;
  color: #f6f6f0;
  background: #111512;
  font-size: 8px;
}

.rhine-os-visual {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(17, 21, 18, 0.18);
  background:
    linear-gradient(90deg, rgba(17, 21, 18, 0.05) 1px, transparent 1px) 0 0 / 62px 62px,
    linear-gradient(rgba(17, 21, 18, 0.04) 1px, transparent 1px) 0 0 / 62px 62px,
    radial-gradient(circle at 68% 44%, rgba(210, 188, 152, 0.34), transparent 24%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.5) 0 34%, rgba(226, 226, 216, 0.62) 34% 46%, rgba(255, 255, 255, 0.78) 46% 100%);
  box-shadow: inset 0 0 0 14px rgba(255, 255, 255, 0.4);
}

.rhine-os-visual::before {
  content: "";
  position: absolute;
  inset: 7% 4% 8% 30%;
  border: 4px solid rgba(17, 21, 18, 0.08);
  background:
    repeating-linear-gradient(135deg, rgba(226, 176, 77, 0.78) 0 8px, transparent 8px 18px) 9% 28% / 160px 92px no-repeat,
    linear-gradient(90deg, rgba(17, 21, 18, 0.08), transparent 40%) 0 18% / 300px 16px no-repeat,
    linear-gradient(90deg, rgba(17, 21, 18, 0.13), transparent 70%) 0 84% / 430px 12px no-repeat;
}

.rhine-os-visual::after {
  content: "";
  position: absolute;
  right: 8%;
  top: 16%;
  width: 280px;
  height: 380px;
  opacity: 0.34;
  background:
    radial-gradient(circle, rgba(17, 21, 18, 0.13) 2px, transparent 3px) 0 0 / 26px 30px,
    linear-gradient(60deg, transparent 45%, rgba(17, 21, 18, 0.14) 45% 46%, transparent 46% 100%) 0 0 / 52px 30px,
    linear-gradient(120deg, transparent 45%, rgba(17, 21, 18, 0.14) 45% 46%, transparent 46% 100%) 0 0 / 52px 30px;
}

.rhine-os-left-card {
  position: absolute;
  z-index: 2;
  left: clamp(22px, 5vw, 78px);
  top: 36%;
  width: min(300px, 28vw);
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: #f6f6f0;
  background:
    linear-gradient(rgba(183, 255, 45, 0.1), rgba(183, 255, 45, 0)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 8px),
    #101713;
  box-shadow: 0 22px 42px rgba(17, 21, 18, 0.16);
}

.rhine-os-left-card span {
  color: #fff;
  font-size: clamp(46px, 6vw, 86px);
  font-weight: 950;
  line-height: 0.8;
  letter-spacing: 0;
}

.rhine-os-left-card strong {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.rhine-molecule {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.rhine-molecule i {
  position: absolute;
  width: clamp(50px, 5vw, 82px);
  height: clamp(50px, 5vw, 82px);
  border: 2px solid rgba(156, 137, 106, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.94), rgba(213, 196, 166, 0.72) 54%, rgba(137, 118, 91, 0.22));
  box-shadow: inset 0 12px 24px rgba(255, 255, 255, 0.62), 0 16px 32px rgba(95, 80, 58, 0.18);
}

.rhine-molecule i:nth-child(1) { left: 46%; top: 26%; }
.rhine-molecule i:nth-child(2) { left: 63%; top: 36%; }
.rhine-molecule i:nth-child(3) { left: 55%; top: 58%; }
.rhine-molecule i:nth-child(4) { left: 76%; top: 22%; }
.rhine-molecule i:nth-child(5) { left: 72%; top: 58%; }

.rhine-molecule b {
  position: absolute;
  z-index: 0;
  height: 9px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(151, 129, 94, 0.18), rgba(255, 255, 255, 0.82), rgba(151, 129, 94, 0.2));
  box-shadow: 0 0 0 1px rgba(151, 129, 94, 0.08);
  transform-origin: left center;
}

.rhine-molecule b:nth-of-type(1) { left: 51%; top: 35%; width: 210px; transform: rotate(28deg); }
.rhine-molecule b:nth-of-type(2) { left: 66%; top: 44%; width: 150px; transform: rotate(-42deg); }
.rhine-molecule b:nth-of-type(3) { left: 60%; top: 62%; width: 160px; transform: rotate(16deg); }
.rhine-molecule b:nth-of-type(4) { left: 59%; top: 41%; width: 140px; transform: rotate(94deg); }

.rhine-visual-title {
  position: absolute;
  z-index: 3;
  left: 56%;
  top: 50%;
  transform: translate(-12%, -50%);
  display: grid;
  gap: 8px;
}

.rhine-visual-title span {
  width: fit-content;
  padding: 5px 12px;
  color: rgba(17, 21, 18, 0.58);
  background: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rhine-visual-title h3 {
  width: fit-content;
  margin: 0;
  padding: 8px 14px 10px;
  color: #fff;
  background: #101713;
  font-size: clamp(28px, 3.7vw, 62px);
  font-weight: 950;
  line-height: 0.86;
  text-transform: uppercase;
  box-shadow: 12px 12px 0 rgba(17, 21, 18, 0.08);
}

.rhine-visual-title h3::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 58px;
  margin: 0 14px -12px 0;
  background: #101713;
  transform: translateX(-28px);
}

.rhine-visual-title p {
  max-width: 440px;
  margin: 0 0 0 18px;
  color: rgba(17, 21, 18, 0.58);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.rhine-access-stack {
  position: absolute;
  z-index: 3;
  right: 6%;
  top: 12%;
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.rhine-access-stack span,
.rhine-access-stack strong,
.rhine-access-stack em,
.rhine-powered,
.rhine-section-switcher button {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rhine-access-stack span {
  padding: 4px 10px;
  border: 1px solid rgba(17, 21, 18, 0.34);
  color: rgba(17, 21, 18, 0.62);
  background: rgba(255, 255, 255, 0.58);
}

.rhine-access-stack strong,
.rhine-access-stack em {
  display: block;
  min-width: 170px;
  padding: 4px 10px;
  color: #f6f6f0;
  background: #58605a;
}

.rhine-access-stack em {
  min-width: 124px;
  color: #101713;
  background: #b7ff2d;
  font-style: normal;
}

.rhine-section-switcher {
  position: absolute;
  z-index: 4;
  left: 42px;
  bottom: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rhine-section-switcher button {
  min-height: 32px;
  border: 1px solid rgba(17, 21, 18, 0.26);
  background: rgba(255, 255, 255, 0.68);
  color: #111512;
  padding: 0 12px;
  cursor: pointer;
}

.rhine-section-switcher button:hover,
.rhine-section-switcher button:focus-visible,
.rhine-section-switcher button.is-active {
  border-color: #101713;
  background: #101713;
  color: #f6f6f0;
  box-shadow: inset 0 -4px 0 #b7ff2d;
}

.rhine-powered {
  position: absolute;
  right: 30px;
  bottom: 28px;
  color: #111512;
}

.rhine-powered::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 4px;
  margin-left: 12px;
  background: #101713;
  vertical-align: middle;
}

.archive-grid,
.archive-timeline,
.rhine-section-grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
}

.archive-grid {
  grid-template-columns: 1.4fr repeat(3, 1fr);
}

.archive-card,
.archive-timeline div,
.rhine-section-grid article,
.rhine-profile-detail {
  border: 1px solid rgba(17, 21, 18, 0.18);
  background:
    linear-gradient(90deg, rgba(183, 255, 45, 0.14) 0 6px, transparent 6px),
    rgba(255, 255, 255, 0.48);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.archive-card {
  min-height: 214px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px 22px 22px 28px;
}

.archive-main {
  grid-column: auto;
}

.archive-card h3,
.rhine-section-heading h3,
.rhine-operator-head h3,
.rhine-profile-detail h3 {
  margin: 0;
  color: #111512;
  font-size: clamp(24px, 2.6vw, 42px);
  font-weight: 950;
  line-height: 0.98;
}

.archive-card p,
.archive-timeline p,
.rhine-section-grid p,
.rhine-operator-head p,
.rhine-profile-detail p {
  margin: 0;
  color: rgba(17, 21, 18, 0.66);
  font-weight: 700;
  line-height: 1.58;
}

.rhine-sections,
.rhine-operator-deck {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 16px;
  padding-top: 14px;
}

.rhine-section-heading,
.rhine-operator-head {
  display: grid;
  gap: 8px;
  border-left: 12px solid #101713;
  padding-left: 16px;
}

.rhine-operator-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.rhine-operator-head span,
.rhine-operator-head h3 {
  grid-column: 1;
}

.rhine-find-operator {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  background: #b7ff2d;
}

.rhine-section-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rhine-section-grid article {
  min-height: 184px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
}

.rhine-section-grid span,
.archive-timeline span,
.rhine-profile span {
  color: #101713;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.rhine-section-grid strong,
.archive-timeline strong {
  color: #101713;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.04;
}

.rhine-operator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.68fr);
  gap: 12px;
}

.rhine-operator-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rhine-profile {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid rgba(17, 21, 18, 0.18);
  background: rgba(255, 255, 255, 0.48);
  color: #111512;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, color 180ms ease;
}

.rhine-profile strong {
  color: currentColor;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.02;
}

.rhine-profile small {
  color: rgba(17, 21, 18, 0.58);
  font-weight: 800;
}

.rhine-profile:hover,
.rhine-profile:focus-visible,
.rhine-profile.is-active {
  border-color: #101713;
  background:
    linear-gradient(90deg, #b7ff2d 0 7px, transparent 7px),
    #101713;
  color: #f6f6f0;
  transform: translateY(-2px);
}

.rhine-profile:hover span,
.rhine-profile:focus-visible span,
.rhine-profile.is-active span {
  color: #b7ff2d;
}

.rhine-profile:hover small,
.rhine-profile:focus-visible small,
.rhine-profile.is-active small {
  color: rgba(246, 246, 240, 0.66);
}

.rhine-profile-detail {
  position: sticky;
  top: 94px;
  min-height: 510px;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: clamp(22px, 3vw, 34px);
  border-left: 12px solid #101713;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(236, 236, 228, 0.66)),
    repeating-linear-gradient(0deg, rgba(17, 21, 18, 0.04) 0 1px, transparent 1px 12px);
}

.rhine-profile-detail.is-refreshing {
  animation: rhineDetailRefresh 260ms ease both;
}

.rhine-profile-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.rhine-profile-detail dl div {
  padding: 13px;
  border: 1px solid rgba(17, 21, 18, 0.12);
  background: rgba(255, 255, 255, 0.56);
}

.rhine-profile-detail dt {
  color: rgba(17, 21, 18, 0.56);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rhine-profile-detail dd {
  margin: 5px 0 0;
  color: #101713;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.15;
}

.rhine-profile-media-grid {
  margin: -12px -12px 0;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10px;
}

.rhine-profile-media {
  margin: -12px -12px 0;
  min-height: 280px;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border: 1px solid rgba(17, 21, 18, 0.14);
  background:
    linear-gradient(135deg, transparent 0 45%, rgba(183, 255, 45, 0.28) 45% 52%, transparent 52%),
    radial-gradient(circle at 50% 26%, rgba(183, 255, 45, 0.18), transparent 38%),
    #101713;
}

.rhine-profile-media-grid .rhine-profile-media {
  margin: 0;
}

.rhine-profile-media img {
  width: min(100%, 330px);
  max-height: 330px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.32));
}

.rhine-profile-countdown-art {
  place-items: center;
  background:
    linear-gradient(135deg, rgba(183, 255, 45, 0.28), rgba(255, 255, 255, 0.86)),
    #f4f6ed;
}

.rhine-profile-countdown-art img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05) contrast(1.02);
}

.archive-timeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 10px 0 0;
}

.archive-timeline div {
  display: grid;
  gap: 10px;
  padding: 18px;
}

body.is-archive-page .rhine-os-topbar,
body.is-archive-page .rhine-os-brand,
body.is-archive-page .rhine-os-visual,
body.is-archive-page .archive-card,
body.is-archive-page .rhine-section-grid article,
body.is-archive-page .rhine-profile,
body.is-archive-page .rhine-profile-detail,
body.is-archive-page .archive-timeline div {
  animation: rhineDataIn 640ms ease both;
}

body.is-archive-page .rhine-os-brand { animation-delay: 80ms; }
body.is-archive-page .rhine-os-visual { animation-delay: 120ms; }
body.is-archive-page .archive-card:nth-child(1) { animation-delay: 210ms; }
body.is-archive-page .archive-card:nth-child(2) { animation-delay: 250ms; }
body.is-archive-page .archive-card:nth-child(3) { animation-delay: 290ms; }
body.is-archive-page .archive-card:nth-child(4) { animation-delay: 330ms; }
body.is-archive-page .rhine-section-grid article { animation-delay: 380ms; }
body.is-archive-page .rhine-profile { animation-delay: 460ms; }
body.is-archive-page .rhine-profile-detail { animation-delay: 520ms; }
body.is-archive-page .archive-timeline div { animation-delay: 580ms; }

.game-panel {
  min-height: 100vh;
  overflow-y: auto;
  align-items: start;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 205, 216, 0.34), transparent 28%),
    radial-gradient(circle at 84% 16%, rgba(139, 185, 220, 0.2), transparent 30%),
    linear-gradient(135deg, #e9eef1 0%, #b8c2c8 48%, #7d858b 100%);
  color: #f7fbfc;
}

.game-shell {
  width: min(1680px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.game-topbar,
.game-briefing,
.game-contracts,
.game-board-wrap {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(23, 31, 38, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 30px 90px rgba(24, 31, 38, 0.32);
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
}

.game-topbar span,
.game-title p,
.game-stats span,
.game-contract span {
  display: block;
  color: #ffd1dc;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.game-topbar strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  letter-spacing: 0.08em;
}

.game-topbar button,
.game-start,
.game-reset {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #f7efe2;
  padding: 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.game-briefing {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 14px;
  align-items: center;
  padding: clamp(14px, 2vw, 22px);
  border-left: 5px solid #f3a7b7;
}

.game-title h2 {
  margin: 8px 0 0;
  max-width: 920px;
  font-size: clamp(36px, 4.8vw, 76px);
  line-height: 0.94;
  letter-spacing: 0;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.game-stats div {
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(255, 209, 220, 0.24);
  background: linear-gradient(135deg, rgba(255, 209, 220, 0.13), rgba(168, 190, 203, 0.1));
}

.game-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(820px, 1fr) minmax(260px, 0.24fr);
  gap: 12px;
  align-items: stretch;
}

.game-contracts {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
}

.game-board-wrap {
  padding: 10px;
  background: #151c22;
}

.race-stage {
  position: relative;
  overflow: hidden;
  min-height: min(74vh, 860px);
  background:
    linear-gradient(180deg, #6f7d86 0%, #273039 100%);
}

.race-stage::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 26px rgba(255, 255, 255, 0.08);
}

.race-stage::after {
  content: none;
}

#race-canvas {
  display: block;
  width: 100%;
  min-height: min(70vh, 820px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #25303a;
}

body.is-game-page #particle-field {
  display: none;
}

body.is-game-page .scanlines {
  display: none;
}

body.is-game-page .game-panel::before,
body.is-game-page .race-stage::before,
body.is-game-page .race-stage::after {
  content: none;
  display: none;
}

body.is-game-page .loader,
body.is-game-page::after,
body.is-game-page.is-page-transitioning::after {
  content: none;
  display: none;
  animation: none;
}

.game-log {
  margin-top: 12px;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-left: 4px solid #f3a7b7;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(247, 251, 252, 0.84);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.game-contract {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

.game-contract.is-active {
  border-color: rgba(243, 167, 183, 0.72);
  box-shadow: inset 4px 0 0 #f3a7b7;
}

.game-contract strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 18px;
}

.game-contract p {
  margin: 0;
  color: rgba(244, 247, 249, 0.64);
  font-size: 13px;
  line-height: 1.5;
}

.game-start {
  background: linear-gradient(90deg, #d95f6f, #f3a7b7);
}

.game-reset {
  background: rgba(255, 255, 255, 0.08);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.section-head p {
  margin: 0;
}

.wp-panel {
  min-height: auto;
  background: linear-gradient(180deg, rgba(248, 253, 255, 0.92), rgba(223, 245, 255, 0.92));
}

.wp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.wp-grid article {
  min-height: 230px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(36, 168, 219, 0.1);
}

.wp-grid span {
  color: var(--red);
  font-size: 42px;
  font-weight: 950;
}

.wp-grid strong {
  display: block;
  margin-top: 18px;
  font-size: 22px;
}

.wp-grid p {
  color: var(--dim);
  line-height: 1.55;
}

.pin-composer {
  width: min(560px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
}

.pin-composer::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

.pin-composer form {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 24px;
}

.pin-composer h3 {
  font-size: 40px;
  line-height: 0.95;
}

.pin-composer label {
  display: grid;
  gap: 8px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 900;
}

.pin-composer input,
.pin-composer textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  padding: 12px;
  outline: none;
}

.pin-composer input:focus,
.pin-composer textarea:focus {
  border-color: var(--cyan);
}

.register-dialog {
  width: min(560px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid rgba(36, 168, 219, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(232, 249, 255, 0.86)),
    var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(5, 34, 49, 0.24);
}

.register-dialog::backdrop {
  background: rgba(5, 22, 31, 0.72);
  backdrop-filter: blur(12px);
}

.register-card {
  position: relative;
  display: grid;
  gap: 15px;
  padding: 26px;
}

.register-card h3 {
  max-width: calc(100% - 50px);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 0.95;
}

.register-copy {
  color: var(--dim);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.7;
}

.register-card label {
  display: grid;
  gap: 8px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 900;
}

.register-card input,
.register-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  padding: 12px 13px;
  outline: none;
  resize: vertical;
}

.register-card input:focus,
.register-card textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(36, 168, 219, 0.16);
}

.auth-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.register-status {
  min-height: 22px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
}

.register-status[data-tone="success"] {
  color: #087b58;
}

.register-status[data-tone="error"] {
  color: var(--red);
}

.register-status[data-tone="pending"] {
  color: var(--cyan);
}

.composer-coords {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-left: 4px solid var(--cyan);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(47, 143, 179, 0.08);
}

.composer-coords span {
  color: var(--dim);
}

.close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.site-frame .pin-detail,
.site-frame .birthday-panel,
.site-frame .theme-panel,
.site-frame .paper-panel,
.site-frame .cyber-panel,
.site-frame .archive-panel,
.site-frame .game-panel,
.site-frame .festival-panel,
.site-frame .wp-panel {
  display: none;
}

body.is-detail-page .site-frame .map-panel {
  display: none;
}

body.is-detail-page .site-frame .pin-detail {
  display: grid;
}

body.is-birthday-page .site-frame .map-panel {
  display: none;
}

body.is-birthday-page .site-frame .birthday-panel {
  display: grid;
}

body.is-theme-page .site-frame .map-panel {
  display: none;
}

body.is-theme-page .site-frame .theme-panel {
  display: grid;
}

body.is-paper-page .site-frame .map-panel {
  display: none;
}

body.is-paper-page .site-frame .paper-panel {
  display: grid;
}

body.is-cyber-page .site-frame .map-panel {
  display: none;
}

body.is-cyber-page .site-frame .cyber-panel {
  display: grid;
}

body.is-archive-page .site-frame .map-panel {
  display: none;
}

body.is-archive-page .site-frame .archive-panel {
  display: grid;
}

body.is-game-page .site-frame .map-panel {
  display: none;
}

body.is-game-page .site-frame .game-panel {
  display: grid;
}

body.is-festival-page .site-frame .map-panel {
  display: none;
}

body.is-festival-page .site-frame .festival-panel {
  display: block;
}

body.is-detail-page .side-index,
body.is-birthday-page .side-index,
body.is-theme-page .side-index,
body.is-paper-page .side-index,
body.is-cyber-page .side-index,
body.is-archive-page .side-index,
body.is-game-page .side-index,
body.is-festival-page .side-index {
  display: none;
}

body::after {
  content: "";
  position: fixed;
  z-index: 60;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(248, 253, 255, 0.96), rgba(223, 245, 255, 0.94) 48%, rgba(255, 246, 216, 0.96)),
    repeating-linear-gradient(90deg, rgba(18, 48, 71, 0.08) 0 2px, transparent 2px 42px);
  transform: translateX(-105%);
}

body.is-page-transitioning::after {
  animation: pageCurtain 760ms cubic-bezier(0.77, 0, 0.18, 1);
}

@keyframes pageCurtain {
  0% {
    transform: translateX(-105%) skewX(-8deg);
  }
  48% {
    transform: translateX(0) skewX(0deg);
  }
  100% {
    transform: translateX(105%) skewX(-8deg);
  }
}

@media (max-width: 980px) {
  body {
    height: auto;
    overflow: auto;
  }

  .site-frame {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .map-panel {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 24px;
  }

  .map-copy {
    margin-left: 0;
  }

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

  .preview-hero {
    height: clamp(280px, 42vh, 480px);
  }

  .preview-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .pin-detail {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "copy"
      "media"
      "gallery";
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .detail-media {
    height: min(66vh, 620px);
    min-height: 360px;
  }

  .detail-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cyber-hero,
  .studio-board {
    grid-template-columns: 1fr;
  }

  .studio-library,
  .studio-control {
    grid-template-columns: 1fr;
  }

  .studio-sounds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-hero,
  .archive-grid,
  .archive-timeline,
  .rhine-operator-layout {
    grid-template-columns: 1fr;
  }

  .rhine-section-grid,
  .rhine-operator-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rhine-profile-detail {
    position: relative;
    top: auto;
  }

  .archive-main {
    grid-column: auto;
  }

  .game-briefing,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .race-stage,
  #race-canvas {
    min-height: 460px;
  }
}

@media (max-width: 720px) {
  .hud {
    height: auto;
    padding: 14px;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }

  .hud-nav {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hud-account {
    gap: 6px;
    margin-left: auto;
  }

  .hud-nav button {
    min-height: 34px;
    padding: 0 9px;
  }

  .account-link {
    min-height: 34px;
    padding: 0 10px;
  }

  .birthday-announcement {
    order: 5;
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .birthday-marquee {
    font-size: 11px;
  }

  #nav-birthday {
    min-height: 30px;
    padding: 0 10px;
  }

  .site-language-dock {
    top: auto;
    right: 14px;
    bottom: 14px;
  }

  .theme-hero,
  .theme-model,
  .theme-conclusion {
    grid-template-columns: 1fr;
  }

  .theme-summary,
  .theme-model ol,
  .paper-body {
    grid-template-columns: 1fr;
  }

  .theme-summary section,
  .theme-model li {
    min-height: auto;
  }

  .theme-hero img {
    aspect-ratio: 16 / 10;
  }

  .theme-sources {
    padding-left: 0;
    padding-top: 18px;
    border-left: 0;
    border-top: 1px solid rgba(17, 17, 17, 0.18);
  }

  .theme-switcher {
    top: 78px;
    grid-template-columns: 1fr;
  }

  .theme-chip {
    min-height: 92px;
  }

  .side-index {
    display: none;
  }

  .panel {
    padding: 98px 14px 42px;
  }

  .birthday-panel {
    padding: 0;
  }

  .birthday-topbar {
    top: 12px;
    right: 12px;
  }

  h1 {
    font-size: clamp(48px, 17vw, 82px);
  }

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

  .brief strong {
    text-align: left;
  }

  .map-shell,
  #world-map {
    min-height: 320px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
  }

  .preview-copy h2 {
    font-size: clamp(36px, 13vw, 58px);
  }

  .preview-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .control-button {
    min-width: 0;
    padding: 0 8px;
  }

  .detail-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-copy {
    width: 100%;
  }

  .detail-media {
    height: min(56vh, 520px);
    min-height: 280px;
  }

  h2 {
    font-size: clamp(34px, 13vw, 56px);
  }

  .cyber-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .cyber-hero {
    padding: 34px 0 26px;
  }

  .cyber-hero h2 {
    font-size: clamp(44px, 16vw, 72px);
  }

  .studio-stats {
    grid-template-columns: 1fr 1fr;
  }

  .studio-sounds,
  .studio-actions {
    grid-template-columns: 1fr;
  }

  .studio-arrangement {
    min-height: 500px;
  }

  .studio-stage-ruler,
  .studio-step-ruler,
  .studio-track {
    grid-template-columns: 70px repeat(32, minmax(36px, 1fr));
  }

  .studio-stage-ruler {
    grid-template-columns: 70px repeat(2, minmax(0, 1fr));
  }

  #cyber-steps {
    grid-template-columns: repeat(32, minmax(0, 1fr));
  }

  .archive-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-id,
  .archive-portrait {
    min-height: 430px;
  }

  .archive-id dl,
  .rhine-profile-detail dl,
  .rhine-section-grid,
  .rhine-profile-media-grid,
  .rhine-operator-list {
    grid-template-columns: 1fr;
  }

  .archive-id h2 {
    font-size: clamp(54px, 17vw, 84px);
  }

  .archive-portrait img {
    height: min(400px, calc(100% - 24px));
  }

  .rhine-access-line {
    align-items: start;
    flex-direction: column;
    justify-content: center;
    padding: 10px 14px;
  }

  .rhine-statement {
    font-size: 16px;
  }

  .rhine-profile {
    min-height: 84px;
  }

  .game-panel {
    padding-top: 72px;
  }

  .game-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .game-title h2 {
    font-size: clamp(38px, 13vw, 64px);
  }

  .game-stats {
    grid-template-columns: 1fr;
  }

  .race-stage,
  #race-canvas {
    min-height: 360px;
  }

  .game-log {
    min-height: 54px;
    line-height: 1.45;
  }
}

@media (max-width: 980px) {
  .rhine-os-topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .rhine-os-nav {
    justify-content: start;
  }

  .rhine-os-home {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .rhine-os-brand {
    min-height: 260px;
    padding-right: 0;
    border-right: 0;
    border-bottom: 2px solid rgba(17, 21, 18, 0.54);
  }

  .rhine-os-brand::before {
    right: auto;
    left: 52%;
    top: auto;
    bottom: -8px;
  }

  .rhine-os-visual {
    min-height: 580px;
  }

  .archive-grid,
  .archive-timeline,
  .rhine-operator-layout {
    grid-template-columns: 1fr;
  }

  .rhine-section-grid,
  .rhine-operator-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rhine-profile-detail {
    position: relative;
    top: auto;
  }
}

@media (max-width: 720px) {
  .archive-panel {
    overflow-x: hidden;
  }

  .rhine-os-shell {
    gap: 18px;
  }

  .rhine-os-topbar button,
  .rhine-find-operator {
    width: 100%;
  }

  .rhine-os-brand {
    min-height: 230px;
    padding-top: 24px;
  }

  .rhine-os-brand i {
    margin-top: 42px;
  }

  .rhine-os-visual {
    width: 100%;
    min-width: 0;
    min-height: 620px;
  }

  .rhine-os-left-card {
    left: 18px;
    top: 30%;
    width: min(250px, calc(100% - 36px));
  }

  .rhine-visual-title {
    left: 28px;
    right: 18px;
    top: 56%;
    transform: translateY(-50%);
  }

  .rhine-visual-title h3 {
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    font-size: clamp(26px, 11vw, 42px);
  }

  .rhine-visual-title h3::before {
    height: 38px;
    margin-right: 8px;
    transform: translateX(-18px);
  }

  .rhine-access-stack {
    left: 18px;
    right: auto;
    top: 18px;
    justify-items: start;
    text-align: left;
  }

  .rhine-access-stack span,
  .rhine-access-stack strong,
  .rhine-access-stack em {
    min-width: 0;
    max-width: calc(100vw - 64px);
  }

  .rhine-section-switcher {
    left: 18px;
    right: 18px;
    bottom: 54px;
  }

  .rhine-powered {
    left: 18px;
    right: auto;
    bottom: 22px;
  }

  .rhine-molecule {
    transform: translateX(42px) scale(0.78);
    transform-origin: center;
  }

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

  .rhine-find-operator {
    grid-row: auto;
    grid-column: auto;
  }

  .rhine-section-grid,
  .rhine-operator-list,
  .rhine-profile-detail dl {
    grid-template-columns: 1fr;
  }
}

.archive-panel {
  min-height: 100vh;
  color: #111512;
  overflow-y: auto;
  background:
    linear-gradient(122deg, transparent 0 18%, rgba(255, 255, 255, 0.82) 18% 31%, transparent 31% 62%, rgba(183, 255, 45, 0.18) 62% 62.5%, transparent 62.5%),
    linear-gradient(90deg, rgba(17, 21, 18, 0.06) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(rgba(17, 21, 18, 0.045) 1px, transparent 1px) 0 0 / 80px 80px,
    repeating-linear-gradient(0deg, rgba(17, 21, 18, 0.025) 0 1px, transparent 1px 10px),
    #f4f4ef;
}

body.is-archive-page .archive-panel::after {
  content: none;
}

.archive-panel::before {
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(17, 21, 18, 0.18) 28% 28.1%, transparent 28.1%),
    linear-gradient(120deg, transparent 0 52%, rgba(255, 255, 255, 0.56) 52% 68%, transparent 68%);
  opacity: 0.58;
}

.rhine-boot {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  color: #f7f8f3;
  background:
    linear-gradient(90deg, transparent 0 50%, rgba(183, 255, 45, 0.42) 50% 50.2%, transparent 50.2%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 10px),
    #07100d;
  transition: opacity 520ms ease, transform 520ms ease, visibility 520ms ease;
}

.archive-panel.is-rhine-ready .rhine-boot {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-18px);
}

.archive-panel:not(.is-rhine-ready) .rhine-os-shell {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(18px);
}

.archive-panel.is-rhine-ready .rhine-os-shell {
  opacity: 1;
  filter: none;
  transform: none;
}

.rhine-boot-frame {
  width: min(560px, calc(100vw - 36px));
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(34px, 6vw, 62px);
  border: 1px solid rgba(247, 248, 243, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  backdrop-filter: blur(26px) saturate(1.3);
}

.rhine-boot-frame img {
  width: min(136px, 38vw);
  background: #060606;
  border: 1px solid rgba(247, 248, 243, 0.16);
  box-shadow: 0 0 24px rgba(183, 255, 45, 0.16);
}

.rhine-boot-frame span,
.rhine-boot-frame strong {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rhine-boot-frame h2 {
  margin: 0;
  color: #f7f8f3;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.9;
  letter-spacing: 0;
}

.rhine-boot-meter {
  width: min(360px, 76vw);
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(247, 248, 243, 0.3);
  background: rgba(247, 248, 243, 0.1);
}

.rhine-boot-meter i {
  display: block;
  height: 100%;
  width: 100%;
  background: #b7ff2d;
  transform-origin: left center;
  animation: rhineBootMeter 1980ms cubic-bezier(0.2, 0.7, 0.22, 1) both;
}

@keyframes rhineBootMeter {
  from { transform: scaleX(0.04); }
  to { transform: scaleX(1); }
}

.rhine-os-shell {
  gap: clamp(24px, 4vw, 54px);
  padding-top: clamp(108px, 7vw, 132px);
  transition: opacity 620ms ease, filter 620ms ease, transform 620ms ease;
}

.rhine-os-topbar {
  position: fixed;
  top: clamp(12px, 2vw, 24px);
  left: clamp(18px, 5vw, 102px);
  right: clamp(18px, 5vw, 102px);
  z-index: 30;
  align-items: center;
  grid-template-columns: minmax(230px, 1fr) auto auto;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(17, 21, 18, 0.13);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.36)),
    rgba(247, 248, 243, 0.58);
  box-shadow: 0 22px 54px rgba(17, 21, 18, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(28px) saturate(1.42);
  backdrop-filter: blur(28px) saturate(1.42);
}

.rhine-os-wordmark {
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
}

.rhine-os-wordmark img {
  grid-row: span 2;
  width: 54px;
  background: #060606;
  border: 1px solid rgba(17, 21, 18, 0.16);
  opacity: 0.94;
}

.rhine-os-wordmark span,
.rhine-os-wordmark strong {
  line-height: 1;
}

.rhine-os-nav {
  gap: 8px;
}

.rhine-os-topbar button,
.rhine-home-actions button,
.rhine-find-operator {
  min-height: 42px;
  border: 1px solid rgba(17, 21, 18, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.28)),
    rgba(255, 255, 255, 0.34);
  color: #111512;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
}

.rhine-os-topbar button:hover,
.rhine-os-topbar button:focus-visible,
.rhine-home-actions button:hover,
.rhine-home-actions button:focus-visible,
.rhine-find-operator:hover,
.rhine-find-operator:focus-visible {
  border-color: #111512;
  background: #111512;
  color: #f7f8f3;
}

.rhine-corporate-home {
  position: relative;
  z-index: 2;
  min-height: clamp(620px, calc(100vh - 190px), 800px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.62fr);
  gap: clamp(28px, 5vw, 92px);
  align-items: center;
  padding: clamp(18px, 4vw, 64px) 0 34px;
  scroll-margin-top: 110px;
  overflow: hidden;
}

.rhine-corporate-home::before {
  content: "RHINE LAB";
  position: absolute;
  z-index: -1;
  left: -5vw;
  top: 8%;
  color: rgba(17, 21, 18, 0.04);
  font-size: clamp(128px, 21vw, 310px);
  font-weight: 950;
  line-height: 0.78;
  pointer-events: none;
}

.rhine-home-copy {
  display: grid;
  gap: 22px;
  min-width: 0;
  max-width: min(860px, 100%);
}

.rhine-home-copy > span {
  width: fit-content;
  padding: 6px 12px;
  color: #111512;
  background: #b7ff2d;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rhine-home-copy h2 {
  margin: 0;
  color: #111512;
  font-size: clamp(62px, 10vw, 150px);
  font-weight: 950;
  line-height: 0.78;
  letter-spacing: 0;
  text-transform: uppercase;
  transform-origin: left center;
}

.rhine-home-copy p {
  max-width: 780px;
  margin: 0;
  color: rgba(17, 21, 18, 0.7);
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 760;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.rhine-home-copy p[data-rhine-typed="true"] .rhine-intro-word {
  display: inline-block;
  white-space: nowrap;
}

.rhine-home-copy p[data-rhine-typed="true"] .rhine-intro-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(3px);
}

.rhine-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

html[lang="zh-CN"] .rhine-os-topbar button,
html[lang="zh-CN"] .rhine-home-actions button {
  min-width: 96px;
  padding-inline: 18px;
  font-size: 14px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

html[lang="zh-CN"] .rhine-home-copy {
  max-width: min(800px, 100%);
}

html[lang="zh-CN"] .rhine-home-copy > span {
  letter-spacing: 0.03em;
}

html[lang="zh-CN"] .rhine-home-copy p {
  max-width: min(720px, 100%);
  font-size: clamp(17px, 1.42vw, 21px);
  line-height: 1.78;
  letter-spacing: 0.01em;
  word-break: break-word;
  text-wrap: pretty;
}

html[lang="zh-CN"] .rhine-home-copy p[data-rhine-typed="true"] .rhine-intro-char {
  display: inline;
}

.rhine-home-panels {
  display: grid;
  gap: 16px;
  align-self: center;
}

.rhine-corporate-home .rhine-system-panel {
  display: none;
}

.liquid-glass {
  border: 1px solid rgba(17, 21, 18, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.26)),
    rgba(255, 255, 255, 0.38);
  box-shadow: 0 24px 70px rgba(17, 21, 18, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(26px) saturate(1.32);
  backdrop-filter: blur(26px) saturate(1.32);
}

.rhine-logo-panel {
  position: relative;
  min-height: clamp(320px, 34vw, 430px);
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: 26px;
}

.rhine-logo-panel::before {
  content: "";
  position: absolute;
  inset: 24px;
  z-index: 2;
  border: 1px solid rgba(17, 21, 18, 0.11);
  pointer-events: none;
}

.rhine-logo-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(247, 248, 243, 0.72), rgba(247, 248, 243, 0.12) 48%, rgba(183, 255, 45, 0.12)),
    linear-gradient(0deg, rgba(247, 248, 243, 0.86), transparent 58%);
  pointer-events: none;
}

.rhine-logo-panel .rhine-campus-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  filter: saturate(0.92) contrast(0.96);
}

.rhine-logo-lockup {
  position: relative;
  z-index: 3;
  width: min(430px, 86%);
  aspect-ratio: 1.68;
  display: grid;
  place-items: center;
  border: 1px solid rgba(17, 21, 18, 0.13);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.38)),
    rgba(247, 248, 243, 0.46);
  box-shadow: 0 22px 44px rgba(17, 21, 18, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(1.28);
  backdrop-filter: blur(20px) saturate(1.28);
  opacity: 0;
  transform: translateY(10px);
}

.rhine-logo-panel .rhine-home-logo {
  width: min(174px, 58%);
  background: #060606;
  border: 1px solid rgba(17, 21, 18, 0.12);
  opacity: 0;
  transform: scale(0.94);
  filter: drop-shadow(0 20px 32px rgba(17, 21, 18, 0.16));
}

.rhine-logo-panel span {
  position: absolute;
  z-index: 4;
  right: 22px;
  bottom: 18px;
  color: #111512;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  opacity: 0;
}

.rhine-system-panel {
  position: relative;
  min-height: 240px;
  display: grid;
  align-content: space-between;
  gap: 22px;
  padding: 24px;
  overflow: hidden;
}

.rhine-system-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(226, 176, 77, 0.7) 0 7px, transparent 7px 18px) 28px 28px / 128px 72px no-repeat,
    linear-gradient(90deg, transparent 0 54%, rgba(17, 21, 18, 0.07) 54% 54.6%, transparent 54.6%);
  pointer-events: none;
}

.rhine-access-stack {
  position: relative;
  right: auto;
  top: auto;
  z-index: 2;
  justify-items: end;
}

.rhine-section-console {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: end;
}

.rhine-section-console > span {
  color: #111512;
  font-size: clamp(52px, 7vw, 92px);
  font-weight: 950;
  line-height: 0.8;
}

.rhine-section-console strong {
  display: block;
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 9px;
  color: #f7f8f3;
  background: #111512;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.rhine-section-console h3 {
  width: fit-content;
  margin: 0 0 8px;
  padding: 8px 12px;
  color: #f7f8f3;
  background: #111512;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 0.92;
}

.rhine-section-console p {
  margin: 0;
  color: rgba(17, 21, 18, 0.62);
  font-weight: 800;
  line-height: 1.45;
}

.rhine-section-switcher {
  position: relative;
  z-index: 2;
  left: auto;
  right: auto;
  bottom: auto;
}

.rhine-campus-card {
  grid-column: 1 / -1;
  min-height: 360px;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.rhine-campus-card figure {
  min-height: 360px;
  margin: 0;
  overflow: hidden;
  border-right: 1px solid rgba(17, 21, 18, 0.14);
  background: rgba(17, 21, 18, 0.08);
}

.rhine-campus-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.94) contrast(0.98);
}

.rhine-campus-card > div {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 46px);
}

.rhine-section-heading p {
  max-width: 820px;
  margin: 0;
  color: rgba(17, 21, 18, 0.62);
  font-weight: 760;
  line-height: 1.58;
}

.rhine-section-card {
  scroll-margin-top: 220px;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.rhine-section-card:hover,
.rhine-section-card:focus-visible,
.rhine-section-card.is-active {
  border-color: rgba(17, 21, 18, 0.52);
  box-shadow: 0 18px 42px rgba(17, 21, 18, 0.1), inset 0 -5px 0 #b7ff2d;
  transform: translateY(-3px);
  outline: none;
}

.rhine-section-card figure {
  min-height: 112px;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px solid rgba(17, 21, 18, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(247, 248, 243, 0.58)),
    #f7f8f3;
}

.rhine-section-card img {
  width: 100%;
  max-height: 96px;
  object-fit: contain;
  filter: contrast(1.08);
}

.archive-grid,
.rhine-sections,
.rhine-operator-deck,
.archive-timeline {
  scroll-margin-top: 118px;
}

.archive-card,
.archive-timeline div,
.rhine-section-grid article,
.rhine-profile-detail {
  background:
    linear-gradient(90deg, rgba(183, 255, 45, 0.18) 0 6px, transparent 6px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.24));
}

.rhine-section-heading,
.rhine-operator-head {
  padding: 20px 22px 20px 28px;
}

.rhine-profile {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.22)),
    rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
}

@media (max-width: 980px) {
  .rhine-os-topbar,
  .rhine-corporate-home,
  .rhine-section-console {
    grid-template-columns: 1fr;
  }

  .rhine-os-topbar {
    top: 10px;
  }

  .rhine-os-nav {
    justify-content: start;
  }

  .rhine-corporate-home {
    min-height: auto;
  }

  .rhine-logo-panel {
    min-height: 240px;
  }
}

@media (max-width: 720px) {
  .rhine-boot-frame {
    padding: 28px 18px;
  }

  .rhine-os-wordmark {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .rhine-os-nav,
  .rhine-home-actions,
  .rhine-section-switcher {
    display: grid;
    grid-template-columns: 1fr;
  }

  .rhine-home-copy h2 {
    font-size: clamp(46px, 15vw, 64px);
  }

  .rhine-home-copy p {
    font-size: 15px;
  }

  .rhine-logo-panel {
    min-height: 190px;
  }

  .rhine-system-panel {
    padding: 18px;
  }

  .rhine-section-console > span {
    font-size: 58px;
  }

  .rhine-section-console h3 {
    width: 100%;
    box-sizing: border-box;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rhine-boot,
  .rhine-os-shell,
  .rhine-boot-meter i {
    animation: none;
    transition: none;
  }
}

.rhine-page:not(.is-active) {
  display: none !important;
}

.rhine-page.is-active {
  animation: rhineDataIn 520ms ease both;
}

.archive-panel.is-rhine-ready .rhine-os-topbar {
  animation: rhineNavFloatIn 680ms cubic-bezier(0.2, 0.8, 0.18, 1) both;
}

.archive-panel.is-rhine-ready .rhine-corporate-home.is-active {
  animation: none;
}

.archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-home-copy > span {
  opacity: 0;
  transform: translateX(-24px);
  animation: rhineAccessLabelIn 480ms cubic-bezier(0.2, 0.8, 0.18, 1) 180ms forwards;
}

.archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-home-copy h2 {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transform: translateX(-92px) scaleX(0.96);
  animation: rhineTitleSlideIn 860ms cubic-bezier(0.18, 0.92, 0.16, 1) 300ms forwards;
}

.archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-home-copy p[data-rhine-typed="true"] .rhine-intro-char {
  animation: rhineIntroCharIn 420ms ease forwards;
  animation-delay: calc(980ms + (var(--char-index) * 6ms));
}

.archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-home-actions {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(6px);
  animation: rhineHomeActionsIn 680ms ease 2780ms forwards;
}

.archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-logo-panel {
  opacity: 0;
  transform: translateX(108px);
  filter: blur(10px);
  animation: rhineGlassPanelIn 900ms cubic-bezier(0.2, 0.82, 0.18, 1) 3380ms forwards;
}

.archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-campus-photo {
  animation: rhineCampusPhotoIn 1150ms ease 3520ms forwards;
}

.archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-logo-lockup {
  animation: rhineLogoLockupIn 760ms ease 3840ms forwards;
}

.archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-home-logo,
.archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-logo-panel span {
  animation: rhineLogoFadeIn 980ms ease 4120ms forwards;
}

.archive-panel.is-rhine-entry-complete .rhine-corporate-home.is-active .rhine-home-copy > span,
.archive-panel.is-rhine-entry-complete .rhine-corporate-home.is-active .rhine-home-copy h2,
.archive-panel.is-rhine-entry-complete .rhine-corporate-home.is-active .rhine-home-copy p[data-rhine-typed="true"] .rhine-intro-char,
.archive-panel.is-rhine-entry-complete .rhine-corporate-home.is-active .rhine-home-actions,
.archive-panel.is-rhine-entry-complete .rhine-corporate-home.is-active .rhine-logo-panel,
.archive-panel.is-rhine-entry-complete .rhine-corporate-home.is-active .rhine-logo-lockup,
.archive-panel.is-rhine-entry-complete .rhine-corporate-home.is-active .rhine-home-logo,
.archive-panel.is-rhine-entry-complete .rhine-corporate-home.is-active .rhine-logo-panel span {
  animation: none;
  clip-path: none;
  filter: none;
  opacity: 1;
  transform: none;
}

.archive-panel.is-rhine-entry-complete .rhine-corporate-home.is-active .rhine-campus-photo {
  animation: none;
  opacity: 0.78;
  transform: scale(1);
}

@keyframes rhineNavFloatIn {
  from {
    opacity: 0;
    transform: translateY(-18px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes rhineAccessLabelIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes rhineTitleSlideIn {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateX(-92px) scaleX(0.96);
    filter: blur(8px);
  }
  58% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateX(0) scaleX(1);
    filter: blur(0);
  }
}

@keyframes rhineIntroCharIn {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes rhineHomeActionsIn {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes rhineGlassPanelIn {
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes rhineCampusPhotoIn {
  to {
    opacity: 0.78;
    transform: scale(1);
  }
}

@keyframes rhineLogoLockupIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rhineLogoFadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.rhine-os-nav button.is-active,
.rhine-home-actions button.is-active {
  border-color: #111512;
  background: #111512;
  color: #f7f8f3;
  box-shadow: inset 0 -4px 0 #b7ff2d;
}

.rhine-page {
  min-height: clamp(520px, calc(100vh - 190px), 820px);
}

.archive-timeline.rhine-page.is-active {
  min-height: auto;
  margin-top: -34px;
}

@media (max-width: 980px) {
  .rhine-os-shell {
    padding-top: 210px;
  }

  .rhine-os-topbar {
    left: 18px;
    right: 18px;
    grid-template-columns: 1fr;
    align-items: stretch;
    max-height: calc(100vh - 28px);
    overflow: auto;
  }

  .rhine-campus-card {
    grid-template-columns: 1fr;
  }

  .rhine-campus-card figure {
    min-height: 260px;
    border-right: 0;
    border-bottom: 1px solid rgba(17, 21, 18, 0.14);
  }

  .rhine-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .rhine-os-shell {
    padding-top: 190px;
  }

  .rhine-os-topbar {
    gap: 8px;
    padding: 8px;
  }

  .rhine-os-wordmark {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rhine-os-wordmark img {
    width: 42px;
  }

  .rhine-os-wordmark span {
    display: none;
  }

  .rhine-os-wordmark strong {
    font-size: 22px;
  }

  .rhine-os-nav {
    display: flex;
    grid-template-columns: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: start;
    scrollbar-width: none;
  }

  .rhine-os-nav::-webkit-scrollbar {
    display: none;
  }

  .rhine-os-topbar .rhine-os-nav button {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
  }

  .rhine-os-topbar #archive-back-to-map {
    width: 100%;
  }

  .rhine-section-grid {
    grid-template-columns: 1fr;
  }

  .rhine-campus-card figure {
    min-height: 210px;
  }

  .rhine-logo-lockup {
    width: min(320px, 88%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .archive-panel.is-rhine-ready .rhine-os-topbar,
  .archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-home-copy > span,
  .archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-home-copy h2,
  .archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-home-copy p[data-rhine-typed="true"] .rhine-intro-char,
  .archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-home-actions,
  .archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-logo-panel,
  .archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-campus-photo,
  .archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-logo-lockup,
  .archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-home-logo,
  .archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-logo-panel span {
    animation: none;
    clip-path: none;
    filter: none;
    opacity: 1;
    transform: none;
  }

  .archive-panel.is-rhine-ready .rhine-corporate-home.is-active .rhine-campus-photo {
    opacity: 0.78;
  }
}

.festival-panel {
  min-height: 100vh;
  height: auto;
  padding: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 12%, rgba(207, 57, 42, 0.2), transparent 30%),
    radial-gradient(circle at 85% 18%, rgba(218, 151, 66, 0.22), transparent 32%),
    linear-gradient(180deg, #fff8e8 0%, #f6e8cc 38%, #efe0c2 100%);
  color: #321c13;
}

.festival-panel::before {
  opacity: 0.38;
  background:
    linear-gradient(90deg, rgba(113, 58, 32, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(113, 58, 32, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
}

.festival-panel::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(116, 17, 12, 0.12), transparent 16%, transparent 84%, rgba(116, 17, 12, 0.12)),
    repeating-linear-gradient(0deg, rgba(95, 56, 30, 0.035) 0 1px, transparent 1px 5px);
  mix-blend-mode: multiply;
  z-index: 0;
}

.festival-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(22px, 3.2vw, 42px);
  padding: clamp(54px, 7vw, 86px) clamp(18px, 5vw, 86px) 68px;
}

.festival-topbar {
  position: sticky;
  top: 22px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(88, 44, 24, 0.18);
  background: rgba(255, 250, 239, 0.78);
  box-shadow: 0 18px 45px rgba(89, 45, 24, 0.13);
  backdrop-filter: blur(18px);
}

.festival-topbar div,
.festival-hero-copy {
  display: grid;
  gap: 12px;
}

.festival-topbar span,
.festival-hero-copy p,
.festival-card span {
  color: #a22a20;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.festival-topbar strong {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 24px;
  letter-spacing: 0.12em;
}

.festival-topbar button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(88, 44, 24, 0.22);
  background: #7f1d18;
  color: #fff8e8;
  font-weight: 850;
  cursor: pointer;
}

.festival-jindeng {
  display: grid;
  gap: 16px;
}

.festival-jindeng-copy {
  display: grid;
  gap: 8px;
  width: min(920px, 100%);
}

.festival-jindeng-copy span {
  color: #a22a20;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.festival-jindeng-copy h3 {
  margin: 0;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: clamp(42px, 6vw, 86px);
  line-height: 0.98;
  color: #421b13;
}

.festival-jindeng-copy p {
  width: min(760px, 100%);
  margin: 0;
  color: rgba(50, 28, 19, 0.72);
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 700;
  line-height: 1.65;
}

.festival-jindeng-frame {
  min-height: min(860px, calc(100vh - 140px));
  overflow: hidden;
  border: 1px solid rgba(88, 44, 24, 0.2);
  background: rgba(255, 250, 239, 0.78);
  box-shadow: 0 28px 80px rgba(89, 45, 24, 0.16);
}

.festival-jindeng-frame iframe {
  display: block;
  width: 100%;
  height: min(860px, calc(100vh - 140px));
  min-height: 720px;
  border: 0;
  background: #fff8f1;
}

.festival-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1.22fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: center;
  min-height: min(640px, calc(100vh - 170px));
}

.festival-hero-copy h2 {
  margin: 0;
  max-width: 7ch;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: clamp(62px, 8vw, 138px);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: 0.02em;
  color: #421b13;
}

.festival-hero-copy blockquote {
  margin: 0;
  max-width: 24em;
  padding-left: 18px;
  border-left: 5px solid #b3261e;
  color: rgba(50, 28, 19, 0.72);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 800;
  line-height: 1.5;
}

.festival-hero-art,
.festival-card figure,
.festival-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(88, 44, 24, 0.18);
  background: rgba(255, 250, 239, 0.72);
  box-shadow: 0 24px 60px rgba(89, 45, 24, 0.16);
}

.festival-hero-art {
  aspect-ratio: 16 / 9;
  padding: 10px;
}

.festival-hero-art img,
.festival-card img,
.festival-gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.festival-scroll {
  display: grid;
  grid-template-columns: repeat(12, minmax(78px, 1fr));
  grid-auto-flow: dense;
  gap: 16px;
}

.festival-card {
  grid-column: span 4;
  min-height: 430px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(88, 44, 24, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 252, 243, 0.88), rgba(248, 235, 207, 0.68)),
    repeating-linear-gradient(90deg, rgba(122, 72, 34, 0.045) 0 1px, transparent 1px 18px);
  box-shadow: 0 18px 45px rgba(89, 45, 24, 0.1);
}

.festival-card.is-featured,
.festival-card.is-wide {
  grid-column: span 6;
}

.festival-card h3 {
  margin: 0;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  color: #321c13;
  font-size: clamp(24px, 2.2vw, 38px);
  line-height: 1.18;
}

.festival-card p {
  margin: 0;
  color: rgba(50, 28, 19, 0.68);
  font-size: 16px;
  font-weight: 760;
  line-height: 1.58;
}

.festival-card figure {
  min-height: 220px;
}

.festival-card.is-wide figure {
  min-height: 260px;
}

.festival-gallery {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.58fr);
  gap: 16px;
}

.festival-gallery figure {
  min-height: 520px;
}

.festival-gallery figure:first-child img {
  object-position: center top;
}

@media (max-width: 980px) {
  .festival-hero,
  .festival-gallery {
    grid-template-columns: 1fr;
  }

  .festival-scroll {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .festival-card,
  .festival-card.is-featured,
  .festival-card.is-wide {
    grid-column: span 6;
  }
}

@media (max-width: 680px) {
  .festival-shell {
    padding-top: 86px;
  }

  .festival-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .festival-jindeng-frame,
  .festival-jindeng-frame iframe {
    min-height: 720px;
    height: 78vh;
  }

  .festival-hero-copy h2 {
    font-size: clamp(54px, 17vw, 86px);
  }
}

body.is-festival-page {
  overflow: hidden;
}

body.is-festival-page .site-frame {
  width: 100%;
  max-width: none;
  padding: 0;
}

body.is-festival-page .festival-panel {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #fff8f1;
}

body.is-festival-page .festival-panel::before,
body.is-festival-page .festival-panel::after {
  content: none;
  display: none;
}

.festival-direct-frame {
  display: block;
  width: 100%;
  height: 100vh;
  border: 0;
  background: #fff8f1;
}

.site-language-dock {
  z-index: 19;
  opacity: 0.72;
  transition: opacity 180ms ease;
}

.site-language-dock:hover,
.site-language-dock:focus-within {
  opacity: 1;
}

.language-toggle {
  gap: 2px;
  padding: 2px;
  border-color: rgba(18, 48, 71, 0.08);
  background: rgba(255, 255, 255, 0.36);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.language-toggle button {
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  color: rgba(18, 48, 71, 0.62);
  background: transparent;
  box-shadow: none;
  font-size: 10px;
}

.language-toggle button.is-active {
  color: var(--ink);
  background: rgba(36, 168, 219, 0.1);
  box-shadow: inset 0 -2px 0 rgba(36, 168, 219, 0.72);
}

.language-toggle button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  transform: none;
}

/* Universe entrance refresh */
body {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

body.is-detail-page,
body.is-theme-page,
body.is-paper-page,
body.is-cyber-page,
body.is-archive-page,
body.is-game-page,
body.is-birthday-page,
body.is-festival-page {
  height: 100vh;
  overflow: hidden;
}

.site-frame {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

body.is-detail-page .site-frame,
body.is-theme-page .site-frame,
body.is-paper-page .site-frame,
body.is-cyber-page .site-frame,
body.is-archive-page .site-frame,
body.is-game-page .site-frame,
body.is-birthday-page .site-frame,
body.is-festival-page .site-frame {
  height: 100vh;
  overflow: hidden;
}

.journey-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 112px clamp(24px, 6vw, 96px) 96px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(18, 48, 71, 0.07) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgba(18, 48, 71, 0.055) 1px, transparent 1px) 0 0 / 72px 72px,
    radial-gradient(ellipse at 50% 110%, rgba(36, 168, 219, 0.28), transparent 54%),
    linear-gradient(135deg, rgba(248, 253, 255, 0.98), rgba(223, 245, 255, 0.94) 52%, rgba(255, 246, 216, 0.8));
}

.journey-hero::before {
  content: "MUELSYSE";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 48%;
  color: rgba(18, 48, 71, 0.045);
  font-size: clamp(120px, 24vw, 420px);
  font-weight: 950;
  line-height: 0.78;
  letter-spacing: 0;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.journey-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 32vh;
  background:
    linear-gradient(0deg, rgba(248, 253, 255, 0.96), transparent),
    repeating-linear-gradient(90deg, rgba(36, 168, 219, 0.14) 0 2px, transparent 2px 48px);
  opacity: 0.58;
}

.journey-hero-orbit {
  position: absolute;
  inset: 12vh 10vw;
  z-index: -1;
  pointer-events: none;
}

.journey-hero-orbit i {
  position: absolute;
  display: block;
  border: 1px solid rgba(36, 168, 219, 0.18);
  transform: skewX(-14deg);
}

.journey-hero-orbit i:nth-child(1) {
  left: 5%;
  top: 8%;
  width: 42vw;
  height: 34vh;
  border-right-color: transparent;
}

.journey-hero-orbit i:nth-child(2) {
  right: 4%;
  bottom: 10%;
  width: 48vw;
  height: 28vh;
  border-left-color: transparent;
}

.journey-hero-orbit i:nth-child(3) {
  left: 23%;
  bottom: 4%;
  width: 58vw;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 126, 110, 0.72), rgba(255, 200, 87, 0.74), transparent);
  transform: rotate(-8deg);
}

.journey-hero-copy {
  width: min(1160px, 100%);
  display: grid;
  justify-items: center;
  gap: clamp(20px, 3vw, 34px);
  text-align: center;
  animation: heroCopyEnter 980ms cubic-bezier(0.2, 0.8, 0.2, 1) 1120ms both;
}

.journey-hero h1 {
  max-width: 12ch;
  color: #102b3f;
  font-size: clamp(58px, 10vw, 174px);
  line-height: 0.86;
  text-wrap: balance;
}

.journey-hero p {
  width: min(760px, 100%);
  margin: 0;
  color: #43505a;
  font-size: clamp(18px, 2.1vw, 30px);
  font-weight: 850;
  line-height: 1.5;
  text-wrap: balance;
}

.journey-enter {
  position: absolute;
  right: clamp(22px, 6vw, 94px);
  bottom: clamp(24px, 7vh, 82px);
  z-index: 4;
  min-width: 196px;
  min-height: 62px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 0 18px 0 22px;
  border: 1px solid rgba(18, 48, 71, 0.18);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #102b3f, #24a8db 58%, #ff7d6e);
  box-shadow: 0 24px 72px rgba(36, 168, 219, 0.26);
  cursor: pointer;
  animation: heroButtonEnter 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 1480ms both;
}

.journey-enter span,
.journey-enter strong {
  position: relative;
  z-index: 1;
}

.journey-enter span {
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.journey-enter strong {
  display: grid;
  place-items: center;
  min-width: 46px;
  min-height: 46px;
  border-radius: 50%;
  color: #102b3f;
  background: rgba(255, 255, 255, 0.92);
}

.journey-enter:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 86px rgba(255, 126, 110, 0.26);
}

body.is-home-scroll-entering::before {
  animation: journeyScrollVeil 1120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.is-home-scroll-entering .journey-hero-copy,
body.is-home-scroll-entering .journey-enter,
body.is-home-scroll-entering .journey-hero-preview {
  animation: journeyHeroRelease 780ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.is-home-scroll-entering .map-panel.is-scroll-revealing,
body.is-home-scroll-entering .chapter-panel.is-scroll-revealing {
  animation: homeMagnetSettle 1120ms cubic-bezier(0.18, 0.88, 0.22, 1) both;
}

body.is-home-snapping-up.is-home-scroll-entering .map-panel.is-scroll-revealing,
body.is-home-snapping-up.is-home-scroll-entering .chapter-panel.is-scroll-revealing {
  animation-name: homeMagnetSettleUp;
}

.journey-hero-preview {
  position: absolute;
  left: clamp(18px, 5vw, 80px);
  right: clamp(18px, 22vw, 340px);
  bottom: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  opacity: 0.72;
}

.journey-hero-preview span {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(18, 48, 71, 0.12);
  background: rgba(255, 255, 255, 0.54);
  color: rgba(18, 48, 71, 0.68);
  font-size: 11px;
  font-weight: 950;
}

@keyframes heroCopyEnter {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroButtonEnter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.map-panel {
  height: auto;
  min-height: 100vh;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  padding-top: 104px;
  padding-bottom: 72px;
  overflow: hidden;
}

.map-panel.is-scroll-revealing .map-copy,
.chapter-panel.is-scroll-revealing .chapter-head {
  animation: atlasCopyReveal 880ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both;
}

.map-panel.is-scroll-revealing .map-shell,
.chapter-panel.is-scroll-revealing .theme-switcher {
  animation: atlasSurfaceReveal 980ms cubic-bezier(0.2, 0.8, 0.2, 1) 240ms both;
}

.map-panel.is-scroll-revealing .preview-wall {
  animation: atlasPreviewReveal 860ms cubic-bezier(0.2, 0.8, 0.2, 1) 420ms both;
}

.map-panel::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 7vw;
  right: 7vw;
  top: 58%;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(36, 168, 219, 0.76), rgba(255, 200, 87, 0.82), transparent);
  opacity: 0;
  transform: scaleX(0.2);
  transform-origin: left;
  transition: opacity 360ms ease, transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.map-panel.is-pin-selected::after {
  opacity: 0.64;
  transform: scaleX(1);
}

.map-panel.is-scroll-revealing::after {
  animation: atlasRouteSweep 1120ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both;
}

@keyframes journeyScrollVeil {
  0% {
    opacity: 0;
    transform: translateY(28vh) scaleY(0.62);
  }
  34% {
    opacity: 0.82;
  }
  100% {
    opacity: 0;
    transform: translateY(-22vh) scaleY(1.08);
  }
}

@keyframes journeyHeroRelease {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0.18;
    filter: blur(10px);
    transform: translateY(-38px) scale(0.985);
  }
}

@keyframes homeMagnetSettle {
  0% {
    filter: blur(5px) saturate(0.96);
    transform: translateY(34px) scale(0.996);
  }

  72% {
    filter: blur(0) saturate(1.01);
    transform: translateY(-4px) scale(1.001);
  }

  100% {
    filter: blur(0) saturate(1);
    transform: translateY(0) scale(1);
  }
}

@keyframes homeMagnetSettleUp {
  0% {
    filter: blur(5px) saturate(0.96);
    transform: translateY(-34px) scale(0.996);
  }

  72% {
    filter: blur(0) saturate(1.01);
    transform: translateY(4px) scale(1.001);
  }

  100% {
    filter: blur(0) saturate(1);
    transform: translateY(0) scale(1);
  }
}

@keyframes atlasCopyReveal {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(34px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes atlasSurfaceReveal {
  from {
    opacity: 0;
    filter: blur(12px) saturate(0.8);
    transform: translateY(54px) scale(0.982);
  }
  to {
    opacity: 1;
    filter: blur(0) saturate(1);
    transform: translateY(0) scale(1);
  }
}

@keyframes atlasPreviewReveal {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(58px) scale(0.94);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes atlasRouteSweep {
  0% {
    opacity: 0;
    transform: scaleX(0.08);
  }
  42% {
    opacity: 0.78;
  }
  100% {
    opacity: 0;
    transform: scaleX(1);
  }
}

.map-column {
  width: min(1500px, 100%);
  margin: 0 auto;
}

.map-copy {
  width: 100%;
  margin-left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  gap: 20px;
  align-items: end;
}

.map-copy h1 {
  font-size: clamp(54px, 8vw, 142px);
}

.map-copy .brief {
  justify-self: end;
  margin-top: 0;
}

.map-shell {
  min-height: clamp(520px, 68vh, 760px);
  border-radius: 30px;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 520ms ease;
}

.map-shell.is-focus-pulse {
  animation: mapFocusPulse 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

#world-map {
  height: clamp(520px, 68vh, 760px);
}

@keyframes mapFocusPulse {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.012);
    box-shadow: 0 42px 120px rgba(36, 168, 219, 0.28);
  }
  100% {
    transform: scale(1);
  }
}

.preview-wall {
  position: absolute;
  z-index: 8;
  right: clamp(22px, 6vw, 92px);
  bottom: clamp(26px, 7vh, 86px);
  width: min(440px, calc(100vw - 44px));
  padding: 18px;
  border: 1px solid rgba(18, 48, 71, 0.14);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 30px 90px rgba(18, 48, 71, 0.16);
  backdrop-filter: blur(18px);
  transform-origin: right bottom;
  transition: opacity 260ms ease, transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.map-panel:not(.is-pin-selected) .preview-wall {
  opacity: 0.72;
  transform: translateY(18px) scale(0.96);
}

.preview-sheet-handle {
  display: none;
}

.preview-wall .preview-copy h2 {
  font-size: clamp(34px, 3.2vw, 52px);
}

.preview-wall .preview-hero {
  height: 190px;
  border-radius: 18px;
}

.preview-wall .preview-gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pin-tooltip {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.pin-tooltip::before {
  display: none;
}

.pin-tooltip-card {
  width: 190px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(18, 48, 71, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(18, 48, 71, 0.16);
  backdrop-filter: blur(12px);
}

.pin-tooltip-card img {
  width: 100%;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.pin-tooltip-card span {
  color: var(--red);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.pin-tooltip-card strong,
.pin-tooltip-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-tooltip-card strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.pin-tooltip-card small {
  color: var(--dim);
  font-size: 12px;
  font-weight: 800;
}

.journey-route-line {
  stroke-dasharray: 12 14;
  filter: drop-shadow(0 0 8px rgba(36, 168, 219, 0.55));
  animation: routeDash 1200ms linear infinite;
}

@keyframes routeDash {
  to {
    stroke-dashoffset: -52;
  }
}

.chapter-panel {
  height: auto;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  gap: clamp(24px, 4vw, 52px);
  padding-top: 116px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(18, 48, 71, 0.055) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgba(18, 48, 71, 0.05) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(223, 245, 255, 0.78) 55%, rgba(255, 246, 216, 0.88));
}

.chapter-panel::before {
  content: "CHAPTER";
  position: absolute;
  z-index: 1;
  left: 2vw;
  top: 16vh;
  color: rgba(18, 48, 71, 0.05);
  font-size: clamp(110px, 21vw, 360px);
  font-weight: 950;
  line-height: 0.8;
}

.chapter-head,
.chapter-grid {
  position: relative;
  z-index: 3;
  width: min(1500px, 100%);
  margin: 0 auto;
}

.chapter-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: end;
}

.chapter-head h2 {
  color: var(--ink);
  font-size: clamp(48px, 7vw, 116px);
  line-height: 0.88;
}

.chapter-panel .theme-switcher {
  position: relative;
  top: auto;
  right: auto;
  width: min(1500px, 100%);
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.chapter-panel .theme-chip {
  position: relative;
  min-height: clamp(360px, 50vh, 560px);
  align-content: end;
  gap: 10px;
  padding: 18px;
  border-color: rgba(18, 48, 71, 0.18);
  border-radius: 22px;
  color: #fff;
  background: #102b3f;
  box-shadow: 0 26px 74px rgba(18, 48, 71, 0.16);
  overflow: hidden;
  isolation: isolate;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 260ms ease;
}

.chapter-panel .theme-chip::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(8, 20, 32, 0.82), rgba(8, 20, 32, 0.12) 60%),
    linear-gradient(135deg, rgba(36, 168, 219, 0.18), rgba(255, 126, 110, 0.16));
}

.chapter-panel .theme-chip::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 18px;
  right: 18px;
  bottom: 14px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--amber), var(--red));
  transform: scaleX(0.2);
  transform-origin: left;
  transition: transform 260ms ease;
}

.chapter-panel .theme-chip img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.06);
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 520ms ease;
}

.chapter-panel .theme-chip span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 950;
}

.chapter-panel .theme-chip strong {
  max-width: 12ch;
  font-family:
    "Arial Narrow", "Roboto Condensed", Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(28px, 2.8vw, 42px);
  font-weight: 950;
  line-height: 0.94;
}

.chapter-panel .theme-chip small,
.chapter-panel .theme-chip em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 850;
}

.chapter-panel .theme-chip em {
  min-height: 28px;
  display: inline-grid;
  place-items: center start;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.64);
}

.chapter-panel .theme-chip:hover,
.chapter-panel .theme-chip:focus-visible {
  color: #fff;
  background: #102b3f;
  transform: translateY(-8px);
  box-shadow: 0 34px 92px rgba(18, 48, 71, 0.22);
}

.chapter-panel .theme-chip:hover::after,
.chapter-panel .theme-chip:focus-visible::after {
  transform: scaleX(1);
}

.chapter-panel .theme-chip:hover img,
.chapter-panel .theme-chip:focus-visible img {
  transform: scale(1.06);
  filter: saturate(1.16) contrast(1.08);
}

body[data-transition="paper"]::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(247, 245, 238, 0.98)),
    repeating-linear-gradient(90deg, rgba(17, 17, 17, 0.08) 0 1px, transparent 1px 34px);
}

body[data-transition="wave"]::after {
  background:
    repeating-linear-gradient(0deg, rgba(36, 168, 219, 0) 0 12px, rgba(36, 168, 219, 0.56) 12px 15px, rgba(255, 126, 110, 0.42) 15px 17px),
    linear-gradient(90deg, #07111f, #122b3d 48%, #07111f);
}

body[data-transition="terminal"]::after {
  background:
    linear-gradient(90deg, rgba(244, 255, 251, 0.98), rgba(179, 255, 111, 0.26), rgba(244, 255, 251, 0.98)),
    repeating-linear-gradient(0deg, rgba(17, 21, 18, 0.08) 0 1px, transparent 1px 8px);
}

body[data-transition="drive"]::after {
  background:
    linear-gradient(90deg, transparent 0 36%, rgba(255, 74, 110, 0.95) 42%, rgba(255, 177, 120, 0.72) 50%, transparent 62%),
    linear-gradient(90deg, #07111f, #233240 56%, #07111f);
}

body[data-transition="scroll"]::after {
  background:
    linear-gradient(90deg, rgba(116, 45, 31, 0.72), rgba(255, 248, 232, 0.98) 32% 68%, rgba(116, 45, 31, 0.72)),
    repeating-linear-gradient(90deg, rgba(122, 72, 34, 0.12) 0 2px, transparent 2px 38px);
}

@media (max-width: 980px) {
  .journey-hero {
    padding-inline: 20px;
  }

  .journey-hero-copy {
    justify-items: start;
    text-align: left;
  }

  .journey-hero h1 {
    max-width: 10ch;
  }

  .map-copy,
  .chapter-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .map-copy .brief {
    justify-self: start;
  }

  .chapter-panel .theme-switcher {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chapter-panel .theme-chip {
    min-height: 360px;
  }
}

@media (max-width: 720px) {
  .journey-hero {
    min-height: 100svh;
    padding: 118px 16px 92px;
    place-items: center start;
  }

  body:not(.is-detail-page):not(.is-theme-page):not(.is-paper-page):not(.is-cyber-page):not(.is-archive-page):not(.is-game-page):not(.is-birthday-page):not(.is-festival-page) .site-language-dock {
    top: auto;
    bottom: 92px;
    right: 14px;
  }

  .journey-hero h1 {
    max-width: 100%;
    font-size: clamp(42px, 13.6vw, 68px);
    line-height: 0.92;
  }

  .journey-hero p {
    font-size: 17px;
  }

  .journey-enter {
    left: 16px;
    right: 16px;
    bottom: 18px;
    width: auto;
  }

  .journey-hero-preview {
    display: none;
  }

  .map-panel {
    min-height: 100svh;
    padding: 132px 12px 18px;
  }

  .map-copy h1 {
    font-size: clamp(42px, 15vw, 72px);
  }

  .map-copy .brief {
    width: 100%;
  }

  .map-shell {
    min-height: calc(100svh - 300px);
    border-radius: 22px;
  }

  #world-map {
    height: calc(100svh - 300px);
    min-height: 390px;
  }

  .map-overlay {
    left: 12px;
    right: 12px;
    bottom: auto;
    top: 12px;
    min-width: 0;
  }

  .hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-wall {
    left: 12px;
    right: 12px;
    bottom: 14px;
    width: auto;
    max-height: 74vh;
    padding: 14px;
    border-radius: 22px;
    overflow: hidden;
    transform: translateY(calc(100% - 82px));
  }

  .map-panel.is-sheet-expanded .preview-wall {
    overflow-y: auto;
    transform: translateY(0);
    opacity: 1;
  }

  .preview-sheet-handle {
    width: 100%;
    min-height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .preview-sheet-handle span {
    width: 52px;
    height: 5px;
    border-radius: 999px;
    background: rgba(18, 48, 71, 0.28);
  }

  .preview-wall .preview-copy h2 {
    font-size: clamp(30px, 11vw, 48px);
  }

  .preview-wall .preview-hero {
    height: 180px;
  }

  .preview-wall .preview-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chapter-panel {
    align-content: start;
    min-height: 100svh;
    padding: 118px 14px 54px;
  }

  .chapter-head h2 {
    font-size: clamp(42px, 13vw, 68px);
    line-height: 0.98;
  }

  .chapter-panel .theme-switcher {
    width: 100%;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 82vw);
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: visible;
    padding: 4px 0 18px;
    scroll-snap-type: x mandatory;
  }

  .chapter-panel .theme-chip {
    min-height: 420px;
    scroll-snap-align: start;
  }
}

@media (max-width: 720px) {
  body:not(.is-detail-page):not(.is-theme-page):not(.is-paper-page):not(.is-cyber-page):not(.is-archive-page):not(.is-game-page):not(.is-birthday-page):not(.is-festival-page) .site-language-dock {
    top: auto;
    bottom: 92px;
    right: 14px;
  }
}

.hud .hud-account .account-link {
  color: var(--ink) !important;
  border-color: rgba(18, 48, 71, 0.18) !important;
  background: rgba(255, 255, 255, 0.88) !important;
}

.hud .hud-account .account-link.account-primary {
  color: #fff !important;
  border-color: rgba(18, 48, 71, 0.38) !important;
  background: linear-gradient(135deg, #123047 0%, #1b6f95 58%, #24a8db 100%) !important;
  box-shadow: 0 12px 28px rgba(18, 48, 71, 0.2) !important;
  text-shadow: 0 1px 2px rgba(5, 20, 30, 0.32);
}

.hud .hud-account .account-link:hover,
.hud .hud-account .account-link:focus-visible {
  color: #fff !important;
  border-color: rgba(36, 168, 219, 0.58) !important;
  background: #24a8db !important;
  transform: translateY(-2px);
}

.hud .hud-account .account-link.account-primary:hover,
.hud .hud-account .account-link.account-primary:focus-visible {
  background: linear-gradient(135deg, #0d2334 0%, #185f82 58%, #1f9ccc 100%) !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
