@charset "UTF-8";

/* MORSE ROOM — shared frame & design system
   Page-specific behavior belongs in separate JavaScript files.
   Replace href placeholders with the actual routes used by your site. */

:root {
  color-scheme: dark;
  --bg: #10191b;
  --bg-deep: #0b1214;
  --surface: #172326;
  --surface-raised: #1d2c2f;
  --surface-soft: #223337;
  --line: #33474a;
  --line-bright: #4c6668;
  --text: #edf3ec;
  --muted: #a0b2ad;
  --subtle: #718783;
  --signal: #d6f36a;
  --signal-dark: #9dbb36;
  --amber: #efb65e;
  --red: #ee7770;
  --green: #8ed59b;
  --radius: 12px;
  --radius-sm: 7px;
  --shadow-panel: 0 12px 34px rgb(0 0 0 / 18%);
  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 50% -20%, rgb(93 128 116 / 13%), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgb(151 184 167 / 2.5%) 40px),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
::selection { color: var(--bg-deep); background: var(--signal); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 100; top: 8px; left: 8px; padding: 9px 14px; transform: translateY(-150%); background: var(--signal); color: var(--bg-deep); border-radius: 5px; }
.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header { position: relative; z-index: 5; background: rgb(11 18 20 / 94%); border-bottom: 1px solid var(--line); }
.header-top { min-height: 82px; display: flex; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { width: 37px; height: 37px; display: flex; align-items: center; justify-content: center; gap: 3px; border: 1px solid var(--line-bright); border-radius: 9px; background: linear-gradient(145deg, #263b3d, #121e20); box-shadow: inset 0 1px rgb(255 255 255 / 5%); }
.brand-mark__dot, .brand-mark__dash { display: block; height: 5px; border-radius: 4px; background: var(--signal); box-shadow: 0 0 8px rgb(214 243 106 / 40%); }
.brand-mark__dot { width: 5px; } .brand-mark__dash { width: 11px; }
.brand-copy { display: grid; line-height: 1.2; gap: 5px; }
.brand-name { font: 700 15px/1 var(--font-mono); letter-spacing: .09em; }
.brand-name span { color: var(--signal); }
.brand-copy small { color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.header-status { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--green); font: 11px var(--font-mono); letter-spacing: .08em; }
.status-light, .signal-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px rgb(142 213 155 / 70%); }
.status-divider { color: var(--subtle); margin-inline: 3px; }
.status-caption { color: var(--muted); font-family: var(--font-sans); letter-spacing: 0; }
.other-tools { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 12px; transition: .2s ease; }
.other-tools:hover { color: var(--signal); border-color: var(--signal-dark); background: rgb(214 243 106 / 5%); }
.other-tools__icon { color: var(--signal); font-size: 17px; line-height: 1; }
.section-nav { border-top: 1px solid rgb(76 102 104 / 35%); }
.section-nav__inner { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.section-nav__link { position: relative; display: inline-flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 17px; color: var(--muted); font-size: 13px; white-space: nowrap; transition: color .2s; }
.section-nav__link::after { position: absolute; right: 14px; bottom: -1px; left: 14px; height: 2px; content: ""; background: transparent; }
.section-nav__link:hover, .section-nav__link.is-current { color: var(--text); }
.section-nav__link.is-current::after { background: var(--signal); box-shadow: 0 0 9px rgb(214 243 106 / 45%); }
.nav-index { color: var(--subtle); font: 10px var(--font-mono); }
.section-nav__link.is-current .nav-index { color: var(--signal); }

/* Page frame & typography */
.page-main { padding-top: 37px; padding-bottom: 76px; }
.page-eyebrow, .kicker, .section-heading__code, .panel-meta { color: var(--subtle); font: 10px/1.5 var(--font-mono); letter-spacing: .13em; }
.page-eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow-line { width: 22px; height: 1px; background: var(--signal); }
.eyebrow-code { margin-left: auto; }
.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 34px 0 48px; }
.kicker { margin: 0 0 10px; color: var(--signal-dark); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 13px; font-size: clamp(27px, 4vw, 40px); line-height: 1.4; letter-spacing: .015em; }
h1 span { color: var(--signal); }
.lead { max-width: 650px; margin: 0; color: var(--muted); font-size: 14px; line-height: 2; }
.intro-instrument { display: flex; align-items: center; gap: 15px; padding-right: 12px; }
.instrument-ring { position: relative; display: grid; width: 100px; height: 100px; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; background: radial-gradient(circle, #25393a 0 45%, #172326 46% 67%, #304448 68% 70%, #152124 71%); box-shadow: 0 0 0 5px rgb(35 53 56 / 40%), inset 0 0 15px #080f10; }
.instrument-ring::before, .instrument-ring::after { position: absolute; content: ""; background: var(--line-bright); }
.instrument-ring::before { width: 1px; height: 8px; top: 7px; }
.instrument-ring::after { width: 8px; height: 1px; right: 7px; }
.instrument-needle { position: absolute; width: 2px; height: 32px; top: 18px; left: 49px; background: var(--signal); border-radius: 3px; transform: rotate(35deg); transform-origin: bottom; box-shadow: 0 0 8px rgb(214 243 106 / 45%); }
.instrument-center { z-index: 1; display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; background: #111c1e; color: var(--signal); font: 700 11px var(--font-mono); }
.ring-label { position: absolute; color: var(--subtle); font: 7px var(--font-mono); letter-spacing: .12em; }
.ring-label--top { top: 16px; } .ring-label--bottom { bottom: 15px; }
.instrument-caption { color: var(--subtle); font: 9px/1.7 var(--font-mono); letter-spacing: .13em; }
.section-heading { display: flex; align-items: end; justify-content: space-between; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-heading .kicker { margin-bottom: 4px; }
.section-heading h2 { margin: 0; font-size: 21px; }
.section-heading__code { padding-bottom: 4px; }

/* Panels & reusable components */
.component-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgb(29 44 47 / 96%), rgb(20 31 34 / 98%)); box-shadow: var(--shadow-panel); }
.panel--wide { grid-column: span 2; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 19px; }
.panel-index { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid var(--line-bright); border-radius: 5px; color: var(--signal); font: 10px var(--font-mono); }
.panel-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-meta { margin-left: auto; font-size: 9px; }
.component-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 1px solid transparent; border-radius: 6px; font-size: 13px; font-weight: 700; transition: transform .15s, background .2s, border-color .2s, color .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #172014; background: var(--signal); box-shadow: 0 3px 0 #829c35, 0 5px 15px rgb(214 243 106 / 9%); }
.btn-primary:hover { background: #e3ff7c; }
.btn-led { width: 6px; height: 6px; border-radius: 50%; background: #42551b; box-shadow: 0 0 0 3px rgb(66 85 27 / 12%); }
.btn-arrow { font: 17px var(--font-mono); }
.btn-secondary { color: var(--text); border-color: var(--line-bright); background: #26383b; }
.btn-secondary:hover { border-color: var(--signal-dark); background: #2b4143; }
.btn-symbol { color: var(--signal); font-size: 17px; }
.btn-quiet { min-height: 38px; color: var(--muted); background: transparent; border-color: transparent; }
.btn-quiet:hover { color: var(--signal); }
.component-note { margin: 14px 0 0; color: var(--subtle); font-size: 11px; line-height: 1.7; }
.signal-list { display: flex; flex-wrap: wrap; gap: 13px 20px; padding: 9px 0 3px; }
.signal-item { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 10px var(--font-mono); letter-spacing: .07em; }
.signal-dot--green { background: var(--green); } .signal-dot--amber { background: var(--amber); box-shadow: 0 0 9px rgb(239 182 94 / 60%); } .signal-dot--red { background: var(--red); box-shadow: 0 0 9px rgb(238 119 112 / 60%); }
.field-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.text-field, .select-field { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid var(--line-bright); border-radius: 6px; outline: none; color: var(--text); background: #101a1c; font-size: 13px; transition: border-color .2s, box-shadow .2s; }
.text-field::placeholder { color: #657a76; }
.text-field:focus, .select-field:focus { border-color: var(--signal-dark); box-shadow: 0 0 0 3px rgb(214 243 106 / 9%); }
.select-wrap { position: relative; }
.select-wrap::after { position: absolute; top: 50%; right: 14px; content: "⌄"; color: var(--signal); pointer-events: none; transform: translateY(-55%); }
.select-field { appearance: none; padding-right: 36px; }
.select-field option { background: var(--surface); }
.range-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.range-label output { color: var(--signal); font: 700 20px var(--font-mono); }
.range-label output small { color: var(--subtle); font-size: 10px; }
.range-field { width: 100%; height: 22px; margin: 12px 0 0; accent-color: var(--signal); cursor: pointer; }
.range-scale { display: flex; justify-content: space-between; color: var(--subtle); font: 9px var(--font-mono); }
.output-display { padding: 13px 15px; border: 1px solid #40585a; border-radius: 7px; background: radial-gradient(ellipse at 50% 0, rgb(143 184 124 / 9%), transparent 70%), #0c1516; box-shadow: inset 0 0 18px rgb(0 0 0 / 30%); }
.output-top, .output-bottom { display: flex; align-items: center; justify-content: space-between; color: var(--subtle); font: 9px var(--font-mono); letter-spacing: .08em; }
.output-top span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.output-top .signal-dot { width: 6px; height: 6px; }
.morse-output { margin: 13px 0; color: var(--signal); font: 16px/1.5 var(--font-mono); letter-spacing: .08em; overflow-wrap: anywhere; }
.output-bottom { padding-top: 10px; border-top: 1px solid rgb(76 102 104 / 45%); }
.output-bottom strong { color: var(--text); font: 700 17px var(--font-mono); letter-spacing: .1em; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.data-table th { padding: 9px 12px; color: var(--subtle); background: #142023; font-size: 10px; font-weight: 500; letter-spacing: .06em; white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid rgb(76 102 104 / 35%); color: var(--muted); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgb(214 243 106 / 3%); }
.mono-cell { color: var(--signal) !important; font: 700 13px var(--font-mono); }
.morse-cell { color: var(--text) !important; font-size: 15px !important; letter-spacing: .13em; }
.table-status { color: var(--green); font-size: 10px; }
.info-card { display: flex; align-items: flex-start; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: #142023; }
.info-card__icon { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line-bright); border-radius: 6px; color: var(--signal); font-size: 19px; }
.info-card__label { display: block; margin-bottom: 4px; color: var(--signal-dark); font: 9px var(--font-mono); letter-spacing: .1em; }
.info-card strong { display: block; font-size: 12px; }
.info-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.info-card__arrow { margin-left: auto; color: var(--subtle); }
.notice-strip { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; padding: 13px 16px; border: 1px solid rgb(76 102 104 / 60%); border-radius: 7px; background: rgb(23 35 38 / 55%); }
.notice-icon { display: grid; flex: 0 0 19px; width: 19px; height: 19px; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--signal); font: 11px var(--font-mono); }
.notice-strip p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); }
.footer-main { display: grid; grid-template-columns: 1fr 1fr 1.3fr; align-items: center; gap: 30px; padding: 32px 0; }
.brand--footer .brand-mark { width: 33px; height: 33px; }
.footer-message { margin: 0; color: var(--muted); font: 10px/1.9 var(--font-mono); letter-spacing: .1em; }
.footer-message span { color: var(--subtle); font-family: var(--font-sans); letter-spacing: 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px 17px; }
.footer-links a { color: var(--muted); font-size: 11px; transition: color .2s; }
.footer-links a:hover { color: var(--signal); }
.footer-bottom { display: flex; justify-content: space-between; padding: 13px 0 17px; border-top: 1px solid rgb(76 102 104 / 30%); color: var(--subtle); font: 9px var(--font-mono); letter-spacing: .1em; }
.footer-frequency { display: inline-flex; align-items: center; gap: 8px; }
.footer-frequency i { width: 4px; height: 4px; border-radius: 50%; background: var(--signal-dark); }

@media (max-width: 760px) {
  .shell { width: min(100% - 32px, 600px); }
  .header-top { min-height: 70px; gap: 12px; }
  .header-status { display: none; }
  .other-tools { margin-left: auto; padding: 8px 9px; font-size: 11px; }
  .section-nav__inner { width: 100%; padding-inline: 16px; }
  .section-nav__link { min-height: 45px; padding-inline: 13px; font-size: 12px; }
  .page-main { padding-top: 27px; padding-bottom: 52px; }
  .page-intro { padding: 26px 0 35px; }
  .intro-instrument { padding-right: 3px; gap: 8px; }
  .instrument-ring { width: 76px; height: 76px; }
  .instrument-needle { top: 14px; left: 37px; height: 25px; }
  .instrument-center { width: 19px; height: 19px; font-size: 9px; }
  .ring-label--top { top: 10px; } .ring-label--bottom { bottom: 9px; }
  .instrument-caption { display: none; }
  .component-grid { gap: 12px; }
  .panel { padding: 16px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 22px; }
  .footer-links { grid-column: 1 / -1; justify-content: flex-start; padding-top: 15px; border-top: 1px solid rgb(76 102 104 / 30%); }
}
@media (max-width: 520px) {
  .shell { width: calc(100% - 28px); }
  .brand-name { font-size: 13px; }
  .brand-mark { width: 33px; height: 33px; }
  .other-tools { gap: 5px; }
  .other-tools__icon { font-size: 15px; }
  .page-eyebrow { font-size: 8px; }
  .eyebrow-code { font-size: 8px; }
  .page-intro { align-items: flex-start; gap: 8px; }
  h1 { font-size: 25px; }
  .lead { font-size: 12px; }
  .intro-instrument { margin-top: 12px; }
  .instrument-ring { width: 61px; height: 61px; }
  .instrument-needle { top: 11px; left: 29px; height: 20px; }
  .instrument-center { width: 16px; height: 16px; font-size: 8px; }
  .ring-label { font-size: 6px; }
  .section-heading h2 { font-size: 18px; }
  .section-heading__code { font-size: 8px; }
  .component-grid { grid-template-columns: 1fr; }
  .panel--wide { grid-column: auto; }
  .panel { padding: 15px; }
  .panel-head { margin-bottom: 15px; }
  .panel-meta { font-size: 8px; }
  .component-row { gap: 8px; }
  .btn { min-height: 41px; padding-inline: 13px; font-size: 12px; }
  .footer-main { grid-template-columns: 1fr; gap: 17px; }
  .footer-message { padding-top: 14px; border-top: 1px solid rgb(76 102 104 / 30%); }
  .footer-links { grid-column: auto; gap: 8px 15px; }
  .footer-bottom { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
