:root {
  color-scheme: dark;
  --ink: #fff2e4;
  --muted: #decee8;
  --edge: #eecaf33b;
  font-family: "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  background: #20142e;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 12%, #4b2a5c 0%, #2b1a3b 45%, #20142e 83%);
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid #ffe3a4; outline-offset: 4px; }
.shell { width: min(100% - 28px, 1120px); margin: auto; padding-bottom: 25px; }
.top {
  min-height: 58px;
  border-bottom: 1px solid var(--edge);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand { display: inline-flex; min-height: 44px; gap: 8px; align-items: center; font-size: .94rem; font-weight: 700; letter-spacing: .1em; }
.brand span { color: #ebb7f9; font-size: 1.2rem; }
.version { color: var(--muted); font-size: .75rem; letter-spacing: .09em; }
.intro { text-align: center; padding: 22px 0 15px; }
h1 { margin: 0; font: 800 clamp(2rem, 6vw, 3.65rem)/1.12 Georgia, "Songti TC", "PMingLiU", serif; letter-spacing: .07em; }
.intro h1 span { display: inline-block; color: #ecbbf1; font-size: .42em; margin-left: .3em; vertical-align: top; }
.intro p, .room-content p { color: var(--muted); line-height: 1.65; }
.intro p { margin: 8px 0 0; font-size: .87rem; }
.map {
  position: relative;
  width: min(100%, 945px);
  margin: auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--edge);
  box-shadow: 0 20px 70px #12091e90;
}
.map img { display: block; width: 100%; height: auto; }
#map-links { position: absolute; inset: 0; pointer-events: none; }
.building {
  position: absolute;
  width: 24%;
  height: 24%;
  transform: translate(-50%, -100%);
  pointer-events: auto;
}
.pin {
  position: absolute;
  top: 100%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 7px;
  min-width: 44px;
  min-height: 44px;
  transform: translate(-50%, -50%);
  color: #fff7ee;
  background: #251634ed;
  border: 1px solid var(--accent);
  border-radius: 99px;
  box-shadow: 0 4px 15px #120819b0;
  font-size: clamp(.69rem, 2.8vw, .95rem);
  font-weight: 750;
  white-space: nowrap;
  transition: background .18s ease, box-shadow .18s ease;
}
.pin span, .trail span { color: var(--accent); }
.building:hover .pin, .building:focus-visible .pin { background: #57366b; box-shadow: 0 0 18px var(--accent); }
.building:active .pin { background: #704682; }
.trail { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 15px; padding-top: 12px; }
.trail a { display: inline-flex; gap: 7px; min-height: 44px; align-items: center; padding: 0 7px; font-size: .86rem; color: var(--muted); }
.trail a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 460px) {
  .trail { gap: 3px 4px; }
  .trail a { flex: 0 0 29%; justify-content: center; }
}
#room { max-width: 945px; margin: 18px auto 0; animation: reveal .25s ease-out; }
.return { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--edge); border-radius: 99px; margin-bottom: 16px; }
.return:hover { background: #503260; }
.room-card { border: 1px solid var(--edge); border-radius: 20px; overflow: hidden; background: #32213e; }
.room-art { min-height: 225px; background: url("assets/island.jpg") var(--crop) / 205% auto no-repeat; }
.room-content { padding: clamp(21px, 5vw, 48px); border-top: 2px solid var(--accent); }
.room-content h1 { color: var(--accent); }
.room-content > p { margin: 10px 0 24px; }
.room-content ul { list-style: none; margin: 0; padding: 0; }
.room-content li + li { margin-top: 7px; }
.room-content li a, .pending { padding: 13px 15px; border: 1px solid var(--edge); border-radius: 12px; background: #251831; }
.room-content li a { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 48px; overflow-wrap: anywhere; }
.room-content li a:hover { border-color: var(--accent); }
.room-content li span, .pending p { font-size: .82rem; color: var(--muted); }
.pending strong { color: var(--accent); }
.pending p { margin: 4px 0 0; }
.entry-pending { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; }
.entry-pending p { flex-basis: 100%; margin: 0; }
@keyframes reveal { from { opacity: .4; transform: translateY(5px); } }
@media (min-width: 700px) {
  .shell { width: min(100% - 64px, 1120px); }
  .intro { padding: 21px 0 17px; }
  .map { width: min(100%, 945px, max(690px, calc((100svh - 260px) * 1.5))); }
  .pin { gap: 7px; padding-inline: 14px; }
  .trail { gap: 8px 29px; }
  .room-card { display: grid; grid-template-columns: 44% minmax(0, 1fr); min-height: 480px; }
  .room-art { background-size: auto 145%; }
  .room-content { align-content: center; border-top: 0; border-left: 2px solid var(--accent); }
}
@media (max-width: 360px) {
  .pin { padding-inline: 4px; gap: 2px; }
  .pin span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
