/* Dial-home device on the planet map (site/assets/js/karte/dhd.js): a modal dialog with the symbol keys on two
   rings, the red activation crystal in the middle and the chevrons that lock in above. */
.dhd-open { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1 1 0; min-width: 0; margin: 0; padding: 10px 12px;
  font: 600 13px/1 var(--f-body); color: #ffd9b8; cursor: pointer; border-radius: 12px;
  border: 1px solid rgba(255, 138, 43, 0.45); background: linear-gradient(135deg, rgba(255, 138, 43, 0.14), rgba(255, 138, 43, 0.04)); }
.dhd-open:hover { border-color: rgba(255, 138, 43, 0.8); color: #fff; }
.dhd-open svg { width: 18px; height: 18px; color: var(--chevron); }
.addr-dial { justify-self: start; padding: 8px 10px; font-size: 12px; }

.dhd { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 22px 22px 18px; color: var(--text);
  border-radius: 20px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, #0b1220, #060a14);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); }
.dhd::backdrop { background: rgba(2, 4, 10, 0.72); backdrop-filter: blur(3px); }
.dhd-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.dhd-head .sb-close { position: static; flex: none; }
.dhd h2 { font-size: clamp(22px, 3.4vw, 28px); text-transform: uppercase; margin-top: 6px; }
.dhd-intro { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dhd-netz { display: flex; gap: 6px; border: 0; margin: 14px 0 0; padding: 0; }
.dhd-netz label { flex: 1; }
.dhd-netz input { position: absolute; opacity: 0; pointer-events: none; }
.dhd-netz span { display: block; text-align: center; padding: 8px 10px; border-radius: 999px; border: 1px solid var(--line-strong);
  font: 600 12.5px/1 var(--f-body); color: var(--muted); cursor: pointer; }
.dhd-netz input:checked + span { color: var(--text); border-color: rgba(86, 200, 255, 0.6); background: rgba(86, 200, 255, 0.1); }
.dhd-netz input:focus-visible + span { outline: 2px solid var(--horizon); outline-offset: 2px; }

/* chevrons */
.dhd-chevrons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; list-style: none; margin: 16px 0 0; padding: 0; }
.dhd-chevrons .chev { display: grid; justify-items: center; gap: 4px; }
.dhd-chevrons .chev-mark { width: 22px; height: 10px; clip-path: polygon(0 0, 100% 0, 72% 100%, 28% 100%); background: #3a4152; transition: background .25s, filter .25s; }
.dhd-chevrons .chev-face { width: 100%; max-width: 54px; aspect-ratio: 1; padding: 14%; border-radius: 10px; color: #ffe3c8;
  border: 1px solid var(--line); background: rgba(4, 6, 12, 0.6); }
.dhd-chevrons .on .chev-mark { background: var(--chevron); filter: drop-shadow(0 0 4px rgba(255, 138, 43, 0.9)); }
.dhd-chevrons .on .chev-face { border-color: rgba(255, 138, 43, 0.5); background: radial-gradient(circle at 50% 40%, rgba(255, 138, 43, 0.18), rgba(4, 6, 12, 0.6)); }
.dhd-status { min-height: 2.9em; margin-top: 10px; font: 600 13px/1.45 var(--f-mono); color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.dhd-status[data-kind="ok"] { color: #9fe3ff; }
.dhd-status[data-kind="fail"] { color: #ff9aa6; }

/* the pad: two rings of keys (segments, clip-path from dhd.js) around the crystal. Milky Way: stone keys with
   carved symbols that glow amber; Pegasus (data-netz) dark metal with blue light. */
.dhd-pad { --stone: #a39279; --stone-d: #6f624f; --carve: #3a3126; --lit: #ffcf7a; --lit-bg: #ff9a3c; --lit-bg-d: #b4500f; --rim: #2b2f36;
  position: relative; width: min(100%, 440px); aspect-ratio: 1; margin: 6px auto 0; border-radius: 50%;
  background: radial-gradient(circle, #15110d 0 40%, #0c0b0a 41% 69.5%, #15110d 70% 98.6%, var(--rim) 98.8%);
  box-shadow: 0 0 0 5px var(--rim), 0 0 0 7px #4a4f58, 0 18px 40px -12px rgba(0, 0, 0, 0.9), inset 0 0 30px rgba(0, 0, 0, 0.7); }
.dhd[data-netz="pegasus"] .dhd-pad { --stone: #3a4658; --stone-d: #222a36; --carve: #a9c7e6; --lit: #e9f8ff; --lit-bg: #56c8ff; --lit-bg-d: #0d5b93; --rim: #1c222c; }
.dhd-key { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; color: var(--carve);
  background: radial-gradient(circle, var(--stone) 0 46%, var(--stone-d) 70%, var(--stone) 84%, var(--stone-d) 100%);
  transition: filter .15s, color .15s; }
.dhd-key:hover { filter: brightness(1.18); }
/* the ring is one tab stop and the arrows move the focus (dhd.js): the focused key turns blue and gets a ring round its
   symbol (an outline on the key would be cut off by its clip-path, one on the symbol by its mask) */
.dhd-key:focus-visible { outline: none; color: #fff; background: radial-gradient(circle, #3d8fc6 0 46%, #19557f 70%, #3d8fc6 84%, #19557f 100%); }
.dhd-key[aria-pressed="true"] { color: var(--lit); background: radial-gradient(circle, var(--lit-bg) 0 45%, var(--lit-bg-d) 72%, var(--lit-bg) 86%, var(--lit-bg-d) 100%); }
.dhd-sym { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); translate: -50% -50%; rotate: var(--rot); pointer-events: none; }
.dhd-key:focus-visible::after { content: ""; position: absolute; left: var(--x); top: var(--y); width: calc(var(--s) * 1.45);
  aspect-ratio: 1; translate: -50% -50%; border: 2px solid #fff; border-radius: 50%; pointer-events: none; }
.dhd-key[aria-pressed="true"]:focus-visible::after { border-color: #160b02; }   /* a pressed key stays amber: a dark ring */
.dhd-key[aria-pressed="true"] .dhd-sym { filter: drop-shadow(0 0 3px var(--lit)); }
.dhd-dome { --core: #fff0c8; --hot: #ff7a3c; --mid: #d0261a; --deep: #6a0907; --edge: #2a0302; --line: rgba(40, 0, 0, 0.55); --ridge-l: rgba(255, 190, 160, 0.22);
  position: absolute; left: 50%; top: 50%; width: 40%; aspect-ratio: 1; translate: -50% -50%; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 18px rgba(255, 60, 30, 0.35)); transition: filter .3s, scale .12s; }
.dhd[data-netz="pegasus"] .dhd-dome { --core: #f2fdff; --hot: #7fdcff; --mid: #1d8fd4; --deep: #0a3a63; --edge: #03121f; --line: rgba(0, 20, 40, 0.55); --ridge-l: rgba(190, 235, 255, 0.22);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 18px rgba(86, 200, 255, 0.35)); }
.dome-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dome-svg .d-core { stop-color: var(--core); }
.dome-svg .d-hot { stop-color: var(--hot); }
.dome-svg .d-mid { stop-color: var(--mid); }
.dome-svg .d-deep { stop-color: var(--deep); }
.dome-svg .d-edge { stop-color: var(--edge); }
.dome-svg .d-white { stop-color: #fff; }
.dome-svg .d-metal-l { stop-color: #6c727c; }
.dome-svg .d-metal-d { stop-color: #1f2228; }
.dome-svg .d-seat { fill: #0d0e10; }
.dome-svg .d-facets line { stroke: var(--line); stroke-width: 0.7; stroke-linecap: round; }
.dome-svg .d-ridge { fill: none; stroke: var(--line); stroke-width: 0.9; }
.dome-svg .d-ridge-l { fill: none; stroke: var(--ridge-l); stroke-width: 0.5; }
.dome-svg .d-fresnel { fill: none; stroke: var(--edge); stroke-opacity: 0.75; stroke-width: 5; }
.dome-svg .d-lip { fill: none; stroke: rgba(255, 255, 255, 0.18); stroke-width: 0.6; }
.dome-svg .d-core-glow { transition: opacity .3s; opacity: 0.75; }
.dhd-dome:hover { filter: brightness(1.12) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.7)); }
.dhd-dome:active { scale: 0.975; }
.dhd-dome:focus-visible { outline: 2px solid var(--horizon); outline-offset: 4px; }
.dhd.open-wormhole .dhd-dome { filter: brightness(1.3) saturate(1.15) drop-shadow(0 0 30px rgba(255, 90, 50, 0.75)); }
.dhd[data-netz="pegasus"].open-wormhole .dhd-dome { filter: brightness(1.3) saturate(1.15) drop-shadow(0 0 30px rgba(86, 200, 255, 0.75)); }
.dhd.open-wormhole .d-core-glow { opacity: 1; }
.dhd.failed .dhd-dome { filter: saturate(0.4) brightness(0.75); }
.dhd-hint { max-width: 440px; margin: 8px auto 0; text-align: center; font: 500 12px/1.45 var(--f-body); color: var(--muted); }
@media (hover: none) and (pointer: coarse) {   /* no keyboard to speak of: the hint stays for screen readers only */
  .dhd-hint { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.dhd-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.dhd-go { border-color: rgba(86, 200, 255, 0.6); color: #cfefff; }
@media (prefers-reduced-motion: no-preference) {
  .dhd-dome.nudge { animation: dhd-nudge .35s; }
  @keyframes dhd-nudge { 25% { translate: calc(-50% - 4px) -50%; } 75% { translate: calc(-50% + 4px) -50%; } }
  .dhd.open-wormhole .dhd-dome { animation: dhd-pulse 1.6s ease-in-out 2; }
  @keyframes dhd-pulse { 50% { filter: brightness(1.7) saturate(1.3); } }
}

/* the address typed in as symbol numbers: the same as the ring keys, for keyboards and screen readers */
.dhd-eingabe { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.dhd-eingabe label { font: 600 12.5px/1.4 var(--f-body); color: var(--muted); }
.dhd-eingabe-row { display: flex; gap: 8px; }
.dhd-eingabe input { flex: 1 1 8em; width: 100%; min-width: 0; font: 500 15px/1.2 var(--f-mono); color: var(--text); padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); }
.dhd-eingabe input:focus-visible { outline: 2px solid var(--horizon); outline-offset: 2px; }
.dhd-eingabe input[aria-invalid="true"] { border-color: rgba(255, 90, 110, 0.7); }
.dhd-eingabe .sb-btn { flex: none; }
