/* ============================================================
   鯨掘・骨語 — 展場掃碼互動
   設計語彙：深海鯨落——整頁是一道從瀉湖表層沉到海床的水體，背景飄著海洋雪。
   手機直式優先；字型全用系統內建，展場網路不穩也不會掉字型。
   ============================================================ */

:root {
  /* 深海鯨落：從瀉湖表層的光，沉到不見天日的海床 */
  --ink: #030a0f;
  --sediment: rgba(17, 42, 56, 0.72);
  --sediment-hi: rgba(26, 60, 78, 0.85);
  --matrix: #2c4f63;
  --bone: #eaf4f7;
  --bone-dim: #8ba7b4;
  --amber: #f0b866;
  --amber-hi: #ffd08a;
  --amber-dim: #8a663a;
  --lagoon: #56c4d8;
  --correct: #5fc48c;
  --wrong: #e0705f;

  --serif: "Noto Serif TC", "Noto Serif CJK TC", "Source Han Serif TC", "PingFang TC",
    "Songti TC", serif;
  --sans: "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Heiti TC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* 水體：表層的光 → 中層 → 海床 */
  --page-bg: linear-gradient(180deg, #0d3247 0%, #0a2536 22%, #061722 52%, #030a0f 100%);

  --lagoon-wash: rgba(86, 196, 216, 0.1);
  --correct-wash: rgba(95, 196, 140, 0.12);
  --wrong-wash: rgba(224, 112, 95, 0.12);
  --amber-wash: rgba(240, 184, 102, 0.1);
  --badge-bg: linear-gradient(135deg, rgba(240, 184, 102, 0.16), transparent);

  /* 未來標本標籤永遠是紙的顏色，不隨主題變（它模仿的是實體標籤卡） */
  --paper: #f4efe4;
  --paper-ink: #2a2419;
  --paper-dim: #8a7f66;
  --paper-rule: #d5ccb6;

  --radius: 14px;
  --shell: 30rem;
}

/* --- reset ------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.02em;
  background-image: var(--page-bg);
  background-attachment: fixed;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* --- 版面骨架 --------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 1.25rem 1.15rem 4rem;
}

.screen {
  animation: rise 0.45s ease-out;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

/* --- 通用字級 --------------------------------------------- */

.kicker {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
}

.title-xl {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 11vw, 2.9rem);
  line-height: 1.2;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.title-lg {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.4;
  font-weight: 700;
}

.title-md {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
  font-weight: 700;
}

.body-dim {
  color: var(--bone-dim);
  font-size: 0.92rem;
}

.rule {
  width: 3rem;
  height: 3px;
  background: var(--amber);
  border-radius: 2px;
  margin: 1rem 0;
}

/* --- 語言切換 --------------------------------------------- */

.lang-bar {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.lang-btn {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--bone-dim);
  border: 1px solid var(--matrix);
  transition: all 0.2s;
}

.lang-btn[aria-pressed="true"] {
  background: var(--bone);
  border-color: var(--bone);
  color: var(--ink);
  font-weight: 600;
}

/* --- 入口 ------------------------------------------------- */

.entry-hosts {
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--bone-dim);
  letter-spacing: 0.04em;
}

.entry-hero {
  margin: 1.75rem 0 2rem;
}

.entry-invite {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.75;
  margin-bottom: 0.85rem;
}

.entry-section-label {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--bone-dim);
  margin-bottom: 0.85rem;
}

.role-list {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.role-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  text-align: start;
  padding: 1rem;
  border: 1px solid var(--matrix);
  border-radius: var(--radius);
  background: var(--sediment);
  transition: all 0.2s;
}

.role-card:hover {
  border-color: var(--amber-dim);
}

.role-card[aria-pressed="true"] {
  border-color: var(--amber);
  background: var(--sediment-hi);
  box-shadow: 0 0 0 1px var(--amber);
}

.role-emoji {
  font-size: 1.6rem;
  line-height: 1.4;
}

/* 角色插圖：吉祥物頭上寫著角色名。靠上裁切，讓帽子上的字露出來。 */
.role-figure {
  display: block;
}

.role-img {
  display: block;
  width: 66px;
  height: 92px;
  object-fit: cover;
  object-position: top center;
  border-radius: 12px;
  /* 圖已去背；讓角色浮在該主題的背景色上。筆記本主題另外補白色貼紙底。 */
  background: transparent;
}

.role-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
}

.role-tagline {
  font-size: 0.82rem;
  color: var(--bone-dim);
  line-height: 1.6;
}

/* --- 證據收集列（湊滿五件解開骨語檔案）------------------- */

.badge-collect {
  margin: 1rem 0;
}

.badge-tray {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.badge-slot {
  inline-size: 2.7rem;
  block-size: 2.7rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px dashed var(--matrix);
  color: var(--bone-dim);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  background: transparent;
  transition: all 0.3s;
}

.badge-slot.is-got {
  border-style: solid;
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-wash);
  box-shadow: 0 0 0 1px var(--amber);
}

.badge-slot.is-new {
  animation: badge-pop 0.55s ease-out;
}

@keyframes badge-pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  60% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.badge-collect-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--bone-dim);
  margin-top: 0.5rem;
}

/* --- 按鈕 ------------------------------------------------- */

.btn {
  display: block;
  width: 100%;
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--amber);
  color: var(--ink);
}

.btn-primary:hover:not(:disabled) {
  background: var(--amber-hi);
}

.btn-primary:disabled {
  background: var(--matrix);
  color: var(--bone-dim);
  cursor: not-allowed;
}

.btn-ghost {
  border: 1px solid var(--matrix);
  color: var(--bone-dim);
}

.btn-ghost:hover {
  border-color: var(--bone-dim);
  color: var(--bone);
}

.btn-row {
  margin-top: 1.25rem;
}

/* --- 任務頁首 --------------------------------------------- */

.task-head {
  margin-bottom: 1.5rem;
}

.progress {
  display: flex;
  gap: 0.3rem;
  margin: 0.85rem 0 0.5rem;
}

.progress-pip {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--matrix);
  transition: background 0.35s;
}

.progress-pip.is-done {
  background: var(--amber);
}

.progress-pip.is-current {
  background: var(--bone);
}

.progress-note {
  font-size: 0.75rem;
  color: var(--bone-dim);
}

.task-intro {
  margin-top: 0.85rem;
  line-height: 1.8;
}

/* 「回到展品找線索」— 全站最該被看到的東西之一 */
.exhibit-cue {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  margin-top: 1.15rem;
  padding: 0.85rem 1rem;
  border-inline-start: 3px solid var(--lagoon);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--lagoon-wash);
}

.exhibit-cue-icon {
  font-size: 1.05rem;
}

.exhibit-cue-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--lagoon);
  font-weight: 700;
  text-transform: uppercase;
}

.exhibit-cue-text {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--bone);
}

/* --- 題目卡 ----------------------------------------------- */

.question-block {
  margin-top: 1.5rem;
}

.scenario-situation {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.7;
  padding: 1.1rem 1.15rem;
  background: var(--sediment);
  border-radius: var(--radius);
  border: 1px solid var(--matrix);
  margin-bottom: 1.1rem;
}

.select-hint {
  font-size: 0.8rem;
  color: var(--amber);
  letter-spacing: 0.06em;
  margin-bottom: 0.7rem;
}

.option-list {
  display: grid;
  gap: 0.6rem;
}

.option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: center;
  text-align: start;
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--matrix);
  border-radius: var(--radius);
  background: var(--sediment);
  line-height: 1.6;
  transition: all 0.18s;
}

.option:hover:not(:disabled) {
  border-color: var(--bone-dim);
}

.option[aria-pressed="true"] {
  border-color: var(--amber);
  background: var(--sediment-hi);
}

.option:disabled {
  cursor: default;
  opacity: 0.75;
}

.option.is-correct {
  border-color: var(--correct);
  background: var(--correct-wash);
  opacity: 1;
}

.option.is-wrong {
  border-color: var(--wrong);
  background: var(--wrong-wash);
  opacity: 1;
}

.option-mark {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  border: 1.5px solid var(--matrix);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: all 0.18s;
}

.option[aria-pressed="true"] .option-mark {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
}

.option.is-correct .option-mark {
  border-color: var(--correct);
  background: var(--correct);
  color: var(--ink);
}

.option.is-wrong .option-mark {
  border-color: var(--wrong);
  background: var(--wrong);
  color: var(--ink);
}

/* 複選題用方形記號，跟單選的圓形區分開 */
.option-mark.is-square {
  border-radius: 5px;
}

/* --- 排序題 ----------------------------------------------- */

.order-hint {
  font-size: 0.8rem;
  color: var(--bone-dim);
  margin-bottom: 0.85rem;
}

.order-list {
  display: grid;
  gap: 0.6rem;
}

.order-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--matrix);
  border-radius: var(--radius);
  background: var(--sediment);
  transition: all 0.18s;
}

.order-card.is-dragging {
  opacity: 0.45;
  border-color: var(--amber);
}

.order-card.is-drop-target {
  border-color: var(--amber);
  border-style: dashed;
}

.order-card.is-wrong {
  border-color: var(--wrong);
  background: var(--wrong-wash);
}

.order-card.is-correct {
  border-color: var(--correct);
  background: var(--correct-wash);
}

.order-select {
  appearance: none;
  padding: 0.5rem 0.6rem;
  min-width: 4.6rem;
  border-radius: 9px;
  border: 1px solid var(--matrix);
  background: var(--ink);
  color: var(--bone);
  font-size: 0.82rem;
  font-family: var(--sans);
  text-align: center;
  cursor: pointer;
}

.order-select:disabled {
  opacity: 0.7;
  cursor: default;
}

.order-text {
  font-size: 0.92rem;
  line-height: 1.65;
}

/* --- 圖片 ------------------------------------------------- */

.figure {
  border: 1px solid var(--matrix);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sediment);
  margin-bottom: 1.1rem;
}

.figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--sediment-hi);
}

/* 核准圖片尚未到位時的佔位樣式（圖片載入失敗會切到這個） */
.figure.is-placeholder img {
  display: none;
}

.figure.is-placeholder .figure-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  color: var(--bone-dim);
  font-size: 0.82rem;
  text-align: center;
  padding: 1.5rem;
  line-height: 1.7;
  background: repeating-linear-gradient(
    45deg,
    var(--sediment) 0 10px,
    var(--sediment-hi) 10px 20px
  );
}

.figure-slot {
  display: none;
}

.figure-caption {
  padding: 0.6rem 0.85rem;
  font-size: 0.75rem;
  color: var(--bone-dim);
  border-top: 1px solid var(--matrix);
}

.figure-pair {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.figure-pair .figure {
  margin-bottom: 0;
}

.figure-tag {
  position: relative;
}

.figure-tag::before {
  content: attr(data-tag);
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
  z-index: 1;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bone);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
}

/* --- 回饋卡（提示／解釋／徽章／迷思） --------------------- */

.feedback {
  margin-top: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--matrix);
  background: var(--sediment);
  overflow: hidden;
  animation: rise 0.35s ease-out;
}

.feedback-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  text-transform: uppercase;
}

.feedback-body {
  padding: 0 1rem 1rem;
  font-size: 0.92rem;
  line-height: 1.85;
}

.feedback.is-hint .feedback-head {
  color: var(--amber);
  background: var(--amber-wash);
}

.feedback.is-correct .feedback-head {
  color: var(--correct);
  background: var(--correct-wash);
}

.feedback.is-answer .feedback-head {
  color: var(--bone-dim);
  background: var(--sediment-hi);
}

.feedback.is-myth .feedback-head {
  color: var(--lagoon);
  background: var(--lagoon-wash);
}

.feedback-explain {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--matrix);
}

.feedback-explain-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--bone-dim);
  font-weight: 700;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

/* --- 徽章 ------------------------------------------------- */

.badge {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: center;
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--amber-dim);
  border-radius: var(--radius);
  background: var(--badge-bg);
  animation: rise 0.5s ease-out;
}

.badge-seal {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  border: 1.5px solid var(--amber);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.badge-code {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--amber);
  font-weight: 700;
}

.badge-text {
  font-size: 0.88rem;
  line-height: 1.65;
}

/* --- 「我想再了解」 --------------------------------------- */

.interest-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.7rem;
  border: 1px dashed var(--matrix);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--bone-dim);
  transition: all 0.2s;
}

.interest-btn:hover:not(:disabled) {
  border-color: var(--lagoon);
  color: var(--lagoon);
}

.interest-btn[aria-pressed="true"] {
  border-style: solid;
  border-color: var(--lagoon);
  color: var(--lagoon);
  background: var(--lagoon-wash);
  cursor: default;
}

/* --- 結果頁 ----------------------------------------------- */

.result-head {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

.result-seal {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1rem;
}

.result-sub {
  font-size: 0.85rem;
  color: var(--bone-dim);
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
}

.section {
  margin-top: 2.5rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.section-head .rule {
  flex: 1;
  height: 1px;
  background: var(--matrix);
  margin: 0;
}

.badge-grid {
  display: grid;
  gap: 0.6rem;
}

.badge-grid .badge {
  margin-top: 0;
  animation: none;
}

/* --- 心得與未來標籤 --------------------------------------- */

.starter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.7rem 0 0.85rem;
}

.starter-chip {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--matrix);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--bone-dim);
  transition: all 0.2s;
}

.starter-chip:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.reflection-input {
  width: 100%;
  min-height: 5.5rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--matrix);
  background: var(--sediment);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  resize: vertical;
}

.reflection-input::placeholder {
  color: var(--matrix);
}

.reflection-count {
  text-align: end;
  font-size: 0.72rem;
  color: var(--bone-dim);
  margin-top: 0.35rem;
}

.reflection-error {
  font-size: 0.8rem;
  color: var(--wrong);
  margin-top: 0.5rem;
}

/* 未來標本標籤：模仿展場手寫標本標籤的樣子 */
.specimen-label {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: 6px;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  animation: rise 0.5s ease-out;
  position: relative;
}

/* 標籤打孔＋掛繩，呼應實體「時間網」 */
.specimen-label::before {
  content: "";
  position: absolute;
  inset-block-start: 0.6rem;
  inset-inline-end: 0.6rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 1.5px solid var(--paper-rule);
  background: var(--ink);
}

.specimen-label-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  font-weight: 700;
  color: var(--paper-dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--paper-rule);
  padding-bottom: 0.5rem;
  margin-bottom: 0.85rem;
}

.specimen-label-body {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.85;
  margin-bottom: 1rem;
}

.specimen-label-fields {
  display: grid;
  gap: 0.3rem;
  font-size: 0.74rem;
  line-height: 1.6;
  border-top: 1px solid var(--paper-rule);
  padding-top: 0.75rem;
}

.specimen-label-field {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.5rem;
}

.specimen-label-key {
  color: var(--paper-dim);
  letter-spacing: 0.06em;
}

.specimen-label-value {
  color: var(--paper-ink);
  font-weight: 600;
}

.theme-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.theme-tag {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--paper-ink);
  color: var(--paper);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.physical-web-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-inline-start: 3px solid var(--lagoon);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--lagoon-wash);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* --- 館藏推薦 --------------------------------------------- */

.book-list {
  display: grid;
  gap: 0.8rem;
}

.book-card {
  padding: 1.1rem;
  border: 1px solid var(--matrix);
  border-radius: var(--radius);
  background: var(--sediment);
}

.book-topic {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--lagoon);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.book-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
}

.book-call {
  font-size: 0.75rem;
  color: var(--bone-dim);
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}

/* 館藏位置：在展場的用琥珀色突顯，其餘低調帶過 */
.book-where {
  font-size: 0.75rem;
  color: var(--bone-dim);
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

.book-card:has(.book-where) .book-where:first-letter {
  color: var(--amber);
}

.book-reason {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--bone-dim);
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--matrix);
}

.book-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.book-btn {
  flex: 1;
  padding: 0.55rem;
  border: 1px solid var(--matrix);
  border-radius: 9px;
  font-size: 0.78rem;
  text-align: center;
  color: var(--bone-dim);
  transition: all 0.2s;
  text-decoration: none;
  display: block;
}

.book-btn:hover {
  border-color: var(--bone-dim);
  color: var(--bone);
}

.book-btn[aria-pressed="true"] {
  border-color: var(--amber);
  background: var(--amber-wash);
  color: var(--amber);
  cursor: default;
}

.shelf-note {
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 9px;
  background: var(--sediment-hi);
  font-size: 0.8rem;
  color: var(--amber);
  text-align: center;
  letter-spacing: 0.06em;
}

/* --- 結語 ------------------------------------------------- */

.closing {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--matrix);
  text-align: center;
}

.closing-line {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--bone);
  letter-spacing: 0.06em;
}

/* --- 入口的兩塊：手機上就是上下堆疊 ----------------------- */

.entry-lede {
  margin-bottom: 2rem;
}

.entry-role-hint {
  font-size: 0.78rem;
  margin-bottom: 1.5rem;
}

/* --- 平板以上稍微放大 ------------------------------------- */

@media (min-width: 40rem) {
  :root {
    --shell: 34rem;
  }

  .shell {
    padding-top: 2.5rem;
  }

  .figure-pair {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   桌面版（≥ 64rem）
   ------------------------------------------------------------
   主要對象仍是掃 QR Code 的手機，但桌面不該只是把手機版置中放著、
   兩側空一大片。這裡改成兩欄：**左邊是脈絡，右邊是動作**。

   任務頁的左欄（題目說明、回展品找線索）設為 sticky——桌面上捲動看
   回饋與照片時，「線索在哪裡」始終留在視線內；手機上則維持原本的
   單欄由上而下，不套用任何這裡的規則。
   ============================================================ */

@media (min-width: 64rem) {
  :root {
    --shell: 66rem;
  }

  .shell {
    padding: 3.5rem 2rem 6rem;
  }

  /* 桌面上有空間了，標題就該有標題的樣子 */
  .title-xl {
    font-size: 3.6rem;
  }

  .title-lg {
    font-size: 1.9rem;
  }

  /* --- 入口：左說明、右選角色 --- */

  /* 入口在桌面上是一張封面，內容垂直置中撐滿視窗，不要孤零零黏在上緣 */
  .screen.is-entry {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-rows: auto 1fr;
    column-gap: 4.5rem;
    align-items: start;
    align-content: start;
    min-height: calc(100vh - 9.5rem);
  }

  .screen.is-entry > .entry-lede,
  .screen.is-entry > .entry-actions {
    align-self: center;
    padding-bottom: 4rem;
  }

  .lang-bar {
    grid-column: 1 / -1;
  }

  .entry-lede {
    margin-bottom: 0;
    padding-top: 1rem;
  }

  .entry-invite {
    font-size: 1.35rem;
  }

  /* 展品照多半是小圖（工具照原檔只有 219×165），放大超過 1.5 倍就開始糊。
     桌面欄寬有 500px 以上，這裡收住，寧可留白也不要糊。 */
  .figure {
    max-width: 22rem;
  }

  .figure-pair {
    max-width: none;
  }

  .figure-pair .figure {
    max-width: none;
  }

  /* --- 任務：左脈絡（釘住）、右互動 --- */

  .screen.is-task {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    column-gap: 4rem;
    align-items: start;
  }

  .screen.is-task > .task-head {
    grid-column: 1;
    grid-row: 1 / -1;
    position: sticky;
    top: 3.5rem;
    margin-bottom: 0;
  }

  .screen.is-task > *:not(.task-head) {
    grid-column: 2;
  }

  /* 右欄第一個元素不要再往下推，才會跟左欄頂端切齊 */
  .screen.is-task > .question-block:first-of-type {
    margin-top: 0;
  }

  /* --- 結果頁：徽章兩欄、書三欄 --- */

  .result-head {
    padding: 2rem 0 3rem;
  }

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

  .book-list {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }

  /* 心得與產生的標籤並排，不用捲動就能對照 */
  .reflection-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
  }

  .specimen-label {
    margin-top: 0;
  }
}

/* ============================================================
   展櫃站點（?z=<展區ID>）
   ------------------------------------------------------------
   整頁只有：一行問句、可點的東西、送出。
   刻意不放標題列與進度條——玩的時候不該有東西跟展櫃搶注意力。
   ============================================================ */

.station-zone {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--amber);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.station-ask {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.6;
  font-weight: 700;
}

.station-action {
  font-size: 1rem;
  color: var(--bone-dim);
  margin: 0.5rem 0 1.5rem;
}

/* --- 工具照網格：不給名稱，名稱在櫃子裡 --- */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

/* 2:1 而不是 4:3：工具是細長的，照片上下大半是背景。裁掉上下、保留左右，
   整頁少捲一半，工具的輪廓還是完整的——那是拿去跟櫃子比對的依據。 */
.tool-cell {
  aspect-ratio: 2 / 1;
  border: 1.5px solid var(--matrix);
  border-radius: 8px;
  overflow: hidden;
  background: var(--sediment);
  padding: 0;
  transition: all 0.15s;
}

.tool-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-cell.is-picked {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber);
}

.tool-cell.is-correct {
  border-color: var(--correct);
  box-shadow: 0 0 0 2px var(--correct);
}

.tool-cell.is-wrong {
  border-color: var(--wrong);
  box-shadow: 0 0 0 2px var(--wrong);
}

.tool-cell.is-wrong img,
.tool-cell:disabled:not(.is-correct):not(.is-wrong) img {
  opacity: 0.4;
}

/* --- 標籤填空 --- */

.specimen-label.is-quiz-label {
  margin: 0 0 1.25rem;
  animation: none;
}

.specimen-label-blank {
  display: block;
  height: 1.1rem;
  border-bottom: 2px dashed var(--wrong);
  min-width: 7rem;
}

/* --- A/B 圖片選擇 --- */

.pick-figure {
  position: relative;
  border: 1.5px solid var(--matrix);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sediment);
  padding: 0;
}

.pick-figure::before {
  content: attr(data-tag);
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
  z-index: 1;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bone);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
}

.pick-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.pick-figure.is-placeholder img {
  display: none;
}

.pick-figure-slot {
  display: none;
}

.pick-figure.is-placeholder .pick-figure-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  color: var(--bone-dim);
  font-size: 0.8rem;
  padding: 1rem;
  text-align: center;
  background: repeating-linear-gradient(45deg, var(--sediment) 0 10px, var(--sediment-hi) 10px 20px);
}

.pick-figure.is-picked {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber);
}

.pick-figure.is-correct {
  border-color: var(--correct);
  box-shadow: 0 0 0 2px var(--correct);
}

.pick-figure.is-wrong {
  border-color: var(--wrong);
  box-shadow: 0 0 0 2px var(--wrong);
}

/* --- 線索與揭曉 --- */

.station-hint {
  margin-top: 1.15rem;
  padding: 0.85rem 1rem;
  border-inline-start: 3px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--amber-wash);
  font-size: 0.92rem;
  line-height: 1.8;
  animation: rise 0.3s ease-out;
}

.station-reveal {
  margin-top: 1.5rem;
  padding: 1.15rem;
  border: 1px solid var(--matrix);
  border-radius: var(--radius);
  background: var(--sediment);
  animation: rise 0.35s ease-out;
}

.station-reveal.is-correct {
  border-color: var(--correct);
  background: var(--correct-wash);
}

.station-verdict {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--bone-dim);
  margin-bottom: 0.5rem;
}

.station-reveal.is-correct .station-verdict {
  color: var(--correct);
}

/* 每一站唯一的一段知識。就這一句，不再多。 */
.station-knowledge {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.9;
}

.station-badge {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--amber-dim);
  border-radius: var(--radius);
  background: var(--badge-bg);
  font-size: 0.88rem;
  line-height: 1.6;
}

.station-badge-code {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--amber);
  font-weight: 700;
  white-space: nowrap;
}

.station-next {
  margin-top: 2rem;
  text-align: center;
}

.station-left {
  font-size: 0.9rem;
  color: var(--bone-dim);
  margin-bottom: 0.85rem;
}

/* --- 集散頁 --- */

.hub-lede {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.8;
  margin: 1.25rem 0 1.5rem;
}

.hub-list {
  display: grid;
  gap: 0.5rem;
  list-style: none;
}

.hub-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--matrix);
  border-radius: var(--radius);
  background: var(--sediment);
}

.hub-item.is-done {
  border-color: var(--amber-dim);
  background: var(--amber-wash);
}

.hub-num {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--matrix);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bone-dim);
}

.hub-item.is-done .hub-num {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--ink);
}

.hub-zone {
  font-family: var(--serif);
  font-size: 0.98rem;
}

.hub-note {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--bone-dim);
}

/* --- 桌面：站點頁刻意維持窄欄 --- */

@media (min-width: 64rem) {
  .screen.is-station,
  .screen.is-hub {
    max-width: 34rem;
    margin-inline: auto;
  }

  .station-ask {
    font-size: 1.7rem;
  }
}

/* ============================================================
   深海鯨落：水體、光柱與海洋雪
   ------------------------------------------------------------
   海洋雪是有機碎屑緩緩下沉——鯨落現場真實會發生的事，也是這個
   視覺的核心。動態元素只有這兩個（雪、鯨的浮沉），且都在
   prefers-reduced-motion 下關掉。
   ============================================================ */

/* 海面透下來的光柱 */
body::after {
  content: "";
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: 60vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 100% at 30% -10%, rgba(120, 210, 235, 0.14), transparent 70%),
    radial-gradient(ellipse 40% 80% at 75% -5%, rgba(120, 210, 235, 0.08), transparent 70%);
}

/* 海洋雪 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 20%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 28% 60%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(2px 2px at 45% 35%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 62% 78%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 78% 15%, rgba(255, 255, 255, 0.32), transparent),
    radial-gradient(1px 1px at 91% 52%, rgba(255, 255, 255, 0.38), transparent),
    radial-gradient(1.5px 1.5px at 55% 90%, rgba(255, 255, 255, 0.28), transparent),
    radial-gradient(1px 1px at 35% 8%, rgba(255, 255, 255, 0.3), transparent);
  background-size: 100% 55vh;
  animation: marine-snow 26s linear infinite;
  opacity: 0.65;
}

@keyframes marine-snow {
  from {
    background-position: 0 -55vh;
  }
  to {
    background-position: 0 55vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}

/* 內容要浮在水體與海洋雪之上 */
.shell {
  position: relative;
  z-index: 1;
}

/* --- 卡片：懸浮在水中的物件 ------------------------------- */

.option,
.book-card,
.feedback,
.figure,
.tool-cell,
.pick-figure,
.hub-item,
.station-reveal {
  backdrop-filter: blur(8px);
  border-color: rgba(86, 196, 216, 0.18);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* 「選中」不能蓋掉已判定對錯的紅綠——同權重、後載入者勝，
   答對的選項會被畫成琥珀色，訊號互相打架。check_style.py 會盯這件事。 */
.option[aria-pressed="true"]:not(.is-correct):not(.is-wrong) {
  background: var(--sediment-hi);
  box-shadow: 0 0 0 1px var(--amber), 0 0 30px rgba(240, 184, 102, 0.22);
}

.option.is-correct {
  box-shadow: 0 0 0 1px var(--correct), 0 0 26px rgba(95, 196, 140, 0.2);
}

.option.is-wrong {
  box-shadow: 0 0 0 1px var(--wrong), 0 0 26px rgba(224, 112, 95, 0.2);
}

/* --- 標題：像從水裡浮上來 --------------------------------- */

.title-xl,
.title-lg {
  text-shadow: 0 0 40px rgba(86, 196, 216, 0.3), 0 4px 30px rgba(0, 0, 0, 0.7);
}

/* --- 集散頁：一頭正在下沉的鯨 ----------------------------- */

.screen.is-hub {
  position: relative;
}

.screen.is-hub::after {
  content: "";
  position: absolute;
  inset-block-start: -1rem;
  /* 不要用負值把牠推到欄外：手機上 shell 已經貼齊視窗，鯨會被切掉半截 */
  inset-inline-end: 0;
  width: 8rem;
  height: 5rem;
  pointer-events: none;
  z-index: -1;
  opacity: 0.16;
  background: no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90'%3E%3Cpath fill='%23eaf4f7' d='M48,38 C52,51 62,60 71,64 C63,55 57,46 55,38 Z'/%3E%3Cpath fill='%23eaf4f7' d='M6,34 C8,20 26,13 54,13 C88,13 116,17 128,20 L137,8 C138,15 139,19 140,23 C150,27 156,30 161,33 C170,34 177,31 185,22 C183,30 181,34 178,37 C182,42 184,47 185,55 C174,46 163,39 152,36 C136,42 110,47 78,48 C38,49 8,44 6,34 Z'/%3E%3C/svg%3E");
  animation: sink 9s ease-in-out infinite;
}

@keyframes sink {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(10px) rotate(2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen.is-hub::after {
    animation: none;
  }
}

/* --- 徽章與按鈕：發光的證據 ------------------------------- */

.badge,
.station-badge {
  border-color: rgba(240, 184, 102, 0.4);
}

.badge-seal {
  box-shadow: 0 0 18px rgba(240, 184, 102, 0.3);
}

.btn-primary {
  box-shadow: 0 4px 26px rgba(240, 184, 102, 0.35);
}

.exhibit-cue {
  backdrop-filter: blur(6px);
}

/* --- 桌面：畫布大了，鯨就該有份量 ------------------------- */

@media (min-width: 64rem) {
  .screen.is-hub::after {
    inset-block-start: -2.5rem;
    inset-inline-end: -2rem;
    width: 16rem;
    height: 9rem;
    opacity: 0.12;
  }

  /* 光柱在寬螢幕上要更開，否則只照到中間一小條 */
  body::after {
    height: 75vh;
  }
}

/* 站點的展品照 */
.station-figure {
  border: 1px solid var(--matrix);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sediment);
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.station-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.station-figure.is-placeholder img {
  display: none;
}

.station-figure-slot {
  display: none;
}

.station-figure.is-placeholder .station-figure-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  color: var(--bone-dim);
  font-size: 0.82rem;
  background: repeating-linear-gradient(45deg, var(--sediment) 0 10px, var(--sediment-hi) 10px 20px);
}

/* 攤牌後的補充照 */
.reveal-figure {
  margin-top: 0.85rem;
  border: 1px solid var(--matrix);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sediment);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  animation: rise 0.4s ease-out;
}

.reveal-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.reveal-figure-caption {
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--bone-dim);
  border-top: 1px solid var(--matrix);
}

/* 集散頁：你選的身分（選過角色之後才出現） */
.hub-role {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.85rem 0 0.25rem;
}

.hub-role-who {
  font-size: 0.9rem;
  color: var(--amber);
  letter-spacing: 0.04em;
}

/* hub 頂端「你是 …」的小圓頭像，聚焦帽子與臉。 */
.role-avatar-wrap {
  display: inline-block;
  vertical-align: middle;
}

.role-avatar {
  display: inline-block;
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  background: transparent;
  vertical-align: middle;
}

.hub-role-change {
  font-size: 0.72rem;
  color: var(--bone-dim);
  border: 1px solid var(--matrix);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  transition: all 0.2s;
}

.hub-role-change:hover {
  border-color: var(--lagoon);
  color: var(--lagoon);
}
