@font-face {
  font-family: "Display";
  src: url("font-display.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cute";
  src: url("font-cute.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #FBF6F1;
  --card: rgba(255, 253, 251, 0.93);
  --ink: #2E2724;
  --muted: #94877E;
  --pink: #C9827A;
  --pink-soft: #F8E6E1;
  --line: rgba(70, 50, 45, 0.13);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --f-display: "Display", "Songti SC", "Noto Serif SC", serif;
  --f-cute: "Cute", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-ui: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: #F7F0E9 url("../img/bg.jpg") center top / cover no-repeat fixed;
  color: var(--ink);
  font-family: var(--f-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 96px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(251, 246, 241, 0.86) 0%, rgba(251, 246, 241, 0.55) 45%, rgba(251, 246, 241, 0.72) 100%);
}

a { color: inherit; }

/* ============ 返回按钮 ============ */
.fab {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: 12px;
  z-index: 45;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(70, 50, 45, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: #3D332E;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 24px -14px rgba(70, 50, 45, 0.75);
  backdrop-filter: blur(10px);
  transition: transform 0.25s var(--ease);
}
.fab:active { transform: scale(0.93); }
.fab[hidden] { display: none; }

/* ============ 首页 ============ */
.shell { position: relative; z-index: 1; width: min(560px, 100%); margin: 0 auto; padding: 0 14px; }

.top {
  position: relative;
  margin: 0 -14px;
  height: clamp(340px, 47vh, 430px);
  overflow: hidden;
  border-radius: 0 0 36px 36px;
  background:
    linear-gradient(180deg, rgba(14, 16, 22, 0.22) 0%, rgba(26, 20, 22, 0.08) 55%, rgba(30, 24, 24, 0.5) 100%),
    url("../img/top-bg.jpg") center / cover no-repeat;
}

.drops {
  position: absolute;
  inset: 0;
  background: url("../img/drops.png") center / cover no-repeat;
  opacity: 0.5;
  mix-blend-mode: screen;
  animation: drift 26s linear infinite;
  pointer-events: none;
}
@keyframes drift { from { background-position: 0 0; } to { background-position: 44px 140px; } }

.bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 0;
}

.brand {
  font-family: var(--f-cute);
  font-size: 16px;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.chips { display: flex; gap: 7px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #F6F1EC;
  font-family: var(--f-cute);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-decoration: none;
  backdrop-filter: blur(10px);
}
.chip svg { width: 13px; height: 13px; opacity: 0.92; }

.presence {
  position: absolute;
  left: 50%;
  top: 15%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(24, 24, 30, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FBF6F1;
  font-family: var(--f-cute);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.85);
  animation: blink 2.6s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 240, 200, 0.35), 0 12px 26px -16px rgba(0, 0, 0, 0.85); }
  50% { opacity: 0.62; box-shadow: 0 0 0 8px rgba(255, 240, 200, 0), 0 12px 26px -16px rgba(0, 0, 0, 0.85); }
}
.presence svg { width: 14px; height: 14px; color: #F7DCA4; }

.duo {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 9vw, 54px);
}

.av-wrap { position: relative; width: 96px; height: 96px; }

.ring {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #F8DCAC, #F3B9A8, #E9E4F5, #F8DCAC);
  filter: blur(8px);
  opacity: 0.95;
  animation: ring-spin 8s linear infinite;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

.av {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.85);
  background: #222;
  display: block;
}

.name-pill {
  position: absolute;
  left: 50%;
  bottom: -13px;
  transform: translateX(-50%);
  padding: 3px 14px;
  border-radius: 999px;
  background: rgba(26, 26, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #F4EFE9;
  font-family: var(--f-cute);
  font-size: 11px;
  letter-spacing: 0.18em;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.heart {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 14px rgba(224, 87, 95, 0.5));
  animation: beat 1.8s ease-in-out infinite;
}
@keyframes beat {
  0%, 100% { transform: scale(1); }
  10% { transform: scale(1.18); }
  20% { transform: scale(1); }
  32% { transform: scale(1.09); }
  44% { transform: scale(1); }
}

/* ============ 卡片 ============ */
.card {
  position: relative;
  z-index: 3;
  width: 100%;
  margin: -44px auto 0;
  padding: clamp(24px, 4vw, 40px);
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  box-shadow: 0 46px 90px -56px rgba(92, 58, 48, 0.75);
  backdrop-filter: saturate(140%) blur(10px);
}

.head { display: flex; justify-content: space-between; align-items: baseline; }
.mark { font-family: var(--f-cute); font-size: 12px; letter-spacing: 0.16em; }
.mark-sub { font-family: var(--f-cute); font-size: 9px; letter-spacing: 0.2em; color: var(--muted); }

.name {
  margin: 20px 0 6px;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(46px, 8vw, 62px);
  line-height: 1;
}

.line {
  margin: 10px 0 0;
  font-family: var(--f-cute);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #6F635B;
}
.line b { font-weight: 400; color: var(--pink); }

.mods { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 26px; }

.mod {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  color: inherit;
  transform: rotate(var(--r, 0deg));
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background 0.45s var(--ease);
  box-shadow: 0 10px 22px -22px rgba(70, 50, 45, 0.7);
  cursor: pointer;
}
.mod:hover { transform: rotate(0deg) translateY(-4px); background: #fff; }

.ico {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--pink-soft);
  color: #B87067;
}
.ico svg { width: 15px; height: 15px; }

.txt { font-family: var(--f-cute); font-size: 15px; letter-spacing: 0.04em; white-space: nowrap; }
.num { margin-left: auto; font-family: var(--f-cute); font-size: 11px; color: var(--muted); white-space: nowrap; }
.num b { font-family: var(--f-display); font-weight: 400; font-size: 15px; color: var(--ink); margin-right: 1px; }

.note-foot {
  margin: 26px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-family: var(--f-cute);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* 贴纸 */
.deco { position: absolute; pointer-events: none; user-select: none; }
.d-tape {
  top: -15px; left: 46px; width: 100px; height: 27px;
  background: rgba(246, 236, 213, 0.94);
  transform: rotate(-6deg);
  box-shadow: 0 4px 10px -6px rgba(70, 50, 45, 0.5);
  border-left: 1px dashed rgba(255, 255, 255, 0.75);
  border-right: 1px dashed rgba(255, 255, 255, 0.75);
}
.d-spark { top: -28px; right: 40px; width: 40px; height: 40px; transform: rotate(10deg); }
.d-heart { bottom: -18px; left: -14px; width: 38px; height: 38px; transform: rotate(-14deg); }
.d-star { top: 110px; left: -24px; width: 24px; height: 24px; transform: rotate(-8deg); }
.d-year {
  bottom: -15px; right: 30px; padding: 6px 12px;
  background: #fff; border: 1px dashed rgba(70, 50, 45, 0.24); border-radius: 5px;
  font-family: var(--f-cute); font-size: 10px; letter-spacing: 0.2em; color: var(--muted);
  transform: rotate(4deg);
}
.peek {
  top: 42%; right: -66px; width: 100px; margin: 0; padding: 7px 7px 22px;
  background: #fff; box-shadow: 0 26px 44px -32px rgba(70, 50, 45, 0.95);
  transform: rotate(7deg);
}
.peek img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }

/* ============ 子页 ============ */
.page {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 14px auto 0;
  padding: 24px 20px 40px;
  background: rgba(255, 253, 251, 0.9);
  border-radius: 22px;
  box-shadow: 0 30px 60px -46px rgba(92, 58, 48, 0.6);
  backdrop-filter: blur(8px);
}

.ptitle { margin: 2vh 0 8px; font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 6vw, 50px); line-height: 1.1; }
.pdesc { margin: 0 0 3vh; font-family: var(--f-cute); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }

/* 条目 + 编辑按钮 */
.row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px dashed var(--line);
}
.idx { flex: 0 0 auto; width: 30px; font-family: var(--f-cute); font-size: 11px; color: var(--pink); padding-top: 5px; }
.body { flex: 1 1 auto; min-width: 0; }
.v { font-family: var(--f-display); font-size: 18px; line-height: 1.4; }
.d { font-family: var(--f-cute); font-size: 12px; color: var(--muted); margin-top: 3px; }

.acts { display: flex; gap: 6px; flex: 0 0 auto; }
.acts button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 9px;
  padding: 5px 9px;
  font-family: var(--f-cute);
  font-size: 11px;
  color: #6F635B;
  cursor: pointer;
}
.acts button:active { transform: scale(0.94); }
.acts button svg { width: 13px; height: 13px; display: block; }
.acts .del { color: #C2605A; }

.add {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 14px 0 6px;
  border: 0;
  background: transparent;
  color: var(--pink);
  font-family: var(--f-cute);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.add::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px dashed rgba(201, 130, 122, 0.6);
  font-size: 14px;
}

/* 口味三栏 */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.col h3 { margin: 0 0 8px; font-family: var(--f-cute); font-size: 13px; font-weight: 400; letter-spacing: 0.1em; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; }
.dot.ok { background: #A8BE95; }
.dot.meh { background: #DFCE9E; }
.dot.no { background: var(--pink); }
.col ul { list-style: none; margin: 0; padding: 0; }
.col li {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
  font-size: 14px; color: #4B433D;
}
.col li span.t { flex: 1 1 auto; min-width: 0; }

/* 相簿 */
.carousel { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; padding: 62px 16px 130px; }
.stage { position: relative; flex: 1 1 auto; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; }
.slide { margin: 0; padding: 10px; background: #fff; border-radius: 4px; box-shadow: 0 40px 70px -50px rgba(60, 40, 35, 0.85); transform: rotate(-0.5deg); justify-self: center; max-width: 100%; }
.slide img { display: block; max-height: 62vh; max-width: min(100%, 620px); object-fit: contain; border-radius: 2px; transition: opacity 0.25s var(--ease); }
.slide.swapping img { opacity: 0; }

.nav {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.85);
  color: #5A4E46; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 8px 20px -12px rgba(70, 50, 45, 0.7);
}

.tools { display: flex; justify-content: center; gap: 8px; padding: 12px 0 4px; }
.tool {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.92);
  font-family: var(--f-cute); font-size: 11px; color: #6F635B; cursor: pointer;
}
.tool.del { color: #C2605A; }
.tool svg { width: 12px; height: 12px; }

.capbar { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 4px 0 6px; font-family: var(--f-cute); font-size: 12px; color: #6F635B; }
.capbar .idx2 { color: var(--muted); letter-spacing: 0.1em; }
.capbar .idx2 b { font-family: var(--f-display); font-weight: 400; font-size: 15px; color: var(--ink); }
.capbar .all { color: var(--pink); cursor: pointer; }

.dots { display: flex; justify-content: center; gap: 6px; }
.dot-i { width: 5px; height: 5px; border-radius: 99px; background: rgba(70,50,45,.2); transition: all .35s var(--ease); }
.dot-i.on { width: 16px; background: var(--pink); }

/* 全部照片 */
.ph { margin: 0 0 34px; position: relative; }
.ph img { width: 100%; display: block; border-radius: 14px; box-shadow: 0 26px 44px -38px rgba(60, 40, 35, 0.85); }
.ph figcaption { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; font-family: var(--f-cute); font-size: 12px; color: #6F635B; }
.ph .n { color: var(--muted); }
.ph .acts { margin-top: 6px; }

/* 小记 / 关于她 / 时间线 */
.note-item, .fact-item, .tl-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 0; border-top: 1px dashed var(--line);
}
.note-item time { flex: 0 0 auto; width: 70px; font-family: var(--f-cute); font-size: 11px; color: var(--muted); padding-top: 4px; }
.note-item p { margin: 0; flex: 1 1 auto; font-size: 15px; line-height: 1.8; color: #413A35; }
.tl-item { position: relative; padding-left: 22px; }
.tl-item::before { content: ""; position: absolute; left: 0; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.tl-item time { display: block; font-family: var(--f-cute); font-size: 11px; color: var(--muted); }
.tl-item p { margin: 5px 0 0; font-family: var(--f-display); font-size: 17px; line-height: 1.7; }

/* ============ 地图 ============ */
.map-wrap { position: fixed; inset: 0; overflow: hidden; background: #0E1013; }
.map-layer { position: absolute; left: 0; top: 0; width: 1600px; height: 1600px; transform-origin: 0 0; cursor: grab; }
.map-layer.dragging { cursor: grabbing; }
.map-img { width: 1600px; height: 1600px; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; filter: brightness(1.3) contrast(1.06); }

.pin {
  position: absolute; display: flex; flex-direction: column; align-items: center;
  transform: translate(-50%, -100%) scale(var(--inv, 1));
  transform-origin: 50% 100%; will-change: transform;
}
.pin-av { position: relative; width: 54px; height: 54px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 12px 26px -10px rgba(0,0,0,.95); background: #222; display: block; }
.pin-av img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.pin.her .pin-av::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid rgba(224, 87, 95, 0.55); animation: pin-pulse 2.4s ease-out infinite;
}
@keyframes pin-pulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.pin-tip { width: 12px; height: 12px; margin-top: -7px; background: #fff; border-radius: 2px; transform: rotate(45deg); }
.pin-name { margin-top: 9px; padding: 3px 10px; border-radius: 999px; background: rgba(10,10,14,.72); border: 1px solid rgba(255,255,255,.16); color: #F3EEE8; font-family: var(--f-cute); font-size: 10px; white-space: nowrap; }

.map-bar { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 56px; border-radius: 999px; background: rgba(20,20,26,.72); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(16px); z-index: 40; }
.map-who { display: flex; align-items: center; gap: 7px; color: #F3EEE8; font-family: var(--f-cute); font-size: 12px; }
.map-who img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.85); }
.map-heart { width: 13px; height: 13px; }

.zoom { position: fixed; right: 16px; bottom: 148px; display: flex; flex-direction: column; gap: 8px; z-index: 40; }
.zoom button { width: 42px; height: 42px; border-radius: 14px; border: 1px solid rgba(255,255,255,.16); background: rgba(20,20,26,.75); color: #F3EEE8; font-size: 18px; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(12px); }
.zoom button svg { width: 16px; height: 16px; }

.map-foot { position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: rgba(20,20,26,.72); border: 1px solid rgba(255,255,255,.16); color: #E9E2DB; font-family: var(--f-cute); font-size: 11px; white-space: nowrap; backdrop-filter: blur(12px); z-index: 40; }
.live { width: 6px; height: 6px; border-radius: 50%; background: #7ED49B; animation: live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ============ 播放器 ============ */
.player {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 50; width: min(480px, calc(100% - 24px)); height: 60px;
  display: grid; grid-template-columns: 40px minmax(0,1fr) 32px;
  align-items: center; gap: 11px; padding: 0 11px 0 9px;
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.84);
  backdrop-filter: saturate(170%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 40px -24px rgba(92, 58, 48, 0.6);
}

.disc {
  width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; position: relative;
  background:
    radial-gradient(circle at 50% 50%, #F8E6E1 0 24%, transparent 25%),
    repeating-radial-gradient(circle at 50% 50%, #3A322E 0 2px, #2B2421 2px 4px);
  animation: spin 7s linear infinite;
  animation-play-state: paused;
}
.disc.playing { animation-play-state: running; }
.disc-hole { position: absolute; inset: 0; margin: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--paper); }
@keyframes spin { to { transform: rotate(360deg); } }

.meta { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.song { font-family: var(--f-cute); font-size: 12px; color: #4A423C; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.clock { font-family: var(--f-cute); font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }

#seek { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; height: 12px; margin: 0; background: transparent; cursor: pointer; --p: 0%; }
#seek::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--pink) var(--p), rgba(70,50,45,.13) var(--p)); }
#seek::-webkit-slider-thumb { -webkit-appearance: none; width: 9px; height: 9px; margin-top: -3.5px; border-radius: 50%; background: var(--pink); opacity: 0; transition: opacity .2s; }
#seek:hover::-webkit-slider-thumb, #seek.dragging::-webkit-slider-thumb { opacity: 1; margin-top: -2.5px; }
#seek::-moz-range-track { height: 2px; border-radius: 2px; background: rgba(70,50,45,.13); }
#seek::-moz-range-progress { height: 2px; background: var(--pink); }
#seek::-moz-range-thumb { width: 9px; height: 9px; border: 0; border-radius: 50%; background: var(--pink); }

.pp { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.pp.on { background: var(--pink); color: #fff; border-color: transparent; }

/* ============ 手机 ============ */
@media (max-width: 880px) {
  .top { height: clamp(360px, 50vh, 470px); }
  .av-wrap, .av { width: 84px; height: 84px; }
  .heart { width: 28px; height: 28px; }
  .brand { font-size: 16px; }
  .peek { display: none; }
  .mods { gap: 9px; }
  .mod { padding: 11px; gap: 8px; border-radius: 13px; }
  .ico { width: 26px; height: 26px; }
  .txt { font-size: 13px; }
  .num { font-size: 10px; }
  .num b { font-size: 13px; }
  .cols { grid-template-columns: 1fr; gap: 18px; }
  .carousel { padding: 58px 12px 124px; }
  .slide img { max-height: 52vh; }
  .nav { position: absolute; top: 50%; margin-top: -20px; z-index: 3; }
  .nav.prev { left: -4px; }
  .nav.next { right: -4px; }
  .note-item { gap: 8px; }
  .note-item time { width: 58px; }
  .acts button { padding: 5px 7px; }
  .tools { gap: 6px; }
  .tool { padding: 6px 10px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
}


/* ===== 页面过渡（切页有动画，音乐不中断） ===== */
@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: vt-out 0.22s ease both;
}
::view-transition-new(root) {
  animation: vt-in 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes vt-out {
  to { opacity: 0; transform: translateY(-10px) scale(0.995); }
}
@keyframes vt-in {
  from { opacity: 0; transform: translateY(16px) scale(0.995); }
}

/* ===== 相簿：固定舞台，控件位置不随图片比例变化 ===== */
.stage {
  height: min(56vh, 500px);
  align-items: center;
}
.slide {
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide img {
  max-height: calc(min(56vh, 500px) - 24px);
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

/* ===== 音乐：小唱片 + 展开面板 ===== */
.music {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.music-btn {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(70, 50, 45, 0.14);
  background: #FFFDFB;
  box-shadow: 0 14px 30px -16px rgba(70, 50, 45, 0.8);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.25s var(--ease);
}
.music-btn:active { transform: scale(0.94); }

.vinyl {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: block;
  background:
    radial-gradient(circle at 50% 50%, #F8E6E1 0 22%, transparent 23%),
    repeating-radial-gradient(circle at 50% 50%, #3A322E 0 2px, #2B2421 2px 4px);
}
.vinyl-hole {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFFDFB;
}
.music-btn.playing .vinyl { animation: spin 3.6s linear infinite; }

.music-hint {
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: rgba(46, 39, 36, 0.86);
  color: #fff;
  font-family: var(--f-cute);
  font-size: 10px;
  padding: 5px 10px;
  border-radius: 999px;
}
.music-hint[hidden] { display: none; }

.music-panel {
  width: min(298px, calc(100vw - 32px));
  padding: 14px 16px 12px;
  border-radius: 20px;
  background: rgba(255, 253, 251, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 50px -30px rgba(92, 58, 48, 0.75);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.music.open .music-panel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.mp-row1 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--f-cute);
  font-size: 11px;
  color: #6F635B;
}
.mp-song { letter-spacing: 0.06em; color: #4A423C; }
.mp-clock { font-variant-numeric: tabular-nums; color: var(--muted); }

.mp-actions { display: flex; justify-content: center; margin-top: 7px; }

.mp-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: #3D332E;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.mp-play.on { background: var(--pink); color: #fff; border-color: transparent; }

/* 地图：去掉重滤镜，拖动更跟手 */
.map-img { filter: none; }
.map-layer { touch-action: none; }


/* ===== 禁双击缩放 ===== */
html { touch-action: manipulation; }
* { -webkit-tap-highlight-color: transparent; }

/* ===== 页面切换动画（不依赖 View Transitions，所有浏览器都有） ===== */
#app.page-in { animation: pageIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
#app.page-in > * { animation: pageIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ===== 相簿：严格居中，白框贴合图片 ===== */
.stage { justify-items: center; }
.slide {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

@media (max-width: 880px) {
  .stage { display: block; padding: 0; }
  .nav {
    position: absolute;
    top: 50%;
    margin-top: -20px;
    z-index: 4;
  }
  .nav.prev { left: 2px; }
  .nav.next { right: 2px; }
  .slide { margin: 0 auto; }
  .slide img { max-width: calc(100vw - 56px); }
}


/* ===== 切页动画：容器只改透明度，子元素做位移（不破坏 fixed） ===== */
#app.page-in { animation: vtFade 0.28s ease both; }
#app.page-in > * { animation: vtRise 0.46s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes vtFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vtRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ===== 相簿：整块跟着图片走 ===== */
.carousel {
  justify-content: center;
  padding-top: 70px;
  padding-bottom: 96px;
}
.stage {
  height: auto;
  display: flex;
  justify-content: center;
  padding: 0;
}
.slide {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  display: block;
}
.slide img {
  display: block;
  width: auto;
  max-width: min(100%, 640px);
  max-height: min(62vh, 600px);
  object-fit: contain;
  transition: opacity 0.16s ease;
}
.slide img.fading { opacity: 0; }

.nav {
  position: absolute;
  top: 50%;
  margin-top: -19px;
  z-index: 4;
  width: 38px;
  height: 38px;
}
.nav.prev { left: -19px; }
.nav.next { right: -19px; }

.tools { margin-top: 16px; }
.capbar { margin-top: 2px; }

@media (max-width: 880px) {
  .slide img { max-height: 56vh; max-width: calc(100vw - 44px); }
  .nav.prev { left: 6px; }
  .nav.next { right: 6px; }
  .nav { width: 34px; height: 34px; margin-top: -17px; }
}


/* ===== 相簿：左右键固定，图片居中并被两侧夹住 ===== */
.carousel {
  justify-content: flex-start;
  padding: 76px 12px 100px;
}
.stage {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  justify-items: center;
  gap: 10px;
  height: auto;
  padding: 0;
  width: 100%;
}
.slide {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 10px;
  position: relative;
  justify-self: center;
}
.ph-stack {
  position: relative;
  display: grid;
  place-items: center;
  line-height: 0;
}
.ph-stack img {
  grid-area: 1 / 1;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(62vh, 600px);
  object-fit: contain;
  border-radius: 2px;
  transition: opacity 0.34s ease, transform 0.34s ease;
}
.ph-stack img.incoming { opacity: 0; transform: scale(1.03); }
.ph-stack img.incoming.show { opacity: 1; transform: none; }
.ph-stack img.hide { opacity: 0; transform: scale(0.97); }

/* 左右键固定在自己的格子里 */
.nav {
  position: static;
  margin: 0;
  width: 40px;
  height: 40px;
  justify-self: center;
  align-self: center;
}

.tools { margin-top: 14px; }
.capbar { margin-top: 2px; }

@media (max-width: 880px) {
  .stage { grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 6px; height: auto; }
  .nav { width: 34px; height: 34px; }
  .slide { padding: 8px; }
  .ph-stack img { max-height: min(58vh, 520px); }
}

/* ===== 切页动画加强一点 ===== */
#app.page-in { animation: vtFade 0.26s ease both; }
#app.page-in > * { animation: vtRise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes vtFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vtRise {
  from { opacity: 0; transform: translateY(26px) scale(0.985); }
  to { opacity: 1; transform: none; }
}


/* 关键：stage 不要被 flex 拉满整屏 */
.carousel .stage { flex: 0 0 auto; }
.carousel { min-height: 100vh; justify-content: center; }


/* 桌面端把左右键收近一点，别贴着屏幕边 */
@media (min-width: 881px) {
  .carousel .stage { max-width: 720px; margin: 0 auto; }
}


/* 左右键紧跟图片，不贴屏幕边也不飘远 */
.carousel .stage {
  grid-template-columns: 44px auto 44px;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}
.ph-stack img { max-width: min(calc(100vw - 150px), 620px); }

@media (max-width: 880px) {
  .carousel .stage { grid-template-columns: 36px auto 36px; }
  .ph-stack img { max-width: calc(100vw - 108px); }
}


/* ===== 相簿：按键固定，图片自适应但绝不越过按键 ===== */
.carousel .stage {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 68px;
  align-items: center;
  justify-items: center;
  gap: 0;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  height: auto;
}
.carousel .nav {
  position: static;
  margin: 0;
  width: 42px;
  height: 42px;
  justify-self: center;
}
.carousel .slide {
  justify-self: center;
  max-width: 100%;
}

/* 照片 —— 不超过中间列，永不压到按键 */
.ph-stack {
  overflow: hidden;
  border-radius: 3px;
}
.ph-stack img {
  max-width: 100%;
  max-height: min(60vh, 560px);
}

/* 简约边框 + 可爱贴纸 */
.slide {
  background: #fff;
  padding: 12px 12px 12px;
  border-radius: 6px;
  box-shadow: 0 34px 60px -44px rgba(60, 40, 35, 0.9);
  position: relative;
}
.slide::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(201, 130, 122, 0.45);
  border-radius: 3px;
  pointer-events: none;
}
.tape {
  position: absolute;
  width: 62px;
  height: 20px;
  background: rgba(246, 232, 214, 0.92);
  box-shadow: 0 3px 8px -6px rgba(70, 50, 45, 0.6);
  border-left: 1px dashed rgba(255, 255, 255, 0.8);
  border-right: 1px dashed rgba(255, 255, 255, 0.8);
  pointer-events: none;
}
.tape.t1 { top: -9px; left: 26px; transform: rotate(-6deg); }
.tape.t2 { bottom: -9px; right: 26px; transform: rotate(-4deg); }
.snap-heart {
  position: absolute;
  top: -13px;
  right: 14px;
  width: 30px;
  height: 30px;
  transform: rotate(12deg);
  pointer-events: none;
}

/* ===== 切图动画：左右横切，看得见 ===== */
.ph-stack img {
  transition: transform 0.54s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
  will-change: transform;
}

/* ===== 切页动画：慢一点、有层次 ===== */
#app.page-in { animation: vtFade 0.45s ease both; }
#app.page-in > * { animation: vtRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes vtFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vtRise {
  0% { opacity: 0; transform: translateY(34px) scale(0.975); }
  100% { opacity: 1; transform: none; }
}

/* ===== 禁双击缩放（双保险） ===== */
html, body { touch-action: manipulation; }

@media (max-width: 880px) {
  .carousel .stage { grid-template-columns: 52px minmax(0, 1fr) 52px; max-width: none; }
  .carousel .nav { width: 36px; height: 36px; }
  .ph-stack img { max-height: min(56vh, 500px); }
}


/* ===== 相簿顶部：张数 + 看全部 ===== */
.carousel .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 10px;
  padding: 0 2px;
}
.count-chip {
  font-family: var(--f-cute);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.all-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: var(--f-cute);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 18px -14px rgba(70, 50, 45, 0.7);
}
.all-link:active { transform: scale(0.96); }

/* 三个互动键加大 */
.tools { gap: 10px; padding: 14px 0 6px; }
.tool {
  padding: 11px 18px;
  font-size: 13px;
  gap: 7px;
  min-height: 42px;
}
.tool svg { width: 15px; height: 15px; }

/* ===== 全部照片：列表 ===== */
.listpage { padding-bottom: 60px; }

.fab-add {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  z-index: 45;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--pink);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 14px 28px -14px rgba(201, 130, 122, 0.9);
}
.fab-add:active { transform: scale(0.94); }

.rows { margin-top: 6px; }

.prow {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}

.thumb {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  background: #EFE8E0;
  box-shadow: 0 10px 20px -14px rgba(70, 50, 45, 0.8);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pinfo { flex: 1 1 auto; min-width: 0; }

.pdate {
  font-family: var(--f-cute);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.pcap {
  margin-top: 5px;
  font-family: var(--f-cute);
  font-size: 14px;
  line-height: 1.5;
  color: #413A35;
  word-break: break-word;
}

.pacts { display: flex; gap: 8px; margin-top: 9px; }

.pbtn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 7px 14px;
  font-family: var(--f-cute);
  font-size: 12px;
  color: #6F635B;
  cursor: pointer;
}
.pbtn.del { color: #C2605A; }
.pbtn:active { transform: scale(0.95); }

@media (max-width: 880px) {
  .thumb { width: 84px; height: 84px; }
  .all-link { font-size: 12px; padding: 8px 13px; }
  .tool { padding: 11px 14px; font-size: 12px; }
}


/* 列表缩略图：正方形按钮 */
.thumb {
  display: block;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #EFE8E0;
  aspect-ratio: 1 / 1;
}
.thumb img { transition: transform 0.3s var(--ease); }
.thumb:active img { transform: scale(0.97); }


/* 文件选择框：视觉隐藏但可点击（iOS 要求） */
#picker {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* 可爱虚线：圆点 + 粉色 + 圆角 */
.slide::after {
  border: 2.5px dotted rgba(214, 138, 130, 0.55);
  border-radius: 10px;
  inset: 6px;
}

/* 加号固定在右上，始终在最上层 */
.fab-add {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  z-index: 48;
}


/* label 当按钮用 */
label.fab-add,
label.tool,
label.add {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
label.fab-add {
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
}
label.tool { gap: 7px; }
label.add {
  justify-content: flex-start;
  padding: 14px 0 6px;
  color: var(--pink);
  font-family: var(--f-cute);
  font-size: 13px;
}
label.tool svg { width: 15px; height: 15px; }


.uploading {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  padding: 14px 24px;
  border-radius: 999px;
  background: rgba(46, 39, 36, 0.88);
  color: #fff;
  font-family: var(--f-cute);
  font-size: 13px;
  letter-spacing: 0.08em;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}


/* ===== 自绘弹层 ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(36, 30, 28, 0.42);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.modal.on { opacity: 1; }

.modal-card {
  width: min(340px, 100%);
  background: #FFFDFB;
  border-radius: 20px;
  padding: 22px 20px 16px;
  box-shadow: 0 40px 70px -40px rgba(40, 30, 28, 0.8);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.on .modal-card { transform: none; }

.modal-title {
  margin: 0 0 16px;
  font-family: var(--f-cute);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.mf { display: block; margin-bottom: 12px; }
.mf span {
  display: block;
  font-family: var(--f-cute);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.mf input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.mf input:focus { border-color: rgba(201, 130, 122, 0.6); }

.modal-actions { display: flex; gap: 10px; margin-top: 8px; }

.mbtn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--f-cute);
  font-size: 13px;
  color: #6F635B;
  cursor: pointer;
}
.mbtn.primary { background: var(--pink); border-color: transparent; color: #fff; }
.mbtn.danger { background: #C2605A; border-color: transparent; color: #fff; }
.mbtn:active { transform: scale(0.97); }

.modal-text {
  margin: 4px 0 18px;
  font-family: var(--f-cute);
  font-size: 14px;
  line-height: 1.7;
  color: #413A35;
}


/* 回到顶部：出现在音乐键上方 */
.totop {
  position: fixed;
  right: 18px;
  bottom: 86px;
  z-index: 47;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(70, 50, 45, 0.12);
  background: rgba(255, 253, 251, 0.92);
  color: #4A423C;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 14px 28px -18px rgba(70, 50, 45, 0.8);
  backdrop-filter: blur(10px);
  animation: totopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.totop[hidden] { display: none; }
.totop:active { transform: scale(0.92); }

@keyframes totopIn {
  from { opacity: 0; transform: translateY(10px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 880px) {
  .totop { right: 14px; bottom: 80px; width: 42px; height: 42px; }
}


/* 回到顶部：默认隐藏，滚动到固定位置后出现 */
.totop {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.92);
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  animation: none;
}
.totop.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}


/* backdrop-filter 会让内部 fixed 元素失去屏幕定位 —— 干掉它 */
.page {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(255, 253, 251, 0.96);
}

/* 回到顶部：常驻 */
.totop {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}


/* 浮动控件挂载点：不占位、不吃点击 */
.floaters { position: static; }


/* ===== 把浮动按钮的触控范围做大 ===== */
.totop {
  width: 56px !important;
  height: 56px !important;
  right: 16px !important;
  bottom: 84px !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.totop::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
}
.totop svg { width: 22px !important; height: 22px !important; }

.fab-add {
  width: 56px !important;
  height: 56px !important;
  top: calc(10px + env(safe-area-inset-top)) !important;
  right: 10px !important;
  font-size: 32px !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.fab-add::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}

@media (max-width: 880px) {
  .totop { width: 54px !important; height: 54px !important; right: 14px !important; bottom: 82px !important; }
  .totop svg { width: 21px !important; height: 21px !important; }
}


/* 回顶部挪到左下角，离音乐键远一点，不会点错 */
.totop {
  right: auto !important;
  left: 16px !important;
  bottom: 84px !important;
}
@media (max-width: 880px) {
  .totop { left: 14px !important; right: auto !important; }
}


/* 回顶部：音乐键正上方，留出足够间隙避免点错 */
.totop {
  left: auto !important;
  right: 16px !important;
  bottom: 104px !important;
}
@media (max-width: 880px) {
  .totop { left: auto !important; right: 14px !important; bottom: 100px !important; }
}


/* 音乐容器本体不接收点击（否则会挡住它上方的按钮） */
.music { pointer-events: none; }
.music .music-btn { pointer-events: auto; }
.music.open .music-panel { pointer-events: auto; }

/* 回顶部放在最上层 */
.totop { z-index: 70 !important; }
.fab-add { z-index: 70 !important; }


/* ===== 留言 ===== */
.msgpage { padding-bottom: 40px; }

.msghead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.msghead .ptitle { margin-top: 0; }

.switch {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--pink);
  display: grid;
  place-items: center;
  cursor: pointer;
  margin-top: 6px;
}
.switch:active { transform: scale(0.93); }

.composer {
  display: flex;
  gap: 10px;
  padding: 12px;
  margin: 6px 0 20px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.cav {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}
.cbox { flex: 1 1 auto; min-width: 0; }
.cbox textarea {
  width: 100%;
  border: 0;
  background: transparent;
  resize: none;
  font-size: 14px;
  line-height: 1.7;
  font-family: var(--f-ui);
  color: var(--ink);
  outline: none;
  padding: 2px 0;
}
.cbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.ccount { font-family: var(--f-cute); font-size: 10px; color: var(--muted); }
.send {
  border: 0;
  background: var(--pink);
  color: #fff;
  font-family: var(--f-cute);
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.send:disabled { opacity: 0.5; }
.send:active { transform: scale(0.96); }

.moments { margin-top: 4px; }

.moment {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}
.mav {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.mname {
  font-family: var(--f-cute);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #5E7EA8;
}
.mtext {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.85;
  color: #3B342F;
  white-space: pre-wrap;
  word-break: break-word;
}
.mmeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--f-cute);
  font-size: 11px;
  color: var(--muted);
}
.mdel {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--f-cute);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
}

/* ===== 密码门 ===== */
.gatepage {
  display: grid;
  place-items: center;
  min-height: 66vh;
}
.gate {
  width: min(300px, 100%);
  text-align: center;
  padding: 30px 22px 24px;
  background: rgba(255, 253, 251, 0.94);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 60px -40px rgba(92, 58, 48, 0.7);
}
.gate-heart { width: 34px; height: 34px; }
.gate-title {
  margin: 10px 0 6px;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.06em;
}
.gate-desc {
  margin: 0 0 18px;
  font-family: var(--f-cute);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.gate-input {
  width: 100%;
  text-align: center;
  letter-spacing: 0.5em;
  font-size: 20px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  outline: none;
  color: var(--ink);
}
.gate-input:focus { border-color: rgba(201, 130, 122, 0.65); }
.gate-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--pink);
  color: #fff;
  font-family: var(--f-cute);
  font-size: 14px;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.gate-btn:active { transform: scale(0.98); }
.gate-err {
  margin: 10px 0 0;
  min-height: 16px;
  font-family: var(--f-cute);
  font-size: 11px;
  color: #C2605A;
}

/* 名字胶囊别太长 */
.name-pill { font-size: 10px; letter-spacing: 0.08em; }


/* 留言页顶部给返回键让位 */
.msgpage { padding-top: 62px; }
.gatepage { padding-top: 62px; }


/* ===== 首页：留言独占一排 ===== */
.mod-wide {
  grid-column: 1 / -1;
  transform: none !important;
  padding: 18px 18px !important;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(250, 236, 232, 0.95)) !important;
  border-radius: 18px !important;
  gap: 14px !important;
}
.mod-wide .ico {
  width: 38px !important;
  height: 38px !important;
  border-radius: 13px !important;
}
.mod-wide .ico svg { width: 20px !important; height: 20px !important; }
.mod-wide .txt { font-size: 19px !important; letter-spacing: 0.08em; }
.mod-wide .sub {
  margin-left: auto;
  font-family: var(--f-cute);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ===== 留言：朋友圈式 ===== */
.mmeta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.mtime {
  font-family: var(--f-cute);
  font-size: 11px;
  color: var(--muted);
}
.dot-btn {
  margin-left: auto;
  width: 30px;
  height: 22px;
  border: 0;
  background: rgba(70, 50, 45, 0.06);
  border-radius: 6px;
  color: #6F635B;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.mact {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.mact[hidden] { display: none; }
.act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--f-cute);
  font-size: 12px;
  color: #6F635B;
  cursor: pointer;
}
.act.on { color: var(--pink); border-color: rgba(201, 130, 122, 0.4); }

.cinput {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.cinput[hidden] { display: none; }
.cinput input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  outline: none;
}
.cinput input:focus { border-color: rgba(201, 130, 122, 0.55); }
.csend {
  flex: 0 0 auto;
  padding: 0 14px;
  border-radius: 10px;
  border: 0;
  background: var(--pink);
  color: #fff;
  font-family: var(--f-cute);
  font-size: 12px;
  cursor: pointer;
}

.msocial {
  margin-top: 10px;
  background: rgba(70, 50, 45, 0.045);
  border-radius: 8px;
  padding: 8px 10px;
}
.mlikes {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-family: var(--f-cute);
  font-size: 12px;
  color: #5E7EA8;
  line-height: 1.6;
}
.mlikes svg { color: #5E7EA8; flex: 0 0 auto; margin-top: 3px; }
.mcomments {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(70, 50, 45, 0.07);
  font-size: 13px;
  line-height: 1.7;
  color: #3B342F;
}
.mcmt { padding: 2px 0; cursor: pointer; }
.mcmt b { color: #5E7EA8; font-weight: 400; }


/* 长按提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%) translateY(10px);
  z-index: 220;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(46, 39, 36, 0.88);
  color: #fff;
  font-family: var(--f-cute);
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.mcmt {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.mcmt:active { background: rgba(94, 126, 168, 0.08); border-radius: 4px; }


/* 名字行 + 换头像 */
.namerow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.namerow .name { margin-right: auto; }
.avatar-edit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px dashed rgba(201, 130, 122, 0.5);
  background: rgba(255, 255, 255, 0.72);
  color: #B87067;
  font-family: var(--f-cute);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.avatar-edit:active { transform: scale(0.95); }


/* ===== 今天的心情 ===== */
.mood-add {
  position: absolute;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.42);
  background: rgba(24, 24, 30, 0.32);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--f-cute);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  z-index: 2;
}
.mood-add:active { transform: translate(-50%, -50%) scale(0.95); }

.mood-chip {
  position: absolute;
  left: 50%;
  top: -38px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #4A7BB5;
  font-family: var(--f-cute);
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.6);
  z-index: 3;
}
.mood-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c, #4A7BB5);
}

.mood-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.mood-opt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--f-cute);
  font-size: 14px;
  color: #4A423C;
  cursor: pointer;
}
.mood-opt i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.mood-opt.on {
  border-color: rgba(74, 123, 181, 0.55);
  background: rgba(74, 123, 181, 0.08);
  color: #3E6E9F;
}
.mood-opt:active { transform: scale(0.96); }

@media (max-width: 880px) {
  .mood-add { top: 31%; font-size: 11px; padding: 7px 14px; }
  .mood-chip { top: -34px; font-size: 10px; padding: 3px 10px; }
}


/* 登录状态胶囊 */
.login-chip {
  flex: 0 0 auto;
  margin-right: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px dashed rgba(70, 50, 45, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: #9A8F86;
  font-family: var(--f-cute);
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
}
.login-chip.on { color: #7B7168; }
.login-chip b { font-weight: 400; }
.login-chip b.pk { color: #E3A8BC; }
.login-chip b.rd { color: #E39A98; }
.login-chip:active { transform: scale(0.96); }

@media (max-width: 880px) {
  .login-chip { padding: 6px 10px; font-size: 10px; margin-right: 6px; }
  .avatar-edit { padding: 7px 11px; font-size: 11px; }
}


/* ===== 相簿：正方形大块 ===== */
.mod-square {
  grid-column: 1 / -1;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding: 20px !important;
  border-radius: 22px !important;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(248, 238, 233, 0.95)) !important;
  transform: none !important;
}
.mod-square .ico {
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
}
.mod-square .ico svg { width: 22px !important; height: 22px !important; }
.mod-square .txt {
  font-size: 22px !important;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.mod-square .sub {
  font-family: var(--f-cute);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.sq-hint {
  position: absolute;
  left: 20px;
  bottom: 20px;
  font-family: var(--f-cute);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--pink);
}

.sq-thumb {
  position: absolute;
  right: -16px;
  bottom: -16px;
  width: 72%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  transform: rotate(-5deg);
  box-shadow: 0 24px 44px -28px rgba(70, 50, 45, 0.9);
  opacity: 0.95;
}

@media (max-width: 880px) {
  .mod-square { padding: 18px !important; }
  .mod-square .txt { font-size: 20px !important; }
  .sq-thumb { width: 64%; right: -14px; bottom: -20px; }
}


/* 留言整行卡片（独立于网格） */
.mod-wide {
  display: flex !important;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 18px !important;
  border-radius: 18px !important;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(250, 236, 232, 0.96)) !important;
  border: 1px solid rgba(70, 50, 45, 0.1);
  text-decoration: none;
  color: inherit;
  transform: none !important;
}
.mod-wide .sub {
  margin-left: auto;
  font-family: var(--f-cute);
  font-size: 11px;
  color: var(--muted);
}

/* 相簿：左列跨两行 */
.mods { margin-top: 12px; }
.mod-tall {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px !important;
  border-radius: 18px !important;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(248, 236, 231, 0.95)) !important;
  transform: none !important;
  position: relative;
  overflow: hidden;
  align-self: stretch;
  height: 100%;
}
.mod-tall .txt { font-size: 19px !important; margin-top: 4px; }
.mod-tall .sub {
  font-family: var(--f-cute);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.tall-thumb {
  position: absolute;
  left: 50%;
  bottom: -6%;
  width: 100%;
  transform: translateX(-50%) rotate(-3deg);
  border-radius: 14px;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  box-shadow: 0 20px 40px -26px rgba(70, 50, 45, 0.85);
}

/* 时间线占满最后一行 */
.mods a[href="#/timeline"] { grid-column: 1 / -1 !important; }


/* 相簿卡片：上半部分压一层白，让文字看得清 */
.mod-tall::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 62%;
  background: linear-gradient(180deg, rgba(255, 253, 251, 0.97) 0%, rgba(255, 253, 251, 0.75) 55%, rgba(255, 253, 251, 0) 100%);
  z-index: 1;
  pointer-events: none;
}
.mod-tall .ico,
.mod-tall .txt,
.mod-tall .sub { position: relative; z-index: 2; }


/* 相簿卡片：不加照片，用更深的底色 + 大数字 */
.mod-tall {
  background: linear-gradient(160deg, #FCE7E1 0%, #F6D5CC 55%, #F2C9BE 100%) !important;
  border: 1px solid rgba(201, 130, 122, 0.18) !important;
  justify-content: flex-start;
}
.mod-tall::before { display: none; }
.mod-tall .ico {
  background: rgba(255, 255, 255, 0.75) !important;
  color: #B87067;
}
.mod-tall .txt { color: #7A4A44; font-size: 20px !important; }
.mod-tall .sub { color: rgba(122, 74, 68, 0.75); }

.tall-num {
  position: absolute;
  right: -4px;
  bottom: -18px;
  font-family: var(--f-display);
  font-size: 62px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: -0.04em;
  pointer-events: none;
}


/* 相簿：和留言一样的浅色渐变，不做加深 */
.mod-tall {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(250, 236, 232, 0.96)) !important;
  border: 1px solid rgba(70, 50, 45, 0.1) !important;
}
.mod-tall .ico {
  background: var(--pink-soft) !important;
  color: #B87067 !important;
}
.mod-tall .txt { color: var(--ink) !important; }
.mod-tall .sub { color: var(--muted) !important; }
.tall-num { display: none !important; }


/* ===== 倒数日 ===== */
.mod-days {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(250, 236, 232, 0.96)) !important;
  border: 1px solid rgba(70, 50, 45, 0.1) !important;
}
.mod-days .sub {
  margin-top: 6px;
  line-height: 1.5;
  white-space: normal;
}

.dayspage { padding-top: 60px; }

.dayhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dayhead .ptitle { margin: 0; }

.dayadd {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--pink);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 24px -14px rgba(201, 130, 122, 0.9);
}
.dayadd:active { transform: scale(0.94); }

.daybig {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 20px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 22px 44px -38px rgba(70, 50, 45, 0.8);
}
.db-name { font-family: var(--f-display); font-size: 22px; line-height: 1.3; }
.db-sub {
  margin-top: 8px;
  font-family: var(--f-cute);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.db-date {
  margin-top: 4px;
  font-family: var(--f-cute);
  font-size: 11px;
  color: var(--muted);
}
.db-right {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--c, #5B9BD5);
  padding-top: 4px;
}
.db-num { font-family: var(--f-display); font-size: 62px; line-height: 0.9; }
.db-unit { font-family: var(--f-cute); font-size: 14px; }

.daylist { margin-top: 6px; }
.dayrow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}
.dr-name {
  flex: 1 1 auto;
  min-width: 0;
  padding: 15px 14px;
  font-size: 15px;
  color: var(--ink);
  display: flex;
  align-items: center;
}
.dr-num {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 12px 16px;
  background: var(--c, #5B9BD5);
  color: #fff;
}
.dr-num span { font-family: var(--f-display); font-size: 24px; }
.dr-num i { font-style: normal; font-family: var(--f-cute); font-size: 12px; }
.dr-del {
  flex: 0 0 auto;
  width: 34px;
  border: 0;
  background: transparent;
  color: rgba(70, 50, 45, 0.28);
  font-size: 18px;
  cursor: pointer;
}
.dr-del:active { color: #C2605A; }

/* 表单里的控件 */
.modal-card.sheet { max-height: 86vh; overflow-y: auto; }

.chips-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.chipbtn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--f-cute);
  font-size: 12px;
  color: #6F635B;
  cursor: pointer;
}
.chipbtn.on { background: var(--pink); color: #fff; border-color: transparent; }

.row-between { display: flex; align-items: center; justify-content: space-between; }

.switch-btn {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 0;
  background: rgba(70, 50, 45, 0.15);
  cursor: pointer;
  transition: background 0.25s;
}
.switch-btn i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.25s;
  display: block;
}
.switch-btn.on { background: var(--pink); }
.switch-btn.on i { left: 23px; }

.rep-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rep-row select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(70, 50, 45, 0.22); }


/* ===== 事件（倒数日）改造 ===== */
.daytitle { display: flex; align-items: baseline; gap: 10px; }
.day-sub {
  font-family: var(--f-cute);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.daybig {
  display: block;
  margin: 18px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 48px -40px rgba(70, 50, 45, 0.8);
  cursor: pointer;
}
.daybig.detail { cursor: default; }

.db-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: var(--c, #5B9BD5);
  color: #fff;
}
.db-name { font-family: var(--f-cute); font-size: 16px; letter-spacing: 0.06em; }
.db-badge {
  font-family: var(--f-cute);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  letter-spacing: 0.08em;
}

.db-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 26px 18px 22px;
}
.db-word {
  font-family: var(--f-cute);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--muted);
}
.db-num {
  font-family: var(--f-display);
  font-size: 54px;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.db-unit {
  font-family: var(--f-cute);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.db-foot {
  padding: 12px 18px;
  background: rgba(70, 50, 45, 0.035);
  font-family: var(--f-cute);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* 列表行 */
.dr-left { flex: 1 1 auto; min-width: 0; padding: 13px 14px; }
.dr-name {
  font-size: 15px;
  color: var(--ink);
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dr-state {
  margin-top: 3px;
  font-family: var(--f-cute);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.dr-num span { font-size: 22px; }

/* 详情页 */
.daydetail { padding-top: 60px; }
.dd-head { display: flex; justify-content: flex-end; }
.dayadd.edit { background: #fff; color: #6F635B; border: 1px solid var(--line); box-shadow: none; }

.dd-actions { display: flex; gap: 10px; margin-top: 18px; }
.dd-btn {
  flex: 1 1 auto;
  padding: 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--f-cute);
  font-size: 13px;
  color: #6F635B;
  cursor: pointer;
}
.dd-btn.danger { color: #C2605A; }
.dd-btn:active { transform: scale(0.97); }


/* ===== 置顶区：平铺，不做卡片 ===== */
.dbig {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 6px 22px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(70, 50, 45, 0.07);
  cursor: pointer;
}
.dbig-left { flex: 1 1 auto; min-width: 0; padding-top: 6px; }
.dbig-title {
  font-family: var(--f-ui);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.dbig-title span {
  font-weight: 400;
  color: #8C8179;
}
.dbig-date {
  margin-top: 8px;
  font-size: 14px;
  color: #A1988F;
}
.dbig-right {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding-top: 2px;
}
.dbig-num {
  font-family: var(--f-ui);
  font-weight: 700;
  font-size: 62px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.dbig-tag {
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--c, #5B9BD5);
  color: #fff;
  font-family: var(--f-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 列表行更贴近参考：左白右色，字号更大 */
.dr-name { font-size: 16px; font-weight: 500; }
.dr-num span { font-family: var(--f-ui); font-weight: 600; font-size: 26px; }


/* ===== 首页购物车图标 ===== */
.cart-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin-right: 8px;
  border-radius: 50%;
  border: 1px dashed rgba(201, 130, 122, 0.55);
  background: rgba(255, 255, 255, 0.72);
  color: #B87067;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.cart-btn svg { width: 17px; height: 17px; }
.cart-btn:active { transform: scale(0.94); }

/* ===== 商城 ===== */
.shoppage { padding-top: 60px; }

.shophead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.shophead .ptitle { margin: 0; }
.shop-tools { display: flex; gap: 8px; align-items: center; }

.rndbtn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: #6F635B;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 20px;
}
.rndbtn:active { transform: scale(0.94); }

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #6F635B;
  font-family: var(--f-cute);
  font-size: 12px;
  cursor: pointer;
}
.cart-pill svg { width: 15px; height: 15px; }

.shopbody {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
  align-items: start;
}

.shopbar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  padding: 6px;
}
.catbtn {
  border: 0;
  background: transparent;
  padding: 12px 8px;
  border-radius: 10px;
  font-family: var(--f-cute);
  font-size: 13px;
  color: #7B716A;
  text-align: left;
  cursor: pointer;
}
.catbtn.on {
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 8px 18px -14px rgba(70, 50, 45, 0.8);
}

.shoplist { display: flex; flex-direction: column; gap: 10px; }

.pitem {
  display: flex;
  gap: 11px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.pimg {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  object-fit: cover;
}
.pinfo { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pname { font-size: 15px; font-weight: 500; color: var(--ink); }
.pdesc2 { margin-top: 3px; font-size: 12px; color: var(--muted); }
.prow {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pprice { color: #C2605A; font-size: 15px; font-weight: 600; }

.addbtn {
  border: 0;
  background: var(--pink);
  color: #fff;
  font-family: var(--f-cute);
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
}
.addbtn:active { transform: scale(0.95); }

.pacts { display: flex; gap: 6px; }
.mini {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--f-cute);
  font-size: 11px;
  color: #6F635B;
  cursor: pointer;
}
.mini.del { color: #C2605A; }

/* 购物车 / 分类 / 商品编辑 */
.cartrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.cartrow img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.crt-name { flex: 1 1 auto; min-width: 0; font-size: 14px; }
.crt-price { color: #C2605A; font-size: 13px; }
.crt-del { border: 0; background: none; color: #B0A69D; font-size: 18px; cursor: pointer; }

.catrow { display: flex; gap: 8px; margin-bottom: 8px; }
.catrow input {
  flex: 1 1 auto;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
  outline: none;
}

.sel {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.imgpick { display: flex; align-items: center; gap: 10px; }
.imgpick img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }


/* 购物车抖动 + 小红点 */
.cart-btn { position: relative; }
.cart-btn .dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #E2574C;
  box-shadow: 0 0 0 2px #FFFDFB;
}
.cart-btn.shake { animation: cartShake 1.4s ease-in-out infinite; }
@keyframes cartShake {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(-9deg); }
  20% { transform: rotate(9deg); }
  30% { transform: rotate(-7deg); }
  40% { transform: rotate(7deg); }
  50% { transform: rotate(-4deg); }
  60% { transform: rotate(4deg); }
  70% { transform: rotate(0deg); }
}

/* 商家待处理订单 */
.ordercard {
  margin-top: 14px;
  background: #FFF6F3;
  border: 1px solid rgba(201, 130, 122, 0.28);
  border-radius: 16px;
  padding: 12px 14px;
}
.oc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--f-cute);
  font-size: 13px;
  color: #7A4A44;
}
.oc-ok {
  border: 0;
  background: var(--pink);
  color: #fff;
  font-family: var(--f-cute);
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.oc-list { margin-top: 8px; }
.oc-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: #4B433D;
  border-top: 1px dashed rgba(201, 130, 122, 0.25);
}
.oc-row span { color: #C2605A; }


/* 商城：窄屏更紧凑，避免溢出 */
.shopbody { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; }
.shopbar { padding: 5px; }
.catbtn { padding: 11px 6px; font-size: 12px; }
.pitem { padding: 9px; gap: 9px; }
.pimg { width: 68px; height: 68px; border-radius: 9px; }
.pname { font-size: 14px; line-height: 1.35; }
.pdesc2 { font-size: 11px; }
.prow { flex-wrap: wrap; gap: 6px; }
.pprice { font-size: 14px; }
.addbtn { padding: 6px 11px; font-size: 11px; }
.mini { padding: 4px 8px; font-size: 10px; }
.ordercard { padding: 11px 12px; }
.oc-head { font-size: 12px; gap: 8px; }
.oc-ok { padding: 6px 12px; font-size: 11px; }


/* 待完成订单提示 */
.pending-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: #FDECE9;
  color: #C2605A;
  font-family: var(--f-cute);
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* 商家订单卡：多单 */
.oc-order { border-top: 1px dashed rgba(201, 130, 122, 0.25); padding-top: 8px; margin-top: 8px; }
.oc-order:first-of-type { border-top: 0; padding-top: 0; margin-top: 6px; }
.oc-one {
  margin-top: 6px;
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(201, 130, 122, 0.35);
  background: #fff;
  color: #B87067;
  font-family: var(--f-cute);
  font-size: 12px;
  cursor: pointer;
}
.shoptools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }


/* 商城头部：窄屏也别把身份挤断行 */
.shophead { flex-wrap: wrap; row-gap: 6px; }
.shophead .pdesc { white-space: nowrap; font-size: 12px; }
.shop-tools { flex-wrap: nowrap; }
.pending-chip {
  font-size: 10px;
  padding: 5px 9px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-pill { font-size: 11px; padding: 8px 11px; }


.psold {
  margin-top: 4px;
  font-family: var(--f-cute);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}


/* 地图顶部条：名字别换行 */
.map-who span { white-space: nowrap; font-size: 11px; }
.map-who { gap: 5px; }
.map-bar { padding: 7px 12px; }


/* ===== 真地图 ===== */
.realmap {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #0E1013;
}
.leaflet-container { background: #E8E2DA; }

/* 地图 pin：头像 + 名字 */
.mpin { background: none; border: 0; }
.mpin-av {
  display: block;
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.9);
  background: #222;
}
.mpin-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mpin-av.her { box-shadow: 0 0 0 3px rgba(224, 87, 95, 0.45), 0 10px 22px -8px rgba(0, 0, 0, 0.9); }
.mpin-tag {
  display: block;
  margin-top: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(10, 10, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #F3EEE8;
  font-family: var(--f-cute);
  font-size: 10px;
  white-space: nowrap;
  text-align: center;
}

.zoom {
  position: fixed;
  right: 16px;
  bottom: 84px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
}
.leaflet-control-attribution {
  font-size: 9px !important;
  background: rgba(255, 255, 255, 0.75) !important;
}


/* 去掉 Leaflet 自带的缩放控件（我们自己有一组） */
.leaflet-control-zoom { display: none !important; }
/* 版权挪到左下，避开音乐键 */
.leaflet-bottom.leaflet-right { display: none; }
.leaflet-control-attribution {
  position: fixed !important;
  left: 8px;
  bottom: 6px;
  border-radius: 4px;
  opacity: 0.7;
}


/* 地图页：压在纸纹遮罩之上，遮罩关掉 */
body.on-map::before { display: none !important; }
.realmap { z-index: 3; }
.map-bar, .zoom, .map-foot { z-index: 40; }


.mp-actions { display: flex; align-items: center; justify-content: center; gap: 10px; }
.mp-change {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--f-cute);
  font-size: 11px;
  color: #6F635B;
  cursor: pointer;
}
.mp-change:active { transform: scale(0.95); }
#pickerAudio { display: none; }


/* 播放面板动作区：换歌占左侧，播放键在右 */
.mp-actions {
  display: grid !important;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.mp-change {
  width: 100%;
  text-align: center;
  white-space: nowrap;
}
.music-panel { padding-bottom: 16px; }


/* 唱片显示封面 */
.vinyl img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.vinyl { overflow: hidden; }

/* 歌单 */
.plrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
}
.plcover {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.plname { flex: 1 1 auto; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plnow { font-family: var(--f-cute); font-size: 10px; color: var(--pink); white-space: nowrap; }
.plbtn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 5px 9px;
  font-family: var(--f-cute);
  font-size: 10px;
  color: #6F635B;
  cursor: pointer;
  flex: 0 0 auto;
}
.plbtn.del { color: #C2605A; }
.music-panel { width: min(320px, calc(100vw - 28px)); }


/* ===== 大字“涵” ===== */
.name.nice {
  font-family: var(--f-cute);
  font-size: 54px;
  line-height: 1;
  letter-spacing: 0;
  color: #4A3F3A;
  font-weight: 400;
}

/* ===== 私密开关 ===== */
.priv-switch {
  margin: 10px auto 0;
  display: block;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(201, 130, 122, 0.4);
  background: rgba(255, 255, 255, 0.7);
  color: #8C7B72;
  font-family: var(--f-cute);
  font-size: 11px;
  cursor: pointer;
}
.priv-switch.on {
  background: #3A302B;
  color: #F7EDE8;
  border-color: #3A302B;
}

/* ===== 访客 ===== */
.guestbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 6px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px dashed rgba(201, 130, 122, 0.4);
  font-family: var(--f-cute);
  font-size: 12px;
  color: #7B6F67;
}
.guestbar b { color: #C2605A; font-weight: 500; }
.guestbar button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--f-cute);
  font-size: 11px;
  color: #6F635B;
  cursor: pointer;
  flex: 0 0 auto;
}

.lock {
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(58, 48, 43, 0.85);
  color: #F7EDE8;
  font-family: var(--f-cute);
  font-size: 9px;
  vertical-align: 2px;
}

/* 访客看不到的编辑入口 */
body.guest .cav { opacity: 0.6; }

/* ===== 唱片黑边 ===== */
.music-btn {
  border: 2px solid #1D1917 !important;
  box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.9) !important;
}
.vinyl {
  border: 2px solid #1D1917;
  box-sizing: border-box;
}


/* 播放器面板必须能点（父级 pointer-events:none 会吞掉进度条） */
.music-panel { pointer-events: auto; }
.music-panel input[type="range"] { pointer-events: auto; }
#trackChange[style*="none"] { display: none; }

/* 私密勾选 */
.mf-priv { flex-direction: row !important; align-items: center; justify-content: space-between; gap: 10px; }
.mf-priv input { width: 20px; height: 20px; accent-color: #3A302B; }
.privmini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--f-cute);
  font-size: 10px;
  color: #7B6F67;
  margin-right: auto;
}
.privmini input { accent-color: #3A302B; }
.cbar { display: flex; align-items: center; gap: 8px; }


/* 照片点赞 */
.plike {
  flex: 0 0 auto;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 8px;
  margin-left: 4px;
  border: 0;
  background: transparent;
  color: #C9BDB6;
  font-family: var(--f-ui);
  font-size: 11px;
  cursor: pointer;
}
.plike.on { color: #E0575F; }
.plike svg { display: block; }
.plike span { line-height: 1; }
.plike:active { transform: scale(0.9); }


/* ===== 访客信箱 ===== */
.mailpage { padding-top: 60px; }
.mailpage .composer { margin: 16px 0 18px; }
.mailpage .cbox input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  padding: 4px 0 8px;
}

.mli {
  padding: 14px 0;
  border-bottom: 1px dashed rgba(70, 50, 45, 0.12);
}
.ml-top { display: flex; align-items: center; gap: 8px; }
.ml-name { font-size: 13px; color: #4A3F3A; font-weight: 500; }
.ml-time { font-family: var(--f-cute); font-size: 10px; color: var(--muted); }
.ml-del {
  margin-left: auto;
  border: 0;
  background: transparent;
  font-family: var(--f-cute);
  font-size: 10px;
  color: #C2605A;
  cursor: pointer;
}
.ml-text {
  margin-top: 7px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.ml-acts { display: flex; gap: 16px; margin-top: 8px; }
.mact-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 2px 0;
  font-family: var(--f-ui);
  font-size: 12px;
  color: #A99E96;
  cursor: pointer;
}
.mact-btn.on { color: #E0575F; }
.ml-note {
  margin-top: 6px;
  font-family: var(--f-cute);
  font-size: 10px;
  color: #C2605A;
  letter-spacing: 0.04em;
}
.ml-reps {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}
.ml-rep { font-size: 13px; line-height: 1.7; color: #5A4F49; }
.ml-rep b { color: #C2605A; font-weight: 500; margin-right: 6px; }
.ml-empty { font-family: var(--f-cute); font-size: 11px; color: var(--muted); margin: 0; }
.ml-repin { display: flex; gap: 8px; margin-top: 8px; }
.ml-repin input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid rgba(70, 50, 45, 0.12);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  outline: none;
  background: #fff;
}
.ml-repin button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-family: var(--f-cute);
  font-size: 11px;
  padding: 7px 14px;
  cursor: pointer;
}


/* 访客信箱的输入区（不受访客权限开关影响） */
.mcomposer {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}
.mcomposer .cav {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.mcomposer .cbox { flex: 1 1 auto; min-width: 0; }
.mcomposer .cbar { display: flex; align-items: center; gap: 8px; }
.mcomposer .ccount {
  font-family: var(--f-cute);
  font-size: 10px;
  color: var(--muted);
  margin-left: auto;
}
.msend {
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-family: var(--f-cute);
  font-size: 12px;
  padding: 7px 16px;
  cursor: pointer;
}


/* 播放器面板：收起时必须完全不能点 */
.music:not(.open) .music-panel {
  pointer-events: none !important;
  visibility: hidden;
}
.music.open .music-panel {
  pointer-events: auto !important;
  visibility: visible;
}
.music:not(.open) .music-panel * { pointer-events: none !important; }

/* 评论区 IP */
.ip {
  font-style: normal;
  font-family: var(--f-ui);
  font-size: 9px;
  color: #B9AEA6;
  margin-left: 5px;
  letter-spacing: 0.02em;
}

/* 回复展开按钮的“收起”态 */
.mact-btn.open { color: #C2605A; }


/* 排序条 */
.sortbar { display: flex; gap: 8px; margin: 12px 0 4px; }
.sortbtn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--f-cute);
  font-size: 11px;
  color: #7B6F67;
  cursor: pointer;
}
.sortbtn.on { background: #3A302B; color: #F7EDE8; border-color: #3A302B; }

/* 置顶标签 */
.pin-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #3A302B;
  color: #F7EDE8;
  font-family: var(--f-cute);
  font-size: 9px;
  vertical-align: 2px;
}

/* 回复行 + 点赞 */
.ml-rep { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; }
.ml-rep-body { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 1.7; color: #5A4F49; }
.ml-rep-body b { color: #C2605A; font-weight: 500; margin-right: 6px; }
.rep-like {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 0;
  background: transparent;
  padding: 2px 2px;
  color: #C9BDB6;
  font-family: var(--f-ui);
  font-size: 10px;
  cursor: pointer;
}
.rep-like.on { color: #E0575F; }

.ml-ops { margin-left: auto; display: flex; gap: 10px; }
.ml-ops .ml-del { margin-left: 0; }


/* 访客身份条 */
.g-state {
  font-family: var(--f-cute);
  font-size: 11px;
  color: #9A8E86;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.g-name {
  border: 1px dashed rgba(201, 130, 122, 0.5);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--f-ui);
  font-size: 12px;
  color: #6F635B;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.g-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 130, 122, 0.5);
  padding: 0;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}
.g-av img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gp-avrow { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.gp-avrow img {
  width: 54px; height: 54px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line);
}

.namerow { flex-wrap: wrap; row-gap: 8px; }


/* 标题栏里的购物车 */
.head { gap: 10px; }
.head .cart-btn { margin-left: 8px; }

/* 大字换成爱心 */
.name-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.name-heart svg {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 8px 16px rgba(224, 87, 95, 0.35));
}
.namerow { align-items: center; }


/* 登录状态小圆点 + 紧凑分组 */
.g-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}
.g-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--f-cute);
  font-size: 10px;
  color: #9A8E86;
  white-space: nowrap;
}
.st-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #E2574C;
  box-shadow: 0 0 0 3px rgba(226, 87, 76, 0.15);
  flex: 0 0 auto;
}
.st-dot.ok {
  background: #58B368;
  box-shadow: 0 0 0 3px rgba(88, 179, 104, 0.16);
}
.g-name {
  padding: 4px 9px;
  font-size: 11px;
  max-width: 84px;
}
.g-av { width: 28px; height: 28px; }

/* 标题栏：购物车靠左，英文靠右 */
.head { display: flex; align-items: center; gap: 10px; }
.head .mark { flex: 0 0 auto; }
.head .cart-btn { margin: 0; }
.head .mark-sub { margin-left: auto; }

/* 预设头像选择 */
.gp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.gp-opt {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 1/1;
}
.gp-opt img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.gp-opt.on { border-color: #E0575F; }

/* 举报按钮 */
.ml-del.rep, .rep-flag {
  border: 0;
  background: transparent;
  font-family: var(--f-cute);
  font-size: 10px;
  color: #B0A69D;
  cursor: pointer;
  padding: 0 2px;
  flex: 0 0 auto;
}
.ml-del.rep { color: #B0A69D; }


/* 相簿排序条 */
.listpage .sortbar { margin: 10px 0 12px; }

/* 信箱：左侧头像（抖音式） */
.mli { display: flex; gap: 10px; align-items: flex-start; }
.ml-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  margin-top: 2px;
  background: #F3EAE5;
}
.ml-main { flex: 1 1 auto; min-width: 0; }
.ml-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 回复头像 */
.ml-rep { display: flex; gap: 8px; align-items: flex-start; }
.rep-av {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  margin-top: 4px;
}


/* 主人回复常显 */
.ml-preview { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.75); }
.ml-preview .ml-rep + .ml-rep { margin-top: 4px; }

/* “我” 标签 */
.me-tag {
  font-style: normal;
  display: inline-block;
  margin: 0 4px;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(201, 130, 122, 0.18);
  color: #B87067;
  font-family: var(--f-cute);
  font-size: 9px;
  vertical-align: 1px;
}


/* 相簿列表：按钮小一点，别把爱心挤下去 */
.listpage .pacts { flex-wrap: wrap; gap: 6px; }
.listpage .pbtn { padding: 5px 9px; font-size: 11px; }
.listpage .plike { align-self: flex-start; margin-top: 26px; }
.listpage .prow { align-items: flex-start; }


/* 相簿搜索 */
.psearch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: #B0A69D;
}
.psearch input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--ink);
}
.psearch button {
  border: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1;
  color: #C0B5AD;
  cursor: pointer;
  visibility: hidden;
  padding: 0 2px;
}


/* 未进入时的“点击登录” */
.g-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px dashed rgba(70, 50, 45, 0.28);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 6px 13px;
  font-family: var(--f-cute);
  font-size: 11px;
  color: #8C8179;
  cursor: pointer;
}
.st-dot.idle {
  background: #BFB4AC;
  box-shadow: 0 0 0 3px rgba(191, 180, 172, 0.18);
}

/* 进入方式选择 */
.entrybtn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  margin-bottom: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.entrybtn b { display: block; font-size: 15px; color: var(--ink); font-weight: 500; }
.entrybtn span {
  display: block;
  margin-top: 3px;
  font-family: var(--f-cute);
  font-size: 11px;
  color: var(--muted);
}
.entrybtn:active { transform: scale(0.99); }

/* 访客足迹 */
.visitrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.vchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  font-family: var(--f-cute);
  font-size: 10px;
  color: #7B6F67;
}
.vchip i { font-style: normal; color: #C2605A; }


/* 回复时间 */
.rep-time {
  font-family: var(--f-cute);
  font-size: 9px;
  color: #B9AEA6;
  margin: 0 5px;
}
.cmt-time { margin-left: 6px; }


/* 回复：名字一行，内容一行（抖音式） */
.ml-rep { align-items: flex-start; }
.ml-rep-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rep-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.rep-head b { color: #C2605A; font-weight: 500; font-size: 12px; }
.rep-head .ip, .rep-head .rep-time { margin: 0; }
.rep-text {
  font-size: 13px;
  line-height: 1.55;
  color: #5A4F49;
  word-break: break-word;
}


/* 回复区：换个显眼的底色 */
.ml-preview,
.ml-reps {
  background: rgba(250, 233, 228, 0.85) !important;
  border: 1px solid rgba(201, 130, 122, 0.18);
  border-radius: 12px;
  padding: 9px 11px;
}
.ml-preview { margin-top: 8px; }
.ml-reps { margin-top: 8px; }

/* 主人的名字：可爱字体 + 主题色 */
.owner-name {
  font-family: var(--f-cute) !important;
  font-size: 13px !important;
  color: #E0575F !important;
  letter-spacing: 0.02em;
}


/* ===== 照片 PK ===== */
.pkpage { padding-top: 60px; }

.pkrow { display: flex; gap: 10px; margin: 16px 0 12px; }
.pkcard {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 16px 32px -26px rgba(70, 50, 45, 0.9);
}
.pkcard img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}
.pkcard.mine { border-color: var(--pink); }
.pkcard.win { border-color: #E5B36B; }
.pkcard.empty {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  font-family: var(--f-cute);
  font-size: 12px;
  color: var(--muted);
}
.pkvoted, .pkwin {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(10, 10, 14, 0.72);
  color: #fff;
  font-family: var(--f-cute);
  font-size: 10px;
}
.pkwin { left: auto; right: 8px; background: #E5B36B; }

.pkbars { display: flex; flex-direction: column; gap: 7px; margin: 6px 0 4px; }
.pkbar {
  position: relative;
  height: 26px;
  border-radius: 999px;
  background: rgba(70, 50, 45, 0.07);
  overflow: hidden;
}
.pkbar i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #F3C6C0, #E9A9A0);
  transition: width 0.4s ease;
}
.pkbar.b i { background: linear-gradient(90deg, #C7D8EA, #8FA9C9); }
.pkbar b {
  position: relative;
  z-index: 1;
  display: block;
  text-align: right;
  padding-right: 12px;
  line-height: 26px;
  font-size: 12px;
  color: #5A4F49;
}
.pkvoteinfo { margin: 2px 0 0; font-family: var(--f-cute); font-size: 11px; color: var(--muted); }

.pktime {
  margin: 12px 0 0;
  font-family: var(--f-cute);
  font-size: 11px;
  color: #9A8E86;
  text-align: center;
}

.pkbig img {
  width: 100%;
  border-radius: 18px;
  display: block;
  box-shadow: 0 22px 44px -32px rgba(70, 50, 45, 0.9);
}
.pkcap {
  margin: 10px 0 0;
  text-align: center;
  font-size: 14px;
  color: #6F635B;
}

.pkadmin {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(70, 50, 45, 0.12);
}
.pkadmin .pdesc { width: 100%; margin: 0 0 4px; }

.pkgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
}
.pkopt { padding: 0; border: 0; background: none; cursor: pointer; }
.pkopt img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}


.pkupload {
  width: 100%;
  margin-bottom: 10px;
  padding: 11px;
  border-radius: 12px;
  border: 1px dashed rgba(201, 130, 122, 0.5);
  background: #FFF9F7;
  color: #B87067;
  font-family: var(--f-cute);
  font-size: 12px;
  cursor: pointer;
}


/* 指定图预览：固定小尺寸 */
.pkadmin .pkslots { display: flex; gap: 10px; width: 100%; margin-bottom: 10px; }
.pkadmin .pkslot {
  flex: 1 1 0;
  width: 0;
  height: 140px;
  aspect-ratio: auto !important;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
}
.pkadmin .pkslot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pkadmin .pkslot.empty { background: rgba(70, 50, 45, 0.05); border-style: dashed; }


.pkadmin .pkslot i {
  z-index: 3;
  font-size: 11px;
  padding: 2px 9px;
  background: rgba(10, 10, 14, 0.72);
}


/* 左右角标 */
.pkadmin .pkslot { display: block !important; }
.pkadmin .pkslot > i {
  position: absolute !important;
  left: 8px;
  bottom: 8px;
  z-index: 5;
  font-style: normal;
  font-family: var(--f-cute);
  font-size: 11px;
  color: #FFF;
  background: rgba(10, 10, 14, 0.7);
  border-radius: 999px;
  padding: 2px 9px;
}
.pkadmin .pkslot > img { position: relative; z-index: 1; }
.pkadmin .pkslot > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--f-cute);
  font-size: 12px;
  color: var(--muted);
}
