/* 海洋小偵探：海洋藍＋珊瑚橘，手機／平板／桌機全尺寸 */
:root {
  --ocean-900: #0b3b66;
  --ocean-700: #1660a0;
  --ocean-600: #1f7fbf;
  --ocean-400: #4cb6e6;
  --ocean-100: #dff3fd;
  --ocean-50: #f2fbff;
  --coral: #ff7a59;
  --coral-dark: #d9532f;
  --sun: #ffd23f;
  --ink: #12324f;
  --muted: #4c6680;
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 10px 28px rgba(11, 59, 102, .12);
  --fs-sm: clamp(.95rem, .9rem + .2vw, 1.05rem);
  --fs-base: clamp(1.05rem, 1rem + .3vw, 1.2rem);
  --fs-lg: clamp(1.2rem, 1.08rem + .55vw, 1.5rem);
  --fs-xl: clamp(1.55rem, 1.25rem + 1.3vw, 2.3rem);
  --wrap: min(1240px, 100% - clamp(28px, 5vw, 72px));
  --topbar-h: 60px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', 'PingFang TC', system-ui, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--ink);
  background: var(--ocean-50);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ocean-700); }
button { font: inherit; color: inherit; }
.wrap { width: var(--wrap); margin-inline: auto; }
.br-wide { display: none; }
@media (min-width: 900px) { .br-wide { display: inline; } }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

/* ---------- 上方導覽列 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 59, 102, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding-top: env(safe-area-inset-top);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--topbar-h); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 900; font-size: var(--fs-lg); white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.topnav { display: flex; gap: 6px; }
.topnav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: #fff; text-decoration: none; font-weight: 700; font-size: var(--fs-sm);
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 255, 255, .1); transition: background .2s;
}
.topnav a:hover { background: rgba(255, 255, 255, .24); }
@media (max-width: 520px) {
  .brand span { font-size: 1.05rem; }
  .brand img { width: 30px; height: 30px; }
  .topnav { gap: 4px; }
  .topnav a { padding: 4px 10px; font-size: .92rem; }
}
@media (max-width: 370px) {
  .brand span { display: none; }
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 52px; padding: 12px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 900; font-size: var(--fs-base); text-decoration: none; text-align: center;
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:active { transform: translateY(2px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 5px 0 var(--coral-dark); }
.btn-primary:hover { background: #ff8b6d; }
.btn-ghost { background: #fff; color: var(--ocean-700); box-shadow: 0 4px 0 rgba(11, 59, 102, .18), inset 0 0 0 2px var(--ocean-100); }
.btn-ghost:hover { background: var(--ocean-100); }
.btn-sm { min-height: 46px; padding: 10px 20px; font-size: var(--fs-sm); }

/* ---------- 主視覺 ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(ellipse 60% 50% at 85% 0%, rgba(255, 255, 255, .25), transparent 70%),
    linear-gradient(180deg, #2fa3dc 0%, #1d7cc0 55%, #145f9c 100%);
  padding: clamp(36px, 6vw, 72px) 0 clamp(80px, 9vw, 120px);
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: clamp(28px, 4vw, 48px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 980px) { .hero-inner { grid-template-columns: 1fr 1fr; } .hero-inner .hero-lineup { grid-template-columns: repeat(6, 1fr); max-width: 560px; justify-self: end; width: 100%; } .hero-inner .hero-lineup li { grid-column: span 2; } .hero-inner .hero-lineup li:nth-child(4) { grid-column: 2 / span 2; } }
.hero-org {
  display: inline-block; margin: 0 0 12px; padding: 6px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .18); font-weight: 700; font-size: var(--fs-sm);
}
.hero h1 {
  margin: 0; font-weight: 900; line-height: 1.15; letter-spacing: .02em;
  font-size: clamp(2.3rem, 1.4rem + 4.2vw, 4.4rem);
  text-shadow: 0 4px 0 rgba(11, 59, 102, .55), 0 10px 24px rgba(11, 59, 102, .35);
}
.hero-sub {
  display: inline-block; margin: 16px 0 0; padding: 4px 22px 6px; border-radius: 14px;
  background: var(--sun); color: var(--ocean-900); font-weight: 900;
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.2rem); box-shadow: 0 5px 0 #d9a514;
}
.hero-lead { margin: 18px 0 0; font-size: var(--fs-lg); line-height: 1.75; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

.hero-lineup {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(8px, 1.4vw, 16px);
}
.hero-lineup li {
  background: rgba(255, 255, 255, .16); border-radius: 18px; padding: 6px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25);
  animation: bob 4s ease-in-out infinite;
}
.hero-lineup li:nth-child(2) { animation-delay: -.8s; }
.hero-lineup li:nth-child(3) { animation-delay: -1.6s; }
.hero-lineup li:nth-child(4) { animation-delay: -2.4s; }
.hero-lineup li:nth-child(5) { animation-delay: -3.2s; }
.hero-lineup img { width: 100%; aspect-ratio: 480 / 510; object-fit: cover; border-radius: 13px; }
@media (min-width: 560px) and (max-width: 979px) { .hero-lineup { max-width: 720px; } }
@media (max-width: 559px) {
  .hero-lineup { grid-template-columns: repeat(6, 1fr); }
  .hero-lineup li { grid-column: span 2; }
  .hero-lineup li:nth-child(4) { grid-column: 2 / span 2; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.bubbles i {
  position: absolute; bottom: -40px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .08);
  animation: rise linear infinite;
}
.bubbles i:nth-child(1) { left: 4%; width: 18px; height: 18px; animation-duration: 11s; }
.bubbles i:nth-child(2) { left: 14%; width: 10px; height: 10px; animation-duration: 8s; animation-delay: -3s; }
.bubbles i:nth-child(3) { left: 27%; width: 26px; height: 26px; animation-duration: 14s; animation-delay: -6s; }
.bubbles i:nth-child(4) { left: 42%; width: 12px; height: 12px; animation-duration: 9s; animation-delay: -1s; }
.bubbles i:nth-child(5) { left: 58%; width: 20px; height: 20px; animation-duration: 12s; animation-delay: -7s; }
.bubbles i:nth-child(6) { left: 71%; width: 9px; height: 9px; animation-duration: 7s; animation-delay: -2s; }
.bubbles i:nth-child(7) { left: 84%; width: 24px; height: 24px; animation-duration: 13s; animation-delay: -9s; }
.bubbles i:nth-child(8) { left: 94%; width: 14px; height: 14px; animation-duration: 10s; animation-delay: -4s; }
@keyframes rise { from { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } to { transform: translateY(-900px); opacity: 0; } }
.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(40px, 6vw, 90px); }

@media (prefers-reduced-motion: reduce) {
  .hero-lineup li, .bubbles i { animation: none; }
  .bubbles { display: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 區塊共用 ---------- */
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section-title {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px;
  font-size: var(--fs-xl); font-weight: 900; color: var(--ocean-900); line-height: 1.3;
}
.section-title span {
  flex: none; display: grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 14px;
  background: var(--ocean-100); font-size: .8em;
}
.section-note { margin: 0 0 26px; color: var(--muted); font-size: var(--fs-base); max-width: 60em; }
.section-note b { color: var(--ocean-900); }
.kw { color: var(--coral-dark) !important; }

/* ---------- 參加方式 ---------- */
.how { padding-top: clamp(20px, 3vw, 36px); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.steps li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
}
.steps strong { display: block; font-size: var(--fs-lg); color: var(--ocean-900); }
.steps p { margin: 4px 0 0; color: var(--muted); }
.steps b { color: var(--coral-dark); }
.step-no {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--sun); color: var(--ocean-900); font-weight: 900; font-size: 1.35rem; box-shadow: 0 4px 0 #d9a514;
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- 題目 ---------- */
.quiz { background: linear-gradient(180deg, var(--ocean-50), #e6f6fd); }
.quiz-grid { display: grid; gap: clamp(14px, 1.6vw, 20px); grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1180px) { .quiz-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .quiz-grid { grid-template-columns: repeat(2, 1fr); } }

.q-card {
  margin: 0; min-width: 0; border: 0; padding: 16px; border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
  outline: 3px solid transparent; transition: outline-color .2s;
}
.q-card.is-done { outline-color: #8fd6a4; }
.q-legend { margin: 0; padding: 0; display: flex; flex-direction: column; line-height: 1.35; font-weight: 400; }
.q-no { font-size: var(--fs-sm); font-weight: 700; color: var(--coral-dark); }
.q-ask { font-size: var(--fs-lg); font-weight: 900; color: var(--ocean-900); }
@media (min-width: 1181px) { .q-ask { font-size: 1.12rem; white-space: nowrap; } }
.q-img {
  padding: 0; border: 0; cursor: zoom-in; border-radius: 16px; overflow: hidden; background: #3fb2d9;
  position: relative;
}
.q-img img { width: 100%; aspect-ratio: 480 / 510; object-fit: cover; transition: transform .3s; }
.q-img:hover img { transform: scale(1.05); }
.q-img::after {
  content: '🔍'; position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255, 255, 255, .9); font-size: 1rem;
}
.q-opts { display: grid; gap: 8px; }
.q-opt { position: relative; cursor: pointer; display: block; }
.q-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.q-opt-box {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 14px;
  border-radius: 14px; background: var(--ocean-50); box-shadow: inset 0 0 0 2px var(--ocean-100);
  font-weight: 700; font-size: var(--fs-base); transition: background .15s, box-shadow .15s, color .15s;
}
.q-opt-box b {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; color: var(--ocean-700); font-size: .95rem; box-shadow: inset 0 0 0 2px var(--ocean-100);
}
.q-opt:hover .q-opt-box { background: var(--ocean-100); }
.q-opt input:focus-visible + .q-opt-box { outline: 3px solid var(--sun); outline-offset: 2px; }
.q-opt input:checked + .q-opt-box { background: var(--ocean-600); color: #fff; box-shadow: 0 4px 0 var(--ocean-900); }
.q-opt input:checked + .q-opt-box b { background: var(--sun); color: var(--ocean-900); box-shadow: none; }

/* 手機：圖片在左、選項在右，一題一張卡 */
@media (max-width: 560px) {
  .quiz-grid { grid-template-columns: 1fr; }
  .q-card { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); grid-template-areas: 'legend legend' 'img opts'; gap: 10px 12px; padding: 14px; }
  .q-legend { grid-area: legend; }
  .q-img { grid-area: img; align-self: start; }
  .q-opts { grid-area: opts; gap: 6px; }
  .q-opt-box { min-height: 44px; padding: 4px 10px; gap: 8px; }
  .q-opt-box b { width: 26px; height: 26px; }
}

/* 答案小抄 */
.answer-sheet {
  margin-top: clamp(22px, 3vw, 34px); padding: clamp(18px, 2.5vw, 28px);
  background: #fffdf5; border-radius: var(--radius); box-shadow: var(--shadow);
  border: 3px dashed #f2c94c;
}
.sheet-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.sheet-head h3 { margin: 0; font-size: var(--fs-lg); color: var(--ocean-900); }
.sheet-progress { margin: 0; font-weight: 700; color: var(--coral-dark); }
.sheet-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1000px) { .sheet-list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) {
  .sheet-list { grid-template-columns: 1fr; gap: 8px; }
  .answer-sheet .sheet-list li { flex-direction: row; justify-content: space-between; padding: 8px 14px; }
}
.sheet-list li {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px;
  background: #fff; border-radius: 14px; box-shadow: inset 0 0 0 2px #f6e3a6; text-align: center;
}
.sheet-list li.filled { box-shadow: inset 0 0 0 2px #8fd6a4; background: #f3fcf5; }
.sheet-list a { font-weight: 700; color: var(--muted); text-decoration: none; font-size: var(--fs-sm); }
.sheet-ans { font-size: var(--fs-lg); font-weight: 900; color: var(--ocean-900); white-space: nowrap; }
.sheet-ans b { color: var(--coral-dark); }
.sheet-ans i { display: inline-block; min-width: 2.2em; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.sheet-tip { margin: 14px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.sheet-tip b { color: var(--ink); }
@media (max-width: 560px) {
  .sheet-actions .btn { flex: 1 1 auto; }
}

/* ---------- 辨識小卡 ---------- */
.card-grid { display: grid; gap: clamp(16px, 2vw, 24px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
@media (min-width: 1181px) { .card-grid { grid-template-columns: repeat(6, 1fr); } .fish-card { grid-column: span 2; } .fish-card:nth-child(4) { grid-column: 2 / span 2; } }
.fish-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  --tone: #ffe1d2; --tone-ink: #b2471f;
}
.tone-sand { --tone: #f6e7c7; --tone-ink: #8a5a12; }
.tone-lilac { --tone: #e8defa; --tone-ink: #6141a3; }
.tone-mint { --tone: #d6f3e6; --tone-ink: #1f7a52; }
.tone-rose { --tone: #fde0e6; --tone-ink: #b03358; }
.fish-photo { background: #f4f6f8; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.fish-photo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.fish-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.fish-body h3 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: var(--fs-xl); color: var(--ocean-900); line-height: 1.2; }
.fish-emoji { display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 12px; background: var(--tone); font-size: .7em; }
.fish-head { margin: 8px 0 6px; font-weight: 900; color: var(--tone-ink); font-size: var(--fs-lg); }
.fish-body ul { margin: 0 0 14px; padding-left: 1.2em; color: var(--ink); }
.fish-body li { margin: 2px 0; }
.fish-body li::marker { color: var(--tone-ink); }
.fish-tip {
  margin: auto 0 0; padding: 12px 14px; border-radius: 14px; background: var(--tone);
  font-weight: 900; font-size: var(--fs-lg); color: var(--ocean-900); line-height: 1.4;
}
.fish-tip span { display: block; font-size: var(--fs-sm); color: #c0392b; font-weight: 700; }
.fish-sheet {
  margin-top: 12px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--ocean-50); color: var(--ocean-700); font-weight: 700; font-size: var(--fs-sm);
  box-shadow: inset 0 0 0 2px var(--ocean-100);
}
.fish-sheet:hover { background: var(--ocean-100); }

/* ---------- 海報 ---------- */
.poster { background: linear-gradient(180deg, #e6f6fd, var(--ocean-50)); }
.poster-inner { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: minmax(0, 420px) minmax(0, 1fr); align-items: center; }
@media (max-width: 860px) { .poster-inner { grid-template-columns: 1fr; } .poster-fig { max-width: 420px; margin-inline: auto !important; width: 100%; } }
.poster-fig { margin: 0; }
.poster-zoom { display: block; width: 100%; padding: 0; border: 6px solid #fff; border-radius: 22px; overflow: hidden; cursor: zoom-in; box-shadow: var(--shadow); background: #fff; }
.poster-fig figcaption { text-align: center; color: var(--muted); font-size: var(--fs-sm); margin-top: 10px; }
.poster-text p { margin: 0 0 18px; color: var(--muted); }
.facts { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.facts li { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); }
.facts li > span { font-size: 1.6rem; }
.facts b { display: block; color: var(--coral-dark); font-size: var(--fs-sm); }

/* ---------- 頁尾 ---------- */
.site-footer {
  position: relative; margin-top: 0;
  background: linear-gradient(180deg, #0f4a7d, #0b3b66); color: #e8f4fd;
  padding: clamp(36px, 5vw, 56px) 0 calc(24px + env(safe-area-inset-bottom));
}
.site-footer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--ocean-400), var(--sun), var(--coral)); }
.footer-inner { display: grid; gap: 28px; grid-template-columns: minmax(230px, 1fr) minmax(0, 2.6fr) auto; align-items: start; }
@media (max-width: 1100px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-points { grid-column: 1 / -1; grid-row: 2; } }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } .footer-points { grid-row: auto; } }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand img { width: 48px; height: 48px; border-radius: 14px; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.footer-brand strong { display: block; font-size: var(--fs-lg); color: #fff; line-height: 1.35; }
.footer-brand span { color: #b9d8ef; font-size: var(--fs-sm); }
.footer-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .footer-points { grid-template-columns: 1fr; } }
.footer-points li { display: flex; gap: 12px; align-items: flex-start; background: rgba(255, 255, 255, .07); border-radius: 16px; padding: 14px; }
.fp-icon { flex: none; font-size: 1.5rem; line-height: 1.2; }
.footer-points strong { display: block; color: #fff; font-size: var(--fs-base); }
.footer-points small { color: #b9d8ef; font-size: var(--fs-sm); line-height: 1.5; display: block; }
.footer-links { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer-link {
  color: #e8f4fd; text-decoration: none; font-weight: 700; font-size: var(--fs-sm); background: none; border: 0; padding: 4px 0; cursor: pointer;
}
.footer-link:hover { color: var(--sun); }
@media (max-width: 1100px) {
  .footer-links { flex-direction: row; flex-wrap: wrap; }
  .footer-link { padding: 10px 16px; border-radius: 999px; background: rgba(255, 255, 255, .1); min-height: 44px; }
}
.footer-bottom {
  margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .15);
  display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between;
}
.site-credit { margin: 0; font-size: var(--fs-sm); color: #d4e8f7; }
.site-credit__heart { display: inline-block; margin: 0 2px; filter: saturate(1.1); }
.site-credit__author { color: #fff; font-weight: 700; text-decoration: none; border-bottom: 1px dotted currentColor; padding-bottom: 1px; transition: color .2s; }
.site-credit__author:hover { color: var(--sun); }
.version-tag { margin: 0; font-size: var(--fs-sm); padding: 3px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); color: #d4e8f7; }
@media (max-width: 640px) {
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-school { display: block; }
  .footer-dot { display: none; }
}

/* ---------- 放大看圖 ---------- */
.zoom-dialog {
  width: min(96vw, 1100px); max-height: 94vh; padding: 14px; border: 0; border-radius: 20px;
  background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}
.zoom-dialog::backdrop { background: rgba(8, 30, 52, .78); }
.zoom-dialog img { width: 100%; max-height: calc(94vh - 90px); object-fit: contain; border-radius: 12px; }
.zoom-dialog p { margin: 10px 0 0; text-align: center; font-weight: 700; color: var(--ocean-900); }
.zoom-close-form { position: sticky; top: 0; display: flex; justify-content: flex-end; margin-bottom: 8px; z-index: 1; }
.zoom-close { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--ocean-100); font-size: 1.2rem; font-weight: 900; color: var(--ocean-900); }

/* ---------- 提示訊息 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 90;
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  max-width: calc(100vw - 32px); padding: 12px 22px; border-radius: 999px;
  background: var(--ocean-900); color: #fff; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  transition: opacity .25s, transform .25s; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.has-update-bar .toast { bottom: calc(110px + env(safe-area-inset-bottom)); }

/* ---------- 新版本提示列 ---------- */
#sw-update-bar {
  position: fixed; z-index: 95; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px;
  background: #fff; color: var(--ink); border-radius: 18px; box-shadow: 0 14px 40px rgba(11, 59, 102, .35);
  border: 2px solid var(--ocean-400); animation: barIn .35s ease-out;
}
#sw-update-bar .sw-msg { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
#sw-update-bar .sw-msg b { font-size: 1.05rem; color: var(--ocean-900); }
#sw-update-bar .sw-msg small { color: var(--muted); font-size: .9rem; }
#sw-go { flex: none; min-height: 44px; padding: 8px 18px; border: 0; border-radius: 999px; cursor: pointer; background: var(--coral); color: #fff; font-weight: 900; box-shadow: 0 4px 0 var(--coral-dark); }
#sw-x { flex: none; order: 3; width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer; background: var(--ocean-50); color: var(--muted); font-weight: 900; }
@keyframes barIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media print {
  .topbar, .hero-actions, .bubbles, .wave, .sheet-actions, .site-footer, #sw-update-bar, .toast { display: none !important; }
  .hero { background: #fff; color: var(--ink); padding: 0; }
  .hero h1 { text-shadow: none; }
}
