:root {
  --bg: #171410;
  --bg-soft: rgba(28, 23, 18, 0.78);
  --paper: #f0e5cf;
  --paper-deep: #d8c8a8;
  --ink: #251d15;
  --muted: #ad9d82;
  --accent: #d1a84b;
  --accent-strong: #b94732;
  --gold-soft: rgba(230, 190, 102, 0.18);
  --gold-line: rgba(239, 205, 128, 0.52);
  --line: rgba(240, 229, 207, 0.22);
  --shadow: rgba(0, 0, 0, 0.36);
  --panel-width: 392px;
  color-scheme: dark;
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 12%, rgba(185, 71, 50, 0.2), transparent 28%),
    linear-gradient(135deg, #171410, #241c15 46%, #11100d);
  color: var(--paper);
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

::selection {
  background: transparent;
}

body.protection-active::before {
  content: "";
  position: fixed;
  z-index: 9998;
  inset: 0;
  background:
    repeating-linear-gradient(
      -24deg,
      rgba(255, 236, 178, 0.025) 0,
      rgba(255, 236, 178, 0.025) 2px,
      transparent 2px,
      transparent 72px
    ),
    rgba(15, 12, 9, 0.42);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

body.protection-active::after {
  content: attr(data-protection-message);
  position: fixed;
  z-index: 9999;
  top: 50%;
  left: 50%;
  width: min(520px, calc(100vw - 48px));
  padding: 18px 22px;
  border: 1px solid rgba(239, 205, 128, 0.42);
  border-radius: 8px;
  background: rgba(20, 17, 13, 0.86);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
  color: #fff4dd;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.42;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 18px;
  left: 18px;
  right: 402px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 17, 13, 0.72);
  box-shadow: 0 18px 48px var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(209, 168, 75, 0.56);
  border-radius: 7px;
  background: rgba(209, 168, 75, 0.13);
  color: var(--accent);
  font-weight: 700;
}

.brand h1 {
  margin: 0;
  overflow: hidden;
  color: #fff4dd;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 760;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand p {
  margin: 4px 0 0;
  color: var(--paper-deep);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}

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

.toolbar button,
.utility-toolbar button,
.utility-toolbar .purchase-cta,
.route button {
  min-height: 38px;
  border: 1px solid rgba(239, 205, 128, 0.24);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 243, 211, 0.14), rgba(64, 49, 34, 0.2)),
    rgba(240, 229, 207, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 226, 0.16),
    0 10px 22px rgba(0, 0, 0, 0.22);
  color: #fff4dd;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.toolbar button {
  min-width: 44px;
  padding: 0 13px;
}

.utility-toolbar {
  position: fixed;
  z-index: 26;
  top: 30px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(240, 229, 207, 0.18);
  border-radius: 999px;
  background: rgba(20, 17, 13, 0.66);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.utility-toolbar button {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 760;
  line-height: 1;
}

.utility-toolbar button[data-action="audio"] {
  color: #f4d98d;
}

.utility-toolbar .purchase-cta {
  display: grid;
  width: 132px;
  min-width: 132px;
  height: 38px;
  place-items: center;
  padding: 0 16px;
  border: 1px solid rgba(239, 205, 128, 0.64);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(252, 221, 137, 0.28), rgba(103, 69, 32, 0.3)),
    rgba(209, 168, 75, 0.16);
  color: #fff4dd;
  font-size: 14px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.author-contact {
  position: fixed;
  z-index: 17;
  right: 20px;
  bottom: 14px;
  margin: 0;
  color: rgba(255, 244, 221, 0.58);
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.72);
  white-space: nowrap;
}

.purchase-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 10, 8, 0.7);
  backdrop-filter: blur(14px);
}

.purchase-modal.is-hidden {
  display: none;
}

.purchase-dialog {
  position: relative;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  justify-items: center;
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(239, 205, 128, 0.38);
  border-radius: 8px;
  background: rgba(24, 20, 15, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 226, 0.12),
    0 28px 80px rgba(0, 0, 0, 0.58);
}

.purchase-dialog h2 {
  margin: 6px 0 14px;
  color: #fff4dd;
  font-size: 24px;
  line-height: 1.2;
}

.purchase-kicker {
  padding: 4px 8px;
  border: 1px solid rgba(209, 168, 75, 0.38);
  border-radius: 999px;
  color: #ebcb77;
  font-size: 12px;
}

.purchase-qr {
  display: block;
  width: min(216px, 62vw);
  height: auto;
  aspect-ratio: 1;
  background: #fff;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.purchase-dialog p {
  margin: 14px 0 0;
  color: #f0e5cf;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.purchase-preview {
  position: relative;
  width: min(216px, 62vw);
  margin: 12px 0 0;
  overflow: hidden;
  border: 1px solid rgba(239, 205, 128, 0.32);
  border-radius: 6px;
  background: #191c22;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.purchase-preview img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.purchase-preview figcaption {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 244, 221, 0.18);
  border-radius: 4px;
  background: rgba(18, 16, 13, 0.82);
  color: #fff4dd;
  font-size: 10px;
  line-height: 1;
}

.purchase-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(240, 229, 207, 0.2);
  border-radius: 50%;
  background: rgba(240, 229, 207, 0.08);
  color: #fff4dd;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.purchase-close:hover,
.purchase-close:focus-visible {
  border-color: rgba(239, 205, 128, 0.7);
  background: rgba(209, 168, 75, 0.14);
  outline: none;
}

.toolbar button:hover,
.utility-toolbar button:hover,
.utility-toolbar .purchase-cta:hover,
.route button:hover {
  border-color: rgba(239, 205, 128, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 238, 184, 0.2), rgba(82, 59, 34, 0.24)),
    rgba(209, 168, 75, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 226, 0.22),
    0 12px 26px rgba(0, 0, 0, 0.24),
    0 0 0 3px rgba(209, 168, 75, 0.1);
}

.toolbar button[aria-pressed="true"],
.utility-toolbar button[aria-pressed="true"] {
  border-color: rgba(239, 205, 128, 0.82);
  background:
    linear-gradient(180deg, rgba(252, 221, 137, 0.28), rgba(103, 69, 32, 0.26)),
    rgba(209, 168, 75, 0.16);
  color: #fff7db;
}

.toolbar button:active,
.utility-toolbar button:active,
.route button:active {
  transform: translateY(1px);
}

.viewer {
  position: relative;
  min-height: 100dvh;
}

.viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.viewport.dragging {
  cursor: grabbing;
}

.stage {
  --marker-scale: 1;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.stage::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='520'%20height='220'%20viewBox='0%200%20520%20220'%3E%3Ctext%20x='160'%20y='125'%20fill='%23fff4d6'%20fill-opacity='.2'%20stroke='%2324180e'%20stroke-opacity='.3'%20stroke-width='.9'%20font-family='Arial,sans-serif'%20font-size='34'%20font-weight='600'%20letter-spacing='2.4'%20transform='rotate(-16%20260%20110)'%3EBrucewu%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 520px 220px;
  content: "";
  opacity: 0.82;
  pointer-events: none;
  user-select: none;
}

#painting {
  display: block;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.hotspots,
.appreciation-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hotspots {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    visibility 0s linear 180ms;
}

body.quest-guidance-open .hotspots {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

body.appreciation-open .hotspots {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.appreciation-layer {
  z-index: 3;
  display: none;
  opacity: 0;
}

.appreciation-layer.is-visible {
  display: block;
  opacity: 1;
}

.hotspot {
  --hotspot-size: 40px;
  position: absolute;
  z-index: 2;
  display: grid;
  width: var(--hotspot-size);
  height: var(--hotspot-size);
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #21170d;
  cursor: pointer;
  opacity: 0.98;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(var(--marker-scale));
  transform-origin: center;
  transition:
    opacity 160ms ease,
    filter 160ms ease;
}

.hotspot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(255, 224, 139, 0.54);
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 0 0 8px rgba(209, 168, 75, 0.075),
    0 0 30px rgba(247, 205, 100, 0.34);
  animation: markerBreath 2.8s ease-in-out infinite;
}

.hotspot::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 239, 180, 0.9);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 250, 222, 0.98) 0 12%, transparent 15%),
    transparent;
  box-shadow:
    inset 0 0 0 1px rgba(166, 112, 39, 0.24),
    inset 0 0 10px rgba(255, 239, 180, 0.22),
    0 0 17px rgba(239, 205, 128, 0.56);
  animation: markerCore 2.8s ease-in-out infinite;
}

.hotspot:hover,
.hotspot:focus-visible,
.hotspot.is-active {
  filter: saturate(1.12) brightness(1.12);
  opacity: 1;
}

.hotspot.is-active::before {
  border-color: rgba(255, 232, 157, 0.72);
  box-shadow:
    0 0 0 9px rgba(209, 168, 75, 0.1),
    0 0 38px rgba(247, 205, 100, 0.46);
}

.hotspot.is-active::after {
  border-color: rgba(255, 242, 196, 0.98);
  background:
    radial-gradient(circle, rgba(255, 251, 224, 1) 0 12%, transparent 15%),
    transparent;
}

.hotspot-label {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  width: max-content;
  max-width: 180px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 244, 221, 0.2);
  border-radius: 6px;
  background: rgba(23, 20, 16, 0.84);
  color: #fff4dd;
  font-size: 12px;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  white-space: normal;
}

.hotspot:hover .hotspot-label,
.hotspot:focus-visible .hotspot-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.appreciation-point {
  --appreciation-size: 32px;
  position: absolute;
  display: grid;
  width: var(--appreciation-size);
  height: var(--appreciation-size);
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 186, 0.5),
    0 0 0 5px rgba(209, 168, 75, 0.085),
    0 0 28px rgba(239, 205, 128, 0.32);
  cursor: pointer;
  opacity: 0.92;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(var(--marker-scale));
  transform-origin: center;
  animation: appreciationPulse 3.4s ease-in-out var(--delay) infinite;
}

.appreciation-point::before,
.appreciation-point::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
}

.appreciation-point::before {
  inset: -8px;
  border: 1px solid rgba(255, 229, 146, 0.34);
  background: transparent;
}

.appreciation-point::after {
  inset: 11px;
  background: radial-gradient(circle, rgba(255, 248, 213, 0.98) 0 44%, transparent 50%);
  box-shadow:
    0 0 0 1px rgba(255, 248, 213, 0.52),
    0 0 14px rgba(239, 205, 128, 0.58);
}

.appreciation-point:hover,
.appreciation-point:focus-visible,
.appreciation-point.is-active {
  border-color: rgba(255, 238, 177, 0.96);
  background: transparent;
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 186, 0.7),
    0 0 0 5px rgba(209, 168, 75, 0.09),
    0 0 31px rgba(239, 205, 128, 0.36);
  opacity: 1;
}

.appreciation-point.is-active {
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 203, 0.82),
    0 0 0 6px rgba(209, 168, 75, 0.12),
    0 0 34px rgba(239, 205, 128, 0.42);
}

.appreciation-point-label {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  width: max-content;
  max-width: 170px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 244, 221, 0.2);
  border-radius: 6px;
  background: rgba(23, 20, 16, 0.86);
  color: #fff4dd;
  font-size: 12px;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  white-space: normal;
}

.appreciation-point:hover .appreciation-point-label,
.appreciation-point:focus-visible .appreciation-point-label,
.appreciation-point.is-active .appreciation-point-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.guide-panel {
  position: fixed;
  z-index: 18;
  top: 100px;
  right: 18px;
  width: min(var(--panel-width), calc(100vw - 36px));
  max-height: calc(100dvh - 136px);
  overflow: auto;
  border: 1px solid rgba(240, 229, 207, 0.2);
  border-radius: 8px;
  background: rgba(22, 18, 14, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.guide-panel.is-empty {
  width: min(340px, calc(100vw - 36px));
}

.quest-panel {
  position: fixed;
  z-index: 19;
  top: 100px;
  bottom: 104px;
  left: 18px;
  width: min(360px, calc(100vw - 36px));
  overflow: auto;
  border: 1px solid rgba(240, 229, 207, 0.2);
  border-radius: 8px;
  background: rgba(22, 18, 14, 0.86);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

body.quest-open .guide-panel.is-empty {
  display: none;
}

.quest-panel.is-hidden {
  display: none;
}

.quest-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.quest-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}

.quest-title-row h2,
.quest-active h3,
.quest-card h3 {
  margin: 0;
  color: #fff4dd;
}

.quest-title-row h2 {
  margin-top: 8px;
  font-size: 23px;
  line-height: 1.12;
}

.quest-title-row button,
.quest-next button,
.quest-card button {
  min-height: 44px;
  border: 1px solid rgba(240, 229, 207, 0.2);
  border-radius: 7px;
  background: rgba(240, 229, 207, 0.08);
  color: #fff4dd;
  cursor: pointer;
}

.quest-title-row button {
  padding: 0 11px;
}

.quest-title-row button:hover,
.quest-next button:hover,
.quest-card button:hover {
  border-color: rgba(209, 168, 75, 0.7);
  background: rgba(209, 168, 75, 0.14);
}

.quest-intro,
.quest-active p,
.quest-card p,
.quest-next p,
.quest-steps p {
  margin: 0;
  color: #d8c8a8;
  font-size: 13px;
  line-height: 1.64;
}

.quest-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quest-badges span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(209, 168, 75, 0.32);
  border-radius: 999px;
  background: rgba(209, 168, 75, 0.12);
  color: #f1d489;
  font-size: 12px;
}

.quest-active,
.quest-card {
  border: 1px solid rgba(240, 229, 207, 0.14);
  border-radius: 8px;
  background: rgba(240, 229, 207, 0.06);
}

.quest-active {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.quest-active-head,
.quest-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #cbbd9f;
  font-size: 12px;
}

.quest-active-head strong,
.quest-card > div strong {
  color: #f1d489;
}

.quest-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(240, 229, 207, 0.14);
}

.quest-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
}

.quest-next {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(209, 168, 75, 0.24);
  border-radius: 7px;
  background: rgba(209, 168, 75, 0.1);
}

.quest-next strong {
  color: #fff0c8;
  font-size: 13px;
}

.quest-next button,
.quest-card button {
  padding: 0 12px;
}

.quest-steps {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quest-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  color: #e9ddc7;
}

.quest-steps li > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(240, 229, 207, 0.18);
  border-radius: 50%;
  background: rgba(240, 229, 207, 0.08);
  color: #cbbd9f;
  font-size: 12px;
}

.quest-steps strong {
  display: block;
  margin-bottom: 3px;
  color: #fff0c8;
  font-size: 13px;
}

.quest-steps li.is-found > span {
  border-color: rgba(209, 168, 75, 0.7);
  background: rgba(209, 168, 75, 0.22);
  color: #f1d489;
}

.quest-list {
  display: grid;
  gap: 10px;
}

.quest-card {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.quest-card.is-active {
  border-color: rgba(209, 168, 75, 0.55);
  background: rgba(209, 168, 75, 0.1);
}

.quest-toast {
  position: fixed;
  z-index: 36;
  bottom: 22px;
  left: 50%;
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 14px;
  border: 1px solid rgba(209, 168, 75, 0.42);
  border-radius: 8px;
  background: rgba(22, 18, 14, 0.9);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  color: #fff4dd;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.quest-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.panel-empty,
.panel-body {
  padding: 22px;
}

.panel-empty {
  display: grid;
  min-height: 220px;
  align-content: center;
  justify-items: start;
  gap: 10px;
  padding: 18px;
}

.panel-empty .seal {
  width: 42px;
  height: 42px;
}

.panel-empty h2 {
  font-size: 22px;
}

.seal {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(185, 71, 50, 0.66);
  border-radius: 8px;
  background: rgba(185, 71, 50, 0.2);
  color: #ffc2aa;
  font-weight: 800;
}

.panel-empty h2,
.panel-body h2 {
  margin: 0;
  color: #fff4dd;
  font-size: 25px;
  line-height: 1.18;
}

.panel-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}

.panel-title-row button {
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid rgba(240, 229, 207, 0.2);
  border-radius: 7px;
  background: rgba(240, 229, 207, 0.08);
  color: #fff4dd;
  cursor: pointer;
}

.panel-title-row button:hover {
  border-color: rgba(209, 168, 75, 0.7);
  background: rgba(209, 168, 75, 0.14);
}

.panel-empty p,
.panel-body p {
  margin: 0;
  color: #d8c8a8;
  font-size: 14px;
  line-height: 1.72;
}

.panel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid rgba(209, 168, 75, 0.35);
  border-radius: 999px;
  color: #ebcb77;
  font-size: 12px;
}

.panel-kicker-muted {
  border-color: rgba(240, 229, 207, 0.2);
  color: #d8c8a8;
}

.panel-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(240, 229, 207, 0.14);
}

.panel-section h3 {
  margin: 0 0 10px;
  color: #fff0c8;
  font-size: 14px;
}

.panel-section ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.panel-section li {
  position: relative;
  padding-left: 16px;
  color: #e9ddc7;
  font-size: 13px;
  line-height: 1.58;
}

.panel-section li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.panel-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.panel-actions button {
  min-height: 36px;
  border: 1px solid rgba(240, 229, 207, 0.2);
  border-radius: 7px;
  background: rgba(240, 229, 207, 0.08);
  color: #fff4dd;
  cursor: pointer;
}

.panel-actions button:hover {
  border-color: rgba(209, 168, 75, 0.7);
  background: rgba(209, 168, 75, 0.14);
}

.panel-actions .panel-primary {
  border-color: rgba(209, 168, 75, 0.55);
  background: rgba(209, 168, 75, 0.16);
}

.route {
  position: fixed;
  z-index: 16;
  right: calc(var(--panel-width) + 38px);
  bottom: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(58px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 17, 13, 0.72);
  box-shadow: 0 18px 48px var(--shadow);
  backdrop-filter: blur(18px);
}

.route button {
  display: grid;
  place-items: center;
  direction: ltr;
  padding: 0 10px;
}

.route button span {
  color: #cbbd9f;
  font-size: 11px;
}

.route button.is-active {
  border-color: rgba(209, 168, 75, 0.78);
  background:
    linear-gradient(180deg, rgba(252, 221, 137, 0.24), rgba(103, 69, 32, 0.26)),
    rgba(209, 168, 75, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 226, 0.22),
    0 0 0 3px rgba(209, 168, 75, 0.11);
}

.route-line {
  position: relative;
  direction: ltr;
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(240, 229, 207, 0.14);
}

.route-line span {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
}

.gesture-tip {
  position: fixed;
  z-index: 17;
  left: 18px;
  bottom: 104px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: min(640px, calc(100vw - var(--panel-width) - 64px));
  color: #fff4dd;
  font-size: 12px;
}

.gesture-tip span {
  padding: 7px 10px;
  border: 1px solid rgba(240, 229, 207, 0.18);
  border-radius: 999px;
  background: rgba(20, 17, 13, 0.62);
  backdrop-filter: blur(14px);
}

.panel-title-row button,
.panel-actions button,
.quest-title-row button,
.quest-next button,
.quest-card button {
  border-color: rgba(239, 205, 128, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 243, 211, 0.12), rgba(64, 49, 34, 0.18)),
    rgba(240, 229, 207, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 226, 0.14),
    0 8px 18px rgba(0, 0, 0, 0.18);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.panel-title-row button:hover,
.panel-actions button:hover,
.quest-title-row button:hover,
.quest-next button:hover,
.quest-card button:hover {
  border-color: rgba(239, 205, 128, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 238, 184, 0.18), rgba(82, 59, 34, 0.24)),
    rgba(209, 168, 75, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 226, 0.2),
    0 10px 22px rgba(0, 0, 0, 0.22);
}

.panel-title-row button:active,
.panel-actions button:active,
.quest-title-row button:active,
.quest-next button:active,
.quest-card button:active {
  transform: translateY(1px);
}

.loader {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 18px;
  background: #171410;
  color: var(--paper);
  font-size: 15px;
}

.loader span {
  width: 220px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(240, 229, 207, 0.14);
}

.loader span::after {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: loading 1s ease-in-out infinite alternate;
}

.loader.is-hidden {
  display: none;
}

@keyframes loading {
  from {
    transform: translateX(-20%);
  }
  to {
    transform: translateX(150%);
  }
}

@keyframes markerBreath {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.86;
    transform: scale(1.14);
  }
}

@keyframes markerCore {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.16);
  }
}

@keyframes appreciationPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(calc(var(--marker-scale) * 0.92));
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(calc(var(--marker-scale) * 1.08));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.purchase-cta:focus-visible {
  outline: 2px solid #f4d98d;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    right: 12px;
  }

  .brand p {
    white-space: normal;
  }

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

  .toolbar button {
    min-width: 0;
    min-height: 44px;
    padding: 0 8px;
  }

  .utility-toolbar {
    top: auto;
    right: 12px;
    bottom: 92px;
    gap: 7px;
  }

  .utility-toolbar button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .guide-panel {
    top: auto;
    right: 12px;
    bottom: 86px;
    left: 12px;
    width: auto;
    max-height: 46dvh;
  }

  body.panel-open .guide-panel {
    bottom: 12px;
    max-height: 58dvh;
  }

  .quest-panel {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: 58dvh;
  }

  body.panel-open .quest-panel {
    display: none;
  }

  body.panel-open .quest-toast {
    bottom: calc(58dvh + 38px);
  }

  .guide-panel.is-empty,
  .guide-panel:not(.is-open) {
    display: none;
  }

  .route {
    right: 12px;
    bottom: 12px;
    left: 12px;
    direction: ltr;
    grid-template-columns: repeat(6, 1fr);
  }

  body.panel-open .route,
  body.panel-open .gesture-tip,
  body.panel-open .utility-toolbar,
  body.quest-open .route,
  body.quest-open .gesture-tip,
  body.quest-open .utility-toolbar {
    display: none;
  }

  .route-line span {
    right: auto;
    left: 0;
  }

  .hotspot {
    --hotspot-size: 64px;
  }

  .appreciation-point {
    --appreciation-size: 44px;
  }

  .gesture-tip {
    right: 12px;
    bottom: 92px;
    left: 12px;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .topbar {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand h1 {
    font-size: 18px;
  }

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

  .toolbar button {
    min-height: 44px;
  }

  .utility-toolbar {
    right: 10px;
    left: 10px;
    justify-content: center;
    bottom: 150px;
  }

  .utility-toolbar .purchase-cta {
    width: 124px;
    min-width: 124px;
    padding: 0 10px;
    font-size: 13px;
  }

  .author-contact {
    right: 12px;
    bottom: 94px;
  }

  body.panel-open .author-contact,
  body.quest-open .author-contact,
  body.purchase-open .author-contact {
    display: none;
  }

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

  .route button {
    padding: 0 4px;
    font-size: 12px;
    min-height: 44px;
  }

  .gesture-tip {
    font-size: 11px;
  }

  .panel-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 380px) {
  .utility-toolbar {
    gap: 4px;
    padding: 5px;
  }

  .utility-toolbar button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }

  .utility-toolbar .purchase-cta {
    width: 116px;
    min-width: 116px;
    padding: 0 10px;
    font-size: 12px;
  }

}

@media print {
  body * {
    visibility: hidden !important;
  }

  body::before {
    content: "付费互动内容禁止打印、复制和保存。";
    position: fixed;
    inset: 0;
    display: grid;
    visibility: visible !important;
    place-items: center;
    background: #171410;
    color: #fff4dd;
    font-size: 18px;
    font-weight: 760;
  }
}
