/* ============================================================
   大航海：尋找失落字彙密碼  --  style.css
   中世紀大航海羊皮紙古典美學
   ============================================================ */

:root {
  --parchment: #F1E4C3;
  --parchment-dark: #D9C39E;
  --ink: #3A2A16;
  --ink-soft: #5D3A1A;
  --wax: #A12525;
  --wax-light: #C53B3B;
  --wax-dark: #6E1515;
  --gold: #8A6A1F;
  --sea: #7B9BB5;
  --serif: "BIZ UDMincho", "MS Mincho", "PMingLiU", "Noto Serif CJK TC", "Songti TC", "SimSun", serif;
}

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

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

html.has-cursor,
html.has-cursor * {
  cursor: none !important;
}

body {
  font-family: var(--serif);
  color: var(--ink);
  letter-spacing: 0.04em;
  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse at center, rgba(255, 248, 226, 0) 45%, rgba(70, 45, 20, 0.35) 78%, rgba(40, 22, 8, 0.62) 100%),
    radial-gradient(ellipse at 18% 12%, rgba(216, 177, 120, 0.4), transparent 52%),
    radial-gradient(ellipse at 82% 88%, rgba(140, 95, 55, 0.3), transparent 55%),
    linear-gradient(160deg, #F1E4C3 0%, #E7D6AE 45%, #D9C39E 100%);
  background-attachment: fixed;
  min-height: 100vh;
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 羊皮紙噪點質感覆層 */
.parchment-texture {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.07'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='280' height='280' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 焦黑燒灼邊緣 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow:
    inset 0 0 30px rgba(50, 28, 10, 0.4),
    inset 0 0 80px rgba(40, 20, 6, 0.5),
    inset 0 0 180px rgba(30, 14, 4, 0.55),
    inset 0 0 360px rgba(20, 8, 2, 0.55),
    0 0 60px rgba(0, 0, 0, 0.45);
}

::selection {
  background: var(--wax);
  color: #F1E4C3;
}

/* ============================================================
   地圖畫布與帆船
   ============================================================ */

#voyage-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#ship {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 6;
  width: 66px;
  height: 66px;
  margin-left: -33px;
  margin-top: -33px;
  pointer-events: none;
  filter: drop-shadow(2px 3px 2px rgba(40, 22, 8, 0.55));
  opacity: 0;
  transition: transform 1.6s cubic-bezier(0.35, 0.05, 0.25, 1);
}

#ship.is-visible {
  opacity: 1;
}

#ship-inner {
  width: 100%;
  height: 100%;
  animation: bob 3.2s ease-in-out infinite;
}

#ship-inner svg {
  display: block;
  width: 100%;
  height: 100%;
}

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

/* ============================================================
   羅盤元件
   ============================================================ */

#compass-widget {
  position: fixed;
  top: 76px;
  right: 22px;
  z-index: 20;
  width: 104px;
  height: 104px;
  pointer-events: none;
  filter: drop-shadow(3px 4px 4px rgba(40, 22, 8, 0.5));
}

#compass-rose {
  position: absolute;
  inset: 0;
}

#compass-rose svg {
  display: block;
  width: 100%;
  height: 100%;
}

#needle-layer {
  position: absolute;
  inset: 0;
  transition: transform 1.4s cubic-bezier(0.45, 0.1, 0.3, 1);
}

#needle-layer svg {
  display: block;
  width: 100%;
  height: 100%;
}

#needle-layer.needle-tremble {
  animation: needle-tremble 0.6s ease-in-out 2;
}

@keyframes needle-tremble {
  0% { transform: rotate(-8deg); }
  25% { transform: rotate(9deg); }
  50% { transform: rotate(-7deg); }
  75% { transform: rotate(6deg); }
  100% { transform: rotate(0deg); }
}

/* ============================================================
   自訂游標：復古航海羅盤
   ============================================================ */

#cursor-compass {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform;
}

html.has-cursor #cursor-compass {
  opacity: 1;
}

#cursor-inner {
  width: 100%;
  height: 100%;
  transform-origin: center center;
}

#cursor-inner.pressed {
  animation: cursor-press 0.18s ease-in-out;
}

#cursor-inner svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(1px 2px 1px rgba(40, 22, 8, 0.55));
}

@keyframes cursor-press {
  0% { transform: scale(1); }
  50% { transform: scale(0.78); }
  100% { transform: scale(1); }
}

@media (pointer: coarse) {
  html.has-cursor,
  html.has-cursor * {
    cursor: auto;
  }

  #cursor-compass {
    display: none;
  }
}

/* ============================================================
   暴風雨特效
   ============================================================ */

#storm-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(40, 62, 96, 0) 20%, rgba(18, 30, 60, 0.55) 62%, rgba(6, 12, 30, 0.85) 100%);
}

body.storm #storm-overlay {
  animation: storm-flash 1.05s ease-out 3;
}

body.storm #stage {
  animation: storm-shake 0.85s linear 3;
}

body.storm #compass-widget {
  animation: storm-shake 0.85s linear 3;
}

@keyframes storm-flash {
  0% { opacity: 0; }
  8% { opacity: 1; }
  18% { opacity: 0.25; }
  32% { opacity: 0.9; }
  46% { opacity: 0.18; }
  62% { opacity: 0.75; }
  80% { opacity: 0.3; }
  100% { opacity: 0; }
}

@keyframes storm-shake {
  0% { transform: translate(0, 0) rotate(0deg); }
  12% { transform: translate(-12px, 7px) rotate(-1.2deg); }
  24% { transform: translate(11px, -8px) rotate(1.1deg); }
  36% { transform: translate(-9px, -5px) rotate(-0.9deg); }
  48% { transform: translate(10px, 6px) rotate(0.8deg); }
  60% { transform: translate(-7px, 8px) rotate(-0.6deg); }
  72% { transform: translate(8px, -6px) rotate(0.5deg); }
  84% { transform: translate(-5px, 4px) rotate(-0.3deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* ============================================================
   頂部狀態列
   ============================================================ */

#status-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(90, 58, 26, 0.88), rgba(61, 38, 16, 0.82));
  border-bottom: 2px solid #EADFC0;
  box-shadow: 0 4px 14px rgba(30, 16, 6, 0.5);
  color: #F1E4C3;
  font-size: 15px;
  font-weight: 700;
}

.status-group {
  display: flex;
  align-items: center;
  gap: 18px;
}

.icon-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.icon-label .material-icons {
  font-size: 19px;
  color: #E8D9B0;
}

#lives-wrap {
  gap: 6px;
}

#lives-wrap .material-icons {
  font-size: 27px;
  color: #E8D9B0;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.45);
  transition: all 0.3s ease;
}

#lives-wrap .material-icons.is-lost {
  color: rgba(232, 217, 176, 0.25);
  transform: rotate(180deg) scale(0.85);
}

.round-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(234, 223, 192, 0.5);
  background: rgba(58, 37, 16, 0.7);
  color: #E8D9B0;
  transition: all 0.25s ease;
}

.round-btn .material-icons {
  font-size: 19px;
}

.round-btn:hover {
  background: var(--wax);
  color: #F1E4C3;
  border-color: #F1E4C3;
}

.round-btn:active {
  transform: scale(0.9);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55);
}

/* ============================================================
   主舞台與畫面切換
   ============================================================ */

#stage {
  position: relative;
  z-index: 10;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 84px 16px 30px;
  overflow: hidden;
}

.screen {
  width: min(640px, 96vw);
  text-align: center;
  animation: fade-up 0.8s ease-out both;
}

.is-hidden {
  display: none !important;
}

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

@keyframes fade-up {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   首頁徽章與標題
   ============================================================ */

.crest {
  width: 148px;
  height: 148px;
  margin: 0 auto 18px;
  filter: drop-shadow(4px 5px 5px rgba(40, 22, 8, 0.5));
  animation: crest-sway 5s ease-in-out infinite;
}

.crest svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes crest-sway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

.game-title {
  font-size: clamp(52px, 9vw, 84px);
  font-weight: 700;
  letter-spacing: 0.28em;
  margin-right: -0.28em;
  color: var(--ink-soft);
  text-shadow:
    2px 2px 0 rgba(234, 223, 192, 0.9),
    4px 5px 0 rgba(58, 37, 16, 0.45);
}

.game-subtitle {
  margin-top: 10px;
  font-size: clamp(18px, 3.4vw, 26px);
  font-weight: 700;
  letter-spacing: 0.5em;
  margin-right: -0.5em;
  color: var(--wax);
  text-shadow: 1px 1px 0 rgba(234, 223, 192, 0.9);
}

.intro-copy {
  margin: 26px auto 34px;
  max-width: 52ch;
  line-height: 2.1;
  font-size: 16px;
  color: #4A3418;
  padding: 20px 26px;
  border: 1px solid rgba(90, 58, 26, 0.35);
  background: rgba(233, 219, 182, 0.55);
  box-shadow: inset 0 0 24px rgba(90, 58, 26, 0.18);
  position: relative;
}

.intro-copy::before,
.intro-copy::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--wax);
  border-style: solid;
}

.intro-copy::before {
  top: -1px;
  left: -1px;
  border-width: 3px 0 0 3px;
}

.intro-copy::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 3px 3px 0;
}

.start-foot {
  margin-top: 34px;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: rgba(58, 42, 22, 0.65);
}

.start-links {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============================================================
   說明與單字手冊浮層
   ============================================================ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(24, 13, 4, 0.62);
  backdrop-filter: blur(2px);
  animation: fade-up 0.3s ease-out both;
}

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

.overlay-card {
  position: relative;
  width: min(720px, 96vw);
  max-height: 90vh;
  padding: 30px 30px 26px;
  overflow-y: auto;
  scrollbar-width: none;
  background:
    linear-gradient(180deg, rgba(244, 233, 204, 0.97), rgba(222, 199, 155, 0.97));
  border: 1px solid rgba(90, 58, 26, 0.45);
  box-shadow:
    0 18px 44px rgba(20, 10, 3, 0.6),
    inset 0 0 40px rgba(90, 58, 26, 0.22);
}

.overlay-card::-webkit-scrollbar {
  display: none;
}

.overlay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(90, 58, 26, 0.5);
  background: rgba(233, 219, 182, 0.85);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.overlay-close .material-icons {
  font-size: 20px;
}

.overlay-close:hover {
  background: var(--wax);
  color: #F1E4C3;
}

.overlay-close:active {
  transform: scale(0.9);
}

.overlay-title {
  font-size: 26px;
  letter-spacing: 0.24em;
  margin-right: -0.24em;
  color: var(--ink-soft);
  text-align: center;
  border-bottom: 2px solid var(--wax);
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.help-list {
  margin: 0;
  padding-left: 24px;
  text-align: left;
  line-height: 2.05;
  font-size: 16px;
  color: var(--ink);
}

.help-list li {
  margin-bottom: 8px;
}

.manual-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.manual-count {
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.manual-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
}

.word-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas:
    "word pos zh"
    "diff diff diff";
  align-items: center;
  gap: 4px 6px;
  padding: 10px 12px;
  border: 1px solid rgba(90, 58, 26, 0.35);
  background: rgba(243, 231, 203, 0.8);
  box-shadow: inset 0 0 16px rgba(90, 58, 26, 0.12);
}

.wc-word {
  grid-area: word;
  justify-self: start;
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wc-pos {
  grid-area: pos;
  justify-self: center;
  font-size: 12px;
  color: rgba(58, 42, 22, 0.7);
}

.wc-zh {
  grid-area: zh;
  justify-self: end;
  font-size: 15px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.wc-diff {
  grid-area: diff;
  justify-self: start;
  margin-top: 2px;
  font-size: 12px;
  padding: 1px 10px;
  border-radius: 999px;
  border: 1px solid rgba(90, 58, 26, 0.4);
}

/* ============================================================
   火漆印章按鈕
   ============================================================ */

.seal-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 3px solid rgba(58, 22, 8, 0.55);
  background:
    radial-gradient(circle at 34% 28%, var(--wax-light), var(--wax) 52%, var(--wax-dark) 100%);
  box-shadow:
    0 8px 16px rgba(38, 20, 7, 0.55),
    inset 0 -6px 10px rgba(0, 0, 0, 0.42),
    inset 0 3px 4px rgba(255, 214, 176, 0.4);
  color: #F6E8CC;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* 內圈印記 */
.seal-btn::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1.5px dashed rgba(246, 232, 204, 0.55);
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.14),
    inset 0 0 14px rgba(0, 0, 0, 0.25);
}

/* 火漆滴流 */
.seal-btn::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 18px;
  border-radius: 50% 50% 55% 55%;
  background: var(--wax-dark);
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.4);
}

.seal-word {
  position: relative;
  z-index: 1;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #F6E8CC;
  text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 216, 178, 0.35);
}

.seal-sub {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.32em;
  margin-right: -0.32em;
  color: rgba(246, 232, 204, 0.85);
}

.seal-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 22px rgba(38, 20, 7, 0.6),
    inset 0 -6px 10px rgba(0, 0, 0, 0.4),
    inset 0 3px 5px rgba(255, 214, 176, 0.45);
}

/* 按下時火漆下沉、印出凹陷徽章 */
.seal-btn:active {
  transform: translateY(4px) scale(0.95);
  box-shadow:
    inset 0 8px 16px rgba(0, 0, 0, 0.6),
    inset 0 0 30px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(30, 15, 5, 0.4);
}

.seal-btn:active .seal-word {
  text-shadow:
    0 1px 0 rgba(255, 214, 176, 0.4),
    0 -2px 3px rgba(0, 0, 0, 0.65);
}

.seal-btn:disabled {
  cursor: none;
  opacity: 0.6;
  filter: grayscale(0.5);
}

.seal-btn--large {
  width: 158px;
  height: 158px;
}

.seal-btn--large .seal-word {
  font-size: 32px;
}

.seal-btn--large::after {
  width: 32px;
  height: 22px;
}

/* 選項印章 */
.seal-btn--option {
  width: 148px;
  height: 148px;
}

.seal-btn--option .seal-word {
  font-size: 20px;
  letter-spacing: 0.06em;
  word-break: break-all;
  padding: 0 10px;
}

/* 答對：火漆鍍金並烙上正確徽印 */
.seal-btn--option.is-correct-seal {
  background:
    radial-gradient(circle at 34% 28%, #E0B35A, #B07C22 52%, #7C5512 100%);
  box-shadow:
    0 0 0 4px rgba(160, 110, 25, 0.55),
    0 8px 18px rgba(38, 20, 7, 0.55),
    inset 0 -6px 10px rgba(0, 0, 0, 0.42),
    inset 0 3px 4px rgba(255, 228, 180, 0.5);
}

/* 答錯：火漆熄滅褪色 */
.seal-btn--option.is-wrong-seal {
  background:
    radial-gradient(circle at 34% 28%, #8A8A86, #5F5F5B 52%, #3D3D3A 100%);
  box-shadow:
    0 8px 18px rgba(20, 12, 4, 0.5),
    inset 0 -6px 10px rgba(0, 0, 0, 0.45),
    inset 0 3px 4px rgba(230, 230, 220, 0.25);
  opacity: 0.7;
}

.seal-btn--option.is-correct-seal .seal-word,
.seal-btn--option.is-wrong-seal .seal-word {
  text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 235, 200, 0.4);
}

/* ============================================================
   謎題卡片
   ============================================================ */

#question-card {
  position: relative;
  padding: 26px 30px 22px;
  border: 1px solid rgba(90, 58, 26, 0.4);
  background: linear-gradient(180deg, rgba(244, 233, 204, 0.9), rgba(225, 202, 158, 0.92));
  box-shadow:
    0 10px 24px rgba(45, 26, 10, 0.35),
    inset 0 0 34px rgba(90, 58, 26, 0.2);
}

#question-card::before,
#question-card::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--wax);
  border-style: solid;
}

#question-card::before {
  top: -2px;
  left: -2px;
  border-width: 4px 0 0 4px;
}

#question-card::after {
  bottom: -2px;
  right: -2px;
  border-width: 0 4px 4px 0;
}

.round-banner {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 22px;
  border: 1px solid rgba(90, 58, 26, 0.45);
  background: rgba(233, 219, 182, 0.8);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

#clue-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.meta-chip {
  display: inline-block;
  padding: 3px 14px;
  border: 1px solid rgba(90, 58, 26, 0.5);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.12em;
  background: rgba(243, 231, 203, 0.75);
  color: var(--ink);
}

.diff-easy {
  color: #3E6B3E;
  border-color: rgba(62, 107, 62, 0.55);
}

.diff-medium {
  color: #8A5A12;
  border-color: rgba(138, 90, 18, 0.55);
}

.diff-hard {
  color: #A12525;
  border-color: rgba(161, 37, 37, 0.55);
}

#clue-text {
  font-size: 19px;
  line-height: 2.05;
  text-align: justify;
  text-justify: inter-ideograph;
  color: var(--ink);
  padding: 6px 6px 4px;
  position: relative;
}

#clue-text::first-letter {
  float: left;
  font-size: 58px;
  line-height: 1;
  font-weight: 700;
  color: var(--wax);
  padding: 8px 10px 0 0;
  text-shadow: 1px 2px 0 rgba(234, 223, 192, 0.9);
}

#hint-zone {
  margin-top: 16px;
  border-top: 1px dashed rgba(90, 58, 26, 0.4);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1px solid rgba(90, 58, 26, 0.45);
  border-radius: 999px;
  background: rgba(243, 231, 203, 0.8);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.08em;
  margin-right: -0.08em;
  transition: all 0.25s ease;
}

.text-btn .material-icons {
  font-size: 17px;
}

.text-btn:hover {
  background: rgba(90, 58, 26, 0.12);
  border-color: var(--wax);
}

.text-btn:active {
  transform: scale(0.96);
}

#hint-zh {
  margin-top: 10px;
  font-size: 16px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

/* ============================================================
   選項區與回饋
   ============================================================ */

#options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px 34px;
  margin-top: 34px;
}

#feedback {
  margin-top: 30px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1.8;
  letter-spacing: 0.08em;
  color: var(--ink);
}

#feedback.is-correct {
  color: #2F5D2F;
}

#feedback.is-wrong {
  color: #9B2C2C;
}

/* ============================================================
   結算畫面
   ============================================================ */

#end-screen .crest {
  width: 118px;
  height: 118px;
}

#end-rank {
  font-size: clamp(34px, 7vw, 52px);
  letter-spacing: 0.22em;
  margin-right: -0.22em;
  color: var(--ink-soft);
  text-shadow:
    2px 2px 0 rgba(234, 223, 192, 0.9),
    4px 5px 0 rgba(58, 37, 16, 0.4);
}

#end-subtitle {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.9;
  color: #4A3418;
}

.end-stats {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin: 30px 0 36px;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid rgba(90, 58, 26, 0.45);
  background: rgba(233, 219, 182, 0.75);
  box-shadow: inset 0 0 20px rgba(90, 58, 26, 0.16);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-soft);
}

.stat .material-icons {
  color: var(--gold);
  font-size: 26px;
}

/* ============================================================
   小螢幕適配
   ============================================================ */

@media (max-width: 560px) {
  #compass-widget {
    top: 74px;
    right: 10px;
    width: 74px;
    height: 74px;
  }

  #ship {
    width: 50px;
    height: 50px;
    margin-left: -25px;
    margin-top: -25px;
  }

  .seal-btn--option {
    width: 124px;
    height: 124px;
  }

  .seal-btn--option .seal-word {
    font-size: 17px;
  }

  #options {
    gap: 20px 20px;
  }

  #status-bar {
    font-size: 13px;
    padding: 8px 12px;
  }

  .status-group {
    gap: 12px;
  }

  .game-title {
    letter-spacing: 0.2em;
    margin-right: -0.2em;
  }
}

/* 較矮的視窗：整體縮放以單頁容納，不出現捲軸 */
@media (max-height: 820px) {
  #stage {
    padding-top: 70px;
    padding-bottom: 20px;
  }

  .crest {
    width: 104px;
    height: 104px;
    margin-bottom: 8px;
  }

  .game-title {
    font-size: clamp(40px, 8vw, 60px);
  }

  .game-subtitle {
    margin-top: 6px;
  }

  .intro-copy {
    margin: 12px auto 16px;
    padding: 12px 22px;
    line-height: 1.9;
    font-size: 15px;
  }

  .seal-btn--large {
    width: 122px;
    height: 122px;
  }

  .seal-btn--large .seal-word {
    font-size: 25px;
  }

  .seal-btn--large::after {
    width: 26px;
    height: 18px;
  }

  .start-foot {
    margin-top: 16px;
  }

  .start-links {
    margin-top: 16px;
  }

  .seal-btn--option {
    width: 118px;
    height: 118px;
  }

  .seal-btn--option .seal-word {
    font-size: 17px;
  }

  #options {
    gap: 16px 22px;
    margin-top: 20px;
  }

  #question-card {
    padding: 16px 24px 14px;
  }

  #clue-text {
    font-size: 17px;
    line-height: 1.9;
  }

  #feedback {
    margin-top: 16px;
    min-height: 38px;
    font-size: 16px;
  }

  #compass-widget {
    top: 68px;
    width: 82px;
    height: 82px;
  }

  #ship {
    width: 54px;
    height: 54px;
    margin-left: -27px;
    margin-top: -27px;
  }

  .end-stats {
    margin: 18px 0 24px;
  }

  .overlay-card {
    padding: 24px 24px 20px;
  }
}
