:root {
  --ink: #183237;
  --muted: #526e70;
  --sky: #dff4ee;
  --paper: #fffaf0;
  --sun: #f1ad35;
  --teal: #197b78;
  --coral: #d9624e;
  --line: rgba(24, 50, 55, .18);
  --shadow: 0 18px 50px rgba(26, 78, 76, .15);
}
* { box-sizing: border-box; }
html { background: #d7eee8; color: var(--ink); font-family: "Noto Serif TC", "Microsoft JhengHei", serif; }
body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, .9) 0 7%, transparent 8%),
    radial-gradient(circle at 86% 18%, rgba(241, 173, 53, .24) 0 8%, transparent 20%),
    linear-gradient(160deg, #dff4ee 0%, #f8edd2 58%, #cfe7df 100%);
  min-height: 100vh;
}
button, a { font: inherit; }
button { touch-action: manipulation; }
.topbar {
  min-height: 62px;
  padding: 12px clamp(18px, 4vw, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #102f35;
  color: white;
}
.topbar a { color: inherit; text-decoration: none; font-weight: 800; }
.brand { letter-spacing: .08em; }
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 48px; }
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid rgba(25, 123, 120, .28);
  border-radius: 30px 30px 80px 30px;
  background: rgba(255, 250, 240, .85);
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 42px solid rgba(25, 123, 120, .08);
}
.eyebrow { margin: 0 0 8px; color: var(--teal); font-weight: 900; letter-spacing: .12em; }
h1 { margin: 0; font-size: clamp(2.3rem, 7vw, 5.8rem); line-height: .98; letter-spacing: -.04em; }
.hero p:last-child { max-width: 720px; margin-bottom: 0; line-height: 1.8; font-weight: 650; }
.ship {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50% 50% 42% 58%;
  background: linear-gradient(145deg, #f8c75b, #d9624e);
  color: #17383c;
  transform: rotate(3deg);
  box-shadow: inset 0 -14px 0 rgba(98, 50, 35, .12), 0 16px 30px rgba(111, 67, 42, .18);
  animation: float 4s ease-in-out infinite;
}
.ship span { position: absolute; color: white; font-size: 2rem; }
.ship span:first-child { left: -30px; bottom: 18px; }
.ship span:last-child { right: -28px; top: 24px; }
@keyframes float { 50% { transform: translateY(-9px) rotate(-2deg); } }
.mission-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.mission-strip article {
  min-width: 0;
  padding: 18px;
  border-radius: 18px;
  background: #173c41;
  color: white;
  text-align: center;
}
.mission-strip strong { display: block; color: #ffd36a; font: 900 1.75rem/1 "Microsoft JhengHei", sans-serif; }
.mission-strip span { display: block; margin-top: 7px; font-size: .84rem; opacity: .82; }
.quest-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); gap: 18px; align-items: start; }
.question-card, .side-column > section {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, .94);
  box-shadow: var(--shadow);
}
.question-card { padding: clamp(20px, 4vw, 38px); border-radius: 28px; }
.question-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.question-head h2 { margin: 4px 0 0; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.kind-label { margin: 0; color: var(--teal); font-weight: 900; }
.difficulty { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; background: #dcefe8; color: #176561; font-weight: 800; font-size: .82rem; }
.difficulty[data-level="challenge"] { background: #ffe0c3; color: #963e2c; }
.prompt { margin: 26px 0; font-size: clamp(1.08rem, 2vw, 1.28rem); line-height: 1.85; font-weight: 700; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice {
  min-width: 0;
  min-height: 76px;
  padding: 14px;
  border: 2px solid rgba(25, 123, 120, .24);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  text-align: left;
  line-height: 1.5;
  cursor: pointer;
}
.choice:hover, .choice.selected { border-color: var(--teal); background: #e8f6f0; transform: translateY(-1px); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.actions button, .reset-zone button {
  min-height: 48px;
  padding: 10px 17px;
  border-radius: 13px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 900;
}
.actions button:disabled { opacity: .45; cursor: not-allowed; }
.primary { background: var(--sun); color: #2b2920; }
.secondary { background: var(--teal); color: white; }
.ghost { border-color: var(--line) !important; background: transparent; color: var(--ink); }
.feedback, .hint-panel { margin-top: 16px; padding: 15px 17px; border-radius: 14px; line-height: 1.7; }
.feedback:empty { display: none; }
.feedback.success { background: #dbf2de; border-left: 5px solid #3a8d50; }
.feedback.retry { background: #fff0d3; border-left: 5px solid #d19124; }
.hint-panel { background: #e8f0f4; border-left: 5px solid #497e99; }
.side-column { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.side-column > section { padding: 20px; border-radius: 22px; }
.side-column h2 { margin: 0 0 12px; font-size: 1.25rem; }
.side-column p { color: var(--muted); line-height: 1.65; }
.island-map { display: grid; gap: 9px; }
.island { min-width: 0; display: flex; gap: 10px; align-items: center; padding: 11px; border-radius: 14px; background: #edf1e8; opacity: .72; }
.island.repaired { background: #d9efe6; opacity: 1; }
.island > span { flex: 0 0 32px; display: grid; place-items: center; height: 32px; border-radius: 50%; background: #173c41; color: white; font-weight: 900; }
.island div { min-width: 0; }
.island strong, .island small { display: block; overflow-wrap: anywhere; }
.island small { margin-top: 3px; color: var(--muted); line-height: 1.35; }
.relics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.relic { min-width: 0; padding: 9px 5px; border-radius: 11px; background: #e8e3d8; color: #7a746a; text-align: center; font-size: .73rem; overflow-wrap: anywhere; }
.relic.unlocked { background: #fbd886; color: #493612; font-weight: 900; }
.energy-host { margin-top: 18px; min-width: 0; overflow: hidden; }
.reset-zone { margin-top: 34px; padding-top: 20px; border-top: 1px dashed var(--line); text-align: center; }
.reset-zone button { border-color: var(--line); background: rgba(255, 250, 240, .66); color: var(--muted); }
@media (max-width: 820px) {
  main { width: min(100% - 20px, 680px); padding-top: 16px; }
  .hero { grid-template-columns: minmax(0, 1fr); border-radius: 24px 24px 55px 24px; }
  .ship { width: 105px; height: 105px; justify-self: end; }
  .mission-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quest-layout { grid-template-columns: minmax(0, 1fr); }
  .side-column { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .topbar { padding: 11px 14px; }
  .topbar nav { font-size: .88rem; }
  .hero { padding: 23px 19px; }
  .ship { display: none; }
  .mission-strip { gap: 7px; }
  .mission-strip article { padding: 13px 7px; }
  .choices { grid-template-columns: minmax(0, 1fr); }
  .question-card { padding: 20px 15px; border-radius: 20px; }
  .question-head { display: grid; }
  .difficulty { justify-self: start; }
  .actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .actions button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
