:root {
  color-scheme: dark;
  --bg: #090b09;
  --panel: #111510;
  --panel-soft: #151a14;
  --ink: #f1f3e9;
  --muted: #a4aa9d;
  --dim: #697064;
  --line: rgba(235, 241, 223, 0.12);
  --signal: #d5ff45;
  --signal-dark: #9ab91e;
  --signal-ink: #12150c;
  --warm: #ffb36c;
  --rec: #ff2d2d;
  --rec-soft: #ff6b6b;
  --danger: #ff6b6b;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI",
    "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 6%, rgba(134, 167, 43, 0.12), transparent 30rem),
    radial-gradient(circle at 16% 48%, rgba(255, 179, 108, 0.05), transparent 28rem),
    var(--bg);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

body.recording {
  background:
    radial-gradient(circle at 78% 6%, rgba(255, 45, 45, 0.16), transparent 30rem),
    radial-gradient(circle at 16% 48%, rgba(255, 107, 107, 0.08), transparent 28rem),
    var(--bg);
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(213, 255, 69, 0.74);
  outline-offset: 4px;
}

button,
input {
  font: inherit;
}

.site-header {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  min-height: 52px;
  margin: 0 auto;
  padding: 8px 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  flex: 0 1 auto;
  min-width: 0;
  gap: 8px;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: flex;
  width: 30px;
  height: 30px;
  gap: 2px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(213, 255, 69, 0.22);
  border-radius: 50%;
  background: rgba(213, 255, 69, 0.08);
}

.brand-mark span {
  width: 3px;
  border-radius: 999px;
  background: var(--signal);
}

.brand-mark span:nth-child(1) { height: 8px; }
.brand-mark span:nth-child(2) { height: 16px; }
.brand-mark span:nth-child(3) { height: 11px; }

.brand-name {
  font-size: 0.86rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: clamp(6px, 1.6vw, 18px);
  align-items: center;
  justify-content: flex-end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--signal);
}

.nav-icon {
  display: none;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-label {
  white-space: nowrap;
}

.nav-contact,
.footer-contact {
  min-height: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-contact:hover,
.footer-contact:hover {
  color: var(--signal);
}

.footer-contact {
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.footer-contact:hover {
  border-color: currentColor;
}

.page-shell {
  display: grid;
  width: min(1120px, calc(100% - 32px));
  margin: 14px auto 0;
  gap: 16px;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  align-items: start;
}

.lang-switch {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  margin-left: 2px;
  padding: 1px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 9, 7, 0.35);
}

.lang-btn {
  min-height: 24px;
  padding: 0 8px;
  color: var(--dim);
  font: 750 0.62rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  background: transparent;
}

.lang-btn.is-active {
  color: var(--signal-ink);
  background: var(--signal);
}

main {
  min-width: 0;
}

.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0;
  color: var(--signal);
  font: 750 0.68rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.2em;
}

h1,
h2,
p {
  text-wrap: pretty;
}

h2 {
  margin: 6px 0 8px;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 680;
  letter-spacing: -0.04em;
}

.deck {
  margin-top: 0;
  padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(134, 167, 43, 0.14), transparent 42%),
    linear-gradient(160deg, rgba(20, 26, 18, 0.96), rgba(10, 12, 9, 0.98));
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
}

.pc-only-banner {
  display: none;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 179, 108, 0.4);
  border-radius: 10px;
  background: rgba(255, 179, 108, 0.1);
  color: #ffd2a6;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.45;
}

/* Narrow desktop windows must NOT see this — only real touch phones. */
@media (max-width: 920px) and (pointer: coarse) {
  .pc-only-banner {
    display: block;
  }
}

.deck-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--dim);
  font: 700 0.6rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
}

.live-state {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--signal);
}

.live-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 12px rgba(213, 255, 69, 0.8);
}

body.recording .live-state {
  color: var(--rec);
}

body.recording .live-state i {
  background: var(--rec);
  box-shadow: 0 0 12px rgba(255, 45, 45, 0.85);
  animation: pulse-dot 1s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.deck-title-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  margin: 0 0 6px;
}

.deck-title {
  margin: 0;
  font-size: clamp(1.7rem, 4.2vw, 2.4rem);
  font-weight: 720;
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-align: center;
}

/* Hatena-style circular "?" help next to the title. */
.deck-help {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.35em;
  padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--signal) 55%, transparent);
  border-radius: 999px;
  background: transparent;
  color: color-mix(in srgb, var(--signal) 80%, #fff);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.deck-help:hover,
.deck-help[aria-expanded="true"] {
  border-color: var(--signal);
  background: color-mix(in srgb, var(--signal) 14%, transparent);
  color: var(--signal);
}

.deck-help-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 20;
  width: min(320px, calc(100vw - 48px));
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--signal) 28%, transparent);
  border-radius: 12px;
  background: #121612;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
  text-align: left;
}

.deck-help-popover[hidden] {
  display: none;
}

.deck-help-popover-title {
  margin: 0 0 6px;
  color: var(--signal);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.deck-help-popover-body {
  margin: 0;
  color: #e8eee4;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.deck-note {
  margin: 0 0 12px;
  color: var(--dim);
  font-size: 0.68rem;
  line-height: 1.45;
  text-align: center;
}

.field.tight {
  margin-bottom: 8px;
}

.record-stage {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: 6px 0 12px;
}

.record-orb {
  position: relative;
  display: grid;
  width: 148px;
  height: 148px;
  padding: 0;
  place-items: center;
  cursor: pointer;
  color: var(--signal);
  border: none;
  background: transparent;
}

.record-orb:focus-visible {
  outline: none;
}

.record-orb:focus-visible .record-core {
  outline: 3px solid rgba(213, 255, 69, 0.74);
  outline-offset: 6px;
}

.record-core {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100px;
  height: 100px;
  place-items: center;
  border: 1px solid rgba(213, 255, 69, 0.42);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #3a4a18, #121510 65%);
  box-shadow:
    0 0 50px rgba(213, 255, 69, 0.16),
    inset 0 0 24px rgba(213, 255, 69, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.record-orb:hover .record-core {
  transform: scale(1.04);
  box-shadow:
    0 0 64px rgba(213, 255, 69, 0.22),
    inset 0 0 24px rgba(213, 255, 69, 0.12);
}

.record-core svg {
  width: 44px;
  height: 44px;
}

.record-core .icon-stop {
  display: none;
}

body.recording .record-core .icon-mic {
  display: none;
}

body.recording .record-core .icon-stop {
  display: block;
}

.orbit {
  position: absolute;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(213, 255, 69, 0.22);
  border-radius: 50%;
  animation: orbit 3s ease-out infinite;
}

.orbit-two {
  animation-delay: 1.4s;
}

@keyframes orbit {
  from { opacity: 0.72; transform: scale(0.85); }
  to { opacity: 0; transform: scale(2.15); }
}

.record-caption {
  display: grid;
  gap: 4px;
  margin: 0;
  text-align: center;
}

.record-cta-label {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.record-caption-hint {
  color: var(--dim);
  font-size: 0.78rem;
}

body.recording .record-core {
  border-color: rgba(255, 45, 45, 0.75);
  background: radial-gradient(circle at 38% 32%, #a01818, #1a0a0a 65%);
  box-shadow:
    0 0 64px rgba(255, 45, 45, 0.35),
    inset 0 0 28px rgba(255, 45, 45, 0.18);
  color: #fff;
}

body.recording .record-orb {
  color: var(--rec);
}

body.recording .record-orb:focus-visible .record-core {
  outline-color: rgba(255, 45, 45, 0.8);
}

body.recording .orbit {
  border-color: rgba(255, 45, 45, 0.45);
  animation-duration: 1.6s;
}

body.recording .record-cta-label {
  color: var(--rec);
}

.deck-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 18px;
}

.ghost {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.faq-section,
.terms-section,
.changelog-section {
  padding: 48px 0 12px;
}

.terms-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 52rem;
}

.terms-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.terms-list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.changelog-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.changelog-list li {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.changelog-list time {
  color: var(--signal);
  font: 700 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
}

.library-field select {
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid rgba(235, 241, 223, 0.18);
  border-radius: 12px;
  background: var(--panel-soft);
}

.check-row.compact {
  margin-bottom: 8px;
  font-size: 0.74rem;
  align-items: flex-start;
}

.check-row.compact input {
  margin-top: 2px;
}

.library-sidebar {
  min-width: 0;
}

.library-sticky {
  position: sticky;
  top: 10px;
  max-height: calc(100vh - 20px);
  overflow: auto;
  padding: 12px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(20, 26, 18, 0.96), rgba(10, 12, 9, 0.98));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.library-retention {
  margin: 0 0 10px;
  color: var(--dim);
  font-size: 0.74rem;
  line-height: 1.55;
}

.storage-note {
  margin: 0 0 14px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 9, 7, 0.45);
}

.storage-note.warn {
  color: var(--warm);
  border-color: rgba(255, 196, 138, 0.35);
}

.section-heading {
  max-width: 640px;
  margin-bottom: 8px;
}

.section-heading.row {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.library-sidebar .section-heading h2 {
  margin: 6px 0 0;
  font-size: 1.35rem;
}

.ghost.compact {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.section-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  float: right;
  color: var(--signal);
  content: "+";
}

.faq-list details[open] summary::after {
  content: "–";
}

.faq-list p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.field input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  border: 1px solid rgba(235, 241, 223, 0.18);
  border-radius: 12px;
  background: var(--panel-soft);
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.primary,
.ghost {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
}

.primary {
  color: var(--signal-ink);
  font-weight: 800;
  background: var(--signal);
  box-shadow: 0 16px 40px rgba(213, 255, 69, 0.16);
}

.primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.ghost {
  color: var(--ink);
  font-weight: 700;
  background: transparent;
  border-color: rgba(235, 241, 223, 0.2);
}

.ghost:hover:not(:disabled) {
  border-color: rgba(213, 255, 69, 0.45);
  color: var(--signal);
}

.primary:disabled,
.ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.meter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(12, 9, 7, 0.55);
}

.meter-row {
  display: grid;
  gap: 6px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.76rem;
}

.meter-label strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.meter-track {
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 245, 230, 0.22);
  border-radius: 999px;
  background: rgba(255, 245, 230, 0.08);
}

.meter-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9ab91e 0%, #d5ff45 55%, #ffb36c 100%);
  transition: width 60ms linear;
  box-shadow: 0 0 18px rgba(213, 255, 69, 0.28);
}

.meter-bar.mic {
  background: linear-gradient(90deg, #6f8f2a 0%, #d5ff45 70%, #ffb36c 100%);
}

.meter-bar.silent {
  background: #74685c;
}

.meter-hint {
  margin: 0;
  color: var(--dim);
  font-size: 0.72rem;
}

.meter-hint.warn {
  color: var(--warm);
}

.status-text {
  margin: 0;
  color: var(--warm);
  min-height: 1.4em;
}

.timer-text {
  margin: 10px 0 0;
  font-size: 1.7rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.playback-panel {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(213, 255, 69, 0.22);
  border-radius: 14px;
  background: rgba(213, 255, 69, 0.06);
}

.playback-label {
  margin: 0 0 8px;
  color: var(--signal);
  font: 750 0.68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
}

.preview-audio {
  width: 100%;
  margin: 0;
}

.debug-panel {
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(12, 9, 7, 0.35);
  color: var(--dim);
  font-size: 0.78rem;
}

.debug-panel summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.debug-panel summary::-webkit-details-marker {
  display: none;
}

.debug-panel summary::before {
  content: "+ ";
  color: var(--signal);
}

.debug-panel[open] summary::before {
  content: "– ";
}

.diag-text {
  margin: 10px 0 0;
  padding: 12px;
  overflow-x: auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c0907;
}

.help-dialog {
  width: min(440px, calc(100% - 32px));
  padding: 0;
  border: 1px solid rgba(255, 45, 45, 0.35);
  border-radius: 18px;
  background: transparent;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.help-dialog::backdrop {
  background: rgba(5, 7, 5, 0.72);
  backdrop-filter: blur(6px);
}

.help-dialog-card {
  margin: 0;
  padding: 22px 22px 18px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 45, 45, 0.14), transparent 42%),
    linear-gradient(165deg, #171b14, #0d100c);
}

.help-dialog-kicker {
  margin: 0 0 8px;
  color: var(--rec-soft);
  font: 750 0.68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
}

.help-dialog h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.help-dialog-lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.help-dialog-steps {
  margin: 0 0 14px;
  padding-left: 1.2rem;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.6;
}

.help-dialog-steps li + li {
  margin-top: 8px;
}

.help-dialog-steps strong {
  color: var(--signal);
  font-weight: 750;
}

.help-dialog-note {
  margin: 0 0 16px;
  color: var(--dim);
  font-size: 0.78rem;
  line-height: 1.55;
}

.help-dialog-ok {
  width: 100%;
  min-height: 46px;
  border: none;
  border-radius: 12px;
  background: var(--signal);
  color: var(--signal-ink);
  font-weight: 800;
  cursor: pointer;
}

.help-dialog-ok:hover {
  filter: brightness(1.05);
}

.capture-list {
  display: grid;
  gap: 10px;
}

.capture-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.capture-item strong {
  font-weight: 650;
}

.capture-item .meta {
  color: var(--muted);
  font-size: 0.76rem;
}

.capture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.muted-note {
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 0.82rem;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(160px, 0.4fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding: 36px 0 48px;
  color: var(--dim);
  font-size: 0.82rem;
  line-height: 1.7;
  border-top: 1px solid var(--line);
  margin-top: 48px;
}

.footer-brand {
  display: grid;
  gap: 4px;
}

.footer-brand a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.footer-brand a:hover {
  color: var(--signal);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.footer-nav a:hover {
  color: var(--signal);
  border-color: currentColor;
}

@media (max-width: 920px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  main {
    order: 1;
  }

  .library-sidebar {
    order: 2;
  }

  .library-sticky {
    position: static;
    max-height: none;
  }

  /* Tablet / phone: icon nav, short header. */
  .brand-name {
    max-width: 9.5ch;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-icon {
    display: block;
  }

  .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .nav-link {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .nav-link:hover {
    background: rgba(213, 255, 69, 0.08);
  }

  .site-header nav {
    gap: 2px;
  }

  .lang-switch {
    margin-left: 4px;
  }
}

/* Consent panel open: hide Caseflow launcher (same as www). */
body.privacy-panel-open > #caseflow-widget-host {
  display: none !important;
}

@media (max-width: 640px) {
  .site-header {
    min-height: 46px;
    padding: 6px 0;
    width: min(1120px, calc(100% - 20px));
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .brand-name {
    font-size: 0.78rem;
    max-width: 7.5ch;
  }

  .record-orb {
    width: 132px;
    height: 132px;
  }

  .record-core,
  .orbit {
    width: 92px;
    height: 92px;
  }

  .record-core svg {
    width: 36px;
    height: 36px;
  }

  .page-shell,
  .site-footer {
    width: min(1120px, calc(100% - 20px));
  }

  .page-shell {
    margin-top: 10px;
    gap: 12px;
  }

  .deck {
    padding: 14px 12px;
    border-radius: 14px;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    justify-content: flex-start;
  }
}
