/* Planet Hopper: a flight line in space (world disk, center-distance rings, hopper pod, gravity arrow, pod scale).
   Scene by art.js; panel colors from the --ph-* properties below (light and dark). Space stays dark in both themes. */
html {
  --ph-ink: #17213a; --ph-panel-bg1: #f5f7fc; --ph-panel-bg2: #e4e9f6; --ph-accent: #2b4c9b; --ph-ok: #13704a; --ph-bad: #b3261e;
  --ph-chip: #ffffff; --ph-chip-on: #dbe4f8; --ph-line: #05071a;
}
html[data-theme="dark"] {
  --ph-ink: #e8edf8; --ph-panel-bg1: #1c2236; --ph-panel-bg2: #151a2b; --ph-accent: #9fb6f2; --ph-ok: #4fd08c; --ph-bad: #ff8a80;
  --ph-chip: #141a2b; --ph-chip-on: #24335c; --ph-line: #000000;
}
.ph { position: absolute; inset: 0; display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 12px; padding: 10px; color: var(--tlg-text); font-size: 16px; }
.ph input, .ph button { font: inherit; }
.ph-controls { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: auto; padding: 8px 12px;
  background: linear-gradient(var(--ph-panel-bg1), var(--ph-panel-bg2)); color: var(--ph-ink); border: 3px solid var(--ph-accent); border-radius: 14px; box-shadow: 0 3px 8px rgba(0,0,0,.16); }
.ph-right { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; overflow: auto; }
.ph-kicker { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ph-accent); }
.ph-step { display: grid; gap: 3px; }
.ph-step-b { display: grid; gap: 3px; }
.ph-step-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; line-height: 1.2; }
.ph-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ph-accent); color: #fff; font-size: 16px; font-weight: 800; }
html[data-theme="dark"] .ph-n { color: #0d1a24; }
.ph-step.is-done .ph-n { background: var(--ph-ok); }
.ph-mark { margin-left: auto; font-weight: 800; white-space: nowrap; }
.ph-mark.is-ok, .ph-fmark.is-ok { color: var(--ph-ok); }
.ph-mark.is-bad, .ph-fmark.is-bad { color: var(--ph-bad); }
.ph-fixed, .ph-mass, .ph-cmp { margin: 0; line-height: 1.3; }
.ph-fixed { padding: 3px 8px; border-radius: 8px; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(31,95,139,.08) 6px 12px); border: 1px dashed var(--ph-accent); }
.ph-slider { display: grid; gap: 1px; }
.ph-slider-h { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.ph-slider-v { font-weight: 800; color: var(--ph-accent); white-space: nowrap; }
.ph-slider.is-unset .ph-slider-v { font-weight: 600; font-style: italic; color: var(--ph-ink); opacity: .8; }
.ph-slider-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 6px; }
.ph-slider input { width: 100%; min-height: 32px; margin: 0; accent-color: var(--ph-accent); cursor: pointer; }
.ph-slider.is-unset input { opacity: .55; }
.ph-step-btn { min-height: 40px; border-radius: 10px; border: 2px solid var(--ph-accent); background: var(--ph-chip); color: var(--ph-ink); font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer; }
.ph-step-btn:disabled { opacity: .45; cursor: default; }
.ph input:focus-visible, .ph button:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.ph-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ph-num { display: grid; gap: 1px; min-width: 0; }
.ph-num-l { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; font-weight: 700; line-height: 1.2; }
.ph-fmark { font-weight: 800; }
.ph-num-row { display: flex; align-items: center; gap: 6px; }
.ph-num input { flex: 1 1 auto; min-width: 0; width: 100%; font-size: 17px; min-height: 40px; padding: 3px 8px; border: 2px solid #8796a1; border-radius: 8px; background: #fff; color: #17242c; }
html[data-theme="dark"] .ph-num input { background: #10171c; color: #eef3f6; border-color: #6d7f8c; }
.ph-unit { flex: none; font-weight: 700; }
.ph-chips { display: grid; gap: 4px; }
.ph-chip { position: relative; display: flex; align-items: center; min-height: 38px; padding: 4px 26px 4px 10px; border: 2px solid #9fb0bc; border-radius: 10px;
  background: var(--ph-chip); color: var(--ph-ink); font-size: 16px; line-height: 1.15; text-align: left; cursor: pointer; }
html[data-theme="dark"] .ph-chip { border-color: #4d606d; }
.ph-chip:hover:not(:disabled) { border-color: var(--ph-accent); }
.ph-chip.is-on { border-color: var(--ph-accent); background: var(--ph-chip-on); font-weight: 700; box-shadow: inset 0 0 0 1px var(--ph-accent); }
.ph-chip.is-on::before { content: '●'; margin-right: 6px; color: var(--ph-accent); }
.ph-chip-m { position: absolute; right: 8px; font-weight: 800; }
.ph-chip.is-key { border-color: var(--ph-ok); box-shadow: inset 0 0 0 2px var(--ph-ok); }
.ph-chip.is-key .ph-chip-m { color: var(--ph-ok); }
.ph-chip.is-wrong { border-color: var(--ph-bad); border-style: dashed; }
.ph-chip.is-wrong .ph-chip-m { color: var(--ph-bad); }
.ph-chip:disabled { cursor: default; opacity: 1; }
.ph-brief { flex: none; padding: 5px 12px; border: 2px solid var(--ph-accent); border-radius: 12px; background: var(--ph-panel-bg1); color: var(--ph-ink); }
.ph-brief p { margin: 0; line-height: 1.35; }
.ph-target { font-size: 18px; }
.ph-scene { flex: none; border-radius: 12px; overflow: hidden; border: 2px solid var(--ph-line); background: #05071a; }
.ph-svg { display: block; width: 100%; height: auto; }
.ph-svg text { font-family: var(--tlg-font); }
.ph-slider-ticks { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0 46px; font-size: 16px; font-weight: 700; opacity: .8; }
.ph-slider-ticks span { text-align: center; }
.ph-lbl { font-size: 16px; font-weight: 700; fill: #eef3ff; paint-order: stroke; stroke: #05071a; stroke-width: 4px; stroke-linejoin: round; }
.ph-dim { fill: #b9c6ec; font-weight: 600; }
.ph-plate-t { font-size: 20px; font-weight: 800; fill: #ffffff; letter-spacing: .08em; }
.ph-axis { fill: none; stroke: #9fb3ff; stroke-width: 2; stroke-dasharray: 6 5; opacity: .85; }
.ph-ring { fill: none; stroke: #7f95e0; stroke-width: 1.5; stroke-dasharray: 3 6; opacity: .55; }
.ph-ring.is-on { stroke: #ffd23f; stroke-width: 2.5; opacity: 1; stroke-dasharray: 8 5; }
.ph-tick { stroke: #c7d2f7; stroke-width: 2.5; }
.ph-tick.is-on { stroke: #ffd23f; stroke-width: 4; }
.ph-ticklbl { font-size: 16px; font-weight: 700; fill: #c7d2f7; paint-order: stroke; stroke: #05071a; stroke-width: 4px; }
.ph-ticklbl.is-on { fill: #ffd23f; font-weight: 800; }
.ph-brk-p { fill: none; stroke: #c7d2f7; stroke-width: 2; }
.ph-brk--a .ph-brk-p { stroke: #8ee0c1; stroke-dasharray: 5 3; }
.ph-brk--a .ph-brk-t { fill: #a8f0d4; }
.ph-arrow-s { fill: none; stroke: #ffd23f; stroke-width: 8; stroke-linecap: round; }
.ph-arrow-h { fill: #ffd23f; stroke: #ffd23f; stroke-width: 1; }
.ph.is-assess .ph-arrow-s { stroke-dasharray: 2 7; }
.ph-ghost { fill: none; stroke: #ffd23f; stroke-width: 2; stroke-dasharray: 4 5; opacity: .75; }
.ph-flabel { font-size: 16px; font-weight: 800; fill: #ffe68a; paint-order: stroke; stroke: #05071a; stroke-width: 4px; stroke-linejoin: round; }
.ph-hud-k { font-size: 16px; font-weight: 800; fill: #9fb3ff; letter-spacing: .05em; }
.ph-hud-v { font-size: 24px; font-weight: 800; fill: #5ff0a8; font-variant-numeric: tabular-nums; }
.ph-hud-m { font-size: 16px; font-weight: 700; fill: #eef3ff; }
.ph-hud-s { font-size: 16px; font-weight: 700; fill: #c7d2f7; }
.ph-hud-wait { font-size: 16px; font-weight: 600; fill: #8794bd; font-style: italic; }
.ph-bar-v { font-size: 16px; font-weight: 800; fill: #ffffff; }
.ph-bars rect { transition: y .25s ease, height .25s ease; }
.ph-flame-g { opacity: 0; }
.ph.is-flying .ph-flame-g { opacity: 1; }
.ph.is-flying .ph-flame { animation: ph-flicker .12s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center top; }
.ph.is-flying .ph-beacon { animation: ph-blink .4s steps(2) infinite; }
@keyframes ph-flicker { from { transform: scaleY(.75); } to { transform: scaleY(1.15); } }
@keyframes ph-blink { 50% { fill: #ff5a3d; } }
.ph-readout { flex: none; margin: 0; padding: 5px 12px; border-radius: 10px; background: var(--ph-panel-bg2); color: var(--ph-ink); line-height: 1.3; }
.ph-about { flex: none; padding: 2px 10px; border: 1px solid var(--tlg-border); border-radius: 8px; }
.ph-about summary { cursor: pointer; min-height: 32px; font-weight: 700; display: flex; align-items: center; }
.ph-about p { margin: 4px 0; }
.ph-ex { display: grid; gap: 8px; }
.ph-ex-svg { border-radius: 10px; border: 2px solid var(--ph-line); width: 100% !important; max-width: 520px; height: auto !important; max-height: none; }
.ph-ex-t { border-collapse: collapse; font-size: 16px; }
.ph-ex-t th, .ph-ex-t td { padding: 3px 8px; border-bottom: 1px solid var(--tlg-border); text-align: left; }
.ph-ex-svg .ph-ex-t, text.ph-ex-t { font-size: 18px; font-weight: 700; fill: #eef3ff; font-family: var(--tlg-font); }
@media (max-width: 900px) {
  .ph { position: static; grid-template-columns: 1fr; }
  .ph-controls, .ph-right { overflow: visible; }
}
@media (prefers-reduced-motion: reduce) { .ph *, .ph *::before { animation: none !important; transition: none !important; } }
