:root {
  /* 水彩國風：宣紙、墨青、靛藍、赭石與朱砂 */
  --bg: #eee6d7;
  --bg2: #f7f1e5;
  --card: rgba(250, 247, 238, .94);
  --card-hi: #efe2c9;
  --line: #b9a27a;
  --line-strong: #806746;
  --tx: #29312e;
  --tx2: #59635b;
  --acc: #b65239;
  --acc-deep: #7b3528;
  --acc-soft: #d8bd87;
  --school-teal: #315d5b;
  --school-teal-active: #244c4b;
  --school-blue: #315d7a;
  --school-blue-deep: #173c5a;
  --school-blue-soft: #dce7e5;
  --gold: #a77a2c;
  --good: #3e7159;
  --bad: #9f4038;
  --shadow: 0 10px 24px rgba(53, 47, 35, .11);
  --shadow-hover: 0 15px 30px rgba(45, 55, 50, .16);
  --r: 14px 24px 16px 22px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html { color-scheme: light; }

body {
  min-height: 100vh;
  color: var(--tx);
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(ellipse at 4% 9%, rgba(49, 93, 91, .16) 0 8%, transparent 29%),
    radial-gradient(ellipse at 94% 18%, rgba(49, 93, 122, .14) 0 10%, transparent 34%),
    radial-gradient(ellipse at 18% 92%, rgba(182, 82, 57, .1) 0 9%, transparent 30%),
    repeating-linear-gradient(7deg, rgba(83, 72, 51, .018) 0 1px, transparent 1px 5px),
    linear-gradient(155deg, #f7f1e5 0%, #eee5d4 52%, #e6dcc9 100%);
  background-attachment: fixed;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

body::before {
  width: 340px;
  height: 170px;
  top: 18%;
  left: -170px;
  background: rgba(49, 93, 91, .08);
  filter: blur(20px);
  transform: rotate(-12deg);
}

body::after {
  width: 280px;
  height: 140px;
  right: -130px;
  bottom: 8%;
  background: rgba(166, 122, 44, .08);
  filter: blur(18px);
  transform: rotate(9deg);
}

button,
a { font: inherit; }

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--school-teal-active);
  outline-offset: 3px;
}

#app {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 22px 18px 64px;
}

/* 首頁主視覺 */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 24px;
  padding: 34px 24px 28px;
  text-align: center;
  border: 1px solid rgba(128, 103, 70, .54);
  border-radius: 12px 34px 14px 30px;
  background:
    radial-gradient(ellipse at 16% 18%, rgba(182, 82, 57, .19) 0 9%, transparent 33%),
    radial-gradient(ellipse at 84% 70%, rgba(49, 93, 91, .16) 0 11%, transparent 36%),
    linear-gradient(145deg, rgba(250, 247, 238, .97), rgba(235, 222, 194, .95));
  box-shadow: 0 18px 38px rgba(53, 47, 35, .14);
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  border-radius: 48% 52% 44% 56%;
  background: rgba(49, 93, 122, .08);
  content: "";
}

.hero::before { width: 220px; height: 120px; top: -58px; right: -38px; transform: rotate(8deg); }
.hero::after { width: 170px; height: 92px; bottom: -42px; left: -28px; background: rgba(182, 82, 57, .08); transform: rotate(-8deg); }

.hero .logo {
  display: grid;
  width: 78px;
  height: 78px;
  margin: 0 auto 8px;
  place-items: center;
  font-size: 48px;
  border: 4px solid rgba(255, 255, 255, .78);
  border-radius: 28px;
  background: linear-gradient(145deg, #fff, #fff3dc);
  box-shadow: 0 8px 0 rgba(136, 54, 12, .17), 0 12px 26px rgba(102, 45, 10, .18);
  transform: rotate(-3deg);
}

.hero .logo img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }

.hero h1 {
  margin: 8px 0 4px;
  color: var(--school-blue-deep);
  font-family: "DFKai-SB", "BiauKai", "Noto Serif TC", serif;
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.25;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .65);
}

.hero .sub {
  color: #3f4a43;
  font-size: 14px;
  font-weight: 600;
}

.hero .total {
  display: inline-block;
  margin-top: 13px;
  padding: 5px 14px;
  color: var(--school-teal-active);
  font-size: 13px;
  border: 1px solid rgba(128, 103, 70, .42);
  border-radius: 999px;
  background: rgba(248, 242, 229, .82);
  backdrop-filter: blur(8px);
}

.hero .total b { color: var(--school-blue-deep); }

/* 阿光寶寶與日後 hero 圖像：不存在時不影響現有版面 */
.hero-mascot,
.hero .mascot,
.hero .hero-art {
  display: block;
  width: min(210px, 42vw);
  max-height: 230px;
  margin: 0 auto 10px;
  object-fit: contain;
  filter: drop-shadow(0 12px 12px rgba(103, 44, 9, .2));
}

.hero .hero-mascot {
  width: min(238px, 58vw);
  height: auto;
  max-height: none;
  border: 2px solid rgba(128, 103, 70, .5);
  border-radius: 10px 26px 12px 24px;
  background: #f7f1e5;
  box-shadow: 0 12px 24px rgba(53, 47, 35, .14);
}

.mascot-label {
  display: inline-flex;
  margin: 0 auto 2px;
  padding: 4px 11px;
  color: var(--acc-deep);
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(128, 103, 70, .4);
  border-radius: 999px;
  background: rgba(247, 241, 229, .82);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 4px 12px;
  color: var(--school-teal);
  font-family: "DFKai-SB", "BiauKai", "Noto Serif TC", serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .04em;
}

.section-title::after {
  flex: 1;
  height: 1px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--school-teal-active), rgba(49, 93, 91, .18), transparent);
  content: "";
}

/* 筆電安裝網路導覽 */
.setup-section { margin: 30px 0 34px; }

.setup-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px 30px 14px 26px;
  background:
    radial-gradient(ellipse at 88% 8%, rgba(166, 122, 44, .12), transparent 34%),
    rgba(250, 247, 238, .95);
  box-shadow: var(--shadow);
}

.setup-art-link {
  display: block;
  min-height: 100%;
  overflow: hidden;
  border-right: 1px solid rgba(128, 103, 70, .42);
  background: #eee5d4;
}

.setup-art {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  transition: filter .2s ease, transform .3s ease;
}

.setup-art-link:hover .setup-art { filter: saturate(1.05); transform: scale(1.015); }

.setup-copy { padding: 24px 22px 22px; }
.setup-kicker { color: var(--acc); font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.setup-copy h2 {
  margin: 4px 0 17px;
  color: var(--school-blue-deep);
  font-family: "DFKai-SB", "BiauKai", "Noto Serif TC", serif;
  font-size: 23px;
  line-height: 1.35;
}

.setup-steps { display: grid; gap: 10px; list-style: none; }
.setup-step { display: grid; grid-template-columns: 30px 1fr; align-items: start; gap: 10px; }
.step-no {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fffaf0;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 800;
  border-radius: 50% 45% 52% 47%;
  background: var(--acc);
  box-shadow: 0 2px 0 rgba(123, 53, 40, .22);
}
.setup-step strong { display: block; color: #303a35; font-size: 14px; }
.setup-step small { display: block; margin-top: 1px; color: var(--tx2); font-size: 12px; line-height: 1.5; }

.setup-tip {
  margin-top: 16px;
  padding: 10px 12px;
  color: #4e493b;
  font-size: 12px;
  border-left: 3px solid var(--gold);
  background: rgba(216, 189, 135, .22);
}

.setup-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 9px 14px;
  color: #fffaf0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid var(--acc-deep);
  border-radius: 6px 14px 7px 13px;
  background: linear-gradient(135deg, var(--acc), var(--acc-deep));
}

.setup-link:hover { filter: brightness(1.06); transform: translateY(-1px); }

.stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stage-card {
  position: relative;
  overflow: hidden;
  padding: 18px 16px 16px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    linear-gradient(rgba(250, 247, 238, .95), rgba(247, 241, 229, .92)),
    var(--card);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.stage-card::after {
  position: absolute;
  width: 74px;
  height: 74px;
  top: -38px;
  right: -30px;
  border-radius: 44% 56% 46% 54%;
  background: linear-gradient(135deg, rgba(182, 82, 57, .13), rgba(49, 93, 122, .09));
  content: "";
  pointer-events: none;
}

.stage-card:hover {
  border-color: var(--school-teal);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px) rotate(-.25deg);
}

.stage-card .icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  font-size: 29px;
  border: 1px solid rgba(128, 103, 70, .46);
  border-radius: 7px 15px 8px 14px;
  background: linear-gradient(145deg, #f7f1e5, #e9dfcb);
}

.stage-card .name { margin-top: 8px; color: #303b36; font-family: "DFKai-SB", "BiauKai", "Noto Serif TC", serif; font-size: 18px; font-weight: 800; }
.stage-card .desc { min-height: 42px; margin-top: 3px; color: var(--tx2); font-size: 13px; }
.stage-card .meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 12px; }
.stage-card .stars { color: var(--gold); letter-spacing: 1px; }
.stage-card .best { color: var(--tx2); }
.stage-card .actions { display: flex; gap: 8px; margin-top: 12px; }

.btn-mini {
  flex: 1;
  padding: 8px 5px;
  color: #435049;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 6px 13px 7px 12px;
  background: rgba(247, 241, 229, .88);
  transition: filter .15s ease, transform .15s ease;
}

.btn-mini.primary,
.btn-next,
.result .btns .primary {
  color: #fff;
  border-color: var(--acc-deep);
  background: linear-gradient(135deg, var(--acc), var(--acc-deep));
  box-shadow: 0 5px 12px rgba(123, 53, 40, .18);
}

.btn-mini:hover,
.btn-next:hover { filter: brightness(1.05); transform: translateY(-1px); }

.boss-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding: 20px;
  cursor: pointer;
  border: 1px solid #806f72;
  border-radius: var(--r);
  background:
    radial-gradient(ellipse at 90% 10%, rgba(182, 82, 57, .35), transparent 34%),
    linear-gradient(135deg, #243b4a 0%, #374755 48%, #6d3d38 100%);
  box-shadow: 0 12px 28px rgba(38, 49, 54, .2);
  transition: transform .18s ease, box-shadow .18s ease;
}

.boss-card:hover { box-shadow: 0 16px 34px rgba(38, 49, 54, .27); transform: translateY(-3px); }
.boss-card .icon { font-size: 48px; filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .15)); }
.boss-card .name { color: #fff; font-size: 18px; font-weight: 900; }
.boss-card .desc { color: #fbeaf8; font-size: 13px; }
.boss-card .record { margin-top: 5px; color: #ffe5a3; font-size: 12px; font-weight: 700; }

/* 連結配圖卡：支援 link-card / resource-card 等漸進加入的命名 */
.link-grid,
.resource-grid,
.quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.resource-section { margin-top: 28px; }

.link-card,
.resource-card,
.quick-link {
  position: relative;
  display: block;
  overflow: hidden;
  color: var(--tx);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(250, 247, 238, .95);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}

.link-card:hover,
.resource-card:hover,
.quick-link:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }

.link-thumbnail,
.link-thumb,
.resource-thumb,
.resource-visual,
.resource-card .thumbnail,
.quick-link .thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #efe5d1, #e5dbc7 58%, #dce7e5);
}

.resource-thumb,
.resource-visual {
  overflow: hidden;
  position: relative;
}

.resource-thumb img,
.resource-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.resource-card:hover .resource-thumb img,
.resource-card:hover .resource-visual img { transform: scale(1.035); }

.link-card .content,
.resource-card .content,
.quick-link .content,
.resource-copy { padding: 14px 15px 16px; }

.resource-copy { display: block; padding-right: 42px; }
.resource-copy strong { display: block; color: #303b36; font-family: "DFKai-SB", "BiauKai", "Noto Serif TC", serif; font-size: 17px; font-weight: 800; }
.resource-copy small { display: block; margin-top: 3px; color: var(--tx2); font-size: 13px; line-height: 1.5; }

.link-card .title,
.resource-card .title,
.quick-link .title,
.resource-name { color: #303b36; font-weight: 800; }

.link-card .description,
.resource-card .description,
.quick-link .description,
.resource-desc { margin-top: 3px; color: var(--tx2); font-size: 13px; }

.resource-name { display: flex; align-items: center; gap: 8px; }
.resource-arrow {
  position: absolute;
  right: 15px;
  bottom: 17px;
  margin-left: auto;
  color: var(--acc-deep);
  font-weight: 900;
  transition: transform .18s ease;
}
.resource-card:hover .resource-arrow { transform: translateX(3px); }

.resource-card.compact {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: stretch;
  margin-top: 12px;
  border-color: #91a9a4;
  background: #f8f3e8;
  box-shadow: 0 7px 18px rgba(49, 93, 91, .1);
}

.resource-card.compact .resource-visual { height: 100%; min-height: 78px; aspect-ratio: auto; }
.resource-card.compact .resource-copy { align-self: center; padding: 10px 11px; }
.resource-card.compact .resource-copy strong { color: var(--school-blue-deep); font-size: 13px; }
.resource-card.compact .resource-copy small { font-size: 11px; }
.resource-card.compact .resource-arrow { position: static; align-self: center; padding-right: 12px; }

/* 測驗、閃卡共用 */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 4px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(128, 103, 70, .56);
  border-radius: 8px 18px 9px 16px;
  background: rgba(247, 241, 229, .82);
  backdrop-filter: blur(10px);
}

.btn-back {
  padding: 7px 12px;
  color: #3d4a44;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 6px 12px 7px 11px;
  background: #f8f3e8;
}

.topbar .where { overflow: hidden; font-weight: 800; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.topbar .count { color: var(--school-blue); font-size: 13px; font-weight: 800; }

.progressbar {
  overflow: hidden;
  height: 8px;
  margin-bottom: 18px;
  border-radius: 99px;
  background: #d8cbb7;
}

.progressbar > div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--school-blue-deep), var(--school-teal) 48%, var(--acc) 100%);
  transition: width .3s ease;
}

.q-card {
  padding: 24px 21px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    radial-gradient(ellipse at 92% 6%, rgba(49, 93, 91, .07), transparent 29%),
    var(--card);
  box-shadow: var(--shadow);
}

.q-card .q { margin-bottom: 18px; color: #303b36; font-family: "DFKai-SB", "BiauKai", "Noto Serif TC", serif; font-size: 20px; font-weight: 800; }

.opt {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 11px;
  padding: 13px 14px;
  color: var(--tx);
  text-align: left;
  font-size: 15px;
  line-height: 1.55;
  cursor: pointer;
  border: 1px solid #c7b795;
  border-radius: 7px 14px 8px 13px;
  background: rgba(248, 243, 232, .9);
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}

.opt:hover:not(:disabled) { border-color: var(--school-teal); background: #edf0e8; transform: translateX(3px); }
.opt:disabled { cursor: default; opacity: .96; }
.opt.correct { color: #0b6844; font-weight: 700; border-color: var(--good); background: #e7f8ef; }
.opt.wrong { color: #9f2525; border-color: var(--bad); background: #fff0ef; }

.opt .tag {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin: -1px 10px -1px 0;
  place-items: center;
  color: var(--school-blue-deep);
  font-size: 13px;
  font-weight: 900;
  border-radius: 50% 45% 52% 47%;
  background: var(--school-blue-soft);
}

.exp-box {
  margin-top: 8px;
  padding: 12px 15px;
  color: #116844;
  font-size: 14px;
  border-left: 4px solid var(--good);
  border-radius: 0 12px 12px 0;
  background: #eaf1e9;
}

.exp-box.bad { color: #9f2525; border-left-color: var(--bad); background: #fff0ef; }
.next-wrap { margin-top: 17px; text-align: right; }

.btn-next {
  padding: 11px 30px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid var(--acc-deep);
  border-radius: 7px 15px 8px 14px;
}

/* 成績 */
.result {
  margin-top: 24px;
  padding: 34px 24px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 12px 28px 14px 25px;
  background: rgba(250, 247, 238, .92);
  box-shadow: var(--shadow);
}

.result .big { font-size: 68px; filter: drop-shadow(0 6px 0 rgba(249, 115, 22, .14)); }
.result h2 { margin: 8px 0; color: #303b36; font-family: "DFKai-SB", "BiauKai", "Noto Serif TC", serif; font-size: 26px; }
.result .stars-big { margin: 7px 0; color: var(--gold); font-size: 35px; letter-spacing: 4px; }
.result .score-line { margin-bottom: 23px; color: var(--tx2); }
.result .btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.result .btns button {
  padding: 11px 22px;
  color: var(--tx);
  font-size: 15px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 6px 13px 7px 12px;
  background: #f8f3e8;
}

.result .btns .primary { font-weight: 800; }

/* 閃卡 */
.flash-wrap { perspective: 1100px; }

.flash-card {
  position: relative;
  width: 100%;
  min-height: 270px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2, .75, .3, 1);
}

.flash-card.flipped { transform: rotateY(180deg); }

.flash-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--r);
  backface-visibility: hidden;
  box-shadow: var(--shadow);
}

.flash-face.front {
  color: #303b36;
  font-family: "DFKai-SB", "BiauKai", "Noto Serif TC", serif;
  font-size: 19px;
  font-weight: 800;
  background:
    radial-gradient(ellipse at 14% 18%, rgba(166, 122, 44, .13), transparent 35%),
    linear-gradient(145deg, #faf7ee, #efe3ce);
}

.flash-face.back {
  border-color: #8fa9a4;
  background:
    radial-gradient(ellipse at 88% 82%, rgba(49, 93, 122, .12), transparent 34%),
    linear-gradient(145deg, #f2f4ec, #dce7e5);
  transform: rotateY(180deg);
}

.flash-face.back .ans { margin-bottom: 10px; color: var(--school-blue-deep); font-size: 18px; font-weight: 900; }
.flash-face.back .exp { color: #4f6477; font-size: 14px; }
.flash-face .hint { position: absolute; bottom: 13px; color: var(--tx2); font-size: 12px; }
.flash-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 17px; }

.flash-nav button {
  padding: 9px 20px;
  color: var(--tx);
  font-size: 15px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 6px 13px 7px 12px;
  background: #f8f3e8;
}

.flash-nav button:disabled { cursor: not-allowed; opacity: .45; }
.flash-nav .pos { color: var(--school-blue); font-size: 14px; font-weight: 800; }

/* Boss 戰 */
.battle-heads { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fighter { flex: 1; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: 0 7px 18px rgba(53, 47, 35, .08); }
.fighter.enemy { border-color: #8f797b; background: #f4ece7; }
.fighter .who { display: flex; justify-content: space-between; gap: 5px; font-size: 13px; font-weight: 800; }
.hpbar { overflow: hidden; height: 10px; margin-top: 7px; border-radius: 5px; background: #d6c9b5; }
.hpbar > div { height: 100%; transition: width .4s ease; }
.hpbar .me { background: linear-gradient(90deg, var(--school-blue), #54b8dc); }
.hpbar .foe { background: linear-gradient(90deg, #6e4a58, #b65239); }
.combo-line { min-height: 21px; margin-bottom: 7px; color: var(--gold); text-align: center; font-size: 13px; font-weight: 800; }
.battle-log { min-height: 23px; margin-bottom: 11px; color: var(--tx2); text-align: center; font-size: 14px; }
.shake { animation: shake .35s; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px) rotate(-1deg); }
  75% { transform: translateX(6px) rotate(1deg); }
}

.footer { margin-top: 38px; color: #59635b; text-align: center; font-size: 12px; }
.footer::before { display: block; margin-bottom: 4px; color: var(--acc); content: "—  ◆  —"; letter-spacing: 6px; }
.footer a { color: var(--school-blue); }

@media (max-width: 560px) {
  #app { padding: 14px 13px 48px; }
  .hero { padding: 27px 16px 23px; border-radius: 24px; }
  .stage-grid,
  .link-grid,
  .resource-grid,
  .quick-links { grid-template-columns: 1fr; }
  .setup-guide { grid-template-columns: 1fr; }
  .setup-art-link { border-right: 0; border-bottom: 1px solid rgba(128, 103, 70, .42); }
  .setup-art { aspect-ratio: 16 / 9; min-height: 0; }
  .setup-copy { padding: 20px 16px 18px; }
  .setup-copy h2 { font-size: 21px; }
  .stage-card .desc { min-height: auto; }
  .topbar { grid-template-columns: auto 1fr; }
  .topbar .where { text-align: right; }
  .topbar .count { grid-column: 1 / -1; text-align: right; }
  .q-card { padding: 20px 15px; }
}

@media (max-width: 390px) {
  .hero h1 { font-size: 27px; }
  .hero .sub { font-size: 13px; }
  .boss-card { align-items: flex-start; padding: 17px 15px; }
  .boss-card .icon { font-size: 40px; }
  .battle-heads { flex-direction: column; }
  .result .btns { flex-direction: column; }
  .result .btns button { width: 100%; }
  .flash-nav button { padding-inline: 13px; }
}

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