/* ============================================================
   O!YO! 鸥友 · 设计系统 v2 "游戏语法"
   UI 宪法:
     1. 每屏最多三组信息(主角 · 一句话 · 一个动作)
     2. 图先字后,字只做确认
     3. 没有导航栏——海鸥是唯一的常驻按钮
     4. 纯白 / 纯黑 + 玻璃,颜色只属于海鸥
   ============================================================ */

:root {
  /* ---------- 配色宪法(创始人 2026-07-16 定死)----------
     全站只有两种颜色语言:
       1. 黑 / 白 / 灰 —— 一切不重要的东西
       2. 海鸥嘴的橙黄 —— 只给重点(你的位置、你的东西、已收藏、待办)
     这个橙是从吉祥物 SVG 里**量出来**的,不是拍脑袋:嘴部主色簇在
     #ECAA3D / #ECA93C / #EBAA3E(rgb 236,170,61)。旧值 #FF8A00 是老 VI 的橙,
     吉祥物身上根本没有,已废。
     紫 #4B2E83、粉 #d6558a、绿 #1a9c6b、红 #d43c2f 一律不再用——海鸥身上没有。 */
  --gull-orange: #ECAA3D;        /* 海鸥嘴:唯一的重点色 */
  --gull-beak-ink: #b5751e;      /* 嘴的暗部(同色系,只在需要更深一档时用) */
  --radius-l: 28px;
  --radius-m: 20px;
  --radius-s: 14px;
  --shell-w: 470px;
  --dur: .22s;
  --ease: cubic-bezier(.32, .72, .32, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);   /* 带回弹的弹簧曲线 */
}

html[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f6f6f7;
  --ink: #0c0c0d;
  --ink-2: rgba(12, 12, 13, .58);
  --ink-3: rgba(12, 12, 13, .36);
  --line: rgba(12, 12, 13, .10);
  --line-soft: rgba(12, 12, 13, .06);
  --glass-bg: rgba(255, 255, 255, .58);
  --glass-bg-strong: rgba(255, 255, 255, .80);
  --glass-brd: rgba(12, 12, 13, .10);
  --glass-shadow: 0 10px 34px rgba(0, 0, 0, .07);
  --blob-a: rgba(12, 12, 13, .045);
  --blob-b: rgba(12, 12, 13, .03);
  --district: #ffffff;
  --river: rgba(12, 12, 13, .07);
  --inverse: #ffffff;
}

html[data-theme="dark"] {
  --bg: #000000;
  --bg-soft: #0d0d0f;
  --ink: #f6f6f4;
  --ink-2: rgba(246, 246, 244, .60);
  --ink-3: rgba(246, 246, 244, .38);
  --line: rgba(246, 246, 244, .14);
  --line-soft: rgba(246, 246, 244, .08);
  --glass-bg: rgba(18, 18, 20, .55);
  --glass-bg-strong: rgba(18, 18, 20, .82);
  --glass-brd: rgba(246, 246, 244, .13);
  --glass-shadow: 0 12px 36px rgba(0, 0, 0, .55);
  --blob-a: rgba(246, 246, 244, .05);
  --blob-b: rgba(246, 246, 244, .03);
  --district: #101012;
  --river: rgba(246, 246, 244, .09);
  --inverse: #0c0c0d;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  transition: background var(--dur), color var(--dur);
  overflow-x: hidden;
}

/* ---------- 手机壳 ---------- */
#shell {
  position: relative;
  max-width: var(--shell-w);
  margin: 0 auto;
  min-height: 100vh; min-height: 100dvh;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  overflow: clip;
  /* 这里千万别加 transform / filter / will-change(踩过大坑):
     带 transform 的元素会变成 fixed 子元素的"包含块",于是海鸥浮钮的 bottom:20px
     不再是"离屏幕底 20px",而是"离整页底 20px"——长页面(tips/目录/我)里浮钮被
     踢到页面最底下,用户得一路滑到底才够得着,等于导航废了。
     浮钮要贴手机壳右缘,用下面 .gull-fab 的 right: max(...) 视口算式解决,不靠 transform。 */
}
@media (max-width: 500px) { #shell { border: none; } }

#shell::before, #shell::after {
  content: ""; position: absolute; border-radius: 50%;
  pointer-events: none; z-index: 0;
}
#shell::before { width: 380px; height: 380px; top: -120px; right: -140px; background: radial-gradient(closest-side, var(--blob-a), transparent 70%); }
#shell::after  { width: 460px; height: 460px; bottom: -160px; left: -180px; background: radial-gradient(closest-side, var(--blob-b), transparent 70%); }

#view { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- 文字 ---------- */
h1 { font-size: 27px; font-weight: 800; letter-spacing: .01em; line-height: 1.3; }
h2 { font-size: 20px; font-weight: 800; }
.muted  { color: var(--ink-2); }
.muted3 { color: var(--ink-3); }
.small  { font-size: 12.5px; }
.tiny   { font-size: 11px; }
.wordmark { font-weight: 900; letter-spacing: .02em; font-size: 19px; user-select: none; }

/* ---------- 玻璃 & 按钮 ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(1.05);
  backdrop-filter: blur(20px) saturate(1.05);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font: inherit; color: var(--ink);
  font-weight: 700; border-radius: 999px; padding: 16px 26px;
  transition: transform .3s var(--spring), opacity var(--dur);
  user-select: none;
}
.btn:active { transform: scale(.93); }
.btn-ink { background: var(--ink); color: var(--inverse); }
.btn-glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-brd); box-shadow: var(--glass-shadow);
}
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn[disabled] { opacity: .35; pointer-events: none; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--glass-brd); background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  color: var(--ink); cursor: pointer; transition: transform var(--dur) var(--ease);
  flex: none;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 18px; height: 18px; }

h3 svg { width: 18px; height: 18px; flex: none; }

/* ---------- 开屏:三个元素,完 ---------- */
.splash {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 40px 30px; gap: 0;
}
.splash .mascot-wrap { animation: float 3.4s ease-in-out infinite; }
.splash h1 { margin-top: 20px; font-size: 40px; letter-spacing: .05em; }
.splash .one-line { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.splash .cta { margin-top: 40px; width: 100%; max-width: 280px; }
.splash .ghost { margin-top: 18px; font-size: 13px; color: var(--ink-3); background: none; border: none; cursor: pointer; font-family: inherit; text-decoration: underline dotted; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- 答题 = 和海鸥对话 ---------- */
.quiz {
  flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
  padding: 18px 20px 26px;
}
.quiz-top { display: flex; align-items: center; gap: 12px; }
.dots { display: flex; gap: 5px; flex: 1; justify-content: center; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background var(--dur), transform var(--dur); }
.dot.on { background: var(--ink); transform: scale(1.25); }

.npc { display: flex; align-items: flex-end; gap: 12px; margin: 26px 0 8px; }
.npc .say {
  position: relative; border-radius: 22px; padding: 16px 18px;
  font-size: 18.5px; font-weight: 750; line-height: 1.45; max-width: 78%;
}
.npc .say::before {
  content: ""; position: absolute; left: -5px; bottom: 14px;
  width: 11px; height: 11px;
  background: var(--glass-bg);
  border-left: 1px solid var(--glass-brd); border-bottom: 1px solid var(--glass-brd);
  transform: rotate(45deg); border-radius: 2px;
}

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 20px; }
.tile {
  border-radius: var(--radius-m); padding: 18px 10px 15px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-brd); box-shadow: var(--glass-shadow);
  cursor: pointer; font-family: inherit; color: var(--ink);
  font-size: 14.5px; font-weight: 700;
  transition: transform .3s var(--spring), background var(--dur), color var(--dur);
  animation: tileIn .5s var(--spring) both;
}
.tile:active { transform: scale(.92); }
.tile.picked { animation: pickPop .38s var(--spring); }
.tiles .tile:nth-child(1) { animation-delay: .02s; }
.tiles .tile:nth-child(2) { animation-delay: .06s; }
.tiles .tile:nth-child(3) { animation-delay: .10s; }
.tiles .tile:nth-child(4) { animation-delay: .14s; }
.tiles .tile:nth-child(5) { animation-delay: .18s; }
.tiles .tile:nth-child(6) { animation-delay: .22s; }
.tiles .tile:nth-child(7) { animation-delay: .26s; }
.tiles .tile:nth-child(8) { animation-delay: .30s; }
.tiles .tile:nth-child(9) { animation-delay: .34s; }
.tile .em { font-size: 38px; line-height: 1.1; }
.tile.no-em { padding: 22px 10px; font-size: 16px; }
.tile.picked { background: var(--ink); color: var(--inverse); border-color: var(--ink); }
.quiz-foot { display: flex; gap: 10px; margin-top: auto; padding-top: 22px; }

/* ---------- 归档结果 ---------- */
.result { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.result .say-line { margin-top: 18px; font-size: 19px; font-weight: 800; }
.result .sub-line { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.result .btn { margin-top: 34px; }

/* ---------- Tips 大卡:一屏一条,往上划 ---------- */
.deck {
  height: 100vh; height: 100dvh; overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  /* 牌堆只许上下滑,锁掉左右误滑;别把滚动传导给外层 */
  touch-action: pan-y; overscroll-behavior: contain;
}
.deck::-webkit-scrollbar { display: none; }
.deck-card {
  height: 100vh; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 36px; position: relative;
}
.deck-card .cat { font-size: 12px; font-weight: 800; letter-spacing: .35em; color: var(--ink-3); }
.deck-card .art { font-size: 104px; line-height: 1.15; margin: 26px 0 22px; filter: drop-shadow(0 14px 24px rgba(0,0,0,.10)); }
.deck-card .t { font-size: 25px; font-weight: 800; line-height: 1.35; }
.deck-card .d { margin-top: 14px; font-size: 15px; color: var(--ink-2); max-width: 300px; }
.deck-card .idx {
  position: absolute; top: 22px; left: 0; right: 0; text-align: center;
  font-size: 12px; font-weight: 800; color: var(--ink-3); letter-spacing: .1em;
}
.deck-card .tip-star {
  margin-top: 26px; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-bg); border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: var(--glass-shadow); cursor: pointer; color: var(--ink-3);
  transition: color var(--dur), transform var(--dur);
}
.deck-card .tip-star.on { color: var(--gull-orange); transform: scale(1.08); }
.deck-card .tip-star svg { width: 22px; height: 22px; }
.deck-hint {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--ink-3); letter-spacing: .2em; pointer-events: none;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -5px); } }
.deck-end .btn { margin-top: 30px; }
.deck-end .ghost { margin-top: 16px; font-size: 13px; color: var(--ink-3); background: none; border: none; cursor: pointer; font-family: inherit; text-decoration: underline dotted; }

/* ---------- 地图 = 家 ---------- */
.map-home {
  position: relative; height: 100vh; height: 100dvh; overflow: hidden;
  /* 地图页锁死页面滚动:只留地图自己的拖拽/缩放,杜绝误触把整页拖飞 */
  touch-action: none; overscroll-behavior: none;
  /* 手绘地图纸的网点纹理 */
  background-image: radial-gradient(var(--line-soft) 1px, transparent 1px);
  background-size: 22px 22px;
}
.map-home svg { width: 100%; height: 100%; display: block; }
.district-blob { fill: none; pointer-events: all;   /* fill:none 会让圈内点不动,必须显式开 */
  stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 3 4; opacity: .5;
  cursor: pointer; transition: opacity var(--dur); }
.district-g:active .district-blob { opacity: .75; }
.district-label { font-size: 12px; font-weight: 800; fill: var(--ink); pointer-events: none; }
.district-label-en { font-size: 8px; font-weight: 600; fill: var(--ink-3); letter-spacing: .04em; pointer-events: none; text-transform: uppercase; }
.pin-bubble { fill: var(--ink); }
.pin-count { fill: var(--inverse); font-size: 10.5px; font-weight: 800; pointer-events: none; }
.pin-mine { fill: var(--gull-orange); }
.home-halo { fill: none; stroke: var(--gull-orange); stroke-width: 2; stroke-dasharray: 5 6; opacity: .85; }
.river { fill: none; stroke: var(--river); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.river-label { font-size: 8.5px; fill: var(--ink-3); letter-spacing: .18em; }

.map-chip {
  position: absolute; top: 16px; left: 16px; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
}
.map-chip .demo { font-weight: 600; color: var(--ink-3); font-size: 11px; }

/* 时段条:海鸥主管按白天/夜晚/深夜说不同的话。
   配色守宪法——只用黑白灰 + 嘴喙橙,深夜才亮橙(那是唯一需要你多看一眼的时候)。 */
.band-strip {
  position: absolute; top: 58px; left: 16px; right: 16px; z-index: 5;
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; border-radius: 14px;
}
.band-strip .band-gull { flex: 0 0 auto; display: flex; }
.band-strip .band-main { min-width: 0; }
.band-strip .band-say {
  font-size: 12px; font-weight: 700; line-height: 1.35; color: var(--ink);
}
.band-strip .band-clock {
  font-size: 10.5px; font-weight: 600; color: var(--ink-3); margin-top: 2px;
  font-variant-numeric: tabular-nums;      /* 时钟跳字时宽度不抖 */
}
/* 深夜:左侧一道嘴喙橙,把"收着点"这件事标出来,但不做成刺眼的警告条 */
.band-strip.band-night { border-left: 3px solid var(--gull-orange); }
.band-strip.band-night .band-clock { color: var(--gull-beak-ink); }

/* 地图手势层 */
.map-home svg { touch-action: none; cursor: grab; }
.map-home svg:active { cursor: grabbing; }

/* 缩放按钮(右侧竖排) */
.zoom-ctl {
  position: absolute; right: 14px; top: 50%; transform: translateY(-80%);
  display: flex; flex-direction: column; gap: 8px; z-index: 5;
}
/* 回到全城:贴纸图标居中,不吃 +/− 的字号 */
.zoom-ctl .zoom-home { display: flex; align-items: center; justify-content: center; padding: 0; }
.zoom-ctl .zoom-home svg { width: 22px; height: 22px; display: block; }
.zoom-ctl button {
  width: 42px; height: 42px; border-radius: 14px;
  border: 1px solid var(--glass-brd); background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: var(--glass-shadow);
  font: inherit; font-size: 19px; font-weight: 800; color: var(--ink);
  cursor: pointer; transition: transform var(--dur) var(--spring), opacity var(--dur);
}
.zoom-ctl button:active { transform: scale(.9); }
.zoom-ctl button[disabled] { opacity: .3; pointer-events: none; }

/* 筛选栏(底部居左,悬于地图上) */
.map-filter {
  position: absolute; left: 14px; bottom: 18px; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 116px);
  padding: 8px; border-radius: 18px;
}
.map-filter .chip { padding: 6px 11px; font-size: 12px; background: var(--bg); }
.map-filter .chip.on { background: var(--ink); }

/* 商品缩略图钉:坑(踩过)——只要给"含 <image> 的 <g>"套 transform 缩放动画(popIn),
   Blink 就把整组画丢了(fill-box / view-box 都试过,都不显示)。微信内置浏览器同是 Blink,
   真机也会中招。所以这里不动 transform,只做淡入——照样有入场感,且稳。 */
.pin-g.listing { animation: fadeInPin .35s ease both; }
@keyframes fadeInPin { from { opacity: 0; } to { opacity: 1; } }

/* 放大后的分类需求钉(全黑钉 + 白图标,靠形状区分) */
.pin-g.cat { cursor: pointer; }
/* 图钉 = 白色贴纸圆 + 墨线圈 + 里面放真·tips 图标(举手/碰杯/纸箱)。
   贴纸底固定白、圈固定墨色(不跟主题反色)——因为 icons.js 的图形就是"墨线画在白底上"的,
   跟着主题反色会让图标在暗色地图上糊成一团。这跟 tips 里那些小 logo 是同一套语言。 */
.cat-pin { fill: #fff; stroke: #17171a; stroke-width: 1.6; }
.cat-pin.pin-mine { stroke: var(--gull-orange); stroke-width: 2.8; }   /* 我自己发的:嘴橙圈 */
/* 图钉图形用 currentColor(同一套字形要能在白图钉/暗 chip 上各自反色)。
   图钉底盘永远是白色贴纸,所以这里把颜色钉死成墨色,不跟随明暗主题——
   否则暗色主题下 color 继承成白色 → 白图标画在白图钉上 → 整个图钉变空白。 */
.pin-ico { pointer-events: none; overflow: visible; color: #17171a; }
.chip-ico { display: inline-flex; align-items: center; }
.chip-ico svg { width: 15px; height: 15px; display: block; }

/* 自定位标记:片区正上方的水滴钉 + 标签,一眼区别于圆形需求钉 */
.you-g { pointer-events: none; }
.you-pin { fill: var(--gull-orange); stroke: var(--bg); stroke-width: 1.5;
  transform-box: fill-box; transform-origin: center bottom; animation: youBob 2.6s ease-in-out infinite; }
.you-dot { fill: var(--bg); }
.you-label { font-size: 8px; font-weight: 800; fill: var(--gull-orange); letter-spacing: .04em; }
@keyframes youBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .you-pin { animation: none; } }

/* 图层开关 chip:关掉时半透明 + 图标灰;开着时黑底白图标 */
.layer-chip { display: inline-flex; align-items: center; gap: 5px; }
.layer-chip .chip-glyph { width: 13px; height: 13px; }
.layer-chip .chip-glyph { fill: var(--ink); color: var(--ink); }
.layer-chip.on { background: var(--ink) !important; color: var(--inverse); }
.layer-chip.on .chip-glyph { fill: var(--inverse); color: var(--inverse); }
.layer-chip.off { opacity: .45; }

/* ---------- 海鸥浮钮 = 唯一常驻按钮 ---------- */
/* right 用视口算式贴住手机壳右缘:窄屏(手机)取 18px;
   宽屏时壳是居中的,壳右缘离视口右边 = 50vw - 壳宽/2,再加 18px 内缩。
   这样既不飘出壳外,又保住"相对屏幕固定"(不会被长页面拖到底部)。 */
.gull-fab {
  position: fixed; z-index: 40; bottom: 20px;
  right: max(18px, calc(50vw - var(--shell-w) / 2 + 18px));
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  border: 1px solid var(--glass-brd); box-shadow: var(--glass-shadow);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform var(--dur) var(--ease);
  padding: 0; font-family: inherit;
}
.gull-fab:active { transform: scale(.92); }
.gull-fab svg { transform: translateY(3px); }

.gull-menu {
  position: fixed; z-index: 39; bottom: 106px;
  right: max(18px, calc(50vw - var(--shell-w) / 2 + 18px));
  display: flex; flex-direction: column; gap: 12px; align-items: flex-end;
}
.gull-menu .gm-item {
  display: flex; align-items: center; gap: 10px;
  border: none; cursor: pointer; font-family: inherit;
  background: none; padding: 0;
  opacity: 0; transform: translateY(16px) scale(.8);
  transition: opacity .22s var(--ease), transform .34s var(--spring);
  pointer-events: none;
}
.gull-menu.open .gm-item { opacity: 1; transform: none; pointer-events: auto; }
.gull-menu.open .gm-item:nth-child(1) { transition-delay: .10s; }
.gull-menu.open .gm-item:nth-child(2) { transition-delay: .07s; }
.gull-menu.open .gm-item:nth-child(3) { transition-delay: .04s; }
.gull-menu.open .gm-item:nth-child(4) { transition-delay: 0s; }
.gm-label {
  font-size: 13px; font-weight: 800; color: var(--ink);
  padding: 7px 12px; border-radius: 999px;
}
.gm-bubble {
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  border: 1px solid var(--glass-brd); box-shadow: var(--glass-shadow);
}

/* ---------- 二级页(议会 / 我 / 目录):大留白 + 回地图 ---------- */
.page2 { flex: 1; padding: 18px 20px 40px; }
.page2-top { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.page2-top h1 { font-size: 24px; }
.page2 .lead { color: var(--ink-2); font-size: 13.5px; margin: 4px 2px 18px; }

/* 议会 */
.vote-card { border-radius: var(--radius-l); padding: 18px; margin-bottom: 13px; display: flex; align-items: center; gap: 14px; }
.vote-card .em { font-size: 40px; flex: none; }
.vote-info { flex: 1; min-width: 0; }
.vote-title { font-weight: 800; font-size: 16.5px; }
.vote-desc { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.vote-bar { height: 5px; border-radius: 5px; background: var(--line-soft); margin-top: 10px; overflow: hidden; }
.vote-bar i { display: block; height: 100%; border-radius: 5px; background: var(--ink); transition: width .4s var(--ease); }
.vote-btn {
  flex: none; min-width: 62px; padding: 10px 12px; border-radius: 16px;
  border: 1px solid var(--glass-brd); background: transparent;
  font: inherit; font-size: 12px; font-weight: 800; color: var(--ink);
  cursor: pointer; transition: all var(--dur);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.vote-btn .n { font-size: 17px; }
.vote-btn.on { background: var(--ink); color: var(--inverse); border-color: var(--ink); }

/* 我 */
.me-card { border-radius: var(--radius-l); padding: 20px; margin-bottom: 14px; }
.me-id { display: flex; align-items: center; gap: 14px; }
.me-handle { font-size: 19px; font-weight: 800; }
.me-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.row-line { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.row-line:last-child { border-bottom: none; }
.row-line .k { font-weight: 700; font-size: 15px; }
.row-line .v { color: var(--ink-3); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.row-line .v svg { width: 14px; height: 14px; }

/* 小票(公开账本) */
.receipt {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  border: 1.5px dashed var(--line);
  border-radius: 6px;
  padding: 22px 20px 16px;
  margin-bottom: 14px;
  background: var(--bg);
  position: relative;
}
.receipt .rc-head { text-align: center; font-weight: 800; letter-spacing: .25em; font-size: 13px; }
.receipt .rc-sub { text-align: center; font-size: 10.5px; color: var(--ink-3); margin-top: 3px; letter-spacing: .1em; }
.receipt .rc-line { border-top: 1.5px dashed var(--line); margin: 12px 0; }
.receipt .rc-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: var(--ink-2); }
.receipt .rc-row b { color: var(--ink); }
.receipt .rc-total { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; }
.receipt .rc-total .sum { font-size: 34px; font-weight: 800; color: var(--gull-orange); }
.receipt .rc-note { font-size: 10.5px; color: var(--ink-3); text-align: center; margin-top: 10px; line-height: 1.7; }

/* ---------- 目录(次级检索) ---------- */
.search-row { position: relative; margin: 6px 0 12px; }
.search-row svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.search-row input {
  width: 100%; padding: 13px 16px 13px 42px; border-radius: 999px;
  border: 1px solid var(--glass-brd); background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font: inherit; font-size: 14px; color: var(--ink); outline: none;
}
.search-row input::placeholder { color: var(--ink-3); }
.chips-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
/* 选项多时换行铺开(如上架页 17 个片区):不横向滚,免得手一滑就飞 */
.chips-row.wrap { flex-wrap: wrap; overflow-x: visible; }
.chip {
  padding: 7px 13px; font-size: 12.5px; font-weight: 700;
  border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink-2); background: transparent;
  cursor: pointer; transition: all var(--dur); font-family: inherit;
  white-space: nowrap; flex: none;
}
.chip.on { background: var(--ink); color: var(--inverse); border-color: var(--ink); }
.cat-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 4px; border-bottom: 1px solid var(--line-soft); cursor: pointer;
}
.cat-row .em { font-size: 24px; flex: none; }
.cat-row .txt { flex: 1; min-width: 0; }
.cat-row .t { font-size: 14.5px; font-weight: 750; }
.cat-row .d { font-size: 12px; color: var(--ink-2); margin-top: 1px; }
.cat-row .tip-star { background: none; border: none; cursor: pointer; color: var(--ink-3); font-family: inherit; padding: 4px; }
.cat-row .tip-star.on { color: var(--gull-orange); }
.cat-row .tip-star svg { width: 18px; height: 18px; }

/* ---------- 抽屉 & 弹窗 ---------- */
.sheet-mask, .modal-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, .34);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.sheet-mask.open, .modal-mask.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 61; left: 50%; bottom: 0;
  width: 100%; max-width: var(--shell-w);
  transform: translate(-50%, 105%);
  transition: transform .44s var(--spring);
  border-radius: 26px 26px 0 0;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(28px) saturate(1.05); backdrop-filter: blur(28px) saturate(1.05);
  border: 1px solid var(--glass-brd); border-bottom: none;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .16);
  max-height: 62vh; max-height: 62dvh; display: flex; flex-direction: column;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 10px auto 2px; flex: none; }
.sheet-head { padding: 8px 20px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sheet-body { overflow-y: auto; padding: 0 16px 26px; }

.req-card { border-radius: var(--radius-m); padding: 15px 16px; margin-bottom: 10px; cursor: pointer; transition: transform var(--dur) var(--ease); display: flex; gap: 12px; align-items: center; }
.req-card:active { transform: scale(.98); }
.req-card .em { font-size: 30px; flex: none; }
.req-main { flex: 1; min-width: 0; }
.req-title { font-size: 15px; font-weight: 750; }
.req-meta { display: flex; gap: 10px; margin-top: 3px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.req-price { color: var(--ink); font-weight: 800; }
.kind-chip {
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2);
  white-space: nowrap;
}
.kind-chip.mine { border-color: var(--gull-orange); color: var(--gull-orange); }

.modal {
  position: fixed; z-index: 62; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(.94);
  width: calc(100% - 44px); max-width: calc(var(--shell-w) - 44px);
  border-radius: var(--radius-l);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(30px) saturate(1.05); backdrop-filter: blur(30px) saturate(1.05);
  border: 1px solid var(--glass-brd); box-shadow: var(--glass-shadow);
  padding: 24px 22px 22px;
  opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .25s var(--ease);
  max-height: 82vh; max-height: 82dvh; overflow-y: auto;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.privacy-note {
  display: flex; gap: 8px; align-items: flex-start;
  border: 1px dashed var(--line); border-radius: var(--radius-s);
  padding: 10px 12px; margin: 14px 0; font-size: 12px; color: var(--ink-2);
}
.privacy-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }

/* ---------- 吆喝三步向导 ---------- */
.wiz { flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: 18px 20px 26px; }
/* ★ 输入框基础样式**不要挂在 .wiz 下面**。踩过(创始人报"邮箱框怎么这么小这么紧凑"):
   原来写的是 `.wiz .big-input`,只有答题/发吆喝向导里才生效;
   而验证弹窗、二手上架、议会提案、聊天框都不在 .wiz 里 ——
   class 写了 big-input 却一条样式都没匹配上,直接退回浏览器裸 input:
   实测只有 175×20px,一根细白条,手机上几乎点不中。
   跟之前 chip-art/chip-glyph 是同一种错法:**class 名承诺了样式,就不该挑祖先**。
   字号也定死 ≥16px:iOS Safari 对 <16px 的输入框会自动放大整个页面,一聚焦版面就跳。 */
.big-input {
  width: 100%; box-sizing: border-box;
  padding: 18px 18px; border-radius: var(--radius-m);
  border: 1px solid var(--glass-brd); background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font: inherit; font-size: 17px; font-weight: 700; color: var(--ink); outline: none;
  transition: border-color var(--dur);
}
.big-input:focus { border-color: var(--ink); }
.big-input::placeholder { color: var(--ink-3); font-weight: 600; }
.sub-input {
  width: 100%; box-sizing: border-box;
  margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-s);
  border: 1px solid var(--glass-brd); background: var(--glass-bg);
  font: inherit; font-size: 16px; color: var(--ink); outline: none;
  transition: border-color var(--dur);
}
.sub-input:focus { border-color: var(--ink); }
.sub-input::placeholder { color: var(--ink-3); }
/* 向导里的风味:居中、间距大一点。只有这两条是 .wiz 专属的 */
.wiz .big-input { margin-top: 22px; font-size: 18px; padding: 20px 18px; text-align: center; }
.money-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.district-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; z-index: 80; left: 50%; bottom: 110px;
  transform: translate(-50%, 14px);
  padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--inverse);
  font-size: 13px; font-weight: 700;
  opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .25s var(--ease);
  max-width: 82%; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 通用 ---------- */
.stack { display: flex; flex-direction: column; gap: 10px; }
.center { text-align: center; }
.mt6 { margin-top: 6px; } .mt10 { margin-top: 10px; } .mt14 { margin-top: 14px; } .mt20 { margin-top: 20px; }
.fade-in { animation: fadeUp .34s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   动效层 v0.21 —— 丝滑、灵动、玩感
   ============================================================ */

/* ---------- 关键帧 ---------- */
@keyframes tileIn   { from { opacity: 0; transform: translateY(22px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes pickPop  { 0% { transform: scale(1); } 45% { transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes blink    { 0%, 91%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.08); } }
@keyframes wingWave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(12deg); } }
@keyframes artIn    { from { opacity: 0; transform: translateY(36px) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes riseIn   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes artFloat { from { transform: translateY(0); } to { transform: translateY(-9px); } }
@keyframes ping     { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(8deg); } 100% { transform: scale(1); } }
@keyframes popIn    { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes haloSpin { to { transform: rotate(360deg); } }
@keyframes flowDash { to { stroke-dashoffset: -64; } }
@keyframes boatBob  { 0%, 100% { transform: translate(140px, 253px) rotate(-2deg); } 50% { transform: translate(140px, 249px) rotate(2.5deg); } }
@keyframes drift1   { from { transform: translate(-36px, 92px); } to { transform: translate(452px, 62px); } }
@keyframes drift2   { from { transform: translate(-36px, 338px); } to { transform: translate(452px, 356px); } }
@keyframes fryFall  {
  0%   { opacity: 0; transform: translateY(-6vh) rotate(0deg); transform: translateY(-6dvh) rotate(0deg); }
  12%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(86vh) rotate(230deg); transform: translateY(86dvh) rotate(230deg); }
}
@keyframes fabBob   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- 吉祥物微表情(所有内嵌海鸥生效) ---------- */
.m-eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.6s ease-in-out infinite; }
.m-wing { transform-box: fill-box; transform-origin: 92% 88%; animation: wingWave 2.8s ease-in-out infinite; }

/* ---------- 答题:同题重渲染不重播入场;选中永远弹一下 ---------- */
.tiles.no-anim .tile, .no-anim .tile { animation-name: none; }
.tiles .tile.picked, .no-anim .tile.picked { animation: pickPop .38s var(--spring) 0s; }

/* ---------- Deck 卡片入场(IntersectionObserver 加 .seen) ---------- */
.deck-card .cat, .deck-card .art, .deck-card .t, .deck-card .d, .deck-card .tip-star { opacity: 0; }
.deck-card.seen .cat      { animation: riseIn .45s var(--ease) both; }
.deck-card.seen .art      { animation: artIn .6s var(--spring) both, artFloat 3.6s 1s ease-in-out infinite alternate; }
.deck-card.seen .t        { animation: riseIn .5s .1s var(--ease) both; }
.deck-card.seen .d        { animation: riseIn .5s .18s var(--ease) both; }
.deck-card.seen .tip-star { animation: riseIn .5s .26s var(--ease) both; }
.tip-star.pinged { animation: ping .45s var(--spring); }
.deck-card .tip-star.pinged { opacity: 1; }

/* ---------- 地图动效与涂鸦 ---------- */
.pin-g { transform-box: fill-box; transform-origin: center; animation: popIn .5s var(--spring) both; }
.home-halo { transform-box: fill-box; transform-origin: center; animation: haloSpin 16s linear infinite; }
.river-flow { fill: none; stroke: var(--ink); stroke-width: .5; opacity: .16; stroke-linecap: round; stroke-dasharray: 1.5 5; animation: flowDash 5s linear infinite; }
.doodle { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.doodle-fill { fill: var(--bg); }
.doodle-soft { stroke: var(--ink-3); }
.road { fill: none; stroke: var(--line); stroke-width: 1.6; stroke-dasharray: 2 7; stroke-linecap: round; }
.park-blob { fill: var(--bg-soft); stroke: var(--ink-3); stroke-width: 1.4; stroke-dasharray: 4 4; }
.eye-wheel { transform-box: fill-box; transform-origin: center; animation: haloSpin 11s linear infinite; }
.boat { animation: boatBob 3.4s ease-in-out infinite; cursor: pointer; }
.bird { animation: drift1 19s linear infinite; }
.bird.b2 { animation-name: drift2; animation-duration: 27s; animation-delay: -13s; }
.map-tag { font-size: 7.5px; fill: var(--ink-3); letter-spacing: .12em; }

/* ---------- 海鸥浮钮呼吸 ---------- */
.gull-fab { animation: fabBob 3.2s ease-in-out infinite; }
.gull-fab:active { animation: none; transform: scale(.92); }

/* ---------- 归档薯条雨 ---------- */
.fries-rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.fries-rain .fry { position: absolute; top: 0; font-size: 24px; animation: fryFall 1.7s ease-in both; filter: drop-shadow(0 4px 6px rgba(0,0,0,.12)); }

/* ---------- 自有 2D 图标(icons.js)排版 ---------- */
.pic { vertical-align: -4px; }                                   /* 行内混排时的基线 */
.em .pic, .art .pic, .gm-bubble .pic, .fry .pic { display: block; vertical-align: initial; }
.tile .em { line-height: 0; }
.vote-card .em, .req-card .em, .cat-row .em { line-height: 0; }

/* ---------- 无障碍:用户要求减少动效时全部关闭 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .deck-card .cat, .deck-card .art, .deck-card .t, .deck-card .d, .deck-card .tip-star { opacity: 1; }
}

/* ---------- Tips v2:冷知识角标 / 行动条 / 反馈按钮 / 详情抽屉 ---------- */
.cold-badge {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .12em; vertical-align: 2px;
  color: var(--gull-orange); border: 1px solid color-mix(in srgb, var(--gull-orange) 45%, transparent);
}
.deck-card .tip-act, .tip-sheet .tip-act {
  margin-top: 18px; max-width: 320px; text-align: left;
  font-size: 13.5px; line-height: 1.55; color: var(--ink-2);
  background: color-mix(in srgb, var(--gull-orange) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--gull-orange) 24%, transparent);
  border-radius: 14px; padding: 10px 14px;
}
.fb-row { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
/* 手风琴里的收藏星:老规则只挂在 .deck-card 下(那套结构已退役),
   不补这条它就是个没样式的裸 button(踩过:反馈行左边一条细缝)。 */
.fb-row .tip-star {
  margin-top: 0; flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass-bg); border: 1px solid var(--glass-brd);
  color: var(--ink-3); cursor: pointer; padding: 0;
  transition: color var(--dur), transform var(--dur) var(--spring);
}
.fb-row .tip-star svg { width: 18px; height: 18px; }
.fb-row .tip-star.on { color: var(--gull-orange); }
.fb-row .tip-star:active { transform: scale(.9); }
.fbtn {
  padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer; color: var(--ink-2);
  background: var(--glass-bg); border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: var(--glass-shadow); transition: color var(--dur), border-color var(--dur), transform var(--dur);
}
.fbtn:active { transform: scale(.96); }
.fbtn.done { color: var(--ink-3); border-style: dashed; }
.fbtn.good { color: var(--gull-orange); border-color: color-mix(in srgb, var(--gull-orange) 55%, transparent); }
.cat-row .t .cold-badge { vertical-align: 1px; }

.deck-card .tip-act, .deck-card .fb-row { opacity: 0; }
.deck-card.seen .tip-act { animation: riseIn .5s .22s var(--ease) both; }
.deck-card.seen .fb-row  { animation: riseIn .5s .26s var(--ease) both; }

.tip-sheet { padding-top: 6px; }
.tip-sheet .tip-sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.tip-sheet .tip-sheet-head .cat { font-size: 12px; font-weight: 800; letter-spacing: .3em; color: var(--ink-3); }
.tip-sheet h2 { font-size: 21px; font-weight: 800; line-height: 1.35; }
.tip-sheet .body { margin-top: 10px; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }

/* ---------- Tips v3:卡片人格(过来人门道 / 悄悄跟你说) ---------- */
.tone-badge {
  display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .1em; vertical-align: 2px;
}
/* 两种人格靠"实心 / 描边"区分,不靠颜色(海鸥身上没有紫和粉) */
.tone-badge.tone-insider { background: var(--ink); color: var(--inverse); border: 1px solid var(--ink); }
.tone-badge.tone-care    { color: var(--ink-2); border: 1px solid var(--line); }
.tone-note {
  margin-top: 14px; max-width: 320px; font-size: 11.5px; line-height: 1.5;
  color: var(--ink-3); font-style: italic; text-align: center;
}
/* 整卡淡淡染色,强化人格但不违反纯白/纯黑铁律(只用极浅品牌色雾) */


.tip-sheet.tone-insider .tone-note, .tip-sheet.tone-care .tone-note { text-align: left; }

/* ---------- 站内对话(点头即聊) ---------- */
.chat-screen {
  flex: 1; display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  padding: 16px 18px 14px; box-sizing: border-box; overflow: hidden;
}
.chat-title { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-chips { margin: 8px 0 6px; flex-wrap: wrap; }
.chat-log {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 8px; padding: 10px 2px;
}
.msg { max-width: 82%; display: flex; flex-direction: column; }
.msg.mine  { align-self: flex-end; align-items: flex-end; }
.msg.their { align-self: flex-start; align-items: flex-start; }
.msg-who { font-size: 11px; color: var(--ink-3); margin: 0 4px 2px; font-weight: 700; }
.msg-b {
  padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.55;
  word-break: break-word; white-space: pre-wrap;
  animation: msgIn .32s var(--spring, cubic-bezier(.34,1.56,.64,1)) both;
}
.msg.mine  .msg-b { background: var(--ink); color: var(--inverse); border-bottom-right-radius: 6px; }
.msg.their .msg-b { background: var(--glass-bg); border: 1px solid var(--glass-brd); border-bottom-left-radius: 6px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .msg-b { animation: none; } }
.unread-pill {
  min-width: 20px; height: 20px; border-radius: 10px; background: var(--gull-orange); color: var(--ink);
  font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 6px; align-self: center;
}

/* ---------- 发布向导:人数/时间字段行 ---------- */
.field-row { display: flex; align-items: center; gap: 10px; }
.field-lab { font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; flex: none; }
.field-row .sub-input { margin: 0; flex: 1; }
.cap-select { -webkit-appearance: none; appearance: none; background: var(--glass-bg); }

/* ---------- 二手市场 ---------- */
/* 地图上的商品缩略图钉 */
.pin-g.listing { cursor: pointer; }
.listing-ring { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.pin-g.listing:active { opacity: .8; }

/* 上架表单 */
.sell-form { padding: 4px 2px 40px; }
.sell-lab { font-size: 12.5px; font-weight: 800; color: var(--ink-2); letter-spacing: .02em; }
.sell-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.sell-thumb { position: relative; width: 78px; height: 78px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--glass-brd); background: var(--glass-bg); flex: none; }
.sell-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sell-thumb-x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sell-thumb-x svg { width: 12px; height: 12px; }
.sell-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); cursor: pointer; }
.mt10 { margin-top: 10px; } .mt14 { margin-top: 14px; }
.big-input.mt14, .sub-input.mt10, .sub-input.mt14 { display: block; width: 100%; }

/* 渐进放大:小卡 → 全屏 */
.listing-peek { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.listing-peek-img { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; flex: none;
  border: 1px solid var(--glass-brd); }
.listing-peek-title { font-size: 17px; font-weight: 800; }
.listing-gallery { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.listing-gallery::-webkit-scrollbar { display: none; }
.listing-full-img { height: 200px; border-radius: 16px; object-fit: cover; flex: none;
  border: 1px solid var(--glass-brd); }
.mini-thumb { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; vertical-align: middle; margin-right: 2px; }

/* ---------- 目录:智能检索 ---------- */
.search-row { position: relative; }
.search-x {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--line); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
}
.search-x svg { width: 12px; height: 12px; }
.sug-line { padding: 2px 2px 6px; }
.sug-line .tiny { display: block; margin-bottom: 6px; }

/* ---------- 登录:一整屏(不再是憋屈小弹窗) ---------- */
.login-screen {
  flex: 1; display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh; padding: 18px 24px 26px;
}
.login-hero { text-align: center; margin: 6vh 0 26px; }
.login-hero h1 { font-size: 30px; }
.login-opts { display: flex; flex-direction: column; gap: 10px; }
.login-big { padding: 18px 26px; font-size: 16px; }
.login-ic { display: inline-flex; width: 20px; height: 20px; }
.login-ic svg { width: 20px; height: 20px; }
.login-lab { font-size: 12.5px; font-weight: 800; color: var(--ink-2); margin-left: 4px; }
.login-input {
  width: 100%; padding: 16px 18px; border-radius: 16px;
  border: 1px solid var(--glass-brd); background: var(--glass-bg);
  color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; outline: none;
  transition: border-color var(--dur);
}
.login-input:focus { border-color: var(--ink); }
.login-input::placeholder { color: var(--ink-3); font-weight: 500; }
.ghost-line {
  margin: 12px auto 0; display: block; background: none; border: none;
  font: inherit; font-size: 13px; color: var(--ink-3); cursor: pointer; text-decoration: underline dotted;
}
.login-foot { margin-top: auto; text-align: center; padding-top: 20px; }

/* ---------- 6 格验证码(原来那个小输入框太憋屈) ---------- */
.code-lab { font-size: 12.5px; font-weight: 800; color: var(--ink-2); margin: 18px 2px 8px; }
/* 发码结果说明。试用模式用嘴喙橙镶边 —— 这是"你以为发了其实没发"的地方,值得多看一眼 */
.mail-note {
  margin-top: 12px; padding: 12px 14px; border-radius: 14px;
  font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
  border: 1px solid var(--glass-brd); background: var(--glass-bg);
}
.mail-note.trial { border-left: 3px solid var(--gull-orange); }
.mail-note .devcode {
  display: inline-block; margin-left: 4px; padding: 1px 10px; border-radius: 8px;
  font-size: 16px; font-weight: 800; letter-spacing: .18em;
  color: var(--ink); background: var(--glass-bg-strong); border: 1px solid var(--glass-brd);
  font-variant-numeric: tabular-nums;
}
.code-boxes { display: flex; gap: 8px; justify-content: space-between; }
.code-box {
  flex: 1; min-width: 0; aspect-ratio: 3 / 4; max-height: 62px;
  border-radius: 14px; border: 1.5px solid var(--glass-brd); background: var(--glass-bg);
  color: var(--ink); font: inherit; font-size: 26px; font-weight: 800; text-align: center;
  outline: none; transition: border-color var(--dur), transform var(--dur) var(--spring);
}
.code-box:focus { border-color: var(--ink); transform: scale(1.06); }

/* ============================================================
   Tips 手风琴(补齐:这套结构之前只有 HTML/JS 没有样式,
   导致 chevron 的 SVG 没尺寸约束 → 撑成整屏大箭头,整页看着像坏了)
   ============================================================ */
.tip-feed {
  flex: 1; padding: 18px 16px 40px;
  /* 只许上下滑,锁左右误滑 */
  touch-action: pan-y; overscroll-behavior: contain;
}
.feed-top { padding: 4px 4px 14px; }
.feed-title { font-size: 22px; font-weight: 800; }
.feed-seg { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; font-weight: 600; }

.tip-item {
  border-radius: var(--radius-m); margin-bottom: 10px; overflow: hidden;
  background: var(--glass-bg); border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: var(--glass-shadow);
  transition: border-color var(--dur);
}
.tip-item.open { border-color: var(--glass-brd); }

.tip-head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 14px 14px; background: none; border: none; cursor: pointer;
  font: inherit; color: var(--ink); text-align: left;
}
.tip-ic { flex: none; display: inline-flex; }
.tip-ic svg { width: 30px; height: 30px; }
.tip-headmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tip-cat {
  font-size: 11px; font-weight: 800; color: var(--ink-3);
  letter-spacing: .1em; display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.tip-title { font-size: 15.5px; font-weight: 800; line-height: 1.4; }

/* 关键:给 chevron 定死尺寸,否则 SVG 会撑满整个卡片 */
.tip-chev { flex: none; display: inline-flex; color: var(--ink-3); transition: transform var(--dur) var(--ease); }
.tip-chev svg { width: 18px; height: 18px; display: block; }
.tip-item.open .tip-chev { transform: rotate(90deg); }

/* 折叠体:关着高度 0,展开滑出。
   注意:这里不能用 grid-template-rows:0fr 的写法——.tip-body 是多个平级子元素,
   0fr 只收第一行,其余子元素照样占高(踩过:折叠的卡片还留一大片空白)。 */
.tip-body {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .32s var(--ease), opacity .22s var(--ease);
}
.tip-item.open .tip-body { max-height: 900px; opacity: 1; }
.tip-figure { display: flex; justify-content: center; padding: 4px 0 2px; }
.tip-d { padding: 0 16px 2px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.tip-body .tip-act { margin: 10px 16px 0; }
.tip-body .fb-row { padding: 12px 14px 14px; }
.grey-note {
  margin: 10px 14px 0; padding: 10px 12px; border-radius: 12px;
  background: var(--bg-soft); border: 1px dashed var(--line);
  font-size: 11.5px; line-height: 1.6; color: var(--ink-2);
}
.grey-note a { color: var(--ink); cursor: pointer; text-decoration: underline dotted; }
.grey-badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0;
  padding: 1px 6px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line);
}
.feed-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 0 10px; }
.feed-foot .ghost {
  background: none; border: none; font: inherit; font-size: 13px;
  color: var(--ink-3); cursor: pointer; text-decoration: underline dotted;
}
@media (prefers-reduced-motion: reduce) {
  .tip-body, .tip-chev { transition: none; }
}

/* ---------- Tips 牌堆:头部 + 薯条/鸟屎投票 ---------- */
.feed-head { display: flex; align-items: center; gap: 12px; padding: 2px 0 12px; }
.feed-headmain { flex: 1; min-width: 0; }
.tip-feed .search-row { margin-bottom: 10px; }

/* 赞=薯条,踩=鸟屎(创始人语)。默认灰白,选中才亮海鸥嘴橙。 */
.vote-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px 7px 9px; border-radius: 999px;
  background: var(--glass-bg); border: 1px solid var(--glass-brd);
  font: inherit; font-size: 12.5px; font-weight: 800; color: var(--ink-3);
  cursor: pointer; transition: transform var(--dur) var(--spring), color var(--dur), border-color var(--dur);
}
.vote-btn svg { width: 26px; height: 26px; display: block; }
.vote-btn:active { transform: scale(.92); }
.vote-btn .vote-n { min-width: 10px; text-align: left; font-variant-numeric: tabular-nums; }
/* 图标永远保持本色 —— 薯条就得是薯条、鸟屎就得是鸟屎,一眼认得出。
   (踩过:给没选中的加 grayscale,两个图标就成了两坨认不出的灰泥。)
   选中与否靠"描边 + 数字加重"表达,不靠把图标弄糊。 */
.vote-btn.on { color: var(--ink); border-color: var(--ink); border-width: 1.5px; }
.vote-btn.on .vote-n { color: var(--ink); }
.vote-btn:not(.on) { opacity: .82; }
.vote-btn.pop { animation: ping .45s var(--spring); }

/* 图标 + 文字并排的小行/小 chip(替掉原来的 emoji) */
.icon-chip { display: inline-flex; align-items: center; gap: 5px; }
.icon-chip svg { width: 13px; height: 13px; flex: none; }
.icon-line { display: flex; align-items: flex-start; gap: 6px; }
.icon-line svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.tip-act { display: flex; align-items: flex-start; gap: 7px; }
.tip-act svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }

/* ============================================================
   地图 v4:真实地理细节层 + 正确的缩放语义
   缩放铁律(创始人指出的核心):放大时——
     · 线宽:不跟着涨(non-scaling-stroke)→ 视觉上"变细"
     · 字/图钉:乘 --z 反向补偿 → 屏幕上恒定大小
     · 几何(面积/河宽/街道走向):照常放大,这才是地理
   ============================================================ */

/* --- 1. 装饰性笔画一律不随缩放变粗 --- */
.district-blob, .road, .park-blob, .doodle, .home-halo,
.cat-pin, .listing-ring, .pin-bubble, .you-pin, .you-dot,
.geo-road, .geo-park, .geo-water { vector-effect: non-scaling-stroke; }
/* 河宽是真实地理宽度(15 单位 ≈ 400m),该跟着缩放,故不加 non-scaling */

/* --- 2. 插画文字:反向补偿,屏幕上恒定 --- */
.district-label    { font-size: calc(12px * var(--z, 1)); }
.district-label-en { font-size: calc(8px  * var(--z, 1)); }
.map-tag           { font-size: calc(7.5px * var(--z, 1)); }
.river-label       { font-size: calc(8.5px * var(--z, 1)); letter-spacing: calc(.18em * var(--z, 1)); }

/* --- 3. LOD:插画涂鸦在近景退场(它们是符号不是实物,放大会变巨人) --- */
#mapSvg:not([data-lod="city"]) .doodle,
#mapSvg:not([data-lod="city"]) .boat,
#mapSvg:not([data-lod="city"]) .bird,
#mapSvg[data-lod="block"] .river-label { opacity: 0; pointer-events: none; }
/* 片区团块在近景淡出,把舞台让给真实街道(边界仍隐约可见,方便定位) */
#mapSvg[data-lod="hood"]  .district-blob { opacity: .22; }
#mapSvg[data-lod="block"] .district-blob { opacity: .1; }
#mapSvg[data-lod="block"] .district-label-en { opacity: 0; }
.district-blob, .doodle, .boat, .bird { transition: opacity .3s; }

/* --- 4. 真实街道:手绘墨线风(跟插画同一套语言) --- */
.geo-road { fill: none; stroke: var(--ink-3); stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.geo-road.r0 { stroke-width: 2.2; opacity: .34; }    /* 主干:唯一还算显眼的,给方向感 */
.geo-road.r1 { stroke-width: 1.5; opacity: .22; }    /* 次干 */
.geo-road.r2 { stroke-width: 1;   opacity: .13; }    /* 支路:几乎只是底纹 */
.geo-road.r3 { stroke-width: .8;  opacity: .07; stroke-dasharray: 2 3; }  /* 步行道:快看不见 */
.geo-park  { fill: var(--bg-soft); stroke: none; opacity: .32; pointer-events: none; }
.geo-water { fill: var(--river); stroke: none; opacity: .4; pointer-events: none; }

/* --- 5. 真实地标:黑钉白字形,反向缩放恒定大小 --- */
.geo-poi { transform: translate(var(--px), var(--py)) scale(var(--z, 1)); pointer-events: none; }
.geo-poi-dot { fill: var(--ink); stroke: var(--bg); stroke-width: 1.6; }
.geo-poi-gl  { fill: var(--bg); color: var(--bg); }
.geo-poi-label {
  font-size: 7px; font-weight: 700; fill: var(--ink-2);
  paint-order: stroke; stroke: var(--bg); stroke-width: 2.4; stroke-linejoin: round;
  opacity: 0; transition: opacity .25s;
}
#mapSvg[data-lod="block"] .geo-poi-label { opacity: 1; }   /* 最近景才出名字,不然一片糊 */

/* --- 6. 真实街名:躺在路上,反向缩放 --- */
.geo-street {
  transform: translate(var(--px), var(--py)) rotate(var(--rot, 0deg)) scale(var(--z, 1));
  font-size: 6.5px; font-weight: 600; fill: var(--ink-3); letter-spacing: .02em;
  paint-order: stroke; stroke: var(--bg); stroke-width: 2.2; stroke-linejoin: round;
  pointer-events: none;
}

/* 图钉定位层:translate 定位 + scale(--z) 反向补偿 → 屏幕上恒定大小。
   内层 .pin-g 继续跑 popIn 弹入动画(两层分开,transform 不打架)。 */
.pin-pos { transform: translate(var(--px), var(--py)) scale(var(--z, 1)); }
.pin-pos[data-action] { cursor: pointer; }

/* 地标符号:真实位置 + 恒定屏幕大小(它们是符号不是实物,25 单位在真比例下=1.7km) */
.mark-pos { transform: translate(var(--px), var(--py)) scale(var(--z, 1)); pointer-events: none; }
/* 小公园放大才画,远景只留大的(不然市中心糊成一片绿) */
#mapSvg[data-lod="city"] .park-small { opacity: 0; }
.park-blob { transition: opacity .3s; }
