/* 地球號出航（只有地科網站載入）。版面是虛擬畫布：橫拿至少 1200×640，直拿寬 640（js/share.js 等比例縮放） */
.ea { display: grid; padding: 62px 12px 12px; gap: 10px; grid-template: "q p" auto "f p" 1fr / 1fr 400px; background-color: #1c1a2c; background-size: cover; background-position: center; }
.ea::before { background: rgba(14, 12, 30, .5); }
.ea > .ea-q, .ea > .ea-f, .ea > .ea-p { position: relative; min-width: 0; min-height: 0; }
.ea .explain-veil { z-index: 30; }
@media (orientation: portrait) {
  .ea { grid-template: "q" auto "f" minmax(300px, 1fr) "p" auto / 1fr; padding: 72px 10px 10px; }
}
.ea-q { grid-area: q; padding: 10px 16px; border-radius: 16px; background: rgba(255, 248, 230, .97); box-shadow: var(--shadow); font-size: 23px; font-weight: 900; line-height: 1.32; color: var(--ink); }
.ea-tag { display: inline-block; margin-bottom: 3px; padding: 1px 12px; border-radius: 999px; background: #4a3a6b; color: #fff; font-size: 16px; font-weight: 800; }
.ea-tip { margin-top: 3px; font-size: 19px; color: var(--ink-2); font-weight: 800; }
.ea-f { grid-area: f; display: flex; align-items: center; justify-content: center; }
.ea-p { grid-area: p; display: flex; flex-direction: column; gap: 10px; min-height: 0; justify-content: flex-end; }

/* 直拿時標題不要斷在字中間 */
@media (orientation: portrait) {
  #s-title .logo { font-size: 92px; white-space: nowrap; }
  #s-title .logo-sub { font-size: 25px; letter-spacing: 2px; white-space: nowrap; }
}

/* 山壁 */
.ea-wall { position: relative; width: 100%; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 0 #2a2238, var(--shadow); background: #bfe6fa; }
.ea-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ea-over { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; font-family: var(--font); }
.ea-inset { position: absolute; top: 8px; right: 8px; width: 31%; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 3px #fff8e6, 0 3px 10px rgba(0, 0, 0, .4); display: none; }
.ea-inset.on { display: block; }
.ea-inset canvas { display: block; width: 100%; height: auto; }
.ea-inset span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(40, 30, 60, .82); color: #fff; font-size: 15px; font-weight: 800; text-align: center; }
.ea-cap { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 7px 14px; border-radius: 12px; background: rgba(40, 30, 60, .86); color: #fff; font-size: 22px; font-weight: 900; text-align: center; display: none; }
.ea-cap.on { display: block; }
.ea-tap { position: absolute; inset: 0; cursor: pointer; animation: ea-pulse 1.4s infinite; }
@keyframes ea-pulse { 50% { box-shadow: inset 0 0 0 5px #ffd24d; } }

/* 事件卡片 */
.ea-chips { display: grid; gap: 7px; grid-auto-rows: 1fr; min-height: 0; }
.ea-chip { position: relative; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 4px 12px 4px 8px; text-align: left; border-radius: 14px; background: linear-gradient(180deg, #fffdf5, #efe3c4); box-shadow: 0 4px 0 #a8976d; color: var(--ink); }
.ea-chip:active { transform: translateY(3px); box-shadow: 0 1px 0 #a8976d; }
.ea-chip .no { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #eadfc4; box-shadow: inset 0 0 0 2px #b9a67c; color: #fff; font-size: 21px; font-weight: 900; }
.ea-chip.sel { background: linear-gradient(180deg, #e8f5ff, #c6e0f8); box-shadow: 0 4px 0 #7f9ec8; }
.ea-chip.sel .no { background: #2f6fd0; box-shadow: none; }
.ea-chip.playing { outline: 4px solid #ffb42e; animation: blink .9s infinite; }
.ea-ic { flex: none; width: 44px; height: 31px; font-family: var(--font); }
.ea-chip .tx { display: flex; flex-direction: column; line-height: 1.16; min-width: 0; }
.ea-chip b { font-size: 21px; font-weight: 900; white-space: nowrap; }
.ea-chip small { font-size: 15px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.ea-btns { display: flex; gap: 8px; }
.ea-go { flex: 1; min-height: 58px; font-size: 25px; }
.ea-p > .ea-go { flex: none; }
.ea-go:disabled { filter: grayscale(.6); opacity: .75; }
.ea-go.ready { animation: blink 1.1s infinite; }
.ea-clear { flex: none; color: var(--ink); background: #fff8e6; box-shadow: inset 0 0 0 2px #b9821f; font-size: 19px; }
@media (orientation: portrait) {
  .ea-chips { grid-template-columns: 1fr 1fr; }
  .ea-chip { min-height: 66px; }
}
@media (orientation: landscape) {
  .ea-chips.n7 .ea-chip, .ea-chips.n8 .ea-chip { min-height: 46px; }
  .ea-chips.n8 { gap: 5px; }
}

/* 題目和解說卡上的地形圖 */
.ea-pics { display: flex; justify-content: center; gap: 10px; margin: 10px 0 0; }
.ea-pics figure { flex: 1 1 0; min-width: 0; max-width: 340px; margin: 0; text-align: center; }
.ea-pics img { display: block; width: 100%; height: auto; max-height: 190px; object-fit: contain; border-radius: 12px; }
.ea-pics figcaption { margin-top: 3px; font-size: 18px; font-weight: 900; line-height: 1.25; color: var(--ink-2); }
.ea-pics.q { float: right; width: 190px; margin: 0 0 4px 12px; }
/* 有字的剖面圖（自流井）：題目旁放大成整行，解說卡也放大 */
.ea-pics.q.wide { float: none; width: auto; max-width: 560px; margin: 6px auto 8px; }
.ea-pics.wide figure { max-width: 560px; }
.ea-pics.q.wide img { max-height: min(300px, 38vh); }
.ea-pics.wide img { max-height: min(280px, 34vh); }

/* 解說卡 */
.ea-card p { font-size: 22px; font-weight: 800; line-height: 1.42; margin: 8px 0 0; }
.ea-card .ea-sub { font-size: 19px; color: var(--ink-2); }

/* 實機操作 */
.ea-figbox { background: #fff; }
.ea-figbox svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; font-family: var(--font); }
.ea-opt { min-height: 58px; }
.ea-opt b { white-space: normal; font-size: 20px; line-height: 1.25; }
.ea-opt.gone { opacity: .35; filter: grayscale(1); }
.ea-mini { flex: none; width: 46px; height: 46px; }
.ea-mini svg { width: 100%; height: 100%; display: block; }
.ea-dial { padding: 12px 14px; border-radius: 16px; background: rgba(255, 248, 230, .97); box-shadow: var(--shadow); }
.ea-dialv { text-align: center; font-size: 34px; font-weight: 900; color: var(--ink); }
.ea-dialrow { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ea-range { flex: 1; min-width: 0; height: 40px; accent-color: #e8552e; }
.ea-step { flex: none; width: 54px; height: 54px; border-radius: 14px; background: linear-gradient(180deg, #fffdf5, #e8dcbc); box-shadow: 0 4px 0 #a8976d; font-size: 32px; font-weight: 900; color: var(--ink); }
.ea-step:active { transform: translateY(3px); box-shadow: 0 1px 0 #a8976d; }
/* 自由拉的實驗（explore）：拉過的重點會亮起來 */
.ea-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 248, 230, .97); box-shadow: var(--shadow); }
.ea-marks .hd { flex-basis: 100%; font-size: 18px; font-weight: 900; color: var(--ink-2); }
.ea-mark { padding: 4px 12px; border-radius: 999px; background: #eadfc4; color: #7a6a4a; font-size: 20px; font-weight: 900; }
.ea-mark.on { background: #ffd24d; color: var(--ink); box-shadow: inset 0 0 0 2px #b9821f; }
.ea-mark.on::before { content: "✔ "; }
/* 四個重點都看過：按鈕換成實心金色、深色字、輕輕放大縮小（不要閃爍，閃到最淡時像不能按） */
.ea-go.on { background: linear-gradient(180deg, #ffe07a, #f5b31b); color: #3b2508; box-shadow: 0 5px 0 #a8700a, 0 0 0 3px #fff6d6; filter: none; opacity: 1; animation: ea-nudge 1.4s ease-in-out infinite; }
@keyframes ea-nudge { 50% { transform: scale(1.04); } }
.ea-spot { cursor: pointer; }
.ea-spot circle { fill: rgba(255, 210, 77, .22); stroke: #ffd24d; stroke-width: 4; stroke-dasharray: 8 6; animation: ea-spin 2.4s linear infinite; transform-box: fill-box; transform-origin: center; }
.ea-spot:hover circle { fill: rgba(255, 210, 77, .5); }
.ea-spotname { font-size: 18px; font-weight: 900; text-anchor: middle; fill: #3c2f28; stroke: #fff8e6; stroke-width: 4px; paint-order: stroke; pointer-events: none; }
@keyframes ea-spin { to { stroke-dashoffset: -56; } }

/* 分成兩類 */
.ea-sort { display: grid; gap: 6px; min-height: 0; overflow: auto; }
.ea-sortrow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; background: #fff8e6; border-radius: 12px; box-shadow: 0 2px 0 #cdbb8e; }
.ea-sortrow b { font-size: 18px; font-weight: 900; line-height: 1.15; min-width: 0; }
.ea-sortb { min-height: 42px; padding: 2px 10px; border-radius: 10px; background: #eadfc4; font-size: 17px; font-weight: 900; color: var(--ink); }
.ea-sortb.sel { background: #2f6fd0; color: #fff; }

/* 維修會議：題目要比一般說明醒目 */
/* 問句的大小和顏色照共用樣式（style.css：比處境大、深色字、淡黃底），這裡不再改小、不改成紅褐色（家長 2026-11-14） */
.cn-bubble .sub { line-height: 1.3; }
/* 地科直拿的版面只有 640 寬：筆記會蓋住 C 選項，選項也擠成一字一行（2026-11-04 自動測試抓到），直拿不放筆記 */
@media (orientation: portrait) {
  .cn-notes { display: none; }
  .cn-bubble, .cn-advisors { right: 12px; }
  .cn-advisors { left: 12px; grid-template-columns: 1fr; gap: 8px; }
  .cn-ruler { display: none; }
}

/* 首頁右下角：登入、家長按鈕不能被旁邊的資料來源擠扁（家長 2026-11-06），字多時讓資料來源換行 */
#s-title .title-foot > .btn { flex: none; white-space: nowrap; }
/* 手機直拿：資料來源放在按鈕上面一行，按鈕靠右，整組抬高，不壓到最下面的「雷森科技｜給家長的說明」 */
@media (max-width: 600px) {
  #s-title .title-foot { left: 12px; right: 12px; bottom: 30px; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
  #s-title .title-foot .credit { order: -1; flex: 0 0 100%; margin-left: 0; text-align: right; }
}

/* 讀圖偵探直拿：原本左右兩欄，左欄太窄，案件圖只剩約 180px 寬、圖上的字約 5px（2026-11-07 全科自查實測）。
   改成上下排：上面是資料和圖（圖放大），下面是題目和選項 */
@media (orientation: portrait) {
  .scene.detective .dt-file { left: 2%; right: 2%; width: auto; top: 98px; bottom: auto; max-height: calc(58% - 98px); overflow-y: auto; }
  .scene.detective .dt-fig svg { max-height: 330px; }
  .scene.detective .dt-ask { left: 2%; right: 2%; width: auto; top: auto; bottom: 10px; height: calc(42% - 16px); overflow-y: auto; }
  .scene.detective .dt-ask .opts { grid-template-columns: 1fr 1fr; }
}
