/* 等高线地形图特有样式（通用样式见 ../shared/base.css） */
[hidden] { display: none !important; }

/* 立体 / 平面两个窗格：对照时左右（竖屏时上下）排列 */
#stage { display: flex; }
#stage.portrait { flex-direction: column; }
.pane { position: relative; flex: 1 1 0; min-width: 0; min-height: 0; overflow: hidden; }
#stage.v-3d #paneMap, #stage.v-map #pane3d { display: none; }
#stage.v-split #paneMap { border-left: 1px solid var(--line); }
#stage.v-split.portrait #paneMap { border-left: none; border-top: 1px solid var(--line); }
#paneMap { display: flex; flex-direction: column; background: #0b1018; }
#map { flex: 1 1 0; min-height: 0; width: 100%; touch-action: none; }
#pane3d canvas { touch-action: none; }

.pane-title { position: absolute; left: 12px; bottom: 10px; z-index: 3; font-size: 12px; color: var(--muted);
  pointer-events: none; }
#paneMap .pane-title { display: none; }
.cam-btns { position: absolute; right: 12px; top: 12px; z-index: 3; display: flex; gap: 6px; }
.cam-btns button { font: inherit; font-size: 12px; padding: 4px 10px; color: var(--text); background: rgba(17,23,35,.85);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.cam-btns button:hover { border-color: var(--accent); color: var(--accent); }

#viewSeg { position: absolute; left: 12px; top: 12px; z-index: 4; }
#viewSeg button { font-size: 13px; padding: 4px 12px; }

#caption { position: absolute; left: 50%; top: 46px; transform: translateX(-50%); z-index: 4; max-width: min(560px, calc(100% - 24px));
  padding: 8px 16px; border-radius: 10px; background: rgba(17,23,35,.92); border: 1px solid var(--accent);
  font-size: 14px; text-align: center; pointer-events: none; }
#caption b { color: var(--accent); }

/* 剖面图 */
#profBox { flex: none; height: 150px; margin: 0 10px 10px; padding: 6px 8px 4px; background: rgba(17,23,35,.92);
  border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; }
#profBox .pt { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
#profBox .pt span { flex: 1; }
#profClose { font: inherit; font-size: 15px; line-height: 1; padding: 0 6px; color: var(--muted); background: none;
  border: none; cursor: pointer; }
#profClose:hover { color: var(--accent); }
#prof { flex: 1; min-height: 0; width: 100%; }

/* 3D 标签 */
.lbl { font-size: 12px; color: #fff; white-space: nowrap; pointer-events: none; text-shadow: 0 0 3px #000, 0 0 6px #000; }
.lbl-n { font-weight: 600; color: var(--muted); }
.lbl-f { font-weight: 600; padding: 1px 6px; border-radius: 6px; background: rgba(10,14,22,.65); text-shadow: none; }
.lbl-peak { color: #ffb4a2; }
.lbl-ridge { color: #ffa94d; }
.lbl-valley { color: #63e6be; }
.lbl-saddle { color: #d0a8ff; }
.lbl-cliff { color: #e9d8c4; }
.lbl-basin { color: #74c0fc; }
.lbl-steep { color: #f783ac; }
.lbl-gentle { color: #8ce99a; }
.lbl-ab { font-weight: 700; font-size: 14px; color: #ff6fa0; }
.lbl-q { font-weight: 700; font-size: 18px; color: #ff2d55; }

/* 面板 */
.ok { color: #7ee081; }
.bad { color: #ff7a59; }
.readout .big { font-size: 20px; }
.readout .tip { font-size: 12px; color: var(--accent); margin-top: 4px; min-height: 18px; }

.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.presets button, .quiz-opts button, .wide-btn { font: inherit; font-size: 12px; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 0; cursor: pointer; }
.presets button:hover, .quiz-opts button:not(:disabled):hover, .wide-btn:hover { border-color: var(--accent); }
.presets button.on { border-color: var(--accent); background: rgba(255,201,74,.14); }
.presets .span2 { grid-column: span 2; }
.wide-btn { width: 100%; font-size: 13px; padding: 7px 0; margin-bottom: 8px; color: var(--accent); }

.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; font-size: 13px; padding: 5px 0; }
.row .seg.wide { grid-column: span 2; }
.switch.line { margin-bottom: 4px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }

.quiz-q { margin: 0 0 8px; font-size: 13px; }
.quiz-q .qmark { color: #ff2d55; }
.quiz-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quiz-opts button:disabled { cursor: default; opacity: .55; }
.quiz-opts button.right { opacity: 1; border-color: #7ee081; background: rgba(126,224,129,.18); }
.quiz-opts button.wrong { opacity: 1; border-color: #ff7a59; background: rgba(255,122,89,.18); }
.quiz-fb { margin: 8px 0 0; font-size: 12px; min-height: 0; }
.quiz-fb:empty { display: none; }

.key { list-style: none; padding: 0; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.key li { margin: 3px 0; }
.key i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.key i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 8px); }
.key i.cliff { height: 7px; border-radius: 0; background:
  linear-gradient(#e9d8c4, #e9d8c4) top / 100% 2px no-repeat,
  repeating-linear-gradient(90deg, #e9d8c4 0 1.5px, transparent 1.5px 4px) bottom / 100% 5px no-repeat; }
.key .sym { color: #ff8a80; font-weight: normal; }
.ramp { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 14px; font-size: 10px; color: var(--muted);
  background: linear-gradient(90deg, rgb(72,148,86), rgb(138,190,102) 15.4%, rgb(214,211,126) 30.8%, rgb(224,176,102) 46.2%,
    rgb(194,130,76) 61.5%, rgb(156,96,62) 76.9%, rgb(196,163,141)) top / 100% 10px no-repeat; border-radius: 3px; }

@media (max-width: 760px) {
  #viewSeg { top: 84px; }
  #viewSeg button { font-size: 12px; padding: 3px 10px; }
  #caption { top: 120px; font-size: 13px; }
  .pane-title { display: none; }
  .cam-btns { top: auto; bottom: 10px; }
  #profBox { height: 120px; }
  .quiz-opts { grid-template-columns: repeat(4, 1fr); }
}

/* 提示条放到底部，避开窗格右上角的视角按钮 */
#hint { top: auto; bottom: 44px; }
@media (max-width: 760px) { #hint { display: none; } }
#stage.has-prof .learn-fab, #stage.has-prof #hint { display: none; }
