/* 我们的小窝 —— 自研样式（原创，可自由修改） */

* { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --bg: #fdf8f6;
  --bg2: #f7eeef;
  --card: #ffffff;
  --tx: #3b3235;
  --tl: #a2949a;
  --pri: #e4718f;
  --pri-2: #f3a9bb;
  --soft: #fbeff2;
  --line: rgba(59, 50, 53, .09);
  --shadow: 0 6px 24px rgba(150, 110, 120, .10);
  --r: 16px;
  --ok: #57a889;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --bg: #1c191c;
  --bg2: #232024;
  --card: #262227;
  --tx: #efe6e9;
  --tl: #9b8f95;
  --pri: #f08aa4;
  --pri-2: #b96d80;
  --soft: #332a2e;
  --line: rgba(255, 255, 255, .08);
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
}

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--tx);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 84px;
}

body.has-bg { background-size: cover; background-position: center; background-attachment: fixed; }

a { color: var(--pri); text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap { max-width: 620px; margin: 0 auto; padding: 26px 18px 40px; }

/* 顶部 */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .5px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pri); }

.theme-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--card); color: var(--tx); font-size: 16px; box-shadow: var(--shadow);
}

/* 头图 */
.hero { text-align: center; padding: 14px 0 8px; }

.avrow { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }

.av {
  width: 68px; height: 68px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--soft); font-size: 30px;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 4px 16px rgba(190, 130, 145, .18);
  position: relative;
}
.av::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pri-2), var(--pri));
  z-index: -1;
}
.av img { width: 100%; height: 100%; object-fit: cover; }

.link-heart { color: var(--pri); font-size: 18px; line-height: 1; opacity: .85; }

.hero h1 { margin: 4px 0 6px; font-size: 26px; letter-spacing: 1px; }

.hero .names { color: var(--tl); font-size: 14px; letter-spacing: 2px; }

.badge {
  display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px;
  background: var(--soft); color: var(--pri); font-size: 12px; letter-spacing: .5px;
}

.kicker { font-size: 11px; letter-spacing: 3px; color: var(--tl); }

/* 卡片 */
.card {
  background: var(--card); border-radius: var(--r); padding: 20px;
  box-shadow: var(--shadow); margin-bottom: 16px;
}

/* 计时 */
.counter { text-align: center; }
.counter .label { color: var(--tl); font-size: 13px; letter-spacing: 2px; }
.counter .num { font-size: 40px; font-weight: 800; letter-spacing: 1px; color: var(--pri); line-height: 1.15; margin: 4px 0; }
.counter .sub { color: var(--tl); font-size: 13px; }
.counter .since { margin-top: 8px; font-size: 12px; color: var(--tl); letter-spacing: 1px; }

.mile-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 2px; margin-top: 14px; }
.mile { flex: 0 0 auto; background: var(--soft); border-radius: 12px; padding: 8px 12px; text-align: center; min-width: 82px; }
.mile b { display: block; font-size: 12px; }
.mile span { display: block; font-size: 11px; color: var(--tl); }
.mile.passed { opacity: .42; }

/* 数据条 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { text-align: center; padding: 10px 0; border-radius: 12px; background: var(--soft); }
.stat b { display: block; font-size: 20px; color: var(--pri); }
.stat span { font-size: 12px; color: var(--tl); }

/* 区块标题 */
.sect { display: flex; align-items: center; gap: 10px; margin: 24px 2px 12px; }
.sect h2 { font-size: 15px; margin: 0; letter-spacing: 1px; }
.sect .line { flex: 1; height: 1px; background: var(--line); }
.sect .more { font-size: 12px; color: var(--tl); }

/* 说说 */
.post { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.phead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pav { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 19px; flex: 0 0 auto; }
.pav img { width: 100%; height: 100%; object-fit: cover; }
.pwho { flex: 1; min-width: 0; }
.pwho .nm { font-weight: 700; font-size: 14px; }
.pwho .tm { font-size: 12px; color: var(--tl); }
.mood { font-size: 20px; }

.ptitle { font-weight: 700; margin: 2px 0 6px; font-size: 15px; }
.pplace { display: inline-block; font-size: 12px; color: var(--tl); background: var(--soft); padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; }
.pbody { font-size: 14px; word-break: break-word; }
.pbody p { margin: 0 0 8px; }
.pbody p:last-child { margin-bottom: 0; }

.pimgs { display: grid; gap: 6px; margin-top: 10px; }
.pimgs.c1 { grid-template-columns: 1fr; }
.pimgs.c2 { grid-template-columns: 1fr 1fr; }
.pimgs.c3 { grid-template-columns: repeat(3, 1fr); }
.pimgs img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
/* 单图：整张原比例铺满卡片宽度，不留粉色底边 */
.pimgs.c1 img { display: block; width: 100%; max-height: 460px; aspect-ratio: auto; object-fit: cover; background: transparent; }

.ptags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ptags span { font-size: 12px; color: var(--pri); background: var(--soft); padding: 2px 9px; border-radius: 999px; }

.pfoot { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--tl); }

/* 评论 */
.comments { margin-top: 6px; }
.cmt { display: flex; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); }
.cmt .cn { font-weight: 700; font-size: 13px; }
.cmt .cb { font-size: 13px; }
.cmt .ct { font-size: 11px; color: var(--tl); }
.reply { margin-top: 6px; color: var(--pri); font-size: 13px; }

.cmt-form { margin-top: 12px; display: grid; gap: 8px; }
input[type=text], input[type=password], input[type=date], input[type=number], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--tx); font-family: var(--font); font-size: 14px; outline: none;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, textarea:focus, select:focus { border-color: var(--pri-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 11px; border: none; cursor: pointer;
  background: var(--pri); color: #fff; font-family: var(--font); font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(228, 113, 143, .28);
}
.btn.ghost { background: var(--soft); color: var(--pri); box-shadow: none; }
.btn.small { padding: 6px 12px; font-size: 12px; border-radius: 9px; }
.btn.danger { background: #d9534f; box-shadow: none; }

/* 相册 */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid .cell { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 1 / 1; background: var(--soft); }
.grid img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .25s; }
.grid .cell:hover img { transform: scale(1.04); }
.grid .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); opacity: 0; transition: opacity .2s; }
.grid .cell:hover .cap { opacity: 1; }

.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .92); display: none; align-items: center; justify-content: center; z-index: 900; cursor: zoom-out; padding: 20px; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* 地图 */
#map { height: 300px; border-radius: 14px; overflow: hidden; background: var(--soft); }
.place { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.place .pinfo { flex: 1; }
.place .pname { font-weight: 700; font-size: 14px; }
.place .pmeta { font-size: 12px; color: var(--tl); }
.place .pnote { font-size: 13px; margin-top: 4px; }

/* 清单 */
.todo { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.todo .box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--pri-2); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; flex: 0 0 auto; }
.todo.done .box { background: var(--ok); border-color: var(--ok); }
.todo.done .txt { text-decoration: line-through; color: var(--tl); }
.todo .txt { flex: 1; font-size: 14px; }
.progress { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; margin: 10px 0 4px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--pri-2), var(--pri)); }

/* 今日待办 · 三个人各自一栏、颜色分开 */
.tp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.tp-date { font-weight: 800; font-size: 15px; letter-spacing: .5px; }
.tp-ring { text-align: center; flex: 0 0 auto; background: var(--soft); border-radius: 12px; padding: 8px 14px; }
.tp-ring b { display: block; color: var(--pri); font-size: 18px; line-height: 1.2; }
.tp-ring span { font-size: 10px; color: var(--tl); letter-spacing: 1px; }

.tp-wrap { display: grid; gap: 12px; }
@media (min-width: 680px) { .tp-wrap { grid-template-columns: repeat(3, 1fr); align-items: start; } }

.tp-card {
  --who: #e4718f; --who-soft: #fdeef2;
  background: var(--card); border-radius: var(--r); padding: 14px;
  box-shadow: var(--shadow); border-top: 3px solid var(--who);
  display: flex; flex-direction: column;
}
.tp-card.a1 { --who: #e4718f; --who-soft: #fdeef2; }
.tp-card.a2 { --who: #6f9fd8; --who-soft: #eef4fc; }
.tp-card.a3 { --who: #6bb389; --who-soft: #eef8f2; }
[data-theme="dark"] .tp-card.a1 { --who-soft: rgba(228, 113, 143, .14); }
[data-theme="dark"] .tp-card.a2 { --who-soft: rgba(111, 159, 216, .14); }
[data-theme="dark"] .tp-card.a3 { --who-soft: rgba(107, 179, 137, .14); }

.tp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tp-head .pav { width: 34px; height: 34px; font-size: 16px; }
.tp-who { flex: 1; min-width: 0; }
.tp-who b { display: block; font-size: 13px; color: var(--who); }
.tp-who span { display: block; font-size: 10px; color: var(--tl); white-space: nowrap; }
.tp-pct { font-size: 11px; color: var(--who); font-weight: 700; white-space: nowrap; }

.tp-bar { height: 6px; border-radius: 999px; background: var(--who-soft); overflow: hidden; margin-bottom: 8px; }
.tp-bar i { display: block; height: 100%; background: var(--who); }

.tp-list { display: flex; flex-direction: column; gap: 2px; }
.tp-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.tp-item .box {
  width: 20px; height: 20px; padding: 0; border-radius: 6px; cursor: pointer;
  border: 2px solid var(--who); background: transparent; color: #fff;
  font-size: 11px; line-height: 1; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.tp-item.done .box { background: var(--who); }
.tp-txt { flex: 1; font-size: 13px; word-break: break-word; }
.tp-item.done .tp-txt { color: var(--tl); text-decoration: line-through; }
.tp-late {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  font-size: 10px; color: #b9812f; background: rgba(185, 129, 47, .13); text-decoration: none;
}
.tp-mini {
  border: 1px solid var(--line); background: var(--soft); color: var(--tl);
  font-size: 10px; border-radius: 8px; padding: 2px 7px; cursor: pointer;
}
.tp-x { border: 0; background: transparent; color: var(--tl); font-size: 15px; cursor: pointer; padding: 0 2px; line-height: 1; }
.tp-add { display: flex; gap: 6px; margin-top: 12px; }
.tp-add input[type=text] { flex: 1 1 auto; min-width: 0; padding: 8px 10px; font-size: 13px; }
.tp-add .btn.small { flex: 0 0 auto; white-space: nowrap; padding: 8px 12px; }

/* 后台待办分栏 */.todo-sec { margin-top: 16px; }
.todo-sec.a1 { --who: #e4718f; }
.todo-sec.a2 { --who: #6f9fd8; }
.todo-sec.a3 { --who: #6bb389; }
.todo-sec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.todo-sec-h span { font-size: 11px; color: var(--tl); }
.todo-sec .todo .box { border-color: var(--who); }
.todo-sec .todo.done .box { background: var(--who); border-color: var(--who); }

/* 页脚 */
.ft { text-align: center; color: var(--tl); font-size: 12px; padding: 26px 0 10px; line-height: 1.9; }
.ft a { color: var(--tl); text-decoration: underline; }
.ft .copy { opacity: .68; font-size: 11px; }

/* 底部导航 */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: center; gap: 4px; padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.nav a { flex: 1; max-width: 88px; text-align: center; color: var(--tl); font-size: 11px; padding: 6px 0; border-radius: 10px; }
.nav a .ic { display: block; font-size: 17px; line-height: 1.3; }
.nav a.on { color: var(--pri); background: var(--soft); font-weight: 700; }

/* 小音乐盒 */
.mp { position: fixed; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 70; }
.mp-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--pri); font-size: 20px; line-height: 1;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .14); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mp-btn.play { animation: mpPulse 2.4s ease-in-out infinite; }
@keyframes mpPulse { 0%, 100% { box-shadow: 0 8px 22px rgba(0,0,0,.14); } 50% { box-shadow: 0 8px 26px var(--pri-weak, rgba(228,113,143,.45)); } }
.mp-panel {
  position: absolute; right: 0; bottom: 58px; width: min(300px, calc(100vw - 28px));
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 12px 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
  display: none;
}
.mp.open .mp-panel { display: block; }
.mp-now { font-size: 12px; color: var(--tl); margin-bottom: 8px; }
.mp-now b { display: block; font-size: 14px; color: var(--txt); margin-top: 2px; }
.mp-list { max-height: 190px; overflow-y: auto; margin: 0 -4px 8px; }
.mp-list button {
  display: flex; gap: 8px; align-items: center; width: 100%; border: 0; background: transparent;
  color: var(--txt); font: inherit; font-size: 13px; text-align: left; padding: 7px 6px; border-radius: 9px; cursor: pointer;
}
.mp-list button:hover { background: var(--soft); }
.mp-list button.on { background: var(--soft); color: var(--pri); font-weight: 700; }
.mp-list .idx { width: 16px; color: var(--tl); font-size: 11px; }
.mp-list .kind { font-size: 10px; color: var(--tl); }
.mp-ctl { display: flex; align-items: center; gap: 8px; }
.mp-ctl button {
  flex: 1; border: 1px solid var(--line); background: var(--soft); color: var(--pri);
  border-radius: 10px; padding: 7px 0; font-size: 13px; cursor: pointer;
}
.mp-ctl button.main { background: var(--pri); color: #fff; border-color: transparent; font-weight: 700; }
.mp-hint { font-size: 11px; color: var(--tl); margin-top: 8px; }

/* 一起看电影 */
.cine-card { padding: 14px; }
.cine-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 10px; }
.cine-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tl); display: inline-block; }
.cine-dot.on { background: #4caf50; box-shadow: 0 0 0 3px rgba(76, 175, 80, .18); }
.cine-tip { font-size: 11px; color: var(--tl); }
.cine-stage { position: relative; background: #101014; border-radius: 12px; overflow: hidden; min-height: 220px; display: flex; align-items: center; justify-content: center; }
.cine-stage video { width: 100%; max-height: 68vh; display: block; }
.cine-stage:fullscreen { height: 100vh; border-radius: 0; }
.cine-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #cfd0d6; font-size: 13px; text-align: center; background: #101014; }
.cine-empty .big { font-size: 34px; }
.cine-ctl { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cine-prevwrap { margin-top: 12px; }
.cine-prevwrap video { width: 180px; border-radius: 10px; background: #000; }

/* 快捷入口卡（一起看电影 / 每日日记） */
.cine-entry, .diary-entry { display: block; }
.cine-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.de-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.de-avs { display: flex; gap: 10px; margin-top: 12px; }
.de-av { flex: 1; text-align: center; opacity: .45; }
.de-av.done { opacity: 1; }
.de-av .pav { width: 46px; height: 46px; margin: 0 auto 4px; font-size: 22px; }
.de-av span { font-size: 11px; color: var(--tl); }
.de-av.done span { color: var(--pri); font-weight: 700; }
.de-latest { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--tx); }
.de-latest .de-who { display: block; font-size: 11px; color: var(--tl); margin-bottom: 2px; }
.de-latest.muted { color: var(--tl); font-size: 12px; }

/* 每日日记 */
.diary-today { padding: 18px; }
.dt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dt-day { font-weight: 800; font-size: 16px; letter-spacing: .5px; }
.dt-sub { font-size: 12px; color: var(--tl); margin-top: 2px; }
.dt-streak { text-align: center; flex: 0 0 auto; background: var(--soft); border-radius: 12px; padding: 6px 12px; }
.dt-streak b { display: block; color: var(--pri); font-size: 18px; line-height: 1.2; }
.dt-streak span { font-size: 10px; color: var(--tl); letter-spacing: 1px; }
.dt-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.dt-slot { text-align: center; background: var(--bg2); border-radius: 12px; padding: 10px 8px; }
.dt-slot.ok { background: var(--soft); }
.dt-slot .pav { width: 42px; height: 42px; margin: 0 auto 6px; font-size: 20px; }
.dt-name { font-size: 12px; font-weight: 700; }
.dt-mood { font-size: 15px; line-height: 1.4; }
.dt-txt { font-size: 11px; color: var(--tl); margin-top: 2px; word-break: break-word; }
.dt-none { font-size: 11px; color: var(--tl); margin-top: 4px; opacity: .8; }

.dform-card { padding: 18px; }
.dform-head { font-weight: 800; font-size: 15px; margin-bottom: 2px; }
.dform { display: block; }
.mood-row { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.mood-pick { border: 1px solid var(--line); background: var(--card); border-radius: 9px; padding: 2px 8px; font-size: 16px; cursor: pointer; line-height: 1.6; }
.mood-pick:hover { background: var(--soft); }
.drop-line { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 400; font-size: 12px; }
.drop-line img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.dform-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.dgroup { margin-bottom: 14px; }
.dgroup-head { display: flex; align-items: baseline; gap: 10px; padding: 2px 2px 8px; }
.dgroup-head b { font-size: 13px; letter-spacing: .5px; }
.dgroup-head span { font-size: 11px; color: var(--tl); }
.diar { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); margin-bottom: 10px; }
.dhead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dbody { font-size: 14px; word-break: break-word; }
.dbody p { margin: 0 0 8px; }
.dbody p:last-child { margin-bottom: 0; }
.dfoot { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; justify-content: flex-end; }
.dmore { text-align: center; padding: 4px 0 10px; }

/* 日记日历条 */
.cal-card { padding: 16px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cal-head b { font-size: 15px; letter-spacing: .5px; }
.cal-year { font-size: 11px; color: var(--tl); font-weight: 400; margin-left: 2px; }
.cal-head .btn.small { padding: 2px 12px; font-size: 14px; line-height: 1.8; }
.cal-off { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { text-align: center; font-size: 11px; color: var(--tl); padding-bottom: 2px; }
.cal-cell {
  aspect-ratio: 1 / 1; border-radius: 9px; background: var(--bg2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 12px; color: var(--tl); gap: 1px;
}
.cal-cell.blank { background: transparent; }
.cal-cell.on { background: var(--card); color: var(--pri); font-weight: 700; box-shadow: inset 0 0 0 1px var(--pri-2); }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--pri-2); }
.cal-cell.sel { background: var(--pri); color: #fff; font-weight: 700; box-shadow: none; }
.cal-num { line-height: 1.1; }
.cal-dots { display: flex; gap: 2px; height: 8px; margin-top: 1px; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.cal-dot.a1 { background: #e4718f; }
.cal-dot.a2 { background: #6f9fd8; }
.cal-dot.a3 { background: #6bb389; }
.cal-cell.sel .cal-dot { opacity: .9; }
.cal-legend { display: flex; gap: 12px; justify-content: center; margin-top: 10px; font-size: 11px; color: var(--tl); }
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }
.dt-back { display: inline-block; font-size: 12px; color: var(--pri); margin-top: 4px; }

/* 日记下的回应 */
.dcms { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.dcm { padding: 6px 0; border-bottom: 1px dotted var(--line); }
.dcm:last-of-type { border-bottom: 0; }
.dcm-t { display: flex; align-items: baseline; gap: 8px; }
.dcm-t .dn { font-weight: 700; font-size: 12px; }
.dcm-t .dt2 { font-size: 11px; color: var(--tl); }
.dcm .db { font-size: 13px; margin-top: 2px; word-break: break-word; }
.dcm-box { margin-top: 8px; }
.dcm-box summary { font-size: 12px; color: var(--pri); cursor: pointer; list-style: none; padding: 4px 0; }
.dcm-box summary::-webkit-details-marker { display: none; }
.dcm-form { display: grid; gap: 6px; margin-top: 6px; }
.dcm-form textarea { min-height: 54px; }
.dcm-form .btn { justify-self: start; }

/* 提示 */
.flash { padding: 12px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 14px; background: var(--soft); color: var(--pri); }

/* 全站漂浮的小家伙 / 星屑 */
.floatlayer { position: fixed; inset: 0; z-index: 30; overflow: hidden; pointer-events: none; }
.floatlayer .fl {
  position: absolute; bottom: -14vh; display: block; color: var(--pri);
  opacity: 0; will-change: transform, opacity;
  animation-name: floatUp; animation-timing-function: linear; animation-iteration-count: infinite;
}
.floatlayer .fl img { display: block; width: 100%; height: 100%; object-fit: contain; }
@keyframes floatUp {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  12%  { opacity: var(--op, .3); }
  55%  { transform: translate3d(var(--dx, 18px), -58vh, 0) rotate(var(--spin, 12deg)); }
  88%  { opacity: var(--op, .3); }
  100% { transform: translate3d(calc(var(--dx, 18px) * -1), -122vh, 0) rotate(calc(var(--spin, 12deg) * -1)); opacity: 0; }
}

.flash.err { background: #fdeceb; color: #c0392b; }

.empty { text-align: center; color: var(--tl); font-size: 13px; padding: 34px 0; }

/* 后台 */
.admin { max-width: 720px; margin: 0 auto; padding: 22px 18px 60px; }
.admin h1 { font-size: 20px; margin: 0 0 4px; }
.admin .sub { color: var(--tl); font-size: 13px; margin-bottom: 18px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.tabs a { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; background: var(--soft); color: var(--tl); font-size: 13px; }
.tabs a.on { background: var(--pri); color: #fff; font-weight: 700; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.hint { font-size: 12px; color: var(--tl); margin-top: 4px; }
.row2 { display: flex; gap: 10px; flex-wrap: wrap; }
.row2 > * { flex: 1; min-width: 140px; }
.item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.item .meta { font-size: 12px; color: var(--tl); }
.item .acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumb { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; }

/* 聊天 */
.cm-status { display: flex; align-items: center; gap: 8px; padding: 0 4px 12px; font-size: 12px; color: var(--tl); }
.cm-status b { font-weight: 600; font-size: 12px; color: var(--tl); }
.cm-dot { width: 8px; height: 8px; border-radius: 50%; background: #c9c0c4; flex: 0 0 auto; }
.cm-dot.on { background: #4caf50; box-shadow: 0 0 0 3px rgba(76, 175, 80, .16); }
.cm-hint { margin-left: auto; font-size: 10px; opacity: .7; }

.cm-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 4px; }
.cm-row { --who: #e4718f; --who-soft: #fdeef2; display: flex; align-items: flex-start; gap: 8px; }
.cm-row.a1 { --who: #e4718f; --who-soft: #fdeef2; }
.cm-row.a2 { --who: #6f9fd8; --who-soft: #eef4fc; }
.cm-row.a3 { --who: #6bb389; --who-soft: #eef8f2; }
[data-theme="dark"] .cm-row.a1 { --who-soft: rgba(228, 113, 143, .16); }
[data-theme="dark"] .cm-row.a2 { --who-soft: rgba(111, 159, 216, .16); }
[data-theme="dark"] .cm-row.a3 { --who-soft: rgba(107, 179, 137, .16); }
.cm-row.own { flex-direction: row-reverse; }

.cm-av { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 16px; flex: 0 0 auto; }
.cm-av img { width: 100%; height: 100%; object-fit: cover; }

.cm-main { max-width: calc(100% - 60px); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cm-row.own .cm-main { align-items: flex-end; }
.cm-top { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--tl); }
.cm-top span { font-weight: 700; font-size: 11px; color: var(--who); }
.cm-top i { font-style: normal; opacity: .7; }

.cm-bub {
  background: var(--card); border-radius: 4px 14px 14px 14px;
  padding: 10px 14px; font-size: 14px; line-height: 1.6;
  box-shadow: var(--shadow); word-break: break-word; white-space: normal;
}
.cm-row.own .cm-bub { border-radius: 14px 4px 14px 14px; background: var(--who-soft); color: var(--tx); }

.cm-loc {
  background: var(--card); border-radius: 4px 14px 14px 14px; padding: 11px 14px;
  box-shadow: var(--shadow); border-left: 3px solid var(--who); min-width: 150px;
}
.cm-row.own .cm-loc { border-radius: 14px 4px 14px 14px; border-left: 0; border-right: 3px solid var(--who); background: var(--who-soft); }
.cm-loc-h { font-weight: 700; font-size: 13px; color: var(--who); }
.cm-loc-t { font-size: 13px; margin-top: 3px; }
.cm-loc-c { font-size: 10px; color: var(--tl); margin-top: 3px; letter-spacing: .3px; }
.cm-look {
  margin-top: 9px; border: 1px solid var(--line); background: var(--soft); color: var(--pri);
  font-family: var(--font); font-size: 12px; padding: 5px 12px; border-radius: 9px; cursor: pointer;
}

.cm-del { border: 0; background: transparent; color: var(--tl); font-size: 15px; line-height: 1; cursor: pointer; padding: 4px 2px 0; opacity: .55; }

.cm-bar {
  position: fixed; left: 0; right: 0; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 66;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 95%, transparent);
  backdrop-filter: blur(10px);
}
.cm-form { display: flex; align-items: center; gap: 8px; flex: 1; margin: 0; min-width: 0; }
.cm-form input[type=text] { flex: 1; min-width: 0; padding: 9px 12px; font-size: 14px; border-radius: 11px; }
.cm-pin {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); font-size: 17px; line-height: 1; cursor: pointer; color: var(--pri);
}
.cm-pin:disabled { opacity: .6; }

.cm-modal { position: fixed; inset: 0; z-index: 92; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(35, 24, 29, .5); backdrop-filter: blur(3px); }
.cm-modal.on { display: flex; }
.cm-modal-in { width: 100%; max-width: 430px; background: var(--card); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.cm-modal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.cm-modal-x { border: 0; background: transparent; font-size: 18px; color: var(--tl); cursor: pointer; line-height: 1; }
#cmMap { height: 240px; border-radius: 10px; overflow: hidden; background: var(--soft); }

/* 实时位置共享 */
.live-card { padding: 16px; }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.live-head b { font-size: 14px; }
#liveMap { height: 232px; border-radius: 12px; overflow: hidden; background: var(--soft); }
.live-people { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lv-person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--soft); font-size: 12px; }
.lv-person.a1 { box-shadow: inset 0 0 0 1px rgba(228, 113, 143, .45); }
.lv-person.a2 { box-shadow: inset 0 0 0 1px rgba(111, 159, 216, .45); }
.lv-person.a3 { box-shadow: inset 0 0 0 1px rgba(107, 179, 137, .45); }
.lv-av { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 12px; flex: 0 0 auto; }
.lv-av img { width: 100%; height: 100%; object-fit: cover; }
.lv-person i { font-style: normal; font-size: 10px; color: var(--tl); }
.lv-d { font-size: 11px; font-weight: 700; color: var(--pri); margin-left: 4px; }
.lv-person.a1 .lv-d { color: #e4718f; }
.lv-person.a2 .lv-d { color: #6f9fd8; }
.lv-person.a3 .lv-d { color: #6bb389; }
.lv-dist { margin-top: 6px; font-size: 12px; color: var(--tl); }
.lv-empty { font-size: 12px; color: var(--tl); }
.lv-pin {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  border: 3px solid #e4718f; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #e4718f;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .28);
}
.lv-pin img { width: 100%; height: 100%; object-fit: cover; }
.lv-pin.a1 { border-color: #e4718f; color: #e4718f; }
.lv-pin.a2 { border-color: #6f9fd8; color: #6f9fd8; }
.lv-pin.a3 { border-color: #6bb389; color: #6bb389; }

@media (max-width: 460px) {
  .hero h1 { font-size: 22px; }
  .av { width: 58px; height: 58px; font-size: 26px; }
  .counter .num { font-size: 34px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
