/* 色值取自主色板 v3.1（art/styles/pi-elf-pixel/palette.json）；面板、按钮用 tools/ui_kit_sample.py 画的 9 宫格 */
:root {
  --ink: #171424; --cream: #f8f0e3; --wall: #fceccd; --cream-d: #e2dbc3; --khaki: #c8b587;
  --mint: #5fc49a; --mint-d: #579178; --mint-l: #add0af; --peach: #f0b68e; --peach-l: #fad898;
  --honey: #d5915e; --coral: #e86b5e; --yellow: #efbf3f; --gray: #a6ada2; --gray-d: #56585b;
  --white: #f6fbf9; --sky: #7fb5da; --wood: #a86647;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream-d); color: var(--ink); }
/* 像 App 不像网页（2026-11-16）：不能双指、双击缩放；长按不弹菜单、不选字；点按没有灰色闪块；拉到头不回弹。输入框照常能选字 */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
input, textarea, select, [contenteditable] { -webkit-user-select: text; user-select: text; }
body { font: 15px/1.55 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
img.px, canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
#app { max-width: 540px; margin: 0 auto; min-height: 100vh; background: var(--wall); padding: 8px 10px 24px; }

.px-panel { border: 8px solid transparent; border-image: url(assets/ui/panel.png) 4 fill / 8px stretch; }
.btn { border: 8px solid transparent; border-image: url(assets/ui/btn-mint.png) 4 fill / 8px stretch; background: none;
  padding: 0 6px; min-height: 36px; cursor: pointer; font-weight: 600; line-height: 1.3; }
.btn.peach { border-image-source: url(assets/ui/btn-peach.png); }
.btn:disabled, .btn.gray { border-image-source: url(assets/ui/btn-gray.png); color: var(--gray-d); cursor: default; }
.btn:not(:disabled):active { transform: translateY(2px); }
.btn.small { min-height: 28px; font-size: 13px; padding: 0 2px; }
.link { background: none; border: 0; padding: 0; color: var(--mint-d); text-decoration: underline; cursor: pointer; }

/* HUD */
#hud { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
#hud .who { font-weight: 700; white-space: nowrap; }
#hud .who small { font-weight: 400; color: var(--gray-d); margin-left: 4px; }
.bar { flex: 1; height: 14px; border: 2px solid var(--ink); background: var(--cream-d); position: relative; min-width: 60px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--mint); border-right: 2px solid var(--mint-d); }
.bar i.full { background: var(--yellow); border-right-color: var(--honey); }
.bar span { position: absolute; inset: -2px 0 0 0; text-align: center; font-size: 11px; line-height: 14px; font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; white-space: nowrap; }
.chip img { width: 16px; height: 16px; }
.iconbtn { background: none; border: 0; padding: 2px; cursor: pointer; }
.iconbtn img { width: 32px; height: 32px; }

/* 舞台 */
#stage { position: relative; display: flex; justify-content: center; }
#room { display: block; border: 3px solid var(--ink); cursor: pointer; }
#banner { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; pointer-events: none; }
#banner > * { pointer-events: auto; }
#banner .px-panel { display: flex; align-items: center; gap: 8px; padding: 0 4px; font-size: 14px; }
#toast { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: max-content; max-width: 90%;
  font-size: 14px; padding: 0 4px; text-align: center; transition: opacity .3s; }
#toast.fade { opacity: 0; }

/* 标签页 */
#tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 10px 0 8px; }
#tabs button { border: 0; background: var(--cream-d); border-bottom: 3px solid var(--khaki); padding: 6px 0 4px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; }
#tabs button img { width: 32px; height: 32px; }
#tabs button.on { background: var(--cream); border-bottom-color: var(--mint-d); font-weight: 700; }
#panel { min-height: 260px; }
h3 { margin: 6px 0 6px; font-size: 16px; }
.hint { color: var(--gray-d); font-size: 13px; margin: 2px 0 8px; }
#legal { color: var(--gray-d); font-size: 11px; text-align: center; margin-top: 18px; }

/* 目标 */
.goal { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 2px dashed var(--cream-d); }
.goal .tick { width: 26px; height: 26px; border: 3px solid var(--ink); background: var(--white); cursor: pointer; flex: none; padding: 0; }
.goal.done .tick { background: var(--mint); }
.goal.done .tick::after { content: ""; display: block; width: 8px; height: 12px; margin: 1px auto 0;
  border: solid var(--ink); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.goal .txt { flex: 1; }
.goal.done .txt { color: var(--gray-d); text-decoration: line-through; }
.goal img.px { width: 24px; height: auto; }
.goal .gain { font-size: 12px; color: var(--mint-d); white-space: nowrap; }
/* v0.11 今日之星 */
.goal .gstar { background: none; border: 0; padding: 0 2px; font-size: 20px; line-height: 1; color: var(--gray); cursor: pointer; flex: none; }
.goal .gstar.on { color: #e0a72c; text-shadow: 1px 1px 0 var(--ink); }
.goal.starred:not(.done) { background: rgba(239, 191, 63, 0.16); }
.goal .del { background: none; border: 0; color: var(--gray); font-size: 18px; cursor: pointer; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row input[type=text], .row select, textarea { border: 3px solid var(--ink); background: var(--white); padding: 4px 6px; min-height: 36px; }
.row input[type=text] { flex: 1; min-width: 120px; }
.row select { max-width: 100%; min-width: 0; }   /* v0.8：选项很长（性格说明）时不撑出屏幕 */
textarea { width: 100%; resize: vertical; min-height: 64px; }

/* 心情 */
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 8px; }
.mood { border: 3px solid var(--ink); background: var(--white); padding: 6px 0; cursor: pointer; font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mood i { width: 22px; height: 22px; border: 3px solid var(--ink); }
.mood.on { background: var(--peach-l); }
.log { list-style: none; padding: 0; margin: 8px 0; }
.log li { padding: 6px 0; border-bottom: 2px dashed var(--cream-d); display: flex; gap: 8px; align-items: flex-start; }
.log li i { flex: none; width: 14px; height: 14px; border: 2px solid var(--ink); margin-top: 4px; }
.log li small { color: var(--gray-d); display: block; }
.log li > div { flex: 1; min-width: 0; }
.log li > .btn { flex: none; white-space: nowrap; }

/* 商店、行囊 */
.sub { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }   /* v0.8：英文标签放不下时换一行，不撑出屏幕 */
.sub button { flex: 1; }
.keeper { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.keeper .btn { flex: none; white-space: nowrap; }
.keeper .px-panel { flex: 1; padding: 0 2px; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.card { background: var(--cream); border: 3px solid var(--ink); padding: 8px 6px 6px; display: flex; flex-direction: column;
  align-items: center; gap: 4px; text-align: center; position: relative; }
.card .pic { height: 72px; display: flex; align-items: center; justify-content: center; }
.card .name { font-size: 13px; font-weight: 600; }
.card .price { font-size: 12px; display: inline-flex; gap: 2px; align-items: center; }
.card .price img { width: 16px; height: 16px; }
.card.on { background: var(--peach-l); }
.card.pick { cursor: pointer; }
.card .tag { position: absolute; top: 4px; right: 4px; font-size: 10px; background: var(--sky); border: 2px solid var(--ink); padding: 0 3px; }
.card .btn { width: 100%; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.slots .card { min-height: 0; }
.post { cursor: pointer; }

/* 弹窗 */
#modal { position: fixed; inset: 0; background: rgba(23, 20, 36, .55); display: flex; align-items: center; justify-content: center; padding: 12px; z-index: 10; }
#modal[hidden] { display: none; }
.sheet { width: 100%; max-width: 500px; max-height: 92vh; overflow: auto; padding: 4px 6px; }
.sheet h2 { margin: 2px 0 8px; font-size: 18px; }
.sheet .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.sheet .actions .btn { min-width: 110px; }
.scene { display: flex; justify-content: center; margin: 6px 0; }
.scene canvas { border: 3px solid var(--ink); }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choices.two { grid-template-columns: repeat(2, 1fr); }
.opt { border: 3px solid var(--ink); background: var(--white); cursor: pointer; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.opt.on { background: var(--mint-l); }
.form p { margin: 8px 0 4px; font-weight: 600; }
.checks label { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.checks input { width: 18px; height: 18px; accent-color: var(--mint-d); }
.dev { border-top: 2px dashed var(--khaki); margin-top: 12px; padding-top: 6px; }
.dev .row .btn { flex: 1 1 auto; white-space: nowrap; }   /* v0.8：英文按钮字长，按字的宽度排，不折行 */

/* v0.2 练习、安心盒 */
.center { text-align: center; }
.aidbar { width: 100%; display: flex; align-items: center; gap: 10px; background: none; cursor: pointer; text-align: left; padding: 0 4px; margin: 2px 0 10px; }
.aidbar img { width: 32px; height: 32px; }
.aidbar small, .aidlist small { display: block; color: var(--gray-d); font-size: 12px; font-weight: 400; }
.prac { display: flex; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 2px dashed var(--cream-d); }
.prac > div { flex: 1; }
.prac small { color: var(--gray-d); margin-left: 6px; font-size: 12px; }
.prac .hint { margin: 2px 0 0; }
.prac .btn { flex: none; min-width: 84px; }
.badge { font-size: 11px; background: var(--mint-l); border: 2px solid var(--ink); padding: 0 4px; margin-left: 6px; white-space: nowrap; }
.h2icon { width: 32px; height: 32px; vertical-align: -8px; margin-right: 4px; }
/* 呼吸圈用平滑矢量（方案 v0.2 动效表：像素低帧率会让呼吸一顿一顿），中间的 ELF 仍是整数倍像素；
   平时是 breath-fx.js 画的光晕水波，.ring 只在「减少动态效果」时出现（不动） */
.breath { position: relative; width: 220px; height: 220px; margin: 6px auto 0; display: flex; align-items: center; justify-content: center; }
.breath .ring { position: absolute; inset: 0; border-radius: 50%; background: var(--mint-l); border: 4px solid var(--mint-d);
  transform: scale(.55); transition: transform 1s ease-in-out, background-color .6s; }
.breath .ring.out { background: var(--peach-l); border-color: var(--honey); }
.breath.still .ring { transform: scale(.8) !important; }
.breath canvas { position: relative; width: 144px; height: 144px; }
.breath canvas.fx { position: absolute; inset: 0; width: 100%; height: 100%; }   /* 光晕水波（breath-fx.js） */
.phase { text-align: center; font-size: 22px; font-weight: 700; margin: 4px 0 0; min-height: 34px; }
.dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 8px; }
.dots i { width: 14px; height: 14px; border: 2px solid var(--ink); background: var(--cream-d); }
.dots i.on { background: var(--mint); }
.big { text-align: center; font-size: 44px; font-weight: 800; margin: 0; line-height: 1.1; color: var(--mint-d); }
.prompt { font-size: 17px; font-weight: 600; margin-bottom: 0; }
.comfort { font-size: 18px; font-weight: 600; text-align: center; padding: 18px 6px; }
.aidlist { display: grid; gap: 6px; }
.sheet .actions.stack { flex-direction: column; align-items: stretch; }
.aidlist button { border: 3px solid var(--ink); background: var(--white); padding: 8px 10px; text-align: left; cursor: pointer; }
.aidlist button:active { background: var(--mint-l); }

/* 心情一周 */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0 0 10px; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--gray-d); }
.week i { width: 100%; max-width: 44px; height: 22px; border: 3px solid var(--ink); background: var(--cream-d); }
.week i.empty { border-style: dashed; border-color: var(--gray); background: var(--cream); }
.week .today small { font-weight: 700; color: var(--ink); }

/* 暂停目标 */
.rest { padding: 0 6px; margin: 4px 0 8px; }
.rest p { margin: 4px 0; }

/* ---------- v0.3 ---------- */
.ic16 { width: 16px; height: 16px; vertical-align: -3px; }
.ic32 { width: 32px; height: 32px; }
.ic48 { width: 48px; height: 48px; }
.ic64 { width: 64px; height: 64px; }
.dot { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--ink); margin-right: 4px; vertical-align: -1px; flex: none; }
h4 { margin: 12px 0 4px; font-size: 14px; }
h4.slot { margin: 10px 0 0; font-size: 13px; color: var(--gray-d); font-weight: 700; }
.h3row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.h3row h3 { margin: 0; }
.row.end { justify-content: flex-end; margin-top: 6px; }
.badge { display: inline-block; }
.sub .badge { margin-left: 4px; }
#hud .who { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }

/* 每日任务 */
.quests { padding: 0 6px; margin-bottom: 10px; }
.qhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.quest { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; }
.quest .qt { flex: 1; }
.quest .qn { color: var(--gray-d); font-size: 12px; font-variant-numeric: tabular-nums; }
.quest .btn { min-width: 64px; }
.quest .btn img { width: 16px; height: 16px; vertical-align: -3px; }
.quest .qok { font-size: 12px; color: var(--mint-d); font-weight: 700; min-width: 64px; text-align: center; }
.quest.claimed .qt { color: var(--gray-d); text-decoration: line-through; }
.quests .hint { margin: 2px 0 4px; }

/* 目标 */
.goal .txt { flex: 1; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; min-width: 0; }
.goal span.txt { cursor: default; }
.goal .txt small { display: flex; align-items: center; flex-wrap: wrap; color: var(--gray-d); font-size: 12px; text-decoration: none; }
.goal.done .txt small { text-decoration: none; }
.goal .skip { background: none; border: 0; color: var(--gray-d); font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0 2px; }
.goal.skipped .txt { color: var(--gray-d); }
.goal.skipped .tick { background: var(--cream-d); border-color: var(--gray); }
.later { margin: 8px 0 0; }
.later summary { cursor: pointer; color: var(--gray-d); font-size: 13px; font-weight: 700; padding: 4px 0; }
.later .goal { opacity: .8; }
.areas { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0; font-size: 13px; }
.areas .area { display: inline-flex; align-items: center; }
.areas .area b { margin-left: 4px; }
.foot { margin-top: 16px; }
.week.mini i { height: 16px; max-width: 34px; }
.week i.done { background: var(--mint); }
.week i.skip { background: var(--yellow); }
.week i.off { border-style: dashed; border-color: var(--gray); background: var(--cream); }

/* 表单小件 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbtn { border: 2px solid var(--ink); background: var(--white); padding: 3px 8px; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; }
.chipbtn.on { background: var(--mint-l); font-weight: 700; }
.chipbtn.soft { border-style: dashed; background: var(--cream); }
.seg { display: flex; border: 3px solid var(--ink); background: var(--white); }
.seg button { flex: 1; border: 0; border-left: 2px solid var(--cream-d); background: none; padding: 6px 0; cursor: pointer; font-size: 13px; }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--mint-l); font-weight: 700; }
.seg.days { margin-top: 6px; }
.seg.col5 button { font-size: 12px; }
.aidlist button.on { background: var(--mint-l); }
.aidlist.two { grid-template-columns: 1fr 1fr; }
.picks { display: grid; gap: 6px; }
.pick { display: flex; align-items: center; gap: 4px; border: 3px solid var(--ink); background: var(--cream); padding: 6px 8px; text-align: left; cursor: pointer; opacity: .6; }
.pick small { display: block; color: var(--gray-d); font-size: 12px; }
.pick.on { background: var(--white); opacity: 1; box-shadow: inset 4px 0 0 var(--mint); }

/* 成就 */
.ach { padding: 6px 0; border-bottom: 2px dashed var(--cream-d); }
.ach-h { display: flex; justify-content: space-between; align-items: baseline; }
.ach-h small { color: var(--gray-d); }
.bar.thin { height: 10px; margin: 4px 0; }
.tiers { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.tiers span { font-size: 11px; border: 2px solid var(--gray); color: var(--gray-d); padding: 0 4px; }
.tiers span.on { border-color: var(--ink); background: var(--yellow); color: var(--ink); font-weight: 700; }
.tiers .btn { margin-left: auto; }

/* 商店、行囊 */
.card.locked { opacity: .7; }
.card .tag.deal { background: var(--coral); color: var(--white); }
.price s { color: var(--gray-d); margin-right: 3px; }
.soon { margin-top: 10px; }
.chestbox { display: flex; justify-content: center; align-items: center; min-height: 96px; margin: 6px 0; }
.chestbox.shake img { animation: shake .3s steps(2) infinite; }
@keyframes shake { 0% { transform: translateX(-2px) rotate(-4deg); } 100% { transform: translateX(2px) rotate(4deg); } }
.thumb { flex: none; display: inline-block; line-height: 0; border: 3px solid var(--ink); background: var(--cream-d); }
.thumb canvas { display: block; }
.nb { padding: 8px 0; border-bottom: 2px dashed var(--cream-d); }
.nb.locked { color: var(--gray-d); display: flex; align-items: center; gap: 6px; }
.nb.locked small { margin-left: 4px; }
.nb-h { display: flex; gap: 10px; align-items: flex-start; }
.nb-h small, .dest small { display: block; color: var(--gray-d); font-size: 12px; }
.nb-h .badge { margin-left: 6px; }
.finds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px; }
.find { border: 2px solid var(--ink); background: var(--white); padding: 2px 4px; font-size: 12px; text-align: center; font-weight: 600; }
.find small { display: block; font-weight: 400; font-size: 11px; color: var(--gray-d); }
.find.like { background: var(--mint-l); }
.find.dislike { background: var(--cream-d); }
.find.none { border-style: dashed; border-color: var(--gray); color: var(--gray); background: var(--cream); }

/* 远足站、明信片 */
.dest { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 2px dashed var(--cream-d); }
.dest > div:last-child { flex: 1; min-width: 0; }
.dest .badge { margin-left: 6px; }
.dest .btn { margin-top: 4px; min-width: 84px; }
.dest.rec .thumb { border-color: var(--honey); }
.dest.locked { color: var(--gray-d); align-items: center; gap: 6px; padding: 6px 0; }
.dest.locked small { display: inline; margin-left: 4px; }
.find-line { display: flex; gap: 6px; align-items: baseline; }
.tag.like, .tag.meh { flex: none; font-size: 11px; border: 2px solid var(--ink); padding: 0 4px; }
.tag.like { background: var(--mint-l); }
.tag.meh { background: var(--cream-d); }
.gains { list-style: none; padding: 6px 8px; margin: 8px 0 0; background: var(--cream); border: 2px dashed var(--khaki); }
.gains li { padding: 2px 0; }
.gains img { width: 16px; height: 16px; vertical-align: -3px; }

/* 精灵档案 */
.prof { display: flex; gap: 12px; align-items: center; }
.prof h2 { margin: 0; }
.prof p { margin: 2px 0; }
.stages { list-style: none; padding: 0; margin: 6px 0; }
.stages li { padding: 3px 0 3px 10px; border-left: 4px solid var(--cream-d); margin-bottom: 2px; }
.stages li small { display: block; color: var(--gray-d); font-size: 12px; }
.stages li.past { border-left-color: var(--mint-d); }
.stages li.now { border-left-color: var(--yellow); background: var(--cream); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stats div { border: 2px solid var(--ink); background: var(--white); text-align: center; padding: 4px 0; }
.stats b { display: block; font-size: 18px; }
.stats small { color: var(--gray-d); font-size: 12px; }
.center > canvas { display: block; margin: 0 auto; }

/* ---------- v0.6 旅伴、门 ---------- */
canvas { image-rendering: pixelated; }
/* v0.22 美术 v2.0：明信片、缩略图按 1/3 显示（3 倍屏上 1 像素 = 1 个物理像素）；别的屏缩小时平滑缩，不跳格 */
canvas.fine { image-rendering: auto; }
[data-friend] canvas, [data-npc] canvas, [data-door] canvas, .fhead canvas { display: block; }
.fhead { display: inline-block; flex: none; line-height: 0; }
.ftag { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: var(--mint-d); font-weight: 700; font-size: 12px; vertical-align: middle; }
.fcard { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin-bottom: 10px; }
.fcard > div { flex: 1; }
.fcard small, .fline small { display: block; color: var(--gray-d); font-size: 12px; font-weight: 400; }
.fline { display: flex; align-items: center; gap: 10px; border: 2px dashed var(--khaki); padding: 4px 8px; margin: 6px 0; }
.fline > div { flex: 1; }
.card .pic[data-friend] { height: 72px; display: flex; align-items: center; justify-content: center; }
.card small { color: var(--gray-d); font-size: 12px; }
.card .bar.thin { width: 100%; flex: none; }
.dexgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.dex { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px solid var(--ink); background: var(--white); padding: 4px 2px; font-size: 11px; }
.dex.no { background: var(--cream); border-style: dashed; color: var(--gray-d); }
.party { padding: 6px 8px; margin: 6px 0 10px; }
.party > small { display: block; color: var(--gray-d); font-size: 12px; margin-bottom: 4px; }
.mate { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 3px solid var(--ink); background: var(--cream); padding: 2px 4px; cursor: pointer; opacity: .6; font: inherit; }
.mate.on { background: var(--white); opacity: 1; box-shadow: inset 0 -4px 0 var(--mint); }
.mate small { font-size: 11px; }
.pair { display: flex; justify-content: center; align-items: flex-end; gap: 6px; margin: 6px 0; }
.pair canvas { display: block; }
.opt [data-door] { display: flex; justify-content: center; margin-bottom: 4px; }
.trip { display: flex; gap: 8px; align-items: center; color: var(--ink); }
.trip span { flex: none; }

/* ---------- v0.4 信箱 ---------- */
#hud .mailbtn { position: relative; }
#hud .mailbtn .badge { position: absolute; top: -2px; right: 0; margin: 0; background: var(--peach); }
.npc { display: inline-block; vertical-align: -6px; margin-right: 6px; }
.npc canvas { display: inline-block; }
.capsule { display: flex; align-items: center; gap: 8px; padding: 0 4px; margin: 6px 0 4px; }
.capsule > div { flex: 1; }
.capsule small { display: block; color: var(--gray-d); font-size: 12px; }
.post.unread > div { font-weight: 700; }
.letter p { line-height: 1.6; }
.lhead { display: flex; align-items: center; gap: 4px; border-bottom: 3px double var(--ink); padding-bottom: 6px; margin-bottom: 8px; }
.lhead b { font-size: 18px; display: block; }
.lhead small { color: var(--gray-d); font-size: 12px; }
.letter .stats { margin: 6px 0; }
.letter h4, .mcard h4 { margin: 12px 0 4px; }
.plain { padding-left: 18px; margin: 4px 0; }
.plain li { margin: 3px 0; }
.distbar { display: flex; height: 18px; border: 3px solid var(--ink); margin: 6px 0 2px; }
.distbar i { display: block; height: 100%; }
.distbar i + i { border-left: 2px solid var(--ink); }
.chip.soft { font-weight: 400; border: 2px dashed var(--khaki); padding: 0 6px; margin: 2px 4px 2px 0; font-size: 13px; }
.lclose { font-style: italic; border-top: 2px dashed var(--cream-d); padding-top: 8px; }
/* v0.31 旅伴来信：附言小一号；旅伴卡上的来信列表 */
.letter .lps { color: var(--gray-d); font-size: 14px; }
.lhead [data-friend] { flex: none; margin-right: 4px; }
.fr-letters { margin: 8px 0; padding: 8px 10px; background: var(--white); border: 3px solid var(--ink); border-radius: 10px; }
.fr-letters > b { display: block; margin-bottom: 2px; }
.fr-letters > small { color: var(--gray-d); font-size: 13px; }
.fr-letters .log { margin: 4px 0 0; max-height: 168px; overflow-y: auto; }
blockquote { margin: 6px 0; padding: 8px 12px; background: var(--white); border-left: 4px solid var(--peach); white-space: pre-wrap; }
.mcard { padding: 0 6px; min-height: 220px; }
.mcard h3 { margin: 4px 0 8px; }
.mcard ol { padding-left: 22px; }
.bar span { white-space: nowrap; overflow: hidden; }
@media (max-width: 420px) { #hud { gap: 6px; } #hud .who small { display: none; } }

/* ---------- v0.4 心情 ---------- */
.week > button { display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 12px; color: var(--gray-d); background: none; border: 0; padding: 0; cursor: pointer; }
.week > button i { width: 100%; max-width: 44px; height: 22px; border: 3px solid var(--ink); background: var(--cream-d); display: block; }
.week > button i.empty { border-style: dashed; border-color: var(--gray); background: var(--cream); }
.week > button.today small { font-weight: 700; color: var(--ink); }
.picker { border: 2px dashed var(--khaki); padding: 2px 8px 8px; margin-bottom: 8px; }
.picker h4 small, h4 small { font-weight: 400; color: var(--gray-d); font-size: 12px; margin-left: 6px; }
.trend { display: flex; align-items: flex-end; gap: 2px; height: 64px; border-bottom: 3px solid var(--ink); padding: 0 2px; }
.trend i { flex: 1; display: block; border: 2px solid var(--ink); border-bottom: 0; min-height: 4px; }
.trend i.empty { border: 0; border-top: 2px dashed var(--gray); height: 4px; }
.trend-x { display: flex; justify-content: space-between; color: var(--gray-d); margin-bottom: 4px; }

/* ---------- v0.4 内容库 ---------- */
.chips.cats { margin: 4px 0 6px; }
.cats .chipbtn small { margin-left: 4px; color: var(--gray-d); font-size: 11px; font-weight: 400; }
.affcard { border: 3px solid var(--ink); background: var(--white); padding: 6px 10px 4px; margin: 0 0 10px; }
.affcard small { color: var(--gray-d); font-size: 12px; }
.affcard p { font-size: 17px; font-weight: 700; margin: 2px 0 4px; }
.affcard .row { gap: 14px; font-size: 13px; }
.afflist { list-style: none; padding: 0; margin: 0; max-height: 52vh; overflow: auto; }
.afflist li { display: flex; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 2px dashed var(--cream-d); }
.afflist span { flex: 1; }
.heart { border: 0; background: none; font-size: 19px; line-height: 1; cursor: pointer; color: var(--gray); padding: 0 4px; }
.heart.on { color: var(--coral); }
.muted { color: var(--gray-d); font-weight: 400; font-size: 12px; margin-left: 6px; }
.sheet .seg { margin: 8px 0; }
.sheet .vol { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 13px; }
.sheet .vol input { flex: 1; accent-color: var(--mint-d); }
canvas.mid { width: 96px; height: 96px; }
.movebox { display: flex; gap: 10px; align-items: center; margin: 6px 0; min-height: 96px; }
.movebox canvas.mini { width: 96px; height: 96px; flex: none; }
.movebox p { margin: 2px 0 0; }
.center.step { font-size: 16px; min-height: 3em; }
.phase.sm { font-size: 15px; font-weight: 600; min-height: 0; }
textarea.tall { min-height: 140px; }
textarea.toss { animation: toss .75s ease-in forwards; pointer-events: none; }
@keyframes toss { 40% { transform: scale(.7) rotate(-6deg); border-radius: 40%; } 100% { transform: translateY(160px) scale(.05) rotate(50deg); opacity: 0; } }
.sheet .row + .row { margin-top: 6px; }
.num { width: 20px; text-align: center; }
.bodymap { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 6px 0; }
.bodymap canvas { width: 160px; height: 224px; cursor: pointer; flex: none; }
.chips.col { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
.aidlist.gap { margin-top: 6px; }
.safety { border: 3px solid var(--coral); background: var(--white); padding: 8px 10px; margin-bottom: 10px; }
.safety p { margin: 0 0 8px; }
.card .mini { display: flex; gap: 2px; justify-content: center; min-height: 18px; margin: 2px 0 4px; }
.card.add { justify-content: center; border-style: dashed; background: none; min-height: 120px; }
.card.outfit .btn + .btn { margin-top: 4px; }
.sub .btn { white-space: nowrap; padding-left: 2px; padding-right: 2px; min-width: max-content; }

/* ---------- v0.5 引导课程 ---------- */
.bdg { display: inline-block; line-height: 0; flex: none; }
h2 .bdg { vertical-align: -6px; margin-right: 6px; }
.prac.course > .bdg { align-self: flex-start; margin-top: 4px; }
.prac.course .bar.thin { margin: 4px 0 0; }
.prac.course small.muted { margin-left: 0; }
.badge.active { background: var(--peach-l); }
.badge.paused { background: var(--cream-d); }
.badge.done { background: var(--mint-l); }
.ctoday { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-bottom: 10px; }
.ctoday > div { flex: 1; min-width: 0; }
.ctoday small { display: block; color: var(--gray-d); font-size: 12px; }
.ctoday .del { background: none; border: 0; color: var(--gray); font-size: 18px; cursor: pointer; padding: 0 2px; }
.tree { list-style: none; padding: 0; margin: 8px 0; position: relative; }
.tree li { display: flex; align-items: center; gap: 10px; padding: 5px 0; position: relative; }
.tree li > div { flex: 1; }
.tree li small { display: block; color: var(--gray-d); font-size: 12px; }
.tree li > i { width: 16px; height: 16px; border: 3px solid var(--ink); background: var(--cream-d); flex: none; position: relative; z-index: 1; }
.tree li:not(:last-child)::before { content: ''; position: absolute; left: 7px; top: 24px; bottom: -8px; width: 2px; background: var(--ink); }
.tree li.done > i { background: var(--mint); }
.tree li.now > i { background: var(--peach); }
.tree li.now b { color: var(--ink); }
.tree li.lock { color: var(--gray-d); }
.tree li.lock:not(:last-child)::before { background: repeating-linear-gradient(var(--gray) 0 3px, transparent 3px 6px); }
.talk { display: flex; align-items: flex-end; gap: 8px; margin: 8px 0; }
.talk > canvas, .talk > span { flex: none; }
.talk .say { flex: 1; margin: 0; background: var(--white); border: 3px solid var(--ink); padding: 8px 10px; font-size: 16px; position: relative; }
.talk .say::before { content: ''; position: absolute; left: -9px; bottom: 12px; border: 6px solid transparent; border-right: 6px solid var(--ink); }
.lesson h3 { margin: 4px 0; }
.moodpick button { display: flex; align-items: center; gap: 6px; }
.moodpick .dot { width: 14px; height: 14px; }
.cgoal { display: flex; align-items: center; gap: 8px; border: 3px solid var(--ink); background: var(--white); padding: 6px 8px; margin: 8px 0 2px; }
.cgoal > div { flex: 1; min-width: 0; }
.cgoal small { display: block; color: var(--gray-d); font-size: 12px; }
.cgoal .qok { font-size: 12px; color: var(--mint-d); font-weight: 700; white-space: nowrap; }
.cmp { list-style: none; padding: 0; margin: 4px 0; }
.cmp li { border-bottom: 2px dashed var(--cream-d); padding: 4px 0; }
.cmp small { display: block; color: var(--gray-d); font-size: 12px; }
.grad { padding: 6px 0; }
.grad canvas { animation: pop .6s ease-out; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.grad.still canvas { animation: none; }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.badges .dex b { font-size: 12px; }
.aidlist.tools { margin-bottom: 4px; }

/* ---------- v0.7 元气花园 ---------- */
.garden-row { display: flex; align-items: center; gap: 6px; width: 100%; margin: 0 0 8px; padding: 6px 8px; cursor: pointer; text-align: left; font: inherit; }
.garden-row b { white-space: nowrap; }
.garden-row small { flex: 1; color: var(--gray-d); }
.garden-row.hot { background: var(--mint-l); }
img.shadow { filter: brightness(0) opacity(0.25); }
#gd-seeds .chip { border: 2px solid var(--ink); background: var(--white); padding: 0 4px; margin: 2px; font-size: 12px; }
.badges .dex img { image-rendering: pixelated; }

/* ---------- v0.7 试衣间、帽子铺 ---------- */
.card .pic[data-act] { cursor: zoom-in; position: relative; }
.card .pic .try { position: absolute; right: 0; bottom: 0; font-size: 10px; background: var(--white); border: 2px solid var(--ink); padding: 0 3px; line-height: 1.3; }
.card.locked .pic .try { opacity: 1; }
.scene.fit canvas { display: block; margin: 0 auto; }
.card .tag + .pic { margin-top: 6px; }
#gd-dex { grid-template-columns: repeat(5, 1fr); }
/* v0.8 试玩：每天一句话、设置里收起来的调试区 */
.tfb { padding: 2px 6px; margin: 10px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.tfb small { display: block; }
.dev summary { cursor: pointer; padding: 4px 0; }
/* v0.8 英文竖屏：心情 5 档的字小一号，「Really struggling」不把格子撑宽 */
html[lang=en] .mood { font-size: 12px; line-height: 1.25; }

/* ---------- v0.9 固定框架（A「Finch 式」，2026-11-17）----------
   顶栏、底栏钉住，只有 #scroller 自己滚，拉到头不回弹；小窝铺满宽（main.js 按设备像素取整），往上滑时 sticky 收成下沿一条 */
html, body { height: 100%; overflow: hidden; }
#app { position: fixed; top: 0; bottom: 0; left: 0; right: 0; width: 100%; max-width: 540px; min-height: 0; margin: 0 auto; padding: 0;
  display: flex; flex-direction: column; overflow: hidden; }
#hud { flex: none; min-height: 48px; margin: 0; padding: calc(6px + env(safe-area-inset-top)) 8px 6px; gap: 8px;
  background: var(--cream); border-bottom: 3px solid var(--ink); position: relative; z-index: 3; }
#scroller { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: none; -webkit-overflow-scrolling: touch; position: relative; }
#stage { position: sticky; top: var(--fold, 0px); z-index: 2; background: var(--ink); padding: 3px 0; overflow: hidden; }
#room { border: 0; }
#room, .tryon-stage canvas { flex-shrink: 0; }   /* 画布比外框宽时别被压扁 */
#app[data-room=off] #stage { display: none; }
#panel { min-height: 0; padding: 10px 10px 28px; }
#legal { display: none; }   /* 挪进设置 →「关于」（settings.js 读它的内容），上架版照样替换这一行 */
#toast { position: absolute; top: calc(60px + env(safe-area-inset-top)); z-index: 6; }

/* 底栏 */
#tabs { flex: none; margin: 0; gap: 0; padding: 0 0 env(safe-area-inset-bottom); background: var(--cream); border-top: 3px solid var(--ink); position: relative; z-index: 3; }
#tabs button { background: none; border: 0; border-top: 4px solid transparent; margin-top: -3px; padding: 4px 0 6px; color: var(--gray-d); font-size: 12px; }
#tabs button.on { background: var(--wall); border-top-color: var(--mint-d); color: var(--ink); }
#tabs button img { width: 32px; height: 32px; }
#tabs button:not(.on) img { opacity: .75; }

/* 顶栏：左上「≡」菜单 */
.menubtn { position: relative; flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.burger { display: flex; flex-direction: column; gap: 4px; }
.burger b { display: block; width: 20px; height: 3px; background: var(--ink); }
.menubtn .pip { position: absolute; top: 3px; right: 1px; width: 10px; height: 10px; background: var(--coral); border: 2px solid var(--ink); }
#hud .bar { height: 18px; }
#hud .bar span { line-height: 18px; }
.menu { display: flex; flex-direction: column; gap: 6px; }
.mrow { display: flex; align-items: center; gap: 10px; width: 100%; border: 3px solid var(--ink); background: var(--white); padding: 6px 8px; text-align: left; cursor: pointer; }
.mrow > div { flex: 1; min-width: 0; }
.mrow b { display: block; font-size: 15px; }
.mrow small { display: block; color: var(--gray-d); font-size: 12px; font-weight: 400; }
.mrow.me { background: var(--cream); margin-bottom: 4px; }
.mrow.me canvas { display: block; }
.mrow .badge { background: var(--peach); margin: 0; }
.mrow:active { background: var(--mint-l); }
.mfoot { margin-top: 6px; }

/* 弹窗四种：page 二级页（整屏、左上返回）/ drawer 小抽屉（从底下升起）/ center 奖励时刻 / menu 左上菜单 */
#modal .pagebar { display: none; }
#modal[data-kind=page] { padding: 0; background: var(--cream-d); flex-direction: column; align-items: stretch; justify-content: flex-start; }
#modal[data-kind=page] .pagebar, #modal[data-kind=page] .sheet { width: 100%; max-width: 540px; margin: 0 auto; }
#modal[data-kind=page] .pagebar { display: flex; align-items: center; gap: 4px; flex: none; min-height: 48px;
  padding: calc(6px + env(safe-area-inset-top)) 8px 6px; background: var(--cream); border-bottom: 3px solid var(--ink); }
.pagebar b { flex: 1; min-width: 0; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pagebar b .h2icon { width: 24px; height: 24px; vertical-align: -5px; }
.pagebar b .bdg canvas { max-height: 28px; width: auto; vertical-align: -6px; }
.pagebar .back { flex: none; width: 36px; height: 36px; border: 0; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pagebar .back i { display: block; width: 12px; height: 12px; border: solid var(--ink); border-width: 0 0 4px 4px; transform: rotate(45deg); margin-left: 6px; }
.pagebar .back:active { background: var(--cream-d); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#modal[data-kind=page] .sheet { flex: 1; max-height: none; border: 0; border-image: none; background: var(--wall);
  padding: 10px 12px calc(24px + env(safe-area-inset-bottom)); overscroll-behavior: none; }
#modal[data-kind=drawer] { align-items: flex-end; padding: 0; }
#modal[data-kind=drawer] .sheet { max-width: 540px; max-height: 86%; padding-bottom: calc(6px + env(safe-area-inset-bottom)); overscroll-behavior: none; }
#modal[data-kind=drawer] .sheet::before { content: ''; display: block; width: 44px; height: 4px; background: var(--khaki); margin: 0 auto 6px; }
#modal[data-kind=menu] { justify-content: flex-start; align-items: stretch; padding: 0 0 0 max(0px, calc(50vw - 270px)); }
#modal[data-kind=menu] .sheet { width: 82%; max-width: 320px; max-height: none; padding-top: calc(8px + env(safe-area-inset-top)); overflow: auto; }
#modal[data-kind=center] .sheet { max-height: 88%; }
@keyframes pageIn { from { transform: translateX(100%); } }
@keyframes upIn { from { transform: translateY(100%); } }
@keyframes leftIn { from { transform: translateX(-100%); } }
@keyframes popIn { from { transform: scale(.86); opacity: 0; } }
#modal.in[data-kind=page] .pagebar, #modal.in[data-kind=page] .sheet { animation: pageIn .2s ease-out; }
#modal.in[data-kind=drawer] .sheet { animation: upIn .2s ease-out; }
#modal.in[data-kind=menu] .sheet { animation: leftIn .18s ease-out; }
#modal.in[data-kind=center] .sheet { animation: popIn .22s ease-out; }
@media (prefers-reduced-motion: reduce) { #modal.in .sheet, #modal.in .pagebar { animation: none; } }

/* 今日任务收成一行 */
.quests { padding: 0 6px; }
.quests summary { list-style: none; cursor: pointer; justify-content: flex-start; gap: 6px; padding: 4px 0; margin: 0; }
.quests summary::-webkit-details-marker { display: none; }
.quests summary::after { content: ''; width: 8px; height: 8px; border: solid var(--ink); border-width: 0 3px 3px 0; transform: rotate(45deg); margin: -4px 4px 0 auto; flex: none; }
.quests[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.quests summary small { color: var(--gray-d); font-size: 12px; }
.pips { display: inline-flex; gap: 3px; margin-left: 2px; }
.pips i { width: 10px; height: 10px; border: 2px solid var(--ink); background: var(--cream-d); }
.pips i.on { background: var(--mint); }
.pips i.can { background: var(--yellow); }
.quests .hint .link { margin-left: 6px; font-size: 13px; }

/* 商店、行囊页顶的试衣台 */
.tryon { position: sticky; top: 0; z-index: 2; margin: 0 -10px 8px; background: var(--ink); padding-top: 3px; }
.tryon-stage { display: flex; justify-content: center; overflow: hidden; }   /* 画布两边补墙和地板，多出来不到一格的裁掉 */
.tryon-stage canvas { display: block; }
.tryon-cap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--cream); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  padding: 4px 10px; font-size: 13px; min-height: 42px; }
.tryon-cap > span { flex: 1; min-width: 0; }
.tryon-cap .btn { min-height: 28px; font-size: 13px; padding: 0 2px; white-space: nowrap; }
#panel > .tryon-cap { margin: 0 -10px 8px; }
.card.trying { background: var(--mint-l); box-shadow: 0 0 0 3px var(--mint-d); }

/* 设置 → 关于 */
.about-h { margin-top: 14px; }
.legal { margin-top: 0; }
.legal a { color: var(--mint-d); }   /* 上架版这行带「隐私与声明」链接 */

/* ---------- v0.10 骨架「更像 Finch」（2026-11-17）----------
   底栏 6 个（小窝 · 任务 · 商店 · 朋友 · 行囊 · 精灵头像加名字）；心情、练习是整屏推进来的页（盖住顶栏、底栏）；
   小窝下面常驻「照顾自己」一行；商店先选三家店；家具铺成套摆设；朋友页精灵镇；精灵页 */
#tabs { grid-template-columns: repeat(6, 1fr); }
#tabs button { position: relative; min-width: 0; }
#tabs .mepic { display: block; width: 32px; height: 32px; }
#tabs .mepic canvas { display: block; width: 32px; height: 32px; image-rendering: pixelated; }
#tabs button:not(.on) .mepic { opacity: .8; }
#tabs .mename { display: block; max-width: 100%; padding: 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbadge { position: absolute; top: 2px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 3px; background: var(--coral); color: var(--white);
  border: 2px solid var(--ink); font-size: 11px; font-weight: 700; line-height: 14px; text-align: center; }
.tbadge.dot { min-width: 0; width: 12px; height: 12px; padding: 0; left: calc(50% + 10px); }

/* 整屏推进来的页（心情、练习）：顶上返回键 + 标题，盖住顶栏和底栏 */
#pushbar[hidden] { display: none; }
#pushbar { display: flex; align-items: center; gap: 4px; flex: none; min-height: 48px; padding: calc(6px + env(safe-area-inset-top)) 8px 6px;
  background: var(--cream); border-bottom: 3px solid var(--ink); position: relative; z-index: 3; }
#app[data-page] #hud, #app[data-page] #tabs { display: none; }
#panel.pushin { animation: pageIn .2s ease-out; }
@media (prefers-reduced-motion: reduce) { #panel.pushin { animation: none; } }

/* 小窝下面「照顾自己」一行 */
.care { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 10px; }
.carebtn { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; border: 3px solid var(--ink); background: var(--cream);
  padding: 6px 2px 4px; cursor: pointer; font: inherit; color: var(--ink); }
.carebtn img { width: 32px; height: 32px; }
.carebtn b { font-size: 14px; }
.carebtn small { max-width: 100%; color: var(--gray-d); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carebtn:active { background: var(--mint-l); }
.moodi { width: 26px; height: 26px; margin: 3px 0; border: 3px solid var(--ink); }
.moodi.empty { background: var(--white); border-style: dashed; }

/* 任务页 */
.qsec { padding: 4px 8px 2px; margin-bottom: 6px; }
.qsec .h3row { justify-content: flex-start; }
.qsec .qcount { margin-left: auto; color: var(--gray-d); font-size: 12px; }
.qh { margin-top: 14px; }
.mile { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 2px dashed var(--cream-d); font-size: 14px; }
.mile b { flex: 1; min-width: 0; font-weight: 600; }
.mpips { display: inline-flex; gap: 3px; }
.mpips i { width: 22px; height: 20px; border: 2px solid var(--gray); color: var(--gray-d); font-size: 11px; font-style: normal; line-height: 16px; text-align: center; }
.mpips i.on { border-color: var(--ink); background: var(--yellow); color: var(--ink); font-weight: 700; }
.mile small { min-width: 34px; text-align: right; color: var(--gray-d); font-size: 12px; }

/* 商店：三家店的店门 */
.door { display: block; width: 100%; padding: 0; margin: 0 0 10px; border: 3px solid var(--ink); background: var(--cream); text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.door .awning { display: block; height: 14px; border-bottom: 3px solid var(--ink); background: repeating-linear-gradient(90deg, var(--peach) 0 14px, var(--white) 14px 28px); }
.door-hat .awning { background: repeating-linear-gradient(90deg, var(--mint-l) 0 14px, var(--white) 14px 28px); }
.door-furniture .awning { background: repeating-linear-gradient(90deg, var(--honey) 0 14px, var(--peach-l) 14px 28px); }
.dbody { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.dpic { flex: none; min-width: 64px; height: 66px; display: flex; align-items: center; justify-content: center; }
.dtext { flex: 1; min-width: 0; }
.dtext b { display: block; font-size: 16px; }
.dtext small { display: block; color: var(--gray-d); font-size: 12px; }
.dtext small.today { color: var(--mint-d); font-weight: 700; margin-top: 2px; }
.door .go { flex: none; width: 10px; height: 10px; border: solid var(--ink); border-width: 0 4px 4px 0; transform: rotate(-45deg); margin-right: 4px; }
.door:active { background: var(--mint-l); }
.shopnav { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.shopnav b { flex: 1; min-width: 0; text-align: center; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shopnav .btn { flex: none; white-space: nowrap; padding: 0 4px; }
i.lt, i.rt { display: inline-block; width: 8px; height: 8px; border: solid var(--ink); border-width: 0 0 3px 3px; transform: rotate(45deg); margin: 0 3px 1px 5px; }
i.rt { transform: rotate(-135deg); margin: 0 5px 1px 3px; }

/* 家具铺：成套摆设 */
.setcard { padding: 6px 8px 8px; margin: 0 0 10px; }
.seth { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.seth b { font-size: 16px; }
.seth small { color: var(--gray-d); font-size: 12px; white-space: nowrap; }
.setview { position: relative; margin: 6px 0 4px; }
.setpic { display: flex; justify-content: center; }
.setpic canvas { display: block; border: 3px solid var(--ink); }
.arrow { width: 30px; height: 44px; border: 3px solid var(--ink); background: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.arrow:disabled { opacity: .35; cursor: default; }
.setview .arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; }
.setview .arrow:first-child { left: 0; }
.setview .arrow:last-child { right: 0; }
.setact { display: flex; flex-wrap: wrap; gap: 6px; }
.setact .btn { flex: 1 1 auto; white-space: nowrap; }   /* 英文「Not enough stardust」放不下时，买的按钮换到第二行 */
.setact .btn img { width: 16px; height: 16px; vertical-align: -3px; }

/* 朋友页：精灵镇 */
.townhead { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; }
.townhead h3 { margin: 0; }
.townhead small { flex: 1; min-width: 0; color: var(--gray-d); font-size: 12px; }
.townhead .btn { flex: none; white-space: nowrap; }
.town { margin: 0 -10px 6px; background: var(--ink); padding: 3px 0; }
.town-stage { display: flex; justify-content: center; overflow: hidden; }
.town-stage canvas { display: block; cursor: pointer; }
.townpage { display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--cream); padding: 4px 0; margin-top: 3px; }
.townpage .arrow { height: 30px; }
.mrow:disabled { opacity: .6; cursor: default; }
.opensoon { text-align: center; font-weight: 700; color: var(--mint-d); margin: 8px 0 4px; }

/* 精灵页 */
.tryon.flat { position: relative; margin-top: -10px; }
.tryon-cap .mename2 { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.mehead p { margin: 2px 0; }
.mecards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 4px; }
.mecard { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; border: 3px solid var(--ink); background: var(--white);
  padding: 6px 4px 4px; cursor: pointer; font: inherit; color: var(--ink); }
.mecard b { max-width: 100%; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mecard small { max-width: 100%; color: var(--gray-d); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mecard .bar.thin { width: 100%; min-width: 0; flex: none; margin: 2px 0; }
.mecard:active, .coll:active { background: var(--mint-l); }
.collect { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.coll { display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 0; border: 3px solid var(--ink); background: var(--cream); padding: 6px 2px; cursor: pointer; font: inherit; color: var(--ink); }
.coll b { font-size: 20px; }
.coll b small { font-size: 12px; color: var(--gray-d); font-weight: 400; }
.coll span { font-size: 12px; white-space: nowrap; }
.medals { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.medal { display: inline-flex; align-items: center; gap: 4px; border: 2px solid var(--ink); background: var(--peach-l); padding: 2px 6px; font-size: 12px; }
.medal small { color: var(--gray-d); }

/* v0.10 家具 21 件：墙纸（128×32）的小图按原大缩进卡片 */
.wallthumb { max-width: 100%; height: auto; }

/* v0.12 早晚两个时刻：早安条（小窝下面，不弹窗）、晚上好（一场弹窗）、「大概几点回来」 */
.ambar { position: relative; margin: 0 0 8px; padding: 6px 34px 6px 8px; }
.ambar p { margin: 0 0 6px; font-weight: 700; }
.ambar .row { gap: 8px; }
.ambar .amx { position: absolute; top: 0; right: 0; width: 32px; height: 32px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--gray-d); cursor: pointer; }
.evedone { margin: 2px 0 6px; padding-left: 20px; }
.evedone li { margin: 2px 0; }
.evedone .gstar { color: #e0a72c; margin-right: 2px; }
.everep { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.everep .chipbtn { font-size: 15px; padding: 6px 10px; }
.everep .you { margin: 0 0 0 auto; background: var(--mint-l); border: 3px solid var(--ink); padding: 4px 10px; }
.everep .talk { width: 100%; margin: 2px 0 0; }
.evewrite { margin: 4px 0 6px; }
.evewrite summary { cursor: pointer; color: var(--mint-d); text-decoration: underline; padding: 4px 0; }
.evewrite .hint { margin: 4px 0; }
.backat { white-space: nowrap; }

/* v0.12.1 花园、「看看 ta」的画面和小窝一样大（ui.js stageView）：在二级页里铺满宽，贴着标题栏 */
.scene.stagebox { display: block; margin: -10px -12px 8px; padding: 3px 0; background: var(--ink); overflow: hidden; }
.scene.stagebox canvas { display: block; border: 0; margin: 0 auto; image-rendering: pixelated; }

/* ---------- 行囊装扮：拍立得墙（v0.15，2026-11-18 用户挑了「拍立得墙」，src/ui/dress.js）----------
   软木板正中一张大拍立得是 ta 现在的样子（会动），下面钉着存好的搭配；换一件 = 咔嚓一闪、新相纸落下来慢慢显影 */
.pw { margin-bottom: 6px; }
.pw-board { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 6px 12px;
  background: #d2a873 0 0 / 144px; border: 8px solid var(--wood); box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 2px var(--ink); overflow: hidden; }
.pw-pol { position: relative; background: #fffdf8; padding: 7px 7px 0; box-shadow: 3px 4px 0 rgba(23, 20, 36, .28); color: #3a3550; }
.pw-pol .ph { line-height: 0; border: 1px solid #d8cfbd; }
.pw-pol p { margin: 0; text-align: center; font: 14px/28px "Kaiti SC", "STKaiti", "Songti SC", serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-pol .pin { position: absolute; top: -6px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--coral); border: 2px solid var(--ink); }
.pw-pol.big { transform: rotate(-2deg); margin-right: 48px; }
.pw-pol.big p { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: 18px; line-height: 38px; padding: 0 2px; }
.pw-pol.big p b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.pw-pol.big p small { font-size: 13px; color: var(--gray-d); flex: none; }
.pw-cam { position: absolute; right: 8px; top: 34px; border: 3px solid var(--ink); background: var(--peach-l); font-size: 12px; font-weight: 700; padding: 4px 4px 3px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 52px; line-height: 1.2; cursor: pointer; }
.pw-cam img { width: 28px; height: auto; }
.pw-cam:disabled { background: var(--cream-d); color: var(--gray-d); cursor: default; }
.pw-cam:disabled img { opacity: .55; }
.pw-cam:not(:disabled):active { transform: translateY(2px); }
.pw-row { display: flex; justify-content: center; gap: 8px; width: 100%; }
.pw-pol.small { width: max-content; flex: none; cursor: pointer; }
.pw-pol.small p { font-size: 13px; max-width: 80px; }
.pw-pol.small:nth-child(3n+1) { transform: rotate(-5deg); }
.pw-pol.small:nth-child(3n+2) { transform: rotate(3deg) translateY(6px); }
.pw-pol.small:nth-child(3n+2) .pin { background: var(--sky); }
.pw-pol.small:nth-child(3n) { transform: rotate(-2deg); }
.pw-pol.small:nth-child(3n) .pin { background: var(--yellow); }
.pw-pol.small.on { cursor: default; box-shadow: 0 0 0 3px var(--mint-d), 3px 4px 0 rgba(23, 20, 36, .28); }
.pw-on { position: absolute; left: 3px; top: 3px; background: var(--mint-l); border: 2px solid var(--ink); font-size: 11px; padding: 0 4px; line-height: 16px; white-space: nowrap; }
.pw-del { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink); background: var(--cream); font-size: 15px; line-height: 1; padding: 0; cursor: pointer; }
.pw-pol.empty { background: rgba(255, 253, 248, .5); box-shadow: none; border: 2px dashed var(--ink); padding: 6px 6px 0; font: inherit; }
.pw-pol.empty .ph { display: flex; width: 80px; height: 80px; align-items: center; justify-content: center; font-size: 30px; line-height: 1; border-style: dashed; color: var(--gray-d); }
.pw-hint { margin: 8px 0 4px; }
.pw-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.pw-strip::-webkit-scrollbar { display: none; }
.pw-chip { flex: none; width: 64px; height: 66px; border: 3px solid var(--ink); background: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 2px; cursor: pointer; }
.pw-chip img { max-width: 40px; max-height: 32px; width: auto; height: auto; }
.pw-chip span canvas { display: block; width: 32px; height: 32px; }
.pw-chip em { font-style: normal; font-size: 11px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-chip.on { background: var(--mint-l); box-shadow: inset 0 0 0 2px var(--mint-d); }
.pw-chip:active { transform: translateY(2px); }
/* 咔嚓：白光一闪 → 大照片从上面落下 → 相纸从发白慢慢显影 → 字最后出来 */
.pw-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.pw.snap .pw-flash { animation: pw-flash .45s ease-out; }
.pw.snap .pw-pol.big { animation: pw-drop .5s .15s ease-out both; }
.pw.snap .pw-pol.big .ph canvas { animation: pw-develop 1.6s .3s ease-in both; }
.pw.snap .pw-pol.big p { animation: pw-ink .5s 1.5s ease-out both; }
@keyframes pw-flash { 0% { opacity: .95; } 100% { opacity: 0; } }
@keyframes pw-drop { 0% { transform: translateY(-36px) rotate(4deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-2deg); } }
@keyframes pw-develop { 0% { filter: grayscale(1) brightness(1.9) contrast(.45); } 100% { filter: none; } }
@keyframes pw-ink { 0% { opacity: 0; } 100% { opacity: 1; } }

/* ---------- 朋友页（v0.14，朋友页会话；用户 11-18 选方案 B「人先于景」，不要精灵镇）：我的朋友（真人大卡片）→ 旅伴（小方卡）→ 正在熟起来 ---------- */
.fr-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; }
.fr-head h3 { flex: 1; margin: 0; font-size: 19px; }
.fr-head .btn { flex: none; white-space: nowrap; }
.fr-sec { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 6px; }
.fr-sec h3 { margin: 0; flex: none; }
.fr-sec small { min-width: 0; color: var(--gray-d); font-size: 12px; }
.fr-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fr-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 8px 4px 8px;
  border: 3px solid var(--ink); background: var(--white); box-shadow: 0 3px 0 var(--ink); text-align: center; cursor: pointer; }
.fr-card:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.fr-arch { display: flex; align-items: flex-end; justify-content: center; width: 88px; max-width: 100%; height: 88px; margin-bottom: 2px;
  border: 3px solid var(--ink); border-radius: 44px 44px 4px 4px; overflow: hidden; }
.fr-arch canvas { display: block; margin-bottom: -6px; }
.fr-card b { font-size: 15px; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-card .fr-who, .fr-owner { font-style: normal; font-size: 12px; font-weight: 700; color: var(--mint-d); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-owner { margin: 2px 0 0; font-size: 14px; }
.fr-chip { font-size: 11px; font-weight: 700; line-height: 18px; padding: 0 6px; margin: 2px 0 4px; border: 2px solid var(--ink); border-radius: 10px; background: var(--mint-l); white-space: nowrap; }
.fr-chip.away { background: var(--peach-l); }
.fr-card .btn { width: auto; padding: 0 8px; }
.fr-card.fr-add, .fr-card.fr-ghost { justify-content: center; background: transparent; border-style: dashed; box-shadow: none; color: var(--gray-d); }
.fr-card.fr-add { gap: 6px; }
.fr-card.fr-add b { font-size: 14px; color: var(--ink); white-space: normal; }
.fr-card.fr-add small { font-size: 11px; line-height: 1.35; }
.fr-plus { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 3px solid var(--ink); border-radius: 50%;
  background: var(--mint); color: var(--ink); font-size: 24px; font-weight: 900; line-height: 1; box-shadow: 0 3px 0 var(--ink); }
.fr-card.fr-ghost { border-color: var(--khaki); color: var(--khaki); font-size: 30px; font-weight: 900; cursor: default; }
.fr-pals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fr-pal { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 6px 2px 5px;
  border: 2px solid var(--ink); background: var(--cream); text-align: center; cursor: pointer; }
.fr-pal canvas { display: block; }
.fr-pal b { font-size: 13px; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-pal small { font-size: 11px; color: var(--gray-d); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-pal.on { background: var(--peach-l); }
.fr-pal:active { background: var(--mint-l); }
.fr-rib { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10px; font-weight: 800; line-height: 15px;
  padding: 0 4px; border: 2px solid var(--ink); background: var(--yellow); white-space: nowrap; }
.fr-pal.fr-more { justify-content: center; gap: 2px; min-height: 92px; background: transparent; border-style: dashed; }
.fr-pal.fr-more b { font-size: 12px; white-space: normal; }
.fr-pal.fr-more small { font-size: 13px; font-weight: 700; color: var(--ink); }
.fr-row { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 4px 8px; border: 2px solid var(--ink); background: var(--cream); cursor: pointer; }
.fr-row canvas { display: block; flex: none; }
.fr-row > div { flex: 1; min-width: 0; }
.fr-row b { font-size: 14px; }
.fr-row small { display: block; color: var(--gray-d); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-row .bar.thin { margin: 3px 0 2px; }
.fr-row .btn { flex: none; }
.fr-demo { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 8px 0 0; border-top: 2px dashed var(--khaki); }
.fr-demo small { flex: 1; color: var(--gray-d); font-size: 12px; }
.fr-demo .btn { flex: none; white-space: nowrap; }

/* ---------- 商店场景（v0.13，2026-11-18 真机反馈第 5、6、7 条；ui/shop.js、render/shop.js） ----------
   家装铺页顶平时是家居店展厅：和小窝一样大的框（ui.js stageView），钉法也和 #stage 一样，往上滑收成下沿一条 */
.showroom.stagebox { position: sticky; top: var(--fold, 0px); z-index: 2; display: flex; justify-content: center; margin: -10px -10px 0; padding: 3px 0; background: var(--ink); overflow: hidden; }
.showroom.stagebox canvas { display: block; flex-shrink: 0; image-rendering: pixelated; }
.showroom + .tryon-cap > span { min-width: 8em; }   /* 推荐台上是哪件：窄屏（英文 360）宁可按钮换一行，也别把名字挤成三行 */

/* ---------- v0.16「照 Finch」：首页 + 任务页 + 奖励弹窗（2026-11-18 用户定 A 版面 + E 字，docs/UI改版/游戏化/游戏化小样_v0.1.md §9.2）----------
   照用户录的 Finch 首页、任务页拆的做法：画往下铺成整页底色、没有顶栏（菜单、星砂、信箱是浮着的圆钮），元气是画下面一张半透明卡，
   白色大圆角卡片不描边、底下一道浅台阶，圆头粗体字，打勾钮在右边，按钮是「圆角 + 底下一道深一档的台阶」，底栏和页面同色。
   字：西文 Nunito、中文寒蝉圆黑体（都是 SIL OFL 1.1，子集在 fonts/，协议文本和字放在一起；tools/subset_fonts.py 重做子集）。
   这一轮只在小窝、任务两页（#app[data-look]，ui.js renderPanel 加）和屏幕中间的奖励弹窗（#modal[data-look]）试，其他页和二级页等用户看过再铺 */
@font-face { font-family: 'ElfChillRound'; font-weight: 500; src: url(fonts/chill-round-medium.woff2) format('woff2'); font-display: block; }
@font-face { font-family: 'ElfChillRound'; font-weight: 700; src: url(fonts/chill-round-bold.woff2) format('woff2'); font-display: block; }
@font-face { font-family: 'ElfChillRound'; font-weight: 900; src: url(fonts/chill-round-heavy.woff2) format('woff2'); font-display: block; }
@font-face { font-family: 'ElfNunito'; font-weight: 200 1000; src: url(fonts/nunito-latin.woff2) format('woff2'); font-display: block;
  unicode-range: U+0020-017F, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+2605-2606, U+2665; }
:root { --font-fk: 'ElfNunito', 'ElfChillRound', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif; }
#app[data-look], #modal[data-look] {
  --pg: #deaa79;                      /* 页面底色 = 小窝地板最下面一行的颜色（render.js F2），画接着往下铺 */
  --pg-d: rgba(122, 77, 70, .13);     /* 底色上的半透明深一档（元气卡、加目标那一行、标题旁的小钮） */
  --hd: #7a4d46;                      /* 底色上的字 */
  --card: #f6fbf9; --sh: rgba(122, 77, 70, .28); --well: #f3ece0; --sub: #8a8172; --tx: #3b3530;
  --btn: #f2ece2; --ledge: #d9cdb9; --r: 20px; --r2: 14px;
  font-family: var(--font-fk); font-weight: 500;
}
/* 首页底色跟着小窝的时段变（main.js 按 render.js floorEdge 设 --floor）：傍晚、夜里地板暗下来，页面也跟着暗，字换浅色 */
#app[data-look][data-tab=today] { --pg: var(--floor, #deaa79); }
#app[data-look][data-tab=today].floor-dark { --hd: #f6fbf9; --pg-d: rgba(23, 20, 36, .2); }
:is(#app[data-look], #modal[data-look]) :is(b, h2, h3, strong) { font-weight: 700; }
#app[data-look], #app[data-look] #scroller { background: var(--pg); }
#app[data-look] #panel { padding: 4px 14px 28px; }

/* 顶栏：没有一条栏，菜单、星砂、信箱是浮着的圆钮；元气条藏起来（元气在首页小窝下面那张卡上）。首页上整个浮在画上 */
#app[data-look] #hud { background: none; border: 0; padding: calc(10px + env(safe-area-inset-top)) 12px 4px; pointer-events: none; }
#app[data-look] #hud > * { pointer-events: auto; }
#app[data-look] #hud .bar { visibility: hidden; }
#app[data-look][data-tab=today] #hud { position: absolute; left: 0; right: 0; top: 0; z-index: 4; }
#app[data-look] #hud .menubtn, #app[data-look] #hud .mailbtn { width: 40px; height: 40px; border-radius: 50%; background: rgba(246, 251, 249, .94); box-shadow: 0 3px 0 rgba(23, 20, 36, .14);
  display: flex; align-items: center; justify-content: center; padding: 0; }
#app[data-look] .burger { gap: 3px; }
#app[data-look] .burger b { width: 16px; height: 3px; border-radius: 2px; background: #7a4d46; }
#app[data-look] #hud .mailbtn img { width: 26px; height: 26px; }
#app[data-look] #hud .chip { background: rgba(246, 251, 249, .94); border-radius: 99px; padding: 3px 12px 3px 6px; box-shadow: 0 3px 0 rgba(23, 20, 36, .14); font-size: 15px; font-weight: 900; color: var(--tx); }
#app[data-look] #hud .chip img { width: 22px; height: 22px; }
#app[data-look] :is(#hud .badge, .carebtn .pip, #tabs .tbadge) { background: var(--coral); color: #fff; border: 2px solid #fff; border-radius: 99px; font-size: 11px; font-weight: 900;
  min-width: 20px; height: 20px; line-height: 16px; padding: 0 4px; text-align: center; }
#app[data-look] #hud .mailbtn .badge { top: -4px; right: -6px; }

/* 小窝：没有黑框，下面直接接页面底色 */
#app[data-look] #stage { background: var(--pg); padding: 0; }
#app[data-look] #banner .px-panel { border: 0; border-image: none; background: var(--card); border-radius: 99px; box-shadow: 0 4px 0 rgba(23, 20, 36, .18); padding: 6px 6px 6px 16px; font-weight: 700; color: var(--tx); }

/* 元气卡（Finch「1st Adventure 0/15」那张）：小芽 + 「元气」+ 白色胶囊条，数字写在条里 */
#app[data-look] .ecard { display: flex; align-items: center; gap: 10px; margin: 10px 0 12px; padding: 10px 14px; border-radius: var(--r); background: var(--pg-d); }
#app[data-look] .ecard > img { width: 36px; height: 36px; flex: none; }
#app[data-look] .ecard > div { flex: 1; min-width: 0; }
#app[data-look] .ecard b { display: block; font-size: 13px; color: var(--hd); margin: 0 0 3px 2px; }
.ebar { position: relative; height: 22px; border-radius: 99px; background: #f6fbf9; overflow: hidden; }
.ebar i { position: absolute; left: 3px; top: 3px; bottom: 3px; width: max(16px, calc(var(--e, 0%) - 6px)); border-radius: 99px; background: #efbf3f; box-shadow: inset 0 -3px 0 #d5915e; }
.ebar span { position: absolute; inset: 0; text-align: center; font-size: 13px; line-height: 22px; font-weight: 900; color: #3b3530; }

/* 记心情 · 练习 · 安心盒：三块白方砖，图标 + 一个词，练习还有几次奖励挂红圆点 */
#app[data-look] .care { gap: 10px; margin: 0 0 12px; }
#app[data-look] .carebtn { border: 0; border-radius: var(--r); background: var(--card); box-shadow: 0 4px 0 var(--sh); padding: 10px 4px 9px; gap: 3px; position: relative; color: var(--tx); }
#app[data-look] .carebtn > img { width: 36px; height: 36px; }
#app[data-look] .carebtn .moodi { width: 28px; height: 28px; margin: 4px 0; border: 0; border-radius: 50%; box-shadow: inset 0 -3px 0 rgba(23, 20, 36, .15); }
#app[data-look] .carebtn b { font-size: 15px; }
#app[data-look] .carebtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sh); background: var(--card); }
#app[data-look] .carebtn .pip { position: absolute; top: -6px; right: -4px; }

/* 白卡：花园、今天的课、早安条、休息中、试玩的一句话 */
#app[data-look] :is(.garden-row, .ctoday, .ambar, .rest, .tfb) { border: 0; border-image: none; border-radius: var(--r); background: var(--card); box-shadow: 0 4px 0 var(--sh);
  padding: 12px 14px; margin: 0 0 12px; color: var(--tx); }
#app[data-look] .garden-row { gap: 10px; }
#app[data-look] .garden-row > img { width: 28px; height: 28px; }
#app[data-look] .garden-row b { font-size: 16px; }
#app[data-look] .garden-row small { color: var(--sub); font-size: 12px; }
#app[data-look] .garden-row .badge { border: 0; border-radius: 99px; background: #fff1c7; color: var(--tx); font-weight: 900; font-size: 12px; padding: 2px 8px; }
#app[data-look] .garden-row::after { content: ''; width: 8px; height: 8px; border: solid #c8b587; border-width: 3px 3px 0 0; transform: rotate(45deg); margin-right: 4px; flex: none; }
#app[data-look] .ctoday { position: relative; gap: 10px; }
#app[data-look] .ctoday b { display: block; font-size: 11px; font-weight: 900; color: var(--honey); letter-spacing: 1px; text-transform: uppercase; }
#app[data-look] .ctoday b::after { content: ' ›'; }
#app[data-look] .ctoday small { font-size: 15px; font-weight: 700; color: var(--tx); line-height: 1.35; margin-top: 2px; }
#app[data-look] .ctoday .del { position: absolute; top: 4px; right: 8px; font-size: 16px; color: var(--khaki); }
#app[data-look] .ambar { padding-right: 40px; }
#app[data-look] .ambar .amx { top: 6px; right: 6px; color: var(--khaki); }
#app[data-look] .rest h3 { color: var(--tx); }
#app[data-look] .tfb .chipbtn { border: 0; border-radius: 99px; background: var(--well); padding: 4px 10px; }
#app[data-look] .tfb .chipbtn.on { background: var(--mint-l); }
#app[data-look] .tfb input[type=text] { border: 0; border-radius: 12px; background: var(--well); }

/* 按钮：圆角、底下一道深一档的台阶，按下去台阶收进来。
   v0.18 只留 4 种（照 Finch 录屏 46 秒的 Hint / →、88 秒弹窗底下两个整宽钮；docs/UI改版/打磨/打磨方向_v0.1.md 第 2 条）：
   ① 整宽主钮 .btn：绿底白字，高 50；弹窗底下 .actions 里整宽、竖着排，主钮排最上面
   ② 整宽次钮 .btn.gray（.btn.peach 一样）：浅灰底、深棕字，其余同 ①
   ③ 列表小钮 .btn.small：看得见的高 40，可点 44（::before 上下各多 2px）；列表里重复的动作写 .btn.small.gray，一屏只留一个单独的主动作是绿的
   ④ 圆形图标钮 .ibtn（还有顶栏菜单、信箱，二级页左上返回）：44 的白色圆，见本文件末尾 v0.18 段
   灰掉的钮（:disabled）：降饱和的浅灰底、深灰字（对比度 4.6:1）、没有台阶；不降透明度。
   次钮的字用固定的深棕 --btx，不跟 --hd 走（夜里 --hd 变浅色，浅灰钮上会看不见） */
:is(#app[data-look], #modal[data-look], #pick[data-look]) { --btx: #7a4d46; --off: #e8e3dc; --off-tx: #6b645b; }
:is(#app[data-look], #modal[data-look], #pick[data-look]) .btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 0; border-image: none; border-radius: 16px;
  background: var(--mint); color: #fff; font-weight: 800; font-size: 17px; line-height: 1.2; text-align: center; min-height: 50px; padding: 0 16px 4px; box-shadow: inset 0 -4px 0 var(--mint-d); }
:is(#app[data-look], #modal[data-look], #pick[data-look]) .btn.small { position: relative; min-height: 40px; font-size: 15px; border-radius: 12px; padding: 0 14px 4px; }
:is(#app[data-look], #modal[data-look], #pick[data-look]) .btn.small::before { content: ''; position: absolute; left: 0; right: 0; top: -2px; bottom: -2px; }
:is(#app[data-look], #modal[data-look], #pick[data-look]) :is(.btn.peach, .btn.gray) { background: var(--btn); color: var(--btx); box-shadow: inset 0 -4px 0 var(--ledge); }
:is(#app[data-look], #modal[data-look], #pick[data-look]) .btn:disabled { background: var(--off); color: var(--off-tx); box-shadow: none; padding-bottom: 0; cursor: default; }
:is(#app[data-look], #modal[data-look], #pick[data-look]) .btn:not(:disabled):active { transform: none; box-shadow: inset 0 -1px 0 var(--mint-d); padding-top: 3px; padding-bottom: 1px; }
:is(#app[data-look], #modal[data-look], #pick[data-look]) :is(.btn.peach, .btn.gray):not(:disabled):active { box-shadow: inset 0 -1px 0 var(--ledge); }
:is(#app[data-look], #modal[data-look], #pick[data-look]) .btn img { width: 16px; height: 16px; }

/* 「今天还有 N 个小目标」：标题写在底色上，旁边「＋ 新目标」是一颗半透明小钮；时段标题点了收起 */
#app[data-look] .h3row { margin: 18px 2px 4px; }
#app[data-look] .h3row h3 { font-size: 18px; font-weight: 800; color: var(--hd); }
#app[data-look] #panel > p.hint { color: var(--hd); opacity: .85; font-size: 13px; font-weight: 700; margin: 2px 4px 6px; }
#app[data-look] h4.slot { margin: 12px 4px 8px; }
#app[data-look] h4.slot button { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 2px 4px 2px 0; color: var(--hd); font-size: 13px; font-weight: 800; opacity: .85; cursor: pointer; }
#app[data-look] h4.slot button::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-bottom: 3px; }
#app[data-look] h4.slot button.shut::after { transform: rotate(-45deg); margin: 0 0 0 -2px; }

/* 目标：一条一张白卡，左边圆形图标窝，右边「34 🌱」和打勾钮（没做是浅灰底绿勾，做了是绿底白勾） */
#app[data-look] .goal { background: var(--card); border: 0; border-radius: var(--r); box-shadow: 0 4px 0 var(--sh); padding: 9px 10px 9px 9px; margin: 0 0 10px; gap: 10px; min-height: 62px; }
#app[data-look] .goal.starred:not(.done) { background: #fff8e6; }
#app[data-look] .goal .well { width: 44px; height: 44px; border-radius: 50%; background: var(--well); display: flex; align-items: center; justify-content: center; flex: none; }
#app[data-look] .goal .well img.px { width: 26px; height: auto; max-height: 30px; object-fit: contain; }
#app[data-look] .goal .well i { width: 14px; height: 14px; border-radius: 4px; }
/* v0.20：没有小物的目标（自己加的）左边是方面的丙图标：44 点圆角方块〔PH〕，底块色在 style 里；图 32 点不缩放 */
#app[data-look] .goal .well.gwell { border-radius: 13px; box-shadow: inset 0 -3px 0 rgba(23, 20, 36, .08); }
#app[data-look] .goal .well.gwell img.px { width: 32px; height: 32px; max-height: none; }
#app[data-look] .goal .txt { font-size: 16px; font-weight: 700; color: var(--tx); line-height: 1.3; }
#app[data-look] .goal .txt small { font-size: 12px; font-weight: 500; color: var(--sub); margin-top: 2px; }
#app[data-look] .goal.done .txt, #app[data-look] .goal.skipped .txt { text-decoration: none; color: var(--sub); }
#app[data-look] .goal .gstar { font-size: 18px; color: var(--ledge); }
#app[data-look] .goal .gstar.on { color: #e0a72c; text-shadow: none; }
#app[data-look] .goal .gain { display: flex; align-items: center; gap: 1px; font-size: 14px; font-weight: 800; color: var(--sub); }
#app[data-look] .goal .gain img { width: 16px; height: 16px; }
#app[data-look] .goal .tick { position: relative; width: 48px; height: 42px; border: 0; border-radius: var(--r2); background: var(--btn); box-shadow: inset 0 -4px 0 var(--ledge); }
#app[data-look] .goal .tick::after { content: ''; display: block; position: absolute; left: 18px; top: 8px; width: 9px; height: 16px; margin: 0; border: solid var(--mint); border-width: 0 4px 4px 0; border-radius: 1px; transform: rotate(45deg); }
#app[data-look] .goal.done .tick { background: var(--mint); box-shadow: inset 0 -4px 0 var(--mint-d); }
#app[data-look] .goal.done .tick::after { border-color: #fff; }
#app[data-look] .goal .tick:not(:disabled):active { box-shadow: inset 0 -1px 0 var(--ledge); }
#app[data-look] .goal .tick:not(:disabled):active::after { top: 10px; }
#app[data-look] .goal.skipped .tick { opacity: .45; }
#app[data-look] .goal.skipped .tick::after { border-color: var(--khaki); }
/* 最底下一行「＋ 加一个目标」（Finch 的 Add a goal） */
#app[data-look] .addrow { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: var(--r); background: var(--pg-d); color: var(--hd); font: inherit; font-size: 16px; font-weight: 700;
  padding: 16px 18px; margin: 4px 0 12px; cursor: pointer; text-align: left; }
#app[data-look] .addrow i { font-style: normal; font-size: 22px; line-height: 1; font-weight: 500; }
#app[data-look] .later summary { color: var(--hd); font-weight: 800; padding: 4px; }
#app[data-look] .later .goal { min-height: 0; }

/* 底栏：和页面同色，不画分隔线；选中的那格是一块浅色圆角 */
#app[data-look] #tabs { background: var(--pg); border-top: 0; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); gap: 2px; }
#app[data-look] #tabs button { border: 0; margin: 0; border-radius: 16px; padding: 6px 0 5px; color: var(--hd); font-size: 11px; font-weight: 700; }
#app[data-look] #tabs button.on { background: rgba(246, 251, 249, .42); color: var(--hd); }
#app[data-look] #tabs button:not(.on) :is(img, .mepic) { opacity: 1; }
#app[data-look] #tabs .tbadge { top: 1px; right: 10px; left: auto; }
#app[data-look] #tabs .tbadge.dot { min-width: 0; width: 12px; height: 12px; padding: 0; top: 4px; right: 16px; }

/* 原型自己的提示条：深色胶囊 */
#app[data-look] #toast { border: 0; border-image: none; background: rgba(59, 53, 48, .9); color: #fff; border-radius: 99px; padding: 8px 16px; font-size: 13px; font-weight: 700; }

/* —— 任务页（照 Finch Quests）：分组标题是底色上的小字（英文大写）、右边一行小注；每条一张白卡 —— */
#app[data-look] .qsec { border: 0; border-image: none; padding: 0; margin: 0 0 18px; }
#app[data-look] .qhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 14px 4px 9px; }
#app[data-look] .qhead h3 { margin: 0; font-size: 13px; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; color: var(--hd); }
#app[data-look] .qhead small { font-size: 12px; font-weight: 700; color: var(--hd); opacity: .8; text-align: right; }
#app[data-look] .qcard { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--r); box-shadow: 0 4px 0 var(--sh);
  padding: 10px 12px; margin: 0 0 10px; color: var(--tx); }
#app[data-look] .qcard.ready { background: #fff8e6; }
/* v0.20：左上菜单的行也用 .qtile（菜单在 #modal 里），所以前面写成 :is(#app, #modal)；里程碑原来的 .qtile.well 色点换成了方面图标，那两条删了 */
:is(#app, #modal)[data-look] .qtile { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: inset 0 -3px 0 rgba(23, 20, 36, .08); }
:is(#app, #modal)[data-look] .qtile img { width: 32px; height: 32px; }
#app[data-look] .qmid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
#app[data-look] .qmid b { font-size: 15px; line-height: 1.25; }
#app[data-look] .qmid small { font-size: 12px; color: var(--sub); margin-top: -4px; }
.qbar { position: relative; height: 20px; border-radius: 99px; background: #f3ece0; overflow: hidden; }
.qbar i { position: absolute; left: 3px; top: 3px; bottom: 3px; width: max(14px, calc(var(--p, 0%) - 6px)); border-radius: 99px; background: #efbf3f; box-shadow: inset 0 -3px 0 #d5915e; }
.qbar span { position: absolute; inset: 0; text-align: center; font-size: 12px; line-height: 20px; font-weight: 900; color: #3b3530; }
#app[data-look] .qcard .btn { flex: none; min-width: 64px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; }
#app[data-look] .qok { position: relative; flex: none; width: 44px; height: 38px; border-radius: var(--r2); background: var(--mint); box-shadow: inset 0 -4px 0 var(--mint-d); }
#app[data-look] .qok::after { content: ''; position: absolute; left: 16px; top: 7px; width: 8px; height: 15px; border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg); }
#app[data-look] .qgift { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 900; color: var(--sub); padding: 0 4px; }
#app[data-look] .qgift img { width: 20px; height: 20px; }
#app[data-look] .qgift img[src*=chest] { width: 28px; height: 28px; opacity: .55; }
#app[data-look] .qnote { margin: 0 6px; font-size: 12px; font-weight: 700; color: var(--hd); opacity: .8; }
/* 今日任务左边一条竖线串起三个圆圈：做到了变黄，领了变绿打勾 */
#app[data-look] .qline { position: relative; }
#app[data-look] .qline::before { content: ''; position: absolute; left: 11px; top: 30px; bottom: 40px; width: 3px; border-radius: 2px; background: rgba(246, 251, 249, .55); }
#app[data-look] .qrow { display: flex; align-items: center; gap: 10px; }
#app[data-look] .qdot { position: relative; z-index: 1; flex: none; width: 25px; height: 25px; margin-bottom: 10px; border-radius: 50%; border: 3px solid rgba(246, 251, 249, .85); background: var(--pg); }
#app[data-look] .qrow.ready .qdot { background: var(--yellow); border-color: #fff; }
#app[data-look] .qrow.claimed .qdot { background: var(--mint); border-color: #fff; }
#app[data-look] .qrow.claimed .qdot::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
#app[data-look] .qrow.claimed .qmid b { color: var(--sub); }

/* —— 奖励弹窗（屏幕中间弹出的：长大了、明信片、戴冠礼……）：白底大圆角，粗体标题，灰色小字，整宽按钮；有大图的放在最上面 —— */
#modal[data-look][data-kind=center] .sheet { border: 0; border-image: none; background: var(--card); border-radius: 26px; padding: 18px 18px 16px; max-width: 380px; color: var(--tx); box-shadow: 0 6px 0 rgba(23, 20, 36, .25); }
#modal[data-look][data-kind=center] .sheet h2 { font-size: 21px; font-weight: 900; line-height: 1.3; margin: 4px 0 8px; text-align: center; }
#modal[data-look][data-kind=center] .sheet p { color: var(--sub); }
#modal[data-look][data-kind=center] .sheet :is(textarea, input[type=text]) { border: 2px solid var(--ledge); border-radius: 12px; background: #fff; padding: 8px 10px; }
#modal[data-look][data-kind=center] .sheet:has(> .hero) { text-align: center; }
#modal[data-look][data-kind=center] .hero { display: flex; align-items: flex-end; justify-content: center; height: 220px; margin: -18px -18px 14px; padding-bottom: 18px; overflow: hidden;
  border-radius: 26px 26px 0 0; background: radial-gradient(circle at 50% 62%, #fffbe9 0 22%, transparent 56%), repeating-conic-gradient(from 0deg at 50% 62%, #ffe7a3 0 9deg, #fff3c9 9deg 18deg); }
#modal[data-look][data-kind=center] .hero canvas { display: block; }
#modal[data-look][data-kind=center].in .hero canvas { animation: heroIn .5s cubic-bezier(.2, 1.5, .4, 1) .08s both; }
@keyframes heroIn { from { transform: translateY(24px) scale(.7); opacity: 0; } }

/* —— 打勾那一下（ui/juice.js）：勾跳一下带一圈绿，卡片轻轻一跳，「+34」往上飘，小芽飞进元气卡，卡片鼓一下，ta 头上一个白色圆角气泡 —— */
#jfx { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.jspark { position: absolute; left: 0; top: 0; width: 24px; height: 24px; }
.jnum { position: absolute; left: 0; top: 0; font: 900 28px/1 var(--font-fk); color: #3fae7f; white-space: nowrap;
  text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff, 2px 2px #fff, -2px 2px #fff, 2px -2px #fff, -2px -2px #fff, 0 5px 8px rgba(23, 20, 36, .22); }
.jnum.s { font-size: 18px; color: #d8a024; }
.goal .tick.jpop { animation: jpop .45s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes jpop { 0% { transform: scale(.72); } 55% { transform: scale(1.16); } 100% { transform: scale(1); } }
.goal .tick.jpop::before { content: ''; position: absolute; inset: -4px; border-radius: 18px; border: 3px solid var(--mint); animation: jring .55s ease-out .08s both; }
@keyframes jring { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
.goal.jbump { animation: jbump .4s ease-out .06s; }
@keyframes jbump { 40% { transform: translateY(-4px); } }
.ecard.jpulse { animation: jpulse .45s ease-out; }
@keyframes jpulse { 30% { transform: scale(1.04); } }
.jsay { position: fixed; z-index: 8; transform: translate(-50%, -100%); pointer-events: none; }
.jsay[hidden] { display: none; }
.jsay.in { animation: jsay .3s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes jsay { from { transform: translate(-50%, -100%) scale(.4); opacity: 0; } }
.jsay span { position: relative; display: block; white-space: nowrap; background: #f6fbf9; color: #3b3530; border-radius: 16px; padding: 7px 13px; font: 800 14px/1.2 var(--font-fk);
  box-shadow: 0 3px 0 rgba(23, 20, 36, .16); }
.jsay span::after { content: ''; position: absolute; left: 50%; bottom: -12px; margin-left: -7px; border: 7px solid transparent; border-top-color: #f6fbf9; }
@media (prefers-reduced-motion: reduce) { .goal .tick.jpop, .goal.jbump, .ecard.jpulse, .jsay.in, #modal[data-look][data-kind=center].in .hero canvas { animation: none; } }

/* ---------- v0.17「照 Finch」铺到所有页（2026-11-19 用户：「铺到其他所有页」）----------
   ui.js 现在给 #app、#modal 一直挂 data-look。旧样子的黑描边、9 宫格面板、奶油底在这里统一换掉：
   在 data-look 里重定几个老变量（--ink 变成浅棕细线、--cream / --white 变成卡片白、--wall 变成页面底色），老规则大多自己就跟着变了；
   剩下要换形状的（圆角、去框、阴影）按组写在下面。改回旧样子：ui.js 两处 dataset.look 去掉即可 */
:is(#app, #modal)[data-look] {
  --ink: rgba(122, 77, 70, .16); --cream: var(--card); --white: var(--card); --wall: var(--pg); --cream-d: var(--well); --khaki: var(--ledge);
  color: var(--tx);
}
/* 老规则里拿 --ink 当字色、当画布黑框底色的，字换回深色，黑框换成页面底色 */
:is(#app, #modal)[data-look] :is(.week .today small, .tiers span.on, .trip, .tree li.now b, .week > button.today small, .mpips i.on, .fr-card.fr-add b,
  .fr-plus, .fr-pal.fr-more small, .carebtn, .mecard, .coll, .door, #tabs button.on) { color: var(--tx); }
/* 老规则里拿 --ink 画的小箭头、勾：换成灰棕 */
:is(#app, #modal)[data-look] :is(.door .go, i.lt, i.rt) { border-color: var(--sub); }
:is(#app, #modal)[data-look] .btn :is(i.lt, i.rt) { border-color: currentColor; }
:is(#app, #modal)[data-look] :is(#stage, .tryon, .town, .scene.stagebox, .showroom.stagebox) { background: var(--pg); padding-top: 0; padding-bottom: 0; }
:is(#app, #modal)[data-look] :is(.scene canvas, .setpic canvas) { border: 0; border-radius: var(--r2); }
#modal[data-look] .tree li:not(:last-child)::before { background: var(--ledge); }

/* 面板：9 宫格换成白色大圆角卡 */
:is(#app, #modal)[data-look] .px-panel { border: 0; border-image: none; background: var(--card); border-radius: var(--r); box-shadow: 0 4px 0 var(--sh); }
/* 带黑框的卡和格子：去框、圆角、底下一道浅阴影 */
:is(#app, #modal)[data-look] :is(.card, .opt, .aidlist button, .pick, .mate, .affcard, .cgoal, .door, .mecard, .coll, .mrow, .fr-card, .fr-row,
  .pw-cam, .pw-chip, .mood, .find, .stats div, .dex) { border: 0; border-radius: var(--r2); background: var(--card); box-shadow: 0 3px 0 var(--sh); }
:is(#app, #modal)[data-look] :is(.card, .opt, .mood, .pick, .mrow, .door, .coll, .mecard, .fr-card, .aidlist button):not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sh); }
:is(#app, #modal)[data-look] .thumb { border: 0; border-radius: 12px; background: var(--well); overflow: hidden; }
:is(#app, #modal)[data-look] .door .awning { border-bottom: 0; }
/* 小标签、小圆片：胶囊形 */
:is(#app, #modal)[data-look] :is(.card .tag, .tag.like, .tag.meh, .fr-chip, #gd-seeds .chip, .card .pic .try, .pw-on, .pw-del, .medal, .badge:not(#hud .badge)) { border-radius: 99px; }
:is(#app, #modal)[data-look] .chipbtn { border: 0; border-radius: 99px; background: var(--btn); box-shadow: 0 2px 0 var(--ledge); padding: 5px 12px; font-weight: 700; color: var(--tx); }
:is(#app, #modal)[data-look] .chipbtn.on { background: var(--mint); color: #fff; box-shadow: 0 2px 0 #3f9a74; }
/* 分段选择：浅色胶囊槽，选中的那格是白色圆角块 */
:is(#app, #modal)[data-look] .seg { border: 0; border-radius: 99px; background: var(--well); padding: 3px; gap: 2px; }
:is(#app, #modal)[data-look] .seg button { border: 0; border-radius: 99px; font-weight: 700; color: var(--sub); }
:is(#app, #modal)[data-look] .seg button.on { background: var(--card); color: var(--tx); box-shadow: 0 2px 0 var(--sh); }
/* 输入框 */
:is(#app, #modal)[data-look] :is(.row input[type=text], .row select, textarea, input[type=text], input[type=number], select) { border: 2px solid var(--ledge); border-radius: 12px; background: #fff; padding: 7px 10px; color: var(--tx); }
/* 进度条（老的 .bar）：胶囊形，黄条 */
:is(#app, #modal)[data-look] .bar:not(#hud .bar) { border: 0; border-radius: 99px; background: var(--well); overflow: hidden; }
:is(#app, #modal)[data-look] .bar:not(#hud .bar) > i { background: var(--yellow); border-radius: 99px; }

/* 页面上的标题：写在底色上，用底色上的字色 */
#app[data-look] #panel > :is(h2, h3, h4), #app[data-look] #panel > section > :is(h2, h3, h4), #app[data-look] #panel .h3row h3 { color: var(--hd); }
#app[data-look] #panel > p.hint, #app[data-look] #panel > section > p.hint { color: var(--hd); opacity: .8; }

/* 整屏推进来的页（心情、练习）的标题栏、二级页的标题栏：和页面同色，不画线 */
#app[data-look] #pushbar, #modal[data-look][data-kind=page] .pagebar { background: var(--pg); border-bottom: 0; color: var(--hd); }
:is(#app, #modal)[data-look] .pagebar b { font-weight: 900; font-size: 18px; }
:is(#app, #modal)[data-look] .pagebar .back { width: 38px; height: 38px; border-radius: 50%; background: rgba(246, 251, 249, .94); box-shadow: 0 3px 0 rgba(23, 20, 36, .14); margin-right: 6px; }
:is(#app, #modal)[data-look] .pagebar .back i { border-color: var(--hd); border-width: 0 0 3px 3px; width: 10px; height: 10px; margin-left: 4px; border-radius: 1px; }
#modal[data-look][data-kind=page] { background: var(--pg); }
#modal[data-look][data-kind=page] .sheet { background: var(--pg); border-radius: 0; box-shadow: none; padding: 6px 14px calc(24px + env(safe-area-inset-bottom)); }
#modal[data-look][data-kind=page] .sheet > :is(h2, h3, h4), #modal[data-look][data-kind=page] .sheet > p.hint { color: var(--hd); }
/* 小抽屉：白底、上面两个大圆角、灰色小把手 */
#modal[data-look][data-kind=drawer] .sheet { background: var(--card); border-radius: 26px 26px 0 0; box-shadow: none; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
#modal[data-look][data-kind=drawer] .sheet::before { background: var(--ledge); border-radius: 99px; width: 40px; height: 5px; margin-bottom: 10px; }
#modal[data-look][data-kind=drawer] .sheet h2 { font-size: 19px; font-weight: 900; }
/* 左上菜单：白底、右边两个大圆角 */
#modal[data-look][data-kind=menu] .sheet { background: var(--pg); border-radius: 0 26px 26px 0; box-shadow: none; padding: calc(12px + env(safe-area-inset-top)) 12px 16px; }
#modal[data-look][data-kind=menu] .mrow { padding: 9px 12px; }
#modal[data-look][data-kind=menu] .mrow.me { background: var(--card); }
#modal[data-look] .mrow:active { background: var(--well); }
/* v0.17 二批（深一层的页）：店里页顶的三个钮收小、店员/角色说话的气泡、白底弹窗（居中、抽屉）里的小卡改浅米底 */
:is(#app, #modal)[data-look] .talk .say { border: 0; border-radius: 16px; box-shadow: 0 3px 0 var(--sh); color: var(--tx); }
:is(#app, #modal)[data-look] .talk .say::before { border-right-color: var(--card); }
#modal[data-look]:is([data-kind=center], [data-kind=drawer]) :is(.talk .say, .dex) { background: var(--well); box-shadow: none; }
#modal[data-look]:is([data-kind=center], [data-kind=drawer]) .talk .say::before { border-right-color: var(--well); }
/* 试穿台、精灵页名字那一条：白条黑边 → 页面底色、深色粗字、底下一道浅线（往下滑时盖在内容上面，要看得出边） */
:is(#app, #modal)[data-look] .tryon-cap { background: var(--pg); border-top: 0; border-bottom: 2px solid var(--ink); color: var(--hd); font-weight: 700; }
/* 底色上的小字（分组标题右边的小注、页面上的说明句）：统一用底色上的棕字、不再半透明（半透明时对比度只有 2.9:1，太淡）〔PH〕 */
#app[data-look] .fr-sec small { color: var(--hd); font-weight: 700; }
#app[data-look] #panel > p.hint, #app[data-look] #panel > section > p.hint, #app[data-look] .qhead small { opacity: 1; }

/* ---------- v0.18「打磨」：按钮只留 4 种、朋友页说明收进「i」、设置页分组列表（2026-11-19；docs/UI改版/打磨/打磨方向_v0.1.md 第 2、3、4 条，任务说明 任务_v0.18.md）----------
   按钮 4 种的写法见上面 v0.16 段「按钮」；这里是弹窗底下怎么排、圆形图标钮、几处特殊的钮 */
/* 弹窗底下的钮：竖着排、整宽，主钮（绿）排最上面，浅灰的在下面（照 Finch 88 秒）；夹在里面的一句说明排在钮上面 */
#modal[data-look] .sheet .actions { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 10px; margin-top: 16px; }
#modal[data-look] .sheet .actions .btn { width: 100%; min-width: 0; }
#modal[data-look] .sheet .actions .btn:not(.gray):not(.peach):not(.small) { order: -1; }
#modal[data-look] .sheet .actions > :not(.btn) { order: -2; }
/* ④ 圆形图标钮：44 的白色圆，底下一道浅台阶 */
:is(#app, #modal)[data-look] .ibtn { flex: none; position: relative; width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0; background: rgba(246, 251, 249, .94);
  box-shadow: 0 3px 0 rgba(23, 20, 36, .14); display: inline-flex; align-items: center; justify-content: center; color: var(--btx); cursor: pointer; }
:is(#app, #modal)[data-look] .ibtn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(23, 20, 36, .14); }
:is(#app, #modal)[data-look] .ibtn i.lt { width: 10px; height: 10px; border: solid var(--btx); border-width: 0 0 3px 3px; transform: rotate(45deg); margin-left: 4px; border-radius: 1px; }
#app[data-look] #hud .menubtn, #app[data-look] #hud .mailbtn, :is(#app, #modal)[data-look] .pagebar .back { width: 44px; height: 44px; }
/* 店里页顶：圆形返回 + 三家店一条分段选择（原来是「‹ 三家店」+ 店名 + 两颗绿胶囊） */
:is(#app, #modal)[data-look] .shopnav { gap: 8px; margin-bottom: 10px; }
:is(#app, #modal)[data-look] .shopnav .seg { flex: 1; min-width: 0; }
:is(#app, #modal)[data-look] .shopnav .seg button { min-height: 38px; padding: 0 4px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#app, #modal)[data-look] .shopnav .seg button.on { cursor: default; }
/* 页签（行囊、肯定语）：分段选择，选中的那格白色；放不下时字收小一点，不换行 */
:is(#app, #modal)[data-look] .sub.seg { flex-wrap: nowrap; gap: 2px; margin-bottom: 10px; }
:is(#app, #modal)[data-look] .sub.seg button { flex: 1 1 auto; min-width: 0; min-height: 38px; padding: 0 6px; font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
:is(#app, #modal)[data-look] .sub.seg .badge { margin: 0; }
/* 首页最底下「＋ 加一个目标」：半透明白，暖棕底上字看得清（对比度约 4.8:1；原来是半透明深色，3.0:1 左右）；夜里换成半透明浅色 */
#app[data-look] .addrow { background: rgba(246, 251, 249, .5); color: var(--btx); }
#app[data-look][data-tab=today].floor-dark .addrow { background: rgba(246, 251, 249, .16); color: var(--hd); }
/* 打勾钮：高 44（原来 42） */
#app[data-look] .goal .tick { height: 44px; }
/* 分段选择没选中的字：深一档（原来灰棕 3.5:1 → 4.6:1） */
:is(#app, #modal)[data-look] .seg button:not(.on) { color: var(--off-tx); }

/* —— 朋友页：每组标题右边一颗「i」（照 Finch 录屏 98 秒收集页 Micropets 右上角）——
   看得见 26 的深棕圆、白色 i（画在里面的 <i> 上），按钮本身 44 见方、上下负边距不撑高标题行；点开从底下抽出原来写在底色上的说明（friends.js INFO） */
.info { flex: none; align-self: center; width: 44px; height: 44px; margin: -9px 0 -9px auto; border: 0; padding: 0; background: none;
  display: inline-flex; align-items: center; justify-content: flex-end; cursor: pointer; }
.info i { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #7a4d46; color: #f6fbf9;
  font: 900 16px/1 var(--font-fk); font-style: normal; }
.info:active i { transform: scale(.92); }
/* 列表小钮灰掉时写的是状态（「长到『大精灵』上架」），字小一号、边距收窄，窄卡片里不折行；行标题右边的小钮不让它被挤窄 */
:is(#app[data-look], #modal[data-look]) .btn.small:disabled { font-size: 13px; padding: 0 8px; }
#app[data-look] .h3row .btn { flex: none; white-space: nowrap; }
#app[data-look] .fr-sec { margin: 18px 2px 8px; }
/* v0.18.1「i」铺到所有页（用户 11-19 定）：标题行 = 标题 + 「i」靠右；行标题右边有钮的，「i」在钮左边 */
#app[data-look] .ihead { display: flex; align-items: center; gap: 6px; margin: 18px 2px 8px; }
#app[data-look] .ihead > :is(h3, h4) { margin: 0; min-width: 0; }
#app[data-look] .h3row .info { margin-left: auto; }
#app[data-look] .qhead .info { margin: -9px 0 -9px 2px; align-self: center; }
#app[data-look] .qhead small { margin-left: auto; }
#app[data-look] .catrow { display: flex; align-items: flex-start; gap: 4px; }
#app[data-look] .catrow .chips { flex: 1; min-width: 0; }
#app[data-look] .catrow .info { margin: -5px 0 0 0; align-self: flex-start; }
#app[data-look] .tryon > .info { position: absolute; top: 4px; right: 8px; margin: 0; z-index: 2; }   /* 店里没有分组标题：「i」放在试衣台画面右上角 */
#modal[data-look] .pagebar > .info { margin: 0 0 0 auto; }
#modal[data-look][data-kind=drawer] .sheet h2 + p { font-size: 15px; line-height: 1.55; color: var(--tx); margin: 4px 0 0; }

/* —— 设置页：分组白卡（照 Finch 录屏 26 秒）——
   .gh 底色上的小标题（英文大写）+ 右边小注；.glist 白卡；.grow 一行：.gic 图标位 32、.gt 标题 + 小字、.gv 现在的值、.gchev ›；行和行之间一道浅线 */
.gform { margin: 0 0 6px; }
#modal[data-look] .gh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 18px 6px 8px; }
#modal[data-look] .gh h4 { margin: 0; font-size: 13px; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; color: var(--hd); }
#modal[data-look] .gh small { font-size: 12px; font-weight: 700; color: var(--hd); text-align: right; }
#modal[data-look] .glist { background: var(--card); border-radius: var(--r); box-shadow: 0 4px 0 var(--sh); overflow: hidden; }
#modal[data-look] .grow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; margin: 0; padding: 8px 14px; border: 0; background: none; color: var(--tx);
  font: inherit; text-align: left; position: relative; }
#modal[data-look] .grow + .grow { box-shadow: inset 0 1px 0 #ebe4d8; }
#modal[data-look] :is(button.grow, label.grow) { cursor: pointer; }
#modal[data-look] :is(button.grow, label.grow):active { background: var(--well); }
/* v0.20：图标位是 40 点的丙方块（用户 11-20 定「保持 40 点方块」；底块色在 ui.js tile() 的 style 里），32 点的图四边各留 4 点；圆角照 48 点那种（14）的比例缩成 12〔PH〕；行高 54 不变 */
#modal[data-look] .gic { flex: none; width: 40px; height: 40px; margin: -1px 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -2px 0 rgba(23, 20, 36, .08); }
/* 行的上下内边距是 8：40 点的方块上下各吃进 1 点，不把一行字的行撑到 56（照旧 54） */
#modal[data-look] .gic img { width: 32px; height: 32px; }
/* 没给图的行（现在没有了，留着兜底）：一块浅米色圆角方块占着位置 */
#modal[data-look] .gic:empty { background: var(--well); box-shadow: none; }
#modal[data-look] .gt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* v0.20：图标位从 32 宽到 40，英文 360 宽「Adventure length」这类标题挤得比最长的词还窄；标题至少留一个词宽，右边的值先省略 */
#modal[data-look] .grow .gt { min-width: min-content; }
#modal[data-look] .gt b { font-size: 16px; font-weight: 700; line-height: 1.3; }
#modal[data-look] .gt small { font-size: 12.5px; font-weight: 500; color: var(--sub); line-height: 1.35; }
#modal[data-look] .gv { flex: 0 1 auto; min-width: 0; max-width: 48%; font-size: 15px; font-weight: 700; color: var(--off-tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#modal[data-look] .gchev { flex: none; width: 9px; height: 9px; border: solid #b3a690; border-width: 3px 3px 0 0; transform: rotate(45deg); margin: 0 4px 0 -2px; border-radius: 1px; }
#modal[data-look] .grow .seg { flex: none; width: 168px; }
#modal[data-look] .grow .seg button { min-height: 34px; }
#modal[data-look] .grow:has(> .seg:only-of-type):not(:has(.gt)) .seg { flex: 1; width: auto; }
#modal[data-look] .grow input.gin { flex: 0 1 168px; min-width: 0; border: 0; border-radius: 10px; background: var(--well); padding: 8px 10px; font: inherit; font-size: 16px; font-weight: 700; color: var(--tx); text-align: right; }
#modal[data-look] .grow input.gin:focus { outline: 2px solid var(--mint); background: #fff; text-align: left; }
#modal[data-look] .gfoot { margin: 8px 8px 0; font-size: 12.5px; line-height: 1.5; font-weight: 600; color: var(--hd); }
#modal[data-look] .grow.legal { display: block; min-height: 0; padding: 12px 14px; font-size: 12px; line-height: 1.5; color: var(--sub); }
/* 拨动开关（iOS 那种）：关是浅灰槽、开是绿槽，白色圆头滑过去 */
.tog { flex: none; appearance: none; -webkit-appearance: none; position: relative; width: 51px; height: 31px; margin: 0; border-radius: 99px; background: #e2dbcf; cursor: pointer; transition: background .18s; }
.tog::after { content: ''; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(23, 20, 36, .25); transition: transform .18s; }
.tog:checked { background: var(--mint); }
.tog:checked::after { transform: translateX(20px); }
.tog:focus-visible { outline: 2px solid var(--mint-d); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tog, .tog::after { transition: none; } }
/* 试玩调试：折起来的一段，标题像分组小标题；调试钮是浅灰列表小钮，换行排 */
#modal[data-look] details.dev { margin-top: 18px; border: 0; padding: 0; background: none; }
#modal[data-look] details.dev > summary { margin: 0 6px; font-size: 13px; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; color: var(--hd); cursor: pointer; }
#modal[data-look] .devbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#modal[data-look] .devbtns .btn { flex: 1 1 auto; white-space: nowrap; }

/* —— 从底下抽出的选项（ui.js pickSheet）：叠在设置页上面，样子和小抽屉一样；选中的那项右边一个绿勾 —— */
#pick { position: fixed; inset: 0; z-index: 11; display: flex; align-items: flex-end; justify-content: center; background: rgba(23, 20, 36, .55); font-family: var(--font-fk); font-weight: 500;
  --card: #f6fbf9; --well: #f3ece0; --sub: #8a8172; --tx: #3b3530; --hd: #7a4d46; --sh: rgba(122, 77, 70, .28); --r: 20px; --off-tx: #6b645b; }
#pick[hidden] { display: none; }
#pick .sheet { width: 100%; max-width: 540px; max-height: 80%; overflow: auto; background: var(--card); border-radius: 26px 26px 0 0; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); color: var(--tx); }
#pick .sheet::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 99px; background: #d9cdb9; margin: 0 auto 10px; }
#pick h2 { font-size: 19px; font-weight: 900; margin: 0 4px 6px; }
#pick .hint { font-size: 13px; line-height: 1.5; color: var(--sub); margin: 0 4px 10px; }
#pick .glist { background: var(--well); border-radius: 18px; overflow: hidden; }
#pick .grow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 9px 14px; border: 0; background: none; font: inherit; color: var(--tx); text-align: left; cursor: pointer; }
#pick .grow + .grow { box-shadow: inset 0 1px 0 #e6dccb; }
#pick .grow:active { background: #ebe2d2; }
#pick .gt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#pick .gt b { font-size: 16px; font-weight: 700; }
#pick .gt small { font-size: 12.5px; color: var(--sub); line-height: 1.35; }
#pick .gok { flex: none; width: 8px; height: 15px; margin: 0 6px 4px; border: solid transparent; border-width: 0 3px 3px 0; transform: rotate(45deg); }
#pick .grow.on .gok { border-color: var(--mint-d); }
#pick .grow.on .gt b { color: #3f8f6c; }
#pick.in .sheet { animation: upIn .2s ease-out; }
#pick { --btn: #f2ece2; --ledge: #d9cdb9; }
#pick .ibody { font-size: 15px; line-height: 1.55; color: var(--tx); margin: 4px 4px 0; }
#pick .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
#pick .actions .btn { width: 100%; }

/* —— 左上菜单：和设置页同样的行——一张白卡，一行一项（图标 32、标题 + 小字、右边 ›），行间一道浅线；红点在 › 左边；没有东西的那行字照样看得清、不带 › —— */
#modal[data-look][data-kind=menu] .menu { background: var(--card); border-radius: var(--r); box-shadow: 0 4px 0 var(--sh); overflow: hidden; margin-top: 8px; }
#modal[data-look][data-kind=menu] .menu .mrow { gap: 12px; min-height: 64px; margin: 0; padding: 10px 14px; border: 0; border-radius: 0; background: none; box-shadow: none; }
#modal[data-look][data-kind=menu] .menu .mrow + .mrow { box-shadow: inset 0 1px 0 #ebe4d8; }
#modal[data-look][data-kind=menu] .menu .mrow:not(:disabled):active { transform: none; background: var(--well); }
#modal[data-look][data-kind=menu] .menu .mrow::after { content: ''; flex: none; width: 9px; height: 9px; border: solid #b3a690; border-width: 3px 3px 0 0; transform: rotate(45deg); margin: 0 4px 0 -2px; border-radius: 1px; }
#modal[data-look][data-kind=menu] .menu .mrow:disabled { opacity: 1; }
#modal[data-look][data-kind=menu] .menu .mrow:disabled::after { visibility: hidden; }
#modal[data-look][data-kind=menu] .menu .mrow:disabled .qtile { filter: saturate(.3); }
#modal[data-look][data-kind=menu] .menu .mrow b { font-size: 16px; font-weight: 700; color: var(--tx); }
#modal[data-look][data-kind=menu] .menu .mrow small { font-size: 12.5px; color: var(--sub); }
#modal[data-look][data-kind=menu] .menu .mrow .badge { flex: none; background: var(--coral); color: #fff; border: 0; border-radius: 99px; min-width: 22px; height: 22px; line-height: 22px; padding: 0 6px; font-size: 12px; font-weight: 900; text-align: center; }
#modal[data-look] .grow:not(:has(.gt)) .gic:empty { display: none; }   /* v0.20：语言那一行接上了地球，只有空着的图标位才藏 */

/* ---------- v0.19「每页一个颜色」（2026-11-19 用户选「B · 每页一个颜色」；取色和对比度见 docs/UI改版/打磨/小样/小样_v0.1.md 第二节、prototype/dev/polish-colors.css）----------
   每页取这一页像素画里的一个颜色当底色（--pg），底色上的字（--hd）用主色板里的深色，对比度 ≥ 4.5:1；半透明深一档（--pg-d）和白卡底下的台阶（--sh）跟着字色走。
   首页不在这里：首页底色接着小窝地板往下铺，傍晚、夜里跟着变暗（上面 v0.16 段 data-tab=today 那两条）。
   #modal 的 data-tab 是 ui.js openModal 记下的「打开它时在哪一页」：二级页、左上菜单跟着那一页换色〔PH〕；小抽屉、居中弹窗、「i」的抽屉（#pick）是白底，不换 */
:is(#app, #modal)[data-look][data-tab=quests] { --pg: #c1e1ec; --hd: #39505c; --pg-d: rgba(57, 80, 92, .13); --sh: rgba(57, 80, 92, .28); }    /* 任务：远足明信片的天空，字 6.2:1 */
:is(#app, #modal)[data-look][data-tab=shop] { --pg: #fad898; --hd: #7a4d46; --pg-d: rgba(122, 77, 70, .13); --sh: rgba(122, 77, 70, .28); }   /* 商店：小物铺门头桃色的浅一阶，字 5.2:1 */
:is(#app, #modal)[data-look][data-tab=friends] { --pg: #add0af; --hd: #39505c; --pg-d: rgba(57, 80, 92, .13); --sh: rgba(57, 80, 92, .28); }   /* 朋友：大陆树绿的浅阶（帽子铺门头），字 5.0:1 */
:is(#app, #modal)[data-look][data-tab=bag] { --pg: #c48256; --hd: #171424; --pg-d: rgba(23, 20, 36, .13); --sh: rgba(23, 20, 36, .28); }       /* 行囊：皮包暗面的皮棕，字用描边色 5.7:1 */
:is(#app, #modal)[data-look][data-tab=me] { --pg: #fceccd; --hd: #7a4d46; --pg-d: rgba(122, 77, 70, .13); --sh: rgba(122, 77, 70, .28); }     /* 精灵：小屋墙色，字 6.1:1 */
/* 行囊的皮棕底比别的页深：直接写在底色上的灰字（1 处说明、笔记本的小字、锁着的地方）、正文深色字、绿色链接只有 1.2–3.8:1，换成底色上的字色（#171424，5.7:1） */
#app[data-look][data-tab=bag] #panel :is(.pw-hint, p.hint > .link, h4 > small.hint, .nb-h b, .nb-h small, .nb.locked b, .nb.locked small) { color: var(--hd); }
#app[data-look][data-tab=bag] #panel p.hint > .link { text-decoration: underline; }
/* 「i」的小圆跟着底色上的字色（原来固定深棕）；夜里首页底色暗、字换浅色时，小圆换成白底棕字 */
.info i { background: var(--hd, #7a4d46); }
#app[data-look][data-tab=today].floor-dark .info i { background: rgba(246, 251, 249, .94); color: #7a4d46; }
/* 顺带：v0.18.1 带「i」的标题行（.ihead）里的标题不是 #panel 的直接子元素，漏了底色上的字色，一直是正文深色；和同页别的标题对齐 */
#app[data-look] #panel .ihead > :is(h3, h4) { color: var(--hd); }

/* v0.21 第一周还没开的底栏格子：变淡 + 小锁（game/unlock.js） */
#tabs button.locked { opacity: .45; position: relative; }
#tabs button.locked::after { content: ''; position: absolute; top: 3px; left: calc(50% + 8px); width: 16px; height: 16px;
  background: url(assets/ui/icon-lock.png) center / 16px no-repeat; image-rendering: pixelated; }
/* v0.21 出门保底：「再做 N 件小事」，窄屏时按钮换到下一行 */
#banner .stepsbar { flex-wrap: wrap; justify-content: center; max-width: calc(100% - 16px); padding: 4px 8px; text-align: center; }
#banner .stepsbar .row { display: flex; gap: 6px; }
/* v0.21 价格拉开以后三位数多了：行囊、商店卡片上的「回收 ★110」两边少留一点，别撑出卡片；
   试戴条上的「买不起（差 80）」变长，名字那段至少留 120 宽，不够就让按钮换到下一行（原来名字会被挤成一个词宽） */
:is(#app[data-look], #modal[data-look]) .card .btn.small.gray:is([data-act="sell"], [data-act="sell-furn"]) { padding-left: 6px; padding-right: 6px; font-size: 14px; }
.tryon-cap > span { flex: 1 1 120px; }

/* ===== v0.23「一天多做几件」（2026-11-21）：元气卡上 60 / 80 两道刻度、ta 出门以后的星砂阶梯卡、第一天的三步卡、
   远足站里元气不够的路程、练习页「写一句给自己的话」。数值在 src/data/economy.js（TIERS、STAR_LADDER） ===== */
.ebar u { position: absolute; top: 5px; bottom: 5px; width: 2px; margin-left: -1px; border-radius: 1px; background: rgba(59, 53, 48, .3); }
.ebar u.on { background: rgba(246, 251, 249, .85); }
.ebar span { z-index: 1; }
#app[data-look] .ecard.lad > img { width: 30px; height: 30px; margin: 0 3px; }
.ecard.lad .pips { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 22px; }
.ecard.lad .pg { display: inline-flex; align-items: center; gap: 3px; }
.ecard.lad .pg i { width: 9px; height: 9px; border-radius: 50%; background: #f6fbf9; }
.ecard.lad .pg i.on { background: #efbf3f; box-shadow: inset 0 -2px 0 #d5915e; }
.ecard.lad .pg small { margin-left: 2px; font-size: 12px; font-weight: 800; color: var(--hd); white-space: nowrap; }
.ecard.lad .info { margin: -9px -8px -9px 0; }
.day1 { position: relative; margin: 0 0 8px; padding: 8px 40px 8px 10px; }
#app[data-look] .day1 { border: 0; border-image: none; border-radius: var(--r); background: var(--card); box-shadow: 0 4px 0 var(--sh); padding: 12px 14px; margin: 0 0 12px; color: var(--tx); }
.day1 p { margin: 0 34px 8px 0; font-weight: 700; }
.day1 ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.day1 li { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.day1 li > span { flex: 1; min-width: 0; }
.day1 li em { display: inline-flex; align-items: center; gap: 1px; font-style: normal; font-weight: 800; font-size: 14px; color: var(--sub, #8a8172); }
.day1 li em img { width: 16px; height: 16px; }
.day1 li small { color: var(--sub, #8a8172); font-size: 12px; white-space: nowrap; }
.day1 .ck { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--khaki); box-sizing: border-box; }
.day1 li.done .ck { border-color: var(--mint-d); background: var(--mint-d); box-shadow: inset 0 0 0 3px #f6fbf9; }
.day1 li.done > span { color: var(--sub, #8a8172); text-decoration: line-through; }
.day1 .amx { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--khaki); cursor: pointer; }
.seg button.locked, :is(#app, #modal)[data-look] .seg button.locked { opacity: 1; cursor: default; color: var(--off-tx, #6b645b); }
.seg button.locked small { display: block; }
.noterow { display: flex; gap: 8px; align-items: center; margin: 6px 0 4px; }
.noterow input { flex: 1; min-width: 0; }
/* 顺带：远足站「这趟走多远」三格里，名字和下面的说明（1 小时、星砂 ×1.3……）原来挤在同一行，分成两行，和灰着的那几格对齐 */
.routes .seg button small { display: block; font-weight: 600; }

/* ===== v0.24.1「字看得清」（2026-11-22 真机反馈第 1、6、7 条，原话见 docs/试玩/真机反馈_2026-11-22.md）=====
   检查：dev/contrast-check.js 走 layout-check 的整套路线，白天、夜里各一遍（docs/试玩/v0.24.1/contrast_v0241.py）。
   标准：WCAG 2.1 第 1.4.3 条，小字 4.5:1、大字 3:1；☆ × ？这类符号按第 1.4.11 条 3:1。只把字色往深调一档（同色系），底色不换。
   没改（等用户判）：主按钮白字在薄荷绿上 2.1:1、选中的胶囊同色、珊瑚红角标 3.0:1——和 Finch 一样的做法，改了会换整体观感。 */

/* 1. 夜里、傍晚从首页推进来的练习、心情两个全屏页：不跟着小窝变暗，用白天的地板色和字色（原来深棕底上的字只有 1.3–2.2:1）。首页本身照旧跟着变 */
#app[data-look][data-tab=today][data-page] { --pg: #ecbc89; --hd: #5e3a35; --pg-d: rgba(122, 77, 70, .13); }
#app[data-look][data-tab=today].floor-dark[data-page] .info i { background: var(--hd); color: #f6fbf9; }
#app[data-look][data-tab=today].floor-dark .addrow { background: rgba(23, 20, 36, .2); }   /* 夜里首页「加一个目标」：浅色半透明底把白字衬淡了（3.8:1） */

/* 2. 默认底色（首页地板色 #ecbc89、窗口页 #deaa79）上的字色 #7a4d46 只有 3.4–4.1:1，深一档。任务、商店、朋友、行囊、精灵页 v0.19 各有自己的字色，不受影响 */
:is(#app, #modal)[data-look] { --hd: #5e3a35; }
/* 页面底上直接写的小字、说明（原来是灰 #56585b、薄荷绿 #579178）跟着用底色上的字色 */
:is(#app, #modal)[data-look] :is(.prac > div > small, .prac > div > p.hint, .week small, li.lock b, li.lock small, .lesson p.hint, p.big, .log li small),
:is(#app, #modal)[data-look] :is(#panel, #modal-body) > p.hint .link { color: var(--hd); }
#app[data-look] h4.slot button, #app[data-look] .qnote { opacity: 1; }

/* 3. 灰色说明字 #8a8172 在白卡上只有 3.7:1，深一档（白卡 5.3:1、米色底 4.8:1） */
:is(#app, #modal)[data-look], #pick { --sub: #6e675b; }
:is(#app, #modal)[data-look] :is(#panel, #modal-body) .everep p.you { color: var(--tx, #3b3530); }   /* 晚上好里自己回的那句，浅绿气泡上 */

/* 4. 薄荷绿的字（链接、「今日特价」、「已领」……）在白卡上 3.5:1，换深一档的绿 */
:is(#app, #modal, #pick) :is(.link, .quest .qok, .cgoal .qok, .ftag, .legal a, .dtext small.today, .opensoon, .evewrite summary, .fr-card .fr-who, .fr-owner) { color: #3f7a62; }
:is(#app, #modal)[data-look] :is(#panel, #modal-body) > p.hint .link { color: var(--hd); }
#app[data-look] .ctoday b { color: #a8602f; }   /* 首页课程卡的小标题「引导课程」，蜂蜜色 2.5:1 → 深一档 */

/* 5. ☆（还没设成今日之星）、×、？：浅米色 1.5:1，看不出是个按钮 */
:is(#app, #modal)[data-look] :is(.goal .gstar:not(.on), .ctoday .del, .ambar .amx, .day1 .amx, .fr-card.fr-ghost) { color: #998b74; }

/* 6. 选中的那一格看得出来（反馈第 6、7 条「点击其实是没有反应的」「看不出差异」）：点下去其实记上了，
   但 v0.16 的白卡样式（上面「带黑框的卡和格子」那条）把 .opt / .aidlist button / .mood / .pick / .mate / .pw-chip / 卡片的 .on 底色盖掉了。
   统一成浅薄荷底 + 深薄荷描边（沿用 v0.15 行囊 .pw-chip.on 的样子）〔PH〕 */
:is(#app, #modal)[data-look] :is(.opt, .aidlist button, .mood, .card.pick, .pick, .mate, .pw-chip).on {
  background: #e4f3ec; box-shadow: inset 0 0 0 3px var(--mint-d), 0 3px 0 var(--sh);
}
/* 引导挑目标：没勾的原来整格透明度 .6，字看不清；改成不透明，靠上面的选中样子区分 */
:is(#app, #modal)[data-look] .pick { opacity: 1; }


/* ===== v0.25「引导像游戏」（方向板「丁 · 三样一起」，用户 11-23 选；docs/UI改版/游戏感_v0.24后/）=====
   三样一起：说话的人用气泡 + 名牌开口（ui.js sayBox）；画面在上、面板整宽贴底（弹窗 kind scene），奖励整屏变舞台（kind stage）；
   选项是带丙图标的大方块（ui.js bigTile）。字、颜色、按钮沿用 v0.24（11-18 否过的像素字、黑描边、木板、彩带、印章不用）。
   这一轮只用在新手引导 9 步、门口、见面、长大了；别的弹窗、抽屉不变。数值照小样（游戏感说明 §5），标〔PH〕的见 CHANGELOG v0.25 */

/* 引导期间：顶栏的圆钮（菜单、星砂）和底栏藏起来，只留门口画面 */
#app[data-nux] #hud, #app[data-nux] #tabs { visibility: hidden; }

/* --- kind scene：画面不压暗，面板贴底；面板外面点得到下面的小窝画面（门口要点门） --- */
#modal[data-kind=scene] { background: none; padding: 0; align-items: flex-end; justify-content: center; pointer-events: none; }
#modal[data-kind=scene] > * { pointer-events: auto; }
#modal[data-look][data-kind=scene] .sheet { position: relative; width: 100%; max-width: 540px; overflow: visible; display: flex; flex-direction: column;
  min-height: min(calc(100% - var(--scene-b, 384px) + 28px), calc(100% - 140px)); max-height: calc(100% - 56px);
  background: var(--card); border-radius: 28px 28px 0 0; padding: 18px 20px calc(16px + env(safe-area-inset-bottom)); color: var(--tx); box-shadow: 0 -4px 0 rgba(23, 20, 36, .10); }
#modal[data-kind=scene] .pb { flex: 0 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; margin: 0 -8px; padding: 4px 8px 6px; }
#modal[data-kind=scene] .actions { flex: none; margin-top: 12px; }
:is(#modal[data-kind=scene], .stagebox) .actions .btn { flex: 1; min-height: 54px; font-size: 17px; }
#modal[data-kind=scene] .hint { color: var(--sub); font-size: 12.5px; text-align: center; margin: 12px 0 0; }
#modal[data-kind=scene] .form .row input[type=text] { width: 100%; border: 2px solid var(--ledge); border-radius: 14px; background: #fff; padding: 11px 14px; font-size: 17px; font-weight: 800; color: var(--tx); }
#modal[data-kind=scene] .form { margin-top: 12px; }
/* 返回：画面左上的圆钮（借 #modal 自己的 .pagebar；第 1 步、门口没有） */
#modal[data-kind=scene] .pagebar { display: none; position: absolute; left: 14px; top: calc(14px + env(safe-area-inset-top)); min-height: 0; padding: 0; background: none; border: 0; }
#modal[data-kind=scene]:has(#modal-body [data-back]) .pagebar { display: flex; }
#modal[data-kind=scene] #modal-title { display: none; }
#modal[data-look][data-kind=scene] .pagebar .back { width: 44px; height: 44px; margin: 0; background: var(--card); box-shadow: inset 0 -3px 0 var(--ledge), 0 3px 0 rgba(23, 20, 36, .16); }
#modal.in[data-kind=scene] .sheet { animation: upIn .25s ease-out; }

/* --- 开口：立绘站在面板上沿，名牌压在气泡左上角，气泡尖角指着说话的人 --- */
.say { position: relative; flex: none; }
.say .spk { position: absolute; left: -2px; top: -122px; line-height: 0; pointer-events: none; }
.say .spk:has(.portimg) { left: 2px; top: auto; bottom: calc(100% - 6px); }   /* v0.26.2 立绘宽窄不一（阿咕 93×128）：按脚底对齐面板上沿，不按固定的高 */
.say .dots { justify-content: center; margin: 0; min-height: 12px; }
.say[data-who=agoo] .dots { justify-content: flex-start; margin-left: 110px; }
.say .bubble { position: relative; display: block; margin-top: 16px; background: var(--btn); border-radius: 20px; padding: 16px 16px 13px;
  font-size: 17px; font-weight: 800; line-height: 1.38; color: var(--tx); text-align: left; cursor: pointer; }
.say .bubble::after { content: ''; position: absolute; width: 18px; height: 18px; background: inherit; transform: rotate(45deg); border-radius: 3px; }
.say .bubble.t-tl::after { left: 26px; top: -7px; }
.say .bubble.t-t::after { left: 50%; margin-left: -9px; top: -7px; }
.say .bubble.t-b::after { left: 50%; margin-left: -9px; bottom: -7px; }
.say .tag { position: absolute; left: 62px; top: -13px; z-index: 1; font-size: 13px; font-weight: 900; line-height: 1.2; color: #fff; padding: 3px 10px 4px; border-radius: 99px; box-shadow: 0 2px 0 rgba(23, 20, 36, .15); }
.say .bubble:is(.t-t, .t-b) .tag { left: 16px; }
.say .said { position: relative; z-index: 1; }
.say .sg { color: transparent; }   /* 还没冒出来的字先占着位置，气泡不跟着一跳一跳地变高 */
.say .more { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; font-weight: 800; color: var(--sub); }
.say .more.end { visibility: hidden; }
.say .more i { width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
[data-hop].hop { animation: hop .45s ease-out; }
@keyframes hop { 30% { transform: translateY(-10px); } 55% { transform: translateY(0); } 72% { transform: translateY(-3px); } }

/* --- 大方块：米色底 + 下沿一道台阶（同次钮）；选中 = 浅绿底 + 深绿描边 + 右上角勾（同 v0.24.1 的选中样子） --- */
#modal .tlabel { margin: 16px 0 0; font-size: 12.5px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: var(--sub); }
#modal .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
#modal .tiles.two { grid-template-columns: 1fr 1fr; }
#modal .tiles.five { grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
#modal .tiles.rows { grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
#modal .tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 100px; margin: 0; padding: 12px 6px 14px;
  border: 0; border-radius: 18px; background: var(--btn); box-shadow: inset 0 -4px 0 var(--ledge); color: var(--tx); font-size: 13.5px; font-weight: 800; line-height: 1.2; text-align: center; cursor: pointer; }
#modal .tile .tl { display: block; overflow-wrap: anywhere; }
#modal .tile.on { background: #e4f3ec; box-shadow: inset 0 0 0 3px var(--mint-d), inset 0 -4px 0 var(--mint-d); }
#modal .tile.on::after { content: '✓'; position: absolute; right: 7px; top: 7px; width: 22px; height: 22px; border-radius: 50%; background: var(--mint-d); color: #fff; font-size: 13px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; }   /* 勾在方块里面的右上角：放外面会把方块撑宽（layout-check 记溢出） */
#modal .tiles.five .tile.on::after { right: 4px; top: 4px; width: 17px; height: 17px; font-size: 10px; }
#modal button.tile:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--ledge); }
#modal button.tile.on:active { box-shadow: inset 0 0 0 3px var(--mint-d), inset 0 -1px 0 var(--mint-d); }
#modal .tile.jp { animation: tpress .24s ease-out; }
#modal .tile.jp::after { animation: jpop .28s ease-out; }
@keyframes tpress { 40% { transform: scale(.93); } }
#modal .tile.word { min-height: 60px; font-size: 15px; }
#modal .tiles.lang .tile { flex-direction: row; min-height: 0; gap: 10px; padding: 11px 8px 13px; font-size: 16px; }
#modal .glyph { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; font-weight: 900; box-shadow: inset 0 -3px 0 rgba(23, 20, 36, .08); }
#modal .tiles.rows .tile { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 0; padding: 9px 14px 12px; text-align: left; }
#modal .tiles.rows .tl b { display: block; font-size: 15px; }
#modal .tiles.rows .tl small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 700; color: var(--sub); }
#modal .tiles.five .tile { min-height: 0; padding: 12px 0 15px; }
#modal .meter { display: flex; align-items: flex-end; gap: 3px; height: 24px; }
#modal .meter i { width: 6px; border-radius: 2px; background: var(--ledge); }
#modal .meter i:nth-child(1) { height: 8px; } #modal .meter i:nth-child(2) { height: 12px; } #modal .meter i:nth-child(3) { height: 16px; }
#modal .meter i:nth-child(4) { height: 20px; } #modal .meter i:nth-child(5) { height: 24px; }
#modal .meter i.on { background: var(--honey); }
#modal .tile.on .meter i.on { background: var(--mint-d); }
#modal .tcap { margin: 6px 0 0; text-align: center; font-size: 14px; font-weight: 800; color: var(--tx); min-height: 1.4em; }
#modal .tile canvas { display: block; }
/* 作息：太阳、月亮两块，钟点大字，下面 − / + 两颗圆钮 */
#modal .tile.clock { cursor: default; gap: 5px; padding: 14px 6px 14px; }
#modal .clock .hh { font-size: 28px; font-weight: 900; line-height: 1.1; }
#modal .clock .pm { display: flex; gap: 14px; margin-top: 4px; }
#modal .rnd { width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0 0 3px; background: var(--card); box-shadow: inset 0 -3px 0 var(--ledge); color: var(--btx); font-size: 24px; font-weight: 900; line-height: 1; cursor: pointer; }
#modal .rnd:not(:disabled):active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--ledge); }
#modal .rnd:disabled { opacity: .35; cursor: default; }

/* --- kind stage：整屏舞台（见面、长大了）。压暗，光慢慢转，ta 放大 8 倍站在光里（矮屏 6 倍，都是整数倍） --- */
#modal[data-kind=stage] { padding: 0; align-items: stretch; background: linear-gradient(rgba(23, 20, 36, .8), rgba(23, 20, 36, .9) 55%, rgba(23, 20, 36, .96));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }   /* 后面首页的白卡透出来太乱：再暗一点、糊掉 */
#modal[data-look][data-kind=stage] .sheet { width: 100%; max-width: 480px; height: 100%; max-height: none; margin: 0 auto; overflow-y: auto; overflow-x: hidden;
  background: none; border-radius: 0; box-shadow: none; color: #fff; padding: calc(14px + env(safe-area-inset-top)) 0 calc(20px + env(safe-area-inset-bottom)); }
#modal[data-look][data-kind=stage] .sheet { display: flex; flex-direction: column; }
#modal[data-kind=stage] #modal-body { flex: 1 0 auto; display: flex; flex-direction: column; }   /* 舞台撑满一屏，按钮贴底（百分比 min-height 在这里量不到高） */
.stagebox { flex: 1 0 auto; display: flex; flex-direction: column; padding: 0 24px; overflow-x: clip; }
.stagebox .bubble { background: #fff; box-shadow: 0 3px 0 rgba(23, 20, 36, .14); }
.stagebox .hero8 { position: relative; flex: none; height: 286px; margin: 2px -24px 0; display: flex; align-items: flex-end; justify-content: center; overflow-x: clip; }   /* 光芒比屏幕宽，左右裁在屏幕边上 */
.hero8 :is(.glow, .rays, .floor) { position: absolute; left: 50%; pointer-events: none; }
.hero8 .glow { top: 50%; width: 400px; height: 400px; margin: -200px 0 0 -200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 244, 200, .85), rgba(255, 244, 200, 0) 65%); }
.hero8 .rays { top: 50%; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 236, 160, .5) 0 9deg, rgba(255, 236, 160, 0) 9deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 28%, transparent 68%); mask: radial-gradient(circle, #000 28%, transparent 68%); animation: spin 70s linear infinite; }
.hero8 .floor { bottom: 12px; width: 140px; height: 22px; margin-left: -70px; border-radius: 50%; background: rgba(23, 20, 36, .35); }
.hero8 .elfpic { position: relative; line-height: 0; }
.hero8 .elfpic canvas { display: block; width: 256px; height: 256px; }
.stagebox h2 { margin: 10px 0 0; color: #fff; font-size: 25px; font-weight: 900; line-height: 1.25; text-align: center; }
.stagebox .sub { margin: 6px 0 0; color: rgba(255, 255, 255, .86); text-align: center; }
.stagebox .tiles { margin-top: 16px; }
#modal .stagebox .tile { background: var(--card); min-height: 0; padding: 10px 4px 12px; font-size: 12.5px; cursor: default; }
#modal .stagebox .tile small { display: block; margin-bottom: 2px; font-size: 10.5px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; color: #8f5238; }
#modal .stagebox .tile .nm { display: block; }
#modal .stagebox .tile .nm::first-letter { text-transform: uppercase; }
#modal[data-look] .stagebox .actions { margin-top: auto; padding-top: 20px; }   /* 按钮贴底（要压过 #modal[data-look] .sheet .actions 的 16px） */
#modal.in[data-kind=stage] .sheet { animation: popIn .25s ease-out; }
@keyframes spin { to { transform: rotate(1turn); } }
@media (max-height: 820px) { .stagebox .hero8 { height: 218px; } .hero8 .elfpic canvas { width: 192px; height: 192px; } }
.stagebox.still .rays { animation: none; }
@media (prefers-reduced-motion: reduce) { [data-hop].hop, #modal .tile.jp, #modal .tile.jp::after, .hero8 .rays, #modal.in[data-kind=scene] .sheet, #modal.in[data-kind=stage] .sheet { animation: none; } }
/* 门口：面板上阿咕那句话底下三个往上指的小三角，一下一下往上点（指着上面的门）〔PH〕 */
.doorup { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 34px auto 0; }
.doorup i { width: 0; height: 0; border: solid transparent; border-width: 0 17px 15px; border-bottom-color: var(--mint-d); animation: upnudge 1.3s ease-in-out infinite; }
.doorup i:nth-child(2) { opacity: .55; animation-delay: .12s; }
.doorup i:nth-child(3) { opacity: .25; animation-delay: .24s; }
@keyframes upnudge { 50% { transform: translateY(-7px); } }
#modal-body > .doorgo { opacity: 0; transition: opacity .25s; }   /* 点了门：阿咕和那句话淡掉，面板留着（类挂在里面的东西上，不挂 #modal-body：它是下一个弹窗接着用的） */
.doorup.still i { animation: none; }
@media (prefers-reduced-motion: reduce) { .doorup i { animation: none; } }
#modal .stagebox .tiles.unl.n1 { grid-template-columns: minmax(0, 140px); justify-content: center; }
#modal .stagebox .tiles.unl.n2 { grid-template-columns: repeat(2, minmax(0, 140px)); justify-content: center; }

/* ===== v0.26「加新目标 · 乙 图块墙」（用户 11-23「用乙」；样子照 docs/UI改版/加目标/img-mock/b1.png、b2.png；ui/goalwall.js）=====
   加目标页 = #modal kind page 里一个 .gw-page（自己画标题和 ×，页顶返回条藏掉）；引导第 8 页 = .gw-nux。两处共用方块 .gw-cell、胶囊 .gw-chips。
   类名都是 gw- 开头，不碰「引导像游戏」那一节的 .tile / .tiles。选中照 v0.24.1：浅薄荷底 + 深薄荷描边 + 右上角勾。
   字色：方块名 --tx、说明 --sub（白卡上 5.3:1）、没选的胶囊深棕在米黄上 5.4:1；选中的胶囊白字在薄荷绿上和 .chipbtn.on 一样（2.1:1，v0.24.1 记着等用户判） */
#modal[data-look]:has(.gw-page) { --pg: #f8f0e3; --hd: #5e3a35; }
#modal[data-look][data-kind=page]:has(.gw-page) .pagebar { display: none; }
#modal[data-look][data-kind=page] .sheet:has(.gw-page) { padding: calc(8px + env(safe-area-inset-top)) 0 0; }
#modal[data-look] .gw-page { padding: 0 14px; }   /* 左右留白放在这一层：胶囊那一排、底下那一条往两边伸到屏幕边，不撑出这一层 */
#modal[data-look] .gw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; }
#modal[data-look] .gw-head h3 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 800; color: var(--hd); }
#modal[data-look] .gw-x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--card); color: var(--btx); font: inherit; font-size: 26px; line-height: 1; font-weight: 700;
  box-shadow: 0 3px 0 rgba(23, 20, 36, .14); cursor: pointer; padding: 0 0 3px; }
#modal[data-look] .gw-own { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 12px; padding: 10px 12px; border: 0; border-radius: 16px; background: var(--card);
  box-shadow: 0 3px 0 var(--sh); font: inherit; font-size: 17px; font-weight: 700; color: var(--sub); text-align: left; cursor: pointer; }
#modal[data-look] :is(.gw-own, .gw-cell) .gw-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: inset 0 -3px 0 rgba(23, 20, 36, .08); }
#modal[data-look] :is(.gw-own, .gw-cell) .gw-ic img { width: 32px; height: 32px; }
#modal[data-look] .gw-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 12px; padding: 2px 14px 5px; }
#modal[data-look] .gw-chips::-webkit-scrollbar { display: none; }
#modal[data-look] .gw-chips button { flex: none; border: 0; border-radius: 14px; padding: 7px 14px; background: #f2e3c4; color: #7a4d46; font: inherit; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer; }
/* 选中的胶囊和选中的方块一个样（v0.24.1「字看得清」的浅薄荷底 + 绿描边）：小样里是实心薄荷绿 + 白字，白字在薄荷绿上只有 2.1:1，没照搬〔PH〕 */
#modal[data-look] .gw-chips button.on { background: #e4f3ec; color: var(--tx); box-shadow: inset 0 0 0 2px var(--mint-d); }
#modal[data-look] .gw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
#modal[data-look] .gw-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-height: 112px; padding: 10px 4px 8px;
  border: 0; border-radius: 18px; background: var(--card); box-shadow: 0 3px 0 var(--sh); font: inherit; color: var(--tx); text-align: center; cursor: pointer; }
#modal[data-look] .gw-cell .gw-ic { width: 52px; height: 52px; border-radius: 15px; }
#modal[data-look] .gw-cell .gw-well { width: 52px; height: 52px; border-radius: 50%; background: var(--well); display: flex; align-items: center; justify-content: center; flex: none; }
#modal[data-look] .gw-cell > span:last-child { font-size: 14px; line-height: 1.18; font-weight: 700; overflow-wrap: anywhere; }
#modal[data-look] .gw-cell.on { background: #e4f3ec; box-shadow: inset 0 0 0 3px var(--mint-d), 0 3px 0 var(--sh); }
#modal[data-look] .gw-cell.on::after { content: '✓'; position: absolute; top: -6px; right: -5px; width: 26px; height: 26px; border-radius: 50%; background: var(--mint-d); color: #fff;
  font-size: 16px; line-height: 26px; font-weight: 800; box-shadow: 0 2px 0 rgba(23, 20, 36, .15); }
#modal[data-look] .gw-cell:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sh); }
#modal[data-look] .gw-cell.on:active { box-shadow: inset 0 0 0 3px var(--mint-d), 0 1px 0 var(--sh); }
/* 底下一条：钉在页面最下面，跟着滚动的内容一起看得见 */
#modal[data-look] .gw-bar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; margin: 14px -14px 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: var(--card); box-shadow: 0 -3px 0 rgba(122, 77, 70, .12); }
#modal[data-look] .gw-bar .gw-n { flex: 1; min-width: 0; }
#modal[data-look] .gw-bar .gw-n b { display: block; font-size: 17px; line-height: 1.25; color: var(--tx); }
#modal[data-look] .gw-bar .gw-n small { display: block; font-size: 14px; line-height: 1.3; color: var(--sub); font-weight: 600; }
#modal[data-look] .gw-bar .btn { flex: none; min-width: 112px; }
/* 引导第 8 页：方块小一点；胶囊不往两边出血（外壳是「引导像游戏」那一节的面板） */
#modal[data-look] .gw-nux .gw-chips { margin: 0 0 10px; padding: 2px 0 5px; }
#modal[data-look] .gw-nux .gw-grid { gap: 7px; }
#modal[data-look] .gw-nux .gw-cell { min-height: 100px; padding: 8px 3px 7px; gap: 5px; }
#modal[data-look] .gw-nux .gw-cell :is(.gw-ic, .gw-well) { width: 46px; height: 46px; }
#modal[data-look] .gw-nux .gw-cell > span:last-child { font-size: 13.5px; }
#modal[data-look] .gw-nux .gw-count { margin: 10px 2px 0; font-size: 15px; font-weight: 700; color: var(--sub); }
/* 首页：今天的都做完了 →「再加一件？」比「加一个目标」显眼一点：白卡 + 绿色加号 */
#app[data-look] .addrow.gw-more { background: var(--card); color: var(--tx); box-shadow: 0 3px 0 var(--sh); }
#app[data-look] .addrow.gw-more i { background: var(--mint); color: #fff; }
#app[data-look] .addrow.gw-more span { display: flex; flex-direction: column; text-align: left; line-height: 1.25; }
#app[data-look] .addrow.gw-more small { font-size: 14px; color: var(--sub); font-weight: 600; }
#app[data-look] .addrow.gw-more i { width: 30px; height: 30px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; padding-bottom: 2px; }
#app[data-look][data-tab=today].floor-dark .addrow.gw-more { background: var(--card); color: var(--tx); }   /* 夜里地板暗了也是白卡，字不跟着变浅 */

/* ===== v0.26.1「选今日之星」（11-23 真机反馈：「现在横条的选择框很不清晰，建议改成更游戏化、更友好的界面」）=====
   原来：白抽屉上一排白横条。现在沿用 v0.25 那套（弹窗 kind scene + sayBox + .tile）：小窝画面留在上面，ta 用气泡开口，
   今天还没做的目标是带图标的大方块；点中的那块是金色（浅金底 + 金描边 + 右上角一颗星，和清单里今日之星的 ★ 一个颜色），不用薄荷绿的勾。
   .sp 挂在方块那一层（.pb.sp）上；ui/rhythm.js starSheet()。面板上沿贴着 ta 脚下（--sp-top，打开时量），按钮贴底，方块少的时候在中间。
   金色、方块大小、面板高度〔PH〕 */
#modal[data-kind=scene]:has(.sp) { pointer-events: auto; }
body:has(#modal:not([hidden])[data-kind=scene] .sp) #banner { visibility: hidden; }   /* 小窝下沿那条「再做 N 件小事」先藏起来：面板从 ta 脚下盖起，它会露半截 */   /* 面板外面点一下 = 先不选（和抽屉一样），这一页上面的画面、顶栏圆钮点不穿 */
/* 面板至少从 ta 脚下盖到底；9 块放不下时往上长（最多到离屏幕顶 56 点），再放不下方块区自己滚 */
#modal[data-look][data-kind=scene] .sheet:has(.sp) { min-height: max(calc(100% - var(--sp-top, 290px)), min(470px, calc(100% - 120px))); max-height: calc(100% - 56px); height: auto; }
#modal .pb.sp { flex: 1 1 auto; display: flex; flex-direction: column; padding-top: 10px; }
#modal .sp .tiles { margin: auto 0; }   /* 方块少：上下居中；方块多：从上往下排，能滚 */
#modal .sp .tiles.one { grid-template-columns: minmax(0, 190px); justify-content: center; }
#modal .sp .tile { justify-content: flex-start; min-height: 116px; padding: 12px 5px 14px; gap: 7px; font-size: 14px; line-height: 1.18; }
#modal .sp .tiles:is(.one, .two) .tile { min-height: 128px; padding-top: 16px; font-size: 15.5px; }
/* v0.26.2 九块（3 × 3）：小一号，三排要放进面板里 */
#modal .pb.sp:has(.tiles.nine) { padding-top: 4px; }
#modal .sp .tiles.nine { gap: 8px; }
#modal .sp .tiles.nine .tile { min-height: 96px; padding: 8px 4px 11px; gap: 4px; font-size: 13px; line-height: 1.16; }
#modal .sp .tiles.nine .tile :is(.sp-well, .sp-ic) { width: 42px; height: 42px; }
#modal .sp .tiles.nine .tile .sp-ic { border-radius: 12px; }
#modal .sp .tiles.nine .tile::after { right: 3px; top: 3px; width: 20px; height: 20px; font-size: 15px; }
#modal .sp .tiles.nine .tile.on::after { right: 3px; top: 3px; width: 23px; height: 23px; font-size: 15px; }
#modal .sp .tile :is(.sp-well, .sp-ic) { width: 52px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center; }
#modal .sp .tile .sp-well { border-radius: 50%; background: var(--card); box-shadow: inset 0 2px 0 rgba(23, 20, 36, .06); }
#modal .sp .tile .sp-ic { border-radius: 15px; box-shadow: inset 0 -3px 0 rgba(23, 20, 36, .08); }
#modal .sp .tile .sp-ic img { width: 32px; height: 32px; }
#modal .sp .tile .tl { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
/* 没点中的：右上角一颗浅色空心星，告诉你「点我就是它」 */
#modal .sp .tile::after { content: '☆'; position: absolute; right: 6px; top: 5px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 17px; line-height: 1; font-weight: 900; color: #c9b993; }
/* 点中的：金色 */
#modal .sp .tile.on { background: #fff1c9; box-shadow: inset 0 0 0 3px #e0a72c, inset 0 -4px 0 #e0a72c; }
#modal .sp .tile.on::after { content: '★'; right: 4px; top: 4px; width: 27px; height: 27px; background: #e0a72c; color: #fff; font-size: 17px; box-shadow: 0 2px 0 rgba(23, 20, 36, .16); }
#modal .sp button.tile.on:active { box-shadow: inset 0 0 0 3px #e0a72c, inset 0 -1px 0 #e0a72c; }
/* 两个按钮并排（全站是上下叠着的）：这一页方块要地方，「先不选」窄一点放左边 */
#modal[data-look][data-kind=scene] .sheet:has(.sp) .actions { flex-direction: row; align-items: stretch; }
#modal[data-look][data-kind=scene] .sheet:has(.sp) .actions .btn { width: auto; flex: 1 1 0; }
#modal[data-look][data-kind=scene] .sheet:has(.sp) .actions .btn:not(.gray):not(.peach):not(.small) { order: 0; }
#modal[data-look][data-kind=scene] .sheet:has(.sp) .actions .btn.gray { flex: 0 0 auto; min-width: 112px; }
#modal .sp-h { margin: 2px 2px 0; font-size: 19px; line-height: 1.35; font-weight: 900; color: var(--tx); }
@media (max-height: 760px) {
  #modal .sp .tile { min-height: 102px; padding: 9px 4px 12px; gap: 5px; font-size: 13.5px; }
  #modal .sp .tile :is(.sp-well, .sp-ic) { width: 44px; height: 44px; }
}

/* v0.28「你不在的时候」：ta 留的小纸条（点开的那张、小本子里的） */
.awaynote .an-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.awaynote .an-head b { display: block; font-size: 19px; font-weight: 900; }
.awaynote .an-head small { color: var(--gray-d); font-size: 13px; }
.awaynote .an-por { width: 56px; height: 56px; flex: none; border-radius: 14px; background: #fff1c9; image-rendering: pixelated; }
.awaynote .an-list { list-style: none; margin: 0; padding: 4px 12px; border-radius: 14px; background: #fffaf0; box-shadow: inset 0 0 0 2px #eadcc3; }
.awaynote .an-list li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 9px 0; line-height: 1.45; }
.awaynote .an-list li + li { border-top: 2px dashed #eadcc3; }
.awaynote .an-bub { width: 26px; height: 24px; image-rendering: pixelated; margin-top: 3px; }
.awaynote .an-when { display: block; font-variant-numeric: tabular-nums; color: var(--gray-d); font-size: 12px; line-height: 1.3; }
.awaynote .an-what { min-width: 0; }
.awaynote .an-end { margin: 12px 2px 4px; font-size: 18px; font-weight: 900; text-align: center; }
.awaynote.inbook { margin: 0 0 14px; }
.awaynote .an-date { margin: 0 2px 4px; font-weight: 800; color: var(--gray-d); font-size: 13px; }
.anbook { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; margin: 2px 0 10px; border: 0; border-radius: 14px;
  background: var(--card, #fffaf0); box-shadow: inset 0 0 0 2px #eadcc3; font: inherit; color: inherit; cursor: pointer; }
.anbook > span { flex: 1; min-width: 0; line-height: 1.4; }
.anbook > span small { display: block; color: var(--gray-d); font-size: 12px; }
.anbook > b { flex: none; color: var(--peach-d, #c4563b); font-size: 14px; }
.anbook .an-bub { width: 26px; height: 24px; image-rendering: pixelated; flex: none; }

/* v0.29.1「做完的目标淡下去」（11-24，他说做完和没做完只差勾钮颜色反过来，不够明显；板 docs/UI改版/打勾/，他 11-24 定「就用乙」）：
   没做的卡照旧（白卡 + 浅灰钮绿勾，照 Finch）；做完的卡变平变淡（半透明、不带阴影），左边的图变灰，字变浅（字对比度白天 ≥ 4.5、夜里约 4.5），只留一个更粗的绿底白勾 */
#app[data-look] .goal.done { background: rgba(255, 255, 255, .5); box-shadow: none; }
#app[data-look] .goal.done .well { filter: grayscale(1); opacity: .45; }
#app[data-look] .goal.done .txt { color: #5a4e44; }
#app[data-look] .goal.done .txt small { color: #6a5e52; }
#app[data-look] .goal.done .tick { box-shadow: none; }
#app[data-look] .goal.done .tick::after { left: 17px; top: 6px; width: 11px; height: 20px; border-width: 0 5px 5px 0; }

/* ===== v0.30「练习页像游戏」（11-24 用户：练习选择界面太像网站）=====
   顶上 ta + 气泡（今天还能领几次元气）→ 安心盒一块大珊瑚色按钮 → 肯定语 → 分类大方块 4 个一排（丙图标 + 名字 + 数量，选中浅绿底深绿框）
   → 两列练习卡（整张能点：左上分类图标、右上时长胶囊、名字、两行说明，做过的右上角绿勾）。课程、测一测两类还是原来的行。 */
#app .prhead { display: flex; align-items: flex-end; gap: 6px; margin: 2px 0 12px; }
#app .prhead .elfpic { flex: none; line-height: 0; margin-bottom: -4px; }
#app .prhead .elfpic canvas { display: block; }
#app .pbub { position: relative; flex: 1; min-width: 0; background: var(--card); border-radius: 18px; padding: 11px 14px 10px; box-shadow: 0 3px 0 var(--sh); margin-bottom: 14px; }
#app .pbub::before { content: ''; position: absolute; left: -7px; bottom: 16px; width: 16px; height: 16px; background: inherit; transform: rotate(45deg); border-radius: 3px; }
#app .pbub p { position: relative; margin: 0 0 7px; font-size: 15.5px; font-weight: 800; line-height: 1.35; color: var(--tx); }
#app .prw { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 7px; border-radius: 99px; background: #e4f3ec; color: #3f7a60; font-size: 12.5px; font-weight: 800; }
#app .prw.full { background: var(--well); color: var(--sub); }
#app .prw img { width: 16px; height: 16px; }

#app .aidbig { width: 100%; display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 14px 15px; border: 0; border-radius: 20px; cursor: pointer; text-align: left;
  background: #e86b5e; box-shadow: inset 0 -5px 0 #c4544a, 0 3px 0 var(--sh); color: #fff; }
#app .aidbig:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 #c4544a, 0 1px 0 var(--sh); }
#app .aidbig .aidic { flex: none; width: 48px; height: 48px; border-radius: 14px; background: #fff6ee; display: flex; align-items: center; justify-content: center; }
#app .aidbig .aidic img { width: 32px; height: 32px; }
#app .aidbig .at { flex: 1; min-width: 0; }
#app .aidbig b { display: block; font-size: 18px; font-weight: 900; }
#app .aidbig small { display: block; margin-top: 1px; font-size: 13px; font-weight: 700; color: #ffe6df; }
#app .aidbig .chev { font-style: normal; font-size: 28px; font-weight: 900; line-height: 1; opacity: .85; }

#app .pcats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 14px; }
#app .pcat { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 10px 2px 11px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--card); box-shadow: inset 0 -4px 0 var(--ledge), 0 2px 0 var(--sh); color: var(--tx); }
#app .pcat:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--ledge); }
#app .pcat.on { background: #e4f3ec; box-shadow: inset 0 0 0 3px var(--mint-d), inset 0 -5px 0 var(--mint-d); }
#app .pcat .pct { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -3px 0 rgba(23, 20, 36, .1); }
#app .pcat .pct img { width: 32px; height: 32px; }
#app .pcat .pcn { font-size: 13.5px; font-weight: 900; line-height: 1.15; max-width: 100%; overflow-wrap: anywhere; text-align: center; }
#app .pcat small { position: absolute; right: 6px; top: 5px; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--well); color: var(--sub); font-size: 10.5px; font-weight: 800; line-height: 16px; text-align: center; }
#app .pcat.on small { background: var(--mint-d); color: #fff; }

#app .psec { display: flex; align-items: center; gap: 6px; margin: 0 2px 8px; }
#app .psec h3 { margin: 0; flex: 1; }
#app .psec .info { margin: 0; }
#app .pcards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#app .pcard { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; padding: 11px 12px 14px; border: 0; border-radius: 18px; cursor: pointer; text-align: left;
  background: var(--card); box-shadow: inset 0 -4px 0 var(--ledge), 0 2px 0 var(--sh); color: var(--tx); }
#app .pcard:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--ledge); }
#app .pcard .ptop { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 4px; margin-bottom: 2px; }
#app .pcard .pci { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -3px 0 rgba(23, 20, 36, .1); }
#app .pcard .pci img { width: 32px; height: 32px; }
#app .pcard .ptime { padding: 2px 8px; border-radius: 99px; background: var(--well); color: var(--sub); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
#app .pcard b { font-size: 15px; font-weight: 900; line-height: 1.25; overflow-wrap: anywhere; }
#app .pcard small { font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#app .pcard.done { background: #eef7f2; }
#app .pcard .pdone { position: absolute; left: 40px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--mint-d); color: #fff; font-style: normal; font-size: 12px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--card); }
/* 练习页上的肯定语：浅黄便签 + 小标签（只在练习页，.prhead 后面那张） */
#app[data-look] .prhead ~ .affcard { background: #fff4d6; box-shadow: inset 0 -4px 0 #ecd9a6, 0 2px 0 var(--sh); padding: 10px 14px 8px; }
#app[data-look] .prhead ~ .affcard > small { display: inline-block; padding: 2px 9px; border-radius: 99px; background: #efbf3f; color: #fff; font-size: 11.5px; font-weight: 900; }
#app[data-look] .prhead ~ .affcard p { margin: 6px 0 6px; }
/* 课程、测一测两类在练习页里也成卡片（内容和按钮不变，只去掉虚线、加白底和台阶） */
#app[data-look] .psec ~ .prac { margin: 0 0 10px; padding: 12px 12px 14px; border: 0; border-radius: 18px; background: var(--card); box-shadow: inset 0 -4px 0 var(--ledge), 0 2px 0 var(--sh); }

/* 服务端 v1：商店店门下面「用 CiDi Coin 买」一栏（ui/cloud.js paidShelf，试玩版不出现）：和设置页的白卡一行一样 */
#app[data-look] #panel .paid-shelf { background: var(--card); border-radius: var(--r); box-shadow: 0 4px 0 var(--sh); overflow: hidden; }
#app[data-look] #panel .paid-shelf .grow { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 14px; }
#app[data-look] #panel .paid-shelf .grow + .grow { box-shadow: inset 0 1px 0 #ebe4d8; }
#app[data-look] #panel .paid-shelf .gic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -2px 0 rgba(23, 20, 36, .08); }
#app[data-look] #panel .paid-shelf .gic img { width: 32px; height: 32px; }
#app[data-look] #panel .paid-shelf .gt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#app[data-look] #panel .paid-shelf .gt b { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--tx); }
#app[data-look] #panel .paid-shelf .gt small { font-size: 12.5px; font-weight: 500; color: var(--sub); }
#app[data-look] #panel .paid-shelf .btn { flex: none; width: auto; min-width: 64px; margin: 0; }
#app[data-look] #panel .paid-foot { margin: 8px 8px 0; font-size: 12.5px; line-height: 1.5; font-weight: 600; color: var(--hd); }

/* 上架版（tools/build_release.py 加的）：声明里的链接、找人聊聊里的热线 */
#legal a, .about a, .hotlines a { color: var(--mint-d); }
.hotlines-h { margin-bottom: 2px; }
.hotlines p { margin: 4px 0; }
.hotlines a { font-weight: 700; }
