/* Volcano Forecaster: the forecast desk of a volcano observatory. Scene and map drawn by art.js (colors from the --vf-*
   properties below, light and dark). Layout: the controls on the left, the field brief, cutaway volcano and hazard map
   on the right. */
html {
  --vf-sky1: #ffd9b0; --vf-sky2: #f6a97a; --vf-cloud: #fff4ea;
  --vf-cone1: #8f776a; --vf-cone2: #5d4a41; --vf-cone-line: #33251f; --vf-layer1: #a8907f; --vf-layer2: #6f5a4e;
  --vf-crust1: #7a5a46; --vf-crust2: #4f3627; --vf-crust-line: #33221a;
  --vf-lava1: #ff8a24; --vf-lava2: #c4410b; --vf-lava-line: #7a2706; --vf-plug: #7c6a62; --vf-dome: #6e5f58;
  --vf-ash1: #c9cdd2; --vf-ash2: #8d939b;
  --vf-land: #dfe9cf; --vf-road: #b9ad96; --vf-contour: #7d8c66; --vf-town: #f4f1ea;
  --vf-pyro: #b3261e; --vf-pyro-bg: #f6d6d0; --vf-lavamap: #ffd2a8; --vf-lavamap-dot: #c4410b; --vf-lahar: #c9d9e6; --vf-lahar-line: #3e6d8f;
  --vf-pin: #6b2bb3;
  --vf-ink: #2a1a12; --vf-panel-bg1: #fdf7f1; --vf-panel-bg2: #f6e9dd; --vf-accent: #a63d0c; --vf-ok: #13704a; --vf-bad: #b3261e;
  --vf-chip: #ffffff; --vf-chip-on: #fde3d2; --vf-tag: rgba(255, 255, 255, .86); --vf-tag-text: #2a1a12;
}
html[data-theme="dark"] {
  --vf-sky1: #3b2a3a; --vf-sky2: #6b3a2c; --vf-cloud: #8a7a86;
  --vf-cone1: #6d5a50; --vf-cone2: #3f3029; --vf-cone-line: #d9c8bd; --vf-layer1: #7d6a5e; --vf-layer2: #4c3c33;
  --vf-crust1: #4a3326; --vf-crust2: #2c1d14; --vf-crust-line: #8a6a56;
  --vf-lava-line: #ffb27a; --vf-plug: #a39088; --vf-dome: #8f7e76;
  --vf-ash1: #9aa0a8; --vf-ash2: #626872;
  --vf-land: #2f3a29; --vf-road: #6b6252; --vf-contour: #a7b78f; --vf-town: #d9d4c8;
  --vf-pyro: #ff8a80; --vf-pyro-bg: #4a2522; --vf-lavamap: #5c3a20; --vf-lavamap-dot: #ffb27a; --vf-lahar: #26394a; --vf-lahar-line: #9cc7e8;
  --vf-pin: #c9a2ff;
  --vf-ink: #f3e9e1; --vf-panel-bg1: #2b2321; --vf-panel-bg2: #221b19; --vf-accent: #ffab85; --vf-ok: #4fd08c; --vf-bad: #ff8a80;
  --vf-chip: #1e1918; --vf-chip-on: #4a2a1c; --vf-tag: rgba(24, 18, 16, .82); --vf-tag-text: #f3e9e1;
}

/* ── layout ── */
.vf { position: absolute; inset: 0; display: grid; grid-template-columns: 384px minmax(0, 1fr); gap: 12px; padding: 10px;
  color: var(--tlg-text); font-size: 16px; }
.vf input, .vf button { font: inherit; }
.vf-controls { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: auto; padding: 8px 10px;
  background: linear-gradient(var(--vf-panel-bg1), var(--vf-panel-bg2)); color: var(--vf-ink); border: 3px solid var(--vf-accent);
  border-radius: 14px; box-shadow: 0 3px 8px rgba(0, 0, 0, .16); }
.vf-right { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; overflow: auto; }
.vf-kicker { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--vf-accent); }
.vf-step { display: grid; gap: 4px; }
.vf-step-b { display: grid; gap: 4px; }
.vf-step-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; line-height: 1.2; }
.vf-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--vf-accent);
  color: #fff; font-size: 16px; font-weight: 800; }
html[data-theme="dark"] .vf-n { color: #2a1510; }
.vf-step.is-done .vf-n { background: var(--vf-ok); }
.vf-mark { margin-left: auto; font-weight: 800; font-size: 16px; }
.vf-mark.is-ok { color: var(--vf-ok); }
.vf-mark.is-bad { color: var(--vf-bad); }

/* sliders */
.vf-slider { display: grid; gap: 0; }
.vf-slider-h { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.vf-slider-v { font-weight: 800; color: var(--vf-accent); white-space: nowrap; }
.vf-slider.is-unset .vf-slider-v { font-weight: 600; font-style: italic; color: var(--vf-ink); opacity: .8; }
.vf-slider input { width: 100%; min-height: 26px; margin: 0; accent-color: var(--vf-accent); cursor: pointer; }
.vf-slider.is-unset input { opacity: .55; }
.vf-slider input:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.vf-ticks { display: flex; justify-content: space-between; font-size: 16px; line-height: 1.1; opacity: .85; padding: 0 2px; margin-top: -4px; }

/* answer chips */
.vf-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.vf-chips--3 { grid-template-columns: repeat(3, 1fr); }
.vf-chip { position: relative; display: flex; align-items: center; gap: 6px; min-height: 44px; min-width: 0; padding: 4px 22px 4px 8px; border: 2px solid #b79e8f;
  border-radius: 10px; background: var(--vf-chip); color: var(--vf-ink); font-size: 16px; line-height: 1.15; text-align: left; cursor: pointer; }
html[data-theme="dark"] .vf-chip { border-color: #7d675c; }
.vf-chips--3 .vf-chip { justify-content: center; padding: 4px 6px; text-align: center; }
.vf-chip:hover:not(:disabled) { border-color: var(--vf-accent); }
.vf-chip:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.vf-chip.is-on { border-color: var(--vf-accent); background: var(--vf-chip-on); font-weight: 700; box-shadow: inset 0 0 0 1px var(--vf-accent); }
.vf-chip.is-on::before { content: '●'; position: absolute; right: 6px; top: 3px; font-size: 12px; color: var(--vf-accent); }
.vf-chip-i { flex: none; display: grid; }
.vf-chip-m { position: absolute; right: 5px; bottom: 3px; font-weight: 800; }
.vf-chip.is-key { border-color: var(--vf-ok); box-shadow: inset 0 0 0 2px var(--vf-ok); }
.vf-chip.is-key .vf-chip-m { color: var(--vf-ok); }
.vf-chip.is-wrong { border-color: var(--vf-bad); border-style: dashed; }
.vf-chip.is-wrong .vf-chip-m { color: var(--vf-bad); }
.vf-chip:disabled { cursor: default; opacity: 1; }
.vf-chip.is-on:disabled::before { content: ''; }

/* field brief */
.vf-brief { padding: 8px 12px; border: 2px solid var(--vf-accent); border-radius: 12px; background: var(--vf-panel-bg1); color: var(--vf-ink); }
.vf-brief p { margin: 0 0 2px; line-height: 1.35; }
.vf-brief .vf-rule { margin: 4px 0 0; font-size: 16px; opacity: .9; }

/* scene + map */
.vf-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.vf-col { display: grid; gap: 8px; min-width: 0; }
.vf-planbox { padding: 6px 10px 8px; border: 3px solid var(--vf-accent); border-radius: 12px; background: linear-gradient(var(--vf-panel-bg1), var(--vf-panel-bg2)); color: var(--vf-ink); }
.vf-scene { min-width: 0; border-radius: 12px; overflow: hidden; border: 2px solid var(--vf-cone-line); box-shadow: 0 2px 6px rgba(0, 0, 0, .14); }
.vf-svg { display: block; width: 100%; height: auto; color: var(--vf-tag-text); }
.vf-svg text { font-family: var(--tlg-font); font-size: 16px; fill: var(--vf-tag-text); }
.vf-lbl text { font-weight: 700; paint-order: stroke; stroke: var(--vf-tag); stroke-width: 4px; }
.vf-lbl path { stroke: var(--vf-tag-text); }
.vf-tag rect, .vf-readout rect { fill: var(--vf-tag); }
.vf-readout text { font-weight: 700; }
.vf-bubble { fill: rgba(255, 255, 255, .78); stroke: rgba(80, 30, 10, .6); stroke-width: 1; }
.vf-drop { fill: #ffd27a; stroke: #e0590f; stroke-width: 1; }
.vf-mapcard { min-width: 0; padding: 8px; border: 2px solid var(--vf-contour); border-radius: 12px; background: var(--vf-panel-bg1); color: var(--vf-ink); }
.vf-mapcard h3 { margin: 0 0 6px; font-size: 16px; }
.vf-map-svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.vf-z { transition: filter .3s; }
.vf-z.is-lit { stroke-width: 5; stroke-dasharray: none; animation: vf-lit 1s ease-in-out 3; }
@keyframes vf-lit { 50% { opacity: .55; } }
.vf-legend { display: grid; gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.2; }
.vf-legend li { display: flex; align-items: center; gap: 6px; }
.vf-legend svg { flex: none; }
.vf-about { padding: 6px 10px; border: 1px solid var(--tlg-border); border-radius: 8px; font-size: 16px; }
.vf-about summary { cursor: pointer; min-height: 32px; font-weight: 700; display: flex; align-items: center; }
.vf-about p { margin: 4px 0; }
.vf.is-locked .vf-slider input { opacity: .7; }

/* Briefing example */
.vf-ex { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vf-ex figure { display: grid; justify-items: center; gap: 2px; margin: 0; padding: 6px; border: 1px solid var(--tlg-border); border-radius: 8px; text-align: center; }
.vf-ex figcaption { display: grid; font-size: 16px; line-height: 1.2; }

@media (max-width: 900px) {
  .vf { position: static; grid-template-columns: 1fr; }
  .vf-controls, .vf-right { overflow: visible; }
  .vf-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .vf *, .vf *::before { animation: none !important; transition: none !important; }
}
