/* ==========================================================================
   styles.css —— 友人@机器人 演示页样式（原生 CSS，无任何 UI 框架）
   整页气质来自《Younet 首页设计文档》：碳硅共生、一阴一阳、极简、温润、有呼吸感。
   页面上下像一副太极：
     · 上部（阳/虚）：居中大标题「友人 @ 机器人」+ 中部六栏主分类导航；
     · 中部（留白）  ：导航与地图之间强制留出 20vh 纯空白，只让天地渐变过渡；
     · 下部（阴/实）：一幅巨大的中国地图，左上角是图层开关，上面的呼吸光点慢慢闪烁。
   配色只留三支：暖白底 #FDFCF8（绝不冷色 / 高饱和）、淡蓝 #7BA7C9、温润灰 #8A8A8A；
   整页背景仍由暖白渐变到沉稳的大地色。
   目录：
     1. 变量与基础样式
     2. 顶部：主标题「友人 @ 机器人」+ 中部导航 + 地图图层导航
     3. 主内容区与通用按钮 / 视图头
     4. 地图（友人地图）与呼吸光点、体验店名称标签
     5. 卡片列表（文章）
     5.1 智能体榜单（国外 / 国内 AI 厂商 Top 5）
     6. 论坛弹窗
     7. 底部注脚与响应式
     8. 书童（个人机器人）对话视图（顶部导航「伙伴机器人」->「个人机器人」进入，与本机 Ollama 上的大模型对话）
     9. 书童 · 投喂台（导航里这一项已注释掉，只剩 #train 深链接：提交文本 / 用底座模型整理草稿 / 查看已提交列表）
    10. 配色收敛：把第 5 ~ 9 节里零散的冷色硬编码统一到第 1 节那三支色上
   ========================================================================== */

/* ---------------- 1. 变量与基础样式 ---------------- */
:root {
  /* 首页三支主色（《Younet 首页设计文档》） */
  --yn-paper: #fdfcf8;        /* 暖白：整页底色，像一张宣纸 */
  --yn-sky: #7ba7c9;          /* 淡蓝：主色，温润 */
  --yn-sky-soft: #a8c6dc;     /* 淡蓝浅一档：描边 / 光晕 */
  --yn-sky-deep: #5c86a6;     /* 淡蓝深一档：正文强调、悬停加深 */
  --yn-mist: #f0f4f8;         /* 地图省界填充：极浅的水墨灰蓝 */
  --yn-line: #d0d8e0;         /* 地图轮廓与细线 */
  --yn-gray: #8a8a8a;         /* 导航与正文的默认灰 */
  --yn-gray-deep: #4a5560;    /* 标题与正文的深灰（替代原来的墨蓝） */
  --yn-gray-mid: #6d7784;     /* 卡片正文用的中灰 */
  --yn-gray-soft: #9aa6b2;    /* 注脚、辅助文字的浅灰 */
  --yn-gray-layer: #a0a0a0;   /* 地图图层开关：比正文更轻的浅灰 */
  --yn-gray-sign: #c4c4c4;    /* 右下角落款：几乎退到纸面里的浅灰 */
  --yn-hairline: #e9e5dd;     /* 暖灰细线（只用在卡片、弹窗等次要界面） */

  /* 次要界面（卡片 / 弹窗 / 书童 / 投喂台）沿用原来的变量名，取值收编到上面那套色，
     这样冷暖两套颜色不会同屏出现 */
  --sky-50: #f2f5f8;
  --sky-100: #e3ebf2;
  --sky-200: #d0d8e0;
  --sky-500: #7ba7c9;
  --sky-700: #5c86a6;
  --ink: #4a5560;
  --ink-soft: #8a8a8a;
  --line: #e9e5dd;
  --paper: #ffffff;
  --red: #b86a58;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow: 0 10px 30px rgba(122, 146, 168, .10);
  --shadow-hover: 0 14px 32px rgba(122, 146, 168, .16);
  --font: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", system-ui, sans-serif;
  /* 思源仿宋栈（文档指定顺序：Source Han Serif / FangSong / Noto Serif SC）：顶部导航、二级菜单、
     导航提示、图层开关这些小字都用它 */
  --font-fangsong: "Source Han Serif SC", "FangSong", "仿宋", "FangSong_GB2312", "STFangsong", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  /* 黑体栈：首页大标题里的「友人」用（思源黑体 / 系统无衬线，都是黑体这一路） */
  --font-heiti: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 科技感无衬线：给"机器人"三个空心字用 */
  --font-tech: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: var(--font);
  color: var(--yn-gray-sign);
  /* 天空沉降为大地：前 40% 是完整的天空亮白，之后才渐渐沉成厚重的大地色 */
  /* background: linear-gradient(to bottom,
    #FDFCF8 0%,
    #FDFCF8 40%,
    #E8E3D9 100%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased; */
}

/* 页首、主内容与页脚浮在整页背景之上 */
.site-header, .site-main, .site-footer { position: relative; z-index: 1; }

h1, h2, h3, h4 { font-family: var(--font); }

a { color: inherit; }

button { font-family: inherit; }

/* 键盘可达的焦点样式 */
:focus-visible { outline: 2px solid var(--sky-500); outline-offset: 2px; }

/* ---------------- 2. 顶部：主标题「友人 @ 机器人」+ 中部导航（太极的"阳/虚"面） ----------------
   整块只在页首出现一次、不吸顶：标题占位大、上下留白宽；
   导航没有横线、没有底色、没有分隔符，只用间距分隔 */
.site-header {
  /* 标题严格落在页面顶部往下 15vh 处 */
  padding: 15vh 20px 0;
  text-align: center;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 主标题（点击回友人地图；语义上就是页面的一级标题） */
.brand { display: inline-block; text-decoration: none; }

.site-title {
  /* 标题的基准字号：两侧文字都由它推导，"机器人"固定为"友人"的 75% */
  --title-size: clamp(44px, 6.2vw, 96px);
  margin: 0;
  display: flex;
  align-items: center;            /* @ 与两端文字垂直居中 */
  justify-content: center;
  gap: clamp(6px, 1.1vw, 16px);
  font-weight: 400;
  white-space: nowrap;
}

/* 友人：实（黑体 · 淡蓝）—— 与"机器人"的虚凑成一阴一阳 */
.title-friend {
  font-family: var(--font-heiti);
  font-weight: 400;
  font-size: var(--title-size);
  line-height: 1.1;
  letter-spacing: .06em;
  color: var(--yn-sky);
}

/* @：浅灰、3.5 秒一次的极轻呼吸（缩放 1 -> 1.05 -> 1，光晕也一起明灭），像安静的心跳；
   悬停时给一点极微的光晕 */
.title-at {
  position: relative;
  top: .02em;
  font-family: var(--font-tech);
  font-size: clamp(20px, 2.7vw, 40px);
  font-weight: 300;
  line-height: 1;
  color: var(--yn-gray-sign);
  animation: atBreath 3.5s ease-in-out infinite;
  transition: color .3s ease, text-shadow .3s ease;
}
.title-at:hover { color: var(--yn-sky); text-shadow: 0 0 18px rgba(123, 167, 201, .5); }
@keyframes atBreath {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 0 rgba(123, 167, 201, 0);
  }
  50% {
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(123, 167, 201, .3);
  }
}

/* 机器人：虚（极细无衬线 + 空心字：内部透明、只留 0.8px 边缘线）。
   字距 0.3em、字号为"友人"的 75%、整体透明度 .8，再加一层极淡的蓝色辉光，
   像用很淡的墨勾出来的一层影子。负的右外边距抵消字距在末尾留下的空隙，视觉仍居中。 */
.title-robot {
  margin-right: -.3em;
  font-family: var(--font-tech);
  font-weight: 200;
  font-size: calc(var(--title-size) * .90);
  line-height: 1.1;
  letter-spacing: .3em;
  color: transparent;
  -webkit-text-stroke: .8px var(--yn-sky);
  opacity: .8;
  filter: drop-shadow(0 0 8px rgba(123, 167, 201, .4));
}

/* 中部导航：只有一行六栏主分类，由 js/app.js 渲染；
   与标题、地图之间都只用大段留白分隔 */
.main-nav {
  /* 第一排导航严格落在标题下方 8vh */
  margin-top: 8vh;
  display: flex;
  justify-content: center;
  width: 100%;
}

.nav-list,
.nav-sub-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
/* 主分类：1.2rem、纯灰；六个词之间只有 40px 的留白，没有横线、边框和底色 */
.nav-list { justify-content: center; gap: 40px; max-width: 100%; }
/* 地图左上角的第二级导航：小一号，条目之间同样只用间距分开 */
.nav-sub-list { justify-content: flex-start; gap: clamp(16px, 2.2vw, 28px); }

.nav-item, .nav-sub-item { position: relative; }

/* 导航项：仿宋、灰色、字间距宽敞；没有下划线、边框线、背景色块 */
.nav-link,
.nav-sub-link {
  display: inline-block;
  font-family: var(--font-fangsong);
  text-decoration: none;
  letter-spacing: .1em;
  white-space: nowrap;
  transition: color .3s ease, text-shadow .3s ease;
}
.nav-link { font-size: 1.2rem; font-weight: 400; color: var(--yn-gray); }
.nav-sub-link { font-size: 12.5px; color: var(--yn-gray-layer); }
/* 悬停 / 键盘聚焦：颜色变淡蓝，并带一层极淡的文字阴影——像被轻轻点亮 */
.nav-link:hover, .nav-sub-link:hover,
.nav-link:focus-visible, .nav-sub-link:focus-visible,
.nav-item.is-active > .nav-link {
  color: var(--yn-sky);
  text-shadow: 0 0 10px rgba(123, 167, 201, .32);
}

/* 地图左上角的"图层操作区"：距地图边界 20–28px，透明地浮在水墨轮廓上。
   它只是一组小字，没有边框、没有底色，也不抢地图的视线。 */
.map-layers {
  position: absolute;
  top: clamp(20px, 2vw, 28px);
  left: clamp(20px, 2vw, 28px);
  z-index: 8;
  max-width: calc(100% - 40px);
  text-align: left;
}
/* 图层提示：落在这一小块文字下面，就近出现；仍然是浅浅的一行仿宋小字 */
.map-layers .map-hint {
  margin: 10px 0 0;
  text-align: left;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--yn-gray-soft);
}

/* 二级菜单：默认隐藏，只在聚焦时浮出（例如键盘 Tab）；鼠标扫过导航不会弹出任何菜单。
   只在"名字"上做轻重，不用粗边框 / 底色去框它——太重的框会破坏留白 */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 10px;         /* 透明过渡带，避免鼠标移动时菜单消失 */
  min-width: 190px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 60;
}
.nav-item:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.submenu-box {
  background: rgba(253, 252, 248, .96);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(122, 146, 168, .12);
  backdrop-filter: blur(6px);
  padding: 8px;
  /* 二级菜单一行一个，纵向排列（如「AGENT机器人」下的 数字机器人） */
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
/* 二级菜单里的项：也只有名字，hover 时变淡蓝并轻轻亮起（与导航项同一个口径） */
.submenu-link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .3s ease;
}
.submenu-label {
  display: block;
  font-family: var(--font-fangsong);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--yn-gray);
}
.submenu-link:hover .submenu-label,
.submenu-link:focus-visible .submenu-label {
  color: var(--yn-sky);
  text-shadow: 0 0 10px rgba(123, 167, 201, .45);
}
.submenu-desc { display: block; margin-top: 2px; font-size: 11.5px; color: var(--yn-gray-soft); line-height: 1.5; }
/* 二级菜单里"还没做"的项挂一个「建设中」小标：只是一点小字，不加边框、不加底色 */
.submenu-badge {
  margin-left: 6px;
  padding: 0;
  border: 0;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--yn-gray-soft);
}

/* ---------------- 3. 主内容区、视图切换、按钮 ---------------- */
/* 主内容区与页首、页脚同宽（1440）；顶部不再统一留白，
   首页的 20vh 天地过渡由 #view-map 自己给出，其他视图保留原来的呼吸空间 */
.site-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 0px clamp(12px, 2.4vh, 28px);
}

/* 各视图通过 .is-active 切换，避免同屏出现 */
.view { display: none; }
.view.is-active { display: block; animation: viewIn .22s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
/* 非首页视图仍有自己的顶部留白 */
.view:not(#view-map) { padding-top: clamp(32px, 6vh, 64px); }

/* 首页地图：导航下方保证 20vh 的天地过渡，地图从这里开始；
    地图尺寸恢复为 2026-10-17 版：占满内容宽度，宽高比 716 / 760 */
#view-map {
  position: relative;
  margin-top: 20vh;
}

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.view-head-text { min-width: 0; }
.view-head h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: .3px; color: var(--yn-gray-deep); }
.view-desc { margin: 0; max-width: 820px; font-size: 13.5px; line-height: 1.75; color: var(--ink-soft); }

.btn {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--yn-sky-deep);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--sky-50); border-color: var(--sky-200); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(180deg, #8fb6d2, #5c86a6);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(123, 167, 201, .32);
}
.btn-primary:hover { background: linear-gradient(180deg, #9dc0d9, #6e9cbe); }
.btn-ghost { background: transparent; }
/* 少数地方用 <a class="btn"> 当按钮（如跳到评论区）：补上 inline 排列与去下划线 */
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1.4;
}
.modal-foot-actions { display: inline-flex; align-items: center; gap: 8px; }

/* 点击还没做的导航项（如「展会」「AI装备」）时，在导航下面给一句提示：
   仿宋小字、浅灰，出现与收起都由 js/app.js 控制；默认 hidden，不占高度、不影响布局 */
.nav-hint {
  margin: clamp(20px, 3.4vh, 34px) auto 0;
  color: var(--yn-gray-soft);
  font-family: var(--font-fangsong);
  font-size: 12.5px;
  letter-spacing: .08em;
  animation: viewIn .2s ease;
}
.nav-hint[hidden] { display: none; }

/* ---------------- 4. 淡墨中国地图 + 四城光点（首页的"阴/实"面） ----------------
   地图沿用 2026-10-17 版：占满内容宽度、宽高比 716 / 760 的整幅版图，
   省界只用一层更淡的水墨灰蓝铺底；北京 / 上海 / 深圳 / 成都四盏暖黄光点
   绝对定位在版图上，像大地上安静的营火，慢慢亮起、慢慢暗下；
   城市名默认常显，不参与任何鼠标 / 键盘交互。 */
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

/* 20vh 的天地过渡由 #view-map 统一给出，这里不再重复叠加顶部间距 */
.map-hero {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  min-width: 0;
  margin-top: 0;
}

/* 浮在地图右上角的小按钮：极轻，只有四个字；
   与左上角图层开关同一条基线，并贴住地图容器的右缘（同样内缩 20–28px） */
.hero-reset {
  position: absolute;
  top: clamp(20px, 2vw, 28px);
  right: clamp(20px, 2vw, 28px);
  z-index: 5;
  padding: 4px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--yn-gray-soft);
  font-family: var(--font-fangsong);
  font-size: 12px;
  letter-spacing: .12em;
  box-shadow: none;
  backdrop-filter: none;
  transition: color .3s ease, text-shadow .3s ease;
}
.hero-reset:hover {
  background: transparent;
  border-color: transparent;
  transform: none;
  color: var(--yn-sky);
  text-shadow: 0 0 12px rgba(123, 167, 201, .45);
}

/* 整幅地图容器（恢复 2026-10-17 版）：占满内容宽度，宽高比与 viewBox 一致；
   光点、省界都以它为坐标原点 */
.map-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 716 / 760;
}

/* 省界：恢复 10-17 版的整幅水墨画法，颜色再调淡一档；
   不拉伸、不裁切，保持版图原本的比例。
   整层 opacity 设为 0.5：视觉浓度降为原来的一半，颜色值本身保持不变 */
.earth-map {
  display: block;
  width: 100%;
  height: 100%;
  opacity: .7;
  pointer-events: none;
}
.earth-map .province {
  fill: #f5f9fc;
  stroke: #e3ebf2;
  stroke-width: .9;
  stroke-linejoin: round;
}

/* 光点层：铺满地图容器，只负责定位，不接收鼠标事件 */
.city-lights {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* 光点外壳：绝对定位到经纬度投影出的百分比位置，城市名常显在光点旁 */
.city-light-wrap {
  position: absolute;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
}

/* 光点本身：12px 暖黄实心点（20px 的 0.6 倍）+ 30px / 15px 光晕；
   呼吸只改明暗、不改大小，整个周期都保持熄灭时的尺寸 */
.city-light {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  background: #F5C26B;
  border-radius: 50%;
  box-shadow: 0 0 30px 15px rgba(245, 194, 107, 0.25);
  opacity: 1;
  animation: breathe 7s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  will-change: opacity;
  pointer-events: none;
}

/* 呼吸：只做透明度变化（0.35 → 1），不再缩放；颜色始终是同一盏暖黄 */
@keyframes breathe {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

/* 固定显示的城市名：紧贴在光点旁，颜色更淡、字号更小，不接收鼠标事件 */
.city-light-label {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  color: var(--yn-gray-layer);
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .1em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.city-light-wrap--left .city-light-label {
  left: auto;
  right: calc(100% + 10px);
}

/* ---------------- 5. 卡片列表（文章；体验店不再是卡片，而是地图上的名称标签） ---------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 14px;
}
.card-grid--wide { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(122, 146, 168, .08);
  transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--sky-50);
  border: 1px solid var(--sky-100);
  color: var(--yn-sky-deep);
  font-size: 11.5px;
}
.pill--date { background: #fff7e6; border-color: #ffe0a3; color: #a86a06; }

.card-title { margin: 0; font-size: 15px; line-height: 1.55; color: var(--yn-gray-deep); }
.card-desc { margin: 0; font-size: 13px; line-height: 1.75; color: var(--yn-gray-mid); }
.card-meta { font-size: 12px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 10px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chip {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--sky-50);
  border: 1px dashed var(--sky-200);
  color: var(--yn-sky-deep);
  font-size: 11.5px;
}

.empty-tip {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: rgba(253, 252, 248, .7);
  color: var(--ink-soft);
  font-size: 13px;
}

/* ---------------- 5.1 智能体榜单（国外 / 国内 AI 厂商 Top 5；数据见 js/data.js 第 9 节 AGENTS） ---------------- */
/* 两张榜并排，窄屏自动落成一张一行；行数由数据决定，不限于 5 行 */
.rank-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.rank-card {
  padding: 15px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(122, 146, 168, .08);
}
.rank-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank-title { margin: 0; font-size: 16px; letter-spacing: .2px; color: var(--yn-gray-deep); }
.rank-desc { margin: 8px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--ink-soft); }

.rank-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rank-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--yn-paper);
  transition: transform .16s ease, box-shadow .16s ease;
}
.rank-row:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(122, 146, 168, .12); }

/* 名次徽标：前三名换一套颜色，榜头一眼就能看出来 */
.rank-no {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sky-100);
  color: var(--yn-sky-deep);
  font-size: 12.5px;
  font-weight: 700;
}
.rank-row:nth-child(1) .rank-no { background: linear-gradient(180deg, #ffd76e, #f0a92c); color: #6b4300; }
.rank-row:nth-child(2) .rank-no { background: linear-gradient(180deg, #dce6ee, #b3c4d1); color: #40566a; }
.rank-row:nth-child(3) .rank-no { background: linear-gradient(180deg, #f0cda9, #d8a273); color: #5f3a17; }

.rank-body { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.rank-name { font-size: 14px; font-weight: 600; color: var(--yn-sky-deep); }
.rank-product {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--sky-50);
  border: 1px dashed var(--sky-200);
  color: var(--yn-sky-deep);
  font-size: 11.5px;
}
.rank-text { flex: 1 1 100%; margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--yn-gray-mid); }

/* 榜单口径说明（演示数据） */
.rank-note { margin: 12px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-soft); }

/* ---------------- 6. 论坛弹窗 ---------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(74, 85, 96, .38);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  width: min(780px, 94vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(74, 85, 96, .3);
  overflow: hidden;
  animation: modalIn .18s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; } }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--yn-hairline);
  background: linear-gradient(180deg, var(--sky-50), #fff);
}
.modal-head h3 { margin: 0; font-size: 18px; color: var(--yn-gray-deep); }
.modal-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.modal-close {
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--yn-gray-soft);
  cursor: pointer;
  padding: 0 6px;
  border-radius: 8px;
}
.modal-close:hover { background: var(--sky-100); color: var(--yn-gray-deep); }

.modal-body { padding: 6px 18px 16px; overflow-y: auto; }

.forum-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 0 8px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--yn-hairline);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.forum-stats b { color: var(--yn-sky-deep); }

.forum-list { list-style: none; margin: 0; padding: 0; }
.forum-item { padding: 10px 6px; border-bottom: 1px dashed var(--yn-hairline); border-radius: 8px; cursor: pointer; }
.forum-item:hover { background: var(--sky-50); }
.forum-item h4 { margin: 0 0 5px; font-size: 14px; font-weight: 600; color: var(--yn-gray-deep); }
.forum-item:hover h4 { color: var(--yn-sky-deep); }
.forum-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--ink-soft); }
.forum-tag { padding: 0 6px; border-radius: 6px; background: var(--sky-50); border: 1px solid var(--sky-100); color: var(--yn-sky-deep); }

/* 体验店详情弹窗（与论坛弹窗共用同一个外壳，这里只补内容样式） */
.store-modal-desc { margin: 12px 0; font-size: 13.5px; line-height: 1.85; color: var(--yn-gray-mid); }
.store-highlights { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.store-highlight {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--sky-50);
  border: 1px solid var(--sky-100);
  color: var(--yn-sky-deep);
  font-size: 12px;
}
.store-modal-addr { margin: 0; font-size: 12.5px; color: var(--ink-soft); }

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--yn-hairline);
  background: var(--yn-paper);
}
.modal-note { font-size: 12px; color: var(--ink-soft); }

/* ---------------- 7. 右下角落款 + 响应式 ---------------- */
/* 落款：Noto Sans SC 的极小字、浅灰、右对齐——没有边框、没有底色、没有分隔线，
   就是纸面右下角两行安静的题款（第一行年份，第二行版本号）。 */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  margin-top: auto;
  padding: clamp(8px, 2vh, 20px) clamp(20px, 3.4vw, 44px) clamp(20px, 4vh, 40px);
  color: #a0a0a0;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: .16em;
  text-align: right;
  background: transparent;
}
.footer-left, .footer-right { text-align: right; }

@media (max-width: 900px) {
  /* 窄屏：主分类收一收间距与字号，免得挤成一团；图层开关同步收紧 */
  .nav-list { gap: 24px 30px; }
  .nav-sub-list { gap: 12px 18px; }
  .nav-link { font-size: 1rem; }
  .nav-sub-link { font-size: 12.5px; }
}

@media (max-width: 720px) {
  /* 窄屏仍严格执行 15vh 标题位 + 8vh 导航间距，只收左右内边距 */
  .site-header { padding: 15vh 12px 0; }
  .site-main { padding: 0 12px 10px; }
  .site-title { gap: 6px; }
  .main-nav { margin-top: 8vh; }
  /* 窄屏地图保持 10-17 版的整幅比例；四盏光点与常显的城市名由 app.js 定位，
     文字本身不参与交互，无需再按悬停收起 */
  .view-head h2 { font-size: 19px; }
  /* 窄屏：两张榜单各占一行，读起来更顺 */
  .rank-board { grid-template-columns: 1fr; }
  /* 窄屏落款：仍然是右下角两行，只收小边距 */
  .site-footer { padding: 18px 16px 24px; gap: 2px; }
}

@media (max-width: 560px) {
  /* 手机竖屏：城市名再小一档，紧贴光点，别越出地图容器 */
  .city-light-label { font-size: 9.5px; letter-spacing: .08em; }
  .city-light-wrap--left .city-light-label { right: calc(100% + 8px); }
  .city-light-wrap:not(.city-light-wrap--left) .city-light-label { left: calc(100% + 8px); }
  /* 导航一行放不下时自然换行，间距再收一档 */
  .nav-list { gap: 14px 22px; }
  .nav-link { font-size: .98rem; }
  .nav-sub-list { gap: 10px 14px; }
}

@media (max-width: 430px) {
  /* 更窄的手机上，图层导航已经占满地图顶边；重置视图与「友人地图」重复，
     收起来，让左上角那行小字自己呼吸 */
  .hero-reset { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  /* 呼吸动画全部关掉：四盏光点保持常亮，页面的骨架仍然成立 */
  .city-light { animation: none; opacity: 1; transform: none; }
  .title-at { animation: none; }
  .view.is-active, .modal-card, .nav-hint { animation: none; }
}

/* ---------------- 10. 配色收敛（说明，不是样式） ----------------
   第 5 ~ 9 节（卡片 / 榜单 / 弹窗 / 书童 / 投喂台）原本各写各的冷色硬编码，
   现在统一收到第 1 节那三支色上，冷暖两套颜色不会同屏出现：
     · 标题与正文的深色        -> var(--yn-gray-deep) / var(--yn-gray-mid)
     · 辅助小字（注脚 / 说明）  -> var(--yn-gray-soft) / var(--ink-soft)
     · 强调与悬停（数字、标签、链接）-> var(--yn-sky) / var(--yn-sky-deep)
     · 浅浅的底色块            -> var(--sky-50) / var(--sky-100) / var(--yn-paper)
     · 细线与虚线框            -> var(--yn-hairline) / var(--sky-200)
     · 阴影一律用灰调 rgba(122, 146, 168, ·)，不用偏蓝的 rgba(3, 120, 170, ·)
   只留下两类"功能性颜色"，它们不算装饰色：
     · 错误 / 危险的红色（#b3261e 系）——报错必须一眼看出来；
     · 名次徽标的金银铜（#ffd76e / #dce6ee / #f0cda9）与日期徽标的暖黄（#ffe0a3）。
   ------------------------------------------------------------------------ */

/* ---------------- 8. 书童（个人机器人）对话视图（顶部导航「伙伴」->「个人机器人」进入，与本机 Ollama 上的大模型对话） ---------------- */
/* 视图头右侧：模型状态条 + 清空对话 + 返回地图 */
.view-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 模型 / 连接状态：平时灰色小字，出错变红；没有内容时不占位置 */
.chat-status { font-size: 12.5px; color: var(--ink-soft); }
.chat-status.is-error { color: #b3261e; }
.chat-status:empty { display: none; }

.chat-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(253, 252, 248, .82);
  box-shadow: var(--shadow);
}

/* 对话记录：消息多了只在框内滚动，整页不会跟着乱跳 */
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 58vh;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--sky-50) 0%, var(--sky-100) 100%);
}

/* 欢迎语 + 快捷问题（发出第一条消息后整体收起） */
.chat-empty { display: flex; flex-direction: column; gap: 10px; }
.chat-empty[hidden] { display: none; }
.chat-welcome {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--sky-100);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--yn-gray-mid);
  font-size: 13.5px;
  line-height: 1.8;
}
.chat-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-suggest-chip {
  padding: 6px 12px;
  border: 1px dashed var(--sky-200);
  border-radius: 999px;
  background: var(--sky-50);
  color: var(--yn-sky-deep);
  font-size: 12.5px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.chat-suggest-chip:hover { background: var(--paper); border-style: solid; transform: translateY(-1px); }

/* 气泡：我发的在右边（蓝色渐变），AI 答的在左边（白底描边） */
.chat-msg { display: flex; flex-direction: column; gap: 4px; max-width: 86%; }
.chat-msg--bot { align-self: flex-start; }
.chat-msg--user { align-self: flex-end; align-items: flex-end; }
.chat-who { font-size: 11.5px; color: var(--ink-soft); letter-spacing: .4px; }
.chat-bubble {
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.8;
  word-break: break-word;
}
.chat-msg--bot .chat-bubble {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--yn-gray-soft);
  box-shadow: 0 4px 12px rgba(122, 146, 168, .08);
}
.chat-msg--user .chat-bubble {
  border: 1px solid transparent;
  background: linear-gradient(180deg, var(--yn-sky), var(--yn-sky-deep));
  color: var(--paper);
  box-shadow: 0 6px 16px rgba(92, 134, 166, .28);
}
/* 正文按原样换行：模型输出里的换行与列点都保留 */
.chat-text { margin: 0; white-space: pre-wrap; }

/* 思考过程：deepseek-r1 一定会先思考，折叠起来不抢答案的位置 */
.chat-think {
  margin: 0 0 8px;
  border: 1px dashed var(--sky-200);
  border-radius: 10px;
  background: var(--sky-50);
}
.chat-think[hidden] { display: none; }
.chat-think-label { padding: 6px 10px; color: var(--yn-sky-deep); font-size: 12px; cursor: pointer; }
.chat-think-body {
  max-height: 180px;
  overflow-y: auto;
  padding: 0 10px 10px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.75;
  white-space: pre-wrap;
}

/* 流式输出时跟在文字末尾的光标 */
.chat-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--sky-500);
  animation: chatBlink 1s step-end infinite;
}
@keyframes chatBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* 系统提示（连不上 Ollama / 模型没装 / 已停止），不进对话上下文 */
.chat-notice {
  align-self: flex-start;
  max-width: 86%;
  padding: 8px 12px;
  border: 1px dashed var(--sky-200);
  border-radius: 10px;
  background: var(--sky-50);
  color: var(--yn-sky-deep);
  font-size: 12.5px;
  line-height: 1.7;
}
.chat-notice.is-error { border-color: #f3b7b7; background: #fff5f5; color: #b3261e; }

/* file:// 打开时状态条里那个「改用正确地址」的链接（见 js/chat.js 的 setStatusFileHint） */
.chat-status a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* 输入区 */
.chat-compose { display: flex; flex-direction: column; gap: 6px; }
.chat-compose-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-input {
  flex: 1 1 auto;
  min-height: 42px;
  max-height: 132px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  resize: none;
  overflow-y: auto;
}
.chat-input:focus-visible { outline: 2px solid var(--sky-500); outline-offset: 1px; }
.chat-note { margin: 0; font-size: 11.5px; color: var(--ink-soft); }
/* 生成中的发送按钮：点不动，但别看起来像坏掉了 */
.chat-panel .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

@media (max-width: 720px) {
  /* 窄屏：对话区矮一点，气泡几乎占满宽度，输入框与按钮换行排 */
  .chat-log { max-height: 52vh; padding: 10px; }
  .chat-msg { max-width: 94%; }
  .chat-bubble { font-size: 13.5px; }
  .chat-compose-row { flex-wrap: wrap; }
  .chat-input { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-cursor { animation: none; }
}
/* ---------------- 9. 书童 · 投喂台（导航里这一项已注释掉，只剩 #train 深链接：提交文本 / 查看已提交列表，逻辑见 js/train.js） ---------------- */
/* 状态条：平时灰色小字，出错变红；没有内容时不占位置（与对话视图的 .chat-status 同样的口径） */
.train-status { font-size: 12.5px; color: var(--ink-soft); }
.train-status.is-error { color: #b3261e; }
.train-status:empty { display: none; }

.train-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(253, 252, 248, .82);
  box-shadow: var(--shadow);
}

/* 提交表单：标题 / 标签一行两列，正文独占一行 */
.train-form { display: flex; flex-direction: column; gap: 10px; }
.train-row { display: flex; gap: 10px; flex-wrap: wrap; }
.train-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; min-width: 0; }
.train-label { font-size: 12.5px; color: var(--ink-soft); }
.train-input, .train-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
}
.train-textarea { min-height: 120px; resize: vertical; }
.train-input:focus-visible, .train-textarea:focus-visible { outline: 2px solid var(--sky-500); outline-offset: 1px; }
.train-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.train-hint { font-size: 11.5px; color: var(--ink-soft); }

/* 用底座模型整理草稿（js/data.js 的 TRAIN.assist，逻辑见 js/train.js 第 3b 节）：
   虚线框和正文输入区分开；结果预览用等宽字体、保留换行，长了自己滚 */
.train-assist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--sky-200);
  border-radius: var(--radius-md);
  background: var(--sky-50);
}
.train-assist[hidden] { display: none; }
.train-assist-out {
  margin: 0;
  max-height: 32vh;
  overflow-y: auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.train-assist-out[hidden] { display: none; }

/* 列表头：条数 + "这批数据存在哪"（服务端落盘 / 浏览器本地，两条路的说明见 js/train.js） */
.train-list-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.train-list-head h3 { margin: 0; font-size: 15px; }
.train-count { color: var(--sky-700); font-weight: 700; }
.train-where { margin: 0; font-size: 11.5px; color: var(--ink-soft); }
.train-where.is-local { color: #b3261e; }
/* 底座说明（第三行）：投喂这一侧用的是哪只模型、哪个量化 */
.train-model { margin: 0; font-size: 11.5px; color: var(--ink-soft); }

/* 已提交列表：条目多了只在框内滚动 */
.train-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 52vh;
  overflow-y: auto;
}
.train-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: 0 2px 8px rgba(122, 146, 168, .06);
}
.train-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-soft); }
.train-tag {
  padding: 1px 8px;
  border: 1px solid var(--sky-200);
  border-radius: 999px;
  background: var(--sky-50);
  color: var(--sky-700);
}
.train-item-title { margin: 6px 0 2px; font-size: 14.5px; }
/* 正文按提交时的换行原样显示 */
.train-item-text { margin: 4px 0 0; font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.train-empty { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.train-empty[hidden] { display: none; }
.train-panel .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

@media (max-width: 720px) {
  /* 窄屏：标题 / 标签竖排，列表不再内部滚动（跟着页面滚更好操作） */
  .train-row { flex-direction: column; }
  .train-list { max-height: none; }
}

