/* ============================================================
   石榴记 UI v3 — 全局视觉 token + 壳层 + 组件
   基准: 390×844  蓝天晨雾 · 真实石榴 · 毛玻璃
   ============================================================ */

/* ── 1. Design Tokens ── */
@font-face {
  font-family: "Shiliu Noto Sans SC";
  src: url("../assets/fonts/NotoSansSC-App.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Shiliu KuaiLe";
  src: url("../assets/fonts/ZCOOLKuaiLe-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --v3-navy: #041f32;
  --v3-blue: #0d5f8e;
  --v3-sky: #4aa7cf;
  --v3-ink: #fdfaf1;
  --v3-cream: #fff7e8;
  --v3-line: rgba(255,255,255,.26);
  --v3-glass: rgba(4,35,52,.62);
  --v3-glass-strong: linear-gradient(135deg,rgba(5,46,67,.84),rgba(5,33,43,.58));
  --v3-red: #df5342;
  --v3-green: #78b98d;
  --v3-radius: 19px;
  --v3-radius-sm: 13px;
  --v3-radius-lg: 27px;
  --v3-font: "Shiliu Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --v3-display-font: "Shiliu KuaiLe", "Shiliu Noto Sans SC", "PingFang SC", sans-serif;
  --v3-nav-bg: #031e22;
  --v3-safe-bottom: 0px;
  --v3-safe-top: env(safe-area-inset-top, 0px);
  --v3-nav-h: 60px;
  --v3-header-h: 56px;
}

/* ── 2. App Shell ── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background-color: transparent;
}

:root[data-font-size="large"] { font-size: 17px; }
:root[data-font-size="extra-large"] { font-size: 19px; }
:root[data-theme="light"] {
  --v3-ink: #173242;
  --v3-cream: #173242;
  --v3-line: rgba(23,50,66,.18);
  --v3-glass: rgba(246,251,252,.86);
  --v3-glass-strong: linear-gradient(135deg,rgba(255,255,255,.94),rgba(226,244,249,.88));
  --v3-nav-bg: #dceff5;
}
:root[data-theme="light"] #app::before { opacity: .28; }
:root[data-theme="light"] .page-header,
:root[data-theme="light"] #bottom-nav { background: rgba(235,248,251,.92); color: #173242; }
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    --v3-ink: #173242;
    --v3-cream: #173242;
    --v3-line: rgba(23,50,66,.18);
    --v3-glass: rgba(246,251,252,.86);
    --v3-glass-strong: linear-gradient(135deg,rgba(255,255,255,.94),rgba(226,244,249,.88));
    --v3-nav-bg: #dceff5;
  }
  :root[data-theme="system"] #app::before { opacity: .28; }
}
html {
  background-color: var(--v3-nav-bg);
  background-image: url("../assets/hero-pomegranate-cinematic.png");
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;
}
#app {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 430px;
  height: auto;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  font-family: var(--v3-font);
  color: var(--v3-ink);
  background: transparent;
}
#app::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/hero-pomegranate-cinematic.png") center bottom / cover no-repeat;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}
#app > :not(.screen):not(#bottom-nav) { position: relative; z-index: 1; }
#app > .screen, #app > #bottom-nav { z-index: 1; }

/* ── 3. Screens ── */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.screen.active { display: flex; }
.screen-loading { animation: v3-fade-in .24s ease; }
@keyframes v3-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── 4. Page Header ── */
.page-header, .feature-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: var(--v3-header-h);
  padding: 12px 14px 10px;
  padding-top: calc(12px + var(--v3-safe-top));
  border-bottom: 1px solid rgba(255,255,255,.18);
  flex-shrink: 0;
}
.page-header h1, .feature-header h1 {
  margin: 0;
  text-align: center;
  font-size: 22px;
  font-family: var(--v3-display-font);
  font-weight: 400;
  letter-spacing: .07em;
}
.header-spacer { display: block; width: 40px; height: 40px; }
.back-button, .header-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: #fff;
  cursor: pointer;
}
.back-button { width: 40px; height: 40px; font-size: 24px; }
.back-button img { width: 22px; height: 22px; filter: brightness(10); }
.header-text { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); padding: 6px 4px; }
.header-text + .header-text { margin-left: 2px; }

/* ── 5. Page Scroll ── */
.page-scroll, .feature-page {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 17px 16px calc(var(--v3-nav-h) + 20px + var(--v3-safe-bottom));
  scrollbar-width: none;
}
.page-scroll::-webkit-scrollbar { display: none; }

/* ── 6. Glass Card ── */
.glass-card {
  background: var(--v3-glass-strong);
  border: 1px solid var(--v3-line);
  box-shadow: 0 12px 28px rgba(1,20,28,.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--v3-radius);
  padding: 16px;
  margin-bottom: 12px;
}

/* ── 7. Buttons ── */
.button, .feature-primary {
  border: 0;
  border-radius: 15px;
  padding: 12px 16px;
  color: #19303a;
  font-family: var(--v3-font);
  font-size: 14px;
  font-weight: 800;
  background: var(--v3-cream);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.14);
  transition: transform .12s, box-shadow .12s;
}
.button:active, .feature-primary:active { transform: scale(.97); }
.button.wide, .feature-primary.wide { display: block; width: 100%; text-align: center; }
.outline-small, .outline {
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 15px;
  color: #fff;
  background: rgba(255,255,255,.06);
  padding: 11px 14px;
  font-family: var(--v3-font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.outline-small { padding: 8px 12px; font-size: 12px; border-radius: 12px; }

/* ── 8. Bottom Navigation ── */
#bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--v3-nav-h) + var(--v3-safe-bottom));
  padding-bottom: var(--v3-safe-bottom);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: linear-gradient(180deg, rgba(3,30,34,.66), rgba(3,30,34,.82));
  border-top: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 8;
}
#bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 49px;
  flex: 1;
  border: none;
  background: none;
  color: rgba(255,255,255,.6);
  font-family: var(--v3-font);
  font-size: 10px;
  cursor: pointer;
  padding: 6px 0;
  transition: color .15s;
}
#bottom-nav button img {
  width: 22px;
  height: 22px;
  opacity: .6;
  filter: brightness(0) invert(1);
  transition: opacity .15s;
}
#bottom-nav button.active { color: #fff; font-weight: 800; }
#bottom-nav button.active img { opacity: 1; }

/* ── 9. Brand / Logo ── */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--v3-display-font);
  font-size: 20px;
  white-space: nowrap;
}
.brand img, .brand .mini-mark {
  width: 35px;
  height: 35px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand .mini-mark {
  display: inline-block;
  background: url("../assets/logo-lt-pomegranate-v3-white-transparent.png") center / contain no-repeat;
}
.brand-on-dark { color: #fff; }
/* P0-02: 首页品牌顶部居中放大 */
.brand-hero {
  font-size: 28px;
  gap: 10px;
}
.brand-hero img { width: 44px; height: 44px; }
/* P0-03: 页头品牌壳层 */
.v3-brand-header {
  grid-template-columns: auto 1fr 44px;
}
.v3-brand-header .brand { font-size: 16px; gap: 6px; }
.v3-brand-header .brand img { width: 26px; height: 26px; }
.v3-brand-header h1 { text-align: left; font-size: 18px; margin-left: 10px; }

/* ── 10. Home / Cinematic ── */
.cinematic-home, .cinematic-welcome {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0 20px calc(var(--v3-nav-h) + 20px + var(--v3-safe-bottom));
  padding-top: calc(20px + var(--v3-safe-top));
}
.cinematic-shade {
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}
.cinematic-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
}
.cinematic-topbar .brand { font-size: 22px; }
.cinematic-topbar .brand img, .cinematic-topbar .brand .mini-mark { width: 38px; height: 38px; }
/* P0-02: 品牌居中放大，铃铛绝对定位右侧 */
.cinematic-topbar .brand-hero { font-size: 28px; gap: 10px; }
.cinematic-topbar .brand-hero img { width: 44px; height: 44px; }
.cinematic-bell {
  position: absolute;
  right: 0;
  top: 10px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--v3-line);
  border-radius: 50%;
  background: rgba(2,28,42,.25);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.cinematic-bell img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.cinematic-bell.has-unread::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--v3-red);
}
.cinematic-copy {
  position: relative;
  z-index: 2;
  margin-top: clamp(80px, 13vh, 120px);
  margin-bottom: 18px;
}
.cinematic-copy h1 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .04em;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
  font-family: var(--v3-display-font);
  font-weight: 400;
}
.cinematic-copy p {
  margin: 0 0 16px;
  font-size: 14px;
  color: rgba(255,255,255,.82);
  line-height: 1.6;
}
.cinematic-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cinematic-primary {
  border: 0;
  border-radius: 15px;
  padding: 13px 22px;
  color: #19303a;
  font-family: var(--v3-font);
  font-size: 15px;
  font-weight: 800;
  background: var(--v3-cream);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.cinematic-secondary {
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 15px;
  padding: 12px 18px;
  color: #fff;
  font-family: var(--v3-font);
  font-size: 14px;
  font-weight: 700;
  background: rgba(255,255,255,.08);
  cursor: pointer;
}
.cinematic-live-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 16px;
  background: rgba(2,28,42,.35);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  font-family: var(--v3-font);
}
.cinematic-live-entry.is-disabled { cursor: default; }
.cinematic-live-entry img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.cinematic-live-entry span { font-size: 14px; font-weight: 700; }
.cinematic-live-entry small { font-size: 11px; color: rgba(255,255,255,.6); margin-left: auto; }
.cinematic-nav {
  display: none; /* 使用全局 #bottom-nav */
}

/* Welcome 页 */
.welcome-cinematic-copy { text-align: center; margin-bottom: 24px; }
.welcome-cinematic-copy h1 { font-size: 32px; margin: 0 0 10px; }
.welcome-cinematic-copy p { font-size: 15px; color: rgba(255,255,255,.8); margin: 0; }
.welcome-cinematic-actions { display: flex; flex-direction: column; gap: 12px; }
.welcome-cinematic-actions .cinematic-primary,
.welcome-cinematic-actions .cinematic-secondary { width: 100%; text-align: center; }

/* ── 11. Section Headings ── */
.section-heading {
  margin: 20px 1px 10px;
  font-size: 18px;
  font-family: var(--v3-display-font);
  font-weight: 400;
}
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 1px 10px;
}
.section-row h2, .section-row h4 { margin: 0; font-size: 18px; }
.subtle { color: rgba(255,255,255,.71); font-size: 12px; }
.intro-copy { margin-bottom: 14px; }
.intro-copy p { margin: 0; font-size: 13px; color: rgba(255,255,255,.76); line-height: 1.6; }

/* ── 12. Diary / Timeline ── */
.timeline { padding-bottom: 12px; }
.month-group { margin-bottom: 20px; }
.month-group h2 { font-size: 16px; margin: 0 0 12px; color: rgba(255,255,255,.9); }
.month-group h2 small { font-size: 12px; color: rgba(255,255,255,.5); margin-left: 6px; }
.diary-post {
  background: var(--v3-glass-strong);
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-radius);
  padding: 14px;
  margin-bottom: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.post-meta .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.avatar.grandma { background: linear-gradient(135deg, #e8845e, #d4573e); }
.avatar.tone { background: linear-gradient(135deg, #5ea8e8, #3e7ed4); }
.post-meta b { font-size: 14px; display: block; }
.post-meta small { font-size: 11px; color: rgba(255,255,255,.55); }
.post-pill {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(255,255,255,.12);
  font-size: 11px;
  color: rgba(255,255,255,.8);
}
.post-photo-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.post-photo-row.double { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-photo-row.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.post-photo-row.double .mock-photo,
.post-photo-row.grid .mock-photo { aspect-ratio: 1; }
.mock-photo {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--v3-radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  display: grid;
  place-items: end start;
  padding: 8px;
  color: inherit;
  font: inherit;
  text-align: left;
}
.mock-photo span {
  position: relative;
  z-index: 1;
  font-size: 11px;
  text-shadow: 0 1px 4px #000;
  color: rgba(255,255,255,.9);
}
.mock-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-location { font-size: 12px; color: rgba(255,255,255,.6); margin-bottom: 6px; }
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.post-tags span { font-size: 11px; color: var(--v3-sky); }
.post-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.post-footer button {
  border: none;
  background: none;
  color: rgba(255,255,255,.7);
  font-family: var(--v3-font);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
}
.like-button.liked { color: var(--v3-red); }
.edit-post-btn,
.delete-post-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  font: inherit;
}
.edit-post-btn {
  margin-left: auto;
  color: var(--v3-sky) !important;
  border: 1px solid rgba(125, 211, 252, .35);
  background: rgba(125, 211, 252, .08);
}
.delete-post-btn {
  margin-left: 0;
  padding: 8px 14px;
  border: 1px solid rgba(223,83,66,.6);
  border-radius: 10px;
  background: rgba(223,83,66,.1);
  color: var(--v3-red) !important;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.inline-link { color: var(--v3-sky) !important; font-size: 12px; }
.comments { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); }
.comment-list p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; }
.comment-list b { color: var(--v3-sky); margin-right: 6px; }
.comment-compose { display: flex; gap: 8px; margin-top: 8px; }
.comment-compose input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 12px;
  color: #fff;
  background: rgba(3,30,42,.57);
  font-family: var(--v3-font);
  font-size: 13px;
}
.comment-compose button {
  width: 43px;
  border: 0;
  border-radius: 12px;
  color: #183443;
  background: var(--v3-cream);
  font-weight: 800;
  font-family: var(--v3-font);
  cursor: pointer;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255,255,255,.5);
  font-size: 14px;
}
.pull-hint {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,.35);
  padding: 4px 0 8px;
}

/* ── 13. Profile ── */
.profile-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 132px;
  padding: 19px;
}
.profile-hero::after {
  content: "";
  position: absolute;
  width: 155px;
  height: 155px;
  border-radius: 50%;
  right: -19px;
  top: -20px;
  background: rgba(138,204,223,.17);
  pointer-events: none;
}
.profile-hero img {
  width: 47px;
  height: 47px;
  object-fit: contain;
  flex-shrink: 0;
  z-index: 1;
}
/* P0-05: 左信息 / 右大天数 */
.profile-info { z-index: 1; flex: 1; min-width: 0; }
.profile-info span { display: block; font-size: 11px; color: rgba(255,255,255,.66); }
.profile-info b { display: block; margin: 2px 0; font-size: 18px; }
.profile-info small { display: block; font-size: 11px; color: rgba(255,255,255,.66); }
.profile-days {
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 45px;
  line-height: 1;
  letter-spacing: -.06em;
}
.profile-days b { font-size: inherit; line-height: inherit; }
.profile-days small { font-size: 12px; font-weight: 700; letter-spacing: 0; }
.family-list > div, .member-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.family-list > div:last-child, .member-row:last-child { border-bottom: none; }
.member-avatar { width: 32px; height: 32px; font-size: 13px; }
.member-name { min-width: 0; }
.member-name b { font-size: 14px; display: block; }
.member-name small { display: block; font-size: 11px; color: rgba(255,255,255,.5); }
.member-action { display: flex; align-items: center; justify-content: flex-end; padding-right: 12px; min-width: 56px; }
.member-role-tag { font-size: 12px; color: rgba(255,255,255,.55); white-space: nowrap; }
.member-remove-btn {
  min-width: 44px; min-height: 36px;
  border: 1px solid rgba(223,83,66,.6); border-radius: 8px;
  background: rgba(223,83,66,.1); color: var(--v3-red);
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.family-list b { font-size: 14px; }
.family-list b small { display: block; font-size: 11px; color: rgba(255,255,255,.5); font-weight: 400; }
.family-list i { margin-left: auto; font-style: normal; font-size: 12px; color: rgba(255,255,255,.55); }
.folder-more {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,.78);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.folder-more:active { background: rgba(255,255,255,.12); }
.folder-more-static { width: 44px; flex: 0 0 44px; text-align: center; color: rgba(255,255,255,.62); font-size: 24px; }
.invite-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.invite-card span { font-size: 10px; letter-spacing: .1em; color: rgba(255,255,255,.5); text-transform: uppercase; }
.invite-card b { display: block; font-size: 16px; margin: 4px 0; }
.invite-card p { margin: 0; font-size: 12px; color: rgba(255,255,255,.6); }
.invite-card button {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 12px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255,255,255,.06);
  font-family: var(--v3-font);
  font-size: 12px;
  cursor: pointer;
}
.invite-card button img { width: 14px; height: 14px; filter: brightness(0) invert(1); }
.menu-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 4px;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: none;
  color: #fff;
  font-family: var(--v3-font);
  font-size: 14px;
  cursor: pointer;
}
.menu-list button:last-child { border-bottom: none; }
.menu-list button i { font-style: normal; color: rgba(255,255,255,.4); }
.role-note { text-align: center; font-size: 12px; color: rgba(255,255,255,.45); margin-top: 16px; }

/* ── 14. Albums (folder-first) ── */
.album-folders { margin-bottom: 16px; }
.album-folders .form-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.album-folders .form-head h2 { margin: 0; font-size: 16px; }
.album-folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 12px;
  margin: 0;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  background: rgba(255,255,255,.05);
  color: #fff;
  font-family: var(--v3-font);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
.album-folder-item small { color: rgba(255,255,255,.55); font-size: 12px; }
.folder-cover { width: 65px; height: 65px; min-width: 65px; max-width: 65px; border-radius: 10px; background: rgba(255,255,255,.08); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-right: 10px; overflow: hidden; flex: 0 0 65px; }
.folder-cover img { display: block; width: 65px; height: 65px; min-width: 65px; max-width: 65px; object-fit: cover; object-position: center; }
.folder-info { flex: 1 1 auto; min-width: 0; }
.folder-empty { font-size: 13px; color: rgba(255,255,255,.5); padding: 8px 0; }
.album-section { margin-bottom: 18px; }
.album-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 4px;
  border: none;
  background: none;
  color: #fff;
  font-family: var(--v3-font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.album-heading small { font-size: 12px; color: rgba(255,255,255,.55); font-weight: 400; }
.album-grid-feature {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.album-grid-feature .mock-photo { aspect-ratio: 1; }
.compare-result { text-align: center; }
.compare-result b { font-size: 18px; display: block; margin-bottom: 4px; }
.compare-result span { font-size: 12px; color: rgba(255,255,255,.6); }

/* ── 15. Records ── */
.record-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.record-controls > div:first-child span { font-size: 11px; color: rgba(255,255,255,.6); display: block; }
.record-controls > div:first-child b { font-size: 15px; }
.record-controls > div:last-child { display: flex; gap: 7px; }
.record-controls .button, .record-controls .feature-primary { padding: 10px 12px; font-size: 12px; }
.record-controls .outline-small { padding: 9px 9px; font-size: 11px; }
.viewer-controls p { margin: 8px 0 0; font-size: 12px; color: rgba(255,255,255,.55); }
.record-date-strip b { font-size: 13px; display: block; }
.record-date-strip span { display: block; margin-top: 4px; font-size: 12px; color: rgba(255,255,255,.62); }
.record-grid-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.record-tile {
  text-align: left;
  min-height: 115px;
  padding: 13px;
  cursor: pointer;
}
.record-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0a506e;
  background: rgba(222,245,248,.8);
  font-size: 15px;
  margin-bottom: 16px;
}
.record-icon img { width: 16px; height: 16px; }
.record-icon svg { width: 18px; height: 18px; stroke: #0a506e; }
.log-entry-icon { display: inline-flex; width: 18px; height: 18px; margin-right: 6px; vertical-align: middle; }
.log-entry-icon svg { width: 16px; height: 16px; stroke: rgba(255,255,255,.7); }
.header-icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
}
.header-icon-btn svg { width: 22px; height: 22px; }
.record-tile b { display: block; font-size: 14px; }
.record-tile small { display: block; margin-top: 3px; color: rgba(255,255,255,.65); font-size: 11px; }
.record-tile em { display: block; margin-top: 8px; font-style: normal; font-size: 11px; color: var(--v3-sky); }
.chart-feature { padding: 17px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.chart-head b { font-size: 30px; letter-spacing: -.03em; }
.chart-head b small { font-size: 12px; margin-left: 3px; color: rgba(255,255,255,.7); }
.chart-head span { display: block; margin-top: 6px; font-size: 12px; color: rgba(255,255,255,.68); }
.segmented { display: flex; gap: 4px; }
.segmented button {
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 99px;
  background: none;
  color: rgba(255,255,255,.7);
  font-family: var(--v3-font);
  font-size: 12px;
  cursor: pointer;
}
.segmented button.active { background: rgba(255,255,255,.15); color: #fff; font-weight: 700; }
.growth-svg { width: 100%; }
.growth-svg .chart-grid { stroke: rgba(255,255,255,.12); stroke-width: 1; fill: none; }
.growth-svg .chart-line { stroke: #fff; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.growth-svg circle { fill: var(--v3-sky); }
.growth-svg text { fill: rgba(255,255,255,.5); font-size: 10px; }
.growth-svg .chart-empty-hint { fill: rgba(255,255,255,.4); font-size: 13px; }
.metric-empty { font-size: 30px; color: rgba(255,255,255,.3); }
.milestone-link { margin-top: 16px; }

/* ── 16. Vaccines ── */
.vaccine-list { margin-bottom: 12px; }
.vaccine {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.vaccine:last-child { border-bottom: none; }
.vaccine > span { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.vaccine b { font-size: 14px; display: block; }
.vaccine small { font-size: 12px; color: rgba(255,255,255,.55); display: block; margin-top: 2px; }
.vaccine i { margin-left: auto; font-style: normal; font-size: 11px; color: rgba(255,255,255,.5); flex-shrink: 0; }
.vaccine.done > span { color: var(--v3-green); }
.vaccine.done i { color: var(--v3-green); }

/* ── 17. Milestones ── */
.filter-chips { margin-bottom: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 99px;
  background: none;
  color: rgba(255,255,255,.7);
  font-family: var(--v3-font);
  font-size: 12px;
  cursor: pointer;
}
.chip.active { background: rgba(255,255,255,.15); color: #fff; font-weight: 700; border-color: rgba(255,255,255,.5); }
.milestone-summary { text-align: center; padding: 20px; }
.milestone-summary span { font-size: 12px; color: rgba(255,255,255,.6); }
.milestone-summary b { display: block; font-size: 42px; margin: 6px 0; }
.milestone-summary p { margin: 0; font-size: 13px; color: rgba(255,255,255,.6); }
.milestone-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.milestone-item > i { font-style: normal; font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.milestone-item.done > i { color: var(--v3-green); }
.milestone-item.locked > i { color: rgba(255,255,255,.3); }
.milestone-item h2 { margin: 0 0 4px; font-size: 15px; }
.milestone-item span { font-size: 11px; color: rgba(255,255,255,.5); display: block; margin-bottom: 2px; }
.milestone-item p { margin: 0; font-size: 12px; color: rgba(255,255,255,.6); }
.milestone-item .mini-photo { width: 56px; height: 56px; flex-shrink: 0; margin-left: auto; }
.milestone-admin-btns { display: flex; gap: 4px; margin-left: auto; flex-shrink: 0; }

/* ── 18. Live ── */
.live-stage { overflow: hidden; padding: 0; }
.live-stage-media {
  height: 190px;
  position: relative;
  background: url("../assets/hero-pomegranate-cinematic.png") center 69% / cover;
}
.live-badge {
  position: absolute;
  top: 13px;
  left: 13px;
  border-radius: 99px;
  background: var(--v3-red);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 800;
  z-index: 2;
}
.live-people {
  position: absolute;
  top: 13px;
  right: 13px;
  border-radius: 99px;
  background: rgba(4,31,46,.76);
  padding: 5px 9px;
  font-size: 10px;
  z-index: 2;
}
.live-stage-copy { padding: 14px; }
.live-stage-copy b { font-size: 16px; display: block; }
.live-stage-copy p { color: rgba(255,255,255,.7); margin: 5px 0 0; line-height: 1.55; font-size: 12px; }
.live-manager {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.live-manager span { color: #81cde7; font-size: 11px; display: block; }
.live-manager b { display: block; margin-top: 3px; font-size: 15px; }
.live-manager p { margin: 3px 0 0; color: rgba(255,255,255,.64); font-size: 11px; }
.live-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.live-summary .glass-card { text-align: center; padding: 12px 8px; margin-bottom: 0; }
.live-summary b { display: block; font-size: 16px; }
.live-summary span { font-size: 10px; color: rgba(255,255,255,.55); }
.live-chat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.live-chat-head h2 { margin: 0; font-size: 17px; }
.live-chat-head span { color: rgba(255,255,255,.6); font-size: 12px; }
.live-message-list { max-height: 160px; overflow-y: auto; margin-bottom: 10px; }
.live-message-list p { margin: 0 0 6px; font-size: 13px; }
.live-message-list b { color: var(--v3-sky); margin-right: 6px; }
.live-compose { display: flex; gap: 8px; padding-bottom: calc(8px + var(--v3-safe-bottom, 0px)); }
.live-compose input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 12px;
  color: #fff;
  background: rgba(3,30,42,.57);
  font-family: var(--v3-font);
  font-size: 13px;
}
.live-compose button {
  width: 43px;
  border: 0;
  border-radius: 12px;
  color: #183443;
  background: var(--v3-cream);
  font-weight: 800;
  font-family: var(--v3-font);
  cursor: pointer;
}
.muted { color: rgba(255,255,255,.5); font-size: 13px; }

/* ── 19. Publish ── */
.publish-feature .form-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.publish-feature .form-head h2 { margin: 0; font-size: 16px; }
.publish-feature .form-head small { font-size: 12px; color: rgba(255,255,255,.55); }
.picker-grid, .feature-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.camera-tile {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed rgba(255,255,255,.4);
  border-radius: var(--v3-radius-sm);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.7);
  font-family: var(--v3-font);
  font-size: 12px;
  cursor: pointer;
}
.camera-tile img { width: 24px; height: 24px; filter: brightness(0) invert(1); opacity: .7; }
.photo-tile.selected { outline: 3px solid var(--v3-sky); outline-offset: -3px; }
.selected-strip { display: flex; gap: 12px; overflow-x: auto; padding: 8px 2px 6px; }
.selected-item { position: relative; flex-shrink: 0; width: 84px; text-align: center; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; transition: transform .16s ease, opacity .16s ease; }
.selected-item.is-dragging { transform: scale(1.06); opacity: .78; z-index: 3; }
.publish-photo-dragging { overflow: hidden; touch-action: none; }
.selected-item.is-pending .strip-thumb { opacity: .7; }
.strip-thumb {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.2);
}
.strip-order,
.strip-pending { position: absolute; bottom: 5px; border-radius: 999px; color: #fff; background: rgba(0,20,28,.72); font-size: 10px; line-height: 18px; }
.strip-order { left: 5px; min-width: 18px; }
.strip-pending { right: 5px; padding: 0 6px; }
.publish-sort-hint { display: block; margin-top: 4px; }
.strip-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--v3-red);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.strip-btn {
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
}
.strip-spacer { display: inline-block; width: 20px; }
.compose-card label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: rgba(255,255,255,.8); }
.compose-card textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--v3-radius-sm);
  background: rgba(3,30,42,.5);
  color: #fff;
  font-family: var(--v3-font);
  font-size: 14px;
  resize: vertical;
}
.compose-card .count { display: block; text-align: right; font-size: 11px; color: rgba(255,255,255,.4); margin-top: 4px; }
.sub-label { display: block; font-size: 12px; color: rgba(255,255,255,.6); margin: 10px 0 6px; }
select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--v3-radius-sm);
  background: rgba(3,30,42,.6);
  color: #fff;
  font-family: var(--v3-font);
  font-size: 14px;
}
.date-row { display: flex; align-items: center; justify-content: space-between; }
.date-row label { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.8); }
.date-row input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 12px;
  background: rgba(3,30,42,.5);
  color: #fff;
  font-family: var(--v3-font);
  font-size: 14px;
}

/* ── 20. Report ── */
.month-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}
.month-tabs::-webkit-scrollbar { display: none; }
.month-tabs button {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 99px;
  background: none;
  color: rgba(255,255,255,.6);
  font-family: var(--v3-font);
  font-size: 12px;
  cursor: pointer;
}
.month-tabs button.active { background: rgba(255,255,255,.15); color: #fff; font-weight: 700; }
.report-paper { padding: 20px; }
.report-paper header span { font-size: 11px; color: rgba(255,255,255,.5); letter-spacing: .08em; }
.report-paper header h2 { margin: 6px 0; font-size: 20px; }
.report-paper header p { margin: 0 0 14px; font-size: 12px; color: rgba(255,255,255,.6); }
.report-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.report-stats div { text-align: center; }
.report-stats b { display: block; font-size: 24px; }
.report-stats span { font-size: 11px; color: rgba(255,255,255,.55); }
.report-collage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 16px; }
.report-collage .mock-photo { aspect-ratio: 1; }
.report-paper section span { font-size: 10px; letter-spacing: .1em; color: rgba(255,255,255,.4); text-transform: uppercase; }
.report-paper section h3 { margin: 4px 0 8px; font-size: 16px; }
.report-paper section ul { margin: 0; padding-left: 18px; }
.report-paper section li { font-size: 13px; margin-bottom: 4px; color: rgba(255,255,255,.8); }
.report-paper blockquote {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-left: 3px solid var(--v3-sky);
  background: rgba(255,255,255,.05);
  border-radius: 0 12px 12px 0;
  font-size: 13px;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
}

/* ── 21. Notifications ── */
.notification-day { font-size: 12px; color: rgba(255,255,255,.5); margin-bottom: 10px; }
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.notice-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.1);
  font-size: 16px;
  flex-shrink: 0;
}
.notice b { font-size: 14px; display: block; }
.notice p { margin: 2px 0; font-size: 12px; color: rgba(255,255,255,.6); }
.notice small { font-size: 11px; color: rgba(255,255,255,.4); }
.notice-photo { width: 48px; height: 48px; flex-shrink: 0; margin-left: auto; }

/* ── 22. Overlay / Sheet / Modal ── */
.overlay-host {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,17,25,.38);
  backdrop-filter: blur(2px);
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.sheet-header h2 { margin: 0; }
.sheet-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.85);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sheet-close:active { background: rgba(255,255,255,.18); }
.feature-sheet, .feature-modal {
  position: relative;
  width: 100%;
  max-width: 430px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px 18px calc(25px + var(--v3-safe-bottom));
  border: 1px solid rgba(255,255,255,.35);
  border-bottom: 0;
  border-radius: var(--v3-radius-lg) var(--v3-radius-lg) 0 0;
  background: linear-gradient(180deg, rgba(5,48,67,.97), rgba(2,34,44,.99));
  box-shadow: 0 -16px 35px rgba(0,0,0,.24);
  color: var(--v3-ink);
}
.feature-modal {
  align-self: center;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--v3-radius-lg);
  margin: 20px;
  max-height: 80vh;
}
.feature-sheet h2, .feature-modal h2 {
  margin: 0 0 16px;
  font-size: 22px;
  padding-right: 40px;
}
.overlay-content label {
  display: block;
  margin: 15px 0 7px;
  color: rgba(255,255,255,.74);
  font-size: 12px;
  font-weight: 700;
}
.overlay-content input, .overlay-content textarea {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.31);
  border-radius: var(--v3-radius-sm);
  color: #fff;
  background: rgba(2,30,42,.5);
  font-family: var(--v3-font);
  font-size: 16px;
}
.overlay-content textarea { height: auto; min-height: 80px; padding: 12px 13px; resize: vertical; }
.overlay-content select {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.31);
  border-radius: var(--v3-radius-sm);
  background: rgba(2,30,42,.5);
  color: #fff;
  font-family: var(--v3-font);
  font-size: 16px;
}
.overlay-actions { margin-top: 18px; }
.overlay-actions .button, .overlay-actions .feature-primary { width: 100%; text-align: center; }

/* ── 23. Wheel Picker (C线用) ── */
.wheel-caption {
  display: flex;
  justify-content: space-around;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  margin: 15px 8px 5px;
}
.wheel {
  position: relative;
  height: 126px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,.17);
  border-bottom: 1px solid rgba(255,255,255,.17);
}
.wheel::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 10px;
  right: 10px;
  top: 42px;
  height: 42px;
  border-top: 1px solid rgba(255,255,255,.38);
  border-bottom: 1px solid rgba(255,255,255,.38);
  pointer-events: none;
}
.wheel-col {
  height: 126px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  text-align: center;
  scrollbar-width: none;
  padding: 42px 0;
}
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-col span {
  height: 42px;
  display: block;
  scroll-snap-align: center;
  color: rgba(255,255,255,.43);
  font-size: 17px;
  line-height: 42px;
}
.wheel-col span.selected { color: #fff; font-size: 19px; font-weight: 800; }
.date-wheel { grid-template-columns: 1.25fr .85fr .85fr; }
.date-wheel .wheel-col span { font-size: 14px; }
.date-wheel .wheel-col span.selected { font-size: 16px; }
.mini-wheel { height: 96px; }
.mini-wheel::before { top: 32px; height: 32px; }
.mini-wheel .wheel-col { height: 96px; padding: 32px 0; }
.mini-wheel .wheel-col span { height: 32px; line-height: 32px; font-size: 13px; }
.mini-wheel .wheel-col span.selected { font-size: 16px; }
.save-btn, .save {
  width: 100%;
  height: 51px;
  margin-top: 20px;
  border: 0;
  border-radius: 15px;
  color: #173443;
  background: var(--v3-cream);
  font-family: var(--v3-font);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

/* ── 24. Toast ── */
#toast {
  position: fixed;
  bottom: calc(var(--v3-nav-h) + 20px + var(--v3-safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  border-radius: 99px;
  background: rgba(2,28,42,.9);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-family: var(--v3-font);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 25. Confetti fallback ── */
.fallback-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
}
.fallback-confetti i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--v3-cream);
  left: calc(var(--i) * 4.2%);
  top: -10px;
  animation: confetti-fall 1.2s ease-in forwards;
  animation-delay: calc(var(--i) * 30ms);
}
@keyframes confetti-fall {
  to { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ── 26. Reveal animation ── */
.reveal-item { opacity: 0; transform: translateY(12px); transition: opacity .35s, transform .35s; }
.reveal-item.in { opacity: 1; transform: none; }

/* ── 27. Folder detail (B线) ── */
.folder-toolbar { margin-bottom: 12px; }
.folder-sub { font-size: 14px; margin: 14px 0 8px; color: rgba(255,255,255,.8); }
.folder-photo-wrap { position: relative; }
.folder-rm { position: absolute; top: -6px; right: -6px; z-index: 2; }
.folder-edit-hint { margin: 0 0 10px; color: rgba(255,255,255,.72); font-size: 12px; }
.folder-photo-wrap.is-editing { padding-bottom: 2px; }
.folder-photo-wrap.is-editing .folder-photo-button {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease;
}

.location-options { display: grid; gap: 8px; margin-top: 10px; }
.location-option { width: 100%; display: grid; gap: 3px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; background: rgba(0,25,35,.28); color: #fff; text-align: left; }
.location-option b { font-size: 13px; line-height: 1.35; }
.location-option span { font-size: 11px; line-height: 1.35; color: rgba(255,255,255,.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-option.is-selected { border-color: rgba(255,229,164,.72); background: rgba(255,229,164,.12); }
.location-option-clear { opacity: .82; }
.folder-photo-wrap.is-dragging { position: relative; z-index: 5; }
.folder-photo-wrap.is-dragging .folder-photo-button {
  cursor: grabbing;
  transform: scale(.96);
  opacity: .72;
  box-shadow: 0 0 0 3px rgba(232,183,79,.92);
}
body.folder-photo-dragging { overflow: hidden; user-select: none; -webkit-user-select: none; }
.folder-edit-controls { display: grid; grid-template-columns: 1fr 42px; gap: 4px; margin-top: 6px; }
.folder-edit-controls button { min-width: 0; min-height: 32px; padding: 0 4px; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; background: rgba(4,31,50,.88); color: #fff; font-size: 12px; }
.folder-edit-controls button:disabled { opacity: .35; }
.folder-edit-controls button.active { background: rgba(232,183,79,.94); color: #172a34; border-color: transparent; }
.folder-edit-controls button.danger { background: rgba(181,59,59,.88); border-color: transparent; }
.folder-add {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--v3-sky);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.album-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.album-modal-grid .mock-photo { aspect-ratio: 1; }
.full-photo {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--v3-radius-sm);
  background-size: cover;
  background-position: center;
  margin-bottom: 10px;
}
.photo-modal p, .album-modal p { font-size: 12px; color: rgba(255,255,255,.6); text-align: center; }

/* ── 28. Misc / Utility ── */
.count-up { font-variant-numeric: tabular-nums; }
input[type="date"], input[type="time"], input[type="number"] {
  color-scheme: dark;
}
::placeholder { color: rgba(255,255,255,.35); }

/* ── P1-03 v4: 记录条目列表 ── */
.log-entries-list { padding: 12px 16px; }
.log-entry-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 14px; }
.log-entry-row:last-child { border-bottom: none; }
.log-entry-row small { color: #999; margin-left: 6px; }

/* ── P1-03 v4: 相册列表删除按钮 ── */
.album-folder-item-wrap { display: flex; align-items: stretch; gap: 8px; margin-bottom: 8px; }
.album-folder-item-wrap .album-folder-item { flex: 1; }
.confirm-sheet-copy { margin: 12px 0 0; color: rgba(255,255,255,.75); font-size: 14px; line-height: 1.55; }
.confirm-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.confirm-sheet-actions > button { min-height: 44px; }
.confirm-danger { background: #d95757; }
.confirm-danger:active { background: #bd4545; }

/* ── P1-05 v4: iOS 安装引导卡 ── */
.ios-install-card { display: flex; align-items: center; gap: 12px; margin: 12px 16px; padding: 14px 16px; background: rgba(255,255,255,0.08); backdrop-filter: blur(12px); border-radius: 16px; border: 1px solid rgba(255,255,255,0.12); }
.ios-install-icon img { width: 44px; height: 44px; border-radius: 10px; }
.ios-install-text { flex: 1; }
.ios-install-text b { color: #fff; font-size: 14px; }
.ios-install-text p { color: rgba(255,255,255,0.6); font-size: 12px; margin: 2px 0 0; }
.ios-install-btn { background: #e8453c; color: #fff; border: none; border-radius: 20px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ios-install-close { background: none; border: none; color: rgba(255,255,255,0.4); font-size: 16px; cursor: pointer; padding: 4px; }
.ios-guide-overlay { text-align: center; }
.ios-steps { text-align: left; margin: 16px 0; }
.ios-step { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ios-step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #e8453c; color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.ios-step p { margin: 0; color: rgba(255,255,255,0.85); font-size: 14px; line-height: 1.5; }
.ios-note { color: rgba(255,255,255,0.5); font-size: 12px; margin: 8px 0 16px; }

/* ── Offline state layer ── */
.offline-layer { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 24px; text-align: center; }
.offline-icon { font-size: 64px; margin-bottom: 24px; }
.offline-layer h2 { font-size: 22px; font-weight: 700; color: var(--text-primary, #1a1a2e); margin: 0 0 12px; }
.offline-layer p { font-size: 15px; color: var(--text-secondary, #666); line-height: 1.6; margin: 0 0 32px; max-width: 280px; }
.offline-layer .btn-primary { padding: 14px 40px; border-radius: 12px; font-size: 16px; font-weight: 600; }

/* P4/P12: 真实缩略图 + 全屏相册查看 */
.folder-photo-button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: var(--v3-radius-sm);
  background: rgba(255,255,255,.08);
  cursor: pointer;
}
.folder-photo-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .2s ease;
}
.folder-photo-button:active img { transform: scale(.98); }
.folder-photo-button span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  max-width: calc(100% - 10px);
  overflow: visible;
  color: #fff;
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
.pswp__top-bar {
  top: max(env(safe-area-inset-top, 0px), 18px) !important;
}
.pswp__img {
  object-fit: contain !important;
  object-position: center;
  -webkit-touch-callout: default !important;
  -webkit-user-select: auto !important;
  user-select: auto !important;
}
.photo-viewer-fallback {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  background: #06080c;
}
.photo-viewer-fallback header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(56px + max(env(safe-area-inset-top, 0px), 18px));
  padding: max(env(safe-area-inset-top, 0px), 18px) 14px 0;
  box-sizing: border-box;
  color: #fff;
}
.photo-viewer-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  line-height: 40px;
  text-decoration: none;
}
.photo-viewer-header-spacer { width: 48px; height: 40px; }
.photo-viewer-fallback-stage {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
.photo-viewer-fallback-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.photo-viewer-nav {
  position: absolute;
  z-index: 1;
  top: 50%;
  width: 42px;
  height: 54px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  background: rgba(0,0,0,.42);
  color: #fff;
  font-size: 40px;
  line-height: 1;
}
.photo-viewer-prev { left: 8px; }
.photo-viewer-next { right: 8px; }

/* v14.7.75: preview opens immediately, then full image and comments load independently. */
body.photo-viewer-open { overflow: hidden; }
.photo-viewer-loading {
  position: fixed;
  inset: 0;
  z-index: 10005;
  display: flex;
  flex-direction: column;
  background: #06080c;
  color: #fff;
}
.photo-viewer-loading header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(54px + max(env(safe-area-inset-top, 0px), 18px));
  padding: max(env(safe-area-inset-top, 0px), 18px) 14px 0;
  box-sizing: border-box;
}
.photo-viewer-loading header button { min-height: 40px; border: 0; background: transparent; color: #fff; font-size: 15px; }
.photo-viewer-loading-stage { position: relative; display: flex; flex: 1; min-height: 0; align-items: center; justify-content: center; overflow: hidden; }
.photo-viewer-loading-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; filter: blur(5px); opacity: .72; }
.photo-loading-indicator { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); padding: 8px 13px; border-radius: 999px; background: rgba(0,0,0,.62); font-size: 13px; }
.shiliu-photo-comments {
  position: absolute;
  z-index: 1002;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(214px + env(safe-area-inset-bottom, 0px));
  padding: 12px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(9,19,25,.98);
  color: #fff;
  border-top: 1px solid rgba(255,255,255,.14);
  box-sizing: border-box;
}
.photo-comment-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.photo-comment-head b { font-size: 15px; }
.photo-comment-head span { color: rgba(255,255,255,.58); font-size: 12px; }
.photo-comment-list { height: 92px; overflow-y: auto; overscroll-behavior: contain; }
.photo-comment-list article { display: grid; grid-template-columns: auto 1fr auto; gap: 7px; align-items: start; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.photo-comment-list article b { color: #e9bd62; font-size: 12px; }
.photo-comment-list article p { margin: 0; color: rgba(255,255,255,.9); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.photo-comment-list article time { color: rgba(255,255,255,.42); font-size: 10px; white-space: nowrap; }
.photo-comment-list .muted { margin: 18px 0; text-align: center; color: rgba(255,255,255,.5); font-size: 12px; }
.photo-comment-compose { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.photo-comment-compose input { min-width: 0; height: 38px; padding: 0 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font-size: 14px; }
.photo-comment-compose button { min-width: 64px; height: 38px; border: 0; border-radius: 10px; background: #f3e5bd; color: #17303b; font-weight: 700; }
.photo-comment-compose button:disabled { opacity: .55; }
.photo-viewer-fallback { padding-bottom: calc(214px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; }
.photo-viewer-fallback > .shiliu-photo-comments { position: fixed; }

/* v14.9.0 · 视频动态 */
.camera-tile.is-disabled { opacity: .38; cursor: not-allowed; }
.video-tile-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  padding-left: 2px;
}
.publish-media-rule { display: block; margin: 9px 0 3px; line-height: 1.5; }
.selected-video {
  position: relative;
  margin-top: 12px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  background: rgba(0,0,0,.24);
}
.selected-video video { display: block; width: 100%; max-height: 280px; aspect-ratio: 16/9; border-radius: 16px 16px 0 0; background: #000; object-fit: contain; }
.selected-video.is-pending video { opacity: .68; }
.selected-video-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px 10px; color: rgba(255,255,255,.78); font-size: 12px; }
.selected-video-info span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-upload-progress { height: 4px; margin: 0 12px 10px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.14); }
.video-upload-progress span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, #ffb86b, #ff6f91); transition: width .18s ease; }
.video-retry { display: block; width: max-content; margin: 0 12px 10px auto; }

.post-video-card {
  position: relative;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--v3-radius-sm);
  background: #02090d;
}
.post-video-card video { display: block; width: 100%; max-height: 480px; aspect-ratio: 16/9; background: #000; object-fit: contain; }
.post-video-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 11px; color: rgba(255,255,255,.7); font-size: 11px; }
.post-video-meta span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-video-fullscreen { width: 100%; min-height: 38px; border: 0; border-top: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.07); color: #fff; font: 700 12px var(--v3-font); }

body.video-viewer-open { overflow: hidden; }
.settings-page { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.settings-card { margin-bottom: 13px; padding: 16px; }
.settings-card h3 { margin: 0 0 13px; font-size: 15px; }
.settings-card > label:not(.settings-toggle-row) { display: grid; grid-template-columns: 88px minmax(0,1fr); align-items: center; gap: 9px; margin: 10px 0; font-size: 13px; }
.settings-card input:not([type="checkbox"]), .settings-card select { width: 100%; min-height: 42px; border: 1px solid var(--v3-line); border-radius: 11px; padding: 0 11px; color: var(--v3-ink); background: rgba(255,255,255,.09); font: inherit; }
:root[data-theme="light"] .settings-card input:not([type="checkbox"]), :root[data-theme="light"] .settings-card select { background: rgba(255,255,255,.76); }
.settings-divider { height: 1px; margin: 15px 0; background: var(--v3-line); }
.settings-member-summary, .settings-footnote { display: block; margin-top: 12px; color: color-mix(in srgb, var(--v3-ink) 65%, transparent); font-size: 11px; line-height: 1.6; }
.settings-toggle-row, .settings-action-row, .settings-status-row { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--v3-line); }
.settings-toggle-row:last-child, .settings-status-row:last-of-type { border-bottom: 0; }
.settings-toggle-row span, .settings-action-row span { min-width: 0; }
.settings-toggle-row b, .settings-action-row b { display: block; font-size: 13px; }
.settings-toggle-row small, .settings-action-row small { display: block; margin-top: 3px; opacity: .65; font-size: 10px; }
.settings-toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.settings-toggle-row i { position: relative; flex: 0 0 44px; width: 44px; height: 25px; border-radius: 99px; background: rgba(255,255,255,.18); transition: .2s ease; }
.settings-toggle-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,.25); transition: .2s ease; }
.settings-toggle-row input:checked + i { background: var(--v3-green); }
.settings-toggle-row input:checked + i::after { transform: translateX(19px); }
.settings-wide-action { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: space-between; border: 0; border-bottom: 1px solid var(--v3-line); color: var(--v3-ink); background: transparent; font: 600 13px var(--v3-font); }
.settings-status-row { font-size: 12px; }
.settings-status-row b { text-align: right; font-size: 12px; }
.video-viewer {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
}
.video-viewer header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: calc(54px + max(env(safe-area-inset-top, 0px), 12px));
  padding: max(env(safe-area-inset-top, 0px), 12px) 14px 0;
  box-sizing: border-box;
  background: rgba(5,10,13,.96);
}
.video-viewer header button { min-width: 54px; min-height: 40px; border: 0; background: transparent; color: #fff; font: 700 14px var(--v3-font); }
.video-viewer header span { overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.video-viewer-spacer { width: 54px; }
.video-viewer-stage { display: flex; flex: 1; min-height: 0; align-items: center; justify-content: center; padding-bottom: env(safe-area-inset-bottom, 0px); }
.video-viewer-stage video { display: block; width: 100%; height: 100%; background: #000; object-fit: contain; }

@media (max-width: 360px) {
  .picker-grid, .feature-picker { gap: 6px; }
  .camera-tile { font-size: 11px; }
}
