/* ============================================================
   HBU 奶蛙目击情报站 —— 共用样式
   视觉语言：奶油底 / 贴纸描边 / 圆角卡片 / 一点红
   ============================================================ */

:root {
  --cream: #fff9dc;
  --paper: #fffdf6;
  --ink: #33322e;
  --ink-2: #7d786c;
  --ink-3: #a9a396;
  --line: #e9e0c3;
  --red: #e2504c;
  --red-soft: #fdecea;
  --yellow: #ffc917;
  --blue: #3f7fd0;
  --green: #6fbf5f;
  --radius: 16px;
  --shell: 720px;
  --tab-h: 62px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--cream);
  color: var(--ink);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 18px);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------------- 顶部世界公告 ------------- */
.world {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 253, 246, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.world-inner {
  max-width: var(--shell); margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px; font-size: 12.5px; color: var(--ink-2);
}

.world-brand { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; color: var(--ink); }

.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 0 rgba(111,191,95,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 6px rgba(111,191,95,0); }
  100% { box-shadow: 0 0 0 0 rgba(111,191,95,0); }
}

.world-ticker { flex: 1; overflow: hidden; position: relative; height: 20px; }
.world-track { display: inline-flex; gap: 26px; white-space: nowrap; animation: marquee 30s linear infinite; }
.world-ticker:hover .world-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.world-msg b { color: var(--red); font-weight: 600; margin-right: 6px; }
.world-empty { color: var(--ink-3); }

/* ---------------- 主体 ---------------- */
.shell { max-width: var(--shell); margin: 0 auto; padding: 14px; }

.hero {
  position: relative; overflow: hidden;
  border-radius: 20px; border: 1.5px solid var(--line);
  background: linear-gradient(160deg, #fffdf6 0%, #fff4c9 62%, #ffe9a8 100%);
  padding: 24px 20px 20px;
  margin-bottom: 14px;
}

.hero-tag {
  display: inline-block; font-size: 11.5px; letter-spacing: 1.5px;
  background: var(--ink); color: #fff8d8; padding: 2px 9px; border-radius: 6px;
  transform: rotate(-3deg); margin-bottom: 10px;
}

.hero h1 { margin: 0; font-size: 30px; line-height: 1.25; letter-spacing: -0.5px; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }

.hero-frog {
  position: absolute; right: -6px; bottom: -10px; width: 132px; opacity: .96;
  transform: rotate(6deg);
}

/* ---------------- 分区与卡片 ---------------- */
.section { margin-bottom: 14px; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 2px 8px;
}
.section-head h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 7px; }
.more { font-size: 13px; color: var(--ink-2); }
.more:hover { color: var(--red); }

.badge-live {
  font-size: 10.5px; font-weight: 700; letter-spacing: .6px;
  color: #fff; background: var(--red); border-radius: 5px; padding: 1px 6px;
}

.card {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 16px;
}

/* ---------------- 目击列表 ---------------- */
.rows { display: flex; flex-direction: column; gap: 10px; }

.row {
  display: flex; gap: 12px; align-items: center;
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 10px 12px;
  transition: transform .12s ease, border-color .12s ease;
}
.row:hover { transform: translateY(-1px); border-color: #d8cba4; }

.row-thumb {
  width: 52px; height: 52px; border-radius: 10px; flex: 0 0 auto;
  object-fit: cover; background: #f2ecd9; border: 1px solid var(--line);
}

.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.row-sub { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--ink-2);
  border: 1px solid var(--line); background: #fffdf5;
  border-radius: 999px; padding: 1px 8px;
}

/* ---------------- 照片网格 ---------------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shot {
  position: relative; aspect-ratio: 1; overflow: hidden;
  border-radius: 12px; border: 1.5px solid var(--line); background: #f2ecd9;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot-badge {
  position: absolute; left: 5px; bottom: 5px;
  font-size: 10px; background: rgba(51,50,46,.82); color: #fff;
  padding: 0 5px; border-radius: 4px;
}

/* ---------------- 统计 ---------------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 14px;
}
.stat b { display: block; font-size: 26px; line-height: 1.15; color: var(--ink); }
.stat span { font-size: 12.5px; color: var(--ink-2); }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.bar-row span:first-child { width: 74px; color: var(--ink-2); flex: 0 0 auto; }
.bar { flex: 1; height: 9px; background: #f0ead4; border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--yellow); border-radius: 999px; }
.bar-row b { width: 26px; text-align: right; font-size: 12.5px; color: var(--ink-2); }

/* ---------------- 地图 ---------------- */
.map-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1.5px solid var(--line); background: #f4f0df;
}
.map-svg { display: block; width: 100%; height: auto; }
.pin { cursor: pointer; }
.pin:hover circle { filter: brightness(1.06); }

.map-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #5c4a06; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1.5px solid var(--ink); border-radius: 11px;
  padding: 10px 18px; font-size: 14.5px; font-weight: 600;
  cursor: pointer; background: #fff; color: var(--ink);
  font-family: inherit;
}
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: #d34541; }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); font-weight: 500; }
.btn-block { width: 100%; }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }

input[type="text"], input[type="datetime-local"], textarea, select {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 12px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--yellow); }
textarea { resize: vertical; min-height: 84px; }

.hint { font-size: 12px; color: var(--ink-3); margin: 5px 0 0; }

.steps { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 12.5px; color: var(--ink-3); }
.step { display: flex; align-items: center; gap: 5px; }
.step .n {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 11px; background: #fff;
}
.step.on { color: var(--ink); font-weight: 600; }
.step.on .n { background: var(--yellow); border-color: #d8a800; }
.step-line { flex: 1; height: 1.5px; background: var(--line); }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; background: rgba(255,253,246,.96);
  backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 7px; font-size: 10.5px; color: var(--ink-3);
}
.tabbar svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.tabbar a.on { color: var(--red); font-weight: 600; }

/* ---------------- 其它 ---------------- */
.empty { color: var(--ink-3); font-size: 13.5px; text-align: center; padding: 22px 0; }

.footer { text-align: center; font-size: 12.5px; color: var(--ink-3); padding: 18px 0 6px; line-height: 1.9; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 22px);
  transform: translateX(-50%) translateY(8px);
  background: var(--ink); color: #fff; font-size: 13px;
  padding: 9px 16px; border-radius: 10px; opacity: 0;
  pointer-events: none; transition: all .22s ease; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 760px) {
  .hero h1 { font-size: 34px; }
  .hero-frog { width: 160px; right: 8px; }
  .shots { grid-template-columns: repeat(4, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
}
