:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --paper: #fcf2dc;
  --brass: #f1c18c;
  --mono: "Cascadia Mono", Consolas, monospace;
  --serif: "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --edge: clamp(24px, 4.55vw, 84px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body, #station { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { color: var(--paper); background: #202e36; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: progress; opacity: .58; }
:focus-visible { outline: 2px solid #ffcf90; outline-offset: 5px; }
button, dialog { -webkit-user-select: none; user-select: none; }
#station { position: relative; isolation: isolate; background: linear-gradient(#263b49, #a68079 45%, #cba17c 56%, #334446 58%, #122329); }
#ocean, .shade, #markers { position: absolute; inset: 0; width: 100%; height: 100%; }
#ocean { display: block; touch-action: none; cursor: grab; outline-offset: -4px; }
#ocean.grabbing { cursor: grabbing; }
.shade {
  pointer-events: none;
  background: linear-gradient(0deg, #071517c4 0, #0a151b1c 17%, transparent 34%),
    radial-gradient(ellipse 57% 63% at 0% 68%, #101c24a8, #141f252b 58%, transparent 94%),
    linear-gradient(180deg, #0e182c47, transparent 22%);
}
.masthead, .foot {
  position: absolute; left: var(--edge); right: var(--edge); display: flex;
  justify-content: space-between; align-items: center; pointer-events: none;
}
.masthead { top: max(24px, 3.9vh, env(safe-area-inset-top)); }
.station-id { display: flex; align-items: center; gap: 13px; color: #fff1d9; font: 600 13px/1 var(--serif); letter-spacing: .22em; text-shadow: 0 1px 10px #1b222a; }
.station-mark { position: relative; display: block; width: 35px; height: 35px; border: 1px solid #f5d7a989; border-radius: 50%; }
.station-mark:before, .station-mark:after, .station-mark i, .station-mark b { content: ""; position: absolute; left: 50%; transform: translateX(-50%); }
.station-mark:before { inset-block-start: 6px; width: 11px; height: 5px; background: var(--brass); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.station-mark:after { top: 12px; width: 10px; height: 12px; border-top: 2px solid var(--brass); background: linear-gradient(90deg, transparent 25%, #f4d6a7 26% 73%, transparent 74%); clip-path: polygon(15% 0,85% 0,71% 30%,94% 100%,6% 100%,29% 30%); }
.station-mark i { width: 18px; top: 25px; height: 1px; background: var(--brass); }
.station-mark b { width: 10px; top: 28px; height: 1px; background: #d6b48b; }
.tools { display: flex; gap: 9px; pointer-events: auto; }
.tool, .close { border: 1px solid #e6dfcc54; color: #fbeed9; border-radius: 50%; display: inline-grid; place-items: center; background: #13212d38; }
.tool { width: 38px; height: 38px; transition: background .2s, border-color .2s; }
.tool:hover, .close:hover { background: #182831a8; border-color: #f7d8a4; }
.tool.help { font: italic 19px/1 Georgia, serif; }
.levels { position: relative; display: flex; gap: 2px; height: 16px; align-items: center; }
.levels i { width: 2px; border-radius: 2px; background: currentColor; height: 5px; }
.levels i:nth-child(2) { height: 12px; }
.levels i:nth-child(3) { height: 8px; }
.levels i:nth-child(4) { height: 4px; }
.sound[aria-pressed=true] { color: #ffd5a0; border-color: #ffd5a09c; }
.sound[aria-pressed=true] .levels i { animation: level .8s ease-in-out infinite alternate; }
.sound[aria-pressed=true] .levels i:nth-child(2) { animation-delay: -.5s; }
.sound[aria-pressed=true] .levels i:nth-child(3) { animation-delay: -.3s; }
.sound[aria-pressed=false] .levels:after { content: ""; position: absolute; width: 18px; height: 1px; transform: rotate(-48deg); background: currentColor; box-shadow: 0 1px #303e47; }
@keyframes level { to { transform: scaleY(.42); } }
.corners { width: 13px; height: 13px; background: linear-gradient(currentColor 0 0) top left,linear-gradient(currentColor 0 0) top right,linear-gradient(currentColor 0 0) bottom left,linear-gradient(currentColor 0 0) bottom right; background-size: 4px 1px; background-repeat: no-repeat; border-inline: 1px solid currentColor; mask-image: linear-gradient(#000 32%,transparent 32% 68%,#000 68%); }
.story, .receiver { position: absolute; left: var(--edge); bottom: max(115px, 17vh); }
.story { max-width: min(540px, 44vw); text-shadow: 0 2px 24px #10171e73; pointer-events: none; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0; font: 500 10px/1.5 var(--mono); letter-spacing: .24em; color: #ffdcac; }
.eyebrow > span:first-child:empty { width: 31px; height: 1px; background: currentColor; flex: none; opacity: .86; }
h1, h2 { font-family: var(--serif); font-weight: 500; }
h1 { white-space: nowrap; margin: 17px 0 18px; font-size: clamp(53px, 5.45vw, 99px); line-height: 1.05; letter-spacing: .047em; }
#description { color: #f4e9d8; font-size: clamp(13px, 1.12vw, 17px); line-height: 1.95; letter-spacing: .095em; margin: 0 0 23px; }
.primary {
  display: inline-flex; justify-content: center; align-items: center; gap: 12px;
  color: #292a26; background: #efcea0; border: 1px solid #f7dbb5; border-radius: 3px;
  min-height: 45px; padding: 0 18px; font-size: 13px; font-weight: 600; letter-spacing: .11em;
  box-shadow: 0 3px 22px #111c2328; transition: background .2s, transform .2s; pointer-events: auto;
}
.primary:hover { background: #ffe3b9; transform: translateY(-2px); }
.primary:active { transform: translateY(1px); }
.primary .arrow { margin-left: 7px; font: 20px/1 Georgia, serif; }
.signal-symbol { width: 15px; height: 15px; position: relative; background: radial-gradient(circle at 50% 70%, currentColor 1.5px, transparent 2px); }
.signal-symbol:before, .signal-symbol:after { content: ""; position: absolute; border: 1px solid currentColor; border-left-color: transparent; border-bottom-color: transparent; border-radius: 100%; transform: rotate(-45deg); }
.signal-symbol:before { inset: 1px 0 -2px; }
.signal-symbol:after { inset: 5px 4px 2px; }
.foot { bottom: max(26px, 4vh, env(safe-area-inset-bottom)); border-top: 1px solid #efe6ce52; padding-top: 15px; color: #e4decf; font-size: 11px; letter-spacing: .10em; }
.navigation-hint, #log, .log-marks { display: flex; align-items: center; }
.navigation-hint { gap: 10px; }
.mouse-glyph { width: 11px; height: 15px; border: 1px solid #dfd9c8; border-radius: 6px; position: relative; }
.mouse-glyph:after { content: ""; position: absolute; width: 1px; height: 4px; left: 4px; top: 2px; background: #dfd9c8; }
.dot { padding-inline: 8px; opacity: .64; }
.touch-hint { display: none; }
#log { gap: 13px; }
.log-marks { gap: 7px; }
.log-marks i { width: 6px; height: 6px; border: 1px solid #ded4b78c; transform: rotate(45deg); }
.log-marks i.on { border-color: #ffd79a; background: #ffd79a; box-shadow: 0 0 8px #ffc579; }
.count { font: 11px/1 var(--mono); letter-spacing: .05em; }
.count b { color: var(--brass); }
#markers { pointer-events: none; }
.pin { position: absolute; left: 0; top: 0; display: grid; place-content: center; min-width: 42px; height: 42px; padding: 0; border: 0; background: transparent; color: #ffe2ae; pointer-events: auto; will-change: transform; }
.pin-ring { display: grid; place-items: center; width: 25px; height: 25px; background: #1c343ab8; border: 1px solid #ffdfacba; transform: rotate(45deg); border-radius: 3px; box-shadow: 0 0 0 3px #19283055, 0 2px 16px #ffbf632b; transition: background .2s, scale .2s; }
.pin-ring b { font: 10px/1 var(--mono); transform: rotate(-45deg); }
.pin:after { content: ""; position: absolute; height: 9px; width: 1px; background: #ffd296b8; left: 50%; bottom: -6px; }
.pin-label { position: absolute; left: calc(100% + 2px); top: 11px; font-size: 11px; white-space: nowrap; padding: 3px 7px; background: #13252bda; border-radius: 2px; opacity: 0; letter-spacing: .07em; }
.pin:hover .pin-label, .pin:focus-visible .pin-label { opacity: 1; }
.pin:hover .pin-ring, .pin:focus-visible .pin-ring { background: #594937; scale: 1.12; }
.pin.lantern .pin-ring { color: #282d29; background: #fad59b; box-shadow: 0 0 20px #ffd69a9c; }
.receiver { width: min(350px, 39vw); padding: 19px 21px 17px; background: linear-gradient(125deg, #15282eef, #18272cea); border: 1px solid #d3c5a655; border-radius: 4px; box-shadow: 0 12px 35px #101a2040; }
.receiver-head, .receiver-title, .tune-bottom, .guide-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.close { width: 26px; height: 26px; font: 19px/1 var(--mono); background: none; flex: none; }
.receiver h2 { margin: 9px 0 12px; font-size: clamp(23px, 2.3vw, 34px); letter-spacing: .14em; }
.receiver .eyebrow { font-size: 9px; }
.frequency { margin: 0; color: #ffc788; font: 21px/1 var(--mono); font-variant-numeric: tabular-nums; }
.frequency small { font-size: 10px; }
.scope { height: 57px; border-block: 1px solid #acbea237; background: #0c1a1ed9; }
#wave { width: 100%; height: 100%; display: block; }
.scale-label { display: flex; justify-content: space-between; font: 9px var(--mono); color: #c6bfac; padding-block: 12px 2px; }
#dial { width: 100%; display: block; height: 26px; margin: 0; cursor: ew-resize; accent-color: #f5cc91; appearance: none; background: repeating-linear-gradient(90deg, #bcad8b85 0 1px, transparent 1px 5%) center / 100% 5px no-repeat; }
#dial::-webkit-slider-runnable-track { height: 2px; background: #b6b19488; }
#dial::-webkit-slider-thumb { appearance: none; width: 11px; height: 20px; margin-top: -9px; border: 1px solid #ffe1b6; border-radius: 2px; background: #d6ad76; box-shadow: 0 0 0 3px #18292e; }
#dial::-moz-range-track { height: 2px; background: #b6b19488; }
#dial::-moz-range-thumb { width: 10px; height: 19px; background: #d6ad76; border: 1px solid #ffe1b6; }
.tune-bottom { color: #e4d9c5; margin-top: 8px; font-size: 11px; letter-spacing: .03em; }
.lock-meter { width: 43px; height: 3px; background: #a7b49542; flex: none; }
.lock-meter i { display: block; width: 100%; height: 100%; background: #efc68a; transform: scaleX(var(--lock,0)); transform-origin: left; }
#notice { pointer-events: none; position: absolute; left: 50%; bottom: max(78px, 10vh); transform: translate(-50%, 5px); opacity: 0; transition: opacity .35s, transform .35s; text-align: center; font: 14px/1.8 var(--serif); letter-spacing: .08em; color: #fff3dc; background: #112126e6; border: 1px solid #e0c39155; padding: 9px 18px; width: max-content; max-width: 80vw; border-radius: 3px; }
#notice.show { opacity: 1; transform: translate(-50%, 0); }
#boot { position: absolute; right: var(--edge); bottom: 13vh; color: #fff1ce; font: 12px var(--mono); letter-spacing: .12em; }
#failure, dialog { color: var(--paper); background: #17282e; border: 1px solid #bfae8d8c; border-radius: 5px; box-shadow: 0 20px 70px #07101580; }
#failure { position: absolute; top: 50%; left: 50%; width: min(88vw, 360px); transform: translate(-50%,-50%); padding: 24px; }
#failure h2, dialog h2 { font-size: 29px; margin: 10px 0 16px; letter-spacing: .1em; }
dialog { width: min(430px, calc(100% - 38px)); padding: 26px; max-height: 90dvh; }
dialog::backdrop { background: #07131999; backdrop-filter: blur(4px); }
dialog p, #failure p { font-size: 13px; line-height: 1.9; color: #e0d9c9; }
dialog dl { font-size: 12px; margin: 20px 0; }
dialog dl div { padding: 9px 0; border-top: 1px solid #e4d5b32f; display: flex; justify-content: space-between; gap: 10px; }
dialog dd { margin: 0; color: #d6c3a6; }
.guide-end { margin-bottom: 0; }
.text-button { font: inherit; padding: 0; border: 0; border-bottom: 1px solid; color: var(--brass); background: none; }
@media (pointer: coarse) { .desktop-hint { display: none; } .touch-hint { display: inline; } }
@media (max-width: 680px) {
  :root { --edge: 21px; }
  .masthead { top: max(20px, env(safe-area-inset-top)); }
  .station-id { font-size: 12px; gap: 9px; }
  .tools { gap: 6px; }
  .tool { width: 34px; height: 34px; }
  .story, .receiver { bottom: max(76px, 9.6dvh); }
  .story { max-width: calc(100% - 42px); }
  h1 { font-size: clamp(42px, 10.2vw, 62px); margin: 10px 0 9px; }
  #description { font-size: 13px; line-height: 1.65; margin-bottom: 12px; }
  .eyebrow { font-size: 9px; gap: 9px; }
  .primary { min-height: 41px; padding: 0 14px; font-size: 12px; }
  .foot { bottom: max(19px, env(safe-area-inset-bottom)); padding-top: 10px; font-size: 10px; }
  #log { gap: 8px; }
  .receiver { width: min(375px,calc(100% - 42px)); padding: 12px 15px 13px; }
  .receiver h2 { margin: 4px 0 7px; font-size: 25px; }
  .scope { height: 38px; }
  .scale-label { padding-top: 7px; }
  #notice { top: max(71px, 9vh); bottom: auto; width: max-content; font-size: 12px; }
  #boot { top: 67px; bottom: auto; }
  .shade { background: linear-gradient(0deg,#08151be3, #101d2580 19%,transparent 43%),linear-gradient(180deg,#0c182944,transparent 18%); }
}
@media (max-height: 560px) and (orientation: landscape) {
  :root { --edge: 22px; }
  .masthead { top: 12px; }
  .story, .receiver { bottom: 56px; }
  h1 { font-size: 36px; margin: 8px 0; }
  #description { font-size: 12px; line-height: 1.6; margin-bottom: 9px; }
  .primary { min-height: 34px; }
  .foot { bottom: 10px; padding-top: 7px; }
  .receiver { width: min(300px,43vw); padding: 8px 12px; }
  .receiver h2 { font-size: 23px; margin: 3px 0; }
  .scope { height: 33px; }
  .tune-bottom { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: 0s !important; transition-duration: .01s !important; }
}
