:root {
  color-scheme: dark;
  --bg: #070a0d;
  --brand-bg: #020508;
  --brand-bg-soft: #031116;
  --panel: rgba(8, 16, 21, 0.9);
  --panel-strong: rgba(10, 21, 27, 0.94);
  --line: rgba(149, 178, 190, 0.18);
  --line-bright: rgba(75, 213, 226, 0.42);
  --text: #eef7fb;
  --muted: #91a6b0;
  --soft: #c8d8de;
  --cyan: #4bd5e2;
  --cyan-deep: #0c7182;
  --amber: #f0b94b;
  --red: #ef7f72;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% 18%, rgba(75, 213, 226, 0.12), transparent 29rem),
    radial-gradient(circle at 18% 8%, rgba(47, 232, 182, 0.08), transparent 24rem),
    linear-gradient(135deg, var(--brand-bg) 0%, var(--brand-bg-soft) 48%, #0b0f13 100%);
  color: var(--text);
  font-family:
    Inter, "Segoe UI", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  letter-spacing: 0;
}

button,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.side-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(2, 5, 8, 0.92), rgba(3, 11, 15, 0.96)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 9px);
}

.brand-block,
.topbar,
.panel-title,
.status-row,
.region-list li,
.store-meta,
.score-row,
.detail-head,
.queue-grid {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 12px;
  margin-bottom: 28px;
}

.brand-logo-image {
  display: block;
  width: min(100%, 260px);
  height: auto;
  max-height: 92px;
  object-fit: contain;
}

.public-brand .brand-logo-image {
  width: min(78vw, 360px);
  max-height: 112px;
}

.side-panel .brand-logo-image,
.mobile-hero-brand .brand-logo-image {
  width: min(100%, 230px);
  max-height: 82px;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

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

.signal-dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--cyan);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.38rem;
}

.brand-subline {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2.2vw, 2.1rem);
  line-height: 1.25;
}

.filter-stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

select {
  width: 100%;
  padding: 11px 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f171d;
  outline: none;
}

select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(75, 213, 226, 0.14);
}

.compact-module,
.map-panel,
.kpi-panel,
.surge-panel,
.ranking-panel,
.detail-panel,
.trend-panel,
.survey-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.compact-module {
  margin-top: 22px;
  padding: 16px;
}

.module-heading,
.panel-title {
  justify-content: space-between;
  gap: 12px;
  color: var(--soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.module-heading b,
.panel-title b {
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.status-row {
  justify-content: space-between;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.8rem;
}

.status-row strong {
  color: var(--text);
}

.status-meter {
  height: 6px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.status-meter span {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan));
}

.small-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.api-module {
  position: relative;
  overflow: hidden;
}

.api-module::before {
  content: "";
  position: absolute;
  inset: auto 12px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(75, 213, 226, 0.7), transparent);
}

.api-sync-button {
  width: 100%;
  min-height: 38px;
  margin-top: 14px;
  border: 1px solid rgba(75, 213, 226, 0.56);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(75, 213, 226, 0.18), rgba(39, 95, 113, 0.16)),
    rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.api-sync-button:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(75, 213, 226, 0.18);
  transform: translateY(-1px);
}

.api-sync-button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

#placesSyncStatus[data-state="success"] {
  color: #78f4b0;
}

#placesSyncStatus[data-state="error"] {
  color: #ff9f8c;
}

#placesSyncStatus[data-state="loading"] {
  color: var(--cyan);
}

.dashboard {
  min-width: 0;
  padding: 22px;
}

.topbar {
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.beta-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: 16px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(75, 213, 226, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(75, 213, 226, 0.1), rgba(240, 185, 75, 0.035)),
    rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow);
}

.beta-notice h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.45;
}

.beta-notice p {
  margin: 0;
  color: var(--soft);
  font-size: 0.84rem;
  line-height: 1.7;
}

.beta-legend {
  display: grid;
  gap: 8px;
  align-content: center;
}

.beta-legend span {
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: rgba(5, 12, 16, 0.48);
  color: var(--soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.beta-legend b {
  margin-right: 6px;
  color: var(--cyan);
}

.topbar-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 10px;
  min-width: min(420px, 100%);
}

.topbar-metrics div,
.queue-grid div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.topbar-metrics span,
.queue-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.topbar-metrics strong,
.queue-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 1.3rem;
}

.up {
  color: var(--cyan);
}

.warn {
  color: var(--amber);
}

.command-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.82fr 0.82fr;
  gap: 14px;
  margin-bottom: 14px;
}

.map-panel,
.kpi-panel,
.surge-panel,
.ranking-panel,
.detail-panel,
.trend-panel,
.survey-panel {
  padding: 16px;
}

.radar-map {
  position: relative;
  height: 440px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(75, 213, 226, 0.2);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(75, 213, 226, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(75, 213, 226, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(75, 213, 226, 0.18), rgba(7, 10, 13, 0.25) 42%, rgba(7, 10, 13, 0.9) 72%);
  background-size: 32px 32px, 32px 32px, auto;
}

.radar-map::before {
  content: "";
  position: absolute;
  inset: 24px 44px;
  border: 1px solid rgba(75, 213, 226, 0.26);
  border-radius: 48% 52% 44% 56%;
  transform: rotate(-12deg);
}

.area-map {
  isolation: isolate;
}

.area-map::before {
  display: none;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.map-toolbar button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(75, 213, 226, 0.38);
  border-radius: 6px;
  background: rgba(75, 213, 226, 0.1);
  color: var(--cyan);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
}

.map-toolbar span {
  color: var(--muted);
  font-size: 0.76rem;
}

.map-canvas {
  position: absolute;
  inset: 12px 18px;
  left: 50%;
  width: min(96%, 720px);
  height: calc(100% - 24px);
  transform: translateX(-50%);
  z-index: 2;
}

.map-canvas::before,
.map-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-canvas::before {
  background:
    radial-gradient(circle at 72% 13%, rgba(75, 213, 226, 0.15), transparent 7%),
    radial-gradient(circle at 62% 43%, rgba(75, 213, 226, 0.12), transparent 14%),
    radial-gradient(circle at 48% 62%, rgba(75, 213, 226, 0.13), transparent 17%),
    radial-gradient(circle at 31% 72%, rgba(75, 213, 226, 0.13), transparent 16%),
    radial-gradient(circle at 12% 88%, rgba(75, 213, 226, 0.14), transparent 11%),
    radial-gradient(circle at 68% 92%, rgba(75, 213, 226, 0.14), transparent 8%);
  opacity: 0.48;
  filter: blur(10px);
}

.map-canvas::after {
  left: 50%;
  top: 50%;
  width: min(86%, 430px);
  aspect-ratio: 1;
  border: 1px solid rgba(75, 213, 226, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 33%, rgba(75, 213, 226, 0.1) 33.4% 33.8%, transparent 34.2% 58%, rgba(75, 213, 226, 0.08) 58.4% 58.8%, transparent 59.2%),
    radial-gradient(circle, rgba(75, 213, 226, 0.07), transparent 62%);
  transform: translate(-50%, -50%);
  opacity: 0.8;
}

.neon-map-image {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 100%;
  height: 100%;
  z-index: 1;
  object-fit: contain;
  opacity: 0.82;
  filter: drop-shadow(0 0 12px rgba(238, 247, 251, 0.2)) drop-shadow(0 0 28px rgba(75, 213, 226, 0.12));
  transform: translate(-50%, -50%);
  user-select: none;
  pointer-events: none;
}

.japan-map-image {
  width: min(100%, 670px);
  height: min(100%, 420px);
}

.okinawa-map-image {
  width: min(62%, 430px);
  height: min(88%, 360px);
  opacity: 0.9;
}

.prefecture-layer,
.municipality-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
}

.prefecture-layer[hidden],
.municipality-layer[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.prefecture-layer {
  z-index: 10;
  pointer-events: auto;
}

.municipality-layer {
  z-index: 9;
  pointer-events: auto;
}

.prefecture-hotspot {
  position: absolute;
  z-index: 9;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  appearance: none;
  background: transparent;
  cursor: pointer;
  overflow: visible;
  pointer-events: auto;
}

.hotspot-dot {
  position: absolute;
  left: 58%;
  top: 58%;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(75, 213, 226, 0.42);
  border-radius: 50%;
  background: rgba(75, 213, 226, 0.18);
  box-shadow:
    0 0 0 7px rgba(75, 213, 226, 0.05),
    0 0 20px rgba(75, 213, 226, 0.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hotspot-dot::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(75, 213, 226, 0.16);
  border-radius: 50%;
  animation: hotspotPulse 1900ms ease-out infinite;
}

.prefecture-magnifier {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 16px);
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 12px;
  align-items: center;
  width: min(270px, 86vw);
  padding: 10px 12px;
  border: 1px solid rgba(75, 213, 226, 0.36);
  border-radius: 8px;
  background: rgba(3, 9, 12, 0.86);
  box-shadow:
    0 0 32px rgba(75, 213, 226, 0.16),
    inset 0 0 22px rgba(75, 213, 226, 0.06);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px) scale(0.96);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.prefecture-hotspot:hover,
.prefecture-hotspot:focus-visible {
  border-color: rgba(75, 213, 226, 0.34);
  background: rgba(75, 213, 226, 0.045);
  box-shadow: 0 0 28px rgba(75, 213, 226, 0.13);
  outline: none;
}

.prefecture-hotspot:hover .prefecture-magnifier,
.prefecture-hotspot:focus-visible .prefecture-magnifier {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.magnifier-map {
  display: block;
  width: 94px;
  height: 68px;
  border: 1px solid rgba(238, 247, 251, 0.32);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(75, 213, 226, 0.18), transparent 44%),
    url("./assets/okinawa-neon-map.png") center / contain no-repeat,
    rgba(2, 8, 10, 0.92);
  box-shadow: inset 0 0 18px rgba(75, 213, 226, 0.14);
}

.magnifier-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.magnifier-copy small {
  color: var(--cyan);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.magnifier-copy strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.1;
}

.magnifier-copy em {
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
}

.okinawa-hotspot {
  left: 59%;
  top: 73%;
  width: 22%;
  height: 20%;
}

.okinawa-hotspot::before {
  content: "沖縄県";
  position: absolute;
  left: 58%;
  top: calc(58% + 16px);
  padding: 3px 7px;
  border: 1px solid rgba(75, 213, 226, 0.24);
  border-radius: 999px;
  background: rgba(3, 9, 12, 0.76);
  color: var(--cyan);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(75, 213, 226, 0.12);
  transform: translateX(-50%);
  pointer-events: none;
}

.pref-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 1px solid rgba(75, 213, 226, 0.52);
  border-radius: 50%;
  background: rgba(75, 213, 226, 0.28);
  color: var(--soft);
  cursor: pointer;
  box-shadow: 0 0 0 5px rgba(75, 213, 226, 0.06), 0 0 16px rgba(75, 213, 226, 0.22);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.node-core {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(75, 213, 226, 0.76);
}

.pref-node b {
  display: none;
}

.pref-node:hover,
.pref-node.featured {
  border-color: rgba(75, 213, 226, 0.92);
  background: rgba(75, 213, 226, 0.46);
  box-shadow: 0 0 0 7px rgba(75, 213, 226, 0.13), 0 0 24px rgba(75, 213, 226, 0.42);
}

.pref-node:hover {
  transform: scale(1.55);
  z-index: 3;
}

.pref-node:hover b,
.pref-node.featured b {
  position: absolute;
  right: -7px;
  bottom: -5px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--cyan);
  color: #061114;
  font-size: 0.58rem;
}

.pref-node:not(.featured):hover b {
  right: -12px;
  bottom: -12px;
}

.municipality-layer {
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 8px;
  background: rgba(4, 10, 12, 0.28);
}

.municipality-focus {
  width: min(360px, 100%);
  padding: 18px;
  border: 1px solid rgba(75, 213, 226, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(rgba(7, 10, 13, 0.88), rgba(7, 10, 13, 0.78)),
    radial-gradient(circle at 26% 110%, rgba(75, 213, 226, 0.22), transparent 50%);
  box-shadow: 0 0 34px rgba(75, 213, 226, 0.12);
}

.focus-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.focus-score span {
  color: var(--soft);
  font-size: 1.05rem;
  font-weight: 900;
}

.focus-score strong {
  color: var(--cyan);
  font-size: 2rem;
  line-height: 1;
}

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

.city-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(149, 178, 190, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--soft);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  animation: cityLift 420ms ease both;
  animation-delay: var(--delay);
}

.city-node b {
  color: var(--cyan);
}

.city-node:hover {
  border-color: rgba(75, 213, 226, 0.68);
  background: rgba(75, 213, 226, 0.12);
}

.okinawa-selector {
  display: grid;
  grid-template-columns: minmax(132px, 0.84fr) minmax(220px, 1.25fr) minmax(132px, 0.84fr);
  align-items: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  padding: 8px;
}

.okinawa-link-panel {
  position: relative;
  z-index: 4;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.okinawa-link-panel p {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.okinawa-link-panel.right p {
  text-align: right;
}

.area-link-grid {
  display: grid;
  gap: 8px;
}

.text-link-node {
  min-height: 34px;
  padding: 0 9px;
  border-color: rgba(75, 213, 226, 0.22);
  background: rgba(5, 13, 16, 0.66);
  backdrop-filter: blur(8px);
  font-size: 0.76rem;
}

.district-node {
  border-color: rgba(120, 244, 176, 0.22);
}

.okinawa-map-caption {
  z-index: 3;
  align-self: end;
  justify-self: center;
  min-width: 160px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(75, 213, 226, 0.22);
  border-radius: 8px;
  background: rgba(3, 9, 12, 0.62);
  text-align: center;
  box-shadow: 0 0 26px rgba(75, 213, 226, 0.12);
}

.okinawa-map-caption span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.okinawa-map-caption strong {
  display: block;
  color: var(--cyan);
  font-size: 1.9rem;
  line-height: 1.1;
}

.map-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

@keyframes cityLift {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hotspotPulse {
  0% {
    opacity: 0.75;
    transform: scale(0.45);
  }

  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

.scan-line {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(75, 213, 226, 0.16) 48%, transparent 58%);
  animation: scan 4.8s linear infinite;
}

.area-map .scan-line {
  left: 50%;
  top: 50%;
  width: min(82%, 420px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent 0deg 292deg, rgba(75, 213, 226, 0.02) 304deg, rgba(75, 213, 226, 0.35) 348deg, rgba(75, 213, 226, 0.0) 360deg),
    radial-gradient(circle, transparent 0 57%, rgba(75, 213, 226, 0.11) 57.4% 58%, transparent 58.5%);
  transform: translate(-50%, -50%);
  animation: radarClock 4.2s linear infinite;
  z-index: 2;
  opacity: 0.95;
  pointer-events: none;
}

.area-map .scan-line::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 48%;
  height: 1px;
  background: linear-gradient(90deg, rgba(75, 213, 226, 0.7), transparent);
  transform-origin: left center;
}

.map-pin {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(75, 213, 226, 0.12), 0 0 20px var(--cyan);
  z-index: 1;
}

.map-pin::after {
  content: attr(data-label);
  position: absolute;
  left: 16px;
  top: -8px;
  color: var(--soft);
  font-size: 0.72rem;
  white-space: nowrap;
}

.pin-1 {
  left: 24%;
  top: 68%;
}

.pin-2 {
  left: 62%;
  top: 42%;
}

.pin-3 {
  left: 49%;
  top: 53%;
}

.pin-4 {
  left: 36%;
  top: 58%;
}

@keyframes scan {
  from {
    transform: translateX(-90%);
  }
  to {
    transform: translateX(90%);
  }
}

@keyframes radarClock {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

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

.region-list li {
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
}

.region-list strong {
  color: var(--cyan);
}

.caution .region-list strong {
  color: var(--amber);
}

.surge-panel {
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.surge-panel::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(75, 213, 226, 0.16), rgba(240, 185, 75, 0.09), transparent);
  opacity: 0.55;
  transform: translateY(100%);
  animation: panelRise 5.4s ease-in-out 5;
  pointer-events: none;
}

.surge-list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.surge-card {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  border: 1px solid rgba(75, 213, 226, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(7, 10, 13, 0.95), rgba(7, 10, 13, 0.78)),
    var(--photo);
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.surge-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(75, 213, 226, 0.16), transparent 48%);
  opacity: 0.7;
  pointer-events: none;
}

.surge-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -92%;
  height: 190%;
  background:
    linear-gradient(0deg, transparent 0%, rgba(75, 213, 226, 0.24) 34%, rgba(240, 185, 75, 0.18) 47%, transparent 64%),
    radial-gradient(circle at 22% 110%, rgba(75, 213, 226, 0.28), transparent 34%);
  mix-blend-mode: screen;
  opacity: 0.78;
  animation: surgeRise 3.8s cubic-bezier(0.2, 0.72, 0.25, 1) 5;
  pointer-events: none;
}

.surge-card:hover {
  border-color: rgba(75, 213, 226, 0.54);
  box-shadow: 0 0 0 1px rgba(75, 213, 226, 0.16), 0 0 36px rgba(75, 213, 226, 0.2);
}

.surge-card:nth-child(2)::after {
  animation-delay: 0.55s;
}

.surge-card:nth-child(3)::after {
  animation-delay: 1.1s;
}

.surge-rank,
.surge-body {
  position: relative;
  z-index: 2;
}

.surge-rank {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px 0;
}

.surge-rank span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(75, 213, 226, 0.46);
  border-radius: 999px;
  background: rgba(75, 213, 226, 0.13);
  color: var(--cyan);
  font-size: 0.86rem;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(75, 213, 226, 0.15);
  animation: surgePulse 2.4s ease-in-out 5;
}

.surge-rank b {
  color: var(--soft);
  font-size: 0.74rem;
}

.surge-body {
  padding: 13px 14px 14px;
}

.surge-body h3 {
  margin: 0 0 7px;
  font-size: 1rem;
  line-height: 1.35;
}

.surge-body p {
  margin: 0 0 12px;
  color: var(--soft);
  font-size: 0.8rem;
  line-height: 1.55;
}

.metric-shifts {
  display: grid;
  gap: 7px;
}

.metric-shift {
  display: grid;
  grid-template-columns: minmax(72px, 0.85fr) minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid rgba(149, 178, 190, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.72rem;
}

.metric-shift strong {
  color: var(--soft);
  font-size: 0.72rem;
}

.metric-shift b {
  color: var(--cyan);
  font-size: 0.74rem;
}

.surge-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px dashed rgba(149, 178, 190, 0.24);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  background: rgba(255, 255, 255, 0.035);
}

@keyframes surgeRise {
  0% {
    transform: translateY(42%);
    opacity: 0.22;
  }
  42% {
    opacity: 0.86;
  }
  100% {
    transform: translateY(-58%);
    opacity: 0.18;
  }
}

@keyframes panelRise {
  0%,
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
  45% {
    opacity: 0.55;
  }
  70% {
    transform: translateY(-38%);
    opacity: 0.2;
  }
}

@keyframes surgePulse {
  0%,
  100% {
    box-shadow: 0 0 16px rgba(75, 213, 226, 0.15);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 22px rgba(75, 213, 226, 0.34);
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .surge-panel::before,
  .surge-card::after,
  .surge-rank span,
  .meter-track span,
  .scan-line,
  .ranking-card {
    animation: none;
  }
}

.ranking-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.ranking-tabs button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  white-space: nowrap;
}

.ranking-tabs button.active {
  color: #061114;
  border-color: rgba(75, 213, 226, 0.9);
  background: var(--cyan);
}

.workbench {
  display: grid;
  grid-template-columns: minmax(420px, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.empty-state {
  padding: 22px;
  border: 1px dashed rgba(149, 178, 190, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--soft);
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.96rem;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.detail-empty {
  min-height: 280px;
  display: grid;
  align-content: center;
}

.ranking-card {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(7, 10, 13, 0.94), rgba(7, 10, 13, 0.78)),
    var(--photo);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  animation: liftIn 520ms ease both;
}

.ranking-card.selected {
  border-color: var(--line-bright);
  box-shadow: 0 0 0 1px rgba(75, 213, 226, 0.16), 0 0 30px rgba(75, 213, 226, 0.18);
}

.ranking-card-content {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 118px;
  gap: 16px;
  align-items: center;
  min-height: 142px;
  padding: 18px 18px 12px;
}

.rank-badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(75, 213, 226, 0.48);
  border-radius: 8px;
  background: rgba(3, 12, 15, 0.72);
  color: var(--cyan);
  font-size: 1.55rem;
  font-weight: 900;
}

.rank-cell {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.rank-shift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 58px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.rank-shift.upward {
  border-color: rgba(75, 213, 226, 0.38);
  color: var(--cyan);
  background: rgba(75, 213, 226, 0.11);
}

.rank-shift.downward {
  border-color: rgba(240, 185, 75, 0.42);
  color: var(--amber);
  background: rgba(240, 185, 75, 0.1);
}

.rank-shift.steady {
  color: var(--soft);
}

.store-name {
  margin: 0 0 9px;
  font-size: 1.14rem;
  line-height: 1.35;
}

.store-meta {
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.tag {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.summary {
  max-width: 62ch;
  margin: 10px 0 0;
  color: var(--soft);
  font-size: 0.84rem;
  line-height: 1.6;
}

.score-block {
  text-align: right;
}

.score-block strong {
  display: block;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
}

.grade {
  display: inline-block;
  margin-top: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(75, 213, 226, 0.14);
  color: var(--cyan);
  font-weight: 800;
}

.change {
  margin-top: 8px;
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 700;
}

.ranking-score-meter {
  padding: 0 18px 16px 106px;
}

.meter-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.meter-copy strong {
  color: var(--soft);
  font-size: 0.78rem;
}

.meter-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(149, 178, 190, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

.meter-track span {
  display: block;
  width: var(--meter);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan) 72%, rgba(238, 247, 251, 0.86));
  box-shadow: 0 0 18px rgba(75, 213, 226, 0.3);
  transform-origin: left;
  animation: scoreFill 900ms cubic-bezier(0.2, 0.72, 0.25, 1) both;
}

@keyframes scoreFill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes liftIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-panel {
  min-height: 100%;
  background: var(--panel-strong);
}

.detail-photo {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 168px;
  margin: -16px -16px 16px;
  padding: 16px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(rgba(5, 8, 10, 0.28), rgba(5, 8, 10, 0.86)),
    var(--photo);
  background-size: cover;
  background-position: center;
}

.detail-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 1px solid rgba(75, 213, 226, 0.22);
  background: linear-gradient(180deg, transparent 0%, rgba(3, 8, 10, 0.28) 54%, rgba(3, 8, 10, 0.78) 100%);
  pointer-events: none;
}

.site-identity {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.site-identity strong {
  display: block;
  max-width: 240px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favicon-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(75, 213, 226, 0.48);
  border-radius: 8px;
  background: rgba(3, 12, 15, 0.78);
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(75, 213, 226, 0.18);
}

.detail-head {
  justify-content: space-between;
  gap: 14px;
}

.detail-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.detail-score {
  color: var(--cyan);
  font-size: 2rem;
  font-weight: 900;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.detail-button.primary {
  border-color: rgba(75, 213, 226, 0.76);
  background: rgba(75, 213, 226, 0.14);
  color: var(--text);
}

.detail-button:hover,
.primary-action:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(75, 213, 226, 0.14);
}

.detail-cta-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--amber);
  border-radius: 6px;
  background: rgba(240, 185, 75, 0.08);
  color: var(--soft);
  font-size: 0.78rem;
  line-height: 1.6;
}

.beta-policy {
  margin-top: 14px;
  border-color: rgba(240, 185, 75, 0.28);
  background: rgba(240, 185, 75, 0.07);
}

.score-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.score-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 40px;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.score-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.score-track span {
  display: block;
  width: var(--score);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan));
}

.insight-box {
  padding: 14px;
  border: 1px solid rgba(75, 213, 226, 0.18);
  border-radius: 8px;
  background: rgba(75, 213, 226, 0.055);
}

.insight-box h4 {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.86rem;
}

.insight-box p,
.action-list {
  margin: 0;
  color: var(--soft);
  font-size: 0.86rem;
  line-height: 1.65;
}

.action-list {
  padding-left: 18px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  margin-top: 14px;
}

.chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(38px, 1fr));
  gap: 12px;
  align-items: end;
  height: 188px;
  margin-top: 14px;
  padding: 14px 10px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 36px;
}

.chart-empty {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  color: var(--muted);
  font-size: 0.84rem;
}

.bar {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  height: 100%;
  color: var(--muted);
  font-size: 0.72rem;
}

.bar span {
  display: block;
  width: 100%;
  min-height: 18px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--cyan), rgba(75, 213, 226, 0.22));
  box-shadow: 0 0 18px rgba(75, 213, 226, 0.2);
}

.queue-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.primary-action {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  border: 1px solid rgba(75, 213, 226, 0.78);
  border-radius: 6px;
  background: rgba(75, 213, 226, 0.14);
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 1180px) {
  .app-shell {
    display: block;
  }

  .side-panel {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.44fr);
    gap: 14px;
    height: auto;
    max-height: none;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand-block {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .filter-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .compact-module {
    margin-top: 0;
  }

  .dashboard {
    padding: 18px;
  }

  .command-grid,
  .bottom-grid,
  .workbench {
    grid-template-columns: 1fr;
  }

  .surge-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-panel {
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .side-panel {
    grid-template-columns: 1fr;
  }

  .filter-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 780px) {
  .dashboard {
    padding: 16px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .beta-notice {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .topbar-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
  }

  .map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .radar-map {
    height: 360px;
  }

  .ranking-tabs {
    margin-right: -16px;
    margin-left: -16px;
    padding: 0 16px 6px;
    scroll-snap-type: x proximity;
  }

  .ranking-tabs button {
    scroll-snap-align: start;
  }

  .ranking-card-content {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .summary {
    font-size: 0.8rem;
  }

  .city-node-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-score-meter {
    padding: 0 14px 14px;
  }

  .score-block {
    grid-column: 2;
    text-align: left;
  }

  .detail-actions {
    grid-template-columns: 1fr;
  }

  .chart {
    overflow-x: auto;
  }
}

@media (max-width: 520px) {
  .side-panel {
    padding: 14px;
  }

  .filter-stack,
  .queue-grid,
  .beta-legend {
    grid-template-columns: 1fr;
  }

  .topbar-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .topbar-metrics div,
  .queue-grid div {
    padding: 10px;
  }

  .topbar-metrics strong,
  .queue-grid strong {
    font-size: 1rem;
  }

  .command-grid,
  .bottom-grid {
    gap: 12px;
  }

  .radar-map {
    height: 300px;
  }

  .map-canvas {
    width: min(96%, 340px);
  }

  .prefecture-magnifier {
    display: none;
  }

  .pref-node {
    width: 25px;
    height: 25px;
    font-size: 0.52rem;
  }

  .ranking-card-content {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-badge {
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
  }

  .rank-cell {
    justify-items: center;
  }

  .score-block {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
  }

  .score-block strong {
    font-size: 1.62rem;
  }

  .change {
    margin-top: 0;
  }

  .meter-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .metric-shift {
    grid-template-columns: 1fr;
  }

  .score-row {
    grid-template-columns: 92px minmax(0, 1fr) 34px;
    gap: 8px;
  }

  .city-node-grid {
    grid-template-columns: 1fr;
  }

  .okinawa-selector {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 10px;
    overflow: auto;
  }

  .okinawa-map-image {
    width: min(86%, 300px);
    height: min(42%, 190px);
  }

  .okinawa-link-panel {
    justify-content: start;
  }

  .okinawa-link-panel.right p {
    text-align: left;
  }

  .area-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .okinawa-map-caption {
    align-self: center;
    margin: 0;
  }
}



.mobile-filter-panel {
  display: none;
}

.mobile-filter-content[hidden] {
  display: none;
}
.mobile-hero {
  display: none;
}
.mobile-top-button {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 18px));
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(75, 213, 226, 0.62);
  border-radius: 999px;
  background: rgba(5, 12, 16, 0.9);
  color: var(--cyan);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36), 0 0 18px rgba(75, 213, 226, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.mobile-top-button span {
  display: block;
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1;
}

.mobile-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-top-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
/* Mobile-first map priority */
@media (max-width: 640px) {
  .app-shell {
    display: flex;
    flex-direction: column;
  }

  .dashboard {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
  }

  .side-panel {
    order: 2;
  }

  .command-grid {
    display: contents;
  }


.mobile-hero {
    order: 1;
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: var(--shadow);
  }

  .mobile-hero-brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .mobile-hero h2 {
    font-size: clamp(1.38rem, 8vw, 1.86rem);
  }

  .map-panel {
    order: 2;
    padding: 14px;
  }


  .mobile-filter-panel {
    order: 3;
    display: block;
  }

  .mobile-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid rgba(75, 213, 226, 0.5);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(75, 213, 226, 0.16), rgba(255, 255, 255, 0.04));
    color: var(--text);
    box-shadow: var(--shadow);
    font: inherit;
    font-weight: 800;
  }

  .mobile-filter-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(75, 213, 226, 0.42);
    border-radius: 50%;
    color: var(--cyan);
    font-size: 1rem;
    line-height: 1;
  }

  .mobile-filter-content {
    display: grid;
    gap: 10px;
    margin-top: 10px;
    padding: 14px;
    border: 1px solid rgba(75, 213, 226, 0.22);
    border-radius: 8px;
    background: rgba(5, 12, 16, 0.72);
    box-shadow: var(--shadow);
  }

  .mobile-filter-content .filter-stack {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .topbar {
    order: 4;
    margin-bottom: 0;
  }

  .topbar > div:first-child {
    display: none;
  }

  .beta-notice {
    order: 5;
    margin-bottom: 0;
  }

  .command-grid > .kpi-panel {
    order: 6;
  }

  .surge-panel {
    order: 7;
    margin-bottom: 0;
  }

  .ranking-tabs {
    order: 8;
    margin-bottom: 0;
  }

  .workbench {
    order: 9;
  }

  .bottom-grid {
    order: 10;
    margin-top: 0;
  }

  .radar-map {
    height: min(60vh, 330px);
    min-height: 280px;
  }
.mobile-top-button {
    display: flex;
  }
}
/* 2026-06-24 public URL structure */
.public-site {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(75, 213, 226, 0.13), transparent 30%),
    radial-gradient(circle at 82% 22%, rgba(47, 232, 182, 0.08), transparent 28%),
    linear-gradient(135deg, var(--brand-bg) 0%, var(--brand-bg-soft) 50%, #0b0f13 100%);
  color: var(--text-main);
}
.public-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 56px;
}
.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: stretch;
  min-height: 560px;
}
.public-hero-copy,
.public-map-card,
.public-section {
  min-width: 0;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(3, 11, 15, 0.92), rgba(5, 18, 21, 0.86));
  box-shadow: var(--shadow-soft);
  border-radius: 8px;
}
.public-hero-copy {
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}
.public-brand {
  padding: 0;
  background: transparent;
  border: 0;
}
.public-hero h2,
.public-section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.3rem);
  line-height: 1.05;
  letter-spacing: 0;
}
.public-hero p,
.public-section p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.9;
}
.public-actions,
.proposal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.public-map-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.public-map-image {
  width: 100%;
  min-height: 320px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}
.public-region-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.public-region-list a,
.public-region-list span {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-main);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}
.public-region-list a {
  border-color: rgba(47, 232, 182, 0.45);
  color: var(--accent);
}
.public-section {
  margin-top: 22px;
  padding: 24px;
}
.public-section.split {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.route-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.route-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
}
.route-card span {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0;
}
.route-card strong {
  font-size: 1.05rem;
}
.route-card small {
  color: var(--text-muted);
  word-break: break-word;
}
.public-notice {
  margin-top: 22px;
}
.disabled-action,
.disabled-action:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  filter: saturate(0.65);
}
button.detail-button {
  font: inherit;
}
@media (max-width: 980px) {
  .public-shell {
    width: min(760px, calc(100% - 28px));
    padding-top: 24px;
  }
  .public-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .public-section.split {
    align-items: stretch;
    flex-direction: column;
  }
}
@media (max-width: 560px) {
  .public-shell {
    width: calc(100% - 44px);
    max-width: 420px;
  }
  .public-hero-copy,
  .public-map-card,
  .public-section {
    padding: 18px;
  }
  .public-hero h2,
  .public-section h2 {
    font-size: 1.84rem;
  }
  .public-actions,
  .proposal-actions {
    flex-direction: column;
  }
  .public-actions .detail-button,
  .public-section .detail-button,
  .proposal-actions .detail-button {
    width: 100%;
    justify-content: center;
  }
  .route-grid,
  .public-region-list {
    grid-template-columns: 1fr;
  }
  .public-map-image {
    min-height: 240px;
  }
}
/* Mobile text wrapping guard */
@media (max-width: 640px) {
  .mobile-hero h2,
  .public-hero h2,
  .public-section h2 {
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.18;
  }
}
/* Public mobile Japanese wrapping */
@media (max-width: 640px) {
  .public-hero h2,
  .public-section h2,
  .public-hero p,
  .public-section p {
    word-break: break-all;
    overflow-wrap: anywhere;
  }
}
