@import url('https://fonts.googleapis.com/css2?family=LXGW+WenKai&display=swap');

:root {
  /* 主镇区沿用 town-ui.css 的 Faded Textile 单一 Token 源。 */
  --bg:        var(--town-canvas, #f8f6ef);
  --ink:       var(--town-ink, #52584d);
  --accent:    var(--town-accent, #75805f);
  --accent-dark: var(--town-accent-deep, #606a50);
  --soft:      var(--town-soft, #e8e9e1);
  --water:     var(--town-blue, #e5ebed);
  --blossom:   var(--town-rose, #eaded8);
  --highlight: var(--town-straw, #efe6c8);
  --grass:     #CBD887;   /* axon_bg 边缘草地采样色，极端宽高比时的补边底色 */
  --paper-texture: var(--town-paper-texture);
}

#town-maintenance-overlay[hidden] { display: none; }
#town-maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(240, 237, 232, .96);
  color: #5a5047;
}
.town-maintenance-card {
  width: min(420px, 100%);
  padding: 32px 26px;
  text-align: center;
  border: 1px solid rgba(90, 80, 71, .14);
  border-radius: 24px;
  background: rgba(255, 253, 248, .9);
  box-shadow: 0 12px 40px rgba(90, 80, 71, .12);
}
.town-maintenance-card h1 { margin: 0 0 12px; font-size: 24px; font-weight: 500; }
.town-maintenance-card p { margin: 0; font-size: 16px; line-height: 1.8; }
.town-maintenance-card small { display: block; margin-top: 14px; opacity: .7; line-height: 1.7; }

* { box-sizing: border-box; margin: 0; padding: 0; }

/* 贴图是小镇场景的一部分，不是可下载/拖拽的网页图片。
   iOS Safari/PWA 长按图片默认会弹出「保存到照片 / 拷贝」菜单；
   touch-callout 关掉原生长按菜单，user-drag/user-select 则封住桌面端拖拽与选中。 */
img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* iOS 26 横屏错报 safe-area-inset-top（刘海/灵动岛横屏时在侧面，顶部应为 0）
   归零所有用到它的元素，防止内容被下推 */
@media (orientation: landscape) {
  #nav-icons    { top: 20px !important; }
  #quick-status { top: 20px !important; }
  main#tab-content:not([data-tab="company"]):not(.machine-communicator-open) { padding-top: 76px !important; }
  main#tab-content[data-tab="company"],
  main#tab-content.machine-communicator-open { padding-top: 0 !important; }
}

/* 横屏全屏应用：页面本体不滚动，滚动都发生在面板/tab 内容内部 */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'LXGW WenKai', system-ui, -apple-system, sans-serif;
  height: 100vh;            /* 100dvh 在 iOS 26 PWA 冷启动时报错误值，保持 100vh */
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

/* iOS Safari 会在聚焦字号小于 16px 的表单控件时自动放大整个页面，
   离开输入框后还可能保持放大，导致机联网各应用看起来整体偏移。
   只在触屏设备抬高可编辑控件字号，桌面端的紧凑排版保持不变。 */
@media (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ── 竖屏软锁遮罩：纯 CSS 显隐，只盖视觉，不打断页面状态 ──
   与登录页共用抹茶小镇竖图；图面中央留白正好承接提示卡。 */
#portrait-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;           /* 高于一切页面元素 */
  background: var(--bg) url('/static/assets/ui/faded-town-portrait-mobile-v1.webp') center / cover no-repeat;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}
@media (orientation: portrait) {
  #portrait-mask { display: flex; }
}
.portrait-card {
  background: rgba(252,250,244,0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(117,128,95,0.18);
  border-radius: 20px;
  padding: 26px 30px;
  max-width: 300px;
  margin: 0 24px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(82,88,77,0.08);
  font-size: 15px;
  color: var(--ink);
}
.portrait-rotate-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 12px;
  fill: none;
  stroke: var(--accent-dark, #687354);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── 家园：全屏小院 ── */
#courtyard {
  position: fixed;
  inset: 0;
  overflow: hidden;
  --courtyard-top-extension: 0px;
  --courtyard-top-overlap: 64px;
  background-color: var(--grass);
  background-image: url('/static/assets/courtyard_grass_texture.jpg');
  background-repeat: repeat;
  background-size: 640px 640px;
}
#courtyard[data-top-overflow] {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
#courtyard[data-top-overflow]::-webkit-scrollbar { display: none; }
#courtyard-scroll-spacer {
  position: relative;
  width: 1px;
  height: calc(100% + var(--courtyard-top-extension));
  pointer-events: none;
}
#courtyard-top-extension {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--courtyard-top-extension) + var(--courtyard-top-overlap));
  overflow: hidden;
  pointer-events: none;
  background: url('/static/assets/courtyard_top_extension.jpg?v=20260823a') center bottom / cover no-repeat;
}
#courtyard[data-top-overflow] .axon-bg {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--courtyard-top-overlap));
  mask-image: linear-gradient(to bottom, transparent, #000 var(--courtyard-top-overlap));
}
/* 舞台外补出的草地也跟随昼暮夜，避免夜里院内变暗、院外仍然亮绿。 */
#courtyard[data-period="dawn"] {
  background-image:
    linear-gradient(rgba(255, 210, 100, 0.38), rgba(255, 210, 100, 0.38)),
    url('/static/assets/courtyard_grass_texture.jpg');
  background-blend-mode: screen, normal;
}
#courtyard[data-period="dusk"] {
  background-image:
    linear-gradient(rgba(100, 45, 80, 0.45), rgba(100, 45, 80, 0.45)),
    url('/static/assets/courtyard_grass_texture.jpg');
  background-blend-mode: multiply, normal;
}
#courtyard[data-period="night"] {
  background-image:
    linear-gradient(rgba(20, 35, 85, 0.62), rgba(20, 35, 85, 0.62)),
    url('/static/assets/courtyard_grass_texture.jpg');
  background-blend-mode: multiply, normal;
}
#courtyard[data-home-space="room"] {
  background-color: #d8cab5;
  background-image: none;
}
#courtyard[data-home-space="room"] #courtyard-top-extension {
  display: none;
}
#home-space-return {
  position: fixed;
  z-index: 28;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(91, 63, 42, .2);
  border-radius: 999px;
  color: #5c412f;
  background: rgba(255, 249, 237, .76);
  box-shadow: 0 3px 12px rgba(58, 37, 22, .1);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.25;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.home-return-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 14px;
  width: 14px;
  height: 12px;
}
.home-return-icon::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 3px;
  width: 6px;
  height: 6px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.home-return-icon::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 6px;
  width: 10px;
  border-top: 1.5px solid currentColor;
}
#home-space-return[hidden] { display: none; }
.axon-furniture.axon-room-entrance { cursor: pointer; pointer-events: auto; }
.axon-room-entrance:hover img,
.axon-room-entrance:focus-visible img {
  filter: drop-shadow(0 0 8px rgba(255, 229, 158, .95));
}
.axon-furniture.axon-direct-interaction { cursor: pointer; pointer-events: auto; }
.axon-direct-interaction:hover img,
.axon-direct-interaction:focus-visible img {
  filter: drop-shadow(0 0 7px rgba(255, 228, 153, .85));
}
/* stage = 铺满视口的轴测图画布，几何尺寸由 home.js::computeTileMetrics 统一计算写入。
   JS 尚未接管前默认铺满视口，保证初始 loading 文案可见 */
.axon-container {
  position: absolute;
  z-index: 1;
  left: 0; top: 0;
  width: 100%; height: 100%;
}
#courtyard-stage {
  opacity: 1;
  transition: opacity 360ms ease;
}
#courtyard.is-space-switching #courtyard-stage {
  opacity: 0;
}
.home-scene-ghost {
  position: fixed !important;
  z-index: 18 !important;
  margin: 0 !important;
  overflow: hidden;
  opacity: 1;
  pointer-events: none;
  transition: opacity 360ms ease;
}
.home-scene-ghost.is-leaving {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  #courtyard-stage,
  .home-scene-ghost { transition-duration: 1ms; }
}
.axon-container img.axon-bg {
  width: 100%;
  height: 100%;
  display: block;
}
/* 地毯层：结构和 .axon-overlay 完全一样（按格子摆放、col+row 深度排序），
   只是整个容器的 z-index 卡在地板和 .axon-overlay 之间——地毯在地板之上，
   但同格或视觉重叠的家具永远盖住地毯（家具层整体 z-index 更高）。 */
.axon-rug-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
.axon-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
}
/* 家具贴图：以底部中心对齐 tileToPercent() 算出的落地点（家具"站"在格子上），
   宽度按 FURNITURE_SCALE 倍数设置，高度由图片自身宽高比自动撑开，不做菱形裁切 —
   实物贴图比地板格高（床/秋千等立体家具），裁成菱形会把上半截切掉 */
.axon-furniture {
  position: absolute;
  transform: translate(-50%, -100%);
  /* 普通透明 PNG 的矩形画布不参与命中，避免透明区域截走更高优先级的拖动/点击。 */
  pointer-events: none;
}
/* Rugs and slippers are flat/irregular floor objects: their visible center,
   rather than the bottom edge of a rectangular image canvas, sits on the tile. */
.axon-furniture.axon-floor-centered {
  transform: translate(-50%, -50%);
}
/* 时空画框本身仍是明确的交互入口。 */
.axon-furniture.axon-frame {
  pointer-events: auto;
}
.axon-furniture.axon-piano {
  pointer-events: auto;
  cursor: pointer;
  outline: none;
}
.axon-piano:hover img,
.axon-piano:focus-visible img {
  filter: drop-shadow(0 0 6px rgba(232, 195, 105, .95)) drop-shadow(0 2px 3px rgba(0,0,0,.25));
}
.axon-furniture img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25));
}
/* A rug touches the floor across its whole footprint. The generic furniture
   shadow reads as an air gap, so rugs keep only their painted edge shading. */
.axon-rug-overlay .axon-furniture img {
  filter: none;
}
.axon-furniture.axon-human-movable { pointer-events: auto; }
.axon-human-movable {
  cursor: grab;
  outline: none;
  touch-action: none;
  user-select: none;
}
.axon-human-movable.is-dragging {
  cursor: grabbing;
  opacity: .88;
  filter: drop-shadow(0 0 7px rgba(143, 204, 238, .95));
}
.axon-human-movable:hover img,
.axon-human-movable:focus-visible img {
  filter: drop-shadow(0 0 5px rgba(143, 204, 238, .95)) drop-shadow(0 2px 3px rgba(0,0,0,.25));
}
/* 花圃分层：植物按阶段独立缩放，根部统一落在土面中心；
   不要求每株植物焊死一份花圃，三套六阶段贴图共用同一落点。 */
.axon-garden-bed .garden-plant {
  position: absolute;
  left: 50%;
  bottom: 48%;
  height: auto;
  transform: translateX(-50%);
  transform-origin: center bottom;
  z-index: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18));
}
.axon-garden-bed .garden-bed-base {
  position: relative;
  z-index: 0;
}
/* 原瓶图的瓶腹并非真正透明，因此花以柔和半透明层落在瓶腹内；
   尺寸限制在肩线以下，保留“隔着玻璃看花”的感觉，也不会伸出瓶口。 */
.axon-flower-bottle .bottle-flower {
  position: absolute;
  left: 20%;
  bottom: 17%;
  width: 56%;
  height: 52%;
  object-fit: contain;
  object-position: center bottom;
  z-index: 1;
  opacity: 0.78;
  filter: saturate(0.92) drop-shadow(0 1px 1px rgba(0,0,0,0.14));
}
.axon-flower-bottle .bottle-glass {
  position: relative;
  z-index: 0;
}
/* 毛茸茸的幼鸡起会在院子里散步。外层平滑换格，贴图边走边轻轻颠一下；
   --chicken-facing 只翻鸡本身，不改变底部中心落地点。 */
.axon-chicken {
  transition-property: left, top;
  transition-timing-function: ease-in-out;
  will-change: left, top;
}
.axon-chicken img {
  transform: scaleX(var(--chicken-facing, 1));
  transform-origin: center bottom;
}
/* 鸡蛋的实体只占方形素材中间约一半，手机上容易与浅黄地砖融在一起。
   放大外层后再补一枚很淡的落地光圈，不改贴图本身、也不盖住孵化阶段。 */
.axon-chicken-egg::after {
  content: '';
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 1%;
  height: 16%;
  border-radius: 50%;
  background: rgba(255, 221, 104, .24);
  box-shadow: 0 0 9px rgba(255, 230, 137, .34);
  z-index: -1;
  pointer-events: none;
}
.axon-chicken-egg img {
  filter: drop-shadow(0 2px 3px rgba(92, 67, 24, .28)) drop-shadow(0 0 3px rgba(255, 241, 170, .48));
}
.axon-chicken.is-walking img {
  animation: chicken-waddle 0.28s ease-in-out infinite alternate;
}
@keyframes chicken-waddle {
  from { transform: scaleX(var(--chicken-facing, 1)) translateY(0); }
  to   { transform: scaleX(var(--chicken-facing, 1)) translateY(-4%); }
}
@media (prefers-reduced-motion: reduce) {
  .axon-chicken { transition-duration: 0.01ms !important; }
  .axon-chicken.is-walking img { animation: none; }
}
/* 贴图加载失败时的兜底占位色块（见 home.js renderAxonTile 的 onerror） */
.axon-furniture-fallback {
  background: var(--fallback-color, var(--town-wood));
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  opacity: 0.82;
}
.axon-furniture-fallback img {
  display: none;
}

/* ── 时间氛围遮罩（盖住整座小院，家具也一起进入昼暮夜氛围） ── */
.axon-container .time-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
/* 北侧出现家具延展区时，沿用主舞台这一张遮罩向上覆盖整个滚动内容。
   不再给延展背景另画一张定高遮罩，避免两层在舞台顶部形成硬接缝。 */
#courtyard[data-top-overflow] #courtyard-stage > .time-overlay {
  top: calc(-1 * var(--courtyard-atmosphere-reach, 0px));
  bottom: auto;
  height: calc(100% + var(--courtyard-atmosphere-reach, 0px));
}
.axon-container .time-overlay.dawn {
  background: rgba(255, 210, 100, 0.38);
  mix-blend-mode: screen;
}
.axon-container .time-overlay.day {
  background: rgba(255, 255, 230, 0.07);
  mix-blend-mode: screen;
}
.axon-container .time-overlay.dusk {
  background: linear-gradient(to bottom, rgba(200, 55, 15, 0.30), rgba(255, 115, 35, 0.16));
  mix-blend-mode: multiply;
}
.axon-container .time-overlay.night {
  background: rgba(8, 12, 75, 0.52);
  mix-blend-mode: multiply;
}

/* 0811 小夜灯的柔光独立压在夜色层之上；白天不显示，夜间才照亮周围一小圈。 */
.night-light-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.night-light-glow {
  position: absolute;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -72%);
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle,
    rgba(255, 246, 178, .72) 0%,
    rgba(255, 221, 116, .34) 34%,
    rgba(255, 208, 102, 0) 72%);
  mix-blend-mode: screen;
  filter: blur(3px);
}
#courtyard[data-period="night"] .night-light-glow {
  opacity: .92;
  animation: night-light-breathe 3.8s ease-in-out infinite alternate;
}
.night-light-glow.floor-lamp-glow {
  transform: translate(-50%, -66%);
  background: radial-gradient(circle,
    rgba(255, 239, 184, .68) 0%,
    rgba(242, 196, 111, .30) 38%,
    rgba(230, 176, 88, 0) 74%);
}
@keyframes night-light-breathe {
  from { transform: translate(-50%, -72%) scale(.96); opacity: .78; }
  to { transform: translate(-50%, -72%) scale(1.06); opacity: 1; }
}

/* ── 全镇每日天气（小院与地图共用；只做轻氛围，不遮挡操作） ── */
.weather-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}
.weather-overlay::before,
.weather-overlay::after {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
}
.weather-clear {
  background: radial-gradient(circle at 72% 15%, rgba(255, 244, 188, .18), transparent 38%);
}
.weather-cloudy {
  background: linear-gradient(to bottom, rgba(198, 207, 211, .20), rgba(230, 232, 225, .07));
  mix-blend-mode: multiply;
}
.weather-rain {
  background:
    linear-gradient(to bottom, rgba(57, 83, 96, .13), rgba(79, 106, 116, .04) 58%, rgba(207, 226, 229, .09));
}
.weather-particle {
  position: absolute;
  left: var(--x);
  top: -14%;
  z-index: 1;
  display: block;
  opacity: var(--particle-opacity);
  pointer-events: none;
  will-change: transform;
  animation-delay: var(--delay);
  animation-duration: var(--duration);
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}
.weather-rain .weather-particle {
  width: .85px;
  height: var(--size);
  border-radius: 999px;
  background: linear-gradient(
    to bottom,
    transparent 0 9%,
    rgba(102, 132, 145, .20) 28%,
    rgba(69, 101, 116, .68) 62%,
    rgba(240, 249, 249, .96) 100%
  );
  box-shadow: 0 0 .65px rgba(56, 85, 99, .38);
  transform-origin: center;
  animation-name: town-rain-particle;
}
.weather-rain .weather-variant-1 { width: .55px; }
.weather-rain .weather-variant-2 { width: 1.1px; }
.weather-rain .weather-variant-1,
.weather-snow .weather-variant-1 { filter: blur(.25px); }
.weather-snow {
  background: linear-gradient(to bottom, rgba(238, 246, 246, .06), rgba(248, 250, 245, .13));
}
.weather-snow .weather-particle {
  width: auto;
  height: auto;
  color: rgba(251, 253, 248, .92);
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--size);
  line-height: 1;
  text-shadow: 0 1px 1px rgba(92, 112, 119, .24), 0 0 4px rgba(255, 255, 255, .58);
  animation-name: town-snow-particle;
}
.weather-snow .weather-variant-2 {
  filter: drop-shadow(0 1px 2px rgba(92, 112, 119, .18));
}
.weather-wind {
  /* 风痕在家具/地图热区下方，避免白线压在物件表面。 */
  z-index: 1;
  background:
    linear-gradient(98deg, rgba(225, 236, 229, .025) 8%, rgba(228, 239, 232, .075) 43%, rgba(198, 216, 205, .025) 71%);
}
.weather-wind-gust {
  position: absolute;
  left: var(--gust-x);
  top: var(--gust-y);
  width: 128px;
  height: 54px;
  display: block;
  opacity: 0;
  transform-origin: left center;
  pointer-events: none;
  will-change: left, top, opacity, transform;
  animation: town-wind-gust var(--gust-duration) cubic-bezier(.33, .02, .31, 1) var(--gust-delay) infinite;
}
.weather-wind-gust > i {
  position: absolute;
  left: var(--segment-shift);
  top: var(--segment-y);
  width: var(--segment-width);
  height: var(--segment-curve);
  display: block;
  border-top: 2px solid rgba(103, 145, 126, .95);
  border-radius: 54% 47% 0 0;
  opacity: var(--segment-opacity);
  transform: rotate(var(--segment-rotate));
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 19%, #000 76%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 19%, #000 76%, transparent 100%);
  filter: drop-shadow(0 .5px .55px rgba(73, 112, 93, .18));
}
/* 环境轻动是风的主要辅助线索；幅度极小，且只跟随两阵短风出现。 */
#courtyard-stage:has(> .weather-wind) .garden-plant {
  animation: town-wind-plant 20s ease-in-out infinite;
}
#courtyard-stage:has(> .weather-wind) .bottle-flower {
  transform-origin: center bottom;
  animation: town-wind-bottle-flower 20s ease-in-out infinite;
}
#courtyard-stage:has(> .weather-wind) .axon-chicken:not(.is-walking):not(.axon-chicken-egg) img {
  animation: town-wind-chicken 20s ease-in-out infinite;
}
.weather-fog {
  opacity: .62;
  background: linear-gradient(
    100deg,
    rgba(231, 237, 233, .76),
    rgba(174, 191, 185, .30) 36%,
    rgba(249, 250, 245, .78) 68%,
    rgba(185, 201, 195, .28)
  );
  background-size: 220% 100%;
  -webkit-backdrop-filter: saturate(.78) contrast(.94);
  backdrop-filter: saturate(.78) contrast(.94);
  animation: town-fog 12s ease-in-out infinite alternate;
}
@keyframes town-rain-particle {
  from { transform: translate3d(0, -16vh, 0) rotate(8deg); }
  to { transform: translate3d(-12vw, 124vh, 0) rotate(8deg); }
}
@keyframes town-snow-particle {
  0% { transform: translate3d(0, -12vh, 0) rotate(0); }
  46% { transform: translate3d(var(--drift-mid), 48vh, 0) rotate(150deg); }
  100% { transform: translate3d(var(--drift-end), 122vh, 0) rotate(var(--spin)); }
}
@keyframes town-wind-gust {
  0%, 2% {
    left: var(--gust-x); top: var(--gust-y); opacity: 0;
    transform: translate3d(-8px, -2px, 0) rotate(var(--gust-tilt)) scaleX(.82);
  }
  5% { opacity: var(--gust-opacity); }
  11% { opacity: var(--gust-soft-opacity); }
  16% {
    left: var(--gust-x); top: var(--gust-y); opacity: 0;
    transform: translate3d(var(--gust-dx), var(--gust-dy), 0) rotate(var(--gust-tilt)) scaleX(1.07);
  }
  17%, 48% { left: var(--gust-x); top: var(--gust-y); opacity: 0; }
  49%, 50% {
    left: var(--gust-x2); top: var(--gust-y2); opacity: 0;
    transform: translate3d(-7px, -1px, 0) rotate(var(--gust-tilt)) scaleX(.84);
  }
  53% { opacity: var(--gust-second-opacity); }
  59% { opacity: var(--gust-second-soft-opacity); }
  65% {
    left: var(--gust-x2); top: var(--gust-y2); opacity: 0;
    transform: translate3d(var(--gust-dx), var(--gust-dy), 0) rotate(var(--gust-tilt)) scaleX(1.05);
  }
  66%, 100% { left: var(--gust-x2); top: var(--gust-y2); opacity: 0; }
}
@keyframes town-wind-plant {
  0%, 3%, 17%, 50%, 66%, 100% { transform: translateX(-50%) rotate(0); }
  7%, 55% { transform: translateX(-50%) rotate(1.5deg); }
  12%, 61% { transform: translateX(-50%) rotate(-.45deg); }
}
@keyframes town-wind-bottle-flower {
  0%, 3%, 17%, 50%, 66%, 100% { transform: rotate(0); }
  7%, 55% { transform: rotate(1.1deg); }
  12%, 61% { transform: rotate(-.3deg); }
}
@keyframes town-wind-chicken {
  0%, 3%, 17%, 50%, 66%, 100% { transform: scaleX(var(--chicken-facing, 1)) translateX(0); }
  7%, 55% { transform: scaleX(var(--chicken-facing, 1)) translateX(1.2%); }
  12%, 61% { transform: scaleX(var(--chicken-facing, 1)) translateX(-.35%); }
}
@keyframes town-fog {
  from { background-position: 0 0; }
  to { background-position: 100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .weather-particle { display: none; }
  .weather-wind-gust { display: none; }
  #courtyard-stage:has(> .weather-wind) .garden-plant,
  #courtyard-stage:has(> .weather-wind) .bottle-flower,
  #courtyard-stage:has(> .weather-wind) .axon-chicken:not(.is-walking) img,
  .weather-fog { animation: none; }
}

/* ── 家园上锁（全屏居中卡片） ── */
#courtyard-locked {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.locked-view {
  text-align: center;
  padding: 32px;
  color: var(--accent);
  font-size: 14px;
  max-width: 320px;
}
.locked-view .lock-icon { font-size: 32px; margin-bottom: 12px; }

/* ── 状态速览条（屏幕上边缘，极简） ── */
#quick-status {
  position: fixed;
  top: max(20px, calc(10px + env(safe-area-inset-top))); /* iOS 26 横屏顶部 ~20px 触摸死区 */
  right: calc(14px + env(safe-area-inset-right));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid rgba(117,128,95,.12);
  background: rgba(252,250,244,0.84);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 3px 14px rgba(82,88,77,0.055);
  font-size: 12px;
  color: var(--ink);
}
#quick-status:empty { display: none; }
.qs-item { display: flex; align-items: center; gap: 5px; }
.qs-label { font-size: 11px; color: var(--accent); }
.town-clock {
  gap: 6px;
  padding-right: 11px;
  border-right: 1px solid rgba(117,128,95,.16);
  white-space: nowrap;
}
#town-clock-value {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: var(--ink);
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
#town-clock-compact-date { display: none; }
.town-clock-zone {
  color: var(--accent-dark);
  font-family: 'LXGW WenKai', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
}

/* 窄横屏保留短日期，压成「小镇时间 08-31 14:30 UTC」。 */
@media (max-width: 900px) and (orientation: landscape) {
  #quick-status {
    gap: 7px;
    padding-inline: 9px;
  }
  .town-clock { gap: 3px; padding-right: 7px; }
  #town-clock-date { display: none; }
  #town-clock-compact-date { display: inline; }
  body.nav-menu-open #town-clock { display: none; }
}

/* ── 折叠式小镇导航 ── */
#nav-icons {
  position: fixed;
  top: max(20px, calc(10px + env(safe-area-inset-top))); /* iOS 26 横屏顶部 ~20px 触摸死区 */
  left: calc(8px + env(safe-area-inset-left));
  z-index: 30;
  width: 52px;
  height: 52px;
}

/* 罗盘像是小镇场景里遗落的一件物品：没有按钮底片，也不做高对比投影。 */
#nav-compass {
  position: relative;
  width: 52px;
  height: 52px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .88;
  transition: transform .18s ease, opacity .18s ease;
  -webkit-tap-highlight-color: transparent;
}
#nav-compass:hover { opacity: 1; transform: translateY(-1px); }
#nav-compass:active { transform: scale(.95); }
#nav-compass:focus { outline: none; }
#nav-compass:focus-visible {
  outline: 2px solid rgba(126,94,55,.34);
  outline-offset: 1px;
  border-radius: 50%;
}
#nav-compass[aria-expanded="true"] { opacity: 1; }
#nav-compass img {
  position: relative;
  top: -10px;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: transform .28s ease;
}
#nav-compass[aria-expanded="true"] img { transform: rotate(-10deg); }

/* 其余入口平时藏在罗盘后面，打开时沿屏幕上缘依次向右舒展开。 */
#nav-menu {
  position: absolute;
  top: 0;
  left: 46px;
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  padding: 1px 5px 1px 4px;
}
#nav-menu[hidden] { display: none; }
.nav-item {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 1;
  transition: opacity .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
/* 保留 42px 点击区，只让相邻点击区轻叠 6px；视觉间隙约缩小三分之一。 */
.nav-item + .nav-item { margin-left: -6px; }
.nav-item:nth-child(2) img { animation-delay: .025s; }
.nav-item:nth-child(3) img { animation-delay: .05s; }
.nav-item:nth-child(4) img { animation-delay: .075s; }
.nav-item:nth-child(5) img { animation-delay: .1s; }
.nav-item:nth-child(6) img { animation-delay: .125s; }
@keyframes nav-icon-unfurl {
  from { opacity: 0; transform: translateX(-18px) scale(.72); }
  to { opacity: 1; transform: none; }
}
.nav-item img {
  position: relative;
  top: -8px;
  width: 38px;
  height: 38px;
  object-fit: contain;
  pointer-events: none;
  opacity: 1;
  transform: none;
  animation: nav-icon-unfurl .22s cubic-bezier(.2,.72,.3,1) backwards;
}
.nav-item[data-tab="map"] img {
  top: -12px;
  width: 46px;
  height: 46px;
}
.nav-item[data-tab="online"] img {
  top: -11px;
  width: 40px;
  height: 40px;
}
.nav-item:hover { opacity: 1; transform: translateY(-1px) scale(1.03); }
.nav-item:active { transform: scale(.94); }
.nav-item:focus { outline: none; }
.nav-item:focus-visible { box-shadow: 0 0 0 2px rgba(126,94,55,.28); }
.nav-item.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(205,139,102,.78);
  transform: translateX(-50%);
  box-shadow: 0 0 4px rgba(240,230,200,.85);
}
.nav-unread-badge {
  position: absolute;
  z-index: 2;
  top: -6px;
  right: -1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 2px solid #fbf6eb;
  border-radius: 99px;
  background: #d98270;
  color: white;
  font: 700 8px/12px system-ui, sans-serif;
  text-align: center;
  box-shadow: 0 2px 5px rgba(93, 55, 39, .2);
}
.nav-unread-badge[hidden] { display: none; }
.nav-item.disabled {
  opacity: .42;
  pointer-events: none;
}
.nav-item[hidden] { display: none; }

/* ── 纺星季（入口暂时 hidden，开季后直接复用） ── */
.star-weaving-page {
  min-height: 100%;
  padding: 22px 24px 28px;
  color: #f8f1d9;
  background: #0d2546;
  font-family: "LXGW WenKai", serif;
}
.star-weaving-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto 13px;
}
.star-weaving-head small { color: #d9bd78; letter-spacing: .12em; }
.star-weaving-head h1 { margin: 3px 0 2px; font-size: clamp(24px, 3vw, 42px); font-weight: 500; }
.star-weaving-head p { margin: 0; color: rgba(248,241,217,.72); }
.star-weaving-progress {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid rgba(220,190,119,.35);
  border-radius: 999px;
  color: #e7ce90;
  font-size: 12px;
}
.star-weaving-region-tabs {
  display: flex;
  gap: 8px;
  max-width: 1440px;
  margin: 0 auto 10px;
  overflow-x: auto;
}
.star-weaving-region-tabs button {
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 5px 9px;
  background: transparent;
  color: rgba(248,241,217,.58);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.star-weaving-region-tabs button.active { color: #f4d88e; border-color: #d9bd78; }
.star-weaving-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 14px;
  max-width: 1440px;
  margin: auto;
}
.star-weaving-canvas {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: 10px;
  background: #112c50;
  box-shadow: 0 14px 45px rgba(2, 9, 24, .26);
}
.star-weaving-sky,
.star-weaving-figures,
.star-weaving-hotspots { position: absolute; inset: 0; width: 100%; height: 100%; }
.star-weaving-sky-picture { position: absolute; inset: 0; display: block; }
.star-weaving-sky { z-index: 0; display: block; object-fit: cover; transition: filter 1.2s ease; }
.star-weaving-figures { z-index: 2; pointer-events: none; }
.star-weaving-hotspots { z-index: 3; }
.star-weaving-page.is-complete .star-weaving-sky {
  filter: brightness(1.08) saturate(1.08);
}
.star-weaving-page.is-complete .star-weaving-canvas::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,225,143,.13), transparent 42%),
    linear-gradient(115deg, transparent 20%, rgba(238,197,99,.07) 50%, transparent 78%);
  mix-blend-mode: screen;
}
.star-weaving-complete-mark {
  position: absolute;
  z-index: 4;
  top: 13px;
  right: 15px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px 4px 5px;
  border: 1px solid rgba(255,226,151,.42);
  border-radius: 999px;
  background: rgba(14,37,70,.48);
  color: rgba(255,235,178,.88);
  font-size: 11px;
  letter-spacing: .08em;
  backdrop-filter: blur(3px);
}
.star-weaving-complete-mark img { width: 23px; height: 23px; object-fit: contain; }
.star-resident {
  position: absolute;
  width: var(--resident-h);
  height: var(--resident-h);
  margin: 0;
  transform: translate(-50%, -94%) rotate(var(--resident-tilt));
  transform-origin: 50% 94%;
  z-index: 2;
}
.star-resident img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(2,8,20,.28));
}
.star-resident figcaption {
  position: absolute;
  top: 14%;
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
  color: rgba(248,241,217,.68);
  font-size: clamp(6px, .66vw, 10px);
  line-height: 1;
  letter-spacing: -.08em;
  text-shadow: 0 1px 3px rgba(0,7,20,.8);
}
.star-resident figcaption.name-left { right: 92%; }
.star-resident figcaption.name-right { left: 92%; }
.star-resident.is-me figcaption { color: #ffe7a2; }
.star-planet-hotspot {
  position: absolute;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.star-planet-hotspot:hover,
.star-planet-hotspot:focus-visible,
.star-planet-hotspot.is-selected {
  outline: none;
  border-color: rgba(255,229,155,.72);
  box-shadow: 0 0 16px rgba(235,197,104,.22);
}
.star-planet-hotspot.is-full { cursor: default; }
.star-weaving-detail {
  align-self: start;
  min-height: 220px;
  padding: 16px;
  border: 1px solid rgba(226,199,132,.22);
  border-radius: 9px;
  background: rgba(8,25,49,.66);
}
.star-weaving-detail small { color: rgba(222,196,132,.62); letter-spacing: .08em; }
.star-weaving-detail h2 { margin: 4px 0 8px; color: #f2d995; font-size: 19px; font-weight: 500; }
.star-weaving-detail h3 { margin: 15px 0 5px; color: #e9d7aa; font-size: 13px; font-weight: 500; }
.star-weaving-detail p,
.star-weaving-detail li { color: rgba(248,241,217,.72); font-size: 12px; line-height: 1.7; }
.star-weaving-detail ul { margin: 0; padding-left: 1.2em; max-height: 210px; overflow: auto; }
.star-weaving-detail .star-weaving-capacity { color: #dabb70; }
.star-weaving-detail .star-weaving-empty { color: rgba(248,241,217,.48); }

@media (max-width: 900px) {
  .star-weaving-page { padding: 14px; }
  .star-weaving-head { align-items: start; }
  .star-weaving-head p { display: none; }
  .star-weaving-layout { grid-template-columns: minmax(0, 1fr) 180px; }
  .star-weaving-detail { padding: 10px; }
}

/* 资料仍保留原插画，但缩小、降饱和并压到角落，减少遮挡和视觉重量。 */
#profile-fab {
  position: fixed;
  right: 0;
  right: max(0px, calc(env(safe-area-inset-right) - 17px));
  bottom: 0;
  bottom: max(0px, calc(env(safe-area-inset-bottom) - 10px));
  z-index: 30;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: none;
  padding: 0;
  cursor: pointer;
  opacity: .95;
  transition: opacity .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
#profile-fab:hover { opacity: 1; transform: translateY(-1px); }
#profile-fab:active { transform: scale(.95); }
#profile-fab:focus { outline: none; }
#profile-fab:focus-visible {
  outline: 2px solid rgba(126,94,55,.34);
  outline-offset: 0;
}
#profile-fab img {
  position: relative;
  left: 6px;
  top: 6px;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── 通讯器 / 地图 tab 页（覆盖层，内部滚动） ── */
main#tab-content {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f8f6ef;
  padding: calc(76px + env(safe-area-inset-top)) 24px 24px;
}
main#tab-content:is([data-tab="company"],[data-tab="machine-network"],[data-tab="online"],[data-tab="star-weaving"]) {
  background:
    linear-gradient(rgba(248,246,239,.86), rgba(248,246,239,.92)),
    url('/static/assets/ui/faded-town-wide-v1.webp?v=20260827a') center / cover fixed no-repeat;
}
/* 通讯器是独立的全屏界面：外层不再滚动，避免从其他 tab 带入
   scrollTop 后整块界面向下/向上偏移。只把滚动交给会话列表和消息区。 */
main#tab-content[data-tab="company"] {
  overflow: hidden;
  overscroll-behavior: none;
  padding: 0;
}
#tab-content > * {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* ── 小镇通讯器（人类端只读） ── */
#tab-content > #communicator-page,
.machine-network-communicator-host > #communicator-page {
  width: min(1120px, 100%);
  max-width: 1120px;
  height: calc(100dvh - 100px - env(safe-area-inset-top));
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(230px, 29%) 1fr;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(117, 128, 95, .14);
  border-radius: 18px;
  background: rgba(252, 250, 244, .94);
  box-shadow: 0 12px 36px rgba(82, 88, 77, .08);
}
main#tab-content[data-tab="company"] > #communicator-page,
main#tab-content.machine-communicator-open .machine-network-communicator-host > #communicator-page {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.communicator-loading {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 13px;
}
.communicator-sidebar {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(246, 235, 209, .78), rgba(255, 252, 244, .9));
  border-right: 1px solid rgba(126, 94, 55, .14);
}
.communicator-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  flex-shrink: 0;
}
.communicator-brand > div { min-width: 0; }
.communicator-brand p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 全屏时把左上角留给罗盘，文字从罗盘右侧开始；
   安全区只影响内容，背景仍一直铺到屏幕边缘。 */
main#tab-content[data-tab="company"] .communicator-brand,
main#tab-content.machine-communicator-open .communicator-brand {
  min-height: 62px;
  padding-left: max(70px, calc(env(safe-area-inset-left) + 62px));
}
main#tab-content[data-tab="company"] .communicator-brand img,
main#tab-content.machine-communicator-open .communicator-brand img { display: none; }
.communicator-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(61, 46, 30, .14));
}
.communicator-brand h1,
.communicator-brand p,
.communicator-chat-head h2,
.communicator-chat-head p { margin: 0; }
.communicator-brand h1 { font-size: 15px; font-weight: 600; }
.communicator-brand p { margin-top: 2px; font-size: 11px; color: var(--accent); }
.communicator-mode-tabs {
  margin: 0 12px 10px;
  padding: 3px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  border-radius: 11px;
  background: rgba(126, 94, 55, .08);
}
.communicator-mode-tabs button {
  min-width: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8e7457;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}
.communicator-mode-tabs button.active {
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(61, 46, 30, .08);
}
.communicator-mode-tabs button span {
  min-width: 15px;
  height: 15px;
  margin-left: 3px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: #df805f;
  color: white;
  font-family: system-ui, sans-serif;
  font-size: 8px;
  vertical-align: 1px;
}
.communicator-notices {
  margin: 0 12px 10px;
  padding: 8px 10px;
  display: flex;
  gap: 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(212, 151, 90, .2);
  color: #8e633d;
  font-size: 10px;
  line-height: 1.55;
}
.communicator-notices > .msym { font-size: 17px; flex-shrink: 0; }
.communicator-notices div { display: grid; }
.communicator-mode-pane,
.communicator-detail-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.communicator-mode-pane[hidden],
.communicator-detail-pane[hidden] { display: none !important; }
.communicator-mode-pane > .communicator-thread-list { flex: 1; }
.communicator-thread-list {
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px max(12px, env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.communicator-thread {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 8px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.communicator-thread:hover { background: rgba(255, 255, 255, .6); }
.communicator-thread.active { background: white; box-shadow: 0 2px 10px rgba(61,46,30,.07); }
.communicator-avatar {
  position: relative;
  overflow: hidden;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f3bd77;
  color: white;
  font-size: 17px;
  box-shadow: inset 0 0 0 1px rgba(126, 94, 55, .09);
}
.communicator-avatar > span:not(.msym),
.communicator-space-post-avatar > span,
.communicator-message-avatar > span { position: relative; z-index: 0; }
.communicator-avatar > img,
.communicator-space-post-avatar > img,
.communicator-message-avatar > img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.communicator-avatar.group { background: #8bbf9b; }
.communicator-avatar.group.private { background: #8e86ad; }
.communicator-avatar.official { background: #b58b58; }
.communicator-avatar .msym { font-size: 21px; }
.communicator-thread-copy { min-width: 0; display: grid; gap: 2px; }
.communicator-thread-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.communicator-thread-title small { margin-left: 5px; color: #aa947c; font-family: system-ui, sans-serif; font-size: 8px; font-weight: 400; }
.communicator-thread-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--accent); }
.communicator-thread-tail { align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.communicator-thread time { padding-top: 2px; font-size: 9px; color: #aa947c; }
.communicator-unread {
  min-width: 18px;
  height: 18px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 99px;
  background: #df805f;
  color: white;
  font-family: system-ui, sans-serif;
  font-size: 9px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(126, 65, 45, .18);
}
.communicator-unread.mention { min-width: 18px; padding: 0 4px; background: #bd7646; }
.communicator-space-person {
  width: 100%;
  min-width: 0;
  padding: 9px 8px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.communicator-space-person:hover { background: rgba(255, 255, 255, .6); }
.communicator-space-person.active { background: white; box-shadow: 0 2px 10px rgba(61,46,30,.07); }
.communicator-avatar.space { background: #8bbf9b; }
.communicator-avatar.space.self { background: #dba96b; }
.communicator-space-count {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 99px;
  background: rgba(126, 94, 55, .08);
  color: #a28c73;
  font-family: system-ui, sans-serif;
  font-size: 9px;
  text-align: center;
}
.communicator-empty-list {
  min-height: 180px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 22px;
  text-align: center;
  color: var(--accent);
}
.communicator-empty-list .msym { font-size: 30px; opacity: .65; }
.communicator-empty-list p { margin: 7px 0 2px; font-size: 12px; }
.communicator-empty-list small { font-size: 10px; line-height: 1.6; }
.communicator-chat { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.communicator-chat-head {
  min-height: 65px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(126, 94, 55, .12);
  background: rgba(255,255,255,.52);
}
main#tab-content[data-tab="company"] .communicator-chat-head {
  padding-right: max(20px, calc(env(safe-area-inset-right) + 12px));
}
.communicator-chat-head h2 { font-size: 14px; font-weight: 600; }
.communicator-chat-head p { margin-top: 3px; font-size: 10px; color: var(--accent); }
.communicator-readonly {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 99px;
  background: #f6eddd;
  color: #96744f;
  font-size: 9px;
}
.communicator-readonly .msym { font-size: 12px; }
.communicator-readonly.private { background: #eeeaf5; color: #776c96; }
.communicator-private-lock {
  flex: 1;
  min-height: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 32px;
  text-align: center;
  color: #776c96;
  background:
    radial-gradient(circle at 50% 42%, rgba(142, 134, 173, .13), transparent 26%),
    linear-gradient(145deg, rgba(255,255,255,.68), rgba(242,238,248,.76));
}
.communicator-private-lock > .msym {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #8e86ad;
  color: white;
  font-size: 27px;
  box-shadow: 0 8px 24px rgba(95, 82, 132, .2);
}
.communicator-private-lock h3 { margin-top: 14px; font-size: 16px; color: #5e5579; }
.communicator-private-lock p { margin-top: 7px; font-size: 12px; }
.communicator-private-lock small {
  max-width: 390px;
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.7;
  color: #968dab;
}
.communicator-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px max(22px, calc(env(safe-area-inset-right) + 12px))
    max(58px, calc(env(safe-area-inset-bottom) + 32px)) 22px;
  background:
    radial-gradient(circle at 12% 18%, rgba(247, 206, 153, .12), transparent 22%),
    radial-gradient(circle at 88% 82%, rgba(139, 191, 155, .1), transparent 24%);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.communicator-message {
  width: fit-content;
  max-width: min(78%, 640px);
  margin: 0 auto 13px 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}
.communicator-message.mine {
  margin-left: auto;
  margin-right: 0;
  grid-template-columns: minmax(0, 1fr) 30px;
}
.communicator-message-copy { min-width: 0; }
.communicator-message-avatar {
  position: relative;
  overflow: hidden;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e1aa69;
  color: white;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(126, 94, 55, .09);
}
.communicator-message.mine .communicator-message-avatar {
  grid-column: 2;
  grid-row: 1;
  background: #8bbf9b;
}
.communicator-message.mine .communicator-message-copy { grid-column: 1; grid-row: 1; }
.communicator-message-meta { margin: 0 5px 4px; color: #a28c73; font-size: 9px; }
.communicator-message.mine .communicator-message-meta { text-align: right; }
.communicator-bubble-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.communicator-message.mine .communicator-bubble-stack { align-items: flex-end; }
.communicator-bubble {
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 2px 8px rgba(61,46,30,.07);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.communicator-message.mine .communicator-bubble {
  border-radius: 20px;
  background: #f6d59e;
}
.communicator-bubble-stack .communicator-bubble:not(:only-child) {
  border-radius: 20px;
}
.communicator-bubble-stack .communicator-bubble:not(:only-child):not(:first-child) {
  border-top-left-radius: 20px;
}
.communicator-message.mine .communicator-bubble-stack .communicator-bubble:not(:only-child) {
  border-radius: 20px;
}
.communicator-message.mine .communicator-bubble-stack .communicator-bubble:not(:only-child):not(:first-child) {
  border-top-right-radius: 20px;
}
.communicator-message.mentioned .communicator-bubble {
  box-shadow: 0 0 0 1px rgba(199, 132, 73, .28), 0 3px 12px rgba(123, 86, 48, .1);
}
.communicator-quote {
  margin: -2px -3px 7px;
  padding: 6px 8px;
  display: grid;
  gap: 1px;
  border-left: 3px solid #c99561;
  border-radius: 5px;
  background: rgba(157, 121, 82, .09);
  color: #8c765d;
  font-size: 10px;
  line-height: 1.45;
}
.communicator-quote strong { color: #755c42; font-weight: 600; }
.communicator-quote span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.communicator-mention {
  color: #a76438;
  font-weight: 650;
}
.communicator-no-messages {
  height: 100%;
  display: grid;
  place-items: center;
  color: #aa947c;
  font-size: 11px;
}
.communicator-space-head { flex-shrink: 0; }
.communicator-space-feed {
  flex: 1;
  min-height: 0;
  padding: 18px max(22px, calc(env(safe-area-inset-right) + 12px))
    max(58px, calc(env(safe-area-inset-bottom) + 34px)) 22px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 88% 10%, rgba(139, 191, 155, .12), transparent 22%),
    radial-gradient(circle at 8% 82%, rgba(247, 206, 153, .12), transparent 24%);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.communicator-space-post {
  max-width: 640px;
  margin: 0 auto 14px;
  padding: 15px 17px;
  border: 1px solid rgba(126, 94, 55, .09);
  border-radius: 15px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 3px 14px rgba(61, 46, 30, .06);
}
.communicator-space-post > header {
  display: flex;
  align-items: center;
  gap: 9px;
}
.communicator-space-post-avatar {
  position: relative;
  overflow: hidden;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: #f3bd77;
  color: white;
  font-size: 15px;
}
.communicator-space-post header div { min-width: 0; display: grid; gap: 2px; }
.communicator-space-post header strong { font-size: 12px; font-weight: 600; }
.communicator-space-post header small { color: #aa947c; font-size: 9px; }
.communicator-space-post-text {
  margin: 13px 0;
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.communicator-space-reactions {
  padding-top: 9px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(126, 94, 55, .09);
  color: #96744f;
  font-size: 9px;
}
.communicator-space-comments {
  margin-top: 9px;
  padding: 8px 10px;
  display: grid;
  gap: 5px;
  border-radius: 9px;
  background: rgba(246, 237, 221, .72);
  color: #6f5942;
  font-size: 10px;
  line-height: 1.55;
}
.communicator-space-comments strong { color: #8b6744; font-weight: 600; }
.communicator-space-empty {
  min-height: 260px;
  display: grid;
  place-content: center;
  justify-items: center;
  color: #aa947c;
  text-align: center;
}
.communicator-space-empty .msym { font-size: 34px; opacity: .68; }
.communicator-space-empty p { margin: 8px 0 3px; font-size: 12px; }
.communicator-space-empty small { font-size: 10px; }
.communicator-blank {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  text-align: center;
  color: var(--accent);
}
.communicator-blank img { width: 90px; height: 90px; object-fit: contain; opacity: .82; }
.communicator-blank p { margin: 8px 0 3px; font-size: 13px; }
.communicator-blank small { max-width: 340px; font-size: 10px; line-height: 1.6; }

@media (max-width: 760px) and (orientation: landscape) {
  #tab-content > #communicator-page { grid-template-columns: minmax(190px, 34%) 1fr; }
  .communicator-brand { padding: 9px 11px 7px; }
  .communicator-brand img { width: 36px; height: 36px; }
  .communicator-mode-tabs { margin: 0 8px 6px; }
  .communicator-notices { margin: 0 8px 6px; max-height: 42px; overflow: hidden; }
  .communicator-thread { padding: 7px 6px; grid-template-columns: 32px minmax(0, 1fr) auto; }
  .communicator-avatar { width: 32px; height: 32px; border-radius: 10px; }
  .communicator-chat-head { min-height: 52px; padding: 8px 14px; }
  .communicator-messages { padding: 12px 14px 24px; }
  .communicator-space-feed { padding: 12px 14px 24px; }
  .communicator-space-post { padding: 12px 14px; }
}

/* ── 纸张纹理卡片 ── */
.card {
  background: rgba(252, 250, 244, .82);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 3px 14px rgba(82,88,77,0.045);
  background-image: var(--paper-texture);
}

/* ── 滑入面板（资料 / 日志） ── */
#panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(66,72,64,0.25);
}
.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: clamp(300px, 46vw, 440px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-image: var(--paper-texture);
  box-shadow: -8px 12px 32px rgba(82,88,77,0.12);
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .28s ease, visibility 0s linear .28s;
  padding-right: env(safe-area-inset-right);
}
.side-panel.open {
  transform: none;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--soft);
  font-size: 15px;
  flex-shrink: 0;
}
.panel-close {
  border: none;
  background: none;
  font-size: 16px;
  color: var(--accent);
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
}
.panel-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
}
.panel-divider {
  border-top: 1px solid var(--soft);
  margin: 14px 0;
}

/* 居民资料侧栏本身是一张悬浮大卡；内部不再嵌套第二层卡片。 */
#profile-panel {
  top: 14px;
  right: 14px;
  bottom: 14px;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  height: auto;
  padding-right: 0;
  overflow: hidden;
  border: 1px solid rgba(117,128,95,.28);
  border-radius: 30px;
  background: var(--town-canvas);
  box-shadow: -8px 14px 36px rgba(82,88,77,.12);
  transform: translateX(calc(100% + 80px));
  transform: translateX(calc(100% + env(safe-area-inset-right) + 32px));
}
#profile-panel.open {
  transform: none;
  background: var(--town-canvas) url('/static/assets/ui/panel-grid-sage-v1.webp?v=20260827a') center / 520px 520px repeat;
}
#profile-panel .panel-head {
  background: rgba(252,250,244,.78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
#profile-panel .panel-body {
  padding: 0 18px 18px;
  background: rgba(252,250,244,.12);
}
.resident-profile-card {
  min-height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.resident-profile-identity {
  margin: 0 -18px 10px;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: inset 0 -1px rgba(142,153,123,.25);
}
#profile-panel .panel-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: stretch;
  gap: 5px 7px;
  /* 面板自身的 bottom 已经避开安全区；底栏不再重复垫高。 */
  padding: 6px 14px 7px;
  background: rgba(248,246,239,.9);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-top-color: rgba(142,153,123,.42);
}
#profile-panel #account-name {
  flex: 0 0 100%;
  min-width: 0;
  overflow: hidden;
  color: rgba(143, 119, 84, .88);
  font-size: 10px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#profile-panel .panel-foot > .foot-btn,
#profile-panel .panel-foot > .foot-dropdown-wrap {
  flex: 1 1 0;
  min-width: max-content;
}
#profile-panel .panel-foot > .foot-dropdown-wrap > .foot-btn {
  width: 100%;
}
#profile-panel .panel-foot .foot-btn {
  padding: 3px 8px;
  font-size: 11px;
  line-height: 1.35;
}
#profile-panel .panel-foot > .foot-actions {
  display: none;
}
#profile-panel .panel-divider {
  height: 38px;
  margin: 7px 0;
  border: 0;
  background: url('/static/assets/ui/profile-botanical-divider.png?v=20260825a') center / 100% auto no-repeat;
  opacity: .68;
}

/* 行动日志使用同一张悬浮侧栏大卡，换成雾蓝灰格纹以区分资料页。 */
#log-panel {
  top: 14px;
  right: 14px;
  bottom: 14px;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  height: auto;
  padding-right: 0;
  overflow: hidden;
  border: 1px solid rgba(144,160,169,.28);
  border-radius: 30px;
  background: var(--town-canvas);
  box-shadow: -8px 14px 36px rgba(72,84,90,.11);
  transform: translateX(calc(100% + 80px));
  transform: translateX(calc(100% + env(safe-area-inset-right) + 32px));
}
#log-panel.open {
  transform: none;
  background: var(--town-canvas) url('/static/assets/ui/panel-grid-blue-v1.webp?v=20260827a') center / 520px 520px repeat;
}
#log-panel .panel-head {
  background: rgba(245,241,234,.8);
  border-bottom-color: rgba(154,168,191,.38);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
#log-panel .panel-body {
  padding: 14px 18px 18px;
  background: rgba(245,241,234,.16);
}
#log-panel .log-entry {
  border-bottom-color: rgba(115,128,150,.22);
}

/* 资料面板内的行动条目 / 日志条目 */
.log-entry {
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.log-entry:last-child { border-bottom: none; }
.log-time { color: var(--accent); }
.log-empty { font-size: 12px; color: var(--accent); }

/* ── 状态值条 ── */
.stat-bar-wrap { margin-bottom: 8px; }
.stat-label    { font-size: 12px; color: var(--accent); margin-bottom: 3px; }
.stat-bar-bg   {
  height: 6px;
  background: var(--soft);
  border-radius: 99px;
  overflow: hidden;
}
.stat-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}
.stat-bar-fill.energy  { background: var(--water); }
.stat-bar-fill.health  { background: var(--blossom); }
.stat-bar-fill.clean   { background: var(--highlight); }

/* ── 角色换装画布 ── */
.sprite-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.sprite-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── 地图页（全屏手绘大地图） ── */
#map-page {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
  width: 100vw;
  max-width: none !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 18%, rgba(118, 132, 92, .12), transparent 28%),
    radial-gradient(circle at 90% 82%, rgba(177, 151, 102, .11), transparent 30%),
    #eee7d6;
}
/* 超宽/偏方视口只把同一张地图作为柔焦纸面延展；清晰主图始终保持原始比例。 */
#map-page::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -28px;
  background:
    linear-gradient(rgba(241, 234, 216, .7), rgba(238, 231, 214, .76)),
    url('/static/img/town-map-v6.jpg?v=20260827a') center / cover no-repeat;
  background-image:
    linear-gradient(rgba(241, 234, 216, .7), rgba(238, 231, 214, .76)),
    image-set(
      url('/static/img/town-map-v6-mobile.webp?v=20260907p1') type('image/webp'),
      url('/static/img/town-map-v6.jpg?v=20260827a') type('image/jpeg')
    );
  background-position: center, center;
  background-size: auto, cover;
  background-repeat: no-repeat;
  filter: blur(18px) saturate(.72);
  opacity: .58;
  transform: scale(1.035);
  pointer-events: none;
}
@media (min-width: 981px) {
  #map-page::before {
    background-image:
      linear-gradient(rgba(241, 234, 216, .7), rgba(238, 231, 214, .76)),
      image-set(
        url('/static/img/town-map-v6.webp?v=20260827a') type('image/webp'),
        url('/static/img/town-map-v6.jpg?v=20260827a') type('image/jpeg')
      );
  }
}
/* 底图与热区共用 1672:941 的等比舞台。视口只决定舞台尺寸，不改变坐标系。 */
#map-stage {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 56.280vw;
  max-width: 177.683vh;
  max-height: 100vh;
  max-width: 177.683dvh;
  max-height: 100dvh;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(72, 70, 53, .1);
}
#map-stage img#map-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* 地名/圆点已画在底图里，锚点只标"当前位置"（呼吸光环套在手绘圆点上） */
.map-anchor {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;   /* 地点纯展示，不做点击交互 */
}
.map-anchor.active {
  border: 3px solid var(--blossom);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.7), 0 2px 8px rgba(61,46,30,0.25);
  animation: pulse 1.5s infinite;
}
/* ?dots=1 校准模式：显示全部锚点 */
.map-anchor.debug {
  width: 10px;
  height: 10px;
  background: rgba(220, 60, 60, 0.75);
  border: 1px solid white;
}
/* 可点击建筑热区（Phase 28）：透明覆盖，地图视觉零变化；?dots=1 显示虚线范围供校准 */
.map-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.map-hotspot.debug { outline: 2px dashed rgba(60, 120, 220, 0.7); }
#map-wish-tree-viewer[hidden] { display: none; }
#map-wish-tree-viewer {
  /* 祈愿树属于视口级界面，不参与地图 Grid 的居中计算。部分 Android
     横屏浏览器会把 absolute Grid 子项沿块轴轻微偏移，露出底部白边。 */
  position: fixed;
  z-index: 12;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  overflow: hidden;
  background: var(--canvas, #f7f3e8);
}
#map-wish-tree-viewer #wishes-slot {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.map-wish-tree-close {
  position: absolute;
  z-index: 45;
  top: calc(16px + env(safe-area-inset-top));
  left: calc(16px + env(safe-area-inset-left));
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid rgba(117, 128, 95, .3);
  border-radius: 999px;
  background: rgba(252, 250, 242, .88);
  color: #5d6758;
  font: inherit;
  font-size: 12px;
  box-shadow: 0 5px 18px rgba(70, 78, 62, .11);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
body.map-wish-tree-open #nav-icons,
body.map-wish-tree-open #quick-status,
body.map-wish-tree-open #profile-fab {
  visibility: hidden;
  pointer-events: none;
}
/* 护身符面板（Phase 28） */
#amulet-body .amulet-target { font-size: 13px; color: var(--accent); margin-bottom: 8px; }
#amulet-body .amulet-sealed { margin: 12px 0; }
#amulet-body .amulet-hint   { font-size: 12px; color: var(--accent); margin: 6px 0 10px; }
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(255,255,255,0.7), 0 0 0 0 rgba(232,180,160,0.55); }
  50%      { box-shadow: 0 0 0 2px rgba(255,255,255,0.7), 0 0 0 10px rgba(232,180,160,0); }
}
#map-status {
  position: fixed;
  z-index: 2;
  right: calc(62px + env(safe-area-inset-right));   /* 让开缩小后贴边的资料入口 */
  bottom: calc(16px + env(safe-area-inset-bottom));
  padding: 8px 16px;
  border-radius: 99px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 1px 6px rgba(61,46,30,0.15);
  font-size: 13px;
  color: var(--ink);
}

/* ── 加载/错误 ── */
.loading-hint {
  text-align: center;
  padding: 48px 16px;
  color: var(--accent);
  font-size: 14px;
}
#courtyard-stage .loading-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 20px;
  background: rgba(255,255,255,0.85);
  border-radius: 12px;
  white-space: nowrap;
}
.scene-loading-hint,
.map-scene-loading {
  z-index: 8;
  box-shadow: 0 2px 14px rgba(61,46,30,.12);
  pointer-events: none;
}
.map-scene-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  white-space: nowrap;
}
.scene-loading-hint.is-error,
.map-scene-loading.is-error { color: #9b514b; }

/* ── mood 心情短句 ── */
.mood-flavor {
  font-size: 11px;
  color: var(--accent);
  font-style: italic;
  opacity: 0.85;
  margin-bottom: 10px;
  min-height: 0;
}

/* ── 账号登出入口（资料面板底部，低调） ──
   旧共享密码登录遮罩（#login-overlay/.login-*）随邀请制账号系统下线，
   登录/注册移到独立页面 /login（static/login.html，自带样式）。 */
.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--soft);
  font-size: 12px;
  color: var(--accent);
}
.foot-actions { display: flex; gap: 6px; }
.foot-btn {
  border: 1px solid var(--soft);
  background: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
}
.foot-btn:hover { border-color: var(--accent); color: var(--ink); }
.tea-room-foot-btn { position: relative; }
.tea-room-unread-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: #d84f45;
  box-shadow: 0 1px 4px rgba(139, 47, 39, .3);
}
.tea-room-unread-dot[hidden] { display: none; }

/* ── 账号操作条下拉菜单 ── */
.foot-dropdown-wrap { position: relative; display: inline-block; }
.foot-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--soft);
  border-radius: 10px;
  padding: 4px 0;
  min-width: 130px;
  max-height: min(42vh, 320px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 142, 108, .58) rgba(126, 142, 108, .10);
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
  z-index: 200;
}
.foot-dropdown::-webkit-scrollbar { width: 7px; }
.foot-dropdown::-webkit-scrollbar-track {
  background: rgba(126, 142, 108, .10);
  border-radius: 999px;
}
.foot-dropdown::-webkit-scrollbar-thumb {
  min-height: 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(126, 142, 108, .58);
  background-clip: padding-box;
}
.foot-dropdown-item {
  padding: 8px 14px;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink);
  white-space: nowrap;
}
.foot-dropdown-item:hover { background: var(--soft); }
.foot-dropdown-item--meta {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--soft);
  background: var(--bg);
  color: var(--accent);
  cursor: default;
  font-weight: 600;
}
.foot-dropdown-item--meta:hover { background: var(--bg); }
.guide-foot-menu .foot-dropdown {
  min-width: 170px;
}
/* AI 连接位于底栏最左侧：菜单必须向右展开，否则较宽菜单会越过
   资料卡左缘并被圆角卡片的 overflow 裁掉。 */
#profile-panel .ai-foot-menu .foot-dropdown {
  left: 0;
  right: auto;
}

/* ── 管理员工具（单独成框，与账号操作条分开） ── */
.admin-tools {
  margin: 0 14px;
  padding: 8px 10px;
  border: 1px solid var(--water);
  border-radius: 10px;
  background: rgba(168,196,190,0.08);
}
.admin-tools-head {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #6f9a92;
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
  list-style: none;   /* Firefox */
}
.admin-tools-head::-webkit-details-marker { display: none; }  /* Safari/Chrome */
details.admin-tools[open] .admin-tools-head { margin-bottom: 7px; }
.admin-tools-head .msym { font-size: 15px; }
.admin-tools-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── AI 连接（全员可见的自助令牌框，暖色区别于青绿的管理员框） ── */
.ai-connect { border-color: var(--accent); background: rgba(196,168,130,0.10); margin-bottom: 8px; }
.ai-connect .admin-tools-head { color: var(--accent); }
.ai-connect-hint { font-size: 12px; line-height: 1.6; color: var(--ink); opacity: 0.75; margin: 0 0 7px; }
.bind-token-hint { font-size: 12px; line-height: 1.7; margin-top: 12px; opacity: 0.8; }
.bind-token-hint a { color: var(--accent); }

/* ── 小弹窗（改密码 / 邀请码管理） ── */
#modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(61,46,30,0.28);
  z-index: 400;
}
.mini-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 401;
  width: min(340px, calc(100vw - 48px));
  max-height: 80vh;         /* dvh 回退 */
  max-height: 80dvh;
  overflow-y: auto;
  background: var(--bg);
  background-image: var(--paper-texture);
  border-radius: 16px;
  padding: 16px 18px 18px;
  box-shadow: 0 6px 28px rgba(61,46,30,0.25);
}
.mini-modal.piano-modal { width: min(390px, calc(100vw - 40px)); }
.piano-notes {
  margin: 8px 0;
  padding: 9px 10px;
  border-radius: 10px;
  color: #745b2e;
  background: rgba(232, 195, 105, .15);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

/* ── 部署安全检查（管理员）── */
.mini-modal.deployment-safety-modal { width: min(430px, calc(100vw - 32px)); }
.deploy-window-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
}
.deploy-window-row .modal-input { width: 72px; margin: 0; padding: 6px 8px; }
.deployment-safety-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--soft);
  border-radius: 12px;
  background: rgba(0,0,0,.025);
}
.deployment-safety-status strong { font-size: 15px; }
.deployment-safety-status span { font-size: 12px; line-height: 1.55; }
.deployment-safety-status.is-safe { color: #39745c; border-color: #9bc7af; background: rgba(107,177,139,.10); }
.deployment-safety-status.is-wait { color: #8a642b; border-color: #d9bc83; background: rgba(221,179,96,.11); }
.deployment-safety-status.is-error { color: #9a493f; border-color: #d6a29c; background: rgba(194,94,82,.08); }
.deployment-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 9px 0; }
.deployment-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px;
  border-radius: 10px;
  background: rgba(168,196,190,.10);
}
.deployment-metrics span { font-size: 10px; color: var(--accent); }
.deployment-metrics strong { font-size: 17px; color: var(--ink); }
.deployment-call-list h4,
.deployment-tool-breakdown h4 { margin: 10px 0 5px; font-size: 11px; color: var(--accent); font-weight: 500; }
.deployment-call-list > div { display: flex; justify-content: space-between; gap: 8px; padding: 4px 2px; font-size: 12px; }
.deployment-call-list code,
.deployment-tool-breakdown code { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.deployment-tool-breakdown > div { display: flex; flex-wrap: wrap; gap: 6px; }
.deployment-tool-breakdown > div > span { padding: 4px 7px; border-radius: 99px; background: var(--soft); font-size: 11px; }
.deployment-safety-hint { margin: 11px 0 0; }

/* ── 絮语森林 · 窗外观察全屏页 / 幸运兔放生 ── */
main#tab-content[data-tab="forest"] {
  padding: calc(30px + env(safe-area-inset-top)) max(74px, calc(28px + env(safe-area-inset-right))) 48px max(74px, calc(28px + env(safe-area-inset-left)));
  background:
    linear-gradient(rgba(238, 243, 231, .84), rgba(249, 247, 239, .94)),
    url('/static/assets/ui/faded-town-wide-v1.webp?v=20260827a') center / cover fixed no-repeat;
}
#tab-content > #forest-page {
  width: min(1040px, 100%);
  max-width: 1040px;
}
.forest-page { color: #4f584d; }
.forest-page-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 22px;
}
.forest-page-head h1 {
  margin: 3px 0 6px;
  font-size: clamp(27px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: .12em;
}
.forest-page-head p { margin: 0; color: #75836f; font-size: 12px; line-height: 1.7; }
.forest-page-kicker { display: flex; align-items: center; gap: 5px; letter-spacing: .18em; }
.forest-page-kicker .msym { font-size: 17px; }
.forest-page-back {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid rgba(117,128,95,.23);
  border-radius: 999px;
  background: rgba(255,253,247,.72);
  color: #657260;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.forest-page-back:focus-visible,
.forest-kick-action:focus-visible { outline: 2px solid #74856f; outline-offset: 3px; }
.forest-page-sections { display: grid; gap: 18px; }
.forest-page-card {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(117,128,95,.16);
  border-radius: 24px;
  background: rgba(252,250,244,.78);
  box-shadow: 0 8px 24px rgba(82,88,77,.045);
}
.forest-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}
.forest-section-head p {
  margin: 0 0 3px;
  color: #8b987f;
  font-size: 9px;
  letter-spacing: .22em;
}
.forest-section-head h2 { margin: 0; color: #52604d; font-size: 18px; font-weight: 500; letter-spacing: .08em; }
.forest-section-head > span { color: #8b987f; font-size: 10px; letter-spacing: .08em; }
.forest-kick-target {
  display: grid;
  grid-template-columns: auto minmax(180px, 320px);
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
}
.forest-kick-target[hidden] { display: none; }
.forest-kick-target label { color: #66725f; font-size: 11px; letter-spacing: .05em; }
.forest-kick-target .modal-input { margin: 0; }
.forest-kick-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(126, 97, 64, .18);
  border-radius: 15px;
  background: rgba(239, 229, 206, .30);
}
.forest-kick-card.is-armed { background: rgba(218, 225, 207, .35); }
.forest-kick-card.is-stuck { background: rgba(224, 202, 181, .34); }
.forest-kick-mark {
  font-size: 30px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.forest-kick-card strong { color: var(--ink); font-size: 15px; }
.forest-kick-card p { margin: 6px 0; color: var(--accent); font-size: 12px; line-height: 1.65; }
.forest-kick-card small { color: var(--accent); font-size: 10px; }
.forest-kick-action { width: auto; min-width: 128px; margin-top: 7px; }
.forest-kick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.forest-kick-action.is-shadow {
  border-color: rgba(107, 104, 137, .30);
  background: rgba(235, 232, 245, .72);
  color: #66627f;
}
.forest-kick-action.is-cancel {
  border-color: rgba(126, 97, 64, .18);
  background: rgba(255, 255, 255, .48);
  color: #887967;
}
.forest-kick-card .forest-kick-note { font-size: 10px; }
.forest-kick-card .forest-kick-last { color: #7c6a55; font-size: 11px; }
.forest-kick-card .forest-kick-spectators {
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(137, 156, 118, .10);
  color: #66725f;
  font-size: 11px;
}
@media (max-width: 760px) {
  main#tab-content[data-tab="forest"] {
    padding: calc(20px + env(safe-area-inset-top)) max(58px, calc(18px + env(safe-area-inset-right))) 32px max(58px, calc(18px + env(safe-area-inset-left)));
  }
  .forest-page-head { gap: 12px; }
  .forest-section-head { align-items: start; }
  .forest-section-head > span { max-width: 150px; text-align: right; }
}
@media (max-width: 520px) {
  .forest-kick-target { grid-template-columns: 1fr; gap: 5px; }
  .forest-kick-card { grid-template-columns: 66px minmax(0, 1fr); gap: 9px; padding: 10px; }
  .forest-kick-mark { font-size: 23px; }
}
.rabbit-intro {
  margin: 0 0 12px;
}
.rabbit-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.rabbit-choice {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 6px 9px;
  border: 1px solid var(--soft);
  border-radius: 13px;
  background: rgba(255, 255, 255, .32);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.rabbit-choice:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}
.rabbit-choice:has(input:checked) {
  border-color: #7c9d72;
  background: rgba(180, 205, 164, .22);
  box-shadow: 0 0 0 2px rgba(124, 157, 114, .12);
}
.rabbit-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rabbit-choice img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}
.rabbit-choice span {
  white-space: nowrap;
}
.rabbit-name-label {
  display: block;
  margin: 13px 0 6px;
  font-size: 12px;
  color: var(--accent);
}
.rabbit-release-button {
  margin-top: 10px;
}
.rabbit-lifetime-note {
  margin: 8px 0 0;
  color: var(--accent);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}
.rabbit-released-card {
  text-align: center;
}
.rabbit-released-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.rabbit-released-list .rabbit-released-card {
  padding: 8px;
  border: 1px solid var(--soft);
  border-radius: 13px;
  background: rgba(255, 255, 255, .24);
}
.rabbit-released-card img {
  display: block;
  width: min(230px, 70vw);
  margin: -8px auto -4px;
}
.rabbit-released-list .rabbit-released-card img {
  width: min(150px, 100%);
}
.rabbit-released-name {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: .08em;
}
.rabbit-released-type {
  margin: 4px 0 8px;
  color: #7c9d72;
  font-size: 12px;
}
.rabbit-bond-name {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 11px;
  line-height: 1.5;
}
.rabbit-release-form.has-released-rabbits {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--soft);
}
.rabbit-release-form #lucky-rabbit-resident {
  margin-bottom: 12px;
}
.rabbit-released-card .modal-hint {
  margin: 0 auto;
  max-width: 420px;
}
@media (max-width: 520px) {
  .rabbit-choice-grid { gap: 5px; }
  .rabbit-choice { padding: 5px 2px 7px; font-size: 10px; }
}

/* ── 玩法与机制大全（联机页内置全屏阅读器）── */
#guide-viewer {
  position: fixed;
  inset: 0;
  z-index: 540;
  display: none;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: var(--town-canvas);
}
#guide-viewer.open { display: flex; }
.guide-viewer-head {
  min-height: 46px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding:
    max(7px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    7px
    max(14px, env(safe-area-inset-left));
  color: var(--town-ink);
  background: rgba(252, 250, 244, .94);
  border-bottom: 1px solid rgba(117, 128, 95, .14);
  box-shadow: 0 3px 14px rgba(82, 88, 77, .06);
}
.guide-viewer-head > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.guide-viewer-head strong { font-size: 14px; letter-spacing: .08em; white-space: nowrap; }
.guide-viewer-head span {
  overflow: hidden;
  color: var(--town-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guide-viewer-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(117, 128, 95, .22);
  border-radius: 50%;
  background: rgba(248, 246, 239, .9);
  color: #59634f;
  font: 16px/1 system-ui, sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.guide-viewer-close:active { transform: scale(.94); }
#guide-frame {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  border: 0;
  background: var(--town-canvas);
}

/* ── 沉睡山洞 · forgooo（地图热区打开的横屏双人控制席）── */
#forgooo-panel {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: none;
  flex-direction: column;
  background: #e9e0d2;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}
#forgooo-panel.open { display: flex; }
.forgooo-panel-head {
  min-height: 48px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 14px;
  color: #f5f0e8;
  background: #3a2e28;
  box-shadow: 0 2px 12px rgba(37, 27, 21, .24);
}
.forgooo-panel-head > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.forgooo-panel-head strong {
  font-size: 14px;
  letter-spacing: .04em;
}
.forgooo-panel-head span {
  font-size: 11px;
  color: #d9cbbc;
}
.forgooo-close {
  width: 34px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  color: #f5f0e8;
  background: rgba(255, 255, 255, .08);
  font: inherit;
  cursor: pointer;
}
#forgooo-frame {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  border: 0;
  background: #e9e0d2;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 12px;
}
.modal-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--soft);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: rgba(255,255,255,0.75);
  outline: none;
}
.modal-input:focus { border-color: var(--accent); }
.modal-submit {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.modal-submit:disabled { opacity: 0.6; cursor: default; }
.modal-msg { margin-top: 10px; font-size: 12px; color: #B0604D; overflow-wrap: anywhere; }
.modal-msg.ok { color: var(--accent); }
.modal-hint { font-size: 12px; line-height: 1.6; color: var(--accent); margin-bottom: 10px; }
.modal-hint code { font-size: 11px; padding: 0 3px; border-radius: 4px; background: rgba(196,168,130,0.18); }
.recover-label { display: block; font-size: 11px; color: var(--accent); letter-spacing: 1px; margin: 4px 0 5px; }

/* 绑定码输入卡片（主页未绑定居民状态） */
#courtyard-stage .bind-card {
  white-space: normal;
  width: min(320px, 80vw);
  font-size: 13px;
  color: var(--ink);
}
.bind-card .modal-input { margin-bottom: 8px; letter-spacing: 2px; }

/* 邀请码管理 */
.invite-create-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 6px;
}
.invite-create-row .modal-input { width: 64px; margin-bottom: 0; text-align: center; }
.invite-create-row .modal-submit { width: auto; flex: 1; }
.invite-list { margin-top: 10px; }
.invite-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 12px;
}
.invite-row:last-child { border-bottom: none; }
.invite-row.inactive { opacity: 0.5; }
.invite-code {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  color: var(--ink);
  user-select: all;
}
.invite-usage { color: var(--accent); white-space: nowrap; }
.invite-state { color: var(--accent); white-space: nowrap; }

/* ── Material Symbols 内联图标 ── */
.msym {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 17px;
  line-height: 1;
  vertical-align: -3px;
  letter-spacing: normal;
  display: inline-block;
  color: var(--accent);
}

/* ── 资料面板：称号条目 ── */
.title-entry { padding: 4px 0; }
.title-name  { font-size: 13px; color: var(--ink); }
.title-flavor {
  font-size: 11px;
  color: var(--accent);
  font-style: italic;
  margin-top: 1px;
}

/* ── 资料面板：往季图鉴 ── */
.season-collection-heading {
  margin: 10px 0 6px;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1px;
}
.season-collection-list { display: grid; gap: 7px; }
.season-collection-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(121, 98, 75, 0.16);
  border-radius: 10px;
  background: rgba(255, 252, 244, 0.62);
}
.season-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(72, 62, 55, 0.12);
}
.season-collection-card.is-locked .season-badge {
  filter: grayscale(1);
  opacity: 0.34;
}
.season-collection-info { min-width: 0; }
.season-collection-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
}
.season-collection-title small,
.season-collection-meta,
.season-badge-state {
  color: var(--accent);
  font-size: 10px;
}
.season-collection-card .stat-bar-wrap { margin-top: 4px; }
.season-badge-state { margin-top: 3px; }
.season-collection-card:not(.is-locked) .season-badge-state { color: #9b5f4e; }

/* ── 联机页：小镇留言板 ── */
.post-entry {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.post-entry:last-child { border-bottom: none; }
.post-meta {
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 3px;
}
.post-title {
  font-size: 10px;
  opacity: 0.75;
  margin: 0 2px;
}
.post-text {
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.post-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 20px;
}
.post-likes {
  font-size: 11px;
  color: #C9973F;   /* 小太阳暖金色 */
}
.like-btn {
  border: 1px solid var(--soft);
  background: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
}
.like-btn:hover:not([disabled]) { border-color: #C9973F; color: #C9973F; }
.like-btn.liked, .like-btn[disabled] { opacity: 0.55; cursor: default; }
.post-comment {
  font-size: 12px;
  color: var(--ink);
  padding: 3px 0 0 12px;
  overflow-wrap: anywhere;
}
.post-comment-author { color: var(--accent); }

/* ── 联机页：祈愿树愿望列表 ── */
.wish-entry {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.wish-entry:last-child { border-bottom: none; }
.wish-meta {
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 2px;
}
.wish-text {
  font-size: 13px;
  color: var(--ink);
}

/* ── 时空管理处：明信片 / 玫瑰弹窗 ── */
#msg-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;              /* 高于 mini-modal(401)，低于竖屏遮罩(1000) */
  background: rgba(61,46,30,0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  animation: msg-fade-in 0.35s ease;
}
@keyframes msg-fade-in { from { opacity: 0; } }
@keyframes msg-pop { from { transform: scale(0.86); opacity: 0; } }

.msg-postcard {
  position: relative;
  /* 底图 1535×1024 ≈ 3:2，宽度同时受视宽与视高约束 */
  width: min(720px, 86vw, 110vh); /* dvh 回退 */
  width: min(720px, 86vw, 110dvh);
  animation: msg-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.12);
}
.msg-postcard img {
  display: block;
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}
/* 文字压在底图中央留白区（避开右上邮票与底部村景） */
.msg-postcard-text {
  position: absolute;
  left: 9%;
  top: 24%;
  width: 70%;
  height: 42%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-align: center;
}
.msg-postcard-text p {
  margin: 0;
  max-width: 100%;
  font-size: clamp(13px, 2.6vw, 19px);
  line-height: 1.9;
  overflow-wrap: break-word;
}
.msg-postcard-sign {
  margin-top: 10px;
  align-self: flex-end;
  font-size: clamp(11px, 1.8vw, 14px);
  line-height: 1.6;
  color: rgba(61,46,30,0.72);
  text-align: right;
}

.msg-rose {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: msg-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.12);
}
.msg-rose img {
  width: min(300px, 48vh, 60vw);  /* dvh 回退 */
  width: min(300px, 48dvh, 60vw);
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.35));
  animation: rose-bob 3s ease-in-out infinite;
}
@keyframes rose-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.msg-rose-caption {
  color: #FBF4E8;
  font-size: 16px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.msg-rose-note {
  max-width: 70vw;
  color: rgba(251,244,232,0.85);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* 2026 七夕限定 · 旧录音笔。图是水彩资产，播放状态与文字保持可访问的原生 UI。 */
.msg-recorder {
  position: relative;
  width: min(440px, 82vw, 92vh);
  width: min(440px, 82vw, 92dvh);
  padding: 8px 14px 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #fffaf0;
  text-align: center;
  cursor: default;
  animation: msg-pop .45s cubic-bezier(.2,.9,.3,1.12);
  isolation: isolate;
}
.msg-recorder::before,
.msg-recorder::after {
  display: none;
}
.msg-recorder-kicker {
  margin-bottom: 0;
  color: rgba(255,250,240,.76);
  font-size: 10px;
  letter-spacing: .22em;
  text-shadow: 0 1px 5px rgba(0,0,0,.7);
}
.msg-recorder-object {
  position: relative;
  display: block;
  width: min(270px, 55vw, 55vh);
  width: min(270px, 55vw, 55dvh);
  margin: -5px auto -4px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.msg-recorder-object img {
  display: block;
  width: 100%;
  filter: drop-shadow(0 10px 11px rgba(71, 60, 40, .22));
  transition: transform .2s ease, filter .2s ease;
}
.msg-recorder-object:hover img,
.msg-recorder-object:focus-visible img { transform: translateY(-2px) rotate(-.4deg); }
.msg-recorder-object:focus-visible { outline: 2px solid #879783; outline-offset: 5px; border-radius: 22px; }
.msg-recorder-play {
  position: absolute;
  right: 18.5%;
  bottom: 20.5%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(250, 244, 222, .9);
  box-shadow: 0 3px 12px rgba(58, 49, 32, .24);
  color: #697d69;
  font: 700 18px/1 system-ui, sans-serif;
  transition: transform .18s ease, background .18s ease;
}
.msg-recorder.playing .msg-recorder-play {
  background: #748b76;
  color: #fff9e9;
  animation: recorder-pulse 1.7s ease-in-out infinite;
}
.msg-recorder.playing .msg-recorder-object img {
  filter: drop-shadow(0 10px 12px rgba(71,60,40,.23)) drop-shadow(0 0 9px rgba(206,101,74,.15));
}
@keyframes recorder-pulse { 50% { transform: scale(1.08); } }
.msg-recorder-caption { display: flex; flex-direction: column; gap: 4px; }
.msg-recorder-caption strong {
  color: #fffaf0;
  font-size: clamp(14px, 2.6vw, 18px);
  font-weight: 500;
  text-shadow: 0 2px 7px rgba(0,0,0,.78);
}
.msg-recorder-caption span {
  color: rgba(255,250,240,.78);
  font-size: 11px;
  text-shadow: 0 1px 5px rgba(0,0,0,.75);
}
.msg-recorder.audio-error::after {
  display: block;
  content: '磁带刚才卡了一下，请稍后再点一次';
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 2px;
  width: auto;
  height: auto;
  background: none;
  color: #ffd7cf;
  font-size: 10px;
  text-shadow: 0 1px 5px rgba(0,0,0,.8);
  transform: none;
}
.msg-recorder-audio { display: none; }
.msg-recorder-transcript {
  margin: 12px auto 0;
  padding-top: 0;
  border: 0;
  color: #fffaf0;
  text-align: left;
}
.msg-recorder-transcript summary {
  width: fit-content;
  margin: 0 auto;
  color: rgba(255,250,240,.82);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  text-shadow: 0 1px 5px rgba(0,0,0,.8);
}
.msg-recorder-transcript summary:focus-visible {
  outline: 2px solid #879783;
  outline-offset: 3px;
  border-radius: 4px;
}
.msg-recorder-transcript p {
  max-height: min(24vh, 180px);
  margin: 10px 0 0;
  overflow-y: auto;
  color: #fff;
  font-size: 13px;
  line-height: 1.75;
  text-align: center;
  text-shadow:
    0 1px 2px rgba(0,0,0,.95),
    0 0 7px rgba(0,0,0,.78);
  background: transparent;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg-recorder-cue {
  color: rgba(255,250,240,.42);
  opacity: .58;
  transition: color .35s ease, opacity .35s ease, text-shadow .35s ease;
}
.msg-recorder-cue + .msg-recorder-cue { margin-inline-start: .42em; }
.msg-recorder-cue.is-past {
  color: rgba(255,250,240,.64);
  opacity: .72;
}
.msg-recorder-cue.is-active {
  color: #fff;
  opacity: 1;
  text-shadow:
    0 1px 2px rgba(0,0,0,1),
    0 0 8px rgba(0,0,0,.92),
    0 0 16px rgba(255,244,213,.2);
}
@media (prefers-reduced-motion: reduce) {
  .msg-recorder-cue { transition: none; }
}

.msg-hint {
  color: rgba(251,244,232,0.8);
  font-size: 12px;
  letter-spacing: 3px;
}
.msg-more {
  position: fixed;
  top: 14px;
  right: 18px;
  color: rgba(251,244,232,0.75);
  font-size: 12px;
}

/* ── 小院信箱 ── */
#mailbox-body.mailbox-list { max-height: 55vh; overflow-y: auto; padding: 0 2px; }
.mailbox-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, rgba(0,0,0,.08));
  cursor: pointer; transition: opacity .15s;
}
.mailbox-item:last-child { border-bottom: none; }
.mailbox-item:active { opacity: .55; }
.mailbox-icon { font-size: 20px; color: var(--accent); flex-shrink: 0; }
.mailbox-info { flex: 1; min-width: 0; }
.mailbox-label { font-size: 13px; font-weight: 500; }
.mailbox-preview {
  font-size: 12px; color: var(--accent); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mailbox-date { font-size: 11px; color: var(--accent); flex-shrink: 0; }

/* ── 街道办 · 小镇法庭全屏页 ── */
main#tab-content[data-tab="court"] {
  padding: calc(30px + env(safe-area-inset-top)) max(74px, calc(28px + env(safe-area-inset-right))) 42px max(74px, calc(28px + env(safe-area-inset-left)));
  background:
    linear-gradient(rgba(245, 242, 232, .86), rgba(249, 247, 240, .94)),
    url('/static/assets/ui/faded-town-wide-v1.webp?v=20260827a') center / cover fixed no-repeat;
}
#tab-content > #court-page {
  width: min(1040px, 100%);
  max-width: 1040px;
}
.court-page { color: #4f584d; }
.court-page-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 20px;
}
.court-page-head h1 { margin: 3px 0 6px; font-size: clamp(25px, 4vw, 38px); font-weight: 500; letter-spacing: .08em; }
.court-page-head p { margin: 0; color: #7d8977; font-size: 12px; line-height: 1.7; }
.court-page-kicker { display: flex; align-items: center; gap: 5px; color: #75836f !important; letter-spacing: .18em; }
.court-page-kicker .msym { font-size: 17px; }
.court-page-back {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid rgba(117,128,95,.23);
  border-radius: 999px;
  background: rgba(255,253,247,.72);
  color: #657260;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.court-page-back:focus-visible,
.court-section-tab:focus-visible { outline: 2px solid #74856f; outline-offset: 3px; }
.court-office-card {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(117,128,95,.16);
  border-radius: 18px;
  background: rgba(252,250,244,.76);
  box-shadow: 0 6px 18px rgba(82,88,77,.04);
}
.court-office-card > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.court-office-card span { color: #899482; font-size: 10px; letter-spacing: .1em; }
.court-office-card strong { font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.court-section-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(117,128,95,.16);
  border-radius: 999px;
  background: rgba(226,227,211,.58);
}
.court-section-tab {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #74806f;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.court-section-tab span { margin-left: 5px; opacity: .62; }
.court-section-tab.active {
  background: rgba(255,253,247,.94);
  color: #4f584d;
  box-shadow: 0 3px 12px rgba(82,88,77,.08);
}
.court-section[hidden] { display: none; }
.court-section { padding-top: 22px; }
.court-section-intro { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 10px; }
.court-section-intro h2 { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: .08em; }
.court-section-intro p { margin: 0; max-width: 620px; color: #82907d; font-size: 11px; line-height: 1.65; text-align: right; }
.court-list { display: grid; gap: 12px; }
.court-public-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.court-case {
  padding: 17px 18px;
  border: 1px solid rgba(117,128,95,.16);
  border-radius: 18px;
  background: rgba(252,250,244,.84);
  box-shadow: 0 6px 18px rgba(82,88,77,.045);
}
.court-case-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; font-weight: 500; margin-bottom: 4px;
}
.court-status { font-size: 11px; color: var(--accent); white-space: nowrap; }
.court-status.open { color: var(--highlight, #C0856A); font-weight: 500; }
.court-status.resolved { color: var(--accent); opacity: 0.75; }
.court-parties { font-size: 12px; margin-bottom: 3px; }
.court-desc { font-size: 13px; line-height: 1.5; margin-bottom: 8px; }
.court-jury { font-size: 12px; margin-bottom: 6px; }
.court-jury > b { display: block; margin-bottom: 2px; color: var(--accent); }
.court-vote-line { padding: 1px 0 1px 8px; overflow-wrap: anywhere; }
.court-vote-empty { color: var(--accent); opacity: 0.7; }
.court-vote-hint { font-size: 12px; color: var(--accent); margin-top: 4px; }
.court-vote-form {
  margin-top: 6px; padding: 8px; border-radius: 10px;
  background: rgba(196,168,130,0.12);
}
.court-vote-form label { font-size: 12px; margin-right: 14px; cursor: pointer; }
.court-reason-input { margin: 8px 0; font-size: 13px; padding: 7px 10px; }
.court-vote-submit { font-size: 13px; padding: 7px 10px; }
.court-public-verdict { min-height: 178px; display: flex; flex-direction: column; }
.court-public-charge { margin: 6px 0 14px; color: #596652; font-size: 17px; line-height: 1.45; }
.court-public-meta { display: grid; gap: 6px; font-size: 11px; }
.court-public-meta span { display: flex; justify-content: space-between; gap: 12px; color: #899482; }
.court-public-meta b { color: #596452; font-weight: 500; text-align: right; }
.court-public-note { margin: auto 0 0; padding-top: 14px; color: #939d8b; font-size: 10px; }
.court-empty {
  grid-column: 1 / -1;
  min-height: 210px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed rgba(117,128,95,.24);
  border-radius: 20px;
  color: #8a9582;
  background: rgba(252,250,244,.48);
}
.court-empty .msym { font-size: 25px; }
.court-empty p { margin: 0; font-size: 12px; }

@media (max-width: 760px) {
  main#tab-content[data-tab="court"] {
    padding: calc(20px + env(safe-area-inset-top)) max(58px, calc(18px + env(safe-area-inset-right))) 28px max(58px, calc(18px + env(safe-area-inset-left)));
  }
  .court-page-head { gap: 12px; }
  .court-office-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .court-section { padding-top: 14px; }
  .court-section-intro { display: block; }
  .court-section-intro p { margin-top: 4px; text-align: left; }
  .court-public-list { grid-template-columns: 1fr; }
}

/* ── 街道办公示栏（联机 tab 榜单） ── */
.bulletin-sub {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.rank-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px dashed rgba(232,223,208,0.7);
}
.rank-row:last-child { border-bottom: none; }
.rank-no {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}
.rank-no.top { background: var(--accent); color: #fff; }
.rank-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-street { font-size: 11px; color: rgba(61,46,30,0.55); }
.rank-val { margin-left: auto; flex: none; font-size: 12px; color: var(--accent); }

/* ── 联机 tab 分区：官方广播 / 居民角落 ── */
.card-title { font-size: 13px; margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.online-group {
  border-left: 3px solid var(--soft);
  padding-left: 10px;
  margin-bottom: 16px;
}
.online-group .card { margin-bottom: 10px; }
.online-group .card:last-child { margin-bottom: 0; }
.group-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 8px;
  font-weight: 600;
}
.online-group.official { border-left-color: var(--water); }
.online-group.official .group-head { color: #6f9a92; }
.online-group.community { border-left-color: var(--blossom); }
.online-group.community .group-head { color: #c88a72; }

/* ── 折叠块：公示栏两榜单 ── */
.rank-fold { border-bottom: 1px dashed rgba(232,223,208,0.7); }
.rank-fold:last-child { border-bottom: none; }
.rank-fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
}
.rank-fold > summary::-webkit-details-marker { display: none; }
.rank-fold > summary::before {
  content: '▸';
  color: var(--accent);
  transition: transform .15s ease;
}
.rank-fold[open] > summary::before { transform: rotate(90deg); }
.fold-title { letter-spacing: 1px; }
.fold-hint { margin-left: auto; font-size: 11px; color: var(--accent); }
.fold-body { padding: 2px 0 10px; }

/* ── 留言板「展开全部」 ── */
.board-more {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.board-more:hover { background: var(--highlight); }

/* ── 建造组报告：每条折叠 ── */
.cl-entry { border-bottom: 1px dashed rgba(232,223,208,0.7); }
.cl-entry:last-child { border-bottom: none; }
.cl-entry > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  font-size: 13px;
}
.cl-entry > summary::-webkit-details-marker { display: none; }
.cl-kind {
  flex: none;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
}
.cl-update  { background: var(--water); }
.cl-fix     { background: #b3c072; }
.cl-preview { background: var(--blossom); }
.cl-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-time { margin-left: auto; flex: none; font-size: 11px; color: var(--accent); }
.cl-body {
  padding: 2px 0 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  white-space: normal;
}

/* 发公告弹窗 */
.cl-create-row { display: flex; gap: 8px; margin-bottom: 8px; }
.cl-create-row #cl-kind { width: 72px; margin-bottom: 0; flex: none; }
.cl-create-row #cl-title { flex: 1; margin-bottom: 0; }
.cl-body-input { min-height: 120px; resize: vertical; line-height: 1.6; }

/* ── 联机页手风琴 ── */
.acc-list { display: flex; flex-direction: column; gap: 8px; }
.acc-item {
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  background-image: var(--paper-texture);
  box-shadow: 0 1px 4px rgba(61,46,30,0.08);
}
.acc-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;  /* 手机友好点击高度 */
}
.acc-head:active { background: var(--highlight); }
.acc-link-head {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.acc-link-head .acc-arrow {
  padding-left: 6px;
  font-size: 19px;
  line-height: 1;
}
.acc-icon { font-size: 17px; flex: none; color: var(--accent); }
.acc-title-text { font-size: 13px; font-weight: 600; flex: none; white-space: nowrap; }
.acc-preview {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 4px;
}
.acc-time {
  flex: none;
  font-size: 11px;
  color: var(--accent);
  opacity: 0.65;
  white-space: nowrap;
  padding-left: 4px;
}
.acc-arrow {
  flex: none;
  font-size: 11px;
  color: var(--accent);
  transition: transform 180ms ease;
  padding-left: 2px;
}
.acc-item.open .acc-arrow { transform: rotate(180deg); }

/* grid-row 伸缩：开合各 ≤180ms，无弹跳 */
.acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 180ms ease;
}
.acc-item.open .acc-body { grid-template-rows: 1fr; }
.acc-body-inner {
  min-height: 0;
  overflow: hidden;
}
.acc-body-pad {
  padding: 2px 14px 14px;
  border-top: 1px dashed var(--soft);
}

/* ── 机联网 / 机阅 ───────────────────────────────────────────────────────── */
#tab-content > #machine-network-page {
  width: min(1080px, 100%);
  max-width: 1080px;
  min-height: calc(100vh - 124px);
}
.machine-network-page {
  --mr-ink: var(--town-ink);
  --mr-sage: var(--town-accent);
  --mr-gold: #b99f6f;
  color: var(--town-ink);
}
.machine-network-launcher {
  position: fixed;
  inset: 0;
  width: 100% !important;
  max-width: none !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding:
    max(88px, calc(env(safe-area-inset-top) + 78px))
    max(58px, calc(env(safe-area-inset-right) + 34px))
    max(46px, calc(env(safe-area-inset-bottom) + 30px))
    max(58px, calc(env(safe-area-inset-left) + 34px));
  overflow: auto;
  background:
    linear-gradient(rgba(248,246,239,.34), rgba(248,246,239,.48)),
    url('/static/assets/ui/faded-town-wide-v1.webp?v=20260827a') center / cover no-repeat;
}
.mr-eyebrow {
  margin: 0 0 4px;
  color: var(--mr-sage);
  font: 600 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .18em;
}
.software-directory {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 108px));
  justify-content: center;
  align-items: start;
  gap: 30px clamp(22px, 4.2vw, 46px);
  width: min(100%, 790px);
  margin: 0 auto;
}
.software-app {
  position: relative;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--mr-ink);
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.software-icon {
  display: block;
  width: min(96px, calc(100% - 8px));
  aspect-ratio: 1;
  margin: 0 auto 8px;
  border-radius: 27px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(82, 88, 77, .1), inset 0 0 0 1px rgba(255,253,248,.38);
  transition: transform .18s ease, box-shadow .18s ease;
}
.software-icon img { display: block; width: 100%; height: 100%; }
.software-app:hover .software-icon { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(82, 88, 77, .14), inset 0 0 0 1px rgba(255,253,248,.42); }
.software-app:active .software-icon { transform: scale(.96); }
.software-app:focus { outline: none; }
.software-app:focus-visible .software-icon { outline: 2px solid rgba(116,132,105,.55); outline-offset: 4px; }
.software-app strong {
  display: -webkit-box;
  min-height: 19px;
  overflow: hidden;
  color: var(--town-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px rgba(255,255,255,.7);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.software-app-badge {
  position: absolute;
  top: -5px;
  right: 2px;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border: 2px solid #faf6ed;
  border-radius: 99px;
  background: #d98270;
  color: white;
  font: 700 9px/17px system-ui, sans-serif;
  text-align: center;
  box-shadow: 0 3px 8px rgba(93, 55, 39, .2);
}
.software-app-badge[hidden] { display: none; }

/* 捉迷藏应用图标：不用另塞一张方形底图，保持机联网目录清爽。 */
.hs-software-icon {
  position: relative;
  background: linear-gradient(145deg, #84a89f, #547f78);
}
.hs-software-icon::before {
  content: '';
  position: absolute; left: 19%; right: 19%; bottom: 18%; height: 43%;
  border-radius: 12% 12% 20% 20%; background: #fff3d4;
  box-shadow: inset 0 -5px 0 rgba(218,174,102,.18);
}
.hs-software-icon::after {
  content: '';
  position: absolute; left: 16%; top: 18%; width: 68%; height: 47%;
  border-radius: 10%; background: #efc873; transform: rotate(45deg) scale(.72);
}
.hs-software-icon i {
  position: absolute; z-index: 2; left: 34%; bottom: 19%; width: 32%; height: 28%;
  border-radius: 50% 50% 8px 8px; background: #658c84;
}
.hs-software-icon b {
  position: absolute; z-index: 3; left: 44%; bottom: 30%; width: 9%; aspect-ratio: 1;
  border-radius: 50%; background: #fff7df; box-shadow: 13px 0 #fff7df;
}

/* ── 公考宝典 / 养一只人 ───────────────────────────────────────── */
.civil-software-icon { position:relative; background:linear-gradient(145deg,#c5574d,#8c302d); }
.civil-software-icon::before { content:''; position:absolute; inset:18% 23%; border-radius:7px; background:#fff8df; box-shadow:inset 0 0 0 2px rgba(107,47,38,.16); }
.civil-software-icon::after { content:''; position:absolute; left:34%; right:34%; top:13%; height:14%; border-radius:6px; background:#e7c47c; }
.civil-software-icon i { position:absolute; z-index:2; left:41%; top:40%; color:#9a3e36; font:700 25px/1 system-ui; }
.human-software-icon { position:relative; background:linear-gradient(145deg,#f1cbd0,#ca8f9a); }
.human-software-icon::before { content:''; position:absolute; left:33%; top:20%; width:34%; aspect-ratio:1; border-radius:50%; background:#fff1df; box-shadow:0 27px 0 9px #fff1df; }
.human-software-icon i,.human-software-icon b { position:absolute; z-index:2; top:34%; width:7%; aspect-ratio:1; border-radius:50%; background:#775a54; }
.human-software-icon i { left:40%; }.human-software-icon b { right:40%; }
.hc-host { --hc-ink:#5d4a42; --hc-rose:#b97982; --hc-sage:#7d927d; min-height:calc(100vh - 124px); }
.hc-topbar { position:sticky; top:-76px; z-index:5; display:flex; align-items:center; gap:13px; min-height:60px; padding:9px 15px; border:1px solid rgba(128,100,88,.16); border-radius:18px; background:rgba(252,248,240,.94); box-shadow:0 8px 24px rgba(85,66,53,.07); backdrop-filter:blur(14px); }
.hc-topbar button { width:38px; height:38px; border:0; border-radius:50%; background:rgba(185,121,130,.12); color:var(--hc-ink); font:22px/1 system-ui; cursor:pointer; }
.hc-topbar strong,.hc-topbar small { display:block; }.hc-topbar strong { font-size:15px; color:var(--hc-ink); }.hc-topbar small { margin-top:2px; color:#96877d; font-size:10px; }
.hc-view { width:min(1120px,100%); margin:auto; padding:20px 4px 60px; }
.hc-loading,.hc-error,.hc-empty { min-height:280px; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#8f8178; text-align:center; }.hc-error { color:#a35151; }
.hc-empty div { display:grid; place-items:center; width:74px; height:74px; margin-bottom:13px; border-radius:28px; background:#efd7d8; color:#a86771; font-size:38px; }.hc-empty h2 { margin:0 0 8px; color:var(--hc-ink); font-size:21px; }.hc-empty p { max-width:460px; margin:0; font-size:11px; line-height:1.8; }
.hc-split { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:18px; }
.hc-visual { position:sticky; top:0; display:flex; flex-direction:column; min-height:calc(100vh - 170px); overflow:hidden; border-radius:28px; background:linear-gradient(145deg,#f7e0df,#efe7d6); box-shadow:0 14px 35px rgba(91,66,53,.09); }
.hc-identity { position:relative; z-index:2; padding:28px 30px 0; }.hc-identity p { margin:0 0 8px; color:var(--hc-rose); font:700 9px/1 ui-monospace,monospace; letter-spacing:.2em; }.hc-identity h2 { margin:0 0 7px; color:var(--hc-ink); font-size:31px; font-weight:500; }.hc-identity span { color:#927e72; font-size:11px; }
.hc-tinghe-entry{position:relative;z-index:3;display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:11px;width:fit-content;min-width:210px;margin:18px 24px 0;padding:10px 13px;color:#665345;text-decoration:none;border:1px solid rgba(148,116,94,.2);border-radius:17px;background:rgba(255,251,242,.78);box-shadow:0 7px 22px rgba(90,62,45,.09),inset 0 1px rgba(255,255,255,.8);backdrop-filter:blur(8px);transition:transform .18s ease,box-shadow .18s ease}.hc-tinghe-entry:hover{transform:translateY(-1px);box-shadow:0 9px 25px rgba(90,62,45,.13),inset 0 1px rgba(255,255,255,.9)}.hc-tinghe-entry:active{transform:translateY(1px)}.hc-tinghe-entry>span:last-child{font-size:27px;color:#ae806c}.hc-tinghe-entry small,.hc-tinghe-entry strong{display:block}.hc-tinghe-entry small{margin-bottom:3px;color:#a08b7d;font-size:9px;font-weight:500;letter-spacing:.12em}.hc-tinghe-entry strong{color:#665345;font-size:14px;font-weight:600}.hc-tinghe-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:linear-gradient(145deg,#f7dfd7,#efe7ce);color:#a77761!important;font-size:24px!important;box-shadow:inset 0 0 0 1px rgba(151,112,87,.13)}
.hc-figure { flex:1 1 auto; display:grid; place-items:center; min-height:430px; background:radial-gradient(circle at 50% 58%,rgba(255,255,255,.92) 0,rgba(255,255,255,.42) 48%,rgba(255,255,255,0) 100%); }
.hc-controls { min-width:0; }.hc-controls>.hc-paper:last-child { margin-bottom:0; }
.hc-human-host .hc-view { overflow:hidden; padding-bottom:20px; }
.hc-human-host .hc-split { height:100%; min-height:0; align-items:stretch; }
.hc-human-host .hc-visual,.hc-human-host .hc-controls { min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; -webkit-overflow-scrolling:touch; }
.hc-human-host .hc-visual { position:relative; top:auto; }
.hc-hero { display:grid; grid-template-columns:minmax(230px,42%) 1fr; align-items:center; min-height:310px; margin-bottom:14px; overflow:hidden; border-radius:28px; background:linear-gradient(135deg,#f7e0df,#efe7d6); box-shadow:0 14px 35px rgba(91,66,53,.09); }
.hc-hero>div { align-self:stretch; display:grid; place-items:center; min-height:300px; background:radial-gradient(circle at 50% 60%,rgba(255,255,255,.9),rgba(255,255,255,.12) 52%,transparent 53%); }.hc-hero article { padding:25px; }.hc-hero article p,.hc-civil-hero>p { margin:0 0 8px; color:var(--hc-rose); font:700 9px/1 ui-monospace,monospace; letter-spacing:.2em; }.hc-hero h2,.hc-civil-hero h2 { margin:0 0 7px; color:var(--hc-ink); font-size:29px; font-weight:500; }.hc-hero article span,.hc-civil-hero>span { color:#927e72; font-size:11px; }
.hc-avatar { position:relative; width:min(500px,100%); aspect-ratio:1; }.hc-avatar img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; }.hc-avatar .hc-zzz { display:none; position:absolute; z-index:20; right:17%; top:22%; color:#9b7ca0; font:700 13px/1 ui-monospace; letter-spacing:.15em; transform:rotate(-12deg); }.hc-avatar.sleeping .hc-zzz { display:block; }
.hc-avatar.dirt-dusty::before,.hc-avatar.dirt-dirty::before,.hc-avatar.dirt-muddy::before,.hc-avatar.dirt-dirty::after,.hc-avatar.dirt-muddy::after { content:""; position:absolute; inset:0; z-index:18; pointer-events:none; background-repeat:no-repeat; }
.hc-avatar.dirt-dusty::before { opacity:.42; background-image:radial-gradient(ellipse at 44% 45%,#91765f 0 1.1%,transparent 1.5%),radial-gradient(ellipse at 55% 57%,#9b8068 0 1.4%,transparent 1.8%),radial-gradient(ellipse at 45% 75%,#806a57 0 1.3%,transparent 1.7%); }
.hc-avatar.dirt-dirty::before { opacity:.58; background-image:radial-gradient(ellipse at 43% 40%,#82664e 0 1.5%,transparent 2%),radial-gradient(ellipse at 55% 50%,#8d7058 0 2%,transparent 2.6%),radial-gradient(ellipse at 42% 59%,#765e49 0 1.8%,transparent 2.4%),radial-gradient(ellipse at 55% 74%,#846951 0 2.2%,transparent 2.8%),radial-gradient(ellipse at 45% 87%,#755c46 0 1.8%,transparent 2.4%); }
.hc-avatar.dirt-dirty::after { opacity:.35; background-image:linear-gradient(18deg,transparent 48%,#755d49 49% 51%,transparent 52%); background-size:8% 5%; background-position:48% 48%; }
.hc-avatar.dirt-muddy::before { opacity:.76; background-image:radial-gradient(ellipse at 42% 39%,#70523b 0 2%,transparent 2.6%),radial-gradient(ellipse at 55% 45%,#89664a 0 1.6%,transparent 2.2%),radial-gradient(ellipse at 46% 53%,#74543d 0 2.8%,transparent 3.5%),radial-gradient(ellipse at 56% 62%,#8a674b 0 2.1%,transparent 2.8%),radial-gradient(ellipse at 42% 72%,#6f523e 0 2.6%,transparent 3.3%),radial-gradient(ellipse at 55% 83%,#7c5d45 0 2.5%,transparent 3.2%),radial-gradient(ellipse at 47% 90%,#684c39 0 2%,transparent 2.7%); }
.hc-avatar.dirt-muddy::after { opacity:.5; background-image:linear-gradient(16deg,transparent 47%,#654a37 48% 52%,transparent 53%),linear-gradient(-24deg,transparent 46%,#7b5b42 47% 52%,transparent 53%); background-size:10% 6%,8% 5%; background-position:49% 55%,52% 76%; }
.hc-infant { position:relative; width:145px; height:190px; border-radius:48% 48% 44% 44%; background:linear-gradient(145deg,#f6d5d9,#d9939e); box-shadow:inset 0 0 0 7px rgba(255,255,255,.35),0 17px 25px rgba(114,72,74,.12); transform:rotate(-4deg); }.hc-infant i { position:absolute; left:32%; top:18%; width:36%; aspect-ratio:1; border-radius:50%; background:#fff0dd; box-shadow:inset 0 -4px rgba(214,153,138,.12); }.hc-infant b { position:absolute; left:0; right:0; bottom:27px; color:#fff8ec; font-size:13px; text-align:center; }
.hc-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; margin-bottom:13px; }
.hc-paper,.hc-card { padding:18px; border:1px solid rgba(128,100,88,.14); border-radius:20px; background:rgba(255,253,247,.94); box-shadow:0 7px 20px rgba(86,66,52,.05); }.hc-paper { margin-bottom:13px; }.hc-paper h3 { margin:0 0 13px; color:var(--hc-ink); font-size:14px; }.hc-paper h3 small { color:#a18d81; font-size:9px; }.hc-paper>p { color:#786a61; font-size:11px; line-height:1.7; }.hc-card small,.hc-card strong,.hc-card p { display:block; }.hc-card small { color:#9a8c82; font-size:9px; }.hc-card strong { margin-top:7px; color:var(--hc-ink); font-size:14px; }.hc-card p { margin:6px 0 0; color:#93857b; font-size:10px; }
.hc-civil-hero { padding:28px; background:linear-gradient(135deg,#fff8e8,#f1e4cc); }.hc-civil-hero h2 { font-size:25px; }
.hc-civil-tabs { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; margin:0 0 13px; }.hc-civil-tabs button { min-height:38px; padding:7px 5px; border:1px solid rgba(128,100,88,.15); border-radius:11px; background:#fffdf8; color:#806f63; font-family:inherit; font-size:9px; cursor:pointer; }.hc-civil-tabs button.active { background:#9b7770; color:white; }
.hc-range { display:block; margin:10px 0; }.hc-range span { display:flex; justify-content:space-between; color:#76675f; font-size:10px; }.hc-range b { color:var(--hc-rose); }.hc-range input { width:100%; margin:6px 0 0; accent-color:var(--hc-rose); }
.hc-family-sync { display:flex; align-items:center; gap:12px; margin:-2px 0 13px; padding:12px 13px; border:1px solid rgba(128,100,88,.13); border-radius:15px; background:#faf4ec; transition:background .2s ease,border-color .2s ease; }.hc-family-sync.enabled { border-color:rgba(111,145,119,.25); background:#eef5eb; }.hc-family-sync>div { flex:1; min-width:0; }.hc-family-sync strong,.hc-family-sync small { display:block; }.hc-family-sync strong { color:#6e5a50; font-size:10px; }.hc-family-sync small { margin-top:3px; overflow:hidden; color:#97877d; font-size:8px; line-height:1.45; text-overflow:ellipsis; white-space:nowrap; }.hc-switch { display:grid; grid-template-columns:31px auto; align-items:center; gap:6px; color:#8d7d73; font-size:8px; cursor:pointer; }.hc-switch input { position:absolute; width:1px; height:1px; opacity:0; }.hc-switch i { position:relative; width:31px; height:18px; border-radius:999px; background:#d7cdc4; box-shadow:inset 0 1px 3px rgba(74,56,47,.12); transition:background .2s ease; }.hc-switch i::after { content:''; position:absolute; left:3px; top:3px; width:12px; height:12px; border-radius:50%; background:#fffdf8; box-shadow:0 2px 5px rgba(74,56,47,.2); transition:transform .2s ease; }.hc-switch input:checked+i { background:#85a788; }.hc-switch input:checked+i::after { transform:translateX(13px); }.hc-switch input:focus-visible+i { outline:2px solid rgba(185,121,130,.45); outline-offset:2px; }.hc-switch input:disabled~* { opacity:.55; cursor:wait; }.hc-family-note { margin:-7px 1px 14px!important; color:#a1948a!important; font-size:8px!important; line-height:1.55!important; }
.hc-clean-meter { margin:2px 0 15px; }.hc-clean-meter>span { display:flex; justify-content:space-between; margin-bottom:7px; color:#76675f; font-size:10px; }.hc-clean-meter small { margin-left:6px; color:#a08d7f; font-size:8px; font-weight:400; }.hc-clean-meter b { color:#5e91a3; }.hc-clean-meter>i { display:block; height:8px; overflow:hidden; border-radius:999px; background:#e5eceb; }.hc-clean-meter em { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#8bc8d3,#77aebe); transition:width .35s ease; }.hc-clean-meter p { margin:6px 0 0; color:#a1948a; font-size:8px; }
.hc-minigames { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:13px; }.hc-game-card { min-width:0; padding:15px; overflow:hidden; border:1px solid rgba(128,100,88,.13); border-radius:20px; box-shadow:0 7px 20px rgba(86,66,52,.05); }.hc-game-card.bath { background:linear-gradient(145deg,#f3fbfc,#e5f0ef); }.hc-game-card.fruit { background:linear-gradient(145deg,#fffaf0,#f8ead8); }.hc-game-card header { display:flex; align-items:center; gap:9px; margin-bottom:12px; }.hc-game-card header>span { display:grid; place-items:center; width:34px; height:34px; border-radius:12px; background:rgba(255,255,255,.7); font-size:18px; }.hc-game-card h3,.hc-game-card small,.hc-game-card>b { display:block; }.hc-game-card h3 { margin:0 0 2px; color:#66564d; font-size:12px; }.hc-game-card small { color:#96877c; font-size:8px; line-height:1.5; }.hc-game-card>b { margin-bottom:3px; color:#536f75; font-size:11px; }.hc-game-card>p { margin:7px 0; color:#7f7065; font-size:9px; }
.hc-pipe-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:3px; margin-top:10px; }.hc-pipe-grid span { display:grid; place-items:center; aspect-ratio:1; border-radius:5px; background:rgba(177,151,121,.24); color:#725f4f; font-size:8px; }.hc-pipe-grid .cell-source { background:#7bbac8; color:white; }.hc-pipe-grid .cell-target { background:#e3a6aa; color:white; }.hc-pipe-grid .cell-open,.hc-pipe-grid .cell-valve_open { background:#b9dde1; color:#467782; }.hc-pipe-grid .cell-rock { background:#8e8e87; color:white; }.hc-pipe-grid .cell-hazard,.hc-pipe-grid .cell-hazard_open { background:#e8aa8d; color:white; }.hc-pipe-grid .cell-duck { background:#f0cf66; color:#68551a; }
.hc-fruit-targets { display:grid; grid-template-columns:repeat(3,1fr); gap:5px; margin:9px 0; }.hc-fruit-targets span { position:relative; min-width:0; padding:8px 2px 7px; border-radius:9px; background:rgba(255,255,255,.66); color:#66564d; font-size:9px; text-align:center; }.hc-fruit-targets i { position:absolute; left:3px; top:3px; color:#a48671; font:700 7px/1 ui-monospace; }.hc-fruit-basket { display:flex; flex-wrap:wrap; gap:4px; margin-top:10px; }.hc-fruit-basket strong { flex:0 0 100%; color:#8f725f; font-size:8px; }.hc-fruit-basket span { padding:4px 6px; border-radius:999px; background:rgba(255,255,255,.62); color:#725f54; font-size:8px; }
.hc-soft { color:#9a8d84!important; font-size:10px!important; }.hc-pending { margin-top:8px; padding:11px; border-radius:13px; background:#fff1e5; color:#775f52; font-size:10px; }.hc-pending b { display:block; margin:3px 0 7px; color:#624a3f; font-size:12px; }.hc-pending div,.hc-row { display:flex; gap:7px; }.hc-pending button,.hc-choice-grid button,.hc-compose button,.hc-row button { min-height:34px; border:1px solid rgba(185,121,130,.24); border-radius:10px; background:#fffdf8; color:#755c56; font-family:inherit; font-size:9px; cursor:pointer; }.hc-pending button { flex:1; }
.hc-choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.hc-choice-grid button { padding:9px; text-align:left; }.hc-compose { display:flex; gap:8px; margin-top:10px; }.hc-compose input { flex:1; min-width:0; height:36px; padding:0 11px; border:1px solid rgba(128,100,88,.18); border-radius:10px; background:#fffefa; color:#66554c; font-family:inherit; font-size:10px; }.hc-compose button { padding:0 15px; background:var(--hc-rose); color:white; }.hc-row { justify-content:center; margin:12px 0; }.hc-row button { min-width:150px; background:#82917e; color:white; }
.hc-events p { margin:0; padding:8px 2px; border-bottom:1px dashed rgba(128,100,88,.14); color:#817269; font-size:10px; }.hc-toast { margin-bottom:12px; padding:10px 13px; border-radius:12px; background:#e9f0e5; color:#647561; font-size:10px; }.hc-toast.error { background:#f8e4e1; color:#9b554f; }
@media (max-width:720px) { .hc-split { grid-template-columns:1fr; }.hc-visual { position:relative; min-height:350px; }.hc-figure { min-height:260px; }.hc-identity { padding:22px 24px 0; }.hc-hero { grid-template-columns:1fr 1fr; min-height:240px; }.hc-hero>div { min-height:240px; }.hc-avatar { width:300px; }.hc-grid { grid-template-columns:1fr; }.hc-minigames { grid-template-columns:1fr; }.hc-choice-grid { grid-template-columns:1fr; }.hc-civil-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }.hc-human-host .hc-view { overflow-y:auto; padding-bottom:60px; }.hc-human-host .hc-split { height:auto; }.hc-human-host .hc-visual,.hc-human-host .hc-controls { overflow:visible; } }

/* ── 机联网 · 捉迷藏大厅 ─────────────────────────────────────────────── */
.hs-host { --hs-green:#64867d; --hs-dark:#4f635d; --hs-gold:#d5aa5d; }
.hs-topbar { flex:0 0 auto; display:flex; align-items:center; min-height:62px; margin-top:10px; padding:9px 15px; border:1px solid rgba(100,134,125,.2); border-radius:19px; background:rgba(250,247,237,.94); box-shadow:0 8px 25px rgba(79,66,48,.08); }
.hs-back { width:38px; height:38px; border:0; border-radius:50%; background:rgba(100,134,125,.13); color:#5f4938; font:22px/1 system-ui; cursor:pointer; }
.hs-mark { position:relative; width:42px; height:42px; margin:0 11px 0 12px; border-radius:14px; background:linear-gradient(145deg,#82a69d,#547f78); }
.hs-mark::before { content:''; position:absolute; left:10px; right:10px; bottom:8px; height:18px; border-radius:4px 4px 8px 8px; background:#fff2d1; }
.hs-mark::after { content:''; position:absolute; left:10px; top:7px; width:22px; height:22px; background:#efc873; transform:rotate(45deg) scale(.72); }
.hs-mark i { position:absolute; z-index:2; left:17px; bottom:9px; width:9px; height:12px; border-radius:8px 8px 3px 3px; background:#658c84; }
.hs-topbar strong,.hs-topbar small { display:block; }.hs-topbar strong { color:#5b4c3e; font-size:15px; }.hs-topbar small { color:#91887a; font-size:10px; }
.hs-view { flex:1 1 auto; min-height:0; padding:18px 4px 48px; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.hs-loading,.hs-error { min-height:180px; display:flex; align-items:center; justify-content:center; gap:10px; color:#8d887c; font-size:13px; }.hs-loading span { width:17px; height:17px; border:2px solid rgba(100,134,125,.2); border-top-color:var(--hs-green); border-radius:50%; animation:mr-spin .8s linear infinite; }.hs-error { color:#a55e55; }
.hs-intro { position:relative; display:flex; align-items:center; justify-content:space-between; min-height:126px; padding:22px 28px; overflow:hidden; border-radius:24px; background:linear-gradient(125deg,#587b74,#81988a); color:#fff8e8; box-shadow:0 13px 30px rgba(65,86,77,.15); }
.hs-intro p,.hs-room-head p { margin:0 0 5px; color:#f1cf79; font:600 9px/1 ui-monospace,monospace; letter-spacing:.18em; }.hs-intro h2 { margin:0; font-size:26px; font-weight:500; }.hs-intro div>span { display:block; margin-top:7px; color:rgba(255,250,235,.74); font-size:11px; }
.hs-intro-eye { position:relative; width:92px; height:55px; border-radius:70% 20% 70% 20%; background:rgba(255,244,211,.9); transform:rotate(45deg); }.hs-intro-eye i { position:absolute; left:31px; top:13px; width:31px; height:31px; border:8px solid #52766f; border-radius:50%; background:#f0cb74; }
.hs-setup-grid,.hs-room-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:15px; }
.hs-card { padding:17px; border:1px solid rgba(100,134,125,.18); border-radius:21px; background:rgba(255,253,247,.94); box-shadow:0 7px 19px rgba(79,66,48,.055); }
.hs-card>header { display:flex; align-items:center; gap:10px; margin-bottom:13px; }.hs-card>header>span { display:grid; place-items:center; width:32px; height:32px; border-radius:11px; background:#e3ece4; color:#5d796f; font:600 10px/1 ui-monospace,monospace; }.hs-card header b,.hs-card header small { display:block; }.hs-card header b { color:#5b4c3e; font-size:14px; }.hs-card header small { margin-top:2px; color:#999083; font-size:9px; }
.hs-card label { display:grid; grid-template-columns:82px minmax(0,1fr); align-items:center; gap:8px; margin-top:8px; color:#766e62; font-size:10px; }.hs-card input,.hs-card select { min-width:0; height:35px; padding:0 10px; border:1px solid rgba(100,134,125,.22); border-radius:10px; outline:0; background:#fffdf8; color:#5c5146; font-family:inherit; font-size:10px; }.hs-card input:focus,.hs-card select:focus { border-color:rgba(100,134,125,.58); box-shadow:0 0 0 3px rgba(100,134,125,.08); }
.hs-number-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.hs-number-row label { grid-template-columns:1fr; gap:4px; }
.hs-primary,.hs-secondary { min-height:37px; padding:0 16px; border-radius:11px; font-family:inherit; font-size:10px; cursor:pointer; }.hs-primary { border:1px solid var(--hs-green); background:var(--hs-green); color:#fff9e7; }.hs-secondary { border:1px solid rgba(100,134,125,.28); background:#fffdf7; color:#5e756e; }.hs-card>.hs-primary,.hs-card>.hs-secondary { width:100%; margin-top:13px; }.hs-card>p { margin:9px 2px 0; color:#9a9285; font-size:9px; line-height:1.6; }
.hs-notice { margin:11px 3px 0; padding:9px 12px; border-left:3px solid var(--hs-gold); border-radius:0 10px 10px 0; background:#fff5df; color:#766348; font-size:10px; white-space:pre-wrap; }
.hs-room-head { display:flex; align-items:center; gap:13px; padding:13px 17px; border-radius:18px; background:#f8f3e7; }.hs-room-head>div { margin-right:auto; }.hs-room-head button { font-family:inherit; cursor:pointer; }.hs-room-head #hs-copy-code { border:0; padding:0; background:transparent; color:#534b3f; font:700 23px/1 ui-monospace,monospace; letter-spacing:.12em; }.hs-room-head #hs-copy-code.copied::after { content:' 已复制'; color:#72877b; font:9px/1 inherit; letter-spacing:0; }.hs-status { padding:6px 10px; border-radius:99px; background:#e4ece2; color:#63766a; font-size:9px; }.hs-status.status-finished { background:#f3e4d9; color:#9b6655; }.hs-refresh { border:1px solid rgba(100,134,125,.2); border-radius:9px; padding:6px 10px; background:#fffdf7; color:#728077; font-size:9px; }
.hs-room-rules dl { margin:0; }.hs-room-rules dl>div { display:flex; justify-content:space-between; gap:10px; padding:8px 2px; border-bottom:1px dashed rgba(100,134,125,.16); font-size:10px; }.hs-room-rules dt { color:#999083; }.hs-room-rules dd { margin:0; color:#5c554a; text-align:right; }.hs-room-preview-picture { display:block; }.hs-room-preview { display:block; width:100%; margin-top:12px; border-radius:13px; aspect-ratio:2.05; object-fit:cover; }
.hs-person { display:grid!important; grid-template-columns:auto 30px minmax(0,1fr)!important; gap:8px!important; min-height:43px; margin:0!important; padding:7px 2px; border-bottom:1px solid rgba(100,134,125,.13); cursor:pointer; }.hs-person input { width:15px; height:15px; padding:0; accent-color:var(--hs-green); }.hs-person-kind { display:grid; place-items:center; width:28px; height:28px; border-radius:9px; background:#e4ebe1; color:#5e766e; font-weight:700; }.hs-person b,.hs-person small { display:block; }.hs-person b { color:#5b5146; font-size:11px; }.hs-person small { margin-top:2px; color:#9a9184; font-size:8px; }.hs-person.found { opacity:.5; }
.hs-result { margin-top:14px; padding:15px 18px; border:1px solid rgba(213,170,93,.25); border-radius:16px; background:#fff4da; color:#705c3e; font-size:12px; text-align:center; }.hs-room-actions { display:flex; justify-content:center; gap:9px; margin-top:15px; }.hs-boundary-note { margin:8px 0 0; color:#9a9285; font-size:9px; text-align:center; }

/* ── 捉迷藏实际场地：房主家复用小院，玩具屋使用横屏插画 ───────────── */
#courtyard[data-hide-seek-venue] { background:#394d48; }
#courtyard[data-hide-seek-venue] .axon-furniture[data-hide-spot-id] { pointer-events:auto; cursor:pointer; touch-action:manipulation; }
#courtyard[data-hide-seek-venue] .axon-furniture[data-hide-spot-id]:hover img { filter:drop-shadow(0 0 7px rgba(255,224,128,.95)) drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
#courtyard[data-hide-seek-venue] .axon-furniture[data-hide-spot-id]::after { content:''; position:absolute; left:43%; bottom:7%; width:14%; aspect-ratio:1; border:2px solid rgba(255,236,169,.92); border-radius:50%; box-shadow:0 0 0 5px rgba(255,225,127,.15); animation:hs-pulse 1.8s ease-in-out infinite; pointer-events:none; }
@keyframes hs-pulse { 50% { transform:scale(1.1); opacity:.72; } }
#courtyard[data-hide-seek-venue="toyhouse"] #courtyard-stage { left:50%!important; top:50%!important; width:min(100vw,calc(100vh * 2.05))!important; height:min(100vh,calc(100vw / 2.05))!important; transform:translate(-50%,-50%)!important; }
.hs-toy-scene { position:absolute; inset:0; overflow:hidden; border-radius:18px; box-shadow:0 18px 55px rgba(18,35,31,.35); }.hs-toy-scene-picture { position:absolute; inset:0; display:block; }.hs-toy-scene>picture>img { display:block; width:100%; height:100%; object-fit:cover; }
.hs-hotspot { position:absolute; width:24px; height:24px; padding:0; border:2px solid rgba(255,248,218,.95); border-radius:50%; background:rgba(90,132,121,.82); color:#fff9e6; box-shadow:0 0 0 6px rgba(255,225,127,.2),0 3px 9px rgba(42,55,49,.28); cursor:pointer; animation:hs-pulse 1.8s ease-in-out infinite; }.hs-hotspot span { position:absolute; left:50%; bottom:30px; width:max-content; max-width:110px; padding:4px 7px; border-radius:7px; background:rgba(48,66,61,.8); font:9px/1.2 inherit; transform:translateX(-50%); }
#hide-seek-venue-ui { position:absolute; z-index:50; inset:0; pointer-events:none; }
.hs-venue-hud { position:absolute; left:max(18px,env(safe-area-inset-left)); right:max(18px,env(safe-area-inset-right)); top:max(14px,env(safe-area-inset-top)); display:flex; align-items:center; gap:12px; min-height:53px; padding:8px 12px; border:1px solid rgba(255,255,255,.28); border-radius:17px; background:rgba(43,61,56,.86); color:#fff9e7; box-shadow:0 8px 24px rgba(27,41,37,.24); backdrop-filter:blur(12px); pointer-events:auto; }.hs-venue-hud button { border:1px solid rgba(255,255,255,.2); border-radius:9px; padding:7px 10px; background:rgba(255,255,255,.1); color:#fff9e7; font-family:inherit; font-size:9px; cursor:pointer; }.hs-venue-hud>div { flex:1; }.hs-venue-hud b,.hs-venue-hud span { display:block; }.hs-venue-hud b { font-size:12px; }.hs-venue-hud span { margin-top:2px; color:rgba(255,249,231,.72); font-size:9px; }.hs-venue-hud em { color:#f2cf79; font-size:9px; font-style:normal; }
.hs-sound { position:absolute; right:max(20px,env(safe-area-inset-right)); top:82px; max-width:250px; padding:10px 13px; border-radius:13px; background:rgba(255,246,220,.92); color:#695d48; box-shadow:0 7px 18px rgba(44,55,49,.16); pointer-events:auto; }.hs-sound b { font-size:10px; }.hs-sound ul { margin:5px 0 0; padding-left:15px; font-size:9px; line-height:1.5; }
.hs-venue-notice { position:absolute; left:50%; top:82px; max-width:min(520px,70vw); padding:8px 13px; border-radius:10px; background:rgba(255,246,220,.94); color:#6c5a40; font-size:10px; white-space:pre-wrap; transform:translateX(-50%); box-shadow:0 7px 18px rgba(44,55,49,.16); pointer-events:auto; }
.hs-method-drawer { position:absolute; left:50%; bottom:max(18px,env(safe-area-inset-bottom)); width:min(620px,calc(100vw - 32px)); max-height:48vh; padding:14px; overflow:auto; border:1px solid rgba(255,255,255,.28); border-radius:20px; background:rgba(250,247,237,.96); color:#5d5245; box-shadow:0 18px 50px rgba(35,48,44,.3); transform:translateX(-50%); backdrop-filter:blur(14px); pointer-events:auto; }.hs-method-drawer[hidden] { display:none; }.hs-method-drawer header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }.hs-method-drawer header b { font-size:14px; }.hs-method-drawer header button { width:29px; height:29px; border:0; border-radius:50%; background:#e7e9df; color:#6b7167; cursor:pointer; }.hs-method-drawer>p { color:#8c8578; font-size:10px; }.hs-methods { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.hs-methods button { padding:10px 12px; border:1px solid rgba(100,134,125,.2); border-radius:12px; background:#fffdf8; color:#5b5145; font-family:inherit; text-align:left; cursor:pointer; }.hs-methods button:hover { border-color:#6e9086; background:#f0f5ed; }.hs-methods span,.hs-methods small { display:block; }.hs-methods span { font-size:10px; }.hs-methods small { margin-top:3px; color:#948c7e; font-size:8px; }.hs-pace { display:flex; gap:6px; margin-bottom:9px; }.hs-pace button { flex:1; padding:7px; border:1px solid rgba(100,134,125,.18); border-radius:9px; background:#eeeadd; color:#837b6e; font-family:inherit; font-size:9px; cursor:pointer; }.hs-pace button.active { border-color:#66877e; background:#66877e; color:#fff9e7; }

main#tab-content.machine-communicator-open {
  overflow: hidden;
  overscroll-behavior: none;
  padding: 0;
}
main#tab-content.machine-communicator-open > #machine-network-page.machine-network-communicator-host {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
}
.machine-app-back {
  position: fixed;
  z-index: 32;
  top: max(20px, calc(10px + env(safe-area-inset-top)));
  left: calc(68px + env(safe-area-inset-left));
  width: 34px;
  height: 34px;
  border: 1px solid rgba(126,94,55,.16);
  border-radius: 50%;
  background: rgba(255,252,244,.86);
  color: #7e5e37;
  font: 500 19px/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(61,46,30,.1);
  backdrop-filter: blur(8px);
}
main#tab-content.machine-communicator-open .communicator-brand {
  padding-left: max(116px, calc(env(safe-area-inset-left) + 108px));
}

.mr-topbar {
  position: sticky;
  top: -76px;
  z-index: 4;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 8px 14px;
  border: 1px solid rgba(135, 148, 119, .2);
  border-radius: 18px;
  background: rgba(250, 248, 240, .92);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 25px rgba(96, 75, 55, .07);
}
.mr-back {
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: rgba(135, 148, 119, .12); color: var(--mr-ink);
  font: 22px/1 system-ui; cursor: pointer;
}
.mr-top-logo { width: 40px; height: 40px; margin: 0 10px 0 12px; border-radius: 12px; }
.mr-topbar strong, .mr-topbar small { display: block; }
.mr-topbar strong { color: var(--mr-ink); font-size: 15px; }
.mr-topbar small { color: #928b7e; font-size: 10px; }
.mr-view { padding: 22px 4px 50px; }
.mr-loading, .mr-error, .mr-empty {
  min-height: 130px; display: flex; align-items: center; justify-content: center;
  gap: 10px; color: #898878; font-size: 13px; text-align: center;
}
.mr-loading span { width: 16px; height: 16px; border: 2px solid rgba(135,148,119,.22); border-top-color: var(--mr-sage); border-radius: 50%; animation: mr-spin .8s linear infinite; }
@keyframes mr-spin { to { transform: rotate(1turn); } }
.mr-error { color: #a55e55; }
.mr-loading.compact, .mr-error.compact, .mr-empty.compact { min-height: 80px; }
.mr-library-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 8px 16px; }
.mr-library-head h2 { margin: 0; color: var(--mr-ink); font-size: 27px; font-weight: 500; }
.mr-weekly-ticket { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(210,173,99,.35); border-radius: 15px; background: #fff9e9; }
.mr-weekly-ticket > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--mr-ink); color: #f3d27d; font-size: 21px; }
.mr-weekly-ticket b, .mr-weekly-ticket small { display: block; }
.mr-weekly-ticket b { color: #715d34; font-size: 12px; }
.mr-weekly-ticket small { color: #a18c62; font-size: 9px; }
.mr-library-note { margin: -8px 8px 18px; color: #928b7e; font-size: 11px; }
.mr-library-tabs { display: flex; gap: 5px; width: fit-content; margin: -7px 8px 18px; padding: 3px; border-radius: 11px; background: rgba(135,148,119,.11); }
.mr-library-tabs button { border: 0; border-radius: 8px; padding: 6px 13px; background: transparent; color: #747b68; font-family: inherit; font-size: 10px; cursor: pointer; }
.mr-library-tabs button.active { background: #fffdf8; color: var(--mr-ink); box-shadow: 0 2px 7px rgba(96,75,55,.08); }
.mr-library-tabs + .mr-library-note { margin-top: -11px; }
.mr-book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.mr-book-card {
  display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 14px;
  min-height: 142px; padding: 14px; border: 1px solid rgba(135,148,119,.18);
  border-radius: 19px; background: rgba(255,253,247,.9); color: inherit;
  font-family: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 7px 18px rgba(96,75,55,.06); transition: transform .15s ease, box-shadow .15s ease;
}
.mr-book-card:hover { transform: translateY(-2px); box-shadow: 0 11px 24px rgba(96,75,55,.11); }
.mr-book-cover { position: relative; display: grid; place-items: center; width: 86px; height: 112px; overflow: hidden; border-radius: 5px 12px 12px 5px; background: linear-gradient(145deg, #98a681, #65725b); box-shadow: 5px 7px 12px rgba(96,75,55,.2); }
.mr-book-cover::before { content: ''; position: absolute; left: 5px; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.18); }
.mr-book-cover b { color: #f6e7b1; font-size: 29px; font-weight: 400; }
.mr-book-cover i { position: absolute; right: 9px; top: 10px; width: 17px; height: 17px; border: 3px solid #d2ad63; border-left-color: transparent; border-radius: 50%; transform: rotate(-25deg); }
.mr-book-cover.custom { background: #eee9dc; }
.mr-book-cover.custom::before { z-index: 2; }
.mr-cover-art { contain: size layout paint; isolation: isolate; }
.mr-cover-art iframe {
  position: absolute; left: 50%; top: 50%; display: block;
  min-width: 0; min-height: 0; max-width: none; max-height: none;
  border: 0; background: transparent; opacity: 0; pointer-events: none;
  transform-origin: center; transition: opacity .12s ease-out;
}
.mr-cover-art.is-fitted iframe { opacity: 1; }
.mr-book-copy { min-width: 0; }
.mr-book-copy strong, .mr-book-copy small, .mr-book-copy em, .mr-card-stats { display: block; }
.mr-book-copy strong { margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mr-ink); font-size: 15px; }
.mr-book-copy small { margin-top: 2px; color: #898878; font-size: 10px; }
.mr-book-copy em { display: -webkit-box; margin-top: 8px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #656456; font-size: 11px; line-height: 1.55; font-style: normal; }
.mr-card-stats { margin-top: 9px; color: #9a8352; font-size: 9px; }
.mr-book-status { display: inline-block; padding: 2px 7px; border-radius: 8px; background: #e8eddf; color: #66735c; font-size: 9px; }
.mr-book-status.done { background: #eee7d6; color: #8a7350; }
.mr-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; color: #918d80; font-size: 10px; }
.mr-pagination button { border: 1px solid rgba(135,148,119,.24); border-radius: 10px; padding: 7px 12px; background: #fffdf8; color: var(--mr-ink); font-family: inherit; cursor: pointer; }
.mr-pagination button:disabled { opacity: .35; cursor: default; }

.mr-detail { max-width: 830px; margin: 0 auto; }
.mr-detail-title { display: flex; align-items: center; gap: 18px; padding: 14px 10px 8px; }
.mr-detail-moon { display: grid; place-items: center; flex: 0 0 82px; height: 82px; border-radius: 23px; background: var(--mr-sage); color: #f7d477; font-size: 45px; box-shadow: 0 12px 23px rgba(96,75,55,.17); }
.mr-detail-cover { position: relative; display: block; flex: 0 0 82px; width: 82px; min-width: 82px; max-width: 82px; height: 106px; overflow: hidden; border-radius: 7px 17px 17px 7px; background: #eee9dc; box-shadow: 0 12px 23px rgba(96,75,55,.17); }
.mr-detail-title h2 { margin: 5px 0 2px; color: var(--mr-ink); font-size: 25px; font-weight: 500; }
.mr-detail-title p { margin: 0; color: #898878; font-size: 12px; }
.mr-intro { margin: 12px 10px; padding: 14px 17px; border-left: 3px solid var(--mr-gold); border-radius: 0 13px 13px 0; background: rgba(255,249,233,.75); color: #656456; font-size: 13px; line-height: 1.75; }
.mr-detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 10px; padding: 11px 0; border-block: 1px solid rgba(135,148,119,.18); }
.mr-detail-stats span { text-align: center; color: #918d80; font-size: 9px; }
.mr-detail-stats b { display: block; margin-bottom: 2px; color: var(--mr-ink); font-size: 15px; }
.mr-actions { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 8px; margin: 0 10px; }
.mr-actions button, .mr-reader footer button { min-height: 40px; border: 1px solid rgba(135,148,119,.25); border-radius: 12px; background: #fffdf8; color: var(--mr-ink); font-family: inherit; font-size: 11px; cursor: pointer; }
.mr-actions button.primary, .mr-reader footer button.primary { border-color: var(--mr-ink); background: var(--mr-ink); color: #fff9e9; }
.mr-actions button.ticket { border-color: rgba(210,173,99,.48); background: #fff8e3; color: #775f2e; }
.mr-actions button:disabled { opacity: .48; cursor: default; }
.mr-action-hint { min-height: 18px; margin: 7px 12px 14px; color: #918d80; font-size: 9px; }
.mr-action-hint.ok, #mr-reader-note.ok { color: #68775f; }
.mr-chapters, .mr-reviews { margin: 22px 10px 0; }
.mr-chapters h3, .mr-reviews h3 { margin: 0 0 9px; color: var(--mr-ink); font-size: 15px; font-weight: 500; }
.mr-chapter-row { display: grid; grid-template-columns: 35px minmax(0,1fr) 15px; align-items: center; width: 100%; padding: 10px 6px; border: 0; border-bottom: 1px solid rgba(135,148,119,.14); background: transparent; color: inherit; font-family: inherit; text-align: left; cursor: pointer; }
.mr-chapter-row > span { color: var(--mr-gold); font: 11px/1 ui-monospace, monospace; }
.mr-chapter-row strong, .mr-chapter-row small { display: block; }
.mr-chapter-row strong { color: #514d40; font-size: 12px; font-weight: 500; }
.mr-chapter-row small { margin-top: 2px; color: #9c978b; font-size: 9px; }
.mr-chapter-row > b { color: #949587; font-size: 18px; font-weight: 400; }
.mr-section-title { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid rgba(135,148,119,.16); }
.mr-section-title span { color: #9c978b; font-size: 9px; }
.mr-review { padding: 12px 4px; border-bottom: 1px dashed rgba(135,148,119,.17); }
.mr-review > div { display: flex; justify-content: space-between; }
.mr-review b { color: #66735c; font-size: 11px; }
.mr-review time { color: #a49e91; font-size: 9px; }
.mr-review p { margin: 5px 0 0; color: #625f52; font-size: 11px; line-height: 1.7; white-space: pre-wrap; }

.mr-reader { max-width: 740px; margin: 0 auto; padding: 18px clamp(12px, 5vw, 54px) 40px; border: 1px solid rgba(135,148,119,.16); border-radius: 20px; background: #fffdf7; box-shadow: 0 12px 34px rgba(96,75,55,.07); }
.mr-reader header { padding: 12px 0 19px; border-bottom: 1px solid rgba(135,148,119,.17); text-align: center; }
.mr-reader header p { margin: 0 0 8px; color: #928b7e; font-size: 10px; }
.mr-reader header h2 { margin: 0; color: var(--mr-ink); font-size: 22px; font-weight: 500; }
.mr-reader header small { display: block; margin-top: 7px; color: #a49e91; font-size: 9px; }
.mr-prose { padding: 28px 0 36px; color: #504b3e; font-size: 15px; line-height: 2.05; white-space: pre-wrap; overflow-wrap: anywhere; }
.mr-reader footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(135,148,119,.17); padding-top: 16px; }
.mr-reader footer button { min-width: 118px; padding: 0 16px; }
#mr-reader-note { margin: 10px 0 0; color: #9ba4a3; font-size: 9px; text-align: right; }

/* ── 毕机索：暖纸张、草木绿与少量画具金 ──────────────────────────────── */
.bjs-topbar {
  position: sticky; top: -76px; z-index: 4; display: flex; align-items: center;
  min-height: 60px; padding: 8px 14px; border: 1px solid rgba(126,139,111,.22);
  border-radius: 18px; background: rgba(250,247,237,.93); backdrop-filter: blur(14px);
  box-shadow: 0 8px 25px rgba(89,69,45,.08);
}
.bjs-back { width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(126,139,111,.13); color: #5f4938; font: 22px/1 system-ui; cursor: pointer; }
.bjs-top-logo { width: 42px; height: 42px; margin: 0 10px 0 12px; border-radius: 13px; }
.bjs-topbar strong,.bjs-topbar small { display:block; }
.bjs-topbar strong { color:#604a37; font-size:15px; }
.bjs-topbar small { color:#918779; font-size:10px; }
.bjs-readonly { margin-left:auto; padding:4px 9px; border:1px solid rgba(126,139,111,.25); border-radius:99px; color:#758069; font-size:9px; }
.bjs-view { --bjs-green:#71806a; --bjs-ink:#5f4938; --bjs-gold:#d2a75c; padding:18px 4px 50px; }
.bjs-loading,.bjs-error,.bjs-empty { min-height:130px; display:flex; align-items:center; justify-content:center; gap:10px; color:#8d887c; font-size:13px; text-align:center; }
.bjs-loading span { width:16px; height:16px; border:2px solid rgba(113,128,106,.2); border-top-color:var(--bjs-green); border-radius:50%; animation:mr-spin .8s linear infinite; }
.bjs-error { color:#a55e55; }
.bjs-hero { position:relative; min-height:126px; padding:22px 25px; overflow:hidden; border-radius:22px; background:linear-gradient(125deg,#6f7d67,#879378); color:#faf3dc; box-shadow:0 13px 28px rgba(81,68,49,.13); }
.bjs-hero::after { content:''; position:absolute; right:-45px; bottom:-105px; width:260px; height:260px; border:28px solid rgba(242,212,125,.18); border-radius:50%; }
.bjs-hero p { margin:0 0 4px; color:#efd584; font:600 9px/1.2 ui-monospace,monospace; letter-spacing:.2em; }
.bjs-hero h2 { margin:0; font-size:26px; font-weight:500; }
.bjs-hero div>span { display:block; margin-top:7px; color:rgba(255,251,237,.76); font-size:11px; }
.bjs-hero>small { position:absolute; right:22px; bottom:15px; z-index:1; color:rgba(255,251,237,.66); font-size:9px; }
.bjs-seals { position:absolute; z-index:1; right:22px; top:20px; display:flex; gap:6px; }
.bjs-seals b { padding:5px 8px; border:1px solid rgba(255,255,255,.22); border-radius:8px; background:rgba(255,255,255,.09); color:#fbf3d9; font:600 9px/1 ui-monospace,monospace; }
.bjs-seals b.warm { border-color:rgba(239,213,132,.42); color:#f4d880; }
.bjs-tabs { display:flex; gap:5px; width:fit-content; margin:15px 4px 8px; padding:3px; border-radius:11px; background:rgba(113,128,106,.11); }
.bjs-tabs button { border:0; border-radius:8px; padding:7px 14px; background:transparent; color:#767e6d; font-family:inherit; font-size:10px; cursor:pointer; }
.bjs-tabs button.active { background:#fffdf7; color:var(--bjs-ink); box-shadow:0 2px 7px rgba(96,75,55,.09); }
.bjs-observer-note { margin:0 7px 15px; color:#969084; font-size:9px; }
.bjs-artist-grid { display:grid; gap:14px; }
.bjs-artist-card { padding:16px; border:1px solid rgba(113,128,106,.18); border-radius:21px; background:rgba(255,253,247,.9); box-shadow:0 7px 18px rgba(96,75,55,.06); }
.bjs-artist-card>header { display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:11px; }
.bjs-avatar { display:grid; place-items:center; width:48px; height:48px; border-radius:16px 16px 20px 13px; background:linear-gradient(145deg,#89967c,#687660); color:#f5d781; font-size:21px; box-shadow:0 6px 13px rgba(78,71,51,.13); }
.bjs-artist-card h3 { margin:0; color:var(--bjs-ink); font-size:15px; font-weight:600; }
.bjs-artist-card header p { margin:3px 0 0; color:#817d70; font-size:10px; }
.bjs-artist-card header>span { padding:3px 8px; border-radius:9px; background:#f1ead9; color:#8d754c; font-size:9px; }
.bjs-examples h4,.bjs-slots h4 { margin:14px 0 7px; color:#81735f; font-size:10px; font-weight:500; }
.bjs-examples>div { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.bjs-example { min-width:0; margin:0; overflow:hidden; border:1px solid rgba(113,128,106,.15); border-radius:13px; background:#f6f0e2; }
.bjs-preview { position:relative; height:118px; overflow:hidden; background:radial-gradient(circle at 30% 20%,#fbf7eb,#e7dfcb); }
.bjs-preview iframe { position:absolute; left:50%; top:50%; max-width:none; border:0; transform-origin:center; pointer-events:none; }
.bjs-example figcaption { padding:7px 9px; }
.bjs-example figcaption strong,.bjs-example figcaption span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bjs-example figcaption strong { color:#5e5547; font-size:10px; }
.bjs-example figcaption span { margin-top:2px; color:#9a9283; font-size:8px; }
.bjs-slots>div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.bjs-slot { position:relative; padding:10px 12px; border-left:3px solid var(--bjs-gold); border-radius:0 12px 12px 0; background:#fbf5e7; }
.bjs-slot>span { float:right; color:#75806d; font:600 8px/1 ui-monospace,monospace; }
.bjs-slot strong,.bjs-slot small { display:block; }
.bjs-slot strong { color:#625444; font-size:11px; }
.bjs-slot small { margin-top:2px; color:#a07e45; font-size:9px; }
.bjs-slot p { margin:5px 0 0; color:#898275; font-size:9px; }
.bjs-none { margin:13px 1px 0; color:#aaa395; font-size:9px; }
.bjs-order-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.bjs-order-card { padding:15px; border:1px solid rgba(113,128,106,.18); border-radius:18px; background:rgba(255,253,247,.92); box-shadow:0 7px 18px rgba(96,75,55,.05); }
.bjs-order-head { display:flex; align-items:center; justify-content:space-between; }
.bjs-order-head>span { padding:3px 7px; border-radius:7px; background:#e8eddf; color:#65735d; font:600 8px/1 ui-monospace,monospace; }
.bjs-order-head>b { color:#b4863f; font-size:15px; }.bjs-order-head small { font-size:8px; font-weight:400; }
.bjs-order-card h3 { margin:8px 0 4px; color:var(--bjs-ink); font-size:14px; font-weight:600; }
.bjs-order-card>p { min-height:34px; margin:0; color:#777267; font-size:10px; line-height:1.65; }
.bjs-order-card footer { display:flex; flex-wrap:wrap; gap:5px 10px; margin-top:10px; padding-top:8px; border-top:1px dashed rgba(113,128,106,.2); color:#979184; font-size:8px; }
.bjs-order-card footer em { margin-left:auto; color:#708069; font-style:normal; }
.bjs-pagination { display:flex; align-items:center; justify-content:center; gap:12px; margin-top:19px; color:#918d80; font-size:10px; }
.bjs-pagination button { border:1px solid rgba(113,128,106,.24); border-radius:10px; padding:7px 12px; background:#fffdf8; color:var(--bjs-ink); font-family:inherit; cursor:pointer; }
.bjs-pagination button:disabled { opacity:.35; cursor:default; }

/* ── 维机百科：像旧卡片目录，但每一页都明确是胡说 ───────────────────── */
.ww-topbar { position:sticky; top:-76px; z-index:4; display:flex; align-items:center; min-height:60px; padding:8px 14px; border:1px solid rgba(126,139,111,.21); border-radius:18px; background:rgba(250,247,237,.94); backdrop-filter:blur(14px); box-shadow:0 8px 25px rgba(89,69,45,.08); }
.ww-back { width:38px; height:38px; border:0; border-radius:50%; background:rgba(126,139,111,.13); color:#5f4938; font:22px/1 system-ui; cursor:pointer; }
.ww-top-logo { width:42px; height:42px; margin:0 10px 0 12px; border-radius:13px; }
.ww-topbar strong,.ww-topbar small { display:block; }.ww-topbar strong { color:#5f4938; font-size:15px; }.ww-topbar small { color:#948a79; font-size:10px; }
.ww-false-badge { margin-left:auto; padding:5px 10px; border:1px solid rgba(194,103,80,.26); border-radius:99px; background:#fff1e7; color:#b2604f; font-size:9px; }
.ww-view { --ww-ink:#594a3b; --ww-green:#6c7d6c; --ww-red:#b7614e; padding:18px 4px 50px; }
.ww-loading,.ww-error,.ww-empty { min-height:130px; display:flex; align-items:center; justify-content:center; gap:10px; color:#8d887c; font-size:13px; text-align:center; }
.ww-loading span { display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:#71816f; color:#f2d77e; font:bold 16px/1 Georgia,serif; animation:ww-wobble 1.2s ease-in-out infinite; }
@keyframes ww-wobble { 50% { transform:rotate(12deg) translateY(-2px); } }
.ww-error { color:#a55e55; }
.ww-warning { display:flex; align-items:center; gap:17px; min-height:112px; padding:17px 23px; overflow:hidden; border-radius:22px; background:linear-gradient(125deg,#68796b,#89917b); color:#fff9e8; box-shadow:0 13px 28px rgba(81,68,49,.13); }
.ww-question { display:grid; place-items:center; flex:0 0 68px; height:68px; border:2px dashed rgba(244,216,126,.72); border-radius:50% 47% 54% 45%; color:#f1d276; font:italic 48px/1 Georgia,serif; transform:rotate(-7deg); }
.ww-warning p { margin:0 0 4px; color:#f1d276; font:600 8px/1.2 ui-monospace,monospace; letter-spacing:.18em; }
.ww-warning h2 { margin:0; font-size:25px; font-weight:500; }.ww-warning span { display:block; margin-top:6px; color:rgba(255,250,233,.72); font-size:10px; }
.ww-ask-box { margin:12px 4px 8px; padding:11px 13px; border:1px solid rgba(108,125,108,.17); border-radius:15px; background:#f5f0e2; }
.ww-ask-box>div { display:flex; align-items:baseline; gap:8px; margin-bottom:7px; }.ww-ask-box>div b { color:var(--ww-ink); font-size:11px; }.ww-ask-box>div span { color:#948c7d; font-size:9px; }
.ww-ask-box form { display:grid; grid-template-columns:minmax(0,1fr) 92px auto; gap:6px; }.ww-ask-box input,.ww-ask-box select,.ww-ask-box button { min-width:0; height:33px; border:1px solid rgba(108,125,108,.22); border-radius:9px; background:#fffdf7; color:var(--ww-ink); font-family:inherit; font-size:9px; }.ww-ask-box input { padding:0 11px; }.ww-ask-box select { padding:0 6px; }.ww-ask-box button { padding:0 12px; border-color:#687563; background:#687563; color:#fff9e7; cursor:pointer; }.ww-ask-box button:disabled { opacity:.55; }
.ww-ask-box>p { min-height:0; margin:5px 2px 0; color:#a25c4c; font-size:8px; }.ww-ask-box>p:empty { margin:0; }
.ww-tabs { display:flex; gap:5px; margin:9px 4px 7px; padding-bottom:6px; border-bottom:1px solid rgba(108,125,108,.15); }.ww-tabs button { border:0; border-radius:10px; padding:6px 12px; background:transparent; color:#91897b; font-family:inherit; font-size:10px; cursor:pointer; }.ww-tabs button.active { background:#687563; color:#fff9e7; }
.ww-tab-count { display:inline-grid; place-items:center; min-width:17px; height:17px; margin-left:5px; padding:0 4px; border-radius:99px; background:#b7614e; color:#fff9e7; font:700 9px/1 ui-monospace,monospace; }.ww-tabs button.active .ww-tab-count { background:#f1d276; color:#5f4938; }
.ww-search { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:6px; margin:14px 4px 8px; }
.ww-search input { min-width:0; height:36px; padding:0 13px; border:1px solid rgba(108,125,108,.21); border-radius:11px; outline:0; background:#fffdf7; color:var(--ww-ink); font-family:inherit; font-size:11px; }.ww-search input:focus { border-color:rgba(108,125,108,.55); box-shadow:0 0 0 3px rgba(108,125,108,.08); }
.ww-search button { border:1px solid rgba(108,125,108,.22); border-radius:11px; padding:0 13px; background:#fffdf7; color:#687563; font-family:inherit; font-size:10px; cursor:pointer; }.ww-search button[type=submit] { border-color:#687563; background:#687563; color:#fff9e7; }
.ww-categories { display:flex; flex-wrap:wrap; gap:5px; margin:0 4px 10px; }.ww-categories button { border:0; border-radius:9px; padding:5px 9px; background:#eee9da; color:#8b8375; font-family:inherit; font-size:9px; cursor:pointer; }.ww-categories button.active { background:#e1e8da; color:#60705d; }
.ww-notice { margin:0 4px 10px; padding:9px 12px; border-left:3px solid var(--ww-red); border-radius:0 10px 10px 0; background:#fff1e8; color:#8f5145; font-size:9px; line-height:1.55; }
.ww-result-title { display:flex; justify-content:space-between; align-items:baseline; margin:0 6px 8px; }.ww-result-title strong { color:var(--ww-ink); font-size:13px; }.ww-result-title span { color:#9c9487; font-size:9px; }
.ww-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.ww-card { position:relative; padding:14px 15px; overflow:hidden; border:1px solid rgba(108,125,108,.17); border-radius:18px; background:rgba(255,253,247,.94); box-shadow:0 7px 18px rgba(96,75,55,.055); }
.ww-card::after { content:'FALSE'; position:absolute; right:-9px; top:42px; color:rgba(183,97,78,.045); font:bold 48px/1 ui-monospace,monospace; transform:rotate(-13deg); pointer-events:none; }
.ww-card>header { display:flex; align-items:center; gap:7px; }.ww-card>header>span { color:#d1a553; font:600 10px/1 ui-monospace,monospace; }.ww-card>header em { padding:3px 7px; border-radius:7px; background:#e7eddf; color:#647360; font-size:8px; font-style:normal; }.ww-card>header small { margin-left:auto; color:#aaa294; font:8px/1 ui-monospace,monospace; }
.ww-card h3 { position:relative; z-index:1; margin:10px 0 9px; color:var(--ww-ink); font-size:15px; font-weight:600; }
.ww-answer,.ww-absurd { position:relative; z-index:1; display:grid; grid-template-columns:57px minmax(0,1fr); gap:8px; padding:8px 0; border-top:1px dashed rgba(108,125,108,.18); }.ww-answer b,.ww-absurd b { color:#b25f4c; font-size:9px; }.ww-absurd b { color:#887448; }.ww-answer p,.ww-absurd p { margin:0; color:#625d52; font-size:10px; line-height:1.65; }.ww-absurd p { color:#817969; }
.ww-card footer { display:flex; align-items:end; justify-content:space-between; gap:10px; margin-top:5px; color:#9a9386; font-size:8px; }.ww-card footer div { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:3px; }.ww-card footer div span { padding:2px 5px; border-radius:6px; background:#f0eadc; color:#8c7650; }
.ww-question-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }.ww-question-card { padding:12px 14px; border:1px dashed rgba(108,125,108,.28); border-radius:16px; background:#fffdf7; }.ww-question-card header { display:flex; align-items:center; gap:7px; }.ww-question-card header span { color:#d1a553; font:600 10px/1 ui-monospace,monospace; }.ww-question-card header em { padding:3px 7px; border-radius:7px; background:#e7eddf; color:#647360; font-size:8px; font-style:normal; }.ww-question-card header small { margin-left:auto; color:#aaa294; font:8px/1 ui-monospace,monospace; }.ww-question-card h3 { min-height:34px; margin:10px 0 9px; color:var(--ww-ink); font-size:14px; line-height:1.45; }.ww-question-card footer { display:flex; justify-content:space-between; gap:8px; color:#9a9386; font-size:8px; }.ww-question-card footer b { color:#77836f; font-weight:500; }
.ww-pagination { display:flex; align-items:center; justify-content:center; gap:12px; margin-top:19px; color:#918d80; font-size:10px; }.ww-pagination button { border:1px solid rgba(108,125,108,.24); border-radius:10px; padding:7px 12px; background:#fffdf8; color:var(--ww-ink); font-family:inherit; cursor:pointer; }.ww-pagination button:disabled { opacity:.35; cursor:default; }
.ww-bottom-warning { margin:16px auto 0; color:#a45e50; font-size:9px; text-align:center; }

@media (max-width: 720px) {
  .software-directory { grid-template-columns:repeat(3,minmax(72px,108px)); }
  .hs-setup-grid,.hs-room-grid { grid-template-columns:1fr; }
  .hs-intro-eye { display:none; }
  .hs-methods { grid-template-columns:1fr; }
  .mr-book-grid { grid-template-columns: 1fr; }
  .mr-actions { grid-template-columns: repeat(2, 1fr); }
  .mr-topbar { top: -76px; }
  .bjs-examples>div { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .bjs-order-grid { grid-template-columns:1fr; }
  .ww-grid { grid-template-columns:1fr; }
  .ww-question-grid { grid-template-columns:1fr; }
}
@media (max-height: 520px) {
  .machine-network-launcher { padding-top: max(78px, calc(env(safe-area-inset-top) + 70px)); }
  .mr-view { padding-top: 14px; }
  .mr-book-card { min-height: 124px; }
  .mr-book-cover { height: 96px; }
  .mr-prose { padding-block: 20px 26px; }
  .bjs-view { padding-top:12px; }
  .bjs-hero { min-height:102px; padding:16px 20px; }
  .bjs-hero h2 { font-size:21px; }
  .bjs-preview { height:96px; }
  .ww-view { padding-top:12px; }.ww-warning { min-height:90px; padding:13px 18px; }.ww-question { flex-basis:54px; height:54px; font-size:37px; }.ww-warning h2 { font-size:21px; }.ww-ask-box { padding:9px 11px; }.ww-ask-box form { grid-template-columns:minmax(0,1fr) 85px auto; }
}

/* ── 机联网内页：门头定住，只让正文区滚动 ──
   应用内页不再借用 #tab-content 的整页滚动，避免滚动时门头和
   纸张一起移动。应用目录仍由 .machine-network-launcher 自己滚动。 */
main#tab-content[data-tab="machine-network"]:not(.machine-communicator-open) {
  overflow: hidden;
  overscroll-behavior: none;
  padding: 0 clamp(24px, 3vw, 60px) !important;
}
main#tab-content[data-tab="machine-network"]
  > #machine-network-page:not(.machine-network-launcher):not(.machine-network-communicator-host) {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}
.mr-topbar,
.bjs-topbar,
.ww-topbar,
.sf-topbar,
.hc-topbar {
  position: relative;
  top: auto;
  flex: 0 0 auto;
}
.mr-view,
.bjs-view,
.ww-view,
.sf-view,
.hc-view {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

/* ── 栈斗 / STACK FIGHT ─────────────────────────────────────────────────── */
.sf-host { --sf-bg:#101820; --sf-panel:#17232c; --sf-line:#334751; --sf-green:#7ee0b1; --sf-red:#ef7e72; --sf-gold:#eab75e; color:#e8f0ed; }
.sf-topbar { display:flex; align-items:center; gap:11px; min-height:76px; padding:13px 18px; border-bottom:1px solid #2d3e47; background:#111b23; box-shadow:0 8px 24px rgba(0,0,0,.18); }
.sf-topbar .mr-back { position:static; flex:0 0 auto; border-color:#40525a; background:#1b2932; color:#dce7e4; }
.sf-logo { width:48px; height:48px; border-radius:14px; box-shadow:0 5px 14px rgba(0,0,0,.28); }
.sf-topbar>div { display:flex; flex-direction:column; min-width:0; }.sf-topbar strong { font-size:18px; letter-spacing:.08em; }.sf-topbar small { color:#78909a; font:9px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.12em; }
.sf-refresh { margin-left:auto; border:1px solid #40525a; border-radius:9px; padding:7px 11px; background:#1b2932; color:#9fb2b8; font-family:inherit; font-size:10px; cursor:pointer; }
.sf-view { padding:18px clamp(5px,2vw,24px) 40px; background:radial-gradient(circle at 50% 0,rgba(53,83,92,.35),transparent 48%),linear-gradient(180deg,#101820,#0b1218); scrollbar-color:#40525a #101820; }
.sf-profile { display:flex; align-items:center; gap:18px; margin-bottom:12px; padding:10px 14px; border:1px solid var(--sf-line); border-radius:13px; background:rgba(23,35,44,.92); }
.sf-profile>div:first-child { display:grid; grid-template-columns:auto auto; gap:2px 10px; align-items:baseline; }.sf-profile small { color:#79909a; font:8px/1 ui-monospace,monospace; letter-spacing:.15em; }.sf-profile strong { color:#f0f4ef; font-size:13px; }.sf-profile span { grid-column:2; color:var(--sf-green); font:9px/1.2 ui-monospace,monospace; }
.sf-record { margin-left:auto; color:#8da0a7; font-size:10px; }.sf-record b { color:#e8f0ed; }
.sf-match-tag { border:1px solid #46616c; border-radius:99px; padding:5px 10px; color:#a9bbc0; font-size:9px; }.sf-match-tag.active { border-color:#5da985; color:var(--sf-green); }.sf-match-tag.won { border-color:#b58a42; color:var(--sf-gold); }.sf-match-tag.crashed { border-color:#9c554e; color:var(--sf-red); }
.sf-arena { overflow:hidden; border:1px solid #354b55; border-radius:17px; background:linear-gradient(180deg,#17252e 0,#121b22 70%,#0c1318 100%); box-shadow:0 18px 35px rgba(0,0,0,.24); }
.sf-hud { display:grid; grid-template-columns:auto minmax(100px,1fr) auto; gap:10px; align-items:center; padding:11px 14px; border-bottom:1px solid #30424b; background:rgba(7,13,17,.45); }.sf-hud-copy { display:flex; gap:7px; align-items:baseline; }.sf-hud-copy span,.sf-round { color:#78909a; font:8px/1 ui-monospace,monospace; letter-spacing:.09em; }.sf-hud-copy b { color:#e8f0ed; font:12px/1 ui-monospace,monospace; }
.sf-stability { height:9px; overflow:hidden; border:1px solid #3b4e56; border-radius:99px; background:#0b1216; }.sf-stability i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--sf-red),var(--sf-gold) 45%,var(--sf-green)); box-shadow:0 0 12px rgba(126,224,177,.35); transition:width .25s ease; }
.sf-fighters { display:grid; grid-template-columns:minmax(105px,.72fr) 48px minmax(190px,1.3fr); align-items:center; gap:10px; min-height:220px; padding:22px clamp(14px,3vw,34px); background:repeating-linear-gradient(90deg,transparent 0,transparent 79px,rgba(120,160,167,.025) 80px),linear-gradient(0deg,rgba(9,15,20,.9),transparent 50%); }
.sf-machine { display:grid; justify-items:center; gap:10px; }.sf-machine>strong { color:#78909a; font:8px/1 ui-monospace,monospace; letter-spacing:.2em; }.sf-head { position:relative; display:grid; grid-template-columns:repeat(2,13px); place-content:center; gap:26px; width:98px; height:76px; border:5px solid #63818a; border-radius:24px; background:#20353e; box-shadow:0 0 0 6px #111a20,0 12px 24px rgba(0,0,0,.3); }.sf-head::before { content:''; position:absolute; left:50%; top:-24px; width:5px; height:22px; background:#63818a; transform:translateX(-50%); }.sf-head::after { content:''; position:absolute; left:50%; top:-29px; width:13px; height:13px; border-radius:50%; background:var(--sf-gold); transform:translateX(-50%); box-shadow:0 0 12px var(--sf-gold); }.sf-head i { height:11px; border-radius:3px; background:var(--sf-green); box-shadow:0 0 9px var(--sf-green); }.sf-head b { position:absolute; left:33px; bottom:15px; width:30px; border-bottom:4px solid #8ca1a6; }
.sf-versus { color:#52666e; font:800 22px/1 ui-monospace,monospace; text-align:center; font-style:italic; }
.sf-bug { min-width:0; padding:18px 20px; border:1px solid rgba(239,126,114,.42); border-radius:15px; background:linear-gradient(135deg,rgba(100,40,38,.38),rgba(31,29,31,.72)); box-shadow:0 0 28px rgba(239,126,114,.09); }.sf-bug-code { color:var(--sf-red); font:800 clamp(32px,5vw,58px)/.9 ui-monospace,monospace; text-shadow:0 0 18px rgba(239,126,114,.32); }.sf-bug h2 { margin:8px 0 7px; color:#f4ded9; font:600 clamp(14px,2vw,21px)/1.2 ui-monospace,monospace; }.sf-bug p { margin:0 0 9px; color:#c7b8b5; font-size:11px; line-height:1.55; }.sf-bug small { display:block; padding-top:8px; border-top:1px dashed rgba(239,126,114,.28); color:#d59387; font-size:9px; line-height:1.45; }.sf-bug.resolved { border-color:rgba(126,224,177,.35); background:rgba(34,78,63,.25); text-align:center; }.sf-bug.resolved>span { color:var(--sf-green); font-size:52px; }
.sf-context { display:flex; align-items:center; gap:6px; padding:10px 14px; border-top:1px solid #2b3d46; background:#101920; }.sf-context>span { margin-right:4px; color:#78909a; font:8px/1 ui-monospace,monospace; letter-spacing:.12em; }.sf-context i { width:21px; height:7px; border:1px solid #465b64; border-radius:2px; background:#17232a; }.sf-context i.on { border-color:#62a989; background:var(--sf-green); box-shadow:0 0 8px rgba(126,224,177,.4); }.sf-context b { margin-left:auto; color:#d49b53; font:9px/1 ui-monospace,monospace; }
.sf-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:12px; margin-top:12px; }.sf-runbook,.sf-skills,.sf-log { border:1px solid var(--sf-line); border-radius:14px; padding:14px; background:rgba(23,35,44,.86); }.sf-grid h3,.sf-log h3,.sf-skills h3 { margin:0 0 10px; color:#82969e; font:9px/1 ui-monospace,monospace; letter-spacing:.12em; }.sf-runbook ul { display:grid; gap:7px; margin:0; padding:0; list-style:none; }.sf-runbook li { display:grid; grid-template-columns:minmax(82px,1fr) auto auto; gap:9px; align-items:center; padding:8px 9px; border-radius:9px; background:#101a21; }.sf-runbook li span { color:#93a4a9; font-size:9px; }.sf-runbook code { color:var(--sf-green); font:700 11px/1 ui-monospace,monospace; }.sf-runbook em { color:#586d75; font:7px/1 ui-monospace,monospace; }.sf-runbook p { margin:0; color:#768990; font-size:10px; }
.sf-skills>div { display:flex; flex-wrap:wrap; gap:6px; }.sf-skill { display:flex; align-items:baseline; gap:5px; border:1px solid #40545d; border-radius:8px; padding:6px 8px; background:#101a21; }.sf-skill b { color:#c6d1d0; font:700 10px/1 ui-monospace,monospace; }.sf-skill small { color:#71858c; font-size:8px; }.sf-skill.tier-1 { border-color:#5d816f; }.sf-skill.tier-1 b { color:var(--sf-green); }.sf-skill.tier-2 { border-color:#9b7440; }.sf-skill.tier-2 b { color:var(--sf-gold); }.sf-status-note { margin:9px 0 0; color:var(--sf-red); font-size:8px; }
.sf-log { margin-top:12px; }.sf-log ol { display:grid; gap:6px; margin:0; padding:0; list-style:none; }.sf-log li { display:grid; grid-template-columns:7px 1fr; gap:8px; align-items:start; color:#82949a; font-size:9px; line-height:1.45; }.sf-log li i { width:6px; height:6px; margin-top:4px; border-radius:50%; background:#536a73; }.sf-log li.fix i,.sf-log li.win i,.sf-log li.ultimate i { background:var(--sf-green); }.sf-log li.hit i,.sf-log li.crash i { background:var(--sf-red); }.sf-log li.debt i { background:var(--sf-gold); }
.sf-idle { display:grid; place-items:center; min-height:330px; padding:34px; border:1px solid var(--sf-line); border-radius:17px; background:radial-gradient(circle,rgba(54,89,93,.25),transparent 55%),#111b22; text-align:center; }.sf-idle-screen { display:grid; gap:8px; color:var(--sf-green); font:12px/1.4 ui-monospace,monospace; }.sf-idle-screen span { font-size:45px; text-shadow:0 0 18px rgba(126,224,177,.35); }.sf-idle h2 { margin:15px 0 0; font-size:18px; }.sf-idle p { max-width:470px; margin:5px 0; color:#7d9097; font-size:10px; line-height:1.6; }.sf-idle code { color:#c3d2d0; }
.sf-mode-tabs { display:flex; gap:6px; margin:0 0 12px; }.sf-mode-tabs button { border:1px solid #344951; border-radius:10px; padding:7px 13px; background:#142028; color:#758b93; font:9px/1 ui-monospace,monospace; cursor:pointer; }.sf-mode-tabs button.active { border-color:#5da985; background:#1a3028; color:var(--sf-green); box-shadow:0 0 12px rgba(126,224,177,.08); }
.sf-pvp-head { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px 18px; border:1px solid var(--sf-line); border-radius:15px; background:linear-gradient(135deg,#182630,#131d24); }.sf-pvp-head small { color:var(--sf-red); font:8px/1 ui-monospace,monospace; letter-spacing:.18em; }.sf-pvp-head h2 { margin:5px 0 3px; font-size:20px; }.sf-pvp-head p { margin:0; color:#71868d; font-size:9px; }.sf-pvp-record { display:flex; gap:8px; }.sf-pvp-record span { min-width:52px; border:1px solid #3b5059; border-radius:10px; padding:8px 10px; color:#788d94; font-size:8px; text-align:center; }.sf-pvp-record b { display:block; margin-bottom:3px; color:#e4ece9; font:700 16px/1 ui-monospace,monospace; }
.sf-pvp-duel { margin-top:12px; overflow:hidden; border:1px solid #40545d; border-radius:16px; background:#142029; box-shadow:0 17px 36px rgba(0,0,0,.22); }.sf-pvp-duel>header { display:flex; align-items:center; justify-content:space-between; padding:12px 15px; border-bottom:1px solid #31434b; }.sf-pvp-duel>header small { color:#70868e; font:8px/1 ui-monospace,monospace; }.sf-pvp-duel>header h3 { margin:4px 0 0; font-size:14px; }.sf-pvp-bars { display:grid; grid-template-columns:1fr auto 1fr; gap:14px; align-items:center; padding:12px 15px; background:#101920; }.sf-pvp-bars>div { display:grid; gap:5px; }.sf-pvp-bars>div:last-child span { text-align:right; }.sf-pvp-bars span { color:#8fa0a5; font:8px/1 ui-monospace,monospace; }.sf-pvp-bars i { height:7px; overflow:hidden; border:1px solid #40535b; border-radius:99px; background:#0a1115; }.sf-pvp-bars b { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--sf-red),var(--sf-green)); }.sf-pvp-bars>div:last-child b { margin-left:auto; background:linear-gradient(90deg,var(--sf-green),var(--sf-red)); }.sf-pvp-bars em { color:#586c73; font:800 11px/1 ui-monospace,monospace; }
.sf-pvp-incoming { display:flex; align-items:center; gap:18px; margin:14px 15px 0; padding:13px 16px; border:1px solid rgba(239,126,114,.35); border-radius:13px; background:linear-gradient(120deg,rgba(100,40,38,.35),rgba(23,29,33,.55)); }.sf-pvp-incoming>span { color:var(--sf-red); font:800 36px/1 ui-monospace,monospace; text-shadow:0 0 15px rgba(239,126,114,.25); }.sf-pvp-incoming small { color:#b56b62; font:7px/1 ui-monospace,monospace; letter-spacing:.14em; }.sf-pvp-incoming h3 { margin:3px 0; font:600 14px/1.2 ui-monospace,monospace; }.sf-pvp-incoming p { margin:0; color:#9f8f8d; font-size:9px; }
.sf-pvp-decks { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:14px 15px; }.sf-pvp-decks section { min-width:0; padding:11px; border:1px solid #30434b; border-radius:12px; background:#101a21; }.sf-pvp-decks h4 { margin:0 0 9px; color:#748990; font:8px/1 ui-monospace,monospace; letter-spacing:.1em; }.sf-pvp-decks section>div { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }.sf-deck-card { position:relative; display:grid; min-width:0; min-height:54px; align-content:center; justify-items:center; gap:2px; overflow:hidden; border:1px solid #475d65; border-radius:9px; background:linear-gradient(145deg,#20313a,#121d23); }.sf-deck-card b { color:#e1ebe7; font:700 12px/1 ui-monospace,monospace; }.sf-deck-card small { max-width:100%; overflow:hidden; color:#71858c; font-size:6px; text-overflow:ellipsis; white-space:nowrap; }.sf-deck-card i { position:absolute; right:3px; bottom:3px; color:#b8894b; font:5px/1 ui-monospace,monospace; }.sf-deck-hidden { display:grid; grid-column:1/-1; min-height:54px; place-items:center; border:1px dashed #344a53; border-radius:9px; color:#5f737b; font-size:8px; }
.sf-environment { display:grid; grid-template-columns:minmax(150px,.72fr) minmax(0,1.28fr); gap:12px; padding:12px 15px; border-top:1px solid #30434b; background:#111b22; }.sf-environment header b { color:var(--sf-gold); font-size:11px; }.sf-environment header p { margin:4px 0 0; color:#82949a; font-size:8px; line-height:1.45; }.sf-environment>div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }.sf-environment>div>span { display:grid; gap:4px; padding:8px; border:1px solid #3c5059; border-radius:9px; background:#17252d; }.sf-environment>div b { color:#b7c5c5; font-size:8px; }.sf-environment>div small { color:#758a90; font-size:7px; line-height:1.35; }.sf-environment .tier-1 { border-color:#5d816f; }.sf-environment .tier-1 b { color:var(--sf-green); }.sf-environment .tier-2 { border-color:#9b7440; }.sf-environment .tier-2 b { color:var(--sf-gold); }
.sf-pvp-duel>footer { display:flex; gap:16px; padding:10px 15px; border-top:1px solid #30434b; color:#7b9097; font:8px/1 ui-monospace,monospace; }.sf-pvp-duel>footer span:nth-child(2) { color:#c18a4c; }.sf-pvp-bottom { display:grid; grid-template-columns:.78fr 1.22fr; gap:12px; margin-top:12px; }.sf-pvp-bottom .sf-log { margin-top:0; }.sf-pvp-list { border:1px solid var(--sf-line); border-radius:14px; padding:14px; background:rgba(23,35,44,.86); }.sf-pvp-list h3 { margin:0 0 10px; color:#82969e; font:9px/1 ui-monospace,monospace; letter-spacing:.12em; }.sf-pvp-list ul { display:grid; gap:6px; margin:0; padding:0; list-style:none; }.sf-pvp-list li { display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:center; padding:7px 8px; border-radius:8px; background:#101a21; }.sf-pvp-list code { color:#71888f; font:7px/1 ui-monospace,monospace; }.sf-pvp-list span { overflow:hidden; color:#9babad; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }.sf-pvp-list b { color:#7ccaa4; font-size:7px; }.sf-pvp-idle { min-height:230px; margin-top:12px; }
.sf-live-head { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px 18px; border:1px solid var(--sf-line); border-radius:15px; background:linear-gradient(135deg,#182630,#131d24); }.sf-live-head small { color:var(--sf-red); font:8px/1 ui-monospace,monospace; letter-spacing:.18em; }.sf-live-head h2 { margin:5px 0 3px; font-size:20px; }.sf-live-head p { margin:0; color:#71868d; font-size:9px; }.sf-live-count { flex:0 0 auto; border:1px solid #3b5059; border-radius:10px; padding:9px 12px; color:#8da0a7; font-size:9px; }.sf-live-count i { display:inline-block; width:7px; height:7px; margin-right:6px; border-radius:50%; background:var(--sf-red); box-shadow:0 0 8px var(--sf-red); }.sf-live-count b { color:#e4ece9; }
.sf-live-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; margin-top:12px; }.sf-live-card { display:grid; grid-template-columns:86px minmax(0,1fr); gap:9px; min-width:0; padding:8px; border:1px solid #344951; border-radius:13px; background:#142028; color:#91a3a8; font-family:inherit; text-align:left; cursor:pointer; }.sf-live-card.active { border-color:var(--sf-green); box-shadow:0 0 0 2px rgba(126,224,177,.08); }.sf-live-screen { position:relative; display:grid; grid-template-columns:1fr auto 1fr; place-items:center; gap:3px; min-height:53px; overflow:hidden; border:3px solid #455a63; border-radius:9px; background:linear-gradient(#bce9f4 0 68%,#9fdc92 68%); color:#514b5a; }.sf-live-screen::after { content:''; position:absolute; inset:3px; border:1px solid rgba(255,255,255,.55); border-radius:5px; pointer-events:none; }.sf-live-screen i { position:absolute; right:4px; top:4px; width:6px; height:6px; border-radius:50%; background:#929292; }.sf-live-screen i.on { background:#f06f70; box-shadow:0 0 0 2px #ffe4d2; }.sf-live-screen b { z-index:1; max-width:32px; overflow:hidden; font-size:6px; text-overflow:ellipsis; white-space:nowrap; }.sf-live-screen em { z-index:1; color:#f06f70; font:900 8px/1 ui-rounded,system-ui,sans-serif; }.sf-live-card>span:last-child { display:grid; align-content:center; min-width:0; gap:4px; }.sf-live-card code { color:#71888f; font:7px/1 ui-monospace,monospace; }.sf-live-card small { overflow:hidden; color:#7f9298; font-size:7px; text-overflow:ellipsis; white-space:nowrap; }.sf-live-card strong { color:#7ccaa4; font-size:8px; }.sf-public-duel { margin-top:12px; }.sf-live-empty { margin-top:12px; }
@media (max-width:720px) { .software-directory{grid-template-columns:repeat(3,minmax(72px,98px));}.sf-fighters{grid-template-columns:90px 28px minmax(145px,1fr);padding-inline:10px}.sf-head{width:72px;height:60px}.sf-head b{left:22px}.sf-grid,.sf-pvp-bottom{grid-template-columns:1fr}.sf-profile{gap:9px}.sf-record{font-size:8px}.sf-runbook li{grid-template-columns:1fr auto}.sf-runbook li em{display:none}.sf-pvp-decks{grid-template-columns:1fr}.sf-pvp-head{padding:12px}.sf-pvp-record span{min-width:42px;padding:6px} }

/* ── 栈斗糖果街机皮肤：小机真的在打，终端只负责记分 ─────────────────── */
.sf-host {
  --sf-cream:#fff8e7; --sf-paper:#fffdf5; --sf-ink:#514b5a;
  --sf-line:#706678; --sf-green:#79cda7; --sf-mint:#bcebd5;
  --sf-red:#f0837f; --sf-coral:#ffaaa1; --sf-gold:#f6c866;
  color:var(--sf-ink);
}
.sf-topbar { min-height:72px; border-bottom:3px solid var(--sf-line); background:#fff4d5; box-shadow:0 5px 0 rgba(81,75,90,.11); }
.sf-topbar .mr-back,.sf-refresh { border:2px solid var(--sf-line); background:#fffdf5; color:var(--sf-ink); box-shadow:0 3px 0 rgba(81,75,90,.18); }
.sf-topbar .mr-back:active,.sf-refresh:active { transform:translateY(2px); box-shadow:0 1px 0 rgba(81,75,90,.18); }
.sf-logo { border:2px solid var(--sf-line); border-radius:16px; box-shadow:0 4px 0 rgba(81,75,90,.18); }
.sf-topbar strong { color:var(--sf-ink); letter-spacing:.04em; }.sf-topbar small { color:#9b7e78; }
.sf-view {
  background:
    radial-gradient(circle at 12px 12px,rgba(240,131,127,.15) 0 2px,transparent 2.5px) 0 0/24px 24px,
    linear-gradient(180deg,#fff6d9,#fffaf0 48%,#e7f5dc);
  scrollbar-color:#d1b5a5 #fff7e3;
}
.sf-mode-tabs { width:fit-content; padding:4px; border:2px solid var(--sf-line); border-radius:99px; background:#fffdf5; box-shadow:0 3px 0 rgba(81,75,90,.14); }
.sf-mode-tabs button { border:0; border-radius:99px; padding:8px 15px; background:transparent; color:#998d9e; font:700 10px/1 ui-rounded,system-ui,sans-serif; }
.sf-mode-tabs button.active { background:var(--sf-green); color:#fff; box-shadow:inset 0 -3px 0 rgba(58,126,96,.17); }
.sf-profile,.sf-pvp-head,.sf-runbook,.sf-skills,.sf-log,.sf-pvp-list {
  border:2px solid var(--sf-line); background:rgba(255,253,245,.95); box-shadow:0 5px 0 rgba(81,75,90,.12);
}
.sf-profile { border-radius:18px; }.sf-profile small,.sf-pvp-head small { color:#b27670; }.sf-profile strong,.sf-record b { color:var(--sf-ink); }.sf-profile span { color:#4da77e; }
.sf-match-tag { border:2px solid #8f8395; background:#fff; color:#887d8e; font-weight:700; }.sf-match-tag.active { border-color:#5eae88; background:#e8fff2; color:#3f8f6b; }.sf-match-tag.won { border-color:#c99a37; background:#fff4c6; color:#9f701c; }.sf-match-tag.crashed { border-color:#d56a67; background:#ffe7e2; color:#bd5553; }
.sf-arena { border:3px solid var(--sf-line); border-radius:23px; background:#c8efdf; box-shadow:0 7px 0 rgba(81,75,90,.18); }
.sf-hud { border-bottom:2px solid var(--sf-line); background:#fffdf5; }.sf-hud-copy span,.sf-round { color:#978a9b; }.sf-hud-copy b { color:var(--sf-ink); }
.sf-stability,.sf-pvp-bars i { height:12px; border:2px solid var(--sf-line); background:#fff4dd; box-shadow:inset 0 2px 0 rgba(81,75,90,.1); }
.sf-stability i,.sf-pvp-bars b { background:linear-gradient(90deg,#ff8c88,#f7ce68 42%,#77d1a3); box-shadow:none; }
.sf-fighters { position:relative; min-height:244px; background:linear-gradient(0deg,#9fdc92 0 22%,transparent 22%),radial-gradient(circle at 20% 25%,#fff 0 4px,transparent 5px),linear-gradient(#bce9f4,#e8fbef); }
.sf-fighters::after,.sf-arcade-stage::after { content:''; position:absolute; z-index:0; left:0; right:0; bottom:20%; border-top:3px dashed rgba(81,75,90,.25); }
.sf-versus { position:relative; z-index:2; color:#f06f70; font-size:25px; text-shadow:2px 2px 0 #fff; transform:rotate(-8deg); }
.sf-bug { position:relative; z-index:2; overflow:visible; border:3px solid var(--sf-line); border-radius:23px 20px 26px 18px; background:#fff7f0; box-shadow:0 7px 0 rgba(81,75,90,.16); transform:rotate(1deg); }
.sf-bug-code { color:var(--sf-red); text-shadow:3px 3px 0 #ffd6a8; }.sf-bug h2 { color:var(--sf-ink); }.sf-bug p { color:#746978; }.sf-bug small { border-top-color:#efb4aa; color:#b46967; }.sf-bug.resolved { border-color:#67b98e; background:#e7fff0; }.sf-bug.resolved>span { color:#4ba477; }
.sf-context { border-top:2px solid var(--sf-line); background:#fff9e9; }.sf-context>span { color:#94889b; }.sf-context i { width:23px; height:10px; border:2px solid #8e8292; border-radius:99px; background:#eee5dd; }.sf-context i.on { border-color:#55aa80; background:#77d1a3; box-shadow:0 0 0 2px #dff8e9; }.sf-context b { color:#b57928; }
.sf-grid h3,.sf-log h3,.sf-skills h3,.sf-pvp-list h3 { color:#796e80; font:800 10px/1 ui-rounded,system-ui,sans-serif; letter-spacing:.06em; }
.sf-runbook li,.sf-pvp-list li { border:1px solid #ead9c9; background:#fff7e8; }.sf-runbook li span,.sf-runbook p,.sf-log li { color:#817583; }.sf-runbook code { color:#318c67; }.sf-runbook em { color:#ad8d68; }
.sf-skill { border:2px solid #b6a9ba; border-radius:11px; background:#fff8e8; box-shadow:0 2px 0 #e7d7c9; }.sf-skill b { color:var(--sf-ink); }.sf-skill small { color:#8d808f; }.sf-skill.tier-1 { border-color:#70b995; }.sf-skill.tier-1 b { color:#318c67; }.sf-skill.tier-2 { border-color:#d4a947; }.sf-skill.tier-2 b { color:#ad7c20; }.sf-status-note { color:#cf615e; }
.sf-log li i { border:1px solid #6f6576; background:#b8abb9; }.sf-log li.fix i,.sf-log li.win i,.sf-log li.ultimate i { background:#6dcca0; }.sf-log li.hit i,.sf-log li.crash i { background:#f0837f; }.sf-log li.debt i { background:#f6c866; }
.sf-idle { border:3px solid var(--sf-line); border-radius:24px; background:radial-gradient(circle at 50% 38%,#fff 0 14%,transparent 14.5%),linear-gradient(#bce9f4 0 68%,#a6dc96 68%); box-shadow:0 7px 0 rgba(81,75,90,.16); }.sf-idle-screen { color:#4c9c77; font:800 12px/1.4 ui-rounded,system-ui,sans-serif; }.sf-idle-screen span { color:#fff; font-size:58px; text-shadow:0 3px 0 #87c8d3; animation:sf-cloud-bob 2.2s ease-in-out infinite; }.sf-idle h2 { color:var(--sf-ink); }.sf-idle p { color:#746979; }.sf-idle code { color:#9f5756; background:#fff6d9; }

/* 小机：全由 CSS 组成，技术债会在身后长成纸箱。 */
.sf-arcade-machine { position:relative; z-index:2; display:grid; justify-items:center; align-content:center; width:118px; min-height:154px; margin:auto; filter:drop-shadow(0 5px 0 rgba(81,75,90,.16)); }
.sf-machine-antenna { position:relative; width:5px; height:19px; border:2px solid var(--sf-line); border-bottom:0; background:#fff5d9; }.sf-machine-antenna::before { content:''; position:absolute; left:50%; top:-10px; width:12px; height:12px; border:2px solid var(--sf-line); border-radius:50%; background:var(--sf-gold); transform:translateX(-50%); }
.sf-machine-face { position:relative; display:grid; grid-template-columns:repeat(2,12px); place-content:center; gap:26px; width:84px; height:62px; border:4px solid var(--sf-line); border-radius:25px 25px 20px 22px; background:#a7e2c5; box-shadow:inset 0 -8px 0 rgba(56,137,100,.12); }
.sf-arcade-machine.opponent .sf-machine-face { background:#ffaaa1; box-shadow:inset 0 -8px 0 rgba(184,84,82,.11); }
.sf-machine-face>i { height:13px; border-radius:50%; background:#514b5a; box-shadow:inset 3px 3px 0 #fff; }.sf-machine-face>b { position:absolute; left:50%; bottom:12px; width:24px; height:9px; border:3px solid var(--sf-line); border-top:0; border-radius:0 0 20px 20px; transform:translateX(-50%); }
.sf-machine-body { position:relative; display:grid; grid-template-columns:1fr 1fr; place-items:center; width:55px; height:35px; margin-top:-2px; border:4px solid var(--sf-line); border-radius:10px 10px 15px 15px; background:#f8d87c; }.sf-machine-body>i { position:absolute; top:8px; width:20px; height:9px; border:4px solid var(--sf-line); border-inline:0; background:#a7e2c5; }.sf-machine-body>i:first-child { left:-23px; transform:rotate(18deg); }.sf-machine-body>i:last-child { right:-23px; transform:rotate(-18deg); }.sf-machine-body>b { width:17px; height:10px; border:2px solid var(--sf-line); border-radius:4px; background:#fff9e8; }
.sf-machine-feet { display:flex; gap:18px; margin-top:-2px; }.sf-machine-feet i { width:17px; height:10px; border:3px solid var(--sf-line); border-radius:4px 4px 8px 8px; background:#8fcfb0; }
.sf-arcade-machine>strong { max-width:116px; margin-top:6px; overflow:hidden; color:var(--sf-ink); font:800 9px/1 ui-rounded,system-ui,sans-serif; text-overflow:ellipsis; white-space:nowrap; }
.sf-arcade-machine.is-active { animation:sf-machine-hop 1.2s ease-in-out infinite; }.sf-arcade-machine.is-active .sf-machine-body>i:first-child { animation:sf-machine-punch .75s ease-in-out infinite; }
.sf-debt-boxes { position:absolute; z-index:-1; right:-1px; bottom:19px; width:48px; height:72px; }.sf-debt-boxes i { position:absolute; right:0; bottom:calc(var(--box) * 15px); width:30px; height:19px; border:3px solid #74616b; border-radius:3px; background:#d8a45f; }.sf-debt-boxes i:nth-child(1){transform:rotate(-3deg)}.sf-debt-boxes i:nth-child(2){transform:rotate(2deg)}.sf-debt-boxes i:nth-child(3){transform:rotate(-1deg)}.sf-debt-boxes i:nth-child(4){transform:rotate(4deg)}.sf-debt-boxes i::after { content:'DEBT'; display:block; padding-top:5px; color:#805b3e; font:700 5px/1 ui-monospace,monospace; text-align:center; }

/* PVP 变成两只小机站在软垫上，中间的 Bug 卡负责挨揍。 */
.sf-pvp-head { border-radius:21px; background:#fffdf5; }.sf-pvp-head small { color:#dd6866; }.sf-pvp-head h2 { color:var(--sf-ink); }.sf-pvp-head p { color:#8c7d8a; font-size:10px; }
.sf-pvp-head-side { display:flex; align-items:center; gap:9px; }.sf-relay-chip { min-width:122px; padding:8px 11px; border:2px dashed #b89b89; border-radius:13px; background:#fff9e4; transform:rotate(-1deg); }.sf-relay-chip.queued { border-style:solid; border-color:#62ac87; background:#e7fff0; }.sf-relay-chip b,.sf-relay-chip small { display:block; }.sf-relay-chip b { color:#806d77; font-size:9px; }.sf-relay-chip.queued b { color:#3e8f68; }.sf-relay-chip small { margin-top:3px; color:#ad9593; font:6px/1 ui-monospace,monospace; letter-spacing:.08em; }
.sf-pvp-record span { border:2px solid var(--sf-line); border-radius:13px; background:#fff4c9; color:#8d7b7b; box-shadow:0 3px 0 #e5cba9; }.sf-pvp-record b { color:var(--sf-ink); }
.sf-pvp-duel { border:3px solid var(--sf-line); border-radius:23px; background:#fffdf5; box-shadow:0 7px 0 rgba(81,75,90,.16); }.sf-pvp-duel>header { border-bottom:2px solid var(--sf-line); background:#fff2c8; }.sf-pvp-duel>header small { color:#9a8798; }.sf-pvp-duel>header h3 { color:var(--sf-ink); }
.sf-pvp-bars { border-bottom:2px solid var(--sf-line); background:#fffdf5; }.sf-pvp-bars span { color:#756b7a; font-weight:700; }.sf-pvp-bars em { color:#ed706d; }
.sf-arcade-stage { position:relative; display:grid; grid-template-columns:130px minmax(190px,1fr) 130px; align-items:end; gap:18px; min-height:222px; padding:20px clamp(12px,3vw,34px) 25px; overflow:hidden; background:linear-gradient(0deg,#9fdc92 0 22%,transparent 22%),radial-gradient(circle at 20% 20%,#fff 0 5px,transparent 5.5px),linear-gradient(#bce9f4,#e8fbef); }
.sf-pvp-incoming { position:relative; z-index:2; display:block; min-width:0; margin:auto 0 20px; padding:17px 16px; overflow:visible; border:3px solid var(--sf-line); border-radius:23px 18px 25px 20px; background:#fff4ec; box-shadow:0 7px 0 rgba(81,75,90,.16); text-align:center; transform:rotate(-1deg); }
.sf-pvp-incoming>span { display:block; color:var(--sf-red); font:900 clamp(32px,5vw,56px)/.9 ui-rounded,system-ui,sans-serif; text-shadow:3px 3px 0 #ffd39f; }.sf-pvp-incoming small { color:#d16965; font:800 8px/1 ui-rounded,system-ui,sans-serif; letter-spacing:.08em; }.sf-pvp-incoming h3 { margin:5px 0; color:var(--sf-ink); font:800 14px/1.2 ui-rounded,system-ui,sans-serif; }.sf-pvp-incoming p { margin:0; color:#897680; font-size:9px; }
.sf-pvp-decks { background:#fff9e9; }.sf-pvp-decks section { border:2px solid #b4a8b6; border-radius:15px; background:#fffdf7; }.sf-pvp-decks h4 { color:#7b6f80; font:800 9px/1 ui-rounded,system-ui,sans-serif; letter-spacing:.04em; }.sf-deck-card { min-height:62px; border:2px solid var(--sf-line); border-radius:13px; background:linear-gradient(145deg,#fff4c4,#ffe8dd); box-shadow:0 3px 0 #ddc7b9; }.sf-deck-card:nth-child(even) { transform:rotate(1deg); }.sf-deck-card:nth-child(odd) { transform:rotate(-1deg); }.sf-deck-card b { color:#d46260; font-size:15px; }.sf-deck-card small { color:#827784; font-size:7px; }.sf-deck-card i { color:#9b722b; }.sf-deck-hidden { border:2px dashed #b9aab8; background:#fff8e6; color:#9d8e9d; }
.sf-environment { border-top:2px solid var(--sf-line); background:#fff8e5; }.sf-environment header b { color:#b77829; font:900 12px/1 ui-rounded,system-ui,sans-serif; }.sf-environment header p { color:#897a85; font-size:9px; }.sf-environment>div>span { border:2px solid #b4a8b6; background:#fffdf7; box-shadow:0 2px 0 #e2d0be; }.sf-environment>div b { color:#74697a; font:800 9px/1.2 ui-rounded,system-ui,sans-serif; }.sf-environment>div small { color:#8e808b; font-size:8px; }.sf-environment .tier-1 { border-color:#70b995; }.sf-environment .tier-1 b { color:#318c67; }.sf-environment .tier-2 { border-color:#d4a947; }.sf-environment .tier-2 b { color:#ad7c20; }
.sf-pvp-duel>footer { border-top:2px solid var(--sf-line); background:#fff2c8; color:#756a7a; }.sf-pvp-duel>footer span:nth-child(2) { color:#ad712b; }.sf-pvp-list code { color:#a36e67; }.sf-pvp-list span { color:#776c7d; }.sf-pvp-list b { color:#398e67; }
.sf-pvp-list span i { margin-right:4px; padding:2px 5px; border-radius:99px; background:#fff1c3; color:#9b742d; font-size:6px; font-style:normal; }.sf-relay-waiting { background:radial-gradient(circle at 50% 38%,#fff 0 14%,transparent 14.5%),linear-gradient(#f9d7dd 0 68%,#a6dc96 68%); }.sf-relay-deck { display:grid; grid-template-columns:repeat(4,minmax(74px,108px)); gap:7px; width:min(460px,100%); margin-top:10px; }
.sf-live-head { border:2px solid var(--sf-line); border-radius:21px; background:#fffdf5; box-shadow:0 5px 0 rgba(81,75,90,.12); }.sf-live-head small { color:#dd6866; }.sf-live-head h2 { color:var(--sf-ink); }.sf-live-head p { color:#8c7d8a; font-size:10px; }.sf-live-count { border:2px solid var(--sf-line); background:#fff4c9; color:#8d7b7b; box-shadow:0 3px 0 #e5cba9; }.sf-live-count b { color:var(--sf-ink); }.sf-live-card { position:relative; padding-right:30px; border:2px solid var(--sf-line); background:#fffdf5; box-shadow:0 4px 0 rgba(81,75,90,.14); }.sf-live-card::after { content:'⌄'; position:absolute; right:10px; top:50%; color:#988a98; font:900 18px/1 ui-rounded,system-ui,sans-serif; transform:translateY(-50%); transition:transform .18s ease; }.sf-live-card[aria-expanded="true"]::after { transform:translateY(-50%) rotate(180deg); }.sf-live-card.active { border-color:#55a77d; background:#effff5; box-shadow:0 4px 0 #b9ddc7; }.sf-live-card code { color:#a36e67; }.sf-live-card small { color:#8e808b; }.sf-live-card strong { color:#398e67; }.sf-live-detail-panel.is-opening { animation:sf-live-detail-in .18s ease-out; }

/* 一局打完要认真收尾；结果单像街机吐出来的一张糖果色小票。 */
.sf-settlement { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr); gap:5px 15px; align-items:center; margin:12px 0; padding:16px 18px; overflow:hidden; border:3px solid var(--sf-line); border-radius:24px 20px 25px 19px; background:#fffdf5; box-shadow:0 7px 0 rgba(81,75,90,.16); }
.sf-settlement::after { content:'✦  ·  ●  ·  ✦'; position:absolute; right:17px; top:10px; color:rgba(81,75,90,.16); font:900 12px/1 ui-rounded,system-ui,sans-serif; letter-spacing:.3em; transform:rotate(4deg); }
.sf-settlement-icon { grid-row:1 / span 2; display:grid; place-items:center; width:62px; height:62px; border:3px solid var(--sf-line); border-radius:50%; background:#fff2bd; color:#b17928; box-shadow:inset 0 -6px 0 rgba(171,118,43,.12),0 3px 0 rgba(81,75,90,.16); font:900 29px/1 ui-rounded,system-ui,sans-serif; transform:rotate(-5deg); }
.sf-settlement-copy { min-width:0; padding-right:82px; }.sf-settlement-copy>small { color:#aa7772; font:800 8px/1 ui-rounded,system-ui,sans-serif; letter-spacing:.12em; }.sf-settlement-copy h2 { margin:5px 0 3px; color:var(--sf-ink); font:900 clamp(17px,3vw,25px)/1.12 ui-rounded,system-ui,sans-serif; }.sf-settlement-copy p { margin:0; color:#887b89; font-size:9px; line-height:1.55; }
.sf-settlement-stats { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }.sf-settlement-stats>span { display:flex; align-items:baseline; gap:6px; padding:7px 10px; border:2px solid #c6b7bf; border-radius:99px; background:rgba(255,255,255,.62); }.sf-settlement-stats small { color:#9b8c98; font-size:7px; }.sf-settlement-stats b { color:var(--sf-ink); font:900 10px/1 ui-rounded,system-ui,sans-serif; }
.sf-settlement.victory { background:linear-gradient(135deg,#fff8cf,#ebfff2); }.sf-settlement.victory .sf-settlement-icon { background:#ffe188; color:#9d6b1e; }.sf-settlement.loss { background:linear-gradient(135deg,#fff2ee,#fffaf0); }.sf-settlement.loss .sf-settlement-icon { background:#ffc6bd; color:#b75d59; }.sf-settlement.draw { background:linear-gradient(135deg,#eefaff,#fff9dc); }.sf-settlement.draw .sf-settlement-icon { background:#cbeef1; color:#4c8991; }

/* 直播持续刷新，details 的开合状态由 JS 按对局记住。 */
.sf-log-fold { padding:0; overflow:hidden; }.sf-log-fold>summary { display:flex; align-items:center; gap:10px; padding:14px; cursor:pointer; list-style:none; user-select:none; }.sf-log-fold>summary::-webkit-details-marker { display:none; }.sf-log-fold>summary>span { display:flex; align-items:center; gap:8px; color:#796e80; }.sf-log-fold>summary i { display:grid; place-items:center; width:23px; height:23px; border:2px solid #ad9daa; border-radius:8px; background:#fff2c8; color:#a87370; font-style:normal; }.sf-log-fold>summary b { font:800 10px/1 ui-rounded,system-ui,sans-serif; letter-spacing:.06em; }.sf-log-fold>summary em { margin-left:auto; color:#a0939e; font-size:8px; font-style:normal; }.sf-log-fold>summary::after { content:'⌄'; color:#8d7f8e; font:900 18px/1 ui-rounded,system-ui,sans-serif; transition:transform .18s ease; }.sf-log-fold[open]>summary { border-bottom:2px dashed #e2d1c6; }.sf-log-fold[open]>summary::after { transform:rotate(180deg); }.sf-log-fold>ol { padding:13px 14px 14px; }

/* 404 专属：八个小文件夹从错误卡里“噗”地掉一地。 */
.sf-folder-burst,.sf-pop-stars { position:absolute; z-index:5; inset:0; overflow:visible; pointer-events:none; }
.sf-folder-burst i { position:absolute; left:50%; top:53%; width:24px; height:17px; border:2px solid #6f5d68; border-radius:3px; background:#f6c866; box-shadow:0 2px 0 rgba(111,93,104,.18); opacity:0; animation:sf-folder-pop 2.2s cubic-bezier(.2,.75,.3,1) infinite; animation-delay:calc(var(--folder) * .08s); }
.sf-folder-burst i::before { content:''; position:absolute; left:2px; top:-7px; width:10px; height:7px; border:2px solid #6f5d68; border-bottom:0; border-radius:3px 3px 0 0; background:#ffe18b; }
.sf-folder-burst i:nth-child(1){--fx:-95px;--fy:62px;--fr:-24deg}.sf-folder-burst i:nth-child(2){--fx:-65px;--fy:88px;--fr:16deg}.sf-folder-burst i:nth-child(3){--fx:-31px;--fy:72px;--fr:-8deg}.sf-folder-burst i:nth-child(4){--fx:10px;--fy:91px;--fr:19deg}.sf-folder-burst i:nth-child(5){--fx:48px;--fy:74px;--fr:-17deg}.sf-folder-burst i:nth-child(6){--fx:84px;--fy:91px;--fr:24deg}.sf-folder-burst i:nth-child(7){--fx:-80px;--fy:-52px;--fr:-29deg}.sf-folder-burst i:nth-child(8){--fx:79px;--fy:-48px;--fr:27deg}
.sf-pop-stars i { position:absolute; color:#f6c866; font-style:normal; animation:sf-star-pop 1.6s ease-in-out infinite; }.sf-pop-stars i:nth-child(1){left:8%;top:14%;}.sf-pop-stars i:nth-child(2){right:8%;top:25%;color:#f0837f;animation-delay:.35s}.sf-pop-stars i:nth-child(3){right:16%;bottom:8%;animation-delay:.7s}
.sf-round-break { position:relative; z-index:2; align-self:center; color:#9b7c82; font-weight:800; }

@keyframes sf-folder-pop { 0%,10%{opacity:0;transform:translate(-50%,-50%) scale(.3)} 22%{opacity:1} 58%{opacity:1;transform:translate(calc(-50% + var(--fx)),calc(-50% + var(--fy))) rotate(var(--fr)) scale(1)} 78%,100%{opacity:0;transform:translate(calc(-50% + var(--fx)),calc(-50% + var(--fy) + 10px)) rotate(var(--fr)) scale(.92)} }
@keyframes sf-star-pop { 0%,100%{opacity:.2;transform:scale(.7) rotate(0)} 50%{opacity:1;transform:scale(1.35) rotate(20deg)} }
@keyframes sf-machine-hop { 0%,100%{transform:translateY(0) rotate(-1deg)} 50%{transform:translateY(-7px) rotate(1deg)} }
@keyframes sf-machine-punch { 0%,100%{transform:rotate(18deg) translateX(0)} 50%{transform:rotate(-8deg) translateX(-12px)} }
@keyframes sf-cloud-bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes sf-live-detail-in { from{opacity:0;transform:translateY(-5px)} to{opacity:1;transform:translateY(0)} }

@media (max-width:720px) {
  .sf-arcade-stage { grid-template-columns:92px minmax(145px,1fr) 92px; gap:7px; padding-inline:8px; }
  .sf-arcade-machine { width:88px; transform:scale(.82); }.sf-arcade-machine.is-active { animation:none; }
  .sf-pvp-incoming { padding:12px 8px; }.sf-pvp-incoming p { display:none; }
  .sf-pvp-decks { grid-template-columns:1fr; }.sf-pvp-head p { display:none; }
  .sf-pvp-head-side { align-items:flex-end; flex-direction:column; }.sf-relay-chip { min-width:0; }.sf-relay-chip small { display:none; }.sf-relay-deck { grid-template-columns:repeat(2,minmax(74px,1fr)); }
  .sf-environment { grid-template-columns:1fr; }.sf-environment>div { grid-template-columns:1fr; }
  .sf-live-head p { display:none; }.sf-live-grid { grid-template-columns:1fr; }.sf-live-card { grid-template-columns:76px minmax(0,1fr); }.sf-live-screen { min-height:44px; }
  .sf-settlement { grid-template-columns:52px minmax(0,1fr); padding:13px; }.sf-settlement-icon { width:48px; height:48px; font-size:23px; }.sf-settlement-copy { padding-right:0; }.sf-settlement::after { display:none; }.sf-settlement-stats { display:grid; grid-template-columns:1fr 1fr; }.sf-settlement-stats>span { justify-content:space-between; min-width:0; }
  .sf-folder-burst i:nth-child(1),.sf-folder-burst i:nth-child(7) { display:none; }
}
@media (prefers-reduced-motion:reduce) { .sf-arcade-machine.is-active,.sf-folder-burst i,.sf-pop-stars i,.sf-idle-screen span { animation:none; }.sf-folder-burst i { opacity:.75; transform:translate(calc(-50% + var(--fx)),calc(-50% + var(--fy))) rotate(var(--fr)); } }

/* ── 纺星季：深色天幕占满视口，内部自适应可用高度 ── */
main#tab-content[data-tab="star-weaving"] {
  overflow: hidden;
  overscroll-behavior: none;
  padding: 0 !important;
  background: #081b35;
}
#tab-content > #star-weaving-page {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
}
.star-weaving-page {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  padding:
    clamp(16px, 2.6vh, 28px)
    clamp(68px, 8vw, 164px)
    clamp(18px, 3vh, 30px)
    clamp(110px, 13vw, 266px);
  background:
    radial-gradient(circle at 18% 12%, rgba(64, 102, 150, .24), transparent 32%),
    radial-gradient(circle at 82% 78%, rgba(109, 82, 138, .16), transparent 38%),
    linear-gradient(150deg, #102b50 0%, #091d39 48%, #07172e 100%);
}
.star-weaving-page::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 14% 26%, rgba(242, 216, 143, .45) 0 1px, transparent 1.4px),
    radial-gradient(circle at 77% 18%, rgba(219, 231, 255, .32) 0 1px, transparent 1.3px),
    radial-gradient(circle at 92% 64%, rgba(242, 216, 143, .28) 0 1px, transparent 1.3px);
  background-size: 180px 150px, 230px 190px, 270px 220px;
  opacity: .5;
}
.star-weaving-head,
.star-weaving-region-tabs,
.star-weaving-layout {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
}
.star-weaving-head {
  align-items: center;
  margin: 0 0 8px;
}
.star-weaving-head h1 {
  margin-top: 2px;
  font-size: clamp(25px, 2.65vw, 40px);
  line-height: 1.08;
}
.star-weaving-head p {
  max-width: 48em;
  margin-top: 5px;
  font-size: clamp(10px, 1vw, 13px);
}
.star-weaving-progress {
  padding: 8px 15px;
  background: rgba(5, 20, 42, .28);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.star-weaving-region-tabs {
  margin: 0 0 9px;
  padding: 0 4px;
}
.star-weaving-region-tabs button {
  padding: 7px 12px;
  font-size: clamp(12px, 1.25vw, 17px);
}
.star-weaving-layout {
  min-height: 0;
  height: 100%;
  grid-template-columns: minmax(0, 1fr) clamp(210px, 20vw, 300px);
  align-items: center;
  gap: clamp(12px, 1.7vw, 24px);
  margin: 0;
}
.star-weaving-canvas {
  justify-self: end;
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  aspect-ratio: 3 / 2;
  border: 1px solid rgba(226, 199, 132, .14);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 7, 22, .38);
}
.star-weaving-detail {
  align-self: stretch;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  padding: clamp(14px, 1.7vw, 23px);
  border-radius: 18px;
  background: rgba(5, 21, 44, .72);
  box-shadow: inset 0 0 30px rgba(46, 77, 116, .12);
  overscroll-behavior: contain;
}
.star-weaving-detail h2 { font-size: clamp(18px, 1.9vw, 26px); }
.star-weaving-detail h3 { font-size: clamp(13px, 1.25vw, 17px); }
.star-weaving-detail p,
.star-weaving-detail li { font-size: clamp(11px, 1.05vw, 14px); }

@media (max-width: 900px), (max-height: 560px) {
  .star-weaving-page {
    padding: 12px 64px 14px 104px;
  }
  .star-weaving-head { margin-bottom: 4px; }
  .star-weaving-head p { display: none; }
  .star-weaving-progress { padding: 6px 10px; font-size: 10px; }
  .star-weaving-region-tabs { margin-bottom: 5px; }
  .star-weaving-region-tabs button { padding: 5px 8px; font-size: 11px; }
  .star-weaving-layout {
    grid-template-columns: minmax(0, 1fr) clamp(170px, 25vw, 210px);
    gap: 10px;
  }
  .star-weaving-detail { padding: 11px; }
}

/* ── 第三批视觉统一：通讯器 / 联机 / 通用弹窗 ─────────────────────
   只覆盖视觉层；消息可见性、撤回占位与联机交互仍由各自的 JS / API 决定。 */

/* 通讯器：褪色织物的浅纸面；仅选中态和未读状态显色。 */
#communicator-page {
  --comm-ink: var(--town-ink);
  --comm-sage: var(--town-accent);
  --comm-fog: var(--town-blue);
  --comm-paper: var(--town-surface);
  color: var(--comm-ink);
  border: 0;
  border-radius: 0;
  background: rgba(252, 250, 244, .95);
  box-shadow: 0 14px 38px rgba(82, 88, 77, .08);
}
main#tab-content.machine-communicator-open {
  padding: 0;
  background:
    linear-gradient(rgba(248, 246, 239, .8), rgba(248, 246, 239, .9)),
    url('/static/assets/ui/faded-town-wide-v1.webp?v=20260827a') center / cover no-repeat;
}
main#tab-content.machine-communicator-open > #machine-network-page.machine-network-communicator-host {
  box-sizing: border-box;
}
main#tab-content.machine-communicator-open .machine-network-communicator-host > #communicator-page {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
main#tab-content.machine-communicator-open .communicator-brand {
  min-height: 60px;
  padding-left: max(116px, calc(env(safe-area-inset-left) + 108px));
}
main#tab-content.machine-communicator-open .machine-app-back {
  top: max(20px, calc(10px + env(safe-area-inset-top)));
  left: calc(68px + env(safe-area-inset-left));
  border: 1px solid rgba(117, 128, 95, .26);
  background: rgba(252, 250, 244, .9);
  color: var(--town-accent-deep);
  box-shadow: 0 4px 13px rgba(82, 88, 77, .07);
}
.communicator-sidebar {
  border-right: 1px solid rgba(117, 128, 95, .13);
  background:
    linear-gradient(rgba(248, 246, 239, .2), rgba(248, 246, 239, .34)),
    url('/static/assets/ui/faded-town-wide-v1.webp?v=20260827a') center / cover no-repeat;
}
.communicator-brand,
.communicator-chat-head {
  background: rgba(248, 246, 239, .84);
}
.communicator-brand { border-bottom: 1px solid rgba(117,128,95,.12); }
.communicator-brand h1,
.communicator-chat-head h2 { color: var(--town-ink); }
.communicator-brand p,
.communicator-chat-head p { color: var(--town-muted); }
.communicator-thread-preview { color: var(--town-muted); }
.communicator-mode-tabs {
  padding: 4px;
  border: 1px solid rgba(117, 128, 95, .12);
  border-radius: 999px;
  background: rgba(252, 250, 244, .58);
}
.communicator-mode-tabs button {
  border-radius: 999px;
  color: var(--town-muted);
}
.communicator-mode-tabs button.active {
  background: var(--town-sage);
  color: var(--town-accent-deep);
  box-shadow: none;
}
.communicator-notices {
  border: 1px solid rgba(175, 157, 124, .16);
  border-radius: 18px;
  background: rgba(252, 249, 240, .7);
}
.communicator-thread,
.communicator-space-person {
  border-radius: 0;
  border-bottom: 1px solid rgba(117, 128, 95, .1);
  background: rgba(252, 250, 244, .52);
  -webkit-backdrop-filter: blur(2.2px);
  backdrop-filter: blur(2.2px);
}
.communicator-thread:hover,
.communicator-space-person:hover { background: rgba(252, 250, 244, .78); }
.communicator-thread.active,
.communicator-space-person.active {
  outline: 0;
  background: rgba(231, 235, 223, .88);
  box-shadow: none;
}
.communicator-avatar,
.communicator-message-avatar { border-radius: 15px; }
.communicator-chat-head {
  border-bottom: 1px solid rgba(117, 128, 95, .12);
}
.communicator-messages,
.communicator-space-feed {
  background:
    linear-gradient(rgba(248, 246, 239, .22), rgba(248, 246, 239, .42)),
    url('/static/assets/ui/faded-town-wide-v1.webp?v=20260827a') center / cover no-repeat;
}
.communicator-bubble {
  padding: 10px 14px;
  border: 1px solid rgba(137, 153, 157, .13);
  border-radius: 15px;
  background: rgba(229, 235, 237, .88);
  color: var(--town-ink);
  box-shadow: 0 3px 10px rgba(82, 88, 77, .045);
}
.communicator-message.mine .communicator-bubble {
  border-color: rgba(176, 153, 118, .12);
  border-radius: 15px;
  background: rgba(240, 234, 223, .9);
}
.communicator-message-meta {
  color: #7e7869;
  text-shadow: 0 1px 1px rgba(251, 248, 239, .92);
}
.communicator-quote {
  border-left-color: #879780;
  border-radius: 9px;
  background: rgba(125, 143, 121, .1);
  color: #71806e;
}
.communicator-space-post {
  border: 1px solid rgba(117, 128, 95, .12);
  border-radius: 18px;
  background: rgba(252, 250, 244, .84);
  box-shadow: 0 5px 18px rgba(82, 88, 77, .045);
}
.communicator-space-comments { border-radius: 13px; background: rgba(231, 235, 223, .56); }
.communicator-blank {
  border-radius: 0 0 26px 0;
  background:
    linear-gradient(90deg, rgba(248, 246, 239, .76) 0 34%, rgba(248, 246, 239, .28)),
    url('/static/assets/ui/faded-town-wide-v1.webp?v=20260827a') center / cover no-repeat;
}

/* 联机：田野纸张上摆四张大圆角栏目卡，折叠逻辑保持原样。 */
main#tab-content[data-tab="online"] {
  background:
    linear-gradient(rgba(248, 246, 239, .8), rgba(248, 246, 239, .9)),
    url('/static/assets/ui/faded-town-wide-v1.webp?v=20260827a') center / cover fixed no-repeat;
}
#tab-content[data-tab="online"] > * {
  width: min(820px, 100%);
  max-width: 820px;
}
#tab-content[data-tab="online"] > .intro-card {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  padding: 18px 22px;
  border: 1px solid rgba(117, 128, 95, .16);
  border-radius: 30px;
  background:
    linear-gradient(90deg, rgba(252, 250, 244, .97), rgba(252, 250, 244, .68)),
    url('/static/assets/ui/faded-town-wide-v1.webp?v=20260827a') right center / auto 150% no-repeat;
  box-shadow: 0 8px 22px rgba(82, 88, 77, .055);
}
.acc-list { gap: 11px; }
.acc-item {
  border: 1px solid rgba(117, 128, 95, .16);
  border-radius: 22px;
  background: rgba(252, 250, 244, .82);
  box-shadow: 0 6px 18px rgba(82, 88, 77, .045);
}
.acc-head {
  min-height: 52px;
  padding: 13px 18px;
}
.acc-icon { color: #788875; }
.acc-title-text { color: #4f584d; font-size: 12px; }
.acc-preview { color: #87927f; font-size: 11px; }
.acc-time,
.acc-arrow { color: #8c987f; }
.acc-item.open {
  border-color: rgba(117, 128, 95, .28);
  background: rgba(252, 250, 244, .94);
}
.acc-body-pad {
  padding: 4px 18px 18px;
  border-top: 2px solid rgba(124, 139, 120, .15);
}
.post-entry,
.wish-entry,
.cl-entry { border-bottom-color: rgba(124, 139, 120, .16); }
.like-btn,
.board-more {
  border: 2px solid rgba(124, 139, 120, .42);
  border-radius: 999px;
  background: rgba(251, 249, 241, .7);
}

/* 留言板：一整块灰抹茶布面板，帖子是钉上去的纸笺，不再像流水票据。 */
.acc-item[data-acc="board"] .acc-body-pad {
  padding: 10px 12px 16px;
}
#board-slot {
  position: relative;
  min-height: 180px;
  padding: clamp(34px, 5vw, 48px) clamp(26px, 4.5vw, 42px) clamp(36px, 5vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(117, 128, 95, .2);
  border-radius: 24px;
  background:
    linear-gradient(rgba(248,246,239,.5), rgba(248,246,239,.58)),
    url('/static/assets/ui/faded-town-portrait-mobile-v1.webp') center / cover no-repeat;
  box-shadow:
    inset 0 0 0 3px rgba(255, 253, 248, .25),
    0 8px 20px rgba(82, 88, 77, .07);
}
#board-slot .log-empty {
  margin: 28px auto;
  padding: 14px 18px;
  border-radius: 5px;
  background: rgba(253, 248, 231, .88);
  box-shadow: 0 5px 12px rgba(67, 73, 52, .12);
  color: #5d654e;
  text-align: center;
}
.board-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px 20px;
}
.post-entry.board-note {
  position: relative;
  min-width: 0;
  padding: 22px 18px 16px;
  border: 1px solid rgba(117, 105, 75, .2);
  border-radius: 5px 7px 6px 4px;
  background: rgba(255, 250, 231, .95);
  box-shadow:
    0 7px 13px rgba(63, 69, 49, .14),
    inset 0 1px 0 rgba(255, 255, 255, .75);
  transform: rotate(-.24deg);
}
.post-entry.board-note:nth-child(3n + 2) { transform: rotate(.2deg); }
.post-entry.board-note:nth-child(3n) { transform: rotate(-.1deg); }
.post-entry.board-note--tone-1 { background: rgba(247, 242, 218, .96); }
.post-entry.board-note--tone-2 { background: rgba(235, 241, 221, .96); }
.post-entry.board-note--wide {
  grid-column: 1 / -1;
  transform: rotate(-.08deg);
}
.board-note-pin {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255, 250, 228, .72);
  border-radius: 50%;
  background: #788463;
  box-shadow: 0 2px 4px rgba(60, 65, 48, .28);
  transform: translateX(-50%);
}
.board-note .post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: #566049;
}
.board-note .post-author {
  min-width: 0;
  font-size: 12px;
  letter-spacing: .04em;
}
.board-note .post-title {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border: 1px solid rgba(112, 127, 93, .35);
  border-radius: 4px;
  color: #788463;
  font-size: 9px;
  letter-spacing: 0;
  transform: rotate(-1deg);
}
.board-note .post-street {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 1px 7px;
  border: 1px solid rgba(132, 111, 78, .28);
  border-radius: 50%;
  color: #8b795f;
  font-size: 9px;
  transform: rotate(2deg);
}
.board-note .post-text {
  margin-bottom: 11px;
  color: #4f5545;
  font-size: 13px;
  line-height: 1.78;
}
.board-note .post-foot {
  align-items: flex-end;
  min-height: 22px;
  padding-top: 7px;
  border-top: 1px solid rgba(122, 113, 87, .14);
}
.board-note .post-likes {
  min-width: 0;
  color: #a77c32;
  font-size: 10px;
  line-height: 1.5;
}
.board-note .like-btn {
  padding: 3px 8px;
  border: 1px solid rgba(174, 126, 48, .48);
  border-radius: 48% 52% 46% 54%;
  background: rgba(245, 222, 165, .34);
  color: #9d762f;
  box-shadow: none;
  transform: rotate(-1deg);
}
.board-note .like-btn.liked,
.board-note .like-btn[disabled] {
  background: rgba(219, 176, 87, .25);
  opacity: .7;
}
.post-time {
  flex: 0 0 auto;
  margin-left: auto;
  color: rgba(91, 96, 78, .56);
  font-size: 9px;
  white-space: nowrap;
}
.post-comments {
  margin-top: 11px;
  padding: 9px 11px 7px;
  border-left: 3px solid rgba(120, 137, 104, .42);
  border-radius: 2px 7px 7px 2px;
  background: rgba(232, 236, 212, .66);
  box-shadow: 0 3px 7px rgba(73, 78, 58, .06);
}
.board-note .post-comment {
  padding: 3px 0;
  color: #59604d;
  font-size: 11px;
  line-height: 1.65;
}
.board-note .post-comment + .post-comment {
  border-top: 1px dashed rgba(120, 137, 104, .24);
}
.board-note .post-comment-author { color: #708064; }
#board-slot .board-more {
  width: auto;
  min-width: 180px;
  margin: 24px auto 0;
  padding: 8px 18px;
  border: 2px solid rgba(83, 98, 67, .5);
  border-radius: 14px;
  background: rgba(224, 210, 169, .9);
  color: #5b664d;
  box-shadow: 0 4px 9px rgba(61, 69, 48, .13);
}
#board-slot .board-more:hover { background: rgba(235, 221, 180, .96); }

@media (max-width: 760px),
       (orientation: landscape) and (max-width: 980px) and (max-height: 600px) {
  /* 窄屏与横屏手机不把桌面公告板硬缩小：去掉布面底板和钉纸透视，回到轻薄字条列表。
     横屏 iPhone 的 CSS 宽度常超过 760px；同时限制横屏宽高，可兼容不准确上报 pointer/hover 的旧浏览器。 */
  .acc-item[data-acc="board"] .acc-body-pad {
    padding: 4px 10px 12px;
  }
  #board-slot {
    min-height: 120px;
    padding: 2px 10px 8px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  #board-slot .log-empty {
    margin: 10px 0 2px;
    padding: 12px 10px;
    border-radius: 14px;
    box-shadow: none;
  }
  .board-note-grid {
    display: block;
  }
  .post-entry.board-note,
  .post-entry.board-note:nth-child(3n + 2),
  .post-entry.board-note:nth-child(3n),
  .post-entry.board-note--wide {
    margin: 0;
    padding: 14px 2px 15px;
    border: 0;
    border-bottom: 1px solid rgba(120, 137, 104, .22);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
  }
  .post-entry.board-note:last-child { border-bottom: 0; }
  .board-note-pin { display: none; }
  .board-note .post-meta {
    gap: 6px;
    margin-bottom: 7px;
  }
  .board-note .post-author {
    font-size: 11px;
    letter-spacing: .02em;
  }
  .board-note .post-title {
    margin-left: 2px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 9px;
    transform: none;
  }
  .board-note .post-street {
    padding: 0;
    border: 0;
    border-radius: 0;
    font-size: 9px;
    transform: none;
  }
  .board-note .post-text {
    margin-bottom: 9px;
    font-size: 12px;
    line-height: 1.72;
  }
  .board-note .post-foot {
    min-height: 0;
    padding-top: 5px;
    border-top: 0;
    gap: 6px;
    flex-wrap: wrap;
  }
  .board-note .like-btn {
    padding: 3px 8px;
    border-radius: 999px;
    transform: none;
  }
  .post-comments {
    margin-top: 8px;
    padding: 7px 9px;
    border-left-width: 2px;
    border-radius: 0 10px 10px 0;
    box-shadow: none;
  }
  #board-slot .board-more {
    width: 100%;
    min-width: 0;
    margin: 10px 0 0;
    padding: 8px 12px;
    border-width: 1.5px;
    border-radius: 999px;
    box-shadow: none;
  }
}

/* 祈愿树：静态水彩树 + 仅 36 枚循环复用的木牌，形成轻量 2.5D 环绕。 */
#wishes-slot { min-height: 180px; }
.wish-tree-view {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(470px, 70vh, 650px);
  min-height: 470px;
  overflow: hidden;
  border: 1px solid rgba(117, 128, 95, .22);
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(255, 253, 242, .22), transparent 58%),
    linear-gradient(rgba(248, 246, 239, .46), rgba(248, 246, 239, .62)),
    url('/static/assets/ui/faded-town-wide-v1.webp?v=20260827a') center / cover no-repeat;
  box-shadow:
    inset 0 0 40px rgba(107, 116, 91, .09),
    0 9px 23px rgba(74, 82, 65, .11);
  perspective: 1100px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
#map-wish-tree-viewer .wish-tree-view {
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.wish-tree-view.dragging { cursor: grabbing; }
.wish-tree-halo {
  position: absolute;
  z-index: 0;
  inset: 4% 8% 10%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(246, 244, 226, .44), transparent 69%);
  pointer-events: none;
}
.wish-tree-art {
  position: absolute;
  left: 50%;
  bottom: 3%;
  z-index: 4;
  width: min(88%, 690px);
  height: auto;
  pointer-events: none;
  transform: translateX(-50%);
  transform-origin: 50% 80%;
  transition: transform 100ms linear;
  -webkit-user-drag: none;
}
.wish-tree-art-front {
  z-index: 8;
  -webkit-mask-image:
    radial-gradient(ellipse 25% 23% at 29% 35%, #000 0 67%, transparent 79%),
    radial-gradient(ellipse 28% 25% at 49% 27%, #000 0 68%, transparent 80%),
    radial-gradient(ellipse 25% 22% at 69% 36%, #000 0 67%, transparent 79%),
    radial-gradient(ellipse 30% 23% at 51% 48%, #000 0 65%, transparent 79%),
    linear-gradient(90deg, transparent 38%, #000 45% 57%, transparent 65%);
  mask-image:
    radial-gradient(ellipse 25% 23% at 29% 35%, #000 0 67%, transparent 79%),
    radial-gradient(ellipse 28% 25% at 49% 27%, #000 0 68%, transparent 80%),
    radial-gradient(ellipse 25% 22% at 69% 36%, #000 0 67%, transparent 79%),
    radial-gradient(ellipse 30% 23% at 51% 48%, #000 0 65%, transparent 79%),
    linear-gradient(90deg, transparent 38%, #000 45% 57%, transparent 65%);
  -webkit-mask-composite: source-over;
  mask-composite: add;
}
.wish-tree-token-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-style: preserve-3d;
}
.wish-tree-token-field[data-wish-layer="back"] { z-index: 2; }
.wish-tree-token-field[data-wish-layer="mid"] { z-index: 6; }
.wish-tree-token-field[data-wish-layer="front"] { z-index: 10; }
.wish-tree-token {
  position: absolute;
  width: 58px;
  height: 88px;
  margin: -15px 0 0 -29px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  transform-origin: 50% 13%;
  transform-style: preserve-3d;
  transition: filter 120ms linear, opacity 120ms linear;
  will-change: left, top, transform, opacity;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wish-tree-token:focus-visible {
  filter: drop-shadow(0 0 5px rgba(91, 112, 76, .72)) !important;
}
.wish-tree-token-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.wish-tree-toolbar {
  position: absolute;
  z-index: 20;
  top: 14px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100% - 28px);
  padding: 7px 9px 7px 14px;
  border: 1px solid rgba(117, 132, 105, .38);
  border-radius: 999px;
  background: rgba(249, 247, 237, .84);
  color: #66725f;
  font-size: 11px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(79, 89, 69, .1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateX(-50%);
}
.wish-tree-reset,
.wish-tree-detail-close {
  min-height: 30px;
  padding: 5px 12px;
  border: 1.5px solid rgba(104, 122, 92, .55);
  border-radius: 999px;
  background: rgba(255, 253, 245, .84);
  color: #61705c;
  font: inherit;
  cursor: pointer;
}
.wish-tree-reset:hover,
.wish-tree-detail-close:hover { background: rgba(224, 228, 207, .88); }
.wish-tree-hint {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 12px;
  max-width: calc(100% - 32px);
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(249, 247, 237, .76);
  color: rgba(92, 105, 84, .8);
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}
.wish-tree-detail[hidden] { display: none; }
.wish-tree-detail {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(63, 69, 56, .27);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.wish-tree-detail-card {
  width: min(430px, 92%);
  max-height: min(78%, 440px);
  overflow: auto;
  box-sizing: border-box;
  padding: 24px 25px 22px;
  border: 1px solid rgba(117, 128, 95, .25);
  border-radius: 28px;
  background:
    linear-gradient(rgba(252, 250, 244, .9), rgba(252, 250, 244, .95)),
    url('/static/assets/ui/faded-town-wide-v1.webp?v=20260827a') center / cover;
  color: #4f584d;
  box-shadow: 0 20px 50px rgba(49, 55, 45, .23);
  user-select: text;
  -webkit-user-select: text;
}
.wish-tree-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(117, 132, 105, .28);
  color: #596652;
  font-size: 13px;
}
.wish-tree-detail-head span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}
.wish-tree-detail-head span:last-child {
  flex: none;
  color: #85907d;
  font-size: 11px;
}
.wish-tree-detail-card p {
  margin: 18px 0 14px;
  color: #515849;
  font-size: 14px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.wish-tree-detail-card time {
  display: block;
  margin-bottom: 17px;
  color: #8a957f;
  font-size: 10px;
}

@media (max-width: 700px) {
  .wish-tree-view {
    height: clamp(430px, 74vh, 570px);
    min-height: 430px;
    border-radius: 24px;
  }
  .wish-tree-art { width: 98%; bottom: 5%; }
  .wish-tree-token { width: 52px; height: 80px; margin-left: -26px; }
  .wish-tree-toolbar { top: 10px; }
  .wish-tree-hint { bottom: 9px; font-size: 9px; }
}
@media (max-height: 620px) and (orientation: landscape) {
  .wish-tree-view {
    height: min(76vh, 470px);
    min-height: 390px;
  }
  .wish-tree-art { width: min(80%, 600px); bottom: 1%; }
  .wish-tree-token { width: 50px; height: 76px; margin-left: -25px; }
  .wish-tree-hint { display: none; }
  .wish-tree-detail-card { max-height: 86%; padding: 18px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .wish-tree-art,
  .wish-tree-token { transition: none; }
}

/* 通用弹窗：与邀请函输入框同源的大弧度、2px 抹茶描边。 */
#modal-backdrop {
  background: rgba(66, 72, 64, .25);
  backdrop-filter: blur(4px);
}
.mini-modal {
  width: min(380px, calc(100vw - 44px));
  padding: 22px 24px 24px;
  border: 1px solid rgba(117, 128, 95, .24);
  border-radius: 26px;
  background: rgba(252, 250, 244, .97);
  background-image: var(--paper-texture);
  box-shadow: 0 18px 48px rgba(82, 88, 77, .13);
}
.modal-head {
  margin-bottom: 17px;
  color: #4f584d;
  font-size: 13px;
}
.mini-modal .panel-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(117, 128, 95, .18);
  border-radius: 50%;
  background: rgba(255, 253, 247, .72);
  color: #687664;
}
.modal-input {
  min-height: 43px;
  padding: 10px 16px;
  border: 1px solid rgba(117, 128, 95, .24);
  border-radius: 999px;
  background: rgba(255, 253, 247, .78);
  color: #4f584d;
  font-size: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.modal-input,
select.modal-input[multiple] { border-radius: 23px; }
.modal-input:focus {
  border-color: #74856f;
  box-shadow: 0 0 0 3px rgba(124, 139, 120, .12);
}
.modal-submit {
  min-height: 43px;
  padding: 10px 18px;
  border: 1px solid var(--town-accent);
  border-radius: 999px;
  background: var(--town-accent);
  color: #fffdf7;
  font-size: 12px;
  box-shadow: 0 4px 12px rgba(88, 102, 83, .14);
}
.modal-hint { color: #7d8977; font-size: 11px; }

@media (max-width: 760px) and (orientation: landscape) {
  main#tab-content.machine-communicator-open { padding: 0; }
  main#tab-content.machine-communicator-open .communicator-brand {
    padding-left: max(104px, calc(env(safe-area-inset-left) + 96px));
  }
  main#tab-content.machine-communicator-open .machine-app-back {
    top: max(14px, calc(7px + env(safe-area-inset-top)));
    left: calc(62px + env(safe-area-inset-left));
  }
  #tab-content[data-tab="online"] > .intro-card { padding: 13px 17px; }
  .acc-head { min-height: 46px; padding: 10px 15px; }
  .mini-modal { padding: 17px 19px 19px; border-radius: 26px; }
}

/* WebP 无法读取时退回纯纸色，不重新引入旧版插图。 */
html.asset-fallback-communicator-list .communicator-sidebar {
  background-image: var(--town-paper-texture);
}
html.asset-fallback-communicator-paper .communicator-messages,
html.asset-fallback-communicator-paper .communicator-space-feed {
  background-image: var(--town-paper-texture);
}
html.asset-fallback-communicator-paper .communicator-blank {
  background-image: var(--town-paper-texture);
}
html.asset-fallback-board #board-slot {
  background-image: var(--town-paper-texture);
}
html.asset-fallback-communicator-paper .wish-tree-view {
  background-image: var(--town-paper-texture);
}
html.asset-fallback-communicator-paper .wish-tree-detail-card {
  background-image: var(--town-paper-texture);
}
