:root {
  color-scheme: light;
  --bg: #e8eef2;
  --paper: rgba(250, 252, 251, 0.82);
  --paper-solid: #f9fbfa;
  --ink: #17212b;
  --muted: #60717d;
  --line: rgba(31, 52, 66, 0.16);
  --deep: #17324a;
  --blue: #2d6f95;
  --green: #547b67;
  --rose: #9a646b;
  --gold: #a77d3d;
  --violet: #6d668f;
  --coral: #c97961;
  --shadow: 0 22px 70px rgba(34, 54, 70, 0.16);
}

body.night {
  color-scheme: dark;
  --bg: #10161b;
  --paper: rgba(22, 32, 39, 0.78);
  --paper-solid: #162027;
  --ink: #e9f0ee;
  --muted: #9eb0b8;
  --line: rgba(225, 238, 240, 0.16);
  --deep: #d8e9ee;
  --blue: #73adc7;
  --green: #9abda6;
  --rose: #d4979e;
  --gold: #d4ad67;
  --violet: #aaa2d4;
  --coral: #e09b84;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(45, 111, 149, 0.16), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(154, 100, 107, 0.13), transparent 24%),
    linear-gradient(180deg, var(--bg), #f7f4ef 140%);
  color: var(--ink);
  font-family: "Space Mono", "Noto Serif SC", monospace;
  font-size: 14px;
  line-height: 1.7;
  transition: background 0.35s ease, color 0.35s ease;
}

body.night {
  background:
    radial-gradient(circle at 20% 18%, rgba(115, 173, 199, 0.16), transparent 26%),
    radial-gradient(circle at 82% 14%, rgba(212, 151, 158, 0.11), transparent 26%),
    linear-gradient(180deg, var(--bg), #171b20 150%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
}

#mist-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.34;
  z-index: 0;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(1120px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
}

.brand {
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: 18px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 34px);
}

.nav-links a,
.eyebrow,
.signal-row span,
.ticker span,
.post-card span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links a {
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--blue);
}

.icon-btn,
.mini-btn,
.primary-action,
.text-action {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.icon-btn {
  width: 38px;
  background: var(--paper);
  color: var(--deep);
}

.icon-btn:hover,
.mini-btn:hover,
.primary-action:hover,
.text-action:hover,
.game-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 111, 149, 0.42);
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-section {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(280px, 1fr);
  grid-template-rows: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 30px 0 42px;
}

.hero-visual {
  min-height: 520px;
  display: grid;
  align-items: stretch;
}

.window-frame {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent),
    linear-gradient(180deg, #bfd1da 0%, #dfe8eb 48%, #aebbc1 100%);
  box-shadow: var(--shadow);
}

body.night .window-frame {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    linear-gradient(180deg, #172332 0%, #263746 55%, #141d26 100%);
}

.window-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 48.8%, rgba(255, 255, 255, 0.32) 49%, rgba(255, 255, 255, 0.32) 51%, transparent 51.2%),
    linear-gradient(180deg, transparent 54%, rgba(255, 255, 255, 0.22) 54.2%, rgba(255, 255, 255, 0.22) 55%, transparent 55.2%);
  z-index: 8;
}

.window-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(236, 244, 246, 0.06), rgba(236, 244, 246, 0.48));
  z-index: 7;
}

.window-hotspot {
  position: absolute;
  z-index: 12;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 244, 197, 0.78);
  border-radius: 50%;
  background: rgba(255, 236, 166, 0.42);
  box-shadow: 0 0 18px rgba(255, 226, 142, 0.62);
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.window-hotspot:hover,
.window-hotspot.is-lit {
  transform: scale(1.35);
  box-shadow: 0 0 28px rgba(255, 226, 142, 0.92), 0 0 70px rgba(201, 121, 97, 0.28);
}

.hotspot-1 { left: 22%; top: 36%; }
.hotspot-2 { right: 24%; top: 48%; }
.hotspot-3 { left: 57%; top: 28%; }

.window-frame.is-paused .rain-lines {
  animation-play-state: paused;
  opacity: 0.08;
}

.city-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background-repeat: repeat-x;
}

.layer-back {
  height: 58%;
  opacity: 0.42;
  background:
    linear-gradient(to top, rgba(68, 87, 98, 0.54), rgba(68, 87, 98, 0.04)),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(38, 60, 72, 0.52) 22px 64px, transparent 64px 86px);
  clip-path: polygon(0 62%, 8% 50%, 13% 57%, 22% 38%, 31% 45%, 38% 25%, 45% 46%, 52% 34%, 60% 58%, 69% 41%, 74% 48%, 83% 30%, 91% 52%, 100% 42%, 100% 100%, 0 100%);
}

.layer-mid {
  height: 48%;
  opacity: 0.72;
  background:
    repeating-linear-gradient(90deg, rgba(29, 50, 63, 0.72) 0 50px, transparent 50px 58px),
    repeating-linear-gradient(180deg, transparent 0 18px, rgba(235, 222, 162, 0.22) 18px 21px, transparent 21px 38px);
  clip-path: polygon(0 36%, 12% 28%, 12% 100%, 20% 100%, 20% 18%, 32% 18%, 32% 100%, 41% 100%, 41% 8%, 51% 8%, 51% 100%, 63% 100%, 63% 22%, 73% 22%, 73% 100%, 84% 100%, 84% 30%, 100% 30%, 100% 100%, 0 100%);
}

.layer-front {
  height: 34%;
  opacity: 0.9;
  background:
    repeating-linear-gradient(90deg, rgba(15, 32, 43, 0.86) 0 34px, transparent 34px 41px),
    repeating-linear-gradient(180deg, transparent 0 16px, rgba(255, 244, 197, 0.18) 16px 18px, transparent 18px 33px);
  clip-path: polygon(0 25%, 9% 25%, 9% 100%, 17% 100%, 17% 12%, 29% 12%, 29% 100%, 37% 100%, 37% 35%, 48% 35%, 48% 100%, 57% 100%, 57% 18%, 68% 18%, 68% 100%, 75% 100%, 75% 8%, 86% 8%, 86% 100%, 100% 100%, 100% 32%, 0 32%);
}

.rain-lines {
  position: absolute;
  inset: -80px 0 0;
  z-index: 9;
  opacity: 0.24;
  background-image: repeating-linear-gradient(110deg, transparent 0 18px, rgba(255,255,255,0.58) 18px 19px, transparent 19px 42px);
  animation: rainDrift 9s linear infinite;
}

@keyframes rainDrift {
  from { transform: translate3d(0, -40px, 0); }
  to { transform: translate3d(0, 40px, 0); }
}

.hero-copy {
  align-self: center;
}

.hero-copy h1 {
  max-width: 680px;
  margin: 8px 0 18px;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: clamp(48px, 9vw, 118px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.98;
}

.hero-subtitle {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-family: "Noto Serif SC", serif;
  font-size: clamp(18px, 2.4vw, 28px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-note {
  width: min(100%, 560px);
  min-height: 44px;
  margin-top: 18px;
  padding: 11px 14px;
  border-left: 3px solid var(--coral);
  background: linear-gradient(90deg, rgba(201, 121, 97, 0.12), transparent);
  color: var(--muted);
  font-family: "Noto Serif SC", serif;
}

.primary-action,
.text-action,
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-solid);
  color: var(--deep);
}

.primary-action {
  padding: 0 18px;
  background: var(--deep);
  color: var(--paper-solid);
  border-color: transparent;
}

.text-action {
  padding: 0 16px;
}

.mini-btn {
  min-height: 32px;
  padding: 0 12px;
}

.signal-panel {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.signal-row,
.tool-panel,
.game-tile,
.post-card,
.bottle-form,
.bottle-item,
.timeline li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 38px rgba(34, 54, 70, 0.08);
  backdrop-filter: blur(14px);
}

.signal-row {
  min-height: 78px;
  padding: 14px;
}

.signal-row strong {
  display: block;
  margin-top: 8px;
  color: var(--deep);
  font-size: 19px;
  line-height: 1.1;
}

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 36px;
  padding: 12px 0;
  animation: ticker 24s linear infinite;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

.section-grid,
.route-section,
.community-section,
.bottle-section,
.writing-section {
  padding: 88px 0;
}

.section-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 44px;
  align-items: start;
}

.section-heading h2,
.bottle-section h2 {
  margin: 4px 0 12px;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
}

.section-heading p,
.section-note {
  margin: 0;
  color: var(--muted);
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tool-panel,
.game-tile,
.post-card,
.timeline li {
  padding: 18px;
}

.inspiration-panel,
.pixel-panel {
  min-height: 208px;
}

.panel-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.panel-topline span {
  color: var(--muted);
}

#idea-text {
  margin: 0;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: 26px;
  line-height: 1.55;
}

.oracle-card {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  display: grid;
  align-content: start;
}

.oracle-card::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -70px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(167, 125, 61, 0.22);
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 18deg, rgba(167, 125, 61, 0.11) 0 8deg, transparent 8deg 18deg);
  opacity: 0.72;
  pointer-events: none;
}

.oracle-symbol {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  margin: 4px 0 16px;
  border: 1px solid rgba(167, 125, 61, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(167, 125, 61, 0.16), rgba(109, 102, 143, 0.14)),
    var(--paper-solid);
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: 38px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

#oracle-text {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: 25px;
  line-height: 1.55;
}

#oracle-tag {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 14px;
  color: var(--muted);
}

.radio-panel {
  min-height: 300px;
}

.radio-dial {
  height: 106px;
  display: flex;
  align-items: end;
  gap: 9px;
  margin: 8px 0 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(45, 111, 149, 0.08), rgba(84, 123, 103, 0.08)),
    rgba(255, 255, 255, 0.16);
}

.radio-dial span {
  flex: 1;
  min-width: 12px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--coral), var(--blue));
  opacity: 0.8;
  transform-origin: bottom;
  animation: radioPulse 1.9s ease-in-out infinite;
}

.radio-dial span:nth-child(1) { height: 34%; animation-delay: 0.1s; }
.radio-dial span:nth-child(2) { height: 72%; animation-delay: 0.3s; }
.radio-dial span:nth-child(3) { height: 48%; animation-delay: 0.5s; }
.radio-dial span:nth-child(4) { height: 88%; animation-delay: 0.7s; }
.radio-dial span:nth-child(5) { height: 42%; animation-delay: 0.9s; }

@keyframes radioPulse {
  0%, 100% { transform: scaleY(0.72); }
  50% { transform: scaleY(1); }
}

#radio-text {
  margin: 0;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: 23px;
  line-height: 1.55;
}

.pixel-board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 5px;
}

.pixel-board span {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--line);
}

.game-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.game-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 45%, rgba(201, 121, 97, 0.08));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.game-tile:hover::before {
  opacity: 1;
}

.game-tile span {
  color: var(--gold);
  font-size: 12px;
}

.game-tile strong {
  margin-top: auto;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
  line-height: 1.2;
}

.game-tile small {
  margin-top: 8px;
  color: var(--muted);
}

.bottle-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(320px, 1.22fr);
  gap: 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.route-section {
  border-top: 1px solid var(--line);
}

.route-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.route-card {
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 38px rgba(34, 54, 70, 0.08);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.route-card:hover,
.route-card.is-active {
  transform: translateY(-2px);
  border-color: rgba(201, 121, 97, 0.48);
  background:
    linear-gradient(135deg, rgba(201, 121, 97, 0.12), rgba(109, 102, 143, 0.08)),
    var(--paper);
}

.route-card span {
  color: var(--gold);
  font-size: 12px;
}

.route-card strong {
  display: block;
  margin-top: 18px;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
  line-height: 1.22;
}

.route-result {
  min-height: 86px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(45, 111, 149, 0.10), rgba(84, 123, 103, 0.08)),
    var(--paper);
}

.route-result span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.route-result strong {
  display: block;
  margin-top: 6px;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
  line-height: 1.3;
}

.community-section {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 360px);
  gap: 28px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.community-copy h2 {
  max-width: 680px;
  margin: 4px 0 14px;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
}

.community-copy p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-family: "Noto Serif SC", serif;
  font-size: 20px;
  line-height: 1.75;
}

.community-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.community-stats span,
.community-qr-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 38px rgba(34, 54, 70, 0.08);
  backdrop-filter: blur(14px);
}

.community-stats span {
  min-height: 78px;
  display: grid;
  align-content: center;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 12px;
}

.community-stats strong {
  display: block;
  color: var(--deep);
  font-size: 22px;
  line-height: 1.1;
}

.community-qr-card {
  display: block;
  padding: 14px;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.community-qr-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 121, 97, 0.48);
}

.community-qr-card img {
  display: block;
  width: 100%;
  border-radius: 8px;
  background: #fff;
}

.community-qr-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.bottle-app {
  display: grid;
  gap: 14px;
}

.bottle-form {
  padding: 18px;
}

.bottle-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: 20px;
}

.bottle-name,
.bottle-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.44);
  color: var(--ink);
}

.bottle-name {
  min-height: 42px;
  margin-bottom: 10px;
}

.bottle-form textarea {
  min-height: 118px;
  resize: vertical;
}

.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

body.night .bottle-name,
body.night .bottle-form textarea {
  background: rgba(255, 255, 255, 0.06);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

#char-count {
  color: var(--muted);
  font-size: 12px;
}

.bottle-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.bottle-status.is-error {
  color: var(--rose);
}

.bottle-status.is-ok {
  color: var(--green);
}

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

.bottle-item {
  padding: 14px 16px;
}

.bottle-item p {
  margin: 0;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: 18px;
}

.bottle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.bottle-author {
  color: var(--gold);
}

.bottle-item time {
  display: block;
}

.bottle-delete {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(154, 100, 107, 0.28);
  border-radius: 8px;
  background: transparent;
  color: var(--rose);
  cursor: pointer;
  font-size: 11px;
}

.bottle-delete:hover {
  background: rgba(154, 100, 107, 0.09);
}

.bottle-delete:disabled {
  cursor: wait;
  opacity: 0.55;
}

.bottle-list-actions {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

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

.timeline time {
  color: var(--gold);
  font-size: 12px;
}

.timeline strong {
  display: block;
  margin: 6px 0;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
}

.timeline p {
  margin: 0;
  color: var(--muted);
}

.writing-section {
  border-bottom: 1px solid var(--line);
}

.post-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.post-card h3 {
  min-height: 86px;
  margin: 12px 0;
  color: var(--deep);
  font-family: "Noto Serif SC", serif;
  font-size: 25px;
  line-height: 1.25;
}

.post-card p {
  margin: 0;
  color: var(--muted);
}

.secret-console {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: min(320px, calc(100% - 36px));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-solid);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.secret-console.show {
  opacity: 1;
  transform: translateY(0);
}

.secret-console strong,
.secret-console span {
  display: block;
}

.secret-console strong {
  color: var(--deep);
}

.secret-console span {
  color: var(--muted);
  margin-top: 4px;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.site-footer a:hover {
  color: var(--blue);
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .hero-section,
  .section-grid,
  .community-section,
  .bottle-section {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    padding-top: 20px;
  }

  .hero-visual {
    min-height: 340px;
    order: 2;
  }

  .window-frame {
    min-height: 340px;
  }

  .signal-panel {
    grid-column: auto;
  }

  .post-list {
    grid-template-columns: 1fr;
  }

  .route-board {
    grid-template-columns: 1fr;
  }

  .route-result {
    align-items: flex-start;
    flex-direction: column;
  }

  .community-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 13px;
  }

  main,
  .site-header,
  .site-footer {
    width: min(100% - 24px, 1120px);
  }

  .lab-grid,
  .signal-panel {
    grid-template-columns: 1fr;
  }

  .section-grid,
  .community-section,
  .bottle-section,
  .writing-section {
    padding: 58px 0;
  }

  .hero-copy h1 {
    font-size: clamp(44px, 18vw, 72px);
  }

  #idea-text {
    font-size: 22px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

/* ================================================================
   统一导航栏（由 assets/nav.js 动态注入）
   ================================================================ */
.wb-nav {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--paper, rgba(250, 252, 251, 0.92));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.3s;
}

/* 桌面顶栏 */
.wb-nav--top {
  top: 0;
  height: 48px;
  display: none; /* 默认隐藏，JS 中按媒体查询控制 */
}

/* 手机底栏 */
.wb-nav--bottom {
  bottom: 0;
  height: 64px;
  border-bottom: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
  display: none; /* 默认隐藏 */
}

.wb-nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 12px;
}

.wb-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--muted, rgba(93, 81, 72, 0.66));
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  min-width: 52px;
  letter-spacing: 0.02em;
}

.wb-nav--top a {
  flex-direction: row;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
}

.wb-nav a:hover {
  color: var(--ink, #17212b);
  background: rgba(45, 111, 149, 0.08);
}

.wb-nav a.active {
  color: var(--accent, #2d6f95);
  background: rgba(45, 111, 149, 0.1);
}

.wb-nav .nav-icon {
  font-size: 18px;
  line-height: 1;
}

.wb-nav--top .nav-icon {
  font-size: 16px;
}

.wb-nav .nav-label {
  line-height: 1;
}

/* 夜间模式 */
body.night .wb-nav {
  background: var(--paper, rgba(22, 32, 39, 0.92));
  border-color: rgba(255, 255, 255, 0.06);
}

body.night .wb-nav a:hover {
  color: var(--ink, #e9f0ee);
  background: rgba(45, 111, 149, 0.15);
}

body.night .wb-nav a.active {
  color: var(--accent-night, #57b8e0);
  background: rgba(87, 184, 224, 0.12);
}

@media (max-width: 860px) {
  .wb-nav a {
    flex: 1;
    min-width: 0;
    padding: 4px 6px;
  }
}
