/* 牛马漂流记 —— 真实海滩 · 果冻海 */

:root {
  --ink: #f5ead9;
  --ink-dim: #d9ccb2;
  --ink-faint: #b8ab90;
  --warm: #f0b070;
  --warm-soft: rgba(240, 176, 112, 0.16);
  --hair: rgba(255, 255, 255, 0.1);
  /* 标题、句子、数字用衬线：宋体在海雾里更有「岛」的意思 */
  --serif: 'Noto Serif SC', 'Songti SC', 'Source Han Serif SC', 'STSong', 'SimSun', Georgia, serif;
  /* 界面上的小字用黑体，小尺寸才不糊 */
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'HarmonyOS Sans SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Segoe UI', system-ui, sans-serif;
  --kai: var(--serif);
  /* 美术字：马善政毛笔楷，用在标题、按钮、气泡这些「露在外面的字」上 */
  --disp: 'Ma Shan Zheng', 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'Noto Serif SC', serif;
  /* 卡通字：站酷快乐体，只给左上角那个标题用 */
  --toon: 'ZCOOL KuaiLe', 'ZCOOL QingKe HuangYou', 'Yuanti SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  /* 一层很淡的纸纹：放大才看得见，但摸上去像纸不像玻璃 */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
  /* 粗一点的布纹，铺在信纸那种小卡片上 */
  --grain-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.42' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23m)' opacity='0.05'/%3E%3C/svg%3E");
}

/* 露在外面的字都用毛笔楷：标题、按钮、气泡、dock 上的字 */
h1,
.tagline,
.sea-talk,
.toast,
.rest-hint,
.view-switch span,
.dock-tx,
button.primary,
button.ghost,
.chip,
.seg button,
.pick-head p {
  font-family: var(--disp);
  font-weight: 400;
  letter-spacing: 0.06em;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #07090f;
  /* 手机上长按：浏览器会先挑中一块文字（或弹系统的长按菜单），
     屏幕就蒙上一层灰蓝色的选中层闪一下。整站只有输入框需要长按，
     其余地方一律不许选 —— 这一行要压在最外面，光给 #scene 是不够的 */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  /* 点按时那层默认灰一闪也不要 */
  -webkit-tap-highlight-color: transparent;
  /* 长按之后手指一动，WebView 会把画布/文字当成「可以拖的东西」拽起来，
     浮一层半透明的影子跟着手指走 —— 页面上没有需要拖的，一律关掉 */
  -webkit-user-drag: none;
}

/* 输入框和写字的地方要能选、能长按（复制粘贴还得用） */
input,
textarea,
[contenteditable='true'] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  /* 海底要长按拖东西：手指按着不放的时候，别让浏览器把它当成
     「选中文字 / 长按菜单 / 拖动画布」 */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

/* 天光很亮时也要读得清字 */
body::before,
body::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  height: 190px;
  pointer-events: none;
  z-index: 4;
  transition: opacity 1.2s ease;
}

body::before {
  top: 0;
  background: linear-gradient(180deg, rgba(5, 7, 14, 0.5), rgba(5, 7, 14, 0.14) 46%, rgba(5, 7, 14, 0));
}

body::after {
  bottom: 0;
  height: 170px;
  background: linear-gradient(0deg, rgba(5, 7, 14, 0.5), rgba(5, 7, 14, 0.12) 52%, rgba(5, 7, 14, 0));
}

body.resting::before,
body.resting::after { opacity: 0; }

.drift-layer {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.75s ease;
}

.drift-layer.hidden { opacity: 0; }

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 26;
  pointer-events: none;
  overflow: hidden;
}

/* ---------------- 顶部 ---------------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 30px 34px;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.brand h1 {
  margin: 0;
  font-family: var(--toon);
  font-size: clamp(23px, 2.8vw, 34px);
  font-weight: 400;
  letter-spacing: 0.055em;
  /* 不描边：站酷快乐体的笔头本来就是圆的，0.4px 的描边会把圆头削成方头，
     看着就退回成黑体了。改成一圈柔和的影子把字从海雾里拎出来。 */
  text-shadow:
    0 1px 2px rgba(6, 26, 40, 0.45),
    0 2px 26px rgba(0, 0, 0, 0.5);
}

.tagline {
  margin: 9px 0 0;
  font-size: 10.5px;
  letter-spacing: 0.34em;
  color: var(--ink-dim);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.hud-stats {
  display: flex;
  gap: 14px;
  margin-right: 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

/* 体力条已移除：这座岛不给你打分 */

.hud-stats b {
  font-weight: 600;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: rgba(10, 13, 24, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 0.24s, border-color 0.24s, background 0.24s;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.26); }

.icon-btn .waveX { display: none; }
.icon-btn.off .wave1,
.icon-btn.off .wave2 { display: none; }
.icon-btn.off .waveX { display: block; }
.icon-btn.off { color: var(--ink-faint); }

.user-chip {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(10, 13, 24, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink-dim);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  font-family: var(--sans);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.24); }

/* ---------------- 海的话 ---------------- */

.sea-talk {
  position: fixed;
  left: 50%;
  bottom: 122px;
  transform: translateX(-50%);
  z-index: 18;
  /* 只是海上漂过的一句话，不能吃掉落在岛上的点击 */
  pointer-events: none;
  margin: 0;
  /* 一句一行，不折行：折了就会压到椰子树和岛脊上。
     宽度也不再限死 —— 由 JS（fitSeaTalk）量出「一行有多宽」，
     超出了就把字号收一档，比 CSS 里硬切两行好看 */
  white-space: nowrap;
  max-width: none;
  text-align: center;
  font-family: var(--serif);
  /* 字号跟着屏幕走：小屏 16px 起，大屏到 24px */
  font-size: clamp(16px, 1.1vw + 11px, 24px);
  letter-spacing: 0.16em;
  color: #ffffff;
  /* 默认是看不见的：出来的时候淡进来，走的时候淡出去。
     一开始就给 1 的话，第一句是「啪」地出现的 */
  opacity: 0;
  /* 阴影压在右下 45 度：像光从左上方来 */
  text-shadow:
    2px 2px 3px rgba(6, 12, 20, 0.92),
    4px 4px 8px rgba(6, 12, 20, 0.62),
    6px 6px 16px rgba(6, 12, 20, 0.38),
    1px 1px 1px rgba(6, 12, 20, 0.85);
  pointer-events: none;
  transition: opacity 1.15s ease;
}

/* 亮着的那一段 */
.sea-talk.on { opacity: 1; }
/* 淡出中（也留着给别处手动关掉用） */
.sea-talk.out { opacity: 0; }
body.view-near .sea-talk,
body.resting .sea-talk { opacity: 0; }

/* 海底：安静一点。海上的话和那几个按钮都收起来 ——
   下去是来看鱼的，不是来干活的。只留右上角那颗「上去看看」。 */
body.view-reef .sea-talk,
body.view-reef .dock {
  opacity: 0;
  pointer-events: none;
}
body.view-reef .dock { transform: translateY(10px); }
body.view-reef .brand h1 { opacity: 0.5; }
/* 海底那一景的天是浅蓝的：页头那层压暗的纱要收起来，
   不然「水面上的天」永远是一条深色带。只在字后面留一小片，
   够标题看清就行 */
body.view-reef::before {
  background: linear-gradient(180deg, rgba(5, 7, 14, 0.3), rgba(5, 7, 14, 0.1) 74px, rgba(5, 7, 14, 0.02) 122px, rgba(5, 7, 14, 0));
}
/* 天变亮了，标题得自己带一层影子才立得住 */
body.view-reef .brand h1 {
  text-shadow:
    0 1px 2px rgba(6, 18, 28, 0.55),
    0 6px 26px rgba(6, 18, 28, 0.4);
}
body.view-reef .brand .tagline {
  text-shadow: 0 1px 2px rgba(6, 18, 28, 0.6);
}

/* 海的话摆在哪：默认左下（海平面下方），可在设置里换右下或中间靠下。
   位置一律用百分比：窗口放大缩小时，字和海平线、岛的相对关系不变。 */
.sea-talk.pos-left {
  left: 4.6%;
  right: auto;
  /* 海平线固定在 56% 处，字压在它下面一点；再往下就是岛上的椰子树了 */
  top: 58.4%;
  bottom: auto;
  transform: none;
  text-align: left;
  /* 左边这条带本来是「海平线到树冠」那么窄，只够两行 ——
     现在不折行，整句往右伸到海面上，宽度交给 JS 收字号 */
  font-size: clamp(15px, 0.95vw + 10px, 21px);
  max-width: none;
}

.sea-talk.pos-right {
  left: auto;
  top: auto;
  /* 贴着岛的右端、屏幕右下角：右边留 13.4% 躲开右下角那列按钮 */
  right: 13.4%;
  bottom: 15%;
  transform: none;
  text-align: right;
  max-width: none;
}

.sea-talk.pos-center {
  left: 50%;
  right: auto;
  top: auto;
  bottom: 15%;
  transform: translateX(-50%);
  text-align: center;
  max-width: none;
}

/* ---------------- 场景切换 ---------------- */

.view-switch {
  position: fixed;
  left: 28px;
  bottom: 28px;
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px 11px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(9, 12, 22, 0.42);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  color: #f8f0e2;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: color 0.25s, background 0.25s, border-color 0.25s, transform 0.25s, opacity 0.5s;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

.view-switch:hover {
  color: #fff3e0;
  border-color: #c98a50;
  background: rgba(20, 16, 20, 0.5);
  transform: translateY(-1px);
}

.view-switch .vs-ico {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 1;
}

.view-switch.on-island .vs-ico { transform: rotate(180deg); }

/* ---------------- 右下角的事 ---------------- */

.dock {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.dock-btn {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  background: rgba(8, 11, 20, 0.38);
  backdrop-filter: blur(15px) saturate(1.06);
  -webkit-backdrop-filter: blur(15px) saturate(1.06);
  color: #f8f0e2;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.6);
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

body.view-near .dock-btn {
  background: rgba(9, 12, 22, 0.48);
  border-color: rgba(255, 255, 255, 0.1);
}

.dock-ico {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 1;
  transition: opacity 0.25s;
}

.dock-tx { white-space: nowrap; }

.dock-badge {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  padding-left: 2px;
}

/* 测试用的小球：挂在「捞一个瓶子」的左上角，点一下把今天的次数清零 */
.dock-mini {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
  color: rgba(248, 240, 226, 0.42);
  background: rgba(10, 13, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, transform 0.18s;
}
.dock-mini:hover {
  color: #f0b070;
  border-color: #c98a50;
  transform: rotate(90deg);
}

.dock-btn:hover {
  color: var(--ink);
  background: rgba(24, 27, 40, 0.6);
  border-color: #c98a50;
  transform: translateX(-2px);
}
.dock-btn:hover .dock-ico { opacity: 1; }

/* 额度用完时不再整个灰掉：只是暗一点，点一下会告诉你怎么再来一次 */
.dock-btn.is-out { color: #f8f0e2; }
.dock-btn.is-out .dock-badge { color: #f0b070; }

/* 「信 2」：捞瓶子那颗按钮上的小角标，点它去看回信 */
.dock-mail {
  position: absolute;
  top: -7px;
  right: -8px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(196, 122, 74, 0.92);
  color: #fff6e8;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.02em;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 8px rgba(120, 60, 20, 0.35);
  cursor: pointer;
}
.dock-mail[hidden] { display: none; }
.dock-mail.is-new { animation: mailPulse 0.85s ease 3; }
@keyframes mailPulse {
  0%, 100% { transform: none; }
  45% { transform: translateY(-3px) scale(1.12); }
}

.dock-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 10px 1px rgba(240, 176, 112, 0.75);
  margin-left: 2px;
}

/* ---------------- 右侧的小测试键 ---------------- */

.sky-tools {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 21;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.sky-tools button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px 7px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 11, 20, 0.26);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ded1b6;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: color 0.24s, background 0.24s, border-color 0.24s, transform 0.24s;
}

.sky-tools button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sky-tools button:hover {
  color: #fff0dc;
  background: rgba(18, 21, 33, 0.5);
  border-color: #c98a50;
  transform: translateX(-2px);
}

.sky-tools button.on {
  color: #ffd9a8;
  border-color: #c98a50;
  background: rgba(240, 176, 112, 0.12);
}

body.resting .sky-tools { opacity: 0; pointer-events: none; }

/* ---------------- 海面漂浮物 ---------------- */

.drift-item {
  position: absolute;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  background: none;
  color: #efdcbe;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform;
  transition: color 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.drift-bob {
  position: relative;
  display: block;
  width: 54px;
  height: 54px;
  animation: bob var(--bobdur, 3.4s) ease-in-out infinite var(--bobdelay, 0s);
  will-change: transform;
}

.drift-art {
  display: block;
  width: 100%;
  height: 100%;
  /* 缩放留在这一层：吃水线的 mask 也挂在这层，转起来会跟着歪。
     倾斜交给里面的 svg，水面那条线才是水平的 */
  transform: scale(var(--s, 1));
  transform-origin: 50% 62%;
  /* 只留贴水的一点点接触影，不再有一圈雾：物件是浮在水上，不是垫在板子上 */
  filter: drop-shadow(0 2px 2px rgba(6, 44, 66, 0.22));
  transition: filter 0.28s, transform 0.28s;
}

.drift-art svg {
  width: 100%;
  height: 100%;
  display: block;
  /* 绕吃水线附近转：瓶子是「泡在水里歪着」，不是整只斜着贴在屏幕上 */
  transform: rotate(var(--rot, 0deg));
  transform-origin: 50% 62%;
}
/* 吃水线：箱子只露出水面上那半截，下面几乎看不见 —— 是「泡在水里」，不是「贴在水面上」。
   渐隐带从 54% 开始，到 70% 彻底化掉；上缘保持完全实心，剪影才立得住。 */
.drift-art {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 56%, rgba(0, 0, 0, 0.95) 60%, rgba(0, 0, 0, 0.62) 65%, rgba(0, 0, 0, 0.22) 69%, rgba(0, 0, 0, 0) 73%);
  mask-image: linear-gradient(180deg, #000 0%, #000 56%, rgba(0, 0, 0, 0.95) 60%, rgba(0, 0, 0, 0.62) 65%, rgba(0, 0, 0, 0.22) 69%, rgba(0, 0, 0, 0) 73%);
}
/* 瓶子是竖着的，身子长：吃水线要比箱子低，不然那卷信被吃掉一半 */
.drift-item.tone-bottle .drift-art {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 66%, rgba(0, 0, 0, 0.9) 74%, rgba(0, 0, 0, 0.45) 83%, rgba(0, 0, 0, 0) 91%);
  mask-image: linear-gradient(180deg, #000 0%, #000 66%, rgba(0, 0, 0, 0.9) 74%, rgba(0, 0, 0, 0.45) 83%, rgba(0, 0, 0, 0) 91%);
}

/* 整件漂着的收藏品（油画、八音盒）：东西比箱子高，吃水线往下放，
   不然画芯和箱盖以下全被吃掉，看着只剩一条边 */
.drift-item.tone-float .drift-art {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.95) 66%, rgba(0, 0, 0, 0.55) 76%, rgba(0, 0, 0, 0) 88%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.95) 66%, rgba(0, 0, 0, 0.55) 76%, rgba(0, 0, 0, 0) 88%);
}

/* 泡在水里的那一截：把下缘用海水的颜色和模糊压下去，
   东西才是「浮」在水里，而不是贴在水面上 */
/* 泡在水里的那一截：物件自己下缘化掉，海水从底下透上来。
   按形状走，不用猜位置，什么造型都不会穿帮 */
.drift-sink {
  position: absolute;
  left: -16%;
  right: -16%;
  /* 吃水线跟着遮罩走：箱子大约在 58%，瓶子更低一点 */
  top: 56%;
  bottom: 0;
  border-radius: 50%;
  background: none;
  pointer-events: none;
}

/* 吃水线上的一道亮边 */
.drift-sink::before {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: -1px;
  height: 2px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 76%);
}

/* 底下推开的一圈细浪 */
.drift-sink::after {
  content: '';
  position: absolute;
  left: -14%;
  right: -14%;
  top: 40%;
  height: 62%;
  border-radius: 50%;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0.6;
}

/* 吃水线与尾迹：只留两条细线，不再垫一层白色雾面。
   位置要跟遮罩的吃水线对齐，不然浪花会跑到水下的那半截上 */
.drift-wake {
  position: absolute;
  left: 50%;
  bottom: 34%;
  width: 34px;
  height: 9px;
  margin-left: -17px;
  transform: scale(var(--s, 1));
  border-radius: 50%;
  background: none;
  animation: ripple 3.4s ease-in-out infinite;
  pointer-events: none;
}

.drift-wake::before,
.drift-wake::after {
  content: '';
  position: absolute;
  top: 3px;
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
}

.drift-wake::before { right: 100%; }
.drift-wake::after { left: 100%; transform: scaleX(-1); }

.drift-hit {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
}

.drift-item.tone-bottle { width: 52px; height: 62px; }
.drift-item.tone-bottle .drift-bob { width: 52px; height: 62px; }
.drift-item.tone-bottle .drift-sink { top: 66%; }
/* 瓶子不再加那圈发光：发光会糊成一层薄薄的底色，像垫了块板子 */
.drift-item.tone-bottle .drift-art {
  filter: drop-shadow(0 4px 7px rgba(6, 44, 66, 0.26));
}

/* 悬停：不是发光，是「轮廓加深」——顺着物件自己的剪影描一圈深色边，
   再用四向 1px 的 drop-shadow 拼出来，任何形状都不会露出方框 */
.drift-item:hover .drift-art,
.drift-item:focus-visible .drift-art {
  transform: translateY(-2px) scale(var(--s, 1));
  filter:
    drop-shadow(1px 0 0 rgba(28, 22, 14, 0.78))
    drop-shadow(-1px 0 0 rgba(28, 22, 14, 0.78))
    drop-shadow(0 1px 0 rgba(28, 22, 14, 0.78))
    drop-shadow(0 -1px 0 rgba(28, 22, 14, 0.78))
    drop-shadow(0 4px 5px rgba(6, 44, 66, 0.32))
    brightness(1.06) saturate(1.08);
}
.drift-item:focus-visible { outline: none; }

@keyframes bob {
  0%, 100% { transform: translateY(-3px) rotate(-2.2deg); }
  50% { transform: translateY(3px) rotate(2.2deg); }
}

@keyframes ripple {
  0%, 100% { opacity: 0.42; transform: scale(var(--s, 1)) scaleX(0.88); }
  50% { opacity: 0.7; transform: scale(var(--s, 1)) scaleX(1.14); }
}

.float-text {
  position: absolute;
  z-index: 30;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: #ffe3b8;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  white-space: nowrap;
}

/* ---------------- 动作 ---------------- */

.fx-throw {
  position: absolute;
  width: 54px;
  height: 70px;
  will-change: transform;
}

.fx-catch {
  position: absolute;
  width: 54px;
  height: 70px;
  margin-left: -27px;
  margin-top: -35px;
  will-change: transform;
}

.fx-bottle { width: 100%; height: 100%; }
.fx-bottle svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 16px rgba(255, 214, 160, 0.55)) drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5));
}

.fx-ring {
  position: absolute;
  width: var(--rw, 30px);
  height: calc(var(--rw, 30px) * 0.32);
  border-radius: 50%;
  border: 1px solid rgba(255, 246, 228, 0.55);
  box-shadow: inset 0 0 8px rgba(255, 246, 228, 0.16);
  pointer-events: none;
}

.fx-drop {
  position: absolute;
  width: var(--ds, 3px);
  height: var(--ds, 3px);
  border-radius: 50%;
  background: rgba(226, 242, 255, 0.9);
  box-shadow: 0 0 6px rgba(200, 228, 255, 0.7);
  pointer-events: none;
}

/* ---------------- 面板 ---------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
}

.overlay[hidden] { display: none; }

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, rgba(6, 8, 16, 0.42), rgba(4, 5, 11, 0.82));
  /* 打开对话框时不虚化背后的海：只压暗，海还在那儿动 */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: fade 0.3s ease;
}

.panel-wrap { position: relative; width: 100%; display: grid; place-items: center; }

/* 捞瓶子的对话框：左上角挑一个向上的小尖角，像这句话是有人从上面说下来的。
   尖角画在外层容器上 —— .panel 自己是 overflow-y:auto，画在里面的尖角会被裁掉。
   两层叠着：底下一块黑的当描边（三角形），上面盖一块纸色的「带脚三角」，
   脚要伸进面板 3px，把顶上那道 2px 黑边断开，尖角才和框子连成一体。
   两块都是 45° 斜边，里面的那块按 2px 垂直内缩算过：肩点比外面窄 2.83px、底比外面高 2px。 */
.bubble-holder {
  position: relative;
  width: min(560px, 100%);
  display: grid;
  place-items: center;
}
.bubble-holder > .panel { width: 100%; }
/* 以前这里给捞瓶子那张卡挑过一颗向上的缺口尖角，现在不要了：
   所有对话框一律是干干净净的圆角纸片，顶上不挂三角。 */

.panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  padding: 32px 32px 22px;
  border-radius: 20px;
  /* 外框统一一道硬黒边：不管里面是纸白还是暗底，框子都得看得见 */
  border: 2px solid #0b0c11;
  background-color: rgba(13, 16, 27, 0.96);
  background-image: var(--grain), linear-gradient(180deg, rgba(21, 24, 38, 0.95), rgba(9, 11, 20, 0.97));
  background-size: 200px 200px, 100% 100%;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 235, 205, 0.1),
    inset 0 0 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  animation: panel-in 0.34s cubic-bezier(0.2, 0.85, 0.25, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.panel[hidden] { display: none; }
.panel::-webkit-scrollbar { width: 5px; }
.panel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 4px; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* 对话框里统一用雅黑（--sans），标题比正文大一档，副标题压深灰 */
.panel {
  font-family: var(--sans);
  letter-spacing: 0;
}

.panel h2 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.08em;
  /* 标题最深，和副标题拉开层次 */
  color: #fdf3e2;
}

.panel-sub {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.9;
  /* 副标题走深灰，读起来比标题轻一档 */
  color: #5d6068;
  letter-spacing: 0.03em;
}

.panel-sub b { color: var(--warm); font-weight: 600; }

.panel-x {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-faint);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.panel-x:hover { color: var(--ink); background: rgba(255, 255, 255, 0.07); }

/* 表单 */

textarea, input[type='tel'], input[type='text'] {
  width: 100%;
  padding: 14px 15px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.042);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.03em;
  resize: vertical;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s;
}

textarea::placeholder, input::placeholder { color: #b3a78e; }

textarea:focus, input:focus {
  outline: none;
  border-color: #c98a50;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(240, 176, 112, 0.09);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }

.chip {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: none;
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.22s;
}

.chip:hover { border-color: rgba(255, 255, 255, 0.26); color: var(--ink); }

.chip.on {
  border-color: #f0b070;
  background: var(--warm-soft);
  color: #f2efe6;
}

/* 五个心情各有一点底色：暗底上是同色的一层薄雾，浅色纸上是一块淡彩。
   选中了就把这层色压重一点，不靠边框也能看出选了哪个 */
#moodChips .chip {
  --chip: 200 200 200;
  background: rgb(var(--chip) / 0.2);
  border-color: rgb(var(--chip) / 0.46);
}
#moodChips .chip:hover { background: rgb(var(--chip) / 0.3); }
#moodChips .chip.on {
  background: rgb(var(--chip) / 0.46);
  border-color: rgb(var(--chip) / 0.95);
  color: var(--ink);
}
#moodChips .chip[data-mood='今天还行'] { --chip: 232 196 120; }
#moodChips .chip[data-mood='有点累'] { --chip: 148 170 200; }
#moodChips .chip[data-mood='想骂人'] { --chip: 220 132 110; }
#moodChips .chip[data-mood='说个笑话'] { --chip: 150 196 130; }
#moodChips .chip[data-mood='想有人听'] { --chip: 176 160 210; }

body.dialog-light #moodChips .chip {
  background: rgb(var(--chip) / 0.26);
  border-color: rgb(var(--chip) / 0.52);
  color: #3a4034;
}
body.dialog-light #moodChips .chip:hover { background: rgb(var(--chip) / 0.38); }
body.dialog-light #moodChips .chip.on {
  background: rgb(var(--chip) / 0.52);
  border-color: rgb(var(--chip) / 0.95);
  color: #22271e;
}

.uploader { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.upload-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.22s;
}

.upload-btn:hover { border-color: #f0b070; color: #ffd9a8; }

/* 相机图标：一根描边，跟着按钮的字色走 */
.up-ico { width: 19px; height: 19px; }
.up-ico path,
.up-ico circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-clear {
  border: 0;
  background: none;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 0;
}

.upload-clear:hover { color: var(--ink); }

.upload-preview {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-foot {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.primary, /* 设置里那颗「测试重置」：比主按钮小一号，别抢眼 */
.ghost.mini {
  padding: 7px 13px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  border-radius: 9px;
}

.ghost {
  padding: 11px 21px;
  border-radius: 11px;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.22s;
  white-space: nowrap;
}

.primary {
  border: 0;
  background: linear-gradient(180deg, #f7cb92, #e2a361);
  color: #2a1c0e;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(226, 163, 97, 0.22);
}

.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.primary:disabled { opacity: 0.45; cursor: default; transform: none; filter: none; }

.ghost {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: none;
  color: var(--ink-dim);
}

.ghost:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--ink); }
.ghost:disabled { opacity: 0.4; cursor: default; }

.ghost.small { padding: 7px 13px; font-size: 11px; border-radius: 9px; flex: 0 0 auto; }

/* 「吃掉」：跟「收进收藏」区分开 —— 一个是留下，一个是吃掉，
   用暖色，而且不抢主按钮的位置 */
.ghost.eat {
  border-color: rgba(214, 150, 92, 0.42);
  color: #d79a5c;
}
.ghost.eat:hover {
  border-color: rgba(232, 172, 112, 0.72);
  color: #f0b879;
  background: rgba(214, 150, 92, 0.1);
}
body.dialog-light .panel .ghost.eat {
  border-color: rgba(178, 116, 58, 0.4);
  color: #a9662c;
}
body.dialog-light .panel .ghost.eat:hover {
  background: rgba(178, 116, 58, 0.09);
  color: #8b4f1e;
}

.primary.wide { width: 100%; padding: 13px; }

/* 抛竿那颗按钮：图标和文字居中对齐（图标只在「抛竿 / 再抛一竿」时出现） */
.fish-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  /* 固定一行的行高：有没有那颗图标，按钮都是一样高，切换状态时面板不会抖 */
  line-height: 20px;
}
.fish-cast-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.fish-cast-ico .ico-body,
.fish-cast-ico .ico-float { fill: currentColor; stroke: none; }
.fish-cast-ico .ico-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
}

/* 捞到的瓶子 */

/* 捞上来的那只瓶子：封着口，立在桌上。
   点「打开看看」之后纸才抽出来 —— 捞到瓶子和读到信，本来就是两件事 */
.pick-bottle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 16px 18px;
  border-radius: 14px;
  border: 1px dashed rgba(240, 206, 160, 0.24);
  background: rgba(255, 240, 214, 0.04);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.pick-bottle[hidden] { display: none; }
.pick-bottle-art {
  width: 92px;
  height: 118px;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 18px rgba(255, 214, 160, 0.22));
  transition: transform 0.55s cubic-bezier(.3,1.4,.5,1), opacity 0.5s ease;
}
.pick-bottle-art svg { width: 100%; height: 100%; display: block; }
.pick-bottle-tip {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  /* 面板是浅绿纸：这里的字得是墨绿，用暗色主题那套浅灰就看不见了 */
  color: rgba(42, 58, 42, 0.9);
  text-align: center;
}
body.dialog-dark .pick-bottle-tip { color: rgba(232, 240, 228, 0.66); }
/* 抽出来的那张纸：从瓶口滑出来，翻个身就淡掉 */
.pick-bottle-slip {
  position: absolute;
  left: 50%;
  top: 46px;
  width: 34px;
  height: 22px;
  margin-left: -17px;
  border-radius: 2px;
  background: linear-gradient(160deg, #f6ead0, #dcc9a4);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(0) rotate(-4deg) scale(0.6);
  pointer-events: none;
}
.pick-bottle.is-open .pick-bottle-art {
  transform: translateY(-10px) rotate(-10deg) scale(0.86);
  opacity: 0;
}
.pick-bottle.is-open .pick-bottle-slip {
  animation: slipOut 900ms cubic-bezier(.25,.9,.3,1) forwards;
}
.pick-bottle.is-open .pick-bottle-tip { opacity: 0; transition: opacity 0.3s ease; }
@keyframes slipOut {
  0% { opacity: 0; transform: translateY(0) rotate(-4deg) scale(0.6); }
  22% { opacity: 1; transform: translateY(-6px) rotate(2deg) scale(1); }
  62% { opacity: 1; transform: translateY(6px) rotate(-3deg) scale(1.04); }
  100% { opacity: 0; transform: translateY(16px) rotate(6deg) scale(0.96); }
}

/* 拆开之后信纸浮上来：从下往上一点，不闪 */
/* 只淡入，不做位移：信纸是一大块带纸纹的滚动区，位移 + 透明会让手机
   每帧重绘整张纸，打开那一下就是一两百毫秒的卡顿 */
.pick-body.is-reveal { animation: pickReveal 0.32s ease both; }
@keyframes pickReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 回信时「把纸塞进瓶子」：手里一只瓶子，纸从上面落进去，再按上软木塞 */
.fx-stuff {
  position: absolute;
  width: 34px;
  height: 44px;
  margin-left: -17px;
  margin-top: -22px;
  will-change: transform;
}
.fx-stuff .fx-hold { width: 100%; height: 100%; }
.fx-stuff .fx-hold svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45)); }
.fx-stuff .fx-paper {
  position: absolute;
  left: 50%;
  top: 5px;
  width: 40%;
  height: 20%;
  margin-left: -20%;
  border-radius: 1px;
  background: linear-gradient(160deg, #fdf5e2, #e2cda6);
  border: 1px solid rgba(120, 96, 62, 0.35);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.fx-stuff .fx-cork {
  position: absolute;
  left: 50%;
  top: -1px;
  width: 26%;
  height: 11%;
  margin-left: -13%;
  border-radius: 2px 2px 1px 1px;
  background: linear-gradient(#c99a63, #9a6f42);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
}

/* 「正在观察海面…」：按钮先不接点击，但别整颗灰掉 */
.dock-btn:disabled {
  cursor: default;
  opacity: 0.92;
}
.dock-btn:disabled:hover {
  transform: none;
  color: #f8f0e2;
  background: rgba(8, 11, 20, 0.38);
  border-color: rgba(255, 255, 255, 0.085);
}
body.view-near .dock-btn:disabled:hover { background: rgba(9, 12, 22, 0.48); }
.dock-btn.is-wait .dock-tx { letter-spacing: 0.06em; opacity: 0.86; }
.dock-btn.is-wait .dock-ico { animation: watchPulse 1.8s ease-in-out infinite; }
@keyframes watchPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.pick-body {
  max-height: 42dvh;
  overflow-y: auto;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(240, 206, 160, 0.22);
  /* 不再透出面板底色：信纸就是一张实底的纸，叠多少层都看得清 */
  background-color: rgba(10, 13, 22, 0.9);
  background-image: var(--grain-soft);
  background-size: 140px 140px;
  box-shadow: inset 0 1px 0 rgba(255, 236, 208, 0.06), inset 0 12px 26px rgba(0, 0, 0, 0.24);
}

.pick-text {
  margin: 0;
  /* 信里的字用雅黑：宋体在这个字号下笔画细，泡在纸纹里发虚 */
  font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', sans-serif;
  font-size: 15px;
  line-height: 2.05;
  letter-spacing: 0.04em;
  color: #000;
  white-space: pre-wrap;
  word-break: break-word;
}

.pick-img {
  width: 100%;
  border-radius: 11px;
  margin-top: 16px;
  display: block;
}

/* 瓶子里以前那些回信：塑料瓶公共，默认摊开；玻璃瓶 1 对 1，折起来 */
.pick-history {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px dashed rgba(60, 70, 50, 0.22);
}
body:not(.dialog-light) .pick-history { border-top-color: rgba(255, 255, 255, 0.15); }
.pick-history-h {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pick-history-h > span { font-size: 12px; letter-spacing: 0.08em; opacity: 0.72; }
.pick-history-h > b {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(120, 150, 108, 0.22);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  letter-spacing: 0;
}
.pick-history-caret {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  opacity: 0.45;
  transition: transform 0.2s;
}
.pick-history.is-open .pick-history-caret { transform: rotate(-135deg) translate(-2px, -2px); }
.pick-history-list {
  display: none;
  margin-top: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 2px;
}
.pick-history.is-open .pick-history-list { display: block; }
.pick-history .thread-reply { margin-bottom: 7px; padding: 10px 12px; }
.pick-history .thread-reply p { font-size: 12.5px; }

#replyBox { margin-top: 18px; }

.tiny {
  margin: 10px 0 0;
  font-size: 10.5px;
  line-height: 1.9;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* 列表 */

.list { display: flex; flex-direction: column; gap: 10px; max-height: 48dvh; overflow-y: auto; }

.list-item {
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid rgba(240, 206, 160, 0.2);
  /* 每封信一张实底的纸：底下再叠什么都不糊 */
  background-color: rgba(10, 13, 22, 0.9);
  background-image: var(--grain-soft);
  background-size: 140px 140px;
  box-shadow: inset 0 1px 0 rgba(255, 236, 208, 0.05);
  transition: opacity 0.32s, transform 0.32s;
}

.list-item.gone { opacity: 0; transform: translateX(14px); }

/* 架子上的一幅画：左边小图，右边名字和时间 */
.list-item.has-art {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-areas: "art meta" "art text";
  align-items: start;
  column-gap: 12px;
  cursor: pointer;
}
.list-item.has-art .shelf-art { grid-area: art; width: 44px; height: 56px; align-self: center; }
.shelf-art svg { display: block; width: 100%; height: 100%; }
.list-item.has-art .list-meta { grid-area: meta; }
.list-item.has-art .list-text { grid-area: text; }

.row-item { display: flex; align-items: center; gap: 12px; }
.row-item .row-main { flex: 1 1 auto; min-width: 0; }

.list-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.list-meta .quote-ready { color: var(--warm); }

.list-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.85;
  color: #f8f0e2;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-empty {
  padding: 34px 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 12.5px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

/* 收件箱里「回一句」：点开才摊出输入框，别让每封信都顶着一个大框 */
.inbox-reply {
  display: flex;
  justify-content: flex-end;
  margin-top: 11px;
}
.inbox-tip {
  margin: 13px 2px 0;
  color: var(--ink-faint);
}

/* 回信里的附图：一颗按钮 + 一张缩略图，和扔瓶子那套一个意思 */
.reply-tools {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 0;
}
.inbox-acts .shot-btn { margin-right: auto; }
.shot-host { display: block; }
.photo-prev {
  position: relative;
  width: 74px;
  height: 74px;
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}
.reply-tools .photo-prev { margin-top: 0; }
.photo-prev img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-x {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(10, 16, 14, 0.66);
  color: #f6efdf;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

/* 信里带的照片：收件箱、木屋对话各一处 */
.inbox-img { margin-top: 10px; }
.inbox-img img {
  display: block;
  max-width: 100%;
  max-height: 230px;
  border-radius: 10px;
}
.thread-photo { margin-top: 9px; }
.thread-photo img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  border-radius: 10px;
}
.inbox-box { margin-top: 11px; }
.inbox-box textarea {
  min-height: 74px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.8;
}
.inbox-acts {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 9px;
}
/* 一颗小号的实心按钮：和旁边 ghost.mini 一样高 */
.primary.mini {
  padding: 7px 14px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  border-radius: 9px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 4px 0 6px;
}

.stat-grid > div {
  padding: 16px 8px;
  text-align: center;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.026);
}

.stat-grid b {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--warm);
  font-variant-numeric: tabular-nums;
}

.stat-grid span {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.trash-count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  padding: 26px 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.026);
}

.trash-count b {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 500;
  color: var(--warm);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.trash-count span { font-size: 11px; letter-spacing: 0.14em; color: var(--ink-faint); }

/* ---------------- 钓鱼 ---------------- */

.rod-row { display: flex; gap: 8px; margin: 4px 0 16px; }

.rod-part {
  flex: 1 1 0;
  padding: 13px 6px 11px;
  text-align: center;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink-faint);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  transition: all 0.3s;
}

.rod-part svg {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto 7px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 1;
}

.rod-part.has {
  border-style: solid;
  border-color: #c98a50;
  background: rgba(240, 176, 112, 0.09);
  color: #ffd9a8;
}
.rod-part.has svg { opacity: 1; }

/* 水面那一块：不是一块静止的深色板子。
   一层月色、一道水天线、三条慢漂的涟漪、水底游过的一道影子 ——
   浮子落在 62% / 45%，钓线从右上角垂下来 */
.fish-water {
  position: relative;
  height: 172px;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(120% 92% at 50% 0%, rgba(120, 190, 210, 0.18), rgba(120, 190, 210, 0) 62%),
    linear-gradient(180deg, #17475a 0%, #10333f 42%, #071d26 100%);
  isolation: isolate;
}

.fish-water::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 -34px 44px -26px rgba(2, 10, 14, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.fw-moon {
  position: absolute;
  left: 12%;
  top: -46px;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 214, 0.2), rgba(255, 246, 214, 0.05) 46%, rgba(255, 246, 214, 0) 70%);
  pointer-events: none;
}

/* 月亮落在水上那道竖直的光 */
.fw-column {
  position: absolute;
  left: 15%;
  top: 0;
  bottom: 0;
  width: 120px;
  background: linear-gradient(180deg, rgba(255, 246, 214, 0.13), rgba(255, 246, 214, 0.03) 46%, rgba(255, 246, 214, 0));
  filter: blur(9px);
  pointer-events: none;
}

.fw-shimmer {
  position: absolute;
  left: 0;
  right: 0;
  top: 41%;
  height: 26px;
  background: linear-gradient(180deg, rgba(214, 240, 250, 0.12), rgba(214, 240, 250, 0));
  filter: blur(3px);
  pointer-events: none;
}

.fw-wave {
  position: absolute;
  left: -12%;
  width: 124%;
  height: 1px;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(210, 240, 255, 0), rgba(210, 240, 255, 0.28), rgba(210, 240, 255, 0));
  animation: fwDrift 12s ease-in-out infinite;
  pointer-events: none;
}
.fw-wave.w1 { top: 54%; animation-duration: 11s; }
.fw-wave.w2 { top: 68%; opacity: 0.62; animation-duration: 15s; animation-direction: reverse; }
.fw-wave.w3 { top: 82%; opacity: 0.42; animation-duration: 19s; }
@keyframes fwDrift {
  0%, 100% { transform: translateX(-2%); }
  50% { transform: translateX(2%); }
}

/* 水底下慢慢游过去的一道影子 */
.fw-shadow {
  position: absolute;
  left: 0;
  top: 66%;
  width: 64px;
  height: 15px;
  margin-top: -7px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(3, 14, 20, 0.6), rgba(3, 14, 20, 0));
  animation: fwSwim 13s linear infinite;
  pointer-events: none;
}
@keyframes fwSwim {
  0%, 6% { transform: translateX(4%); opacity: 0; }
  14% { opacity: 0.85; }
  74% { transform: translateX(90%); opacity: 0.5; }
  84%, 100% { transform: translateX(104%); opacity: 0; }
}

/* 鱼竿：从画面右下角斜着伸进来，竿尖正好接上钓线。
   preserveAspectRatio=none 会连描边一起拉，所以全部用 non-scaling-stroke 钉住粗细；
   竿身是暖竹色 —— 水太深了，纯剪影的竿子根本看不见 */
.fw-rod {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.fw-rod path,
.fw-rod ellipse { vector-effect: non-scaling-stroke; }
.fr-body {
  fill: none;
  stroke: #c9a87c;
  stroke-width: 3;
  stroke-linecap: round;
}
.fr-gloss {
  fill: none;
  stroke: rgba(255, 244, 222, 0.5);
  stroke-width: 0.9;
  stroke-linecap: round;
}
.fr-grip {
  fill: none;
  stroke: #452f1f;
  stroke-width: 7;
  stroke-linecap: round;
}
.fr-reel {
  fill: #33241a;
  stroke: rgba(255, 232, 198, 0.42);
  stroke-width: 0.9;
}
/* 抛竿：竿子跟着手腕抖一下，浮子才像是被甩出去的 */
.fish-water.is-casting .fw-rod {
  transform-origin: 118% 104%;
  animation: fwRodWhip 0.84s cubic-bezier(0.22, 0.62, 0.36, 1) both;
}
@keyframes fwRodWhip {
  0% { transform: rotate(0deg); }
  16% { transform: rotate(3.6deg); }
  40% { transform: rotate(-1.7deg); }
  68% { transform: rotate(0.6deg); }
  100% { transform: rotate(0deg); }
}

/* 钓线：一条从竿尖垂下来的细弧。
   preserveAspectRatio=none 会连描边一起拉，所以用 non-scaling-stroke 钉住 1px */
.fw-rig {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.fish-water.is-casting .fw-rig { opacity: 0; }
.fish-water .fw-rig { opacity: 1; transition: opacity 0.18s ease 0.62s; }

.fw-rig path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.34);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.fish-float {
  position: absolute;
  left: 62%;
  top: 45%;
  width: 10px;
  height: 10px;
  margin: -15px 0 0 -5px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: linear-gradient(180deg, #ff8f6b 0 46%, #f6ecd8 46% 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 0 10px rgba(255, 150, 110, 0.22);
  transform-origin: 50% 100%;
}

/* 抛出去：从右手边（竿子那头）划一道弧，落水前有一点下坠 */
.fish-float.is-cast { animation: fCast 0.84s cubic-bezier(0.22, 0.62, 0.36, 1) both; }
@keyframes fCast {
  0% { transform: translate(140px, 104px) scale(0.62); opacity: 0; }
  8% { opacity: 1; }
  46% { transform: translate(86px, -30px) scale(0.86) rotate(16deg); }
  74% { transform: translate(26px, -12px) scale(0.96) rotate(5deg); }
  90% { transform: translate(0, 8px) scale(1.06) rotate(0deg); }
  100% { transform: translate(0, 0) scale(1); }
}

/* 咬钩：一下一下往下沉 */
.fish-float.is-bite { animation: fDip 0.34s ease-in-out infinite; }
@keyframes fDip {
  0%, 100% { transform: translateY(7px) scaleY(0.8); }
  50% { transform: translateY(-1px) scaleY(1.06); }
}

/* 浮子周围那圈涟漪 */
.f-ripple {
  position: absolute;
  left: 62%;
  top: 45%;
  width: 26px;
  height: 9px;
  margin: -4px 0 0 -13px;
  border-radius: 50%;
  border: 1px solid rgba(210, 240, 255, 0.45);
  animation: fRipple 3.2s ease-out infinite;
  pointer-events: none;
}
.f-ripple.fast { animation-duration: 0.9s; border-color: rgba(230, 250, 255, 0.7); }
@keyframes fRipple {
  0% { transform: scale(0.45); opacity: 0.65; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* 水花：落水和收线各来一下，两圈错开 */
.fw-splash {
  position: absolute;
  left: 62%;
  top: 45%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  pointer-events: none;
}
.fw-splash::before,
.fw-splash::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(226, 246, 255, 0.8);
  opacity: 0;
}
.is-splash .fw-splash::before { animation: fwRing 0.75s ease-out both; }
.is-splash .fw-splash::after { animation: fwRing 0.75s ease-out 0.14s both; }
@keyframes fwRing {
  0% { transform: scale(0.3); opacity: 0.9; }
  100% { transform: scale(5.2); opacity: 0; }
}

/* 浮子底下的气泡：等的时候一小串一小串冒上来 */
.fw-bub {
  position: absolute;
  left: 62%;
  top: 45%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(220, 244, 255, 0.55);
  opacity: 0;
}
.fw-bub.b1 { animation: fwBub 3.8s ease-in-out infinite; }
.fw-bub.b2 { margin-left: 7px; animation: fwBub 4.6s ease-in-out 1.1s infinite; }
.fw-bub.b3 { margin-left: -6px; animation: fwBub 4.2s ease-in-out 2.3s infinite; }
@keyframes fwBub {
  0% { opacity: 0; transform: translate(0, 8px) scale(0.6); }
  25% { opacity: 0.75; }
  100% { opacity: 0; transform: translate(4px, -18px) scale(1); }
}

/* 咬钩那一下的感叹号 */
.fw-alert {
  position: absolute;
  left: 62%;
  top: 45%;
  margin: -46px 0 0 12px;
  font: 700 18px/1 var(--sans);
  color: #ffd79a;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
  animation: fwAlert 0.62s ease-in-out infinite;
  pointer-events: none;
}
@keyframes fwAlert {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* 拉回来那一下：鱼从水里翻出来，划一道弧落回去 */
.fw-jump {
  position: absolute;
  left: 62%;
  top: 45%;
  width: 54px;
  margin: -14px 0 0 -14px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
  animation: fwJump 1.25s cubic-bezier(0.3, 0.6, 0.4, 1) both;
  pointer-events: none;
}
@keyframes fwJump {
  0% { transform: translate(0, 6px) rotate(-16deg) scale(0.6); opacity: 0; }
  18% { opacity: 1; }
  52% { transform: translate(-30px, -44px) rotate(-4deg) scale(1); }
  86% { transform: translate(-56px, 2px) rotate(16deg) scale(0.95); opacity: 1; }
  100% { transform: translate(-60px, 12px) rotate(22deg) scale(0.9); opacity: 0; }
}

/* 逃掉的时候，水面落回去 */
.fish-water.is-escaped .fish-float { opacity: 0.75; }
.fish-water.is-escaped .f-ripple { animation-duration: 5s; opacity: 0.5; }

/* 收线条：绿区是能拉的窗口，游标来回扫 */
.fish-tension {
  --ft-track: rgba(255, 255, 255, 0.06);
  --ft-line: rgba(255, 255, 255, 0.12);
  --ft-zone: linear-gradient(180deg, rgba(150, 220, 150, 0.4), rgba(120, 200, 130, 0.22));
  --ft-zone-edge: rgba(180, 240, 180, 0.5);
  --ft-mark: #ffe3b8;
  --ft-glow: rgba(255, 220, 160, 0.7);
  margin: 10px 0 13px;
  animation: fishIn 0.3s ease both;
}
.ft-track {
  position: relative;
  display: block;
  height: 24px;
  border-radius: 12px;
  background: var(--ft-track);
  border: 1px solid var(--ft-line);
  overflow: hidden;
}
.ft-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 8px;
  background: var(--ft-zone);
  border-left: 1px solid var(--ft-zone-edge);
  border-right: 1px solid var(--ft-zone-edge);
}
.ft-mark {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--ft-mark);
  box-shadow: 0 0 10px var(--ft-glow);
}
.ft-hint {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--ink-dim);
}
.fish-tension.miss .ft-track { animation: ftShake 0.32s ease; }
/* 没咬钩时进度条照样占着位置，只是看不见 —— 两个状态切换时对话框不会跳大小 */
.fish-tension.is-off { visibility: hidden; }
@keyframes ftShake {
  20% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  100% { transform: none; }
}

.fish-tip {
  margin: 0 0 14px;
  font-size: 11.5px;
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  text-align: center;
}

/* 钓上来那一下 */
.fish-catch {
  padding: 20px 18px 18px;
  border-radius: 15px;
  border: 1px solid rgba(240, 176, 112, 0.24);
  background: radial-gradient(120% 100% at 50% 0%, rgba(240, 176, 112, 0.12), rgba(255, 255, 255, 0.02));
  animation: fishIn 0.5s cubic-bezier(0.2, 0.85, 0.25, 1);
}

@keyframes fishIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.fish-catch svg { display: block; width: 100%; max-width: 240px; height: 96px; margin: 0 auto 12px; }

/* 钓上来之后那一行：左边「去晒鱼架看看」占满，右边「回去了」靠边站 */
.fish-got-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.fish-got-row #fishToRack { flex: 1 1 auto; }
.fish-got-row #fishBye { flex: 0 0 auto; }

.fish-name {
  margin: 0 0 4px;
  text-align: center;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.16em;
  color: #ffe3b8;
}

.fish-meta {
  margin: 0 0 12px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.fish-talk {
  margin: 0 0 14px;
  text-align: center;
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

/* 收藏架上的鱼 */
.fish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  max-height: 48dvh;
  overflow-y: auto;
}

.fish-card {
  padding: 10px 8px 9px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.026);
  text-align: center;
}

.fish-card svg {
  display: block;
  width: 100%;
  height: 46px;
  margin-bottom: 6px;
}

.fish-card b {
  display: block;
  font-family: var(--serif);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #f5ead9;
}

.fish-card i {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.shelf-tabs { margin-bottom: 14px; }
.list[hidden], .fish-grid[hidden] { display: none; }

/* 晒鱼架：架上那几张卡片点一下才展开下面的处理条 */
.fish-card.is-pick { cursor: pointer; }
.fish-card.on {
  border-color: rgba(232, 200, 150, 0.7);
  background: rgba(232, 200, 150, 0.14);
  box-shadow: 0 0 0 2px rgba(232, 200, 150, 0.18);
}
/* 浅色面板里 .fish-card 的底色/边框被下面那条覆盖了，选中态得单独再给一遍 */
body.dialog-light .panel .fish-card.on {
  border-color: #c19a63;
  background: #f8ecd2;
  box-shadow: 0 0 0 2px rgba(186, 146, 92, 0.24);
}
.rack-detail {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0 4px;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.rack-art { flex: 0 0 96px; }
.rack-art svg { display: block; width: 96px; height: 62px; }
.rack-info { min-width: 0; }
.rack-info b {
  display: block;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.rack-info i {
  display: block;
  margin-top: 5px;
  font-style: normal;
  font-size: 10.5px;
  line-height: 1.8;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* 设置 */

.field { margin: 0 0 22px; }

/* 建议：一张纸，写完了才亮起来那颗「寄出去」 */
.sug-input {
  min-height: 78px;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.85;
}
.sug-foot { margin-top: 9px; }
.sug-foot .ghost[disabled] { opacity: 0.42; }

/* 字段标题 + 右边的小问号：说明都收在问号里，版面上不再堆副标题 */
.field-h {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel h2.field-h { margin: 0 0 6px; }

.qmark {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: none;
  color: inherit;
  opacity: 0.4;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  cursor: help;
  display: grid;
  place-items: center;
  transition: opacity 0.2s, transform 0.2s;
}
.qmark:hover,
.qmark:focus-visible {
  opacity: 0.92;
  transform: scale(1.1);
  outline: none;
}
/* 说明文字本体留在 DOM 里（带着 data-i18n，切语言会跟着换），只是不占版面 */
.field-hint { display: none; }
/* 纯文案的字段（版权说明、关于）没有别的控件，收进 ? 里就只剩一个空标题 —— 常显 */
.field-hint.is-shown { display: block; }

/* 「海浪的三种声音」这种字段里面的小节标题：上面一条细线把它和音量分开 */
.field h4.sub-h {
  margin: 22px 0 10px;
  padding-top: 15px;
  border-top: 1px solid var(--hair, rgba(255, 255, 255, 0.1));
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
}

/* 浮出来的说明气泡 */
.hint-tip {
  position: fixed;
  z-index: 120;
  max-width: min(300px, calc(100vw - 30px));
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.42);
  background: #1b2a1c;
  color: #eef5e6;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.02em;
  text-align: left;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}
.hint-tip[hidden] { display: none; }

/* 暗底面板上换成浅色气泡，不然深色叠深色看不出来 */
body.dialog-dark .hint-tip {
  background: #eef5e6;
  color: #1b271a;
  border-color: rgba(0, 0, 0, 0.55);
}

.switch-label {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

/* 「正在单独试听」的临时提示 */
.wave-solo {
  margin-top: 9px;
  color: #6c8465;
}

.field h3 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  /* 小标题不再用琥珀色：和暖白的大标题、冷灰的说明文字统一成中性色 */
  color: #cfd1d8;
}

.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.seg button {
  flex: 1;
  padding: 10px 8px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.22s;
}

.seg button:hover { color: var(--ink); }

.seg button.on {
  background: rgba(240, 176, 112, 0.16);
  color: #ffd9a8;
  box-shadow: inset 0 0 0 1px rgba(240, 176, 112, 0.34);
}

/* 帽子：物品栏里先给一张缩略图，戴之前就能看清是什么样 */
.hat-seg button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  padding: 6px 4px 8px;
  min-width: 0;
}
.hat-thumb {
  display: block;
  width: 100%;
  height: 72px;
}
.hat-seg button > span {
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

/* ---------------- 旗子上的画 ---------------- */

.flag-pad {
  margin: 6px 0 14px;
  border-radius: 14px;
  overflow: hidden;
  background: #f5eddd;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 10px 26px rgba(4, 12, 20, 0.36);
}

.flag-pad canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}

.paint-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.paint-colors { display: flex; gap: 7px; margin-right: 4px; }

.paint-colors button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--c, #ccc);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s;
}

.paint-colors button.on {
  box-shadow: 0 0 0 2px var(--warm), inset 0 0 0 1px rgba(0, 0, 0, 0.3);
  transform: scale(1.08);
}

.paint-sizes {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.paint-sizes button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--ink-dim);
  cursor: pointer;
}

/* 笔触大小用圆圈表示：圈的大小就是笔的粗细 */
.paint-sizes button i {
  display: block;
  width: var(--d, 8px);
  height: var(--d, 8px);
  border-radius: 50%;
  background: currentColor;
}

.paint-sizes button.on {
  background: rgba(240, 176, 112, 0.16);
  color: #ffd9a8;
}

/* 底色：一圈小色板，点一下整块布都换底 */
.paint-bgs {
  display: flex;
  gap: 6px;
  margin-left: 2px;
  padding: 3px 6px 3px 8px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
}

.paint-bgs button {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--c, #eee);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s;
}

.paint-bgs button.on {
  box-shadow: 0 0 0 2px rgba(240, 176, 112, 0.85), inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  transform: scale(1.1);
}

#paintErase.on {
  color: #ffd9a8;
  box-shadow: inset 0 0 0 1px rgba(240, 176, 112, 0.34);
}

/* 岛的轮廓：海面漂浮物绕到后面去 */
.clip-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.drift-layer { clip-path: url(#seaClip); }

.switch {
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.24s, border-color 0.24s;
}

.switch i {
  display: block;
  width: 18px;
  height: 18px;
  margin: 3px;
  border-radius: 50%;
  background: rgba(245, 234, 217, 0.55);
  transition: transform 0.26s cubic-bezier(0.3, 0.9, 0.3, 1.1), background 0.24s;
}

.switch.on { background: rgba(240, 176, 112, 0.3); border-color: #f0b070; }
.switch.on i { transform: translateX(20px); background: #ffd9a8; }

/* 登录 */

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

.or::before, .or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
}

.phone-form .row { display: flex; gap: 10px; margin-bottom: 10px; }
.phone-form .row input { flex: 1; min-width: 0; }

.err {
  margin: 0 0 10px;
  font-size: 11.5px;
  line-height: 1.7;
  color: #ff9d8a;
  letter-spacing: 0.04em;
}

.linkbtn {
  display: block;
  margin: 16px auto 0;
  border: 0;
  background: none;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.linkbtn:hover { color: var(--ink-dim); }

/* ---------------- 重新开始 ----------------
   设置里最不起眼的一栏：一条虚线分开，按钮是褪了色的赭石，
   不是红色的「危险」——岛上没有那种警报。 */

.field-reset {
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px dashed var(--hair);
}

.reset-label {
  color: var(--ink-faint);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

.danger-ghost {
  border-color: rgba(178, 108, 70, 0.42);
  background: rgba(178, 108, 70, 0.07);
  color: #b3704b;
}

.danger-ghost:hover {
  border-color: rgba(178, 108, 70, 0.62);
  background: rgba(178, 108, 70, 0.15);
}

/* 亮色主题下要压过 `body.dialog-light .panel .ghost`（那条在后面，同权重会赢），
   所以这里用 .ghost.danger-ghost 把权重抬高 */
body.dialog-light .panel .ghost.danger-ghost {
  border-color: #dcb69c;
  background: #fdf4ea;
  color: #9a5330;
}

body.dialog-light .panel .ghost.danger-ghost:hover {
  border-color: #c99a7c;
  background: #fbeadb;
  color: #7f3f20;
}

/* 确认：面板上面再盖一层，没点「清掉」之前什么都不做 */
.confirm {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 22px;
  background: radial-gradient(120% 90% at 50% 42%, rgba(6, 16, 20, 0.36), rgba(6, 16, 20, 0.66));
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: confirmFade 0.2s ease;
}

.confirm[hidden] { display: none; }

@keyframes confirmFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes confirmPop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.confirm-sheet {
  position: relative;
  width: min(430px, 100%);
  padding: 27px 27px 20px;
  border-radius: 18px;
  border: 2px solid #0b0c11;
  background-color: rgba(15, 18, 28, 0.97);
  background-image: var(--grain), linear-gradient(180deg, rgba(23, 26, 39, 0.96), rgba(10, 12, 21, 0.98));
  background-size: 200px 200px, 100% 100%;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 235, 205, 0.1);
  color: var(--ink);
  animation: confirmPop 0.26s cubic-bezier(0.2, 0.9, 0.25, 1.08);
}

/* 亮色对话框：跟面板一样是那张浅绿手工纸。
   这套变量必须自己给 —— 确认框不在 .panel 里，拿不到面板那套 --ink，
   不给就会用根上的米白字，压在浅绿纸上看不清（第一版就是这样） */
body.dialog-light .confirm-sheet {
  --ink: #1f2b1e;
  --ink-dim: #3b4b37;
  --ink-faint: #5c6d56;
  --hair: rgba(40, 60, 36, 0.12);
  background-color: #ecf4e4;
  background-image:
    var(--grain-soft),
    repeating-linear-gradient(46deg, rgba(104, 134, 96, 0.055) 0 1px, rgba(255, 255, 255, 0) 1px 6px),
    repeating-linear-gradient(-46deg, rgba(104, 134, 96, 0.04) 0 1px, rgba(255, 255, 255, 0) 1px 7px),
    linear-gradient(178deg, #f3f9ed 0%, #eaf3e1 46%, #e1ecd6 100%);
  background-size: 140px 140px, auto, auto, 100% 100%;
  box-shadow: 0 26px 70px rgba(4, 8, 16, 0.46), inset 0 1px 0 #ffffff;
  color: #1f2b1e;
}

body.dialog-light .confirm-sheet .ghost {
  border-color: #d5e0cb;
  color: #3b4b37;
  background: #fbfdf5;
}

body.dialog-light .confirm-sheet .ghost:hover {
  border-color: #c3d2b8;
  background: #f4f9ee;
}

.confirm-h {
  margin: 0 0 12px;
  font-family: var(--disp);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.confirm-p {
  margin: 0 0 13px;
  font-size: 13px;
  line-height: 1.95;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
}

.confirm-say {
  margin: 0 0 18px;
  padding-left: 11px;
  border-left: 2px solid rgba(178, 108, 70, 0.5);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

body.dialog-light .confirm-say { color: #5c6d56; }

.confirm-acts {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.danger {
  padding: 11px 20px;
  border-radius: 11px;
  border: 1px solid rgba(30, 14, 8, 0.4);
  background: linear-gradient(180deg, #b06a45, #96502f);
  color: #fff3e6;
  font-family: var(--disp);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 10px 24px rgba(96, 40, 18, 0.3), inset 0 1px 0 rgba(255, 226, 200, 0.3);
}

.danger:hover { filter: brightness(1.08); transform: translateY(-1px); }
.danger:disabled { opacity: 0.55; cursor: default; transform: none; filter: none; }

/* ---------------- Toast ----------------
   一句提醒，不该像条系统通知压在海上。
   以前是「沙滩纸」：暖沙底 + 海墨绿字。白天放在沙滩上，纸和沙一个色，
   字又细又小，隔着屏幕真看不清。
   现在换成「夜里的一盏船灯」：深海墨的底、米白的字，边上留一圈暖沙的
   细光，底下那道潮线留着 —— 无论压在沙滩、海面还是浅绿面板上，
   它都能自己浮出来，而且仍然不是一块黑色的系统条。 */

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translate(-50%, 10px);
  z-index: 80;
  max-width: min(460px, calc(100vw - 40px));
  padding: 11px 21px 12px;
  border-radius: 14px;
  /* 深海：中间一点点透，边上压暗，才像一块玻璃而不是一块塑料 */
  background:
    radial-gradient(120% 140% at 22% 0%, rgba(70, 104, 92, 0.55), rgba(70, 104, 92, 0) 62%),
    linear-gradient(178deg, rgba(26, 44, 38, 0.94) 0%, rgba(17, 31, 27, 0.96) 100%);
  border: 1px solid rgba(226, 232, 200, 0.24);
  box-shadow:
    0 16px 34px rgba(6, 18, 15, 0.42),
    0 2px 8px rgba(6, 18, 15, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #f3f7e9;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0.03em;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

/* 潮线：贴着底边的一道细浪，往两边淡出去 */
.toast::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 4px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(198, 226, 196, 0), rgba(198, 226, 196, 0.5), rgba(198, 226, 196, 0));
  pointer-events: none;
}

.toast[hidden] { display: none; }

/* 顶部那一条：开关测试模式这种「说一句就走」的提示用它。
   下面那条 toast 在 88px，别抢位置 */
.toast.top {
  bottom: auto;
  top: calc(env(safe-area-inset-top, 0px) + 76px);
  transform: translate(-50%, -10px);
}

.toast.top.show { transform: translate(-50%, 0); }

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 「今天捞完了」这种拦一下的话：同一盏灯，换成赭石的底、杏色的字 */
.toast.warn {
  background:
    radial-gradient(120% 140% at 22% 0%, rgba(150, 96, 56, 0.5), rgba(150, 96, 56, 0) 62%),
    linear-gradient(178deg, rgba(66, 38, 24, 0.95) 0%, rgba(46, 26, 16, 0.97) 100%);
  border-color: rgba(246, 214, 172, 0.3);
  box-shadow:
    0 16px 34px rgba(28, 12, 6, 0.42),
    0 2px 8px rgba(28, 12, 6, 0.3),
    inset 0 1px 0 rgba(255, 236, 214, 0.18);
  color: #ffe9cf;
}

.toast.warn::after {
  background: linear-gradient(90deg, rgba(240, 196, 148, 0), rgba(240, 196, 148, 0.55), rgba(240, 196, 148, 0));
}

/* ---------------- 躺着 ---------------- */

.rest-hint {
  position: fixed;
  left: 50%;
  bottom: 12%;
  transform: translate(-50%, 10px);
  z-index: 70;
  margin: 0;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.28em;
  color: #ded1b6;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.rest-hint.show { opacity: 1; transform: translate(-50%, 0); }

body.resting .topbar { opacity: 0; transform: translateY(-8px); pointer-events: none; }
body.resting .dock { opacity: 0; pointer-events: none; }
body.resting .view-switch { opacity: 0; pointer-events: none; }
body.resting .drift-layer { opacity: 0.25; }

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink-dim);
  font-family: var(--serif);
  letter-spacing: 0.2em;
}

/* ---------------- 小屏 ---------------- */

@media (max-width: 760px) {
  .topbar { padding: 14px 14px; gap: 8px; align-items: center; }
  .brand h1 { font-size: 17px; letter-spacing: 0.12em; }
  .tagline { display: none; }
  .hud-stats { display: none; }
  .hud { gap: 5px; flex: 0 0 auto; }
  .icon-btn { width: 26px; height: 26px; }
  .icon-btn svg { width: 14px; height: 14px; }
  .user-chip { padding: 5px 9px; font-size: 9.5px; max-width: 84px; letter-spacing: 0.04em; }

  .view-switch {
    left: 14px;
    right: auto;
    bottom: 18px;
    padding: 9px 15px 9px 12px;
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .dock {
    right: 10px;
    bottom: 16px;
    gap: 5px;
  }

  .dock-btn {
    padding: 6px 11px 6px 9px;
    gap: 7px;
    font-size: 10.5px;
    letter-spacing: 0.04em;
  }

  .dock-btn:hover { transform: none; }
  .dock-ico { width: 14px; height: 14px; }
  .dock-badge { font-size: 8.5px; }
  .dock-dot { margin-left: 0; }

  .sky-tools {
    right: 10px;
    top: 43%;
    gap: 6px;
  }

  .sky-tools button {
    padding: 6px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    justify-content: center;
  }

  .sky-tools button span { display: none; }

  .sea-talk.pos-left, .sea-talk.pos-right { max-width: none; font-size: clamp(13px, 3.4vw, 17px); letter-spacing: 0.14em; }
  .sea-talk.pos-left { top: 58.6%; left: 5%; }
  /* 窄屏没有桌面那条「躲开右侧按钮列」的余量，right 得收回来，
     否则文字会被挤出屏幕左边 */
  .sea-talk.pos-right { right: 6%; bottom: 17%; }
  .sea-talk.pos-center { bottom: 15%; font-size: clamp(13px, 3.4vw, 17px); letter-spacing: 0.14em; max-width: none; }

  .panel { padding: 26px 20px 18px; border-radius: 17px; max-height: 90dvh; }
  .panel h2 { font-size: 21px; }
  /* 六种语言挤在一行：手机上把字收紧一点，日语/韩语就不会被切成两行 */
  #langSeg button { font-size: 11px; letter-spacing: 0; padding: 10px 4px; }
  #waveSeg button { font-size: 11px; letter-spacing: 0.02em; padding: 10px 5px; }
  .pick-body { max-height: 34dvh; }
  /* 手机上信纸本身就窄：历史回信别占满整张纸，留出回信框的位置 */
  .pick-history-list { max-height: 46vw; }
  /* 手机上不做整张纸的淡入：面积小、GPU 也弱，那一下会明显掉帧 */
  .pick-body.is-reveal { animation: none; }
  .toast { bottom: 300px; font-size: 11.5px; max-width: calc(100vw - 90px); }
  .rest-hint { font-size: 12px; letter-spacing: 0.2em; bottom: 18%; }
  .drift-item { width: 48px; height: 48px; }
  .drift-bob { width: 48px; height: 48px; }
  .drift-item.tone-bottle { width: 46px; height: 55px; }
  .drift-item.tone-bottle .drift-bob { width: 46px; height: 55px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .drift-bob, .drift-wake { animation: none !important; }
}

/* ---------------- 第 7 轮新增 ---------------- */

/* 设置里两条音量滑杆 */
.vol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 13px;
  color: #f0ece2;
}
.vol-row span { flex: 0 0 5.2em; font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.02em; white-space: nowrap; }
.vol-row b { flex: 0 0 2.4em; text-align: right; font-size: 12px; color: #f0ece2; font-weight: 500; }
/* 滑动条自己画：交给浏览器就是一条黑杠 + 黑圆点，
   跟这张浅绿纸完全不搭。轨道浅、滑块墨绿，是这个岛的颜色 */
.vol-row input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 18px;
  background: transparent;
  cursor: pointer;
}
.vol-row input[type='range']::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}
.vol-row input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: #cbb28c;
  border: 2px solid rgba(16, 20, 16, 0.55);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}
.vol-row input[type='range']::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}
.vol-row input[type='range']::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(16, 20, 16, 0.55);
  border-radius: 50%;
  background: #cbb28c;
}
.vol-row input[type='range']:disabled { opacity: 0.35; cursor: default; }
body.dialog-light .panel .vol-row input[type='range']::-webkit-slider-runnable-track {
  background: #d5e0cb;
}
body.dialog-light .panel .vol-row input[type='range']::-webkit-slider-thumb {
  background: #45543f;
  border-color: #fbfdf5;
  box-shadow: 0 1px 2px rgba(30, 44, 26, 0.28);
}
body.dialog-light .panel .vol-row input[type='range']::-moz-range-track {
  background: #d5e0cb;
}
body.dialog-light .panel .vol-row input[type='range']::-moz-range-thumb {
  background: #45543f;
  border-color: #fbfdf5;
}

/* 扔瓶子面板的表情行 */
.emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 2px;
}
.emoji-row button {
  width: 34px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.emoji-row button:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.emoji-row button:active { transform: scale(0.92); }

/* 捞杆动画层 */
.catch-rod {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
  overflow: visible;
}

/* 捞上来的东西：中间的物品对话框（简洁版：一张卡片，一眼看完） */
.catch-panel { text-align: center; padding-top: 38px; }
.catch-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  font-family: var(--sans);
}
.catch-art {
  /* 箱子在 48 格子的画布里只占中间那半截，框子给大一点才看得清 */
  width: 108px;
  height: 108px;
  margin: 4px auto 12px;
  padding: 10px;
  border-radius: 18px;
  /* 框线不能太淡：浅色纸底下几乎看不见，东西像是浮在空气里 */
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.05);
  animation: bob 3.4s ease-in-out infinite;
}
.catch-art svg { width: 100%; height: 100%; }
.catch-panel h2 { margin: 0 0 8px; font-size: 21px; letter-spacing: 0.1em; }
.catch-flavor { max-width: 26em; margin: 0 auto 8px; color: var(--ink-dim); }
/* 打开之后箱子缩一号，把版面让给里面的东西 */
.catch-panel.loot-open .catch-art {
  width: 66px;
  height: 66px;
  padding: 8px;
  margin: 2px auto 8px;
  animation: none;
}

/* 箱子里掏出来的东西：一件一格，图 + 名 */
.catch-loot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  margin: 2px auto 10px;
  max-width: 25em;
  animation: lootIn 0.34s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.loot-item {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 62px;
  /* 从箱子里一件件摊出来：往上一顶、放大到位，带一点回弹 */
  animation: lootIn 0.46s cubic-bezier(0.22, 0.9, 0.3, 1.18) both;
}
@keyframes lootIn {
  0% { opacity: 0; transform: translateY(14px) scale(0.72); }
  60% { opacity: 1; transform: translateY(-2px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .loot-item { animation: none; }
}

.loot-ico {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
}
.loot-ico svg { width: 34px; height: 34px; display: block; }
/* 从箱子里开出来的画：竖幅多，格子给高一点，画才不是一条缝 */
.loot-ico.is-tall { width: 50px; height: 62px; }
.loot-ico.is-tall svg { width: 42px; height: 54px; }
.loot-name {
  font-size: 11px;
  letter-spacing: 0.05em;
  font-style: normal;
  color: var(--ink-dim);
  white-space: nowrap;
}
.catch-hint {
  margin: -2px auto 4px;
  max-width: 24em;
  color: var(--ink-faint);
}
/* 音符「正在放」：按钮染成暖沙色，和「听一遍」区分开。
   底色半透明，浅色纸和暗底对话框都压得住 */
#catchPlay.is-playing {
  border-color: rgba(226, 160, 90, 0.62);
  background: rgba(226, 160, 90, 0.17);
}
@keyframes lootIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* 暗底对话框：同样不留偏黄的字，只留中性色 */
body.dialog-dark .panel {
  --warm: #e9e5da;
  --warm-soft: rgba(255, 255, 255, 0.07);
  border: 2px solid #05060a;
  /* 暗版也是绿的：深海一样的墨绿，不是纯黑 */
  background-color: #0d1410;
  background-image: var(--grain), linear-gradient(180deg, rgba(22, 34, 26, 0.96), rgba(9, 14, 11, 0.98));
  background-size: 200px 200px, 100% 100%;
}
body.dialog-dark .panel .chip.on { border-color: #838694; color: #f4f1e9; }
body.dialog-dark .panel .seg button.on {
  background: rgba(255, 255, 255, 0.1);
  color: #f4f1e9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

/* 对话框：浅绿纸底 + 布纹。默认就是这一套，
   谁想换成暗的，在设置里点「暗」即可。 */
body.dialog-light .panel {
  --ink: #1f2b1e;
  --ink-dim: #3b4b37;
  --ink-faint: #5c6d56;
  /* 原来这里是琥珀色 8a5a1e：数字、字段名、选中态一水儿偏黄。
     现在统一压成墨绿黑，只在底色上留一点极淡的暖。
     凡是取 var(--warm) 当文字色的地方（统计数字、可引用、滑杆）都跟着变深。 */
  --warm: #17211a;
  --warm-soft: rgba(52, 82, 46, 0.1);
  --hair: rgba(40, 60, 36, 0.12);
  border: 2px solid #0b0c11;
  background-color: #ecf4e4;
  /* 四层叠出来的「浅绿手工纸」：细噪点 + 两道交叉的布纹 + 从上到下的绿 */
  background-image:
    var(--grain-soft),
    repeating-linear-gradient(46deg, rgba(104, 134, 96, 0.055) 0 1px, rgba(255, 255, 255, 0) 1px 6px),
    repeating-linear-gradient(-46deg, rgba(104, 134, 96, 0.04) 0 1px, rgba(255, 255, 255, 0) 1px 7px),
    linear-gradient(178deg, #f3f9ed 0%, #eaf3e1 46%, #e1ecd6 100%);
  background-size: 140px 140px, auto, auto, 100% 100%;
  box-shadow: 0 30px 80px rgba(4, 8, 16, 0.46), inset 0 1px 0 #ffffff;
  color: #1f2b1e;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.dialog-light .panel h2 { color: #16211a; }
body.dialog-light .panel .field h3 { color: #1b271b; }
body.dialog-light .panel .panel-sub { color: #4e5f49; }
body.dialog-light .panel .panel-sub b { color: #141d15; }
body.dialog-light .panel .tiny { color: #566652; }
body.dialog-light .panel .tiny b { color: #141d15; }
body.dialog-light .panel .panel-x { color: #7c8b77; }
body.dialog-light .panel .panel-x:hover { color: #23242b; background: rgba(24, 26, 34, 0.06); }
body.dialog-light .panel .panel-foot { border-top-color: #dfe8d6; }
body.dialog-light .photo-prev { border-color: #d7e0cd; background: #f2f7ea; }

/* 表单 */
body.dialog-light .panel textarea,
body.dialog-light .panel input[type='tel'],
body.dialog-light .panel input[type='text'],
body.dialog-light .panel input[type='email'] {
  background: #fbfdf5;
  border-color: #d5e0cb;
  color: #1f2b1e;
}
body.dialog-light .panel textarea::placeholder,
body.dialog-light .panel input::placeholder { color: #7f8f79; }
body.dialog-light .panel textarea:focus,
body.dialog-light .panel input:focus {
  border-color: #9fb396;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(84, 110, 74, 0.14);
}
body.dialog-light .panel .chip { border-color: #d7e1cf; color: #45543f; }
body.dialog-light .panel .chip:hover { border-color: #b6c5ac; color: #16211a; }
body.dialog-light .panel .chip.on { border-color: #9fb396; background: #eaf3df; color: #131d14; }
body.dialog-light .panel .upload-btn { border-color: #d9dae3; color: #4a4d58; }
body.dialog-light .panel .upload-btn:hover { border-color: #a9acb9; color: #14151b; }
body.dialog-light .panel .upload-clear { color: #62666f; }
body.dialog-light .panel .upload-preview { border-color: #e4e5ec; }

/* 按钮 */
body.dialog-light .panel .ghost { border-color: #d5e0cb; color: #3b4b37; background: #fbfdf5; }
body.dialog-light .panel .ghost:hover { border-color: #b6c5ac; color: #16211a; background: #f1f8e8; }
body.dialog-light .panel .primary {
  background: linear-gradient(180deg, #f2c489, #dd9f5b);
  color: #2a1c0e;
  box-shadow: 0 8px 20px rgba(190, 130, 66, 0.22);
}
body.dialog-light .panel .linkbtn { color: #62666f; }
body.dialog-light .panel .linkbtn:hover { color: #1a1b21; }

/* 信纸 / 列表 / 卡片 */
body.dialog-light .panel .pick-body,
body.dialog-light .panel .list-item {
  background-color: #fbfdf5;
  background-image: none;
  border-color: #dde6d4;
  box-shadow: 0 1px 2px rgba(24, 40, 20, 0.05);
}
body.dialog-light .panel .pick-text { color: #000; }
/* 暗底上黑字看不见，只有这一套反过来 */
body.dialog-dark .panel .pick-text { color: #f4ecdd; }
body.dialog-light .panel .list-text { color: #232f20; }
body.dialog-light .panel .list-meta { color: #5c6d56; }
body.dialog-light .panel .list-meta .quote-ready { color: #14151b; }
body.dialog-light .panel .list-empty { color: #5c6d56; }

/* 统计 / 垃圾堆 / 钓鱼 */
body.dialog-light .panel .stat-grid > div { border-color: #dde6d4; background: #f6faef; }
body.dialog-light .panel .stat-grid b { color: #16211a; }
body.dialog-light .panel .stat-grid span { color: #566652; }
body.dialog-light .panel .trash-count { border-color: #dde6d4; background: #f6faef; }
body.dialog-light .panel .trash-count b { color: #16211a; }
body.dialog-light .panel .trash-count span { color: #566652; }
body.dialog-light .panel .rod-part { border-color: #d7e1cf; background: #f6faef; color: #5c6d56; }
body.dialog-light .panel .rod-part.has { border-color: #9fb396; background: #eaf3df; color: #16211a; }
body.dialog-light .panel .fish-tip { color: #4a4d58; }
body.dialog-light .panel .fish-catch { border-color: #e8d6b8; background: radial-gradient(120% 100% at 50% 0%, rgba(220, 180, 120, 0.16), #fdfbf6); }
body.dialog-light .panel .fish-name { color: #2a2b33; }
body.dialog-light .panel .fish-meta { color: #62666f; }
body.dialog-light .panel .fish-talk { color: #4a4d58; }
body.dialog-light .panel .fish-water { border-color: #dfe0e9; }
/* 收线条在浅色纸上：轨道要沉下去一点，绿区才看得出是绿区 */
body.dialog-light .panel .fish-tension {
  --ft-track: rgba(70, 90, 78, 0.1);
  --ft-line: rgba(70, 90, 78, 0.18);
  --ft-zone: linear-gradient(180deg, rgba(92, 158, 92, 0.42), rgba(92, 158, 92, 0.24));
  --ft-zone-edge: rgba(70, 130, 70, 0.45);
  --ft-mark: #7a4a1c;
  --ft-glow: rgba(160, 110, 50, 0.45);
}
body.dialog-light .panel .fish-card { border-color: #dde6d4; background: #f6faef; }
body.dialog-light .panel .fish-card b { color: #23242b; }
body.dialog-light .panel .fish-card i { color: #62666f; }

/* 设置里的分段选择、滑杆、开关 */
body.dialog-light .panel .seg,
body.dialog-light .panel .shelf-tabs { border-color: #d8e2cf; background: #f2f8ea; }
body.dialog-light .panel .seg button { color: #45543f; }
body.dialog-light .panel .seg button:hover { color: #16211a; }
body.dialog-light .panel .seg button.on {
  background: #fcfff8;
  color: #131d14;
  box-shadow: inset 0 0 0 1px #b9c9ae, 0 1px 2px rgba(24, 40, 20, 0.1);
}
body.dialog-light .panel .vol-row,
body.dialog-light .panel .vol-row span,
body.dialog-light .panel .vol-row b { color: #3b4b37; }
body.dialog-light .panel .switch { border-color: #d2ddc8; background: #e7f0dd; }
body.dialog-light .panel .switch i { background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
body.dialog-light .panel .switch.on { background: #45543f; border-color: #3a4835; }
body.dialog-light .panel .switch.on i { background: #ffffff; }
body.dialog-light .panel .emoji-row button { border-color: #dde6d4; background: #f7fbf0; }
body.dialog-light .panel .emoji-row button:hover { background: #edf5e3; }
body.dialog-light .panel .or { color: #62666f; }
body.dialog-light .panel .or::before,
body.dialog-light .panel .or::after { background: #dfe8d6; }
body.dialog-light .panel .err { color: #a8382a; }
body.dialog-light .panel .font-select {
  background-color: #ffffff;
  border-color: #dbdce5;
  color: #23242b;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235d6068' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
body.dialog-light .panel .font-select:hover { border-color: #bdbfcc; }
body.dialog-light .panel .font-select option { background: #fbfdf5; color: #1f2b1e; }

/* 捞上来的东西 */
body.dialog-light .panel .catch-kicker { color: #62666f; }
body.dialog-light .panel .catch-art { border-color: #93a68a; background: #f6faef; }
body.dialog-light .panel .catch-flavor { color: #4a4d58; }
body.dialog-light .panel .loot-ico { border-color: #a3b498; background: #fbfdf5; }
body.dialog-light .panel .loot-name { color: #4a5a48; }
body.dialog-light .panel .catch-hint { color: #6b7a68; }

/* 货品堆 */
body.dialog-light .panel .goods-card { border-color: #e6e7ef; background: #ffffff; }
body.dialog-light .panel .goods-card:hover { background: #f6f7fb; }
body.dialog-light .panel .goods-name { color: #23242b; }
body.dialog-light .panel .goods-tag { color: #8a9080; }
body.dialog-light .panel .goods-count { background: #2b2d36; color: #ffffff; }

/* 画板：工具轨和底部工具条跟着纸走 */
body.dialog-light .panel .paint-rail,
body.dialog-light .panel .paint-bottom { border-color: #e6e7ef; background: #fbfbfe; box-shadow: none; }
body.dialog-light .panel .paint-sep { background: linear-gradient(90deg, transparent, #e0e1ea, transparent); }
body.dialog-light .panel .paint-sizes button,
body.dialog-light .panel .paint-rail .tool-btn,
body.dialog-light .panel .paint-bottom .tool-btn {
  border-color: #e0e1ea;
  background: #ffffff;
  color: #3f424d;
}
body.dialog-light .panel .paint-sizes button:hover,
body.dialog-light .panel .paint-rail .tool-btn:hover,
body.dialog-light .panel .paint-bottom .tool-btn:hover { background: #f2f3f9; border-color: #c8cad6; }
body.dialog-light .panel .paint-sizes button.on,
body.dialog-light .panel .paint-rail .tool-btn.on,
body.dialog-light .panel .paint-bottom .tool-btn.on { background: #eceef4; color: #14151b; border-color: #c2c5d1; }
body.dialog-light .panel .paint-bgs { border-color: #e0e1ea; }
body.dialog-light .panel .paint-colors button.on { box-shadow: 0 0 0 2px #fcfbff, 0 0 0 3.5px #14151b; }
body.dialog-light .panel .paint-bgs button.on { box-shadow: 0 0 0 2px #fcfbff, 0 0 0 3.5px #14151b; }

/* 底部工具条上的分隔线 */
body.dialog-light .panel .paint-bottom-sep { background: #e4e5ec; }

/* 面板外的遮罩：浅底就压一层冷灰，别把背景压死 */
body.dialog-light .overlay-backdrop { background: radial-gradient(120% 90% at 50% 40%, rgba(8, 12, 20, 0.34), rgba(4, 6, 12, 0.62)); }

/* ---------------- 第 9 轮新增 ---------------- */

/* 左上角标题：点击隐藏/恢复，占位不塌、区域可再点 */
/* 顶栏整体不吃点击（要让点天空落到海面上），但标题本身得能接住 ——
   测试模式的暗号就是连点最后那个「记」字。以前 .topbar 的 pointer-events:none
   一路传下来，标题上的 click 监听器永远收不到真实鼠标，只有脚本派发的合成事件能触发。 */
/* 整块品牌区（标题 + 副标题）都能点：点一下淡出，再点一下淡回。
   只给 h1 的话，点副标题会穿到画布上去，看着像「点了没反应」 */
.brand { pointer-events: auto; user-select: none; -webkit-user-select: none; }
/* 躺进吊床时整条顶栏是隐形的，别让看不见的标题继续吃点击 */
body.resting .brand,
body.resting .brand h1 { pointer-events: none; }
/* 别给标题任何"我像按钮"的暗示：暗号本来就该是暗的。
   也顺手关掉手机上的点按高亮（默认那层灰会让字看起来突然淡掉一下） */
.brand h1 {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  /* 手机上这块现在是可点的，浏览器会把"连点两下"当成双击缩放 ——
     页面一缩放，标题和副标题就像淡掉了一半，再点又回来。
     manipulation = 只留单击，不要双击缩放。 */
  touch-action: manipulation;
}
.brand h1,
.brand .tagline { transition: opacity 1.1s ease, transform 1.1s ease; }
/* 淡出要慢：2.4 秒走完（要求是「三秒之内消失」），回来 1.1 秒就够。
   id 前缀是为了压住 body.view-reef 里那条 0.5 透明度的规则。 */
#brand.brand-hidden h1,
#brand.brand-hidden .tagline {
  opacity: 0;
  transform: translateY(-6px);
  transition-duration: 2.4s;
}
/* 淡掉之后这块仍然是可点的 —— 不然就再也点不回来 */
#brand.brand-hidden { cursor: default; }

/* 一分钟没动：四个角的界面收起来，只剩海。
   只有真的点一下、滚一下、按个键才回来 —— 移动鼠标不算，
   所以拿着鼠标看海的时候不会一会儿亮一会儿灭。 */
.hud { transition: opacity 0.7s ease; }
body.idle-ui .topbar,
body.idle-ui .hud,
body.idle-ui .dock,
body.idle-ui .view-switch {
  opacity: 0;
  pointer-events: none;
}
body.idle-ui .topbar { transform: translateY(-8px); }

/* 画板：自定义笔刷光标 */
.flag-pad { position: relative; }
.flag-pad canvas { cursor: none; touch-action: none; }
.brush-cursor {
  position: absolute;
  border: 2px solid #cf4a38;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  z-index: 5;
}
.brush-cursor.eraser { border-style: dashed; }

/* 画板：照专业绘图工具的样子做——
   左边一条窄工具轨（墨色 / 笔粗 / 橡皮 / 底色 / 清空），右边整块画布。
   控件统一 28px 圆角方块，选中的加一道奶白描边，不靠颜色变化去表达「选中」。 */
.paint-wrap {
  display: flex;
  gap: 14px;
  /* 不拉伸：画布按自己的比例走，别跟着左边工具轨一起变高 */
  align-items: flex-start;
  margin: 12px 0 4px;
}
.paint-rail {
  flex: 0 0 84px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 7px;
  align-content: start;
  justify-items: center;
  padding: 12px 9px;
  border: 1px solid rgba(240, 206, 160, 0.16);
  border-radius: 14px;
  background-color: rgba(12, 14, 22, 0.66);
  background-image: var(--grain-soft);
  background-size: 140px 140px;
  box-shadow: inset 0 1px 0 rgba(255, 236, 208, 0.05);
}
.paint-sep {
  grid-column: 1 / -1;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 236, 208, 0.18), transparent);
  margin: 3px 0;
}
.paint-colors { display: contents; }
.paint-colors button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background: var(--c);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.14s ease, box-shadow 0.18s ease;
}
.paint-colors button:hover { transform: translateY(-1px) scale(1.06); }
.paint-colors button.on {
  border-color: #fff6e6;
  box-shadow: 0 0 0 2px rgba(12, 14, 22, 0.9), 0 0 0 3.5px rgba(255, 240, 214, 0.85);
}
/* 自定义墨色：一个色轮，一看就知道是取色器 */
.paint-custom {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.35);
  cursor: pointer;
  background: conic-gradient(#c4453a, #d9a441, #6d8551, #38677d, #3a4a72, #b8483a, #c4453a);
}
.paint-custom::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 5px;
  background: var(--picked, #2a251e);
  border: 1px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
}
.paint-custom input {
  position: absolute;
  inset: -8px;
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: none;
  opacity: 0;
}
.paint-sizes { display: contents; }
.paint-sizes button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 236, 208, 0.14);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: #f0e6d4;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.14s;
}
.paint-sizes button:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.07); }
.paint-sizes button i {
  display: block;
  width: var(--d);
  height: var(--d);
  border-radius: 50%;
  background: currentColor;
}
.paint-sizes button.on {
  border-color: rgba(255, 240, 214, 0.8);
  background: rgba(255, 214, 150, 0.16);
}
/* 橡皮 / 清空：图标按钮，占满两列 */
.paint-rail .tool-btn {
  grid-column: 1 / -1;
  width: 100%;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 236, 208, 0.14);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: #f0e6d4;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.paint-rail .tool-btn svg { width: 17px; height: 17px; }
.paint-rail .tool-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 236, 208, 0.3); }
.paint-rail .tool-btn.on {
  color: #ffd9a8;
  border-color: rgba(255, 200, 140, 0.7);
  background: rgba(240, 176, 112, 0.16);
}
.paint-bgs { display: contents; }
.paint-bgs button {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: var(--c);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.14s ease, box-shadow 0.18s ease;
}
.paint-bgs button:hover { transform: translateY(-1px) scale(1.06); }
.paint-bgs button::after {
  content: '\2713';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #3a3128;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s;
}
.paint-bgs button.on { box-shadow: 0 0 0 2px rgba(12, 14, 22, 0.9), 0 0 0 3.5px rgba(255, 240, 214, 0.85); }
.paint-bgs button.on::after { opacity: 1; }
.flag-pad { flex: 1; align-self: flex-start; margin: 0; }
/* 右边一列：画布在上，底色 / 橡皮 / 清空在下——像绘图软件的选项条 */
.paint-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.paint-main .flag-pad { width: 100%; flex: 0 0 auto; }
.paint-bottom {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid rgba(240, 206, 160, 0.14);
  border-radius: 12px;
  background: rgba(12, 14, 22, 0.5);
}
.paint-bottom .paint-bgs { display: flex; gap: 6px; align-items: center; }
.paint-bottom-sep { width: 1px; height: 22px; background: rgba(255, 236, 208, 0.16); margin: 0 3px; }
.paint-bottom .tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 236, 208, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: #f0e6d4;
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.paint-bottom .tool-btn svg { width: 16px; height: 16px; }
/* 图标按钮不写字：字放在 title 里，鼠标停一下就能看到（和绘图软件一样） */
.paint-bottom .tool-btn span { display: none; }
.paint-bottom .tool-btn:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 236, 208, 0.32); }
.paint-bottom .tool-btn.on {
  color: #ffd9a8;
  border-color: rgba(255, 200, 140, 0.7);
  background: rgba(240, 176, 112, 0.16);
}
@media (max-width: 640px) {
  .paint-wrap { gap: 10px; }
  .paint-rail { flex: 0 0 74px; padding: 10px 7px; gap: 7px 6px; }
  .paint-colors button, .paint-bgs button, .paint-custom, .paint-sizes button { width: 25px; height: 25px; }
  .paint-sizes button i { width: calc(var(--d) * 0.85); height: calc(var(--d) * 0.85); }
  /* 小屏上底部工具条要挤在一行里，不然清空按钮会单独掉下去 */
  .paint-bottom { gap: 5px; padding: 6px 8px; flex-wrap: nowrap; }
  .paint-bottom .paint-bgs { gap: 5px; }
  .paint-bottom .tool-btn { width: 28px; height: 26px; }
  .paint-bottom-sep { margin: 0 1px; }
}

/* 界面字体选择：右边一个下拉，左边一行字说明 */
.font-row { display: flex; align-items: center; gap: 10px; }
.font-select {
  flex: 1 1 auto;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 34px 10px 13px;
  border-radius: 11px;
  border: 1px solid rgba(240, 206, 160, 0.24);
  background-color: rgba(255, 255, 255, 0.045);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23d9c8a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.font-select:hover { border-color: rgba(255, 236, 208, 0.42); }
.font-select:focus-visible { outline: none; border-color: var(--warm); }
.font-select option { background: #12141f; color: #f5ead9; }
.font-row .ghost { flex: 0 0 auto; }
body.dialog-light .font-select {
  background-color: rgba(255, 255, 255, 0.8);
  border-color: rgba(96, 76, 40, 0.24);
  color: #2e2a22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236b6152' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
body.dialog-light .font-select option { background: #fbf7ee; color: #2e2a22; }
@media (max-width: 640px) {
  .paint-rail { flex: 0 0 68px; }
  .paint-colors button, .paint-bgs button, .paint-custom, .paint-sizes button { width: 20px; height: 20px; }
}

/* 货品堆：物品图标卡 + 数量角标 */
.goods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  grid-auto-rows: 1fr;
  gap: 10px;
}
.goods-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-height: 172px;
  padding: 12px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  transition: transform 0.15s, background 0.2s, opacity 0.3s;
}
.goods-card:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.07); }
.goods-card.gone { opacity: 0; transform: scale(0.9); }
.goods-ico { position: relative; width: 56px; height: 56px; }
.goods-ico svg { width: 100%; height: 100%; }
/* 名字最多两行，卡片才一样高；按钮沉到底 */
.goods-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.goods-card .ghost.small { margin-top: auto; }
/* 摆不上架子的东西：卡片底部留一句「留着用」，别空着一块 */
.goods-tag {
  margin-top: auto;
  padding-bottom: 5px;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

/* 吃的东西在堆里单拎出来：卡片描一道暖边，一眼看得出「这个能下肚」 */
.goods-card.is-food { border-color: rgba(198, 138, 84, 0.4); }
.goods-card.is-food .goods-name { color: #d79a5c; }
body.dialog-light .panel .goods-card.is-food { border-color: rgba(178, 116, 58, 0.3); background: #fffaf3; }
body.dialog-light .panel .goods-card.is-food .goods-name { color: #a9662c; }

/* 物品堆的两页：堆里 / 组装 */
.goods-tabs { margin-bottom: 14px; }
#goodsPileView[hidden], #goodsBuildView[hidden] { display: none; }
.build-hint { margin: 8px 0 14px; }
.build-list { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 12px; }
.build-group {
  margin: 12px 2px 2px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
body.dialog-light .panel .build-group { color: #7b8090; }
.build-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}
.build-row.done { opacity: 0.6; }
.build-ico { flex: 0 0 auto; width: 52px; height: 52px; }
.build-ico svg { width: 100%; height: 100%; }
.build-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.build-name { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; }
.build-note { font-size: 11px; line-height: 1.65; color: var(--ink-dim); }
.build-cost { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.cost-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.cost-pill.lack { border-color: rgba(198, 120, 80, 0.55); color: #d79a5c; }
.cost-pill .mat-dot { width: 9px; height: 9px; border-radius: 2.5px; }
/* 要拆的那件旧物：不是材料，是海里捞上来的东西，底色给暖一点 */
.cost-pill.is-part {
  border-style: dashed;
  border-color: rgba(201, 162, 78, 0.55);
  color: #e3c78d;
}
.build-row .ghost.small { flex: 0 0 auto; }
.build-done { flex: 0 0 auto; font-size: 11px; letter-spacing: 0.14em; color: #8fbf9a; }

body.dialog-light .panel .build-row { border-color: #dfe8d4; background: #fbfdf5; }
body.dialog-light .panel .build-name { color: #1f2b1e; }
body.dialog-light .panel .build-note { color: #5c6b54; }
body.dialog-light .panel .cost-pill { border-color: #d5e0cb; color: #45543f; }
body.dialog-light .panel .cost-pill.lack { border-color: #d8b6a2; color: #9b5734; }
body.dialog-light .panel .cost-pill.is-part { border-color: rgba(176, 132, 48, 0.6); color: #8a5f16; }
body.dialog-light .panel .build-done { color: #4f7a52; }

/* 收藏架：分好类，一件一张缩略图。一列小字认不出是哪幅画 */
.shelf-group { margin-bottom: 18px; }
.shelf-group:last-child { margin-bottom: 0; }
.shelf-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 9px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}
.shelf-h i { font-style: normal; font-size: 10px; opacity: 0.55; letter-spacing: 0; }
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.shelf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.shelf-card:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}
.shelf-thumb { width: 66px; height: 66px; display: block; }
.shelf-thumb.is-tall { width: 52px; height: 68px; }
.shelf-thumb svg { width: 100%; height: 100%; display: block; }
.shelf-name {
  max-width: 100%;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--ink);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shelf-n {
  position: absolute;
  right: 5px;
  top: 5px;
  font-style: normal;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(248, 242, 228, 0.82);
}
body.dialog-light .panel .shelf-card { border-color: #e6e7ef; background: #ffffff; }
body.dialog-light .panel .shelf-card:hover { background: #f6f7fb; border-color: #d8dae6; }
body.dialog-light .panel .shelf-name { color: #23242b; }
body.dialog-light .panel .shelf-n { background: #2b2d36; color: #ffffff; }
body.dialog-light .panel .shelf-h { color: #5b5f6e; }

/* 架子上万一还有吃的（早期版本允许上架）：暖边 + 一个「吃掉」 */
.shelf-card.is-food { border-color: rgba(198, 138, 84, 0.42); }
.shelf-card.is-food .shelf-name { color: #d79a5c; }
.shelf-card .ghost.small { margin-top: 1px; padding: 3px 10px; font-size: 10px; }
body.dialog-light .panel .shelf-card.is-food { border-color: rgba(178, 116, 58, 0.32); background: #fffaf3; }
body.dialog-light .panel .shelf-card.is-food .shelf-name { color: #a9662c; }

/* 旋律：盒子只画一只，底下排曲名。点一行听一段 */
.tune-case {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px 12px 8px;
}
.tune-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tune-art { flex: 0 0 auto; width: 76px; height: 76px; display: block; }
.tune-art svg { width: 100%; height: 100%; display: block; }
.tune-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tune-info b { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: 0.02em; }
.tune-info i { font-style: normal; font-size: 10.5px; color: var(--ink-dim); }
.tune-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.tune-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 6px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.18s;
}
.tune-row:hover { background: rgba(255, 255, 255, 0.06); }
.tune-play {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 8px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.tune-play.is-playing { background: rgba(232, 163, 60, 0.92); border-color: transparent; color: #241a08; }
.tune-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11.5px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tune-n { flex: 0 0 auto; font-style: normal; font-size: 10px; opacity: 0.55; }
.tune-off {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 3px 4px;
  color: var(--ink-faint);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.tune-off:hover { color: var(--ink); text-decoration: underline; }
.tune-off:disabled { opacity: 0.4; }
body.dialog-light .panel .tune-case { border-color: #e6e7ef; background: #ffffff; }
body.dialog-light .panel .tune-head { border-bottom-color: #eceef4; }
body.dialog-light .panel .tune-info b,
body.dialog-light .panel .tune-name { color: #23242b; }
body.dialog-light .panel .tune-info i { color: #6e7280; }
body.dialog-light .panel .tune-row:hover { background: #f4f6fa; }
body.dialog-light .panel .tune-play { border-color: #d6d9e4; color: #2b2d36; }
body.dialog-light .panel .tune-play.is-playing { background: #d98a22; color: #fff; }
body.dialog-light .panel .tune-off { color: #8a8f9c; }
body.dialog-light .panel .tune-off:hover { color: #23242b; }
.goods-count {
  /* 名字下面单独一行的小胶囊：不压图片，也不打断名字 */
  position: relative;
  margin: -2px auto 0;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(232, 163, 60, 0.92);
  color: #241a08;
  font-size: 10.5px;
  font-weight: 700;
  font-style: normal;
  line-height: 16px;
  text-align: center;
  /* 阿拉伯语界面从右往左，不锁方向的话「×3」会变成「3×」 */
  direction: ltr;
  unicode-bidi: isolate;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.goods-name {
  margin: 0;
  font-size: 12px;
  color: #f0ece2;
  text-align: center;
  line-height: 1.35;
}
body.dialog-light .goods-card { border-color: rgba(60, 50, 30, 0.14); background: rgba(255, 255, 255, 0.55); }
body.dialog-light .goods-name { color: #2e2a22; }
body.dialog-light .goods-count { background: rgba(214, 138, 34, 0.95); color: #fff; }

/* 点得开：整张卡是「拿起来看看」，右下那个小按钮才是收 */
.goods-card { cursor: pointer; }
.goods-card.is-painting .goods-ico { width: 62px; height: 78px; }
.goods-card.is-painting { min-height: 184px; }

/* 货品详情：一件东西摊开看。
   画是竖的，框子就得竖过来——塞进正方形里，上下全是空的 */
.detail-panel { text-align: center; padding-top: 38px; }
.detail-art {
  width: 108px;
  height: 108px;
  margin: 4px auto 12px;
  padding: 10px;
  border-radius: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.05);
  animation: bob 3.4s ease-in-out infinite;
}
.detail-art svg { display: block; width: 100%; height: 100%; }
.detail-art.is-page {
  width: 124px;
  height: 132px;
  padding: 0;
  border: 0;
  background: none;
  animation: none;
  filter: drop-shadow(0 10px 18px rgba(60, 48, 26, 0.18));
}
/* 书页的正文：比说明文字大一点、行距松一点，像在读一段书 */
.detail-note.is-quote {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--ink);
}

/* 一页书：一张泛黄的手抄本纸。
   撕边、纸纤维、水渍、四周压暗都是 CSS 画的，不用图片。
   正文纯黑、横竖居中；出处压右下 */
.page-sheet {
  position: relative;
  width: 91%;
  max-width: 500px;
  min-height: 362px;
  margin: 8px auto 16px;
  padding: 58px 46px 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #000;
  background-color: #efe0ba;
  background-image:
    /* 几处霉斑/水渍，别铺满，像放久了的纸 */
    radial-gradient(circle at 22% 31%, rgba(122, 82, 32, 0.16) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 31% 36%, rgba(122, 82, 32, 0.1) 0 1px, transparent 2px),
    radial-gradient(circle at 71% 63%, rgba(122, 82, 32, 0.13) 0 1.6px, transparent 2.6px),
    radial-gradient(circle at 83% 44%, rgba(122, 82, 32, 0.09) 0 1.1px, transparent 2px),
    radial-gradient(circle at 44% 82%, rgba(122, 82, 32, 0.1) 0 1.2px, transparent 2.2px),
    radial-gradient(120% 86% at 50% -12%, rgba(255, 250, 228, 0.7) 0%, rgba(255, 250, 228, 0) 62%),
    radial-gradient(38% 30% at 14% 20%, rgba(150, 112, 52, 0.15), transparent 70%),
    radial-gradient(30% 24% at 86% 68%, rgba(140, 102, 46, 0.14), transparent 72%),
    radial-gradient(24% 18% at 26% 90%, rgba(130, 96, 42, 0.13), transparent 72%),
    radial-gradient(18% 14% at 74% 18%, rgba(130, 96, 42, 0.1), transparent 72%),
    linear-gradient(160deg, #f8efd7 0%, #efe0ba 46%, #e2cda3 100%);
  box-shadow: inset 0 0 54px rgba(112, 80, 34, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0.0%201.0%20L4.54%201.52%20L8.86%201.06%20L13.47%200.7%20L17.9%201.19%20L23.0%200.6%20L26.93%200.6%20L32.07%201.26%20L35.37%201.58%20L40.89%201.22%20L45.57%200.67%20L48.8%201.08%20L52.15%200.71%20L55.93%200.53%20L60.24%200.98%20L65.46%201.07%20L70.2%201.05%20L74.99%201.0%20L78.86%201.6%20L84.45%201.42%20L89.34%200.85%20L93.1%200.82%20L96.46%201.34%20L98.57%200.0%20L98.45%204.13%20L99.5%209.36%20L98.5%2013.06%20L98.42%2017.39%20L99.42%2021.55%20L98.64%2026.26%20L99.4%2030.1%20L98.44%2034.1%20L99.37%2039.12%20L99.39%2042.91%20L98.62%2046.26%20L98.88%2049.88%20L99.29%2054.16%20L99.36%2059.11%20L99.37%2063.86%20L99.27%2068.07%20L98.43%2071.92%20L99.17%2077.04%20L99.27%2082.37%20L98.56%2086.51%20L99.39%2091.25%20L99.27%2096.83%20L100.0%2098.65%20L96.01%2099.17%20L92.63%2099.4%20L88.04%2099.23%20L83.39%2099.09%20L79.11%2098.44%20L74.74%2098.87%20L69.46%2099.3%20L65.89%2098.5%20L60.73%2099.23%20L57.08%2098.69%20L51.62%2099.28%20L46.14%2098.53%20L41.49%2099.04%20L38.04%2099.46%20L32.53%2099.24%20L27.64%2099.22%20L22.46%2098.84%20L18.56%2099.31%20L13.63%2099.42%20L9.88%2098.88%20L4.64%2098.82%20L0.76%2098.49%20L0.52%20100.0%20L0.99%2096.15%20L0.69%2092.81%20L1.13%2088.72%20L0.9%2085.21%20L1.58%2079.87%20L1.26%2075.09%20L0.65%2070.49%20L0.52%2067.21%20L1.27%2061.82%20L0.52%2056.31%20L1.03%2051.58%20L0.85%2046.63%20L0.58%2041.03%20L1.31%2036.52%20L1.31%2031.16%20L1.37%2026.27%20L0.89%2020.88%20L1.49%2016.03%20L0.96%2010.74%20L1.45%205.64%20L1.19%201.07%20Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0.0%201.0%20L4.54%201.52%20L8.86%201.06%20L13.47%200.7%20L17.9%201.19%20L23.0%200.6%20L26.93%200.6%20L32.07%201.26%20L35.37%201.58%20L40.89%201.22%20L45.57%200.67%20L48.8%201.08%20L52.15%200.71%20L55.93%200.53%20L60.24%200.98%20L65.46%201.07%20L70.2%201.05%20L74.99%201.0%20L78.86%201.6%20L84.45%201.42%20L89.34%200.85%20L93.1%200.82%20L96.46%201.34%20L98.57%200.0%20L98.45%204.13%20L99.5%209.36%20L98.5%2013.06%20L98.42%2017.39%20L99.42%2021.55%20L98.64%2026.26%20L99.4%2030.1%20L98.44%2034.1%20L99.37%2039.12%20L99.39%2042.91%20L98.62%2046.26%20L98.88%2049.88%20L99.29%2054.16%20L99.36%2059.11%20L99.37%2063.86%20L99.27%2068.07%20L98.43%2071.92%20L99.17%2077.04%20L99.27%2082.37%20L98.56%2086.51%20L99.39%2091.25%20L99.27%2096.83%20L100.0%2098.65%20L96.01%2099.17%20L92.63%2099.4%20L88.04%2099.23%20L83.39%2099.09%20L79.11%2098.44%20L74.74%2098.87%20L69.46%2099.3%20L65.89%2098.5%20L60.73%2099.23%20L57.08%2098.69%20L51.62%2099.28%20L46.14%2098.53%20L41.49%2099.04%20L38.04%2099.46%20L32.53%2099.24%20L27.64%2099.22%20L22.46%2098.84%20L18.56%2099.31%20L13.63%2099.42%20L9.88%2098.88%20L4.64%2098.82%20L0.76%2098.49%20L0.52%20100.0%20L0.99%2096.15%20L0.69%2092.81%20L1.13%2088.72%20L0.9%2085.21%20L1.58%2079.87%20L1.26%2075.09%20L0.65%2070.49%20L0.52%2067.21%20L1.27%2061.82%20L0.52%2056.31%20L1.03%2051.58%20L0.85%2046.63%20L0.58%2041.03%20L1.31%2036.52%20L1.31%2031.16%20L1.37%2026.27%20L0.89%2020.88%20L1.49%2016.03%20L0.96%2010.74%20L1.45%205.64%20L1.19%201.07%20Z' fill='%23000'/%3E%3C/svg%3E");
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}
/* 这个块是 display 布局的：不加这一条，[hidden] 压不住它 */
.page-sheet[hidden] { display: none; }
/* 纸纤维 */
.page-sheet::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.34;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
/* 手抄本的淡框线：只有一道，压得很轻 */
.page-sheet::after {
  content: '';
  position: absolute;
  inset: 17px;
  /* 手抄本常见的双线框：外侧一道深、里面一道浅 */
  border: 3px double rgba(146, 104, 48, 0.24);
  box-shadow: inset 0 0 0 5px rgba(255, 248, 226, 0.18);
  pointer-events: none;
}
.page-text {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 100%;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2.1;
  letter-spacing: 0.1em;
  text-align: center;
  color: #000;
}
.page-source {
  position: absolute;
  z-index: 1;
  right: 34px;
  bottom: 26px;
  margin: 0;
  text-align: right;
  font-family: var(--serif);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: #3a2a16;
}
@media (max-width: 520px) {
  .page-sheet {
    width: 95%;
    min-height: 326px;
    padding: 50px 24px 70px;
    margin: 6px auto 14px;
  }
  .page-text { font-size: 15px; line-height: 2.05; letter-spacing: 0.06em; }
  .page-source { right: 24px; bottom: 22px; }
}
.detail-art.is-tall {
  width: 152px;
  height: 190px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  animation: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.detail-panel h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: 0.1em; }
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 10px;
  margin: 0 auto 10px;
  font-size: 12px;
  color: var(--ink-faint);
}
.detail-meta span { white-space: nowrap; }
.detail-meta i { font-style: normal; opacity: 0.45; align-self: center; }
.detail-price {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-size: 16px;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: #e2a548;
}
.detail-price.is-priceless { color: var(--ink-dim); font-weight: 500; }
.detail-note { max-width: 26em; margin: 0 auto 10px; color: var(--ink-dim); }
/* 星座：一块夜空 + 一段解释。
   夜空在浅色主题里也是暗的 —— 它本来就是一扇窗，不该被纸染色 */
.star-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 10px;
  margin: 0 auto 12px;
  font-size: 12px;
  color: var(--ink-faint);
}
.star-meta span { white-space: nowrap; }
.star-meta i { font-style: normal; opacity: 0.45; align-self: center; }
.star-art {
  margin: 0 auto 16px;
  max-width: 420px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(122, 152, 194, 0.3);
  background: #0b1624;
  box-shadow: 0 14px 32px rgba(6, 14, 26, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.star-art svg { display: block; width: 100%; height: auto; }
.star-desc {
  max-width: 27em;
  margin: 0 auto 10px;
  font-size: 12.5px;
  line-height: 2;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
}
.star-tip {
  max-width: 27em;
  margin: 0 auto 6px;
  font-size: 11px;
  line-height: 1.9;
  color: var(--ink-faint);
}
body.dialog-light .panel .star-desc { color: #45543f; }
body.dialog-light .panel .star-tip { color: #78856f; }
body.dialog-light .panel .star-meta { color: #8a9080; }

/* 材料、杂物这类「摆不上架子」的东西，在这儿说一句，别让人以为是坏了 */
.detail-tag {
  margin: -2px auto 8px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
body.dialog-light .detail-art { border-color: rgba(60, 50, 30, 0.16); background: #fff; }
body.dialog-light .detail-art.is-tall { border: 0; background: none; }
body.dialog-light .detail-art.is-page { border: 0; background: none; }
body.dialog-light .detail-price { color: #b0741a; }
body.dialog-light .detail-price.is-priceless { color: #62666f; }
body.dialog-light .detail-note { color: #4a4d58; }
body.dialog-light .detail-tag { color: #7f8c7a; }

/* 捞起来的那张画：也是竖的 */
.catch-art.is-tall,
.catch-panel.loot-open .catch-art.is-tall {
  width: 106px;
  height: 134px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  animation: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.48);
}

/* 中国古画是卷轴：比一般的画窄、也更长。
   120:250 的画心，塞进 4:5 的框里会两边留空，所以单独给尺寸 */
.detail-art.is-tall.is-scroll {
  width: 104px;
  height: 218px;
}
.catch-art.is-tall.is-scroll,
.catch-panel.loot-open .catch-art.is-tall.is-scroll {
  width: 88px;
  height: 184px;
}
.shelf-thumb.is-tall.is-scroll {
  width: 36px;
  height: 72px;
}


/* 垃圾堆：一件一件摊出来，点哪件才拆哪件 */
.trash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin: 8px 0 14px;
}
.trash-grid .list-empty { grid-column: 1 / -1; }
.trash-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}
.trash-card:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.075); }
.trash-card { position: relative; }
.trash-card-art { position: relative; width: 46px; height: 46px; }
/* 同名的堆在一格里，右下角记个数 */
.trash-n {
  position: absolute;
  right: -6px;
  bottom: -5px;
  direction: ltr;
  unicode-bidi: isolate;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(240, 176, 112, 0.9);
  color: #3a2c1c;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 17px;
  text-align: center;
  letter-spacing: 0;
}
.trash-card-art svg { display: block; width: 100%; height: 100%; }
.trash-card i {
  font-style: normal;
  font-size: 11.5px;
  line-height: 1.3;
  color: #e8e2d6;
  text-align: center;
}

/* 单件：大图、一句批话、大概能拆出什么，拆完就地摊开得到的材料 */
.trash-art {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 10px auto 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}
/* 图单独包一层：拆开那一下只让这张图缩、涨、碎掉，
   角上那个「还剩几件」的角标留在外面，跟着数字减，不跟着碎 */
.trash-art-main { width: 100%; height: 100%; }
.trash-art-main svg { display: block; width: 100%; height: 100%; }
.trash-detail-n {
  position: absolute;
  right: -9px;
  top: -9px;
  direction: ltr;
  unicode-bidi: isolate;
  min-width: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(240, 176, 112, 0.95);
  color: #3a2c1c;
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  letter-spacing: 0;
  box-shadow: 0 1px 3px rgba(80, 50, 10, 0.18);
}
.trash-detail-n[hidden] { display: none; }
.trash-note {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-dim);
  text-align: center;
}
.trash-gives {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 10px;
}
/* hidden 要能压住 display:flex —— 拆完之后这行就该让位给结果 */
.trash-gives[hidden], .trash-yield[hidden] { display: none; }
.trash-gives-l {
  margin-right: 2px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.mat-pill, .yield-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 10.5px;
  color: var(--ink-dim);
  white-space: nowrap;
}
.mat-pill .mat-dot, .yield-pill .mat-dot { width: 9px; height: 9px; border-radius: 2.5px; }
.trash-yield {
  margin-bottom: 4px;
  padding-top: 13px;
  border-top: 1px dashed rgba(255, 255, 255, 0.13);
}

/* 拆开的那一下：先一缩一涨，再碎掉。碎片在 .trash-art 里飞 */
@keyframes trashBreak {
  0% { transform: scale(1) rotate(0); opacity: 1; }
  26% { transform: scale(1.07) rotate(-1.4deg); opacity: 1; }
  100% { transform: scale(0.84) rotate(1.6deg); opacity: 0; }
}
.trash-art.breaking .trash-art-main { animation: trashBreak 0.5s cubic-bezier(0.3, 0.7, 0.4, 1) forwards; }
@keyframes trashShardFly {
  0% { transform: translate(-50%, -50%) rotate(0) scale(1); opacity: 0.95; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(0.6); opacity: 0; }
}
.trash-shard {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 2px;
  pointer-events: none;
  animation: trashShardFly 0.72s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
/* 拆完：材料就摊在原来那张图的位置上，框子跟着内容变大 */
.trash-art.is-yield {
  width: auto;
  max-width: 100%;
  height: auto;
  min-height: 86px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  border-color: rgba(232, 163, 60, 0.42);
  background: rgba(232, 163, 60, 0.07);
}
.trash-art.is-yield .trash-art-main { width: auto; height: auto; display: flex; }
/* 「获得：」和后面那几份材料排成一行 —— 一行字读完就知道拆出了什么 */
.trash-yield-in-art { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.yield-cap {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #141009;
  white-space: nowrap;
}
.yield-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; max-width: 100%; }
/* 材料一颗一颗落下来 */
@keyframes yieldIn {
  0% { transform: translateY(7px) scale(0.86); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.yield-pill { animation: yieldIn 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
/* 结果里那几份材料比上面「大概能拆出」那行大一号，黑字，看得清 */
.trash-art.is-yield .yield-pill {
  gap: 7px;
  padding: 5px 11px;
  border-color: rgba(90, 70, 40, 0.22);
  background: rgba(255, 255, 255, 0.58);
  font-size: 13.5px;
  color: #1b1509;
}
.trash-art.is-yield .yield-pill .mat-dot { width: 13px; height: 13px; border-radius: 3.5px; }
.trash-art.is-yield .yield-pill b { font-size: 13.5px; color: #0d0a05; }
body.dialog-dark .yield-cap { color: #f6efdf; }
body.dialog-dark .trash-art.is-yield .yield-pill {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #f2ebdb;
}
body.dialog-dark .trash-art.is-yield .yield-pill b { color: #fff; }
.trash-yield-title {
  margin: 0 0 9px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #e8a33c;
  text-align: center;
}
.trash-yield-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.yield-pill b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
body.dialog-light .trash-card { border-color: #e6e7ef; background: #f8f8fc; }
body.dialog-light .trash-card:hover { background: #f1f3fa; }
body.dialog-light .trash-card i { color: #2e2a22; }
body.dialog-light .trash-art { border-color: #e6e7ef; background: #f8f8fc; }
body.dialog-light .trash-art.is-yield {
  border-color: rgba(196, 146, 62, 0.45);
  background: rgba(214, 158, 76, 0.09);
}
body.dialog-light .trash-note { color: #4c4f5a; }
body.dialog-light .mat-pill, body.dialog-light .yield-pill { border-color: #e6e7ef; background: #f8f8fc; color: #4c4f5a; }
body.dialog-light .yield-pill b { color: #23242b; }
body.dialog-light .trash-yield { border-top-color: #e2e4ee; }

/* 材料格：垃圾拆开之后的那几样 */
.mat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 2px 0 0;
}
.mat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 3px 6px;
  border-radius: 10px;
  border: 1px solid var(--hair, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.03);
}
.mat-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.mat-name {
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.mat-n {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.mat-cell.zero .mat-n { color: var(--ink-faint); font-weight: 400; }
@media (max-width: 520px) {
  .mat-grid { gap: 4px; }
  .mat-cell { padding: 6px 2px 5px; }
  .mat-name { font-size: 9px; letter-spacing: 0; }
}
body.dialog-light .mat-cell { border-color: #e6e7ef; background: #f8f8fc; }
body.dialog-light .mat-name { color: #5f636f; }
body.dialog-light .mat-n { color: #23242b; }
body.dialog-light .mat-cell.zero .mat-n { color: #9aa0ac; }

/* 设置里通向样式页的那颗按钮 */
.style-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 11px;
  text-decoration: none;
  font-size: 12.5px;
  letter-spacing: 0.1em;
}

/* 阿语 RTL：面板内文字右起（flex 布局浏览器会自动镜像，这里兜底关键几处） */
[dir='rtl'] .panel .panel-foot { flex-direction: row-reverse; }
[dir='rtl'] .dock { flex-direction: row-reverse; }
[dir='rtl'] .topbar { flex-direction: row-reverse; }
[dir='rtl'] .sea-talk { text-align: center; }


/* ---------------- 测试模式 ----------------
   带 data-test 的东西默认都不在：重置捞取次数、天色与天气的快捷按钮、
   岛的样式、海上美术馆。把这几个字按顺序点一遍才会露出来。
   用 !important 是为了压过各元素自己的 display（flex / grid / block）。 */
body:not(.test-on) [data-test] {
  display: none !important;
}

/* 写瓶面板里那句「写不出来？借一句」 */
/* 瓶子种类：塑料 / 玻璃 */
.kind-seg { margin: 2px 0 8px; }
.kind-seg button { flex: 1 1 0; }
.kind-note {
  margin: 0 0 12px;
  line-height: 1.75;
}

.compose-idea {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 2px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  opacity: 0.85;
}
.borrow {
  padding: 0;
  border: 0;
  border-bottom: 1px dashed currentColor;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.borrow:hover { color: var(--ink); border-bottom-style: solid; }

/* ---------------- 木屋：日历板 ---------------- */

.hut-view[hidden] { display: none; }

/* 木屋顶上那一行：谁在这儿 + 登录 / 我的岛 */
.hut-me {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 10px;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(110, 132, 100, 0.32);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.3);
}
body:not(.dialog-light) .hut-me { background: rgba(255, 255, 255, 0.05); }

/* 木屋底部那一行：身份牌在最左下角，两个按钮靠右 */
.hut-foot {
  justify-content: space-between;
  align-items: center;
}
.hut-foot .hut-me { margin: 0; }
.hut-foot-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}
.hut-me-who {
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 板子本身：贴在墙上的一张纸 —— 底色比面板深一档，
   字一律纯黑、不透明。日历是拿来扫一眼的，灰字在小格子里等于没有。 */
.cal-board {
  --cal-line: rgba(20, 30, 22, 0.24);
  --cal-cell: rgba(255, 255, 255, 0.55);
  --cal-throw: #e2bb89;
  --cal-pick: #9cc6ba;
  padding: 14px 14px 10px;
  border: 1px solid var(--cal-line);
  border-radius: 14px;
  background: #c5d2b1;
  color: #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-head b {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #000;
}
.cal-nav {
  width: 28px;
  height: 28px;
  border: 1px solid var(--cal-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.4);
  color: #000;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.cal-nav:hover { background: rgba(255, 255, 255, 0.75); }
.cal-nav:disabled { opacity: 0.35; cursor: default; }

.cal-week,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-week {
  margin-bottom: 4px;
}
.cal-week i {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-align: center;
  color: #000;
}

.cal-cell {
  position: relative;
  height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--cal-cell);
  color: #000;
  font-family: var(--sans);
  font-size: 12px;
  cursor: default;
  transition: background 0.18s, box-shadow 0.18s;
}
.cal-cell.is-empty { background: none; }
/* 扔过的刷暖沙、捞过的刷一层海水；两样都有就斜着分开一半 */
.cal-cell.is-throw-log { background: var(--cal-throw); }
.cal-cell.is-pick-log { background: var(--cal-pick); }
.cal-cell.is-throw-log.is-pick-log {
  background: linear-gradient(135deg, var(--cal-throw) 0 50%, var(--cal-pick) 50% 100%);
}
.cal-cell.has-log { cursor: pointer; }
.cal-cell.has-log:hover { box-shadow: inset 0 0 0 1px rgba(20, 30, 22, 0.45); }
.cal-cell.is-on { box-shadow: inset 0 0 0 2px rgba(20, 30, 22, 0.6); }
.cal-cell.is-today .cal-num::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: #000;
}
.cal-num { position: relative; line-height: 1; }
.cal-dots {
  display: flex;
  gap: 3px;
  height: 4px;
}
.cal-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
}
.cal-dot.is-throw { background: #a86a34; }
.cal-dot.is-pick { background: #3d7a72; }

.cal-legend {
  display: flex;
  gap: 14px;
  margin-top: 9px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: #000;
}
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }

.cal-day { margin-top: 14px; }
/* 那天的瓶子最多占这么高，再多就在里面滚 —— 别把「休息下」挤出面板 */
#calDayList {
  max-height: 170px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.cal-day-h {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: inherit;
}
.cal-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--cal-note, currentColor);
  opacity: 1;
}

/* 那天的一个瓶子：左边一条时间线，右边摘要 */
.cal-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 6px;
  padding: 9px 11px;
  border: 1px solid rgba(20, 30, 22, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  color: #000;
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s;
}
/* 还在海上漂的那几行：字照样黑，只是框换成虚线，别用半透明去「灰掉」 */
.cal-row.is-locked {
  cursor: default;
  background: rgba(255, 255, 255, 0.26);
  border-style: dashed;
  color: #000;
}
.cal-row:not(.is-locked):hover { background: rgba(255, 255, 255, 0.78); }
.cal-row time {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: #000;
}
.cal-row p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #000;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cal-row em {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: #000;
  white-space: nowrap;
}
.cal-row em.is-new { font-weight: 600; }
.cal-row em.is-archive { color: #8a5a12; }

/* ---------------- 一个瓶子的历史对话 ---------------- */
.thread { margin-top: 4px; }
.thread-mine {
  padding: 14px 16px;
  border: 1px solid var(--cal-line, rgba(24, 36, 26, 0.14));
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.42);
}
body:not(.dialog-light) .thread-mine { background: rgba(255, 255, 255, 0.05); }
.thread-who {
  display: block;
  margin-bottom: 7px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  opacity: 0.5;
}
.thread-text {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.95;
  white-space: pre-wrap;
}
.thread-split {
  position: relative;
  margin: 16px 0 12px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  opacity: 0.45;
}
/* 100 封满了：这只瓶子已经存档，3 天后算沉海 */
.thread-full {
  margin: 0 0 14px;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid rgba(196, 146, 62, 0.38);
  background: rgba(214, 158, 76, 0.1);
  color: #6b4a16;
  font-size: 12px;
  line-height: 1.8;
}
body:not(.dialog-light) .thread-full {
  color: #f0d9a8;
  border-color: rgba(240, 200, 120, 0.3);
  background: rgba(240, 200, 120, 0.08);
}
.thread-reply {
  margin-bottom: 9px;
  padding: 12px 14px;
  border-radius: 12px 12px 12px 4px;
  background: rgba(120, 150, 108, 0.16);
}
body:not(.dialog-light) .thread-reply { background: rgba(140, 190, 170, 0.12); }
.thread-reply-h {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  opacity: 0.55;
}
.thread-reply p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.9;
  white-space: pre-wrap;
}

/* ---------------- 休息：黑幕 ---------------- */
#doze {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #05070d;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease;
}
#doze.on { opacity: 1; pointer-events: auto; }
.doze-word {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-family: var(--disp);
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.28em;
  padding: 0 12%;
  color: rgba(226, 236, 226, 0.62);
}

/* 组装页里「组装一个 / 拿出来摆」两颗按钮并排 */
.build-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* 爆开的那一团光：一个径向渐变的圆，迅速涨开又散掉 */
.spark-flash {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 244, 214, 0.95) 0%,
    rgba(255, 200, 130, 0.55) 32%,
    rgba(255, 160, 90, 0.18) 55%,
    rgba(255, 140, 70, 0) 72%
  );
  pointer-events: none;
}

/* 空瓶子堆：面板里那一小排示例瓶子 */
.pile-art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 86px;
  margin: 6px 0 14px;
  padding-bottom: 4px;
  border-radius: 14px;
  background: radial-gradient(120% 100% at 50% 100%, rgba(120, 150, 130, 0.16), rgba(255, 255, 255, 0));
}
.pile-art svg { width: 56px; height: 66px; }
body.dialog-light .panel .pile-art { background: radial-gradient(120% 100% at 50% 100%, rgba(190, 205, 175, 0.35), rgba(255, 255, 255, 0)); }

/* 瓶子种类：每个选项前面站一只小瓶子 */
.kind-seg button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
}
.kind-ico {
  width: 15px;
  height: 20px;
  flex: 0 0 auto;
}

/* 写不出来时的那条话题：一句由头，不是替他写好的信 */
.compose-topic {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(240, 176, 112, 0.38);
  background: rgba(240, 176, 112, 0.08);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-dim);
}
.compose-topic .topic-tag {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(240, 176, 112, 0.2);
  color: #e9b176;
  font-size: 10px;
  letter-spacing: 0.12em;
}
body.dialog-light .panel .compose-topic {
  border-color: rgba(190, 130, 66, 0.45);
  background: rgba(224, 168, 96, 0.14);
  color: #4a4e42;
}
body.dialog-light .panel .compose-topic .topic-tag {
  background: rgba(190, 130, 66, 0.22);
  color: #8a5620;
}

/* 稀有度小标签：常见/少见/稀有/罕见各一层浅底。
   浅色面板上用深字，暗底上换成浅字，底色都用低透明度，不抢鱼的颜色 */
.rarity {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  font-style: normal;
  --rc: 150 190 150;
  background: rgb(var(--rc) / 0.3);
  color: #2f5b3a;
}
.rarity.r2 { --rc: 118 168 210; color: #1f4a6b; }
.rarity.r3 { --rc: 206 164 92; color: #6b4713; }
.rarity.r4 { --rc: 190 122 172; color: #6a2450; }

body:not(.dialog-light) .panel .rarity { background: rgb(var(--rc) / 0.22); color: #e8f0e6; }
body:not(.dialog-light) .panel .rarity.r2 { color: #d3e6f3; }
body:not(.dialog-light) .panel .rarity.r3 { color: #f2e0c0; }
body:not(.dialog-light) .panel .rarity.r4 { color: #f0d6e8; }

/* 鱼卡片的介绍页 */
.fish-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 118px;
  margin: 4px 0 10px;
  border-radius: 14px;
  background: radial-gradient(120% 100% at 50% 40%, rgba(150, 190, 200, 0.14), rgba(255, 255, 255, 0));
}
.fish-hero svg { width: 250px; height: 100px; }
body.dialog-light .panel .fish-hero { background: radial-gradient(120% 100% at 50% 40%, rgba(150, 190, 200, 0.22), rgba(255, 255, 255, 0)); }

.fish-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
  font-size: 11.5px;
  color: var(--ink-dim);
}
.fish-fact {
  padding: 1px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  letter-spacing: 0.06em;
}
body.dialog-light .panel .fish-fact { background: rgba(120, 140, 110, 0.14); color: #4a4e42; }

/* 瓶子上的「翻译」：小小一颗，贴在正文右上角，不抢信的字 */
.pick-tools {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0 0;
}
.trans-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(60, 50, 30, 0.18);
  background: rgba(255, 255, 255, 0.5);
  color: #6b6252;
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.trans-btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.trans-btn:hover { background: rgba(240, 176, 112, 0.18); border-color: rgba(200, 140, 70, 0.5); color: #8a5a1e; }
.trans-btn.is-on { background: rgba(240, 176, 112, 0.26); border-color: rgba(200, 140, 70, 0.55); color: #7a4d16; }
.trans-btn:disabled { opacity: 0.6; cursor: default; }
body:not(.dialog-light) .panel .trans-btn {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-dim);
}
body:not(.dialog-light) .panel .trans-btn:hover { color: #ffd9a8; border-color: rgba(240, 176, 112, 0.5); }
.pick-text.is-translated { color: #2f4a5a; }

/* 垃圾堆里「破烂」和「材料」之间的分隔：一条细线 + 一个小标题 */
.pile-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 8px;
  color: var(--ink-faint);
  font-size: 10.5px;
  letter-spacing: 0.18em;
}
.pile-sep::before,
.pile-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}
body.dialog-light .panel .pile-sep::before,
body.dialog-light .panel .pile-sep::after { background: rgba(70, 66, 50, 0.18); }
/* 材料那一块给一层淡淡的底，和上面的垃圾分开 */
.mat-grid {
  padding: 6px 5px 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
body.dialog-light .panel .mat-grid { background: rgba(120, 130, 100, 0.09); }

/* 空状态里那句「试玩存档只在本机」：别抢主文案，读得到就行 */
.guest-tip { margin-top: 8px; opacity: 0.72; line-height: 1.65; }
body.dialog-light .panel .guest-tip { color: #6e7280; }

/* 晒鱼架的处理条挪到了鱼卡上面：和下面的鱼隔开一点 */
#rackPick { margin-bottom: 10px; }


/* ---- Cloudflare 版：没有第三方登录，邮箱登录代替；旧的登录/离岛入口藏起来 ---- */
#doSignOut, #pLogin { display: none !important; }
