﻿/* 探迹 / TRAIL ATLAS — 固定种子共享探索地图（本地交互演示） */

:root {
  --bg: #07100d;
  --bg-deep: #050d0b;
  --panel: #0b1915;
  --panel-2: #0f211b;
  --panel-3: #14291f;
  --line: rgba(150, 210, 192, 0.13);
  --line-strong: rgba(150, 210, 192, 0.26);
  --text: #e7f2ed;
  --text-2: #bfd2ca;
  --muted: #7e968d;
  --muted-2: #6b817a;
  --teal: #2fe0c0;
  --teal-2: #17b79f;
  --teal-soft: rgba(47, 224, 192, 0.12);
  --orange: #ff9d4d;
  --orange-soft: rgba(255, 157, 77, 0.13);
  --red: #ff7676;
  --radius: 8px;
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --mobilebar-h: 56px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font-family: inherit; }

button { color: inherit; }

::selection { background: rgba(47, 224, 192, 0.28); color: #fff; }

code { font-family: var(--mono); font-size: 0.94em; }

:focus-visible {
  outline: 2px solid rgba(47, 224, 192, 0.7);
  outline-offset: 1px;
}

/* ---------- 布局骨架 ---------- */

.app {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--bg);
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  min-height: 0;
  min-width: 0;
}

/* ---------- 顶栏 ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  min-height: 54px;
  padding: 9px 14px;
  background: linear-gradient(180deg, #0d1d18, #0a1612);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.brand-mark {
  color: var(--teal);
  font-size: 18px;
  line-height: 1;
  transform: translateY(1px);
}

.brand-name {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.brand-sub {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--muted);
  font-weight: 500;
}

.seed-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  min-width: 0;
}

.seed-label { color: var(--muted); }

.seed-chip code {
  color: #cff3e8;
  letter-spacing: 0.01em;
  font-size: 13px;
}

.chip-sep {
  width: 1px;
  height: 12px;
  background: var(--line-strong);
}

.chip-plain { color: var(--muted); }
.chip-plain span { color: var(--text-2); }

.dims {
  margin-left: auto;
  display: flex;
  gap: 2px;
  padding: 2px;
  background: #091410;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.dim {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  padding: 5px 13px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.dim:hover { color: var(--text); background: rgba(255, 255, 255, 0.035); }

.dim.is-active {
  background: #15332b;
  color: #d9fff5;
  box-shadow: inset 0 0 0 1px rgba(47, 224, 192, 0.32);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 157, 77, 0.3);
  background: rgba(255, 157, 77, 0.08);
  color: #f0c497;
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1.35;
  white-space: nowrap;
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(255, 157, 77, 0.12);
}

.icon-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--panel-3);
  border-color: var(--line-strong);
  color: var(--text);
}

/* ---------- 左侧控制栏 ---------- */

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: linear-gradient(180deg, #0b1915, #08130f);
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}

.panel:last-child { border-bottom: 0; padding-bottom: 2px; }

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #9db4ab;
}

.count {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
  letter-spacing: 0;
}

/* 表单 */

.field { display: block; }

.field-label {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  min-width: 0;
  background: #08120f;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  padding: 6px 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder, textarea::placeholder { color: #566b64; }

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
  border-color: rgba(47, 224, 192, 0.55);
  box-shadow: 0 0 0 2px rgba(47, 224, 192, 0.1);
}

textarea { min-height: 66px; resize: vertical; line-height: 1.5; }

input[type="number"] { font-family: var(--mono); }

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.coord-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.coord-field { display: block; min-width: 0; }

.coord-field span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

/* 按钮 */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0e1e19;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn:hover {
  background: #13271f;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  background: #0c1915;
}

.btn-primary {
  background: linear-gradient(180deg, #35e3c5, #1cc0a8);
  border-color: transparent;
  color: #032019;
  font-weight: 650;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #4deed1, #22cdb4);
  color: #02201a;
}

.btn-accent {
  background: var(--orange-soft);
  border-color: rgba(255, 157, 77, 0.4);
  color: #ffcf9f;
}

.btn-accent:hover {
  background: rgba(255, 157, 77, 0.2);
  border-color: rgba(255, 157, 77, 0.6);
  color: #ffe3c4;
}

.btn-danger {
  color: #ffb0b0;
  border-color: rgba(255, 118, 118, 0.28);
  background: rgba(255, 118, 118, 0.06);
}

.btn-danger:hover {
  background: rgba(255, 118, 118, 0.12);
  border-color: rgba(255, 118, 118, 0.45);
  color: #ffd0d0;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 13px;
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.btn-row > .btn { flex: 1 1 auto; }

.btn-row.compact { gap: 4px; margin-top: 4px; }

.btn-stack { display: grid; gap: 6px; }

.btn.is-active {
  border-color: rgba(255, 157, 77, 0.6);
  background: rgba(255, 157, 77, 0.18);
  color: #ffe0c0;
}

.hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

.hint code { color: #a9c6bb; }

/* 类型筛选 */

.check-list {
  display: grid;
  gap: 1px;
  max-height: 216px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  margin: 0 -2px;
}

.check {
  display: grid;
  grid-template-columns: 13px 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 4px 5px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-2);
  transition: background 0.12s;
}

.check:hover { background: rgba(255, 255, 255, 0.035); }

.check input {
  appearance: none;
  width: 12px;
  height: 12px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #07110e;
  cursor: pointer;
  position: relative;
  transition: background 0.12s, border-color 0.12s;
}

.check input:checked {
  background: var(--teal-2);
  border-color: var(--teal);
}

.check input:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.5px;
  width: 4px;
  height: 7px;
  border: solid #032019;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(42deg);
}

.swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--c, #9aa9a4);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.check-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
}

/* 状态筛选 */

.status-list { display: grid; gap: 3px; }

.status-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--text-2);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}

.status-row:hover { background: rgba(255, 255, 255, 0.045); }

.status-row[aria-pressed="false"] { opacity: 0.42; }

.status-row .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, #9fb2ab);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.status-row .status-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status-row .status-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
}

/* 区域小列表 */

.mini-list { display: grid; gap: 3px; margin-top: 6px; }

.mini-item {
  appearance: none;
  display: grid;
  gap: 1px;
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 2px solid rgba(255, 157, 77, 0.35);
  padding: 4px 7px;
  border-radius: 0 5px 5px 0;
  color: var(--text-2);
  cursor: pointer;
  font-size: 14px;
  min-width: 0;
  transition: background 0.12s;
}

.mini-item:hover { background: rgba(255, 255, 255, 0.04); }

.mini-item .mini-meta {
  font-size: 12px;
  color: var(--muted-2);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-note {
  margin: 4px 0;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

/* ---------- 地图 ---------- */

.map-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #061310;
  isolation: isolate;
}

#map {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#map.is-dragging { cursor: grabbing; }

.map-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  padding: 4px 9px;
  background: rgba(6, 18, 15, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cfe6dd;
  font-size: 12.5px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.map-tag .tag-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  flex: 0 0 auto;
}

.map-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 4;
  background: radial-gradient(ellipse at center, rgba(6, 16, 13, 0.4), rgba(5, 12, 10, 0.82));
}

.map-state[hidden] { display: none; }

.state-card {
  width: min(420px, 100%);
  background: rgba(11, 26, 21, 0.94);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 22px 22px 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

.state-card h2 {
  margin: 12px 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.state-card p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.state-card .state-meta {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #6f8b81;
  margin-top: 10px;
  word-break: break-all;
}

.state-card .state-error {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #e2a58f;
  margin-top: 8px;
  word-break: break-all;
}

.spinner {
  width: 20px;
  height: 20px;
  margin: 0 auto;
  border: 2px solid rgba(47, 224, 192, 0.18);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.state-progress {
  height: 2px;
  margin: 16px auto 0;
  width: 72%;
  background: rgba(47, 224, 192, 0.12);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.state-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  animation: slide 1.4s ease-in-out infinite;
}

@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

.state-icon {
  font-size: 24px;
  color: var(--orange);
  line-height: 1;
}

.map-alert {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 140px);
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 157, 77, 0.35);
  background: rgba(40, 26, 14, 0.86);
  color: #ffd2a6;
  font-size: 12.5px;
  z-index: 3;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dim-note {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(380px, calc(100% - 32px));
  padding: 18px 18px 16px;
  background: rgba(9, 22, 18, 0.95);
  border: 1px dashed rgba(255, 157, 77, 0.36);
  border-radius: 12px;
  text-align: center;
  z-index: 5;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
}

.dim-note h3 {
  margin: 0 0 6px;
  font-size: 16.5px;
  font-weight: 600;
}

.dim-note p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.region-banner {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 24px);
  padding: 5px 6px 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 157, 77, 0.45);
  background: rgba(38, 24, 12, 0.9);
  color: #ffd7b0;
  font-size: 13px;
  z-index: 4;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.region-cancel {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 157, 77, 0.18);
  color: #ffe2c6;
  font-size: 12.5px;
  padding: 3px 9px;
  cursor: pointer;
}

.region-cancel:hover { background: rgba(255, 157, 77, 0.3); }

.map-hud {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  display: grid;
  gap: 5px;
  justify-items: start;
  pointer-events: none;
}

.scalebar {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #d8ece5;
  font-family: var(--mono);
  font-size: 12px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.scale-line {
  display: inline-block;
  height: 6px;
  width: 80px;
  border: 1px solid rgba(230, 255, 248, 0.85);
  border-top: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.coord-readout {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #d9eee7;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(5, 17, 13, 0.72);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.map-tools {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: grid;
  gap: 4px;
}

.tool-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(9, 23, 19, 0.9);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  padding: 0;
  transition: border-color 0.15s, background 0.15s;
}

.tool-btn:hover { border-color: rgba(47, 224, 192, 0.55); background: #10261f; }

.tool-btn-wide { font-size: 16px; }

.out-range {
  position: absolute;
  top: 10px;
  right: 10px;
  max-width: calc(100% - 24px);
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 157, 77, 0.35);
  background: rgba(255, 157, 77, 0.12);
  color: #ffd2a6;
  font-size: 12.5px;
  z-index: 3;
  pointer-events: none;
  backdrop-filter: blur(4px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 右侧详情栏 ---------- */

.rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: linear-gradient(180deg, #0b1915, #08120f);
  border-left: 1px solid var(--line);
  overflow: hidden;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  min-height: 44px;
}

.rail-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #cfe2da;
}

.rail-close { width: 24px; height: 24px; font-size: 16px; }

.rail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  display: grid;
  gap: 16px;
  align-content: start;
}

/* 详情卡 */

.detail { display: grid; gap: 10px; }

.detail-top {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.type-glyph {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 16.5px;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.detail-title-wrap { min-width: 0; }

.detail-title {
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.status-pill[data-status="unknown"] { color: #a9bbb3; background: rgba(159, 178, 171, 0.1); }
.status-pill[data-status="partial"] { color: #ffc071; background: rgba(240, 165, 74, 0.12); }
.status-pill[data-status="done"] { color: #57f0d4; background: rgba(47, 224, 192, 0.12); }

.kv {
  display: grid;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.kv > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.kv > div:last-child { border-bottom: 0; }

.kv dt { color: var(--muted); white-space: nowrap; }

.kv dd {
  margin: 0;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-field { display: block; }

.detail-field > span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.detail-field textarea { min-height: 72px; }

.seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.seg button {
  appearance: none;
  border: 1px solid var(--line);
  background: #091612;
  color: var(--text-2);
  border-radius: 5px;
  font-size: 14px;
  padding: 6px 4px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.seg button:hover { border-color: var(--line-strong); }

.seg button[aria-pressed="true"] {
  border-color: rgba(47, 224, 192, 0.5);
  background: var(--teal-soft);
  color: #bffced;
}

.detail-actions {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.detail-actions .btn { flex: 1 1 auto; }

.detail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted-2);
}

.link-btn {
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover { color: var(--text-2); }

.link-btn.danger { color: #d99595; text-align: left; }

.link-btn.danger:hover { color: #ffb4b4; }

.demo-tag {
  display: inline-block;
  font-size: 12px;
  padding: 0 5px;
  border-radius: 3px;
  border: 1px solid rgba(255, 157, 77, 0.35);
  color: #f0bd8c;
  margin-left: 5px;
  vertical-align: 1px;
}

/* 空详情 */

.detail-empty { display: grid; gap: 10px; padding-top: 2px; }

.detail-empty .empty-title {
  font-size: 15px;
  color: var(--text-2);
  font-weight: 550;
}

.detail-empty .empty-hint {
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.65;
  margin: 0;
}

.legend {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.015);
}

.legend-row {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
}

.legend-row .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
}

.legend-row b { color: var(--text-2); font-weight: 550;}

/* 最近记录 */

.rail-section { display: grid; gap: 6px; }

.rail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rail-section-head h3 {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.09em;
  color: #9db4ab;
  font-weight: 600;
}

.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.recent-list > li { min-width: 0; }

.recent-item {
  width: 100%;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-2);
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  min-width: 0;
}

.recent-item:hover { border-color: var(--line); background: rgba(255, 255, 255, 0.04); }

.recent-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c, #9fb2ab);
}

.recent-main { display: grid; min-width: 0; }

.recent-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.recent-sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-time {
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap;
}

/* ---------- 底部状态栏 ---------- */

.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 30px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  background: #07110e;
  color: #71897f;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-item { overflow: hidden; text-overflow: ellipsis; }
.status-item.muted { color: #5d726a; }
.status-sep { color: #45574f; }

.status-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.foot-link {
  color: #8fd8c8;
  text-decoration: none;
}

.foot-link:hover { text-decoration: underline; text-underline-offset: 2px; }

.foot-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  padding: 2px 7px;
  cursor: pointer;
}

.foot-btn:hover { border-color: var(--line-strong); background: var(--panel-3); }

/* ---------- 底部手机栏 / 遮罩 ---------- */

.mobilebar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--mobilebar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(9, 22, 18, 0.96);
  border-top: 1px solid var(--line-strong);
  backdrop-filter: blur(12px);
  z-index: 60;
}

.mobilebar button {
  appearance: none;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.04em;
}

.mobilebar button.is-active { color: var(--teal); }

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 6, 0.58);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

body.sheet-open .scrim { opacity: 1; pointer-events: auto; }

/* ---------- 弹窗 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(3, 9, 7, 0.72);
  backdrop-filter: blur(4px);
}

.modal[hidden] { display: none; }

.modal-card {
  width: min(580px, 100%);
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
  background: #0b1a16;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.modal-body {
  padding: 4px 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-body h3 {
  margin: 16px 0 6px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--teal);
  font-weight: 600;
}

.modal-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-2);
}

.modal-body ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.modal-body li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

.modal-body code {
  background: rgba(47, 224, 192, 0.09);
  color: #a9f2e2;
  padding: 1px 4px;
  border-radius: 3px;
}

.modal-body a { color: #8fd8c8; }

.status-legend { list-style: none; padding: 0 !important; gap: 6px !important; }

.status-legend li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.status-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
  flex: 0 0 auto;
  transform: translateY(-1px);
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
  flex-wrap: wrap;
}

.modal-foot .btn { flex: 0 1 auto; }

/* ---------- 提示条 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 46px;
  transform: translate(-50%, 8px);
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(8, 24, 19, 0.96);
  border: 1px solid rgba(47, 224, 192, 0.35);
  color: #d7f7ee;
  font-size: 14px;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  z-index: 200;
}

/* ---------- 滚动条 ---------- */

.sidebar-scroll::-webkit-scrollbar,
.rail-scroll::-webkit-scrollbar,
.check-list::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.sidebar-scroll::-webkit-scrollbar-thumb,
.rail-scroll::-webkit-scrollbar-thumb,
.check-list::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(150, 210, 192, 0.16);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.sidebar-scroll:hover::-webkit-scrollbar-thumb,
.rail-scroll:hover::-webkit-scrollbar-thumb {
  background: rgba(150, 210, 192, 0.28);
  background-clip: padding-box;
  border: 2px solid transparent;
}

/* ---------- 桌面折叠详情栏 ---------- */

@media (min-width: 1001px) {
  body.rail-collapsed .workspace {
    grid-template-columns: 280px minmax(0, 1fr) 0;
  }

  body.rail-collapsed .rail { display: none; }
}

/* ---------- 窄屏适配 ---------- */

@media (max-width: 1000px) {
  .app { height: calc(100dvh - var(--mobilebar-h)); }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "seed seed"
      "dims dims"
      "badge badge";
    gap: 7px 10px;
    padding: 8px 12px 9px;
    min-height: 0;
  }

  .brand { grid-area: brand; }
  .seed-chip { grid-area: seed; justify-self: start; max-width: 100%; }
  .dims {
    grid-area: dims;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dim { padding: 6px 4px; }
  .topbar-right {
    grid-area: badge;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .demo-badge {
    white-space: normal;
    font-size: 12px;
    border-radius: 6px;
    padding: 3px 8px;
    line-height: 1.4;
  }
  #railToggle { grid-area: toggle; justify-self: end; align-self: center; display: none; }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  .sidebar,
  .rail {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(var(--mobilebar-h) + env(safe-area-inset-bottom) + 8px);
    top: auto;
    height: min(72dvh, 560px);
    max-height: calc(100dvh - 120px);
    z-index: 50;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    transform: translateY(calc(100% + 90px));
    transition: transform 0.24s cubic-bezier(0.32, 0.72, 0.3, 1);
    overflow: hidden;
    background: #0b1a16;
  }

  .sidebar { border-right: 1px solid var(--line-strong); }
  .rail { border-left: 1px solid var(--line-strong); }

  body[data-sheet="controls"] .sidebar,
  body[data-sheet="detail"] .rail,
  body[data-sheet="recent"] .rail {
    transform: translateY(0);
  }

  .sidebar-scroll { padding: 12px 14px 18px; }
  .rail-scroll { padding: 12px 14px 18px; }

  .mobilebar { display: flex; }

  .statusbar {
    height: 22px;
    min-height: 22px;
    padding: 0 10px;
    font-size: 12px;
  }

  .status-left { display: none; }
  .status-right { width: 100%; justify-content: space-between; }

  .map-hud { bottom: calc(var(--mobilebar-h) + env(safe-area-inset-bottom) + 8px); }
  .map-tools { bottom: calc(var(--mobilebar-h) + env(safe-area-inset-bottom) + 8px); }

  .map-tag {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
  }

  .map-hud { left: 8px; }
  .map-tools { right: 8px; }

  .out-range {
    top: auto;
    bottom: calc(var(--mobilebar-h) + env(safe-area-inset-bottom) + 56px);
    right: 8px;
    font-size: 12px;
    white-space: normal;
    max-width: 190px;
    text-align: right;
  }

  .region-banner {
    top: 8px;
    max-width: calc(100% - 16px);
    font-size: 12.5px;
    white-space: normal;
  }

  .map-alert { display: none; }

  .toast { bottom: calc(var(--mobilebar-h) + env(safe-area-inset-bottom) + 18px); }

  .modal { padding: 10px; }
  .modal-card { max-height: calc(100dvh - 20px); }
  .modal-foot .btn { flex: 1 1 auto; }
}

@media (max-width: 380px) {
  .brand-sub { display: none; }
  .seed-chip code { font-size: 12px; }
  .dim { font-size: 14px; }
}

/* 减少动效偏好 */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ---------- 可读性基线：正文 16px，控件 14px+，次要信息 12–13px ---------- */

body { font-size: 16px; line-height: 1.55; }

.panel-title { font-size: 14px; letter-spacing: 0.06em; }
.field-label { font-size: 13px; }
.coord-field span { font-size: 12.5px; }
.dim { font-size: 15px; }
.demo-badge { font-size: 13px; }
.btn-ghost { font-size: 14px; }
.mini-item { font-size: 14px; }
.region-cancel { font-size: 13px; }
.foot-btn,
.foot-link { font-size: 12.5px; }
.icon-btn svg { display: block; }
.detail-foot { justify-content: flex-end; }


/* ---------- 类型图标对齐 ---------- */

.check { grid-template-columns: 13px 20px minmax(0, 1fr) auto; }
.check-icon { display: block; width: 20px; height: 20px; }
.type-glyph-icon { display: block; width: 30px; height: 30px; }
.icon-fallback {
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- 重叠分组与手机详情关闭 ---------- */

.cluster-pager {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.pager-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #091612;
  color: var(--text-2);
  font-size: 13px;
  padding: 6px 9px;
  min-height: 34px;
  cursor: pointer;
}

.pager-btn:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--text);
}

.pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.pager-count {
  text-align: center;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-2);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

@media (max-width: 1000px) {
  .rail-close { width: 40px; height: 40px; font-size: 20px; }
  .pager-btn { min-height: 40px; }
}

/* ---------- 部分搜过：必填物资 ---------- */

.field-error {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: #ff9c9c;
}

.recent-loot {
  font-size: 12px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* World queries */
.query-input,.query-search input,.slime-form input,.slime-form select {width:100%;min-width:0;padding:10px 11px;border:1px solid #234438;border-radius:8px;background:#081510;color:#d9eae3;font:inherit;font-size:14px;box-sizing:border-box}
.query-input:focus,.query-search input:focus,.slime-form input:focus,.slime-form select:focus {outline:2px solid #25c7a5;outline-offset:2px}
.query-search {display:flex;gap:6px}.query-search input {flex:1}.query-search .btn {width:auto;flex:none;padding:8px}
.biome-options {display:flex;flex-wrap:wrap;gap:7px}.biome-chip {border:1px solid #2e6856;color:#c0f5df;background:#143429;border-radius:8px;padding:8px 10px;font:inherit;font-size:14px;cursor:pointer}
.biome-chip:hover,.query-hit:hover {border-color:#2fe0c0;background:#163e31}
.query-results {display:grid;gap:7px;max-height:310px;overflow:auto;margin-top:9px}
.query-hit {display:grid;gap:4px;text-align:left;width:100%;padding:10px;border:1px solid #264739;background:#0b2118;color:#e2efe8;border-radius:8px;cursor:pointer;font:inherit;font-size:14px}
.query-hit code {color:#8ae0c4;font-size:13px}.query-hit span {font-size:13px;color:#9bb4a7}
.slime-switch {display:flex;align-items:center;gap:7px;font-size:14px;cursor:pointer;margin-bottom:12px}.slime-switch input{accent-color:#77e681;width:17px;height:17px}
.slime-form {display:grid;grid-template-columns:1fr 1fr;gap:8px}.slime-form select{grid-column:1/-1;appearance:auto}.slime-form label {display:flex;align-items:center;gap:6px;color:#a9bfb4;font-size:14px}.slime-form button{grid-column:1/-1}
.slime-result {display:grid;gap:7px;border:1px solid #3c6551;border-radius:9px;padding:11px;margin-bottom:10px;font-size:14px}.slime-result strong{color:#efd3a8}.slime-result .positive{color:#99ef98}.slime-result span{color:#a6bcae;font-size:13px}
.zoom-hint {position:absolute;z-index:3;top:54px;left:16px;max-width:calc(100% - 32px);padding:7px 11px;background:#382e0fef;border:1px solid #967a30;border-radius:8px;color:#f4de9b;font-size:13px;pointer-events:none}
#featureCoverage {color:#b8b695}#typeSearch{margin-bottom:5px}#biomeMessage{min-height:20px}
@media(max-width:1000px){.query-results{max-height:240px}.query-hit{min-height:64px}.biome-chip{min-height:40px}.slime-form input,.query-search input{font-size:16px}.zoom-hint{top:54px;left:10px;font-size:12px}}

.biome-picker{position:fixed;z-index:85;display:flex;flex-direction:column;max-height:80vh;border:1px solid #345b4e;border-radius:14px;background:#0d211a;box-shadow:0 16px 60px #0009;overflow:hidden;color:#e1f0e8}
.biome-picker-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid #26483b;cursor:grab;touch-action:none;user-select:none}.biome-picker-header:active{cursor:grabbing}.biome-picker-header h2{margin:0;font-size:17px}.biome-picker-header button{width:40px;height:40px;font-size:22px;flex:none}
.biome-picker-tabs{display:flex;padding:10px 14px 0;gap:8px}.biome-picker-tabs button{border:0;border-radius:8px;background:transparent;color:#a6bfb1;padding:8px 14px;font:inherit;cursor:pointer}.biome-picker-tabs [aria-selected=true]{background:#20503d;color:#bcffdf}
.biome-picker-tools{display:grid;gap:10px;padding:12px 16px;border-bottom:1px solid #26483b}.biome-picker-tools input,.biome-picker-tools select{box-sizing:border-box;width:100%;min-width:0;border:1px solid #355e4b;border-radius:8px;background:#091a13;color:#dbeee3;padding:10px 12px;font:inherit;font-size:15px}.biome-picker-tools label{display:flex;gap:12px;align-items:center;color:#a6bfb1;font-size:14px}.biome-picker-tools select{width:auto;flex:1;appearance:auto}
.biome-picker-list{overflow:auto;padding:6px 10px 14px;min-height:160px;overscroll-behavior:contain}.biome-group-title{display:flex;justify-content:space-between;gap:8px;padding:16px 10px 8px;color:#8aa797;font-size:14px}
.biome-choice{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border:0;border-radius:8px;background:transparent;color:#e2efe6;font:inherit;font-size:16px;cursor:pointer;text-align:left;min-height:46px}.biome-choice:hover{background:#183b2b}.biome-choice.is-selected{background:#24523c;color:#c5ffe1}.biome-swatch{width:18px;height:18px;background:var(--biome-color);border:1px solid #ffffff60;flex:none}.biome-tick{margin-left:auto;color:#62e6b4}.biome-picker-open{text-align:left;min-height:42px}.ship-locate{margin-top:8px;width:100%}.manual-point summary{cursor:pointer;padding:10px 0;font-size:14px}
@media(max-width:1000px){.biome-picker{max-height:80dvh}.biome-picker-tools input{font-size:16px}.biome-picker-list{min-height:120px}}

#actualMap{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;display:block}
#map{position:relative;z-index:1}
.map-layer-choices{display:flex;gap:5px;padding:4px;border:1px solid #244839;border-radius:9px;background:#081a12}.map-layer-choices button{flex:1;min-height:40px;border:1px solid transparent;border-radius:6px;color:#9ab4a6;background:transparent;font:inherit;font-size:15px;cursor:pointer}.map-layer-choices button.is-active{border-color:#27795c;background:#173f2d;color:#c2ffdf}.map-layer-choices button:hover{color:#d9f6e6}.map-source-row{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:13px;font-size:14px}.map-source-row a{color:#98d5bc}.actual-map-status:empty{display:none}
/* Player accounts */
.account-btn{min-height:40px;padding:8px 14px;white-space:nowrap}
.auth-overlay{position:fixed;inset:0;z-index:5000;display:flex;align-items:center;justify-content:center;padding:20px;background:#020a08c9;backdrop-filter:blur(5px)}
.auth-card{width:420px;max-width:100%;max-height:calc(100dvh - 40px);overflow:auto;padding:26px;border:1px solid #34584a;border-radius:20px;background:#0b1b16;box-shadow:0 24px 80px #0009}
.auth-card header{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:16px}.auth-card h2{font-size:26px;margin:6px 0 0;color:#e0f3eb}.auth-eyebrow{font-size:14px;color:#63cbb1}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:5px;border:1px solid #294538;border-radius:12px;margin:20px 0}
.auth-tabs button{border:0;border-radius:8px;background:transparent;color:#a6bfb4;font:inherit;font-size:16px;min-height:42px;cursor:pointer}.auth-tabs button[aria-selected=true]{background:#164b3c;color:#d0fff0}
.auth-card .field{display:flex;flex-direction:column;gap:8px;margin-top:16px}.auth-card input{width:100%;min-height:46px;font-size:16px}.auth-card .btn{width:100%;min-height:46px;font-size:16px}.auth-message{color:#ffb3a8;font-size:14px;line-height:1.6;min-height:22px;margin:16px 0}.auth-account-name{font-size:22px;color:#d0fff0;overflow-wrap:anywhere}.auth-open{overflow:hidden}
/* In-page chat with the original game server. */
.server-chat{position:absolute;right:76px;bottom:16px;z-index:30;width:min(420px,calc(100% - 100px));border:1px solid #34584a;border-radius:14px;background:#0b1b16f5;box-shadow:0 8px 30px #0005;overflow:hidden}
.server-chat-toggle{display:flex;justify-content:space-between;gap:24px;width:100%;min-height:42px;padding:10px 14px;background:transparent;border:0;color:#c9eee0;font:inherit;font-size:16px;font-weight:600;cursor:pointer;text-align:left}.server-chat-toggle span{font-size:20px;line-height:18px}
.server-chat:has(#serverChatBody[hidden]){width:auto;min-width:144px}
.server-chat-status{font-size:12px;color:#91b8a6;padding:0 14px;margin:0 0 8px}.server-chat-log{height:160px;max-height:25dvh;overflow:auto;overscroll-behavior:contain;padding:0 14px;scrollbar-width:thin;font-size:14px;line-height:1.7}
.server-chat-log p{margin:5px 0;overflow-wrap:anywhere;white-space:pre-wrap}.server-chat-log strong{color:#65d6b4;font-weight:600}.server-chat-empty{color:#8aa99a}
.server-chat-form{border-top:1px solid #294b3d;padding:10px 12px}.server-chat-identity{display:block;font-size:12px;color:#a1c2b0;margin-bottom:8px;overflow-wrap:anywhere}.server-chat-compose{display:flex;gap:8px}.server-chat-compose input{min-width:0;flex:1;min-height:42px;font-size:16px}.server-chat-compose .btn{flex-shrink:0;min-height:42px;padding:8px 14px;font-size:16px}.server-chat-result{margin:6px 0 0;min-height:18px;color:#c0d9cc;font-size:12px;line-height:1.5}
@media(max-width:1000px){.server-chat{right:12px;bottom:calc(var(--mobilebar-h) + env(safe-area-inset-bottom) + 12px);width:calc(100% - 24px)}.server-chat:has(#serverChatBody[hidden]){right:64px}.server-chat-log{height:136px;max-height:22dvh}}
