:root {
  --paper: #f6f7fb;
  --sky: #dfeafd;
  --sage: #4d71a5;
  --orange: #c2493f;
  --ink: #2f3f5c;
  --muted: #5f6d86;
  --line: #dde3ee;
  --sakura: #f7c3cf;
  --rapeseed: #e2dd2f;
  --lake: #37bbc9;
  --shadow: 0 2px 10px rgba(47, 63, 92, .07);
}
* { box-sizing: border-box; min-width: 0; }
html, body { overflow-x: hidden; }
body { margin: 0; background: var(--paper) url(assets/grain.png); color: var(--ink); font: 16px/1.7 -apple-system, "PingFang SC", "Noto Sans SC", sans-serif; overflow-wrap: anywhere; }
main { max-width: 520px; margin: 0 auto; padding: 8px 16px 48px; }
h1 { font-size: 20px; margin: 0; font-weight: 600; letter-spacing: .08em; }
h1.brand { font-size: 26px; margin: 12px 0 4px; letter-spacing: 2px; }
h2 { font-size: 18px; margin: 20px 0 8px; color: var(--muted); font-weight: 600; letter-spacing: .06em; }
h2.lead { margin: 6px 0 2px; color: var(--ink); }
h3 { font-size: 15px; margin: 22px 0 6px; color: var(--muted); font-weight: 600; letter-spacing: .06em; }
p { margin: 6px 0; }
.sub, .hint, .center { color: var(--muted); }
.center { text-align: center; }
.small { font-size: 13px; }
.grow { flex: 1; }
.grow-right { margin-left: auto; }
img { max-width: 100%; }
.icon-sm { width: 22px; height: 22px; vertical-align: -5px; }
.intro { list-style: none; padding: 0; margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.8; text-align: center; }
.hero { width: 100%; max-height: 40vh; object-fit: cover; object-position: center 70%; border-radius: 6px; display: block; margin: 8px 0 12px; }

/* 顶栏 */
.topbar { display: flex; align-items: center; gap: 8px; padding: 6px 0 10px; }
.topbar h1 { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { flex: 0 0 auto; min-width: 44px; height: 36px; border: 0; background: none; color: var(--muted); font-size: 28px; line-height: 1; padding: 0; text-align: left; cursor: pointer; }
.back.text { font-size: 14px; text-align: right; }

/* 表单 */
input, textarea { width: 100%; font: inherit; padding: 12px 14px; margin: 6px 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
textarea { resize: none; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { opacity: .5; cursor: default; }
.primary { width: 100%; margin: 10px 0; padding: 12px; border: 0; border-radius: 6px; background: var(--orange); color: #fff; font-weight: 600; }
.secondary { width: 100%; margin: 8px 0; padding: 11px; border: 0; border-radius: 6px; background: #fff; color: var(--sage); font-weight: 600; box-shadow: var(--shadow); }
.slim { width: auto; padding: 9px 16px; margin: 6px 0; white-space: nowrap; }
.link { border: 0; background: none; color: var(--muted); text-decoration: underline; padding: 8px 0; display: block; margin: 0 auto; }
.link.danger { color: var(--orange); }
.error { color: var(--orange); min-height: 1em; }
.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; }
.with-count { position: relative; }
.with-count .count { position: absolute; right: 12px; bottom: 12px; font-size: 12px; color: var(--muted); background: #fff; padding: 0 4px; }
.with-count input { padding-right: 60px; }
.with-count textarea { padding-bottom: 28px; }
.count.over { color: var(--orange); }
.quote { color: var(--ink); text-align: center; font-size: 17px; }

/* 头像与胶囊 */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--sky); flex: 0 0 auto; }
.avatar.sm { width: 36px; height: 36px; }
.avatar.lg { width: 72px; height: 72px; }
.avatar.xl { width: 140px; height: 140px; display: block; margin: 0 auto 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.chip { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--sky); border: 0; color: var(--ink); font-size: 14px; line-height: 1.7; }
.chip.pickable.on { background: var(--sage); color: #fff; }
.chip.pickable:disabled { opacity: .4; }
.chip-wrap { display: inline-flex; align-items: center; }
.chip-x { border: 0; background: none; color: var(--muted); font-size: 18px; padding: 0 4px; line-height: 1; }
.pet-row { display: flex; gap: 14px; align-items: center; margin: 6px 0 4px; }
.pet-card .chips { justify-content: center; }

/* 小窝：宠物卡 = 一张明信片，入口图标直接放在纸面上 */
.pet-card { text-align: center; padding: 10px 10px 18px; background: #fff; border-radius: 6px; box-shadow: var(--shadow); }
.pet-card h2.lead { font-size: 22px; letter-spacing: .06em; margin: 14px 0 6px; }
.pet-card .quote { color: var(--muted); margin: 6px 0 10px; }
.portrait { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 3px; background: var(--sky); }

/* 小窝顶部的家：4:5 场景图，道具与头像按百分比叠上去 */
.scene { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 3px; overflow: hidden; background: var(--sky) center / cover no-repeat; }
.scene > * { position: absolute; display: block; }
.scene-prop { aspect-ratio: 1; object-fit: contain; }
.scene-mail { aspect-ratio: 1; object-fit: contain; }
.scene-pet { aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid #fff; box-shadow: var(--shadow); background: var(--sky); }
.scene-cut { width: auto; filter: drop-shadow(0 1px 1px rgba(60, 40, 20, .18)); }
.scene-shadow { width: 20%; border-radius: 50%; background: rgba(60, 40, 20, .27); filter: blur(4px); }
.scene-sun { width: 36%; background: rgba(255, 236, 180, .72); mix-blend-mode: screen; filter: blur(10px); transform-origin: 50% 100%; } /* 从窗那侧斜照下来的一条光，边缘羽化；画在宠物之前所以不压它 */
.scene-cut { transition: left .9s ease, top .9s ease, height .9s ease; }
.scene-shadow { transition: left .9s ease, top .9s ease; }
.scene-night { inset: 0; background: rgba(32, 44, 80, .42); } /* 22～06 屋里只留一点光 */
.scene-find { aspect-ratio: 1; object-fit: contain; }
.scene-night-window { background: rgba(24, 34, 72, .72); } /* 夜里窗玻璃也暗：压在 .scene-night 之上的第二层，只盖玻璃不盖框 */
.scene-night-window.round { border-radius: 50%; }
.scene-suitcase { pointer-events: none; }
.scene-luggage { aspect-ratio: 1; object-fit: contain; }
.scene-visitor { transition: none; }
details.luggage { margin: 8px 0 2px; padding: 6px 12px 8px; background: var(--paper); border-radius: 6px; text-align: left; }
details.luggage summary { font-size: 14px; color: var(--ink); cursor: pointer; }
details.luggage .gear-grid { margin-top: 8px; }
.daily.catchup { background: #fff; box-shadow: var(--shadow); }
.daily.catchup b { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.daily.catchup ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; }
.visit-row span.hint { display: block; margin-top: 2px; }
.visit-row .chips { margin-top: 6px; }
.scene-note { width: 36%; background: #fff; border-radius: 3px; box-shadow: var(--shadow); padding: 6px 8px; box-sizing: border-box; font-size: 11px; line-height: 1.35; color: var(--ink); display: flex; flex-direction: column; justify-content: center; } /* 高度与 translateX 由 placeBottom 内联给 */
.scene-note b { font-weight: 600; }
.scene-note span { color: var(--muted); }
.scene-bubble.fade { opacity: 0; transition: opacity .9s ease .3s; }
.scene-bubble { width: 50%; background: #fff; border-radius: 6px; box-shadow: var(--shadow); padding: 6px 10px; font-size: 13px; line-height: 1.4; color: var(--ink); text-align: left; } /* 开门回应；不叫 .bubble，免得跟群聊气泡的规则叠在一起 */
.daily.today { background: #fff; box-shadow: var(--shadow); }
.daily.today b { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.daily { margin: 8px 0 2px; padding: 8px 12px; background: var(--paper); border-radius: 6px; font-size: 15px; text-align: left; }
.daily p { margin: 0; }
.daily.hint { text-align: center; background: none; padding: 2px 0; }
.status { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0; padding: 3px 14px; border-radius: 999px; background: var(--sky); color: var(--ink); font-size: 14px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); flex: 0 0 auto; }
.status.traveling::before { background: var(--orange); }
.actions { margin-top: 8px; }
.actions .primary, .actions .secondary { margin: 6px 0; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 22px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border: 0; background: none; font-size: 13px; color: var(--ink); }
.tile img { width: 52px; height: 52px; display: block; }
.badge { position: absolute; top: 2px; right: 18%; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }

/* 领养 */
.candidates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.candidate { padding: 0; border: 0; border-radius: 6px; background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.candidate img { width: 100%; display: block; aspect-ratio: 1; object-fit: cover; }
.spinner { width: 36px; height: 36px; margin: 24px auto; border: 3px solid var(--line); border-top-color: var(--sage); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 选家 */
.home-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 8px 0 4px; }
.home-tile { position: relative; padding: 0 0 6px; border: 2px solid transparent; border-radius: 6px; background: #fff; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 14px; color: var(--ink); }
.home-tile img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--sky); }
.home-tile.on { border-color: var(--orange); }
.home-tile:disabled { opacity: .55; }
.home-tile:disabled img { filter: grayscale(.8); }
.home-lock { font-size: 12px; color: var(--muted); }
.link.left { margin: 0; padding: 2px 0; text-align: left; font-size: 13px; }

/* 插图（落地页主图、空状态、在路上）与纸飞机 */
.illus { display: block; width: 100%; border-radius: 6px; margin: 8px 0 12px; background: var(--paper); }
.illus.fade { animation: fadeIn .8s ease-out both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.plane { position: absolute; width: 64px; height: 64px; }
.sky { height: 60vh; position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.fly-out { left: 40px; bottom: 40vh; animation: flyOut 1.5s ease-in forwards; }
@keyframes flyOut {
  0% { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; }
  100% { transform: translate(110vw, -40vh) rotate(-25deg) scale(.5); opacity: 0; }
}
.letter { background: #fff; border-radius: 6px; padding: 22px 16px 14px; box-shadow: var(--shadow); }
.letter.open { animation: openLetter .5s ease-out; }
@keyframes openLetter { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .plane { animation: none; display: none; } .illus.fade, .letter.open { animation: none; } }
.empty { padding: 12px 0 20px; text-align: center; }
.empty .illus { margin-bottom: 4px; }
.mail { background: #fff; border-radius: 6px; padding: 12px 14px; margin: 10px 0; box-shadow: var(--shadow); }
.mail-head { display: flex; gap: 10px; align-items: center; }
.mail .quote { text-align: left; font-size: 15px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--paper); color: var(--muted); white-space: nowrap; }
.tag.accepted { background: var(--sky); color: var(--sage); }

/* 邀请卡 */
.card { text-align: center; }
/* 上一趟没聊成的小卡 */
.notice { margin: 12px 0; padding: 10px 14px; border-radius: 6px; background: #fff; box-shadow: var(--shadow); color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.notice p { margin: 0; flex: 1; }
.notice .link { margin: 0; padding: 0; font-size: 13px; white-space: nowrap; }
.invite-card { width: 100%; max-width: 300px; aspect-ratio: 3 / 4; display: block; margin: 0 auto; border-radius: 6px; box-shadow: var(--shadow); background: var(--sky); }

/* 群聊 */
.crew { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
.crew::-webkit-scrollbar { display: none; }
.crew figure { margin: 0; flex: 0 0 56px; width: 56px; text-align: center; }
.crew img { display: block; width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; object-fit: cover; background: var(--sky); }
.crew figcaption { font-size: 12px; line-height: 1.3; margin-top: 3px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.decision { position: relative; background: #fff; border-radius: 6px; padding: 14px 16px 10px; margin: 8px 0; box-shadow: var(--shadow); }
.decision p { margin: 2px 0; font-size: 15px; }
.stamp { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 120px; min-height: 92px; margin: -6px 0 2px -10px; padding: 12px 36px 12px 18px; color: var(--orange); font-weight: 600; font-size: 20px; letter-spacing: .06em; transform: rotate(-3deg); }
.stamp::before { content: ""; position: absolute; inset: 0; background: url(assets/ui-stamp.png) center / contain no-repeat; opacity: .38; }
.stamp span { position: relative; text-shadow: 0 0 6px #fff, 0 0 2px #fff; }
.itinerary { margin: 8px 0 0; padding-left: 0; list-style: none; border-top: 1px solid var(--line); }
.itinerary li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.itinerary li:last-child { border-bottom: 0; }
.bubbles { margin-top: 6px; }
.round-sep { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; color: var(--muted); font-size: 12px; }
.round-sep::before, .round-sep::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* 发言与准备动态共用：白卡片 + 左侧 3px 宠物色条；我家那只 = sky 底、无色条 */
.msg, .prep { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.msg .avatar, .prep .avatar { margin-top: 2px; }
.bubble, .prep-body { flex: 1; padding: 8px 12px 10px; border-radius: 6px; background: #fff; box-shadow: var(--shadow); border-left: 3px solid var(--line); font-size: 15px; word-break: break-word; }
.c0 { border-left-color: var(--sakura); }
.c1 { border-left-color: var(--rapeseed); }
.c2 { border-left-color: var(--lake); }
.c3 { border-left-color: var(--sage); }
.c4 { border-left-color: var(--sky); }
.msg.mine .bubble, .prep.mine .prep-body { background: var(--sky); border-left-color: transparent; }
.msg-head, .prep-head { display: flex; align-items: baseline; gap: 6px; }
.msg-head b, .prep-head b { font-size: 12px; color: var(--muted); font-weight: 500; }
.msg-head .hide, .prep-head .hide { white-space: nowrap; text-decoration: none; }
.bubble p { margin: 2px 0 0; line-height: 1.6; }
.hidden-msg { opacity: .45; }
.msg.hidden-msg .bubble p, .prep.hidden-msg .prep-line p { text-decoration: line-through; }

/* 叮嘱 / 悄悄话 */
.whisper { position: sticky; bottom: 0; margin: 16px -16px -48px; padding: 8px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
.whisper .row input { margin: 4px 0; }
.whisper .primary.slim { width: 48px; padding: 8px 0; margin: 4px 0; display: inline-flex; align-items: center; justify-content: center; }
.whisper .primary.slim img { width: 30px; height: 30px; display: block; }
.whisper p { margin: 2px 0; }
.said { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.said img { width: 22px; height: 22px; }

/* 准备动态时间线 */
.prep-title { margin: 14px 0 4px; }
.prep-icon { width: 30px; height: 30px; flex: 0 0 auto; object-fit: contain; }
.chip.small { font-size: 12px; padding: 0 9px; line-height: 1.6; align-self: flex-start; }
.prep-list { margin-top: 4px; }
.round-sep.thin { margin: 10px 0 4px; font-size: 11px; }
.prep-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 3px; }
.prep-line p { margin: 0; flex: 1; font-size: 15px; line-height: 1.6; word-break: break-word; }
.prep-fold { margin: 10px 0 4px; padding: 0 12px; background: #fff; border-radius: 6px; box-shadow: var(--shadow); }
.prep-fold summary { padding: 10px 0; font-size: 14px; color: var(--muted); cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.prep-fold summary::-webkit-details-marker { display: none; }
.prep-fold summary::before { content: "›"; display: inline-block; font-size: 18px; line-height: 1; transition: transform .2s; }
.prep-fold[open] summary::before { transform: rotate(90deg); }
.prep-fold .prep-list { padding-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .prep-fold summary::before { transition: none; } }

/* 小窝：最新动态小条 */
.latest-prep { display: flex; align-items: center; gap: 10px; width: 100%; margin: 10px 0 0; padding: 10px 12px; border: 0; border-radius: 6px; background: #fff; box-shadow: var(--shadow); color: var(--ink); text-align: left; font: inherit; }
.latest-prep .grow { display: flex; flex-direction: column; min-width: 0; }
.latest-prep b { font-size: 12px; color: var(--muted); font-weight: 500; }
.latest-prep span:not(.grow):not(.hint) { font-size: 14px; line-height: 1.5; }
.latest-prep .hint { white-space: nowrap; align-self: flex-start; }

/* 明信片 */
.postcard { margin: 14px 0; background: #fff; padding: 12px 12px 10px; border-radius: 6px; box-shadow: var(--shadow); display: block; width: 100%; text-align: left; border: 0; font: inherit; color: inherit; }
.postcard.clickable { cursor: pointer; }
.postcard.pending { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 8px 0; color: var(--muted); font-size: 14px; }
.postcard.pending img { width: 96px; height: 48px; object-fit: cover; border-radius: 3px; flex: 0 0 auto; }
.pc-head { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.pc-photo { position: relative; }
.pc-photo img { width: 100%; display: block; border-radius: 3px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 75%; background: var(--sky); }
.pc-photo .hide { position: absolute; right: 6px; top: 6px; background: rgba(255,255,255,.9); border-radius: 6px; padding: 2px 8px; }
.photo-error { text-align: center; color: var(--muted); padding: 40px 0; background: var(--sky); border-radius: 3px; margin: 0; }
.note { padding: 10px 12px; margin: 10px 0 0; border-left: 3px solid var(--line); background: var(--paper); border-radius: 0 6px 6px 0; font-size: 15px; }
.note.mine { border-left-color: var(--orange); }
.note b { font-size: 13px; color: var(--muted); font-weight: 500; }
.note p { margin: 2px 0 0; white-space: pre-wrap; }

/* 相册 */
.album { list-style: none; padding: 0; margin: 0; }
.album button { width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; margin: 8px 0; border: 0; border-radius: 6px; background: #fff; box-shadow: var(--shadow); color: var(--ink); text-align: left; }
.hide { margin-left: 8px; border: 0; background: none; color: var(--orange); font-size: 13px; }
.daily-row { background: #fff; border-radius: 6px; padding: 8px 12px; margin: 6px 0; box-shadow: var(--shadow); font-size: 14px; }
.daily-row b { font-size: 12px; color: var(--muted); font-weight: 500; }
.daily-row p { margin: 2px 0; }
.temp-pass { font-family: ui-monospace, monospace; font-size: 14px; margin-left: 8px; color: var(--ink); }
.chip.event { background: var(--sky); color: var(--ink); }
.chip.event.rare { background: var(--rapeseed); }
.pc-photo.extra { margin-top: 10px; }
.pc-photo.extra p { margin: 0 0 4px; }
.share-actions { display: flex; gap: 8px; margin-top: 10px; }
.share-actions .slim { flex: 1; margin: 0; }
.share-preview img { width: 100%; display: block; margin-top: 10px; border-radius: 3px; box-shadow: var(--shadow); }

/* 装备 */
.gear-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.gear-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; border: 2px solid transparent; border-radius: 6px; background: #fff; box-shadow: var(--shadow); font-size: 12px; color: var(--ink); }
.gear-tile.on { border-color: var(--orange); }
.gear-icon { width: 40px; height: 40px; display: block; }
.gear-line { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gear-line .gear-icon { width: 22px; height: 22px; display: inline-block; vertical-align: -6px; margin-right: 2px; }

/* 特产 */
.souvenir-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.souvenir { margin: 0; text-align: center; font-size: 13px; }
.souvenir-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; background: var(--sky); display: block; }
.souvenir-img.none { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.souvenir figcaption b { display: block; font-size: 14px; }
.souvenir.sm figcaption { font-size: 12px; }
.homecoming .link { margin-top: 6px; }

/* 相册四栏 */
.tabs { display: flex; gap: 6px; margin: 4px 0 10px; background: #fff; border-radius: 6px; padding: 4px; box-shadow: var(--shadow); }
.tab { flex: 1; padding: 8px 0; border: 0; border-radius: 4px; background: none; color: var(--muted); font-size: 14px; }
.tab.on { background: var(--sky); color: var(--ink); font-weight: 600; }
.shelf .souvenir { background: #fff; border-radius: 6px; padding: 6px 6px 8px; box-shadow: var(--shadow); }
.shelf .link.small { font-size: 12px; padding: 4px 0 0; }
.stamp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stamp-tile { border: 0; background: none; padding: 0; }
.stamp-tile img { width: 100%; display: block; }

/* 收集框 */
.continent-chips, .type-chips { margin: 0 0 10px; }
.chip.on { background: var(--sage); color: #fff; }
.chip.off { color: var(--muted); background: none; box-shadow: inset 0 0 0 1px var(--line); }
.country-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.country { background: none; box-shadow: inset 0 0 0 1px var(--line); border-radius: 6px; padding: 8px; min-height: 56px; }
.country b { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.country.on { background: #fff; box-shadow: var(--shadow); }
.country.on b { color: var(--ink); font-weight: 600; }
.country .stamp-tile { display: block; width: 100%; }
.country .stamp-tile img { width: 100%; max-width: 150px; margin: 0 auto; }
.lines, .transports, .type-counts { margin-top: 16px; }
.line-row { background: #fff; border-radius: 6px; padding: 10px 12px; margin: 6px 0; box-shadow: var(--shadow); }
.line-row b { font-size: 14px; }
.line-stops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.line-stop { border: 0; border-radius: 999px; padding: 2px 10px; font-size: 13px; background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.line-stop.on { background: var(--sky); box-shadow: none; color: var(--ink); }
.transport-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.transport { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 6px; background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 12px; }
.transport.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.transport:not(.on) .transport-icon { opacity: .35; }
.transport-icon { width: 40px; height: 40px; }
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.type-tile { position: relative; border: 0; background: #fff; border-radius: 6px; padding: 6px; box-shadow: var(--shadow); text-align: left; }
.type-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 75%; border-radius: 3px; display: block; background: var(--sky); }
.type-img.none { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.type-tile .rarity { position: absolute; top: 10px; left: 10px; }
.rarity { display: inline-block; border-radius: 999px; padding: 0 8px; font-size: 12px; line-height: 20px; margin-left: 6px; }
.rarity.gold { background: var(--orange); color: #fff; }
.rarity.silver { background: var(--sky); color: var(--ink); }
.finds { margin-top: 16px; }
.find-group { margin-top: 10px; }
.find-group > b { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.finds-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.find { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 6px; color: var(--muted); font-size: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.find.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.find.on.rare { background: var(--sky); }
.find:not(.on) .find-icon { opacity: .35; }
.find-icon { width: 36px; height: 36px; }

/* 自己出门 */
.toggle-row { margin-top: 18px; }
.toggle { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.toggle input { width: 22px; height: 22px; margin: 2px 0 0; flex: 0 0 auto; }
.self-started { margin: 0 0 6px; }
.self-started .chip { background: var(--rapeseed); }
