:root {
  color-scheme: light;
  --cyan: #00aeea;
  --turquoise: #00c5d1;
  --magenta: #ec008c;
  --yellow: #fff100;
  --lime: #b7ff00;
  --brown: #321b12;
  --teal-text: #006875;
  --paper: rgba(247, 253, 255, .96);
  --shadow: rgba(0, 68, 92, .22);
  --font-calligraphy: "STXingkai", "FZYaoti", "KaiTi", "SimKai", serif;
  --font-ui: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--brown);
  font-family: var(--font-ui);
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), transparent 34%, rgba(0,94,144,.10)),
    linear-gradient(135deg, #0698f0 0%, var(--cyan) 44%, var(--turquoise) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: -160px;
  z-index: -1;
  pointer-events: none;
  opacity: .24;
  background-image: url("assets/peony-chanzhi-gold-transparent.png");
  background-size: 680px 680px;
  background-position: left -80px top -140px;
  mix-blend-mode: screen;
}

button,
input,
textarea {
  font: inherit;
}

.guide-shell {
  display: grid;
  grid-template-rows: 1fr;
  gap: 0;
  width: min(100%, 1920px);
  height: 100vh;
  margin: 0 auto;
  padding: 28px;
}

.guide-topbar {
  display: none;
  grid-template-columns: 76px 1fr 76px;
  align-items: center;
  gap: 18px;
}

.icon-link,
.admin-entry,
.beauty-button,
.hall-nav button,
.dialog-head button {
  border: 5px solid var(--brown);
  color: var(--brown);
  background: var(--yellow);
  box-shadow: 6px 6px 0 rgba(236,0,140,.70);
  font-weight: 900;
  cursor: pointer;
}

.icon-link,
.admin-entry {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  text-decoration: none;
  font-size: 18px;
}

.icon-link img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-mark {
  justify-self: center;
  width: min(320px, 42vw);
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 5px 0 rgba(48,24,14,.22)) drop-shadow(0 14px 20px rgba(0,70,96,.22));
}

.guide-stage {
  display: grid;
  grid-template-columns: 238px minmax(720px, 1.04fr) minmax(540px, .96fr);
  gap: 24px;
  min-height: 0;
}

.hall-sidebar,
.guide-info,
.video-panel,
.beauty-dialog {
  background: var(--paper);
  clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 36px 100%, 0 calc(100% - 36px));
  box-shadow: 0 24px 48px var(--shadow), 8px 8px 0 rgba(183,255,0,.62);
}

.hall-sidebar {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  padding: 20px 16px 18px;
  border-top: 22px solid var(--yellow);
}

.sidebar-title {
  margin: 0 0 16px;
  padding: 10px;
  color: #fff;
  background: var(--magenta);
  box-shadow: 6px 6px 0 rgba(183,255,0,.62);
  font-family: var(--font-calligraphy);
  font-size: clamp(30px, 2.35vw, 42px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.hall-nav {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 8px 8px 0;
  scrollbar-width: thin;
}

.hall-nav button {
  position: relative;
  width: 100%;
  min-height: 74px;
  padding: 10px 12px;
  font-size: clamp(18px, 1.25vw, 24px);
  line-height: 1.18;
  text-align: left;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

.hall-nav button.active {
  color: #fff;
  background: var(--magenta);
  box-shadow: 6px 6px 0 rgba(183,255,0,.74);
}

.hall-nav button.current-location {
  padding-top: 28px;
  color: var(--brown);
  background:
    linear-gradient(90deg, rgba(255,241,0,.96), rgba(183,255,0,.92)),
    var(--yellow);
  border-color: var(--magenta);
  box-shadow:
    0 0 0 5px rgba(236,0,140,.28),
    0 0 24px rgba(183,255,0,.82),
    6px 6px 0 rgba(236,0,140,.68);
  animation: locationPulse 2.4s ease-in-out infinite;
}

.hall-nav button.current-location::before {
  content: "您在这里";
  position: absolute;
  left: 10px;
  top: 6px;
  padding: 2px 9px 3px;
  color: #fff;
  background: var(--magenta);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  box-shadow: 3px 3px 0 rgba(50,27,18,.28);
}

.hall-nav button.current-location::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 10px;
  width: 16px;
  height: 16px;
  background: var(--lime);
  border: 3px solid var(--brown);
  box-shadow: 0 0 14px rgba(183,255,0,.96);
}

.hall-nav button.current-location.active {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(236,0,140,.96), rgba(198,0,126,.92));
  border-color: var(--yellow);
}

.guide-info {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  border-top: 22px solid var(--lime);
}

.intro-head {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 18px;
  align-items: end;
  padding: 24px 34px 20px;
  background:
    radial-gradient(circle at right top, rgba(255,241,0,.38), transparent 26%),
    linear-gradient(135deg, rgba(0,174,234,.24) 0%, rgba(0,197,209,.18) 38%, rgba(183,255,0,.12) 64%, rgba(236,0,140,.14) 100%),
    rgba(232, 248, 255, .92);
  border-bottom: 4px solid rgba(0,104,117,.14);
}

.panel-surface {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.panel-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0;
  background-image: var(--panel-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity .28s ease;
}

.panel-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background:
    linear-gradient(135deg, rgba(228,247,255,.82), rgba(241,255,246,.72) 52%, rgba(255,241,0,.18) 100%),
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(236,0,140,.06));
  transition: opacity .28s ease;
}

.panel-surface.has-custom-bg::before,
.panel-surface.has-custom-bg::after {
  opacity: 1;
}

.intro-head .section-label,
.intro-head h1,
.intro-head .hall-en,
.intro-head .subtitle,
.intro-head .intro {
  grid-column: 1;
}

.intro-head .beauty-button {
  grid-column: 2;
  grid-row: 3 / span 3;
  align-self: center;
}

.scroll-content {
  min-height: 0;
  overflow-y: auto;
  padding: 22px 34px 30px;
  overscroll-behavior: contain;
}

.section-label,
.panel-kicker {
  width: fit-content;
  margin: 0 0 12px;
  padding: 7px 14px;
  color: var(--brown);
  background: var(--yellow);
  font-size: 17px;
  font-weight: 900;
  box-shadow: 5px 5px 0 rgba(236,0,140,.62);
}

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

h1 {
  margin-bottom: 4px;
  color: #fff;
  font-family: var(--font-calligraphy);
  font-size: clamp(48px, 4.1vw, 76px);
  line-height: .96;
  text-shadow: 0 6px 0 rgba(52,26,16,.36), 0 18px 38px rgba(0,60,84,.30);
}

.hall-en {
  margin-bottom: 6px;
  color: var(--magenta);
  font-size: clamp(20px, 1.45vw, 28px);
  font-weight: 900;
}

.subtitle {
  margin-bottom: 8px;
  color: var(--brown);
  font-size: clamp(22px, 1.75vw, 32px);
  font-weight: 900;
  line-height: 1.18;
}

body[data-hall-theme="menshen"] .intro-head {
  background:
    radial-gradient(circle at right top, rgba(246, 240, 168, .54), transparent 28%),
    linear-gradient(90deg, rgba(239,245,214,.88) 0%, rgba(223,233,189,.78) 22%, rgba(186,202,203,.70) 62%, rgba(211,220,214,.66) 100%);
}

body[data-hall-theme="menshen"] .intro-head h1 {
  color: #fffdf5;
  text-shadow:
    0 4px 0 rgba(104, 110, 104, .36),
    0 12px 24px rgba(95, 108, 110, .28);
}

body[data-hall-theme="menshen"] .intro-head .hall-en {
  color: #e4007f;
  text-shadow: 0 2px 0 rgba(255,255,255,.28);
}

body[data-hall-theme="menshen"] .intro-head .subtitle {
  color: #3a281f;
}

body[data-hall-theme="menshen"] .intro-head .intro {
  color: #0f6f78;
}

.intro,
.text-panel p,
.video-panel p,
.guide-footer {
  color: var(--teal-text);
  font-size: clamp(18px, 1.18vw, 23px);
  font-weight: 800;
  line-height: 1.66;
}

.beauty-button {
  min-width: 128px;
  min-height: 76px;
  margin-top: 0;
  padding: 10px 22px;
  font-size: 24px;
}

.text-panel,
.list-panel,
.guide-footer {
  margin-bottom: 18px;
  padding: 22px 26px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.78), rgba(226,246,255,.84)),
    rgba(255,255,255,.78);
  border-left: 10px solid var(--magenta);
}

.text-panel:first-child {
  border-left-color: var(--lime);
}

h2 {
  margin-bottom: 12px;
  color: var(--brown);
  font-family: var(--font-calligraphy);
  font-size: clamp(34px, 2.45vw, 48px);
  line-height: 1.04;
}

.guide-list {
  display: grid;
  gap: 12px;
}

.guide-list article {
  padding: 15px 18px;
  color: var(--brown);
  background: rgba(255, 241, 0, .78);
  border-left: 8px solid var(--magenta);
  font-size: clamp(17px, 1.08vw, 21px);
  font-weight: 900;
  line-height: 1.56;
}

.guide-list strong {
  display: block;
  margin-bottom: 4px;
}

.guide-footer {
  margin-bottom: 0;
  border-left-color: var(--lime);
}

.guide-footer p {
  margin: 0 0 8px;
  color: var(--brown);
  font-size: clamp(17px, 1.12vw, 22px);
  font-weight: 900;
}

.video-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  padding: 24px;
  border-top: 22px solid var(--yellow);
}

.video-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 18px;
  align-content: start;
  align-items: center;
  order: 2;
  margin-top: 16px;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.78), rgba(225,247,255,.86) 55%, rgba(255,241,0,.16)),
    rgba(255,255,255,.78);
  border-left: 10px solid var(--magenta);
}

.video-copy .panel-kicker,
.video-copy h2,
.video-copy p {
  grid-column: 1;
}

.video-copy h2 {
  font-size: clamp(34px, 2.85vw, 54px);
}

.carousel-frame,
.video-dialog-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(236,0,140,.86), rgba(255,241,0,.84)),
    url("assets/peony-chanzhi-gold-transparent.png");
  background-size: cover;
  border: 8px solid var(--brown);
}

.carousel-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(236,0,140,.18), rgba(255,241,0,.14));
  pointer-events: none;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .8s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-dots {
  position: absolute;
  left: 22px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  gap: 10px;
}

.carousel-dots span {
  width: 14px;
  height: 14px;
  background: rgba(255,255,255,.78);
  border: 3px solid var(--brown);
}

.carousel-dots span.active {
  background: var(--yellow);
}

.video-dialog-frame video,
.video-dialog-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.video-open-button {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  min-width: 132px;
  min-height: 70px;
  border: 5px solid var(--brown);
  color: var(--brown);
  background: var(--yellow);
  box-shadow: 6px 6px 0 rgba(236,0,140,.70);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

.video-placeholder {
  padding: 36px;
  color: var(--brown);
  text-align: center;
  font-size: clamp(24px, 2.3vw, 42px);
  font-weight: 900;
  line-height: 1.38;
}

.beauty-dialog,
.video-dialog {
  width: min(1560px, calc(100vw - 80px));
  height: min(880px, calc(100vh - 80px));
  max-width: none;
  max-height: none;
  padding: 28px;
  border: 0;
  border-top: 22px solid var(--lime);
}

.beauty-dialog::backdrop,
.video-dialog::backdrop {
  background: rgba(0, 64, 88, .62);
}

.video-dialog-frame {
  height: calc(100% - 110px);
  background: #111;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}

.dialog-head h2 {
  margin: 0;
}

.dialog-head button {
  min-width: 116px;
  min-height: 54px;
  font-size: 20px;
}

.image-gallery {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 20px;
  height: calc(100% - 110px);
}

.image-card {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
  box-shadow: 0 18px 34px rgba(0,68,92,.20), 7px 7px 0 rgba(236,0,140,.55);
}

.image-card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  background: linear-gradient(135deg, var(--cyan), var(--turquoise));
}

.image-card figcaption {
  padding: 14px 18px;
  color: var(--brown);
  background: var(--yellow);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.45;
}

.hidden-admin-entry {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 30;
  width: 96px;
  height: 96px;
  opacity: 0;
  background: transparent;
}

.idle-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  opacity: 0;
  pointer-events: none;
  transition: opacity .42s ease;
  background: rgba(0, 26, 36, .24);
}

body.idle-mode .idle-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.idle-mode .guide-shell,
body.idle-mode .hidden-admin-entry {
  pointer-events: none;
}

.idle-carousel-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #111;
}

.idle-carousel-frame .carousel-slide {
  object-fit: cover;
}

.idle-carousel-frame .carousel-dots {
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
}

.idle-overlay-copy {
  position: relative;
  z-index: 2;
  align-self: end;
  justify-self: center;
  display: grid;
  gap: 14px;
  justify-items: center;
  margin-bottom: 56px;
}

.idle-brand-mark {
  width: min(360px, 40vw);
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .32));
}

.idle-overlay-hint {
  margin: 0;
  padding: 10px 18px;
  color: #fff;
  background: rgba(50,27,18,.42);
  border: 2px solid rgba(255,241,0,.58);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

@keyframes locationPulse {
  0%,
  100% {
    transform: translateY(0);
    filter: brightness(1);
  }

  50% {
    transform: translateY(-2px);
    filter: brightness(1.08);
  }
}

@media (max-width: 1100px) {
  html,
  body {
    overflow: auto;
  }

  .guide-shell {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto auto;
  }

  .guide-stage,
  .image-gallery {
    grid-template-columns: 1fr;
  }

  .guide-info,
  .video-panel {
    min-height: 620px;
  }
}
