* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overscroll-behavior: none; }

/* ── Background breathing ─────────────────────────────────────────── */
@property --bg-dim {
  syntax: '<percentage>';
  initial-value: 0%;
  inherits: true;
}
/* Compute --bg from --bg-base + animated dim factor */
[data-theme] {
  --bg: color-mix(in srgb, var(--bg-base) calc(100% - var(--bg-dim)), black);
}

/* ── Themes ──────────────────────────────────────────────────────────── */

/* 沙丘 — matte rose-gold + amber + burnt umber desert */
[data-theme="eastern"] {
  --bg-base:      #3D2A1A;
  --surface:      #4A3424;
  --surface-alt:  #382418;
  --border:       #6B5040;
  --ink:          #FFF4E8;
  --soft:         #E8C8A0;
  --muted:        #C8A880;
  --accent:       #E0A050;
  --accent-subtle: rgba(224,160,80,0.18);
  --accent-hover:  rgba(224,160,80,0.28);
  --accent-ring:   rgba(224,160,80,0.30);
  --header-bg:    rgba(50,32,20,0.90);
  --glass:        rgba(50,32,20,0.85);
  --glass-heavy:  rgba(50,32,20,0.92);
  --tag-color:    #E8B870;
  --tag-border:   rgba(232,184,112,0.45);
  --tag-bg:       rgba(232,184,112,0.16);
  --progress:     #E0A050;
  --danger-name:  #E07030;
  --tip-bg:       rgba(50,32,20,0.92);
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.30);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.40);
  --shadow-lg:    0 12px 48px rgba(0,0,0,0.60);
  --font-heading: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-body:    'DM Sans', 'Inter', -apple-system, system-ui, sans-serif;
  --globe-bg:
    radial-gradient(ellipse at 50% 78%, rgba(224,160,64,0.40) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 72%, rgba(200,130,50,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 35% 80%, rgba(180,120,60,0.15) 0%, transparent 35%),
    radial-gradient(ellipse at 65% 82%, rgba(190,110,50,0.15) 0%, transparent 35%),
    linear-gradient(180deg, #0A0E1A 0%, #101828 30%, #1A2238 55%, #2A2030 72%, #3A2818 88%, #2A1E14 100%);
}

/* 夜空 — pure black bg, muted gold, sans-serif */
[data-theme="luxe"] {
  --bg-base:      #000000;
  --surface:      #0A0A0A;
  --surface-alt:  #141414;
  --border:       #222222;
  --ink:          #F0ECE4;
  --soft:         #C0B8AE;
  --muted:        #908880;
  --accent:       #C9A86C;
  --accent-subtle: rgba(201,168,108,0.08);
  --accent-hover:  rgba(201,168,108,0.14);
  --accent-ring:   rgba(201,168,108,0.18);
  --header-bg:    rgba(0,0,0,0.92);
  --glass:        rgba(10,10,10,0.94);
  --glass-heavy:  rgba(10,10,10,0.98);
  --tag-color:    #C9A86C;
  --tag-border:   rgba(201,168,108,0.35);
  --tag-bg:       rgba(201,168,108,0.15);
  --progress:     #C9A86C;
  --danger-name:  #E8C040;
  --tip-bg:       rgba(26,26,26,0.96);
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.30);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.40);
  --shadow-lg:    0 12px 48px rgba(0,0,0,0.50);
  --font-heading: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', 'Inter', -apple-system, system-ui, sans-serif;
  --globe-bg: #000000;
}

/* 草地 — French estate picnic, dappled shade + straw hat + sage */
[data-theme="natural"] {
  --bg-base:      #F6F4EE;
  --surface:      #FCFBF6;
  --surface-alt:  #EEEcE2;
  --border:       #DCD6C6;
  --ink:          #2E3028;
  --soft:         #4E5238;
  --muted:        #636555;
  --accent:       #7A8E50;
  --accent-subtle: rgba(122,142,80,0.07);
  --accent-hover:  rgba(122,142,80,0.12);
  --accent-ring:   rgba(122,142,80,0.14);
  --header-bg:    rgba(246,244,238,0.88);
  --glass:        rgba(252,251,246,0.92);
  --glass-heavy:  rgba(252,251,246,0.97);
  --tag-color:    #6B7D44;
  --tag-border:   rgba(107,125,68,0.35);
  --tag-bg:       rgba(107,125,68,0.12);
  --progress:     #7A8E50;
  --danger-name:  #D4712A;
  --tip-bg:       rgba(246,244,238,0.96);
  --shadow-sm:    0 1px 4px rgba(46,48,40,0.06);
  --shadow-md:    0 4px 16px rgba(46,48,40,0.08);
  --shadow-lg:    0 12px 40px rgba(46,48,40,0.10);
  --font-heading: 'Lora', Georgia, serif;
  --font-body:    'DM Sans', 'Inter', -apple-system, system-ui, sans-serif;
  --globe-bg:
    radial-gradient(ellipse at 35% 40%, rgba(200,190,130,0.16) 0%, transparent 40%),
    radial-gradient(ellipse at 65% 60%, rgba(122,142,80,0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 20%, rgba(220,210,160,0.14) 0%, transparent 38%),
    radial-gradient(ellipse at 80% 80%, rgba(140,160,100,0.08) 0%, transparent 35%),
    linear-gradient(155deg, #F6F4EE 0%, #F0EDE4 40%, #EAE6DA 100%);
}

/* 晴空 — uses --site-color (apple green) */
[data-theme="forest"] {
  --bg-base:      #F8F5F0;
  --surface:      #FFFFFF;
  --surface-alt:  #F0EDE5;
  --border:       #E2D9CF;
  --ink:          #1A3A28;
  --soft:         #3A5E48;
  --muted:        #547066;
  --accent:       var(--site-color);
  --accent-subtle: rgba(52,199,89,0.07);
  --accent-hover:  rgba(52,199,89,0.12);
  --accent-ring:   rgba(52,199,89,0.10);
  --header-bg:    rgba(245,252,248,0.85);
  --glass:        rgba(255,255,255,0.92);
  --glass-heavy:  rgba(255,255,255,0.97);
  --tag-color:    var(--site-color);
  --tag-border:   rgba(52,199,89,0.40);
  --tag-bg:       rgba(52,199,89,0.14);
  --progress:     var(--site-color);
  --danger-name:  #D4A020;
  --tip-bg:       rgba(245,252,248,0.95);
  --shadow-sm:    0 1px 4px rgba(26,58,40,0.06);
  --shadow-md:    0 4px 16px rgba(26,58,40,0.08);
  --shadow-lg:    0 12px 40px rgba(26,58,40,0.10);
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --globe-bg:
    radial-gradient(ellipse at 14% 22%, rgba(148,183,238,0.30) 0%, transparent 42%),
    radial-gradient(ellipse at 86% 76%, rgba(178,150,232,0.22) 0%, transparent 36%),
    radial-gradient(ellipse at 52% 6%,  rgba(132,198,250,0.18) 0%, transparent 30%),
    radial-gradient(ellipse at 30% 85%, rgba(160,220,200,0.16) 0%, transparent 35%),
    linear-gradient(152deg, #EEF4FB 0%, #EAF1F8 40%, #F0ECF8 72%, #F5F1EC 100%);
}

/* 花海 — tulip fields, vibrant pink-red + yellow + green bands */
[data-theme="spring"] {
  --bg-base:      #FDF6F8;
  --surface:      #FFFAFC;
  --surface-alt:  #F8ECF0;
  --border:       #ECD0DA;
  --ink:          #3A1828;
  --soft:         #6A3048;
  --muted:        #986070;
  --accent:       #D63068;
  --accent-subtle: rgba(214,48,104,0.07);
  --accent-hover:  rgba(214,48,104,0.12);
  --accent-ring:   rgba(214,48,104,0.12);
  --header-bg:    rgba(253,246,248,0.88);
  --glass:        rgba(255,250,252,0.92);
  --glass-heavy:  rgba(255,250,252,0.97);
  --tag-color:    #D63068;
  --tag-border:   rgba(214,48,104,0.30);
  --tag-bg:       rgba(214,48,104,0.07);
  --progress:     #D63068;
  --danger-name:  #CC3366;
  --tip-bg:       rgba(253,246,248,0.96);
  --shadow-sm:    0 1px 4px rgba(58,24,40,0.06);
  --shadow-md:    0 4px 16px rgba(58,24,40,0.08);
  --shadow-lg:    0 12px 40px rgba(58,24,40,0.10);
  --font-heading: 'Lora', Georgia, serif;
  --font-body:    'DM Sans', 'Inter', -apple-system, system-ui, sans-serif;
  --globe-bg:
    radial-gradient(ellipse at 15% 75%, rgba(214,48,104,0.14) 0%, transparent 42%),
    radial-gradient(ellipse at 85% 25%, rgba(255,180,40,0.16) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(100,180,80,0.10) 0%, transparent 45%),
    radial-gradient(ellipse at 70% 80%, rgba(220,60,120,0.10) 0%, transparent 35%),
    linear-gradient(150deg, #FDF0F4 0%, #FDF6F8 30%, #FFFAE8 60%, #F0F8F0 100%);
}

/* 初雪 — minimal black & white */
[data-theme="snow"] {
  --bg-base:      #FAFAFA;
  --surface:      #FFFFFF;
  --surface-alt:  #F2F2F2;
  --border:       #E8E8E8;
  --ink:          #111111;
  --soft:         #444444;
  --muted:        #767676;
  --accent:       #111111;
  --accent-subtle: rgba(0,0,0,0.04);
  --accent-hover:  rgba(0,0,0,0.08);
  --accent-ring:   rgba(0,0,0,0.08);
  --header-bg:    rgba(255,255,255,0.88);
  --glass:        rgba(255,255,255,0.92);
  --glass-heavy:  rgba(255,255,255,0.97);
  --tag-color:    #333333;
  --tag-border:   rgba(0,0,0,0.28);
  --tag-bg:       rgba(0,0,0,0.08);
  --progress:     #111111;
  --danger-name:  #CC3333;
  --tip-bg:       rgba(255,255,255,0.96);
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.10);
  --font-heading: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --globe-bg:
    radial-gradient(ellipse at 50% 50%, rgba(220,230,240,0.25) 0%, transparent 60%),
    linear-gradient(160deg, #F8F9FB 0%, #F2F4F7 50%, #ECEEF2 100%);
}

/* 朝露 — gentle dawn, pale sky + soft apricot glow.
   Accent unified to the 添加美食 button's orange-red (#C4501A) so every orange
   UI surface (login, edit profile, 探店, tags, progress…) matches it. */
[data-theme="fusion"] {
  --bg-base:      #F8F6F2;
  --surface:      #FDFCFA;
  --surface-alt:  #F2EEEA;
  --border:       #E4DAD0;
  --ink:          #3A2E24;
  --soft:         #6A5440;
  --muted:        #7A6450;
  --accent:       #C4501A;
  --accent-subtle: rgba(196,80,26,0.07);
  --accent-hover:  rgba(196,80,26,0.12);
  --accent-ring:   rgba(196,80,26,0.14);
  --header-bg:    rgba(248,246,242,0.88);
  --glass:        rgba(253,252,250,0.92);
  --glass-heavy:  rgba(253,252,250,0.97);
  --tag-color:    #C4501A;
  --tag-border:   rgba(196,80,26,0.30);
  --tag-bg:       rgba(196,80,26,0.07);
  --progress:     #C4501A;
  --danger-name:  #C04030;
  --tip-bg:       rgba(248,246,242,0.96);
  --shadow-sm:    0 1px 4px rgba(58,46,36,0.06);
  --shadow-md:    0 4px 16px rgba(58,46,36,0.08);
  --shadow-lg:    0 12px 40px rgba(58,46,36,0.10);
  --font-heading: 'Noto Serif SC', 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', 'Inter', -apple-system, system-ui, sans-serif;
  --globe-bg:
    radial-gradient(ellipse at 50% 82%, rgba(200,120,80,0.16) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 78%, rgba(220,160,100,0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 75%, rgba(200,140,90,0.10) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 12%, rgba(210,210,210,0.08) 0%, transparent 40%),
    linear-gradient(180deg, #F0F0EE 0%, #F4F0EA 35%, #F8E8DA 70%, #F5DCCA 100%);
}

/* 返航 — deep navy + sunset orange (v2) */
[data-theme="homebound"] {
  --bg-base:      #1B2838;
  --surface:      #223248;
  --surface-alt:  #1A2535;
  --border:       #2E4058;
  --ink:          #F5EDE0;
  --soft:         #D0C4B0;
  --muted:        #90A8B8;
  --accent:       #E8923A;
  --accent-subtle: rgba(232,146,58,0.10);
  --accent-hover:  rgba(232,146,58,0.16);
  --accent-ring:   rgba(232,146,58,0.18);
  --header-bg:    rgba(22,34,50,0.92);
  --glass:        rgba(27,40,56,0.93);
  --glass-heavy:  rgba(27,40,56,0.97);
  --tag-color:    #E8923A;
  --tag-border:   rgba(232,146,58,0.35);
  --tag-bg:       rgba(232,146,58,0.10);
  --progress:     #E8923A;
  --danger-name:  #E06040;
  --tip-bg:       rgba(27,40,56,0.96);
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.30);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.35);
  --shadow-lg:    0 12px 48px rgba(0,0,0,0.45);
  --font-heading: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-body:    'DM Sans', 'Inter', -apple-system, system-ui, sans-serif;
  --globe-bg:
    radial-gradient(ellipse at 50% 85%, rgba(232,146,58,0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(200,80,40,0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 20% 20%, rgba(40,80,140,0.15) 0%, transparent 45%),
    linear-gradient(180deg, #0F1A28 0%, #1B2838 40%, #2A1E18 100%);
}

html, body, #root {
  width: 100%; height: 100%; overflow: hidden;
}
html {
  animation: ej-breathe 7s ease-in-out infinite;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.h-title,
.detail-name,
.modal-head-title,
.xhs-food-name,
.curated-hero-title,
.curated-folder-name,
.curated-collection-title,
.curated-author-name,
.profile-username { font-family: var(--font-heading); }

/* ── Header ─────────────────────────────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: 56px;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 16px rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; z-index: 100;
}
.h-title {
  font-size: 14px; letter-spacing: 0.16em; color: var(--ink);
}
.h-title em {
  color: var(--muted); font-style: italic;
  font-size: 12px; margin-left: 12px; letter-spacing: 0.1em;
}
.h-site-stats {
  display: inline; margin-left: 14px;
  font-size: 10px; color: var(--soft); letter-spacing: 0.1em;
  font-style: italic; font-weight: 400;
}
.h-site-stats-num { font-weight: 400; font-style: italic; }
.h-site-stats-sep { }
.h-actions { display: flex; gap: 8px; align-items: center; }
.lang-toggle {
  font-size: 11px; color: var(--muted); cursor: pointer;
  padding: 4px 9px; border-radius: 6px; transition: all .2s;
  letter-spacing: 0.06em;
}
.lang-toggle:hover { background: rgba(0,0,0,0.06); color: var(--ink); }
.lang-toggle.active { color: var(--surface); background: var(--ink); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  background: none; border: 1px solid var(--border); color: var(--ink);
  padding: 5px 14px; border-radius: 20px; cursor: pointer;
  font-size: 11px; letter-spacing: 0.1em; font-family: inherit;
  transition: border-color .15s, color .15s, background .15s;
}
.btn:hover { border-color: var(--soft); color: var(--ink); background: var(--accent-subtle); }
.btn-accent { border-color: var(--accent); color: var(--accent); }
.btn-accent:hover { background: var(--accent-subtle); }
.btn-danger { border-color: rgba(200,100,100,0.4); color: #c97070; }
.btn-danger:hover { background: rgba(200,100,100,0.07); border-color: #c97070; }
.btn-add-restaurant {
  color: var(--accent);
  border-color: var(--tag-border);
}
.btn-add-restaurant:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.icon-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 16px; padding: 4px 6px;
  border-radius: 8px; line-height: 1; transition: color .15s, background .15s;
}
.icon-btn:hover { color: var(--ink); background: rgba(0,0,0,0.05); }

/* ── Avatar ──────────────────────────────────────────────────────────────── */
.avatar-wrap { position: relative; }

/* Guest-mode login chip (replaces avatar placeholder for unauthenticated
   visitors). A compact pill with an inline icon + "Log In" label.
   Discoverable at a glance without shouting — uses the accent color so it
   blends with the rest of the UI but still draws the eye. */
.h-login-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px;
  border: 1.5px solid var(--accent, #C78A4A);
  border-radius: 15px;
  background: var(--surface, #fff);
  color: var(--accent, #C78A4A);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer; flex-shrink: 0;
  font-family: inherit;
  transition: transform 0.12s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.h-login-chip:hover {
  background: color-mix(in srgb, var(--accent, #C78A4A) 8%, var(--surface, #fff));
}
.h-login-chip:active { transform: scale(0.96); }
.h-login-chip svg { flex-shrink: 0; }

/* Mobile: slightly smaller chip + hide the English label to save horizontal
   space on narrow screens where the header is already tight. */
@media (max-width: 640px) {
  .h-login-chip {
    height: 28px; padding: 0 10px; font-size: 12px; gap: 4px;
  }
  .h-login-chip svg { width: 12px; height: 12px; }
}
.avatar-menu {
  position: fixed; top: 56px; right: 16px;
  background: var(--glass-heavy, rgba(28,28,30,1));
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 14px; padding: 5px 0;
  min-width: 148px; z-index: 200;
  max-height: calc(100vh - 80px); overflow-y: auto;
  box-shadow: var(--shadow-lg, 0 8px 32px rgba(0,0,0,0.25));
  animation: popIn .14s ease;
}
.avatar-menu-item {
  padding: 9px 16px; font-size: 12px; color: var(--ink, rgba(255,255,255,0.85));
  cursor: pointer; letter-spacing: 0.04em; transition: background .1s;
}
.avatar-menu-item:hover { background: var(--accent-subtle, rgba(255,255,255,0.08)); }
/* Theme submenu is now inline via slide transition - no separate positioning needed */
.avatar-upload-zone {
  width: 60px; height: 60px; border-radius: 50%;
  border: 2px dashed var(--border); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; transition: border-color .15s, background .15s; flex-shrink: 0;
}
.avatar-upload-zone:hover { border-color: var(--soft); background: rgba(26,58,40,0.05); }
.avatar-upload-zone img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload-hint { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.4; pointer-events: none; padding: 4px; }

/* ── Globe ───────────────────────────────────────────────────────────── */
.globe-wrap {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden;
  background: var(--globe-bg);
  touch-action: pan-x pan-y; /* prevent browser pinch-zoom, let map/globe handle it */
}

/* ── Rocket launch sequence ── */

/* Rocket container */
.sparkle-rocket {
  position: absolute; z-index: 50;
  pointer-events: none;
}

/* Sitting at Jiuquan — gentle idle shake */
@keyframes rocket-idle {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  25% { transform: translate(-50%, -50%) scale(1) translateX(-1px); }
  75% { transform: translate(-50%, -50%) scale(1) translateX(1px); }
}

@keyframes flame-idle {
  0% { height: 10px; opacity: 0.7; }
  100% { height: 14px; opacity: 1; }
}
@keyframes flame-thrust {
  0% { height: 26px; opacity: 0.9; width: 10px; }
  100% { height: 34px; opacity: 1; width: 14px; }
}

@keyframes smoke-puff {
  0% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(3) translateY(10px); }
}

/* Liftoff — vertical acceleration then curve */
@keyframes liftoff {
  0% { top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1); }
  15% { top: 45%; left: 50%; transform: translate(-50%, -50%) scale(0.95); }
  30% { top: 35%; left: 50%; transform: translate(-50%, -50%) scale(0.85); }
  50% { top: 22%; left: 53%; transform: translate(-50%, -50%) scale(0.7) rotate(10deg); }
  70% { top: 15%; left: 60%; transform: scale(0.55) rotate(25deg); }
  85% { top: 14%; right: 28%; left: auto; transform: scale(0.45) rotate(15deg); }
  100% { top: 130px; right: 22%; left: auto; transform: scale(0.35) rotate(0deg); }
}
.sparkle-liftoff {
  animation: liftoff 1.8s cubic-bezier(0.2, 0, 0.3, 1) forwards;
}

/* ISS animations */
@keyframes iss-settle {
  0% { transform: scale(0.35); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes iss-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes plus-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

/* Docked */
.sparkle-docked {
  position: absolute; top: 130px; right: 22%; z-index: 99;
  font-size: 18px; line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
  pointer-events: none;
}
/* ISS */
.sparkle-iss {
  position: absolute; top: 130px; right: 22%; z-index: 99;
  font-size: 18px; line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
  animation: iss-settle 0.6s ease-out, iss-float 3s ease-in-out 0.6s infinite;
  pointer-events: auto; cursor: pointer;
}
/* ＋ button glow */
.btn.plus-glow {
  animation: plus-pulse 1.2s ease-in-out infinite;
  position: relative;
}

/* removed dead .sparkle-msg* family (RFC-0004 dead-code cleanup; unused in ej) */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.map-control-card {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 5px 16px; border-radius: 20px; z-index: 200;
  background: color-mix(in srgb, var(--header-bg, rgba(255,255,255,0.88)) 72%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  box-shadow: 0 2px 20px rgba(0,0,0,0.10);
  color: var(--ink, #222); font-size: 11px;
  user-select: none; white-space: nowrap;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.map-ctrl-pad {
  display: grid; grid-template-columns: repeat(3, 18px); grid-template-rows: repeat(3, 16px);
  place-items: center;
}
.map-ctrl-btn {
  background: none; border: none; color: var(--ink, #888); cursor: pointer;
  font-size: 14px; font-weight: 300; line-height: 1; padding: 0;
  transition: color .15s;
}
.map-ctrl-btn:hover { color: var(--ink); }
.map-ctrl-btn.up   { grid-column: 2; grid-row: 1; transform: rotate(90deg); }
.map-ctrl-btn.left  { grid-column: 1; grid-row: 2; }
.map-ctrl-btn.right { grid-column: 3; grid-row: 2; }
.map-ctrl-btn.down  { grid-column: 2; grid-row: 3; transform: rotate(90deg); }
.map-ctrl-divider {
  width: 1px; height: 24px; background: var(--border, rgba(0,0,0,0.1));
}
.map-ctrl-zoom {
  display: flex; align-items: center; gap: 6px;
}
.map-ctrl-label {
  font-size: 10px; color: var(--soft, #aaa); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}
.map-ctrl-slider {
  -webkit-appearance: none; appearance: none;
  width: 72px; height: 3px; border-radius: 2px;
  background: var(--border, rgba(0,0,0,0.12));
  cursor: pointer; outline: none;
}
.map-ctrl-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: url('assets/fudi_favicon.svg') center/contain no-repeat;
  border: none; cursor: pointer; opacity: 0.7; transition: opacity .15s;
}
.map-ctrl-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: url('assets/fudi_favicon.svg') center/contain no-repeat;
  border: none; cursor: pointer; opacity: 0.7; transition: opacity .15s;
}
.map-ctrl-slider:hover::-webkit-slider-thumb { opacity: 1; }
.map-ctrl-slider:hover::-moz-range-thumb { opacity: 1; }
.map-ctrl-value {
  min-width: 16px; text-align: center; font-weight: 600;
  font-size: 12px; color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif; font-variant-numeric: tabular-nums;
}

/* ── Immersive mode: hide header + control card, show exit button ── */
body.map-immersive .header { opacity: 0; pointer-events: none; transition: opacity .3s; }
body.map-immersive .map-control-card { opacity: 0; pointer-events: none; transition: opacity .3s; }
body.map-immersive .globe-wrap { top: 0 !important; }
body.map-immersive .map-immersive-exit { display: flex; }
.map-ctrl-immersive { font-size: 13px !important; opacity: 0.6; transition: opacity .15s; }
.map-ctrl-immersive:hover { opacity: 1; }
.map-immersive-exit {
  display: none; position: fixed; bottom: 16px; right: 16px; z-index: 300;
  background: var(--header-bg, rgba(255,255,255,0.88));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.06); border-radius: 50%;
  width: 36px; height: 36px; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--ink, #222);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08); opacity: 0.4;
  transition: opacity .2s;
}
.map-immersive-exit:hover { opacity: 0.9; }

/* Dark themes — inherits --header-bg automatically */

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 56px; left: 0; bottom: 0; width: 280px;
  background: var(--glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid rgba(0,0,0,0.06);
  box-shadow: 2px 0 24px rgba(0,0,0,0.06);
  z-index: 60;
  display: flex; flex-direction: column;
  animation: slideL .35s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes slideL {
  from { transform: translateX(-100%); opacity: 0.6; }
  to   { transform: translateX(0); opacity: 1; }
}
.sb-head {
  padding: 16px 18px; border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex; justify-content: space-between; align-items: center;
}
.sb-head-title {
  font-size: 10px; letter-spacing: 0.18em;
  color: var(--muted); text-transform: uppercase;
}
.sb-head-actions {
  display: flex; align-items: center; gap: 4px;
}
.sb-sort-wrap { position: relative; }
.sb-sort-btn { font-size: 18px; letter-spacing: 2px; }
.sb-sort-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--glass-heavy);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px; padding: 4px 0; min-width: 160px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 300; animation: popIn .14s ease;
}
.sb-sort-item {
  padding: 9px 16px; font-size: 12px; color: var(--ink);
  cursor: pointer; letter-spacing: 0.03em; transition: background .1s;
}
.sb-sort-item:hover { background: rgba(0,0,0,0.04); }
.sb-sort-item.active { color: var(--accent); font-weight: 600; }

/* ── Add menu dropdown (＋ button) ─────────────────────────────────── */
.add-menu-wrap { position: relative; }
.add-menu-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--glass-heavy);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px; padding: 4px 0; min-width: 140px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 300; animation: popIn .14s ease;
}
.add-menu-item {
  padding: 10px 16px; font-size: 13px; color: var(--ink);
  cursor: pointer; letter-spacing: 0.03em; transition: background .1s;
}
.add-menu-item:hover { background: rgba(0,0,0,0.04); }
.add-menu-minefield { color: var(--danger-name); }

/* ── Minefield emoji grid ──────────────────────────────────────────── */
.minefield-emoji-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 2px; padding: 8px 0; max-height: 180px; overflow-y: auto;
}
.sb-search {
  margin: 11px 16px;
  background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.08);
  color: var(--ink); padding: 8px 12px; border-radius: 10px;
  font-size: 12px; font-family: inherit; width: calc(100% - 32px);
  transition: border-color .15s, box-shadow .15s;
}
.sb-search::placeholder { color: var(--muted); }
.sb-search:focus { outline: none; border-color: var(--soft); box-shadow: 0 0 0 3px var(--accent-ring); }
.sb-list { flex: 1; overflow-y: auto; padding: 4px 0 20px; }
.sb-item {
  padding: 10px 18px; cursor: pointer;
  display: flex; align-items: flex-start; gap: 12px;
  transition: background .12s;
  min-height: 72px; box-sizing: border-box;
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.05));
}
.sb-item:last-child { border-bottom: none; }
.sb-item:hover  { background: rgba(0,0,0,0.04); }
.sb-item.active { background: var(--accent-subtle); }
.sb-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.sb-info { flex: 1; min-width: 0; }
.sb-name { font-size: calc(14px * var(--font-scale, 1)); color: var(--ink); letter-spacing: 0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-name.minefield { color: var(--danger-name); font-weight: 600; }
.sb-loc  { font-size: 10px; color: var(--muted); margin-top: 2px; letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-cat  { font-size: 10px; color: var(--soft);  margin-top: 2px; letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-creator { font-size: 9px; color: var(--muted); margin-top: 3px; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-likes {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
  gap: 1px; color: var(--muted); font-size: 10px;
  padding-top: 3px; min-width: 22px;
}
.sb-likes-icon { font-size: 13px; line-height: 1; }
.sb-likes-count { line-height: 1; }

/* ── Route Planning ────────────────────────────────────────────────── */
.route-panel {
  position: fixed; top: 56px; right: 0; width: 320px; bottom: 0;
  background: var(--glass-heavy); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid var(--border); z-index: 62;
  display: flex; flex-direction: column;
  animation: slideL .3s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes slideL { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.route-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--border);
}
.route-title {
  font-size: 13px; font-weight: 600; color: var(--ink); flex: 1;
  letter-spacing: 0.04em; font-family: var(--font-heading, inherit);
}
.route-mode-toggle { display: flex; gap: 2px; }
.route-mode-btn {
  border: none; background: transparent; font-size: 16px; padding: 4px 6px;
  border-radius: 6px; cursor: pointer; opacity: 0.4; transition: opacity .15s, background .15s;
}
.route-mode-btn.active { opacity: 1; background: var(--accent-subtle, rgba(0,0,0,0.06)); }
.route-mode-btn:hover { opacity: 0.8; }
.route-close-btn {
  border: none; background: transparent; font-size: 14px; color: var(--muted);
  cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.route-close-btn:hover { color: var(--ink); }
/* Route start/end inputs */
.route-endpoints { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.route-endpoint-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.route-endpoint-row:last-child { margin-bottom: 0; }
.route-endpoint-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--accent);
}
.route-endpoint-start { background: var(--accent); }
.route-endpoint-end { background: transparent; }
.route-location-input { flex: 1; position: relative; display: flex; align-items: center; gap: 4px; }
.route-myloc-btn {
  border: none; background: var(--accent-subtle, rgba(0,0,0,0.05)); color: var(--accent);
  border-radius: 6px; padding: 5px; cursor: pointer; display: flex; flex-shrink: 0;
}
.route-myloc-btn:hover { opacity: 0.8; }
.route-loc-field {
  flex: 1; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; background: var(--surface, #fff);
  color: var(--ink); outline: none; min-width: 0;
}
.route-loc-field:focus { border-color: var(--accent); }
.route-loc-clear {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 11px; padding: 2px 4px; flex-shrink: 0;
}
.route-loc-suggest {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
  background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow-lg, 0 4px 16px rgba(0,0,0,0.12));
  max-height: 160px; overflow-y: auto; margin-top: 2px;
}
.route-loc-suggest-item {
  padding: 8px 10px; font-size: 12px; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.route-loc-suggest-item:hover { background: var(--accent-subtle, rgba(0,0,0,0.03)); }

.route-stops { flex: 1; overflow-y: auto; padding: 8px 0; }
.route-empty {
  padding: 24px 16px; text-align: center; font-size: 12px;
  color: var(--muted); line-height: 1.6;
}
.route-stop-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px;
  transition: background .15s;
}
.route-stop-item:hover { background: var(--accent-subtle, rgba(0,0,0,0.03)); }
.route-stop-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.route-stop-name { flex: 1; min-width: 0; cursor: pointer; }
.route-stop-main {
  font-size: 13px; color: var(--ink); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.route-stop-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }
.route-stop-actions { display: flex; gap: 2px; flex-shrink: 0; }
.route-stop-btn {
  border: none; background: transparent; font-size: 12px; color: var(--muted);
  cursor: pointer; padding: 2px 5px; border-radius: 4px;
}
.route-stop-btn:hover { background: var(--accent-subtle, rgba(0,0,0,0.06)); color: var(--ink); }
.route-stop-remove:hover { color: var(--danger-name, #E53E3E); }
.route-summary {
  padding: 10px 16px; border-top: 1px solid var(--border);
  display: flex; gap: 16px; font-size: 12px; color: var(--muted);
}
.route-summary strong { color: var(--ink); font-family: var(--font-heading, inherit); }
.route-actions {
  padding: 10px 16px; border-top: 1px solid var(--border);
  display: flex; gap: 8px;
}
.route-action-btn {
  flex: 1; border: none; padding: 8px; border-radius: 8px;
  font-size: 12px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.route-optimize-btn { background: var(--accent); color: #fff; }
.route-optimize-btn:hover { opacity: 0.85; }
.route-nav-btn { background: var(--accent-subtle, rgba(0,0,0,0.05)); color: var(--accent); border: 1.5px solid var(--accent); }
.route-nav-btn:hover { opacity: 0.85; }
.route-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.route-clear-btn { background: var(--accent-subtle, rgba(0,0,0,0.05)); color: var(--muted); }
.route-clear-btn:hover { background: var(--accent-hover, rgba(0,0,0,0.1)); color: var(--ink); }

/* Route view bar (minimized, shown during route viewing mode) */
.route-view-bar {
  position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 190;
  padding: 12px 16px;
  background: var(--glass-heavy, rgba(255,255,255,0.95));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-md, 0 4px 20px rgba(0,0,0,0.12));
  display: flex; align-items: center; justify-content: space-between;
  animation: slideUp .3s ease-out;
}
.route-view-bar-info {
  display: flex; align-items: center; flex: 1; cursor: pointer;
  color: var(--ink); font-size: 14px; font-weight: 600;
}
.route-view-bar-text { font-size: 13px; font-weight: 500; }
.route-view-bar-actions { display: flex; gap: 8px; align-items: center; }
.route-view-bar-btn {
  background: none; border: none; color: var(--ink); cursor: pointer;
  padding: 6px; border-radius: 8px; transition: background .15s;
}
.route-view-bar-btn:hover { background: var(--accent-subtle, rgba(0,0,0,0.06)); }
.route-optimize-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Route map markers — uses accent color from current theme */
.route-marker {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md, 0 2px 8px rgba(0,0,0,0.25)); border: 2px solid var(--surface, #fff);
  pointer-events: none;
}

/* Route checkbox in sidebar */
.route-checkbox {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--muted); display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 600;
  color: transparent; transition: all .15s; margin-right: 4px;
}
.route-checkbox.checked {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.sb-item.route-selected { background: var(--accent-subtle, rgba(0,0,0,0.04)); }
.sb-item.route-disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.route-checkbox.disabled { border-color: var(--muted); opacity: 0.3; }
.sb-route-btn.active {
  color: var(--accent) !important;
  background: var(--accent-subtle, rgba(0,0,0,0.06));
  border-radius: 6px;
}

/* Route select column (checkbox + reorder) */
.route-select-col { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-right: 4px; flex-shrink: 0; }
.route-reorder { display: flex; gap: 1px; }
.route-reorder-btn {
  width: 18px; height: 16px; border: none; background: var(--accent-subtle, rgba(0,0,0,0.06));
  border-radius: 3px; cursor: pointer; font-size: 10px; line-height: 1;
  color: var(--muted); display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.route-reorder-btn:hover { background: var(--accent); color: #fff; }

/* Route toolbar */
.route-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--accent-subtle, rgba(0,0,0,0.03));
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.route-toolbar-count { font-size: 12px; color: var(--muted); font-weight: 500; }
.route-toolbar-actions { display: flex; gap: 6px; }
.route-toolbar-btn {
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--ink); font-size: 12px; cursor: pointer;
  transition: all .15s;
}
.route-toolbar-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.route-toolbar-btn--danger:hover { background: #e55; border-color: #e55; }

/* ── Search Autocomplete ──────────────────────────────────────────── */
.sb-search-wrap { position: relative; }
.search-suggest {
  position: absolute; top: 100%; left: 8px; right: 8px;
  background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.12));
  z-index: 10; overflow: hidden; max-height: 280px; overflow-y: auto;
}
.search-suggest-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; cursor: pointer; transition: background .1s;
}
.search-suggest-item:hover { background: var(--accent-subtle, rgba(0,0,0,0.04)); }
.search-suggest-icon { font-size: 14px; flex-shrink: 0; }
.search-suggest-name { flex: 1; font-size: 13px; color: var(--ink); }
.search-suggest-count {
  font-size: 10px; color: var(--muted); background: var(--accent-subtle, rgba(0,0,0,0.05));
  padding: 2px 7px; border-radius: 10px;
}
.location-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 6px 8px 2px; padding: 5px 10px; border-radius: 20px;
  background: var(--accent-subtle, rgba(0,0,0,0.06));
  color: var(--accent); font-size: 12px;
}
.chip-clear {
  border: none; background: transparent; color: var(--accent);
  cursor: pointer; font-size: 12px; padding: 0 2px; opacity: 0.6;
}
.chip-clear:hover { opacity: 1; }

/* ── People (username search results, RFC-0006) ──────────────────── */
/* Section labels reuse the .sb-head-title look so 找人 / 图文 read as
   sibling sections of the food list. */
.sb-people-head {
  padding: 10px 16px 4px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.sb-posts-head { border-top: 1px solid var(--border, rgba(0,0,0,0.06)); margin-top: 2px; }
/* Horizontal-scroll row of user cards. */
.sb-user-row {
  display: flex; gap: 9px; overflow-x: auto;
  padding: 2px 16px 12px;
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
  scrollbar-width: thin;
}
.sb-user-card {
  flex: 0 0 auto; width: 84px; box-sizing: border-box;
  padding: 11px 8px 10px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border, rgba(0,0,0,0.06));
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; text-align: center;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.sb-user-card:hover {
  transform: translateY(-2px); border-color: var(--soft);
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}
.sb-user-name {
  font-size: 11px; color: var(--ink); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-user-stat { font-size: 9px; color: var(--muted); letter-spacing: 0.02em; }

/* ── SVG Icons (inherit theme colors via currentColor) ───────────── */
.svg-icon { color: inherit; }
.svg-icon svg { display: block; }

/* ── Profile Tab Bar ──────────────────────────────────────────────── */
.profile-tab-bar {
  display: flex; border-bottom: 1px solid var(--border); margin: 0 16px;
}
.profile-tab {
  flex: 1; padding: 10px 0; border: none; background: none;
  font-size: 13px; font-weight: 500; color: var(--muted);
  cursor: pointer; transition: all .15s; position: relative;
  font-family: var(--font-body, inherit);
}
.profile-tab.active { color: var(--ink); font-weight: 600; }
.profile-tab.active::after {
  content: ''; position: absolute; bottom: -1px; left: 20%; right: 20%;
  height: 2px; background: var(--accent); border-radius: 1px;
}

/* ── Trip Cards (Profile) ────────────────────────────────────────── */
.profile-trips-section { padding: 12px 16px; }
.profile-trips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trip-card {
  background: var(--surface, #fff); border-radius: 12px; overflow: hidden;
  position: relative; cursor: pointer; transition: transform .15s;
  border: 1px solid var(--border);
}
.trip-card:hover { transform: translateY(-2px); }
.trip-card-cover { aspect-ratio: 16/9; overflow: hidden; background: var(--surface-alt, #f0f0f0); }
.trip-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.trip-card-cover-empty {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; font-size: 32px; opacity: 0.4;
}
.trip-card-info { padding: 8px 10px; }
.trip-card-name {
  font-size: 13px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-heading, inherit);
}
.trip-card-meta { font-size: 11px; color: var(--muted); display: flex; gap: 6px; margin-top: 2px; }
.trip-card-visibility { font-size: 10px; color: var(--accent); margin-top: 2px; }
.trip-card-delete {
  position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.5);
  color: #fff; border: none; border-radius: 50%; width: 24px; height: 24px;
  font-size: 12px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; opacity: 0; transition: opacity .15s;
}
.trip-card:hover .trip-card-delete { opacity: 1; }

/* ── Trip Save Modal ─────────────────────────────────────────────── */
/* .trip-save-overlay → u-overlay shortcut (RFC-0004) */
.trip-save-sheet {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  box-shadow: 0 24px 80px rgba(0,0,0,0.15), 0 2px 12px rgba(0,0,0,0.06);
  border-radius: 16px;
  width: 520px; max-width: calc(100vw - 48px); max-height: 80vh; overflow-y: auto;
  padding: 28px 28px 32px;
}
.trip-save-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
  padding-bottom: 14px; border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
}
.trip-save-title {
  font-size: 17px; font-weight: 700; color: var(--ink);
  font-family: var(--font-heading, inherit);
}
.trip-save-field { margin-bottom: 16px; }
.trip-save-label {
  display: block; font-size: 11px; font-weight: 600; color: var(--muted);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em;
}
.trip-save-input {
  width: 100%; box-sizing: border-box; padding: 10px 14px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: color-mix(in srgb, var(--surface, #fff) 60%, transparent);
  color: var(--ink); font-size: 14px; font-family: var(--font-body, inherit);
  transition: border-color .15s, box-shadow .15s;
}
.trip-save-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
.trip-save-textarea { resize: vertical; min-height: 60px; }
.trip-cover-upload {
  width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden;
  border: 1px dashed color-mix(in srgb, var(--border) 60%, transparent); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--surface-alt, #f5f5f5) 50%, transparent);
  transition: border-color .15s;
}
.trip-cover-upload:hover { border-color: var(--accent); }
.trip-cover-preview { width: 100%; height: 100%; object-fit: cover; }
.trip-cover-placeholder { font-size: 14px; color: var(--muted); }
.trip-visibility-group { display: flex; gap: 8px; }
.trip-visibility-btn {
  flex: 1; padding: 9px 4px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: color-mix(in srgb, var(--surface, #fff) 50%, transparent);
  color: var(--ink); font-size: 12px; cursor: pointer; text-align: center;
  font-family: inherit; transition: all .15s;
}
.trip-visibility-btn:hover { border-color: var(--accent); }
.trip-visibility-btn.active {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent); font-weight: 600;
}
.trip-mode-display {
  font-size: 13px; color: var(--ink); padding: 8px 0;
}
.trip-stop-note-row {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px;
}
.trip-stop-note-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; margin-top: 4px;
}
.trip-stop-note-info { flex: 1; min-width: 0; }
.trip-stop-note-name {
  font-size: 13px; color: var(--ink); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trip-stop-note-input {
  width: 100%; box-sizing: border-box; padding: 7px 10px; margin-top: 4px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: 8px; font-size: 12px;
  background: color-mix(in srgb, var(--surface, #fff) 60%, transparent);
  color: var(--ink); font-family: var(--font-body, inherit);
  transition: border-color .15s, box-shadow .15s;
}
.trip-stop-note-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
/* Trip stop actions (reorder + remove) */
.trip-stop-actions { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; margin-top: 2px; }
.trip-stop-btn {
  width: 22px; height: 20px; border: none; border-radius: 4px; cursor: pointer;
  background: var(--accent-subtle, rgba(0,0,0,0.05)); color: var(--muted);
  font-size: 11px; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.trip-stop-btn:hover { background: var(--accent); color: #fff; }
.trip-stop-remove:hover { background: #e55; color: #fff; }

/* Add stop search dropdown */
.trip-add-stop-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 10;
  background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.12));
  max-height: 200px; overflow-y: auto; margin-top: 4px;
}
.trip-add-stop-item {
  padding: 8px 12px; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; transition: background .1s;
}
.trip-add-stop-item:hover { background: var(--accent-subtle, rgba(0,0,0,0.04)); }
.trip-add-stop-item:first-child { border-radius: 10px 10px 0 0; }
.trip-add-stop-item:last-child { border-radius: 0 0 10px 10px; }

.trip-save-submit {
  width: 100%; padding: 12px; border: none; border-radius: 12px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; margin-top: 12px; transition: all .15s;
  font-family: var(--font-body, inherit);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent);
}
.trip-save-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.trip-save-submit:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Trip Detail View ────────────────────────────────────────────── */
.trip-detail-panel {
  z-index: 80 !important;
}
.trip-detail-scroll { flex: 1; overflow-y: auto; }
.trip-detail-cover { width: 100%; max-height: 200px; object-fit: cover; }
.trip-detail-info { padding: 16px; }
.trip-detail-name {
  font-size: 20px; font-weight: 700; color: var(--ink);
  font-family: var(--font-heading, inherit);
}
.trip-detail-meta {
  font-size: 12px; color: var(--muted); margin-top: 6px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.trip-visibility-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: var(--accent-subtle); color: var(--accent);
}
.trip-detail-desc {
  font-size: 14px; color: var(--ink); line-height: 1.6; margin-top: 12px;
  white-space: pre-wrap;
}
.trip-detail-stops { padding: 0 16px 32px; }
.trip-detail-stops-head {
  font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 12px 0 8px; text-transform: uppercase; letter-spacing: 0.06em;
}
.trip-detail-stop {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background .15s;
}
.trip-detail-stop:hover { background: var(--accent-subtle, rgba(0,0,0,0.02)); }
.trip-detail-stop-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; margin-top: 2px;
}
.trip-detail-stop-body { flex: 1; min-width: 0; }
.trip-detail-stop-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.trip-detail-stop-loc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.trip-detail-stop-note {
  font-size: 12px; color: var(--soft, var(--muted)); margin-top: 4px;
  font-style: italic; line-height: 1.5;
}
.trip-detail-edit {
  border: none; background: none; color: var(--muted); cursor: pointer; padding: 4px 8px;
  display: flex; align-items: center; transition: color .15s;
}
.trip-detail-edit:hover { color: var(--accent); }
.trip-detail-delete {
  border: none; background: none; color: var(--danger-name, #E53E3E);
  font-size: 12px; cursor: pointer; padding: 4px 8px;
}

/* ── Trip sharing ── */
.trip-share-section { padding: 0 16px 24px; }
.trip-collaborators { margin-bottom: 12px; }
.trip-collab-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border, #e5e5e5);
  font-size: 13px; color: var(--ink);
}
.trip-collab-name { font-weight: 500; }
.trip-collab-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: var(--accent-subtle, rgba(0,0,0,0.04)); color: var(--accent);
}
.trip-collab-badge--from { background: rgba(59,130,246,0.1); color: #3B82F6; }
.trip-invite-row {
  display: flex; gap: 8px; margin-top: 8px;
}
.trip-invite-input {
  flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px; background: var(--surface, #fff); color: var(--ink);
  font-family: inherit;
}
.trip-invite-input:focus { outline: none; border-color: var(--accent); }
.trip-invite-btn {
  padding: 8px 16px; border: none; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: opacity .15s; font-family: inherit;
}
.trip-invite-btn:hover { opacity: 0.85; }
.trip-invite-btn:disabled { opacity: 0.4; cursor: default; }
.trip-share-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.trip-share-req-btn, .trip-copy-btn {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s;
  font-family: inherit; background: var(--surface, #fff); color: var(--ink);
}
.trip-share-req-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.trip-share-req-btn--sent, .trip-share-req-btn:disabled { opacity: 0.55; cursor: default; }
.trip-copy-btn:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
.trip-collab-remove {
  background: none; border: none; color: var(--muted, #999); cursor: pointer;
  font-size: 13px; padding: 2px 6px; border-radius: 6px; transition: color .15s;
}
.trip-collab-remove:hover { color: var(--error, #e53e3e); }
.trip-pending-requests { margin-top: 12px; }

/* ── Route save button ───────────────────────────────────────────── */
.route-save-btn { background: var(--accent-subtle, rgba(0,0,0,0.05)); color: var(--accent); }
.route-save-btn:hover { opacity: 0.85; }

/* ── Detail panel ───────────────────────────────────────────────────── */
.detail {
  position: fixed; left: 0; right: 0; bottom: 0; height: 400px;
  background: var(--glass-heavy);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 -4px 32px rgba(0,0,0,0.07);
  z-index: 70;
  display: flex; flex-direction: column;
  animation: slideU .4s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes slideU {
  from { transform: translateY(100%); opacity: 0.5; }
  to   { transform: translateY(0); opacity: 1; }
}
.detail-head {
  padding: 18px 24px 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-shrink: 0;
}
.detail-name { font-size: calc(26px * var(--font-scale, 1)); font-weight: normal; letter-spacing: 0.01em; }
.detail-en   { font-size: calc(13px * var(--font-scale, 1)); color: var(--muted); font-style: italic; margin-left: 12px; }
.detail-meta { font-size: 12px; color: var(--soft); margin-top: 6px; letter-spacing: 0.04em; }
.detail-creator {
  font-size: 10px; color: var(--muted); margin-top: 8px;
  padding: 6px 12px; background: rgba(0,0,0,0.02);
  border-radius: 8px; border: 1px solid rgba(0,0,0,0.06);
  font-style: italic; line-height: 1.7; letter-spacing: 0.02em;
}

.detail-tabs {
  display: flex; padding: 10px 24px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06); flex-shrink: 0;
}
.d-tab {
  padding: 8px 16px; font-size: 11px; letter-spacing: 0.12em;
  color: var(--soft); cursor: pointer; text-transform: uppercase;
  border: none; border-bottom: 2px solid transparent;
  background: none; font-family: inherit; transition: color .15s, border-color .15s;
}
.d-tab:hover  { color: var(--ink); }
.d-tab.active { color: var(--ink); border-bottom-color: var(--accent); }

.detail-body {
  flex: 1; overflow-y: auto;
  padding: 18px 24px 28px;
  font-size: calc(14px * var(--font-scale, 1)); line-height: 1.9; color: var(--ink);
  white-space: pre-wrap;
}

/* restaurants in detail */
.rest-item {
  background: rgba(0,0,0,0.02); border: 1px solid rgba(0,0,0,0.07);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 10px;
  white-space: normal;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.rest-name { font-size: calc(13px * var(--font-scale, 1)); margin-bottom: 4px; letter-spacing: 0.02em; }
.rest-addr { font-size: calc(11px * var(--font-scale, 1)); color: var(--muted); }
.rest-note { font-size: calc(11px * var(--font-scale, 1)); color: var(--soft); font-style: italic; margin-top: 6px; }
.rest-link { font-size: 11px; color: var(--accent); margin-top: 4px; display: block; word-break: break-all; }

/* References (灵感来自) — APA-style citations */
.xhs-cite-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  transition: opacity .15s;
}
.xhs-cite-item:last-child { border-bottom: none; }
.xhs-cite-item:hover { background: rgba(0,0,0,0.02); }
.xhs-cite-item:active { opacity: 0.6; }
.xhs-cite-emoji {
  font-size: 22px; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.xhs-cite-thumb-wrap {
  position: relative; width: 40px; height: 40px; flex-shrink: 0;
}
.xhs-cite-thumb {
  width: 40px; height: 40px;
  border-radius: 8px; object-fit: cover; display: block;
  background: var(--surface-alt, rgba(0,0,0,0.04));
}
.xhs-cite-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
/* Top-right play button overlay on post covers (profile / curated) */
.cover-play-btn {
  position: absolute;
  top: 8px; right: 8px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
}
.xhs-cite-citation {
  flex: 1; min-width: 0;
  font-size: calc(13px * var(--font-scale, 1)); line-height: 1.5; color: var(--ink);
  word-break: break-word;
}
.xhs-cite-arrow {
  color: var(--muted); flex-shrink: 0;
}

/* image gallery */
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px; white-space: normal;
}
.img-cell {
  aspect-ratio: 1; border-radius: 10px;
  overflow: hidden; background: var(--border); cursor: zoom-in;
}
.img-cell img { width: 100%; height: 100%; object-fit: cover; }

/* lightbox — floating card to the left of the detail panel */
.lightbox {
  position: fixed;
  top: 72px; bottom: 16px;
  right: 412px;                /* 380px panel + 16px gap + 16px inset */
  width: calc(100vw - 412px - 32px); /* fill remaining space with 16px margins */
  max-width: 720px;
  z-index: 9999;
  background: var(--v-glass);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
  animation: lightboxSlideIn .24s ease;
  overflow: hidden;
}
@keyframes lightboxSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
.lightbox img {
  max-width: calc(100% - 32px); max-height: calc(100% - 64px);
  object-fit: contain; border-radius: 12px;
}
.lightbox-close {
  position: absolute; top: 14px; right: 16px;
  color: var(--v-soft); font-size: 24px;
  background: none; border: none; cursor: pointer; line-height: 1;
  z-index: 1;
}
.lightbox-close:hover { color: var(--v-ink); }
.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: var(--v-hover); border: none; color: var(--v-soft);
  font-size: 28px; width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .15s;
}
.lightbox-arrow:hover { background: var(--v-active); color: var(--v-ink); }
.lightbox-arrow-l { left: 12px; }
.lightbox-arrow-r { right: 12px; }
.lightbox-counter {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: var(--v-muted); font-size: 12px; font-family: Georgia, serif;
  letter-spacing: 0.1em;
}

/* video */
.video-wrap {
  position: relative; padding-bottom: 56.25%; height: 0;
  border-radius: 12px; overflow: hidden; background: var(--surface);
  white-space: normal;
}
.video-wrap iframe { position: absolute; top:0; left:0; width:100%; height:100%; border: none; }

/* ── Cover-video toggle in add/edit modal ─── */
.cover-video-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-alt);
  transition: border-color .15s, background .15s;
  margin-top: -6px; /* tuck under the URL input */
  user-select: none;
}
.cover-video-toggle.active {
  border-color: var(--accent);
  background: var(--accent-subtle, rgba(26,58,40,0.06));
}
.cover-video-toggle-label {
  font-size: 13px; font-weight: 500; color: var(--muted);
  letter-spacing: 0.01em;
}
.cover-video-toggle-label.active { color: var(--accent); }
.cover-video-toggle-hint {
  font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.4;
}
/* iOS-style toggle pill */
.toggle-switch {
  width: 38px; height: 22px; border-radius: 11px;
  background: var(--border); position: relative; flex-shrink: 0;
  transition: background .2s;
}
.toggle-switch::after {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.22);
}
.toggle-switch.on { background: var(--accent); }
.toggle-switch.on::after { transform: translateX(16px); }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; white-space: normal; }
.tag {
  font-size: 10px; padding: 3px 11px;
  border: 1px solid var(--tag-border); border-radius: 20px;
  color: var(--tag-color); background: var(--tag-bg);
  letter-spacing: 0.06em;
}

/* placeholder */
.placeholder { color: var(--muted); font-size: 13px; font-style: italic; }

.inline-translate-btn.active { opacity: 0.9; }

/* ── Category Picker ─────────────────────────────────────────────────── */
.cat-picker { position: relative; }
.cat-trigger {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: 8px;
  border: 1.5px solid rgba(0,0,0,0.12); background: var(--bg);
  font-size: 14px; color: var(--text); cursor: pointer;
  transition: border-color .15s;
}
.cat-trigger:hover { border-color: rgba(0,0,0,0.25); }
.cat-trigger--empty { color: var(--muted); }
.cat-trigger-arrow { font-size: 11px; color: var(--muted); }
.cat-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.08);
  z-index: 100; overflow: hidden;
  animation: catFade .12s ease;
}
@keyframes catFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.cat-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; cursor: pointer; font-size: 14px;
  color: var(--text); transition: background .1s;
}
.cat-dropdown-item:hover { background: rgba(0,0,0,0.04); }
.cat-dropdown-group { justify-content: space-between; }
.cat-dropdown-arrow { color: var(--muted); font-size: 16px; }
.cat-dropdown-back {
  font-size: 13px; color: var(--muted);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 8px 14px; gap: 6px;
}
.cat-dropdown-back:hover { color: var(--text); }
.cat-dropdown-sub { padding-left: 18px; }
.cat-dropdown-emoji { font-size: 18px; }
.cat-dropdown-sub--active { background: rgba(0,0,0,0.04); font-weight: 600; }

/* ── Map filter clear button (desktop header) ── */
.map-filter-clear-btn-ej {
  color: var(--danger, #FF3B30) !important;
  font-weight: 600 !important;
}

@keyframes spin { to { transform: rotate(360deg); } }
.quick-add-place-chip.active {
  background: var(--accent, #34C759); color: #fff;
  border-color: var(--accent, #34C759);
}
.quick-add-type-btn.active {
  background: var(--accent, #34C759); color: #fff;
  border-color: var(--accent, #34C759);
}

/* ── Want/Loved picker (desktop) ──────────────────────────────────────── */
.add-pick-panel-ej {
  background: var(--surface, #fff);
  border-radius: 20px;
  padding: 32px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}
.add-pick-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink, #1a1a1a);
  text-align: center;
  margin-bottom: 24px;
}
.add-pick-close {
  position: absolute;
  top: 24px; right: 24px;
  background: none; border: none;
  font-size: 20px; color: var(--muted, #999);
  cursor: pointer;
}
.add-pick-options {
  display: flex;
  gap: 16px;
}
.add-pick-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 20px;
  border-radius: 16px;
  border: 1.5px solid var(--border, #e0e0e0);
  background: var(--surface, #fff);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.add-pick-btn:hover {
  border-color: var(--accent, #34C759);
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.1);
  transform: translateY(-2px);
}
.add-pick-icon { font-size: 36px; line-height: 1; }
.add-pick-label { font-size: 17px; font-weight: 700; color: var(--ink, #1a1a1a); }
.add-pick-desc { font-size: 13px; color: var(--muted, #999); text-align: center; line-height: 1.4; }




/* ── Modal ───────────────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.22);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.overlay--cite {
  flex-direction: column; gap: 0; justify-content: center;
}
.modal-cite-prompt {
  text-align: center;
  color: var(--accent);
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0 20px 14px;
  animation: fadeSlideDown 0.45s cubic-bezier(0.33, 1, 0.68, 1);
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal {
  background: var(--glass-heavy);
  border: 1px solid var(--border);
  border-radius: 20px; width: 580px; max-width: 92vw; max-height: 88vh;
  display: flex; flex-direction: column;
  animation: popIn .18s ease;
  box-shadow: 0 24px 64px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.03);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1);   }
}
.modal-head {
  padding: 22px 24px 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}
.modal-head-title { font-size: 16px; letter-spacing: 0.06em; }
.modal-tabs {
  display: flex; padding: 14px 24px 0;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.rename-progress-bar {
  width: 200px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden;
}
.rename-progress-fill {
  width: 0; height: 100%; background: var(--accent); border-radius: 2px;
  animation: renameProgress 3s ease-in-out forwards;
}
@keyframes renameProgress {
  0% { width: 0; }
  30% { width: 40%; }
  60% { width: 70%; }
  90% { width: 90%; }
  100% { width: 95%; }
}
.modal-foot {
  padding: 0 24px 16px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0; flex-shrink: 0;
}
.modal-foot-btns { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; }

/* ── Save progress bar (inside modal footer) ────────────────────────────── */
.modal-progress {
  height: 2px; background: var(--accent-ring);
  margin: 0 -24px; overflow: hidden; border-radius: 0;
  opacity: 0; transition: opacity 0.2s;
}
.modal-progress.active { opacity: 1; }
.modal-progress-fill {
  height: 100%; background: var(--progress);
  animation: none;
}
.modal-progress.active .modal-progress-fill {
  animation: modal-prog 1.4s ease-in-out infinite;
}
@keyframes modal-prog {
  0%   { width: 0%;   margin-left: -5%; }
  50%  { width: 55%;  margin-left: 22%; }
  100% { width: 0%;   margin-left: 105%; }
}

/* ── Guest login prompt ────────────────────────────────────────────────── */
.login-prompt {
  background: var(--glass-heavy);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 340px; max-width: 90vw;
  padding: 32px 28px 28px;
  text-align: center;
  position: relative;
  animation: popIn .18s ease;
  box-shadow: 0 24px 64px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.03);
}
.login-prompt-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 4px;
  border-radius: 8px; transition: background .15s;
}
.login-prompt-close:hover { background: var(--glass-light); }
.login-prompt-icon { margin-bottom: 14px; }
.login-prompt-title {
  font-size: 17px; font-weight: 600;
  letter-spacing: 0.04em; margin-bottom: 6px;
  color: var(--ink);
}
.login-prompt-desc {
  font-size: 13px; color: var(--muted);
  line-height: 1.5; margin-bottom: 22px;
}
.login-prompt-actions { display: flex; gap: 10px; }
.login-prompt-btn {
  flex: 1; padding: 10px 0; border-radius: 12px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border); transition: all .15s;
}
.login-prompt-btn--primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.login-prompt-btn--primary:hover { filter: brightness(1.08); }
.login-prompt-btn--secondary {
  background: var(--glass-light); color: var(--ink);
}
.login-prompt-btn--secondary:hover { background: var(--glass-heavy); }

/* ── Top progress bar (initial loading) ─────────────────────────────────── */
.top-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9998; overflow: hidden;
}
.top-progress-fill {
  height: 100%; background: var(--progress);
  animation: top-prog 1.6s cubic-bezier(.4,0,.6,1) infinite;
}
@keyframes top-prog {
  0%   { width: 0%;   margin-left: -5%; }
  60%  { width: 60%;  margin-left: 20%; }
  100% { width: 0%;   margin-left: 105%; }
}

/* ── Globe flag markers ──────────────────────────────────────────────────── */
.gm {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; position: relative;
  transform-origin: bottom center;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), filter .18s;
  user-select: none;
  pointer-events: auto !important;
}
/* ── Theme picker popup (from map control card) ── */
.theme-picker-popup {
  position: absolute; bottom: calc(100% + 12px); right: -8px;
  background: var(--glass-heavy, rgba(255,255,255,0.95));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 8px;
  box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,0.15));
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  min-width: 220px; z-index: 300;
  animation: popIn .18s ease;
}
.theme-picker-item {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 10px;
  border: none; background: transparent;
  cursor: pointer; font-family: inherit;
  font-size: 12px; color: var(--ink);
  transition: background .15s;
  white-space: nowrap;
}
.theme-picker-item:hover { background: var(--accent-subtle, rgba(0,0,0,0.06)); }
.theme-picker-item.active {
  background: var(--accent-subtle); font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.theme-picker-icon { display: flex; align-items: center; justify-content: center; width: 20px; flex-shrink: 0; color: var(--ink); opacity: 0.7; }
.theme-picker-name { font-size: 11px; }

.gm:hover { transform: scale(1.5) translateY(-3px); }
.gm-flag { font-size: 21px; line-height: 1; }

/* ── ISS orbiting station ── */
@keyframes iss-move {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* ISS food popup */
/* removed dead .iss-popup* family (RFC-0004 dead-code cleanup; unused in ej) */
.gm-stem { width: 1.5px; height: 5px; background: rgba(255,255,255,.75); margin-top: 1px; border-radius: 1px; }
#globe-tip {
  /* Hover tooltip for map/globe pins. z-index sits ABOVE the map layer
     (.globe-wrap and its pins, base stacking context) but BELOW every
     overlay that can cover the screen — detail panel (70), header/nav
     (100), menus/popups (200–500), modals (9000+). So even if a tip ever
     lingers (e.g. a touch tap that fires mouseenter but no mouseleave), it
     can never float on top of those views. Was 9999 — which let a stuck
     tip hover above the detail panel and every tab. */
  position: fixed; z-index: 65; pointer-events: none;
  background: var(--tip-bg); color: var(--ink);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 7px 12px; border-radius: 12px;
  font-size: 11px; font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  white-space: nowrap; line-height: 1.6; text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transition: opacity .12s;
}
#globe-tip.visible { opacity: 1; }
#globe-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--tip-bg);
}

/* ── Toast notification ──────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--glass); color: var(--ink);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 9px 20px; border-radius: 20px;
  font-size: 12px; letter-spacing: 0.06em;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 9999; pointer-events: none;
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap;
  animation: toast-in .22s ease both;
}
.toast.fade-out { animation: toast-out .28s ease forwards; }
.toast-icon { font-size: 13px; line-height: 1; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

/* form */
.fg { margin-bottom: 16px; }
.fl {
  display: block; font-size: 10px; letter-spacing: 0.12em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 6px;
}
.fi, .fta, .fsel {
  width: 100%;
  background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.09);
  color: var(--ink); padding: 8px 12px; border-radius: 10px;
  font-size: 13px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.fi:focus, .fta:focus, .fsel:focus {
  outline: none; border-color: var(--soft);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.fta { resize: vertical; min-height: 80px; line-height: 1.8; }
.fsel option { background: var(--surface); }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* restaurant form item */
.rest-form-item {
  background: rgba(0,0,0,0.02); border: 1px solid rgba(0,0,0,0.07);
  border-radius: 12px; padding: 14px 38px 14px 14px; margin-bottom: 10px;
  position: relative;
}
.rest-remove {
  position: absolute; top: 10px; right: 10px;
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 14px; line-height: 1;
}
.rest-remove:hover { color: #c97070; }

/* image input */
.img-input-row { display: flex; gap: 8px; margin-bottom: 8px; }
.img-preview-grid {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px;
}
.img-preview-item {
  position: relative; width: 70px; height: 70px;
  border-radius: 8px; overflow: hidden; background: var(--border);
}
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.img-remove-btn {
  position: absolute; top: 2px; right: 2px;
  background: rgba(0,0,0,.55); border: none; color: #fff;
  font-size: 10px; cursor: pointer; border-radius: 4px; padding: 1px 4px; line-height: 1;
}
.img-move-btns {
  position: absolute; bottom: 2px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 4px;
}
.img-move-btn {
  background: rgba(0,0,0,.55); border: none; color: #fff;
  font-size: 9px; cursor: pointer; border-radius: 3px; padding: 1px 5px; line-height: 1;
}
.img-move-btn:hover { background: rgba(0,0,0,.75); }

/* video-link list (media tab) — one row per external video URL, with reorder + remove */
.video-link-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.video-link-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px;
  background: var(--border); font-size: 12px;
}
.video-link-url {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text); opacity: .85;
}
/* Per-row preview: YouTube thumbnail image, or a platform badge for others */
.video-link-thumb {
  flex-shrink: 0; width: 44px; height: 28px; border-radius: 4px;
  object-fit: cover; background: #000;
  display: inline-flex; align-items: center; justify-content: center;
}
.video-link-badge { font-size: 10px; font-weight: 700; color: #fff; letter-spacing: .2px; }
.video-link-badge-bilibili { background: #fb7299; }
.video-link-badge-vimeo { background: #1ab7ea; }
.video-link-badge-youtube { background: #ff0000; }
.video-link-badge-other { background: #555; font-size: 12px; }
.video-link-moves { display: flex; gap: 4px; flex-shrink: 0; }
.video-link-remove {
  background: rgba(0,0,0,.55); border: none; color: #fff;
  font-size: 10px; cursor: pointer; border-radius: 4px; padding: 2px 6px; line-height: 1;
  flex-shrink: 0;
}
.video-link-remove:hover { background: rgba(0,0,0,.75); }

/* scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Notebook filter chip ────────────────────────────────────────────────── */
.notebook-chip {
  display: flex; align-items: center; gap: 5px;
  background: var(--accent-hover); border: 1px solid var(--accent-ring);
  border-radius: 20px; padding: 3px 8px 3px 5px;
  font-size: 11px; color: var(--accent); letter-spacing: 0.04em;
  white-space: nowrap; flex-shrink: 0;
}
.notebook-chip-close {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 2px; flex-shrink: 0;
}
.notebook-chip-close:hover { color: var(--ink); }


/* ── Favorite folders bar ───────────────────────────────────────── */
.h-fav-center {
  flex: 1; min-width: 0; display: flex; justify-content: center;
  padding: 0 12px;
}
.fav-folders-bar {
  padding: 6px 12px; border-top: 1px solid var(--border);
  background: var(--surface);
}
.fav-folders-scroll {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fav-folders-scroll::-webkit-scrollbar { display: none; }
.fav-folder-chip {
  flex: 0 0 auto; padding: 4px 10px; border-radius: 14px;
  font-size: 12px; cursor: pointer; white-space: nowrap; position: relative;
  background: var(--border); color: var(--ink); transition: background .15s;
  display: flex; align-items: center; gap: 4px;
}
.fav-folder-chip:hover { background: rgba(0,0,0,0.08); }
.fav-folder-chip.active { background: var(--accent); color: #fff; }
.fav-folder-chip.editing { padding: 2px 6px; }
.fav-folder-add { border: 1px dashed var(--muted); background: transparent; color: var(--muted); }
.fav-folder-input {
  border: none; background: transparent; outline: none; font-size: 12px;
  color: var(--ink); width: 80px;
}
.fav-folder-batch-btn {
  background: none; border: none; font-size: 10px; cursor: pointer;
  color: inherit; opacity: 0.5; padding: 0 2px;
}
.fav-folder-batch-btn:hover { opacity: 1; }
.fav-folder-del {
  background: none; border: none; font-size: 12px; cursor: pointer;
  color: rgba(255,80,80,0.8); padding: 0 2px;
}

/* ── Clickable creator in sidebar ───────────────────────────────────────── */
.sb-creator {
  font-size: 9px; color: var(--muted);
  margin-top: 5px; padding-top: 5px;
  border-top: 1px solid var(--border);
  font-style: italic; display: flex; align-items: center; gap: 3px;
}
.sb-creator-link { cursor: pointer; transition: color .12s; }
.sb-creator-link:hover { color: var(--accent); }

/* ── Modal buttons (light background) ───────────────────────────────── */
.mbtn-primary {
  background: var(--accent); color: #fff; border: none;
  padding: 9px 22px; border-radius: 22px; cursor: pointer;
  font-size: 12px; font-weight: 500; letter-spacing: 0.06em;
  font-family: inherit; transition: background .15s, opacity .15s;
}
.mbtn-primary:hover { opacity: 0.85; }
.mbtn-primary:disabled { opacity: 0.35; cursor: not-allowed; }
.mbtn-cancel {
  background: none; color: var(--muted);
  border: 1px solid rgba(0,0,0,0.12);
  padding: 9px 16px; border-radius: 22px; cursor: pointer;
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  font-family: inherit; transition: color .15s, border-color .15s;
}
.mbtn-cancel:hover { color: var(--ink); border-color: var(--soft); }
.mbtn-danger {
  background: none; color: #c97070;
  border: 1px solid rgba(200,100,100,0.30);
  padding: 9px 16px; border-radius: 22px; cursor: pointer;
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  font-family: inherit; transition: all .15s;
}
.mbtn-danger:hover { background: rgba(200,100,100,0.06); border-color: #c97070; }

/* ── Mobile-only header elements (hidden on desktop) ─────────────────── */
.h-mobile-globe { display: none; }
.h-mobile-fullscreen { display: none; }
.h-mobile-menu-text { display: none; }

/* ── Mobile ──────────────────────────────────────────────────────────── */
/* ── Mobile bottom navigation bar ──────────────────────────────────────── */
.mobile-bottom-nav {
  display: none; /* hidden on desktop */
}
@media (max-width: 640px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 56px; z-index: 100;
    background: var(--glass-heavy);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.08);
    align-items: center; justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mobile-nav-btn {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: none; cursor: pointer;
    color: var(--muted); font-size: 10px; letter-spacing: 0.05em;
    padding: 4px 12px; min-width: 56px; position: relative;
    transition: color .15s;
  }
  .mobile-nav-btn.active { color: var(--accent); }
  .mobile-nav-btn svg { flex-shrink: 0; }
  .mobile-nav-add .mobile-nav-add-icon {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; line-height: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    margin-bottom: -4px;
  }
  .mobile-nav-badge {
    position: absolute; top: 0; right: 4px;
    min-width: 14px; height: 14px; border-radius: 7px;
    background: #e53e3e; color: #fff;
    font-size: 9px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px; pointer-events: none;
  }
}

@media (max-width: 640px) {
  /* ── Route panel mobile ── */
  .route-panel {
    top: auto !important; bottom: 56px !important; left: 0 !important; right: 0 !important;
    width: 100vw !important; height: 45vh; border-right: none;
    border-top-left-radius: 20px; border-top-right-radius: 20px;
    border-top: 1px solid var(--border);
  }
  .profile-trips-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .trip-save-sheet { max-width: 100%; }
  .trip-detail-cover { max-height: 160px; }

  /* ── Header: keep minimal, move actions to bottom nav ── */
  .header { padding: 0 12px; height: 48px; position: relative; }
  .h-title { display: block; font-size: 13px; position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; }
  .h-title em { display: none; }
  .h-site-stats { display: none; }
  /* Hide all top action buttons — they live in bottom nav now */
  .h-actions .btn,
  .h-actions .add-menu-wrap,
  .h-actions .notebook-chip,
  .h-actions .following-chip,
  .h-fullscreen { display: none !important; }
  /* Keep notification bell and avatar in top header */
  .h-actions { gap: 4px; }
  .lang-toggle { display: none !important; }
  /* Show mobile-only header elements */
  .h-mobile-globe {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex-shrink: 0;
    background: none; border: none; padding: 0;
    color: var(--ink); cursor: pointer; border-radius: 8px;
  }
  .h-mobile-fullscreen {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; flex-shrink: 0;
    background: none; border: none; padding: 0;
    color: var(--ink); cursor: pointer; border-radius: 8px;
  }
  .h-mobile-menu-text {
    display: inline;
    font-size: 12px; font-weight: 500;
    color: var(--ink); white-space: nowrap;
  }
  /* Hide avatar image on mobile — text label replaces it */
  .h-avatar-img-wrap { display: none !important; }

  /* ── Globe / Map: account for top header + bottom nav ── */
  .globe-wrap { top: 48px; bottom: 56px; }
  .map-control-card { display: none !important; }

  /* ── Panels: full width, from header to bottom nav ── */
  .sidebar {
    top: 48px !important; left: 0 !important; right: 0 !important;
    bottom: 56px !important; width: 100vw !important; border-radius: 0 !important;
  }
  .xhs-panel {
    top: 48px !important; left: 0 !important; right: 0 !important;
    bottom: 56px !important; width: 100vw !important; border-radius: 0 !important;
  }
  .curated-panel {
    top: 48px !important; left: 0 !important; right: 0 !important;
    bottom: 56px !important; width: 100vw !important; border-radius: 0 !important;
  }
  .avatar-menu { top: 48px; right: 8px; }
  .profile-panel {
    top: 48px !important; left: 0 !important; right: 0 !important;
    bottom: 56px !important; width: 100vw !important;
    border-radius: 0 !important; height: auto !important;
  }

  /* ── Detail panel ── */
  .detail { height: 60vh; }
  .detail-name { font-size: 19px; }
  .detail-head { padding: 14px 16px 0; }
  .detail-tabs { padding: 8px 16px 0; }
  .detail-body { padding: 14px 16px 20px; font-size: 13px; }
  .d-tab { padding: 10px 12px; font-size: 10px; }

  /* ── Modal: bottom sheet (above bottom nav) ── */
  .overlay { align-items: flex-end; padding-bottom: 56px; }
  .modal {
    width: 100%; max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 88vh;
  }
  .modal-head { padding: 18px 18px 0; }
  .modal-body { padding: 14px 18px; }
  .modal-foot { padding: 10px 18px 16px; }
  .f-row { grid-template-columns: 1fr; }

  /* ── Modal action buttons: large touch targets ── */
  .mbtn-primary, .mbtn-cancel, .mbtn-danger {
    padding: 12px 18px; font-size: 13px;
  }
  .icon-btn { padding: 8px; font-size: 18px; }

  /* ── Images: 2 cols on narrow screen ── */
  .img-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════════════════════════════════
   XHS (小红书) style DetailPanel
   ══════════════════════════════════════════════════════════════════════════ */
.xhs-panel {
  position: fixed; right: 0; top: 56px; bottom: 0; width: 380px;
  background: var(--glass-heavy);
  border-left: 1px solid rgba(0,0,0,0.06);
  z-index: 70; display: flex; flex-direction: column;
  animation: slideR .4s cubic-bezier(0.2, 0.9, 0.3, 1);
  box-shadow: -6px 0 32px rgba(0,0,0,0.07);
  overflow: hidden;
}
@keyframes slideR {
  from { transform: translateX(100%); opacity: 0.6; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Navbar ── */
.xhs-navbar {
  height: 48px; flex-shrink: 0;
  display: flex; align-items: center; padding: 0 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: var(--glass-heavy);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  position: relative; z-index: 10;
}
.xhs-back {
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--ink); padding: 4px 10px 4px 0; line-height: 1;
}
.xhs-back:hover { color: var(--accent); }
.xhs-navbar-title {
  flex: 1; font-size: 14px; color: var(--ink); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 8px;
}
.xhs-navbar-right { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.xhs-nav-btn {
  background: none; border: none; cursor: pointer;
  font-size: 17px; padding: 4px 6px; border-radius: 8px;
  line-height: 1; transition: background .12s; color: var(--ink);
}
.xhs-nav-btn:hover { background: rgba(0,0,0,0.06); }
.xhs-nav-btn:disabled { opacity: 0.4; cursor: default; }
.detail-more-wrap { position: relative; }
.detail-more-dropdown {
  position: absolute; top: 100%; right: 0;
  background: var(--glass-heavy);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  min-width: 120px; z-index: 320; overflow: hidden;
}
.detail-more-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 16px; font-size: 14px; color: var(--ink);
  background: none; border: none; text-align: left;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.detail-more-item:hover { background: var(--glass-light); }
.detail-more-item--danger { color: var(--danger-name, rgba(220,60,60,0.9)); }
.xhs-nav-btn.active { opacity: 0.65; }
.xhs-nav-confirm { color: var(--accent) !important; }

/* ── Scroll container ── */
.xhs-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; }

/* ── Image carousel ── */
.xhs-carousel {
  width: calc(100% + 2px); margin-left: -1px; margin-right: -1px;
  aspect-ratio: 4/3; max-height: 420px;
  position: relative; overflow: hidden; flex-shrink: 0; user-select: none;
  background: transparent;
  -webkit-clip-path: inset(0);
  clip-path: inset(0);
  touch-action: pan-y;
}
.xhs-carousel-track {
  display: flex; height: 100%; width: 100%;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.xhs-carousel-slide { min-width: 100%; width: 100%; height: 100%; position: relative; flex-shrink: 0; overflow: hidden; }
.xhs-carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; background: transparent; }
/* ── Cover-video carousel slide ─── */
.xhs-carousel-video-thumb {
  width: 100%; height: 100%; position: relative; cursor: pointer;
  background: #000; overflow: hidden;
}
.xhs-carousel-video-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.xhs-carousel-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.xhs-carousel-video-frame {
  width: 100%; height: 100%;
}
.xhs-carousel-video-frame iframe {
  width: 100%; height: 100%; border: none; display: block;
}
/* Video dot — slightly larger indicator */
.xhs-dot-video {
  width: 10px !important; height: 10px !important;
  border-radius: 3px !important;
  background: rgba(255,80,80,0.8) !important;
  opacity: 1 !important;
}
.xhs-dot-video.active { background: #ff3030 !important; }

.xhs-carousel-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f5f0ea 0%, #e8f0ec 100%); gap: 8px;
}
.xhs-img-remove {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.55); border: none; color: #fff;
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.xhs-img-move {
  background: rgba(0,0,0,.6); border: none; color: #fff;
  font-size: 11px; cursor: pointer; border-radius: 14px;
  padding: 5px 12px; white-space: nowrap;
}
.xhs-img-move:hover { background: rgba(0,0,0,.8); }
.xhs-dots {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; pointer-events: none;
}
.xhs-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.5); cursor: pointer; pointer-events: all;
  transition: background .14s, transform .14s;
}
.xhs-dot.active { background: #fff; transform: scale(1.35); }
.xhs-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.25); border: none; color: #fff;
  font-size: 26px; width: 28px; height: 52px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0.7; transition: opacity .14s, background .14s;
}
.xhs-arrow:hover { opacity: 1; background: rgba(0,0,0,.45); }
.xhs-arrow-l { left: 0; border-radius: 0 8px 8px 0; }
.xhs-arrow-r { right: 0; border-radius: 8px 0 0 8px; }
.xhs-add-img-btn {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,.45); border: none; color: #fff;
  font-size: 11px; padding: 4px 10px; border-radius: 8px;
  cursor: pointer; letter-spacing: 0.04em;
}
.xhs-add-img-btn:hover { background: rgba(0,0,0,.65); }

/* ── Content ── */
.xhs-content { padding: 14px 16px 36px; }
.xhs-title-row { margin-bottom: 4px; }
.xhs-food-name { font-size: 21px; color: var(--ink); letter-spacing: 0.01em; }
.xhs-food-name.minefield { color: var(--danger-name); }
.xhs-food-en   { font-size: 12px; color: var(--muted); font-style: italic; margin-left: 10px; }
.xhs-meta      { font-size: 12px; color: var(--soft); margin-bottom: 14px; }

/* From-collection link (RFC-0015) — tap a curated 图文 back to its 老饕合集 */
.xhs-from-collection {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 0 0 14px; padding: 5px 10px;
  font-size: 12px; line-height: 1.2;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.xhs-from-collection:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.xhs-from-collection-label { color: var(--soft); }
.xhs-from-collection-name  { font-weight: 500; }
.xhs-from-collection-arrow { flex: none; opacity: 0.7; }

/* ── Author ── */
.xhs-author {
  display: flex; align-items: center; gap: 10px;
}
.xhs-author-info { display: flex; flex-direction: column; gap: 2px; }
.xhs-author-name { font-size: 13px; color: var(--ink); font-weight: 500; }
.xhs-author-time { font-size: 10px; color: var(--muted); }

/* ── Notes ── */
.xhs-notes {
  font-size: 15px; line-height: 1.8; color: var(--ink);
  white-space: pre-wrap; margin-bottom: 14px;
  word-break: break-word; overflow-wrap: break-word;
}
.xhs-notes a {
  color: var(--accent); text-decoration: underline;
  word-break: break-all;
}
.xhs-notes-ta {
  width: 100%; font-size: 15px; line-height: 1.8;
  background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px; padding: 10px 12px; color: var(--ink);
  font-family: inherit; resize: vertical; min-height: 100px; margin-bottom: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.xhs-notes-ta:focus { outline: none; border-color: var(--soft); box-shadow: 0 0 0 3px var(--accent-ring); }

/* ── Tags ── */
.xhs-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; align-items: center; }
.xhs-tag { font-size: 13px; color: #FF2442; display: flex; align-items: center; gap: 2px; }
.xhs-tag-remove {
  background: none; border: none; color: #FF2442; opacity: 0.55;
  cursor: pointer; font-size: 13px; padding: 0 1px; line-height: 1;
}
.xhs-tag-remove:hover { opacity: 1; }
.xhs-tag-input-row { display: flex; align-items: center; gap: 5px; width: 100%; margin-top: 2px; }
.xhs-tag-input {
  flex: 1; background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px; padding: 5px 10px; font-size: 12px; color: var(--ink); font-family: inherit;
  transition: border-color .15s;
}
.xhs-tag-input:focus { outline: none; border-color: var(--soft); }
.xhs-tag-add-btn {
  background: none; border: 1px solid rgba(0,0,0,0.10); color: var(--soft);
  padding: 5px 10px; border-radius: 8px; cursor: pointer; font-size: 13px;
  transition: all .12s;
}
.xhs-tag-add-btn:hover { border-color: var(--soft); color: var(--ink); }

/* ── Interaction bar ── */
.xhs-interact {
  display: flex; gap: 16px; align-items: center;
  padding: 12px 0; border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06); margin-bottom: 20px;
}
.xhs-interact-btn {
  background: none; border: none; cursor: pointer; font-size: 14px;
  color: var(--muted); display: flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 8px; transition: color .12s, background .12s;
}
.xhs-interact-btn:hover { color: var(--ink); background: rgba(0,0,0,0.05); }
.xhs-interact-btn.active { color: #FF2442; }

/* ── Edit action bar ── */
.xhs-edit-bar { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 18px; }
.xhs-save-btn {
  background: var(--accent); color: #fff; border: none;
  padding: 9px 22px; border-radius: 22px; cursor: pointer;
  font-size: 12px; font-weight: 500; letter-spacing: 0.06em; font-family: inherit;
  transition: opacity .15s;
}
.xhs-save-btn:hover { opacity: 0.85; }
.xhs-save-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.xhs-cancel-btn {
  background: none; color: var(--muted); border: 1px solid rgba(0,0,0,0.12);
  padding: 9px 16px; border-radius: 22px; cursor: pointer;
  font-size: 12px; font-family: inherit; transition: color .15s, border-color .15s;
}
.xhs-cancel-btn:hover { color: var(--ink); border-color: var(--soft); }

/* ── Collapsible cards ── */
.xhs-card {
  border: 1px solid rgba(0,0,0,0.07); border-radius: 14px;
  margin-bottom: 10px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.xhs-card-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px; cursor: pointer;
  background: rgba(0,0,0,0.015); font-size: 13px; color: var(--ink);
  user-select: none; transition: background .12s; letter-spacing: 0.02em;
}
.xhs-card-head:hover { background: rgba(0,0,0,0.04); }
.xhs-card-arrow { font-size: 9px; color: var(--muted); }
.xhs-card-body {
  padding: 12px 14px 14px; font-size: 13px; line-height: 1.8;
  color: var(--ink); white-space: pre-wrap; border-top: 1px solid rgba(0,0,0,0.06);
}

/* ── Comments (Soul-style) ───────────────────────────────────────────────── */
.detail-comments-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.detail-comments-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.detail-comments-count { font-weight: 400; font-size: 13px; color: var(--muted); }
.detail-comments-sort { display: flex; background: var(--surface-alt); border-radius: 16px; padding: 2px; }
.detail-comments-sort-tab {
  background: none; border: none; font-size: 12px; font-weight: 500; color: var(--muted);
  cursor: pointer; padding: 4px 10px; border-radius: 14px; font-family: inherit; transition: background 0.15s, color 0.15s;
}
.detail-comments-sort-tab--active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.detail-comment { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.detail-comment-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; cursor: pointer; flex-shrink: 0; }
.detail-comment-avatar-placeholder {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--accent);
  background: var(--surface); color: var(--accent); font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.detail-comment-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.detail-comment-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.detail-comment-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.detail-comment-user { font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; }
.detail-comment-user:hover { color: var(--accent); }
.detail-comment-time { font-size: 10px; color: var(--muted); }
.detail-comment-delete { background: none; border: none; cursor: pointer; font-size: 14px; color: var(--muted); padding: 0 2px; opacity: 0.5; }
.detail-comment-delete:hover { opacity: 1; color: #FF2442; }
.detail-comment-text { font-size: 13px; color: var(--ink); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.comment-img { max-width: 160px; max-height: 160px; object-fit: cover; border-radius: 8px; margin-top: 7px; cursor: zoom-in; display: block; }
.detail-comment-meta-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.detail-comment-like-btn {
  display: flex; align-items: center; gap: 4px; background: none; border: none;
  cursor: pointer; padding: 0; color: var(--muted); font-size: 12px; line-height: 1; flex-shrink: 0; transition: color 0.15s;
}
.detail-comment-like-btn:hover { color: #FF2442; }
.detail-comment-like-btn--active { color: #FF2442; }

/* ── Reply button + flag (meta row, left side) ── */
.detail-comment-reply-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--muted); font-size: 12px; line-height: 1; font-family: inherit;
  transition: color 0.15s; flex-shrink: 0;
}
.detail-comment-reply-btn:hover { color: var(--accent); }
.detail-comment-flag {
  background: none; border: none; cursor: pointer; font-size: 12px;
  color: var(--muted); padding: 0 2px; opacity: 0.5; line-height: 1; transition: opacity 0.15s;
}
.detail-comment-flag:hover { opacity: 1; color: #FF2442; }

/* ── Nested replies ── */
.detail-comment-replies-toggle-wrap { margin-top: 6px; }
.detail-comment-view-replies {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 2px 0;
  color: var(--accent); font-size: 12px; font-weight: 600; font-family: inherit;
}
.detail-comment-view-replies-line {
  display: inline-block; width: 20px; height: 1px;
  background: var(--border); margin-right: 4px;
}
.detail-comment-view-replies-arrow { font-size: 9px; }
.detail-comment-replies {
  margin-top: 6px; padding-left: 4px;
  border-left: 2px solid rgba(0,0,0,0.05);
}
.detail-comment--reply { padding: 8px 0 8px 8px; border-bottom: none; gap: 8px; }
.detail-comment-avatar--sm,
.detail-comment-avatar-placeholder--sm {
  width: 28px; height: 28px; font-size: 11px;
}
.detail-comment-mention { color: var(--accent); font-weight: 600; margin-right: 2px; }

/* ── Reply context bar (above action bar when replying) ── */
.detail-reply-bar-fixed {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; background: var(--surface-alt);
  border-top: 1px solid rgba(0,0,0,0.06); font-size: 12px; color: var(--muted);
}
.detail-reply-bar-fixed .detail-reply-bar-text { flex: 1; min-width: 0; }
.detail-reply-bar-fixed .detail-reply-bar-cancel {
  background: none; border: none; cursor: pointer; font-size: 18px;
  color: var(--muted); line-height: 1; padding: 0 4px;
}
.detail-reply-bar-fixed .detail-reply-bar-cancel:hover { color: var(--ink); }

/* ── Comment image attach button + preview chip (in pill) ── */
.detail-comment-attach {
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--muted); flex-shrink: 0; transition: color 0.15s;
}
.detail-comment-attach:hover { color: var(--accent); }
.detail-comment-img-chip { position: relative; flex-shrink: 0; }
.detail-comment-img-chip img {
  width: 34px; height: 34px; object-fit: cover; border-radius: 7px; display: block;
}
.detail-comment-img-chip-x {
  position: absolute; top: -5px; right: -5px;
  width: 16px; height: 16px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 11px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}

/* ── Action bar (bottom of panel, non-fixed) ─────────────────────────────── */
.detail-action-bar {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 12px; background: var(--glass-heavy);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0,0,0,0.06);
}
.detail-comment-pill {
  /* flex-end keeps the send button bottom-aligned as the textarea grows (RFC-0007) */
  flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 6px;
  background: rgba(0,0,0,0.05); border-radius: 18px; padding: 6px 12px; cursor: text;
}
/* RFC-0007: auto-growing multi-line textarea (was a single-line <input>). */
.detail-comment-pill-input {
  flex: 1; min-width: 0; border: none; background: transparent;
  color: var(--ink); font-size: 13px; outline: none; font-family: inherit;
  display: block; resize: none; line-height: 1.4;
  min-height: 20px; max-height: 120px; overflow-y: auto; padding: 4px 0;
}
.detail-comment-pill-placeholder { flex: 1; font-size: 13px; color: var(--muted); pointer-events: none; }
.detail-comment-pill-send {
  background: var(--accent); color: #fff; border: none; border-radius: 14px;
  font-size: 12px; font-weight: 600; padding: 4px 10px; cursor: pointer;
  font-family: inherit; flex-shrink: 0; transition: opacity 0.15s;
}
.detail-comment-pill-send:disabled { opacity: 0.4; }
.detail-action-icons { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.detail-action-icon {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: none; border: none; color: var(--soft, #666); cursor: pointer;
  padding: 4px 7px; font-family: inherit; font-size: 10px; line-height: 1.2; transition: color 0.15s;
}
.detail-action-icon--active { color: var(--accent); }
.detail-action-icon:active { opacity: 0.7; }

.detail-food-id {
  text-align: center; padding: 12px 0 8px;
  font-size: 9px; color: var(--muted, #bbb); opacity: 0.4;
  letter-spacing: 0.06em; font-family: monospace;
  cursor: pointer; transition: opacity .15s;
}
.detail-food-id:hover { opacity: 0.7; }

/* ── Following-mode chip (header) ── */
.following-chip {
  display: flex; align-items: center; gap: 5px;
  background: rgba(80,140,220,0.10); border: 1px solid rgba(80,140,220,0.22);
  border-radius: 20px; padding: 3px 10px 3px 8px;
  font-size: 11px; color: rgba(50,100,200,0.9); white-space: nowrap;
}
.following-chip-close {
  background: none; border: none; cursor: pointer;
  font-size: 13px; color: rgba(80,140,220,0.5); padding: 0 0 0 3px; line-height: 1;
}
.following-chip-close:hover { color: rgba(50,100,200,0.9); }

.author-follow-btn.following {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.author-follow-btn.following:hover { opacity: 0.85; }

/* ── Author row: ⋯ more-menu ── */
.xhs-author-row {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 14px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.xhs-author {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.author-more-wrap { position: relative; flex-shrink: 0; }
.author-more-btn {
  background: none; border: none; cursor: pointer;
  font-size: 18px; padding: 4px 6px; border-radius: 8px;
  color: var(--muted); line-height: 1; transition: color .12s, background .12s;
}
.author-more-btn:hover { color: var(--ink); background: rgba(0,0,0,0.05); }
.author-more-menu {
  position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--glass-heavy);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 14px; box-shadow: 0 8px 28px rgba(0,0,0,0.10);
  min-width: 170px; z-index: 200; overflow: hidden;
  animation: fadeInDown .12s ease;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.author-more-item {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px; font-size: 13px; color: var(--ink);
  cursor: pointer; transition: background .1s; white-space: nowrap;
}
.author-more-item:hover { background: rgba(0,0,0,0.05); }
.author-more-item + .author-more-item { border-top: 1px solid rgba(0,0,0,0.05); }

/* ── BlockedContentModal ── */
/* .blocked-modal-overlay → u-overlay shortcut (RFC-0004) */
.blocked-modal {
  background: var(--glass-heavy); border-radius: 20px;
  box-shadow: 0 20px 56px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
  width: min(480px, 94vw); max-height: 80vh;
  display: flex; flex-direction: column;
  animation: scaleIn .16s ease;
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.blocked-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 0;
}
.blocked-modal-head h3 {
  font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: 0.01em;
}
.blocked-modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--muted); padding: 2px 6px;
  border-radius: 8px; line-height: 1; transition: color .12s;
}
.blocked-modal-close:hover { color: var(--ink); }
.blocked-modal-tabs {
  display: flex; gap: 0; padding: 14px 20px 0; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.blocked-modal-tab {
  flex: 1; background: none; border: none; cursor: pointer;
  font-size: 13px; font-family: inherit; color: var(--muted);
  padding: 8px 0 10px; border-bottom: 2px solid transparent;
  transition: color .12s, border-color .12s; margin-bottom: -1px;
}
.blocked-modal-tab.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 500; }
.blocked-modal-body { flex: 1; overflow-y: auto; padding: 6px 0 8px; }
.blocked-modal-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; transition: background .1s;
}
.blocked-modal-row:hover { background: rgba(0,0,0,0.03); }
.blocked-modal-row-info { flex: 1; min-width: 0; }
.blocked-modal-row-name {
  font-size: 13px; font-weight: 500; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.blocked-modal-row-sub {
  font-size: 11px; color: var(--muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.blocked-modal-restore {
  flex-shrink: 0; background: var(--accent-subtle); border: none; cursor: pointer;
  color: var(--accent); font-size: 11px; font-family: inherit;
  padding: 4px 12px; border-radius: 20px; transition: background .12s;
  white-space: nowrap;
}
.blocked-modal-restore:hover { background: var(--accent-hover); }
.blocked-modal-empty {
  padding: 36px 20px; text-align: center;
  font-size: 13px; color: var(--muted);
}
.blocked-modal-footer {
  padding: 10px 20px 16px; border-top: 1px solid rgba(0,0,0,0.06);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ── Two-step delete confirmation dialog ── */
/* .del-confirm-overlay → u-overlay shortcut (RFC-0004) */
.del-confirm-box {
  background: var(--glass-heavy); border-radius: 20px;
  box-shadow: 0 20px 56px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
  width: min(340px, 90vw); padding: 24px 22px 18px;
  display: flex; flex-direction: column; text-align: center;
  animation: scaleIn .16s ease;
}
.del-confirm-title { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
.del-confirm-actions { display: flex; gap: 10px; margin-top: 22px; }
.del-confirm-btn {
  flex: 1; padding: 9px 0; border-radius: 12px; cursor: pointer;
  font-size: 14px; font-family: inherit; font-weight: 500; border: none;
  transition: background .12s;
}
.del-confirm-btn--cancel { background: rgba(0,0,0,0.05); color: var(--ink); }
.del-confirm-btn--cancel:hover { background: rgba(0,0,0,0.09); }
.del-confirm-btn--danger { background: #e5484d; color: #fff; }
.del-confirm-btn--danger:hover { background: #d33b40; }

/* ── Mobile: bottom sheet ── */
@media (max-width: 640px) {
  .xhs-panel {
    top: auto; width: 100%; height: 85vh;
    border-left: none; border-top: 1px solid rgba(0,0,0,0.06);
    border-radius: 20px 20px 0 0;
    animation: slideU .22s ease;
  }
  .xhs-carousel { aspect-ratio: 4/3; max-height: 75vw; }
  .blocked-modal { width: 100%; border-radius: 20px 20px 0 0; max-height: 85vh; }
  .blocked-modal-overlay { align-items: flex-end; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Profile Panel
   ══════════════════════════════════════════════════════════════════════════ */
.profile-panel {
  position: fixed; right: 0; top: 56px; bottom: 0; width: 380px;
  background: var(--glass-heavy);
  border-left: 1px solid rgba(0,0,0,0.06);
  z-index: 75; display: flex; flex-direction: column;
  animation: slideR .22s ease;
  box-shadow: -6px 0 32px rgba(0,0,0,0.07);
}

/* ── Profile header ── */
.profile-header {
  padding: 28px 24px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: var(--glass-heavy);
  position: relative; /* so camera button + banner bg can absolute-position */
}
.profile-username {
  font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: 0.02em;
  text-align: center;
}
.profile-stats {
  display: flex; align-items: center; gap: 24px;
  font-size: 12px; color: var(--muted);
  justify-content: center;
}
.profile-stats-dot { color: var(--border); }
.profile-bio {
  font-size: 13px; color: var(--soft); line-height: 1.6; text-align: center;
  max-width: 290px; padding: 4px 10px; border-radius: 8px;
  transition: background .15s; min-height: 28px;
}
.profile-bio:hover { background: rgba(0,0,0,0.04); }
.profile-bio-placeholder { color: var(--muted); font-style: italic; }
.profile-bio-edit { width: 100%; }
.profile-bio-ta {
  width: 100%; padding: 10px 12px; font-size: 13px; line-height: 1.6;
  border: 1px solid rgba(0,0,0,0.09); border-radius: 10px;
  background: rgba(0,0,0,0.03); color: var(--ink); font-family: inherit;
  resize: vertical; min-height: 72px;
  transition: border-color .15s, box-shadow .15s;
}
.profile-bio-ta:focus { outline: none; border-color: var(--soft); box-shadow: 0 0 0 3px var(--accent-ring); }
.profile-bio-actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px;
}
.profile-btn-cancel {
  background: none; border: 1px solid rgba(0,0,0,0.12); color: var(--muted);
  padding: 5px 14px; border-radius: 20px; cursor: pointer;
  font-size: 12px; font-family: inherit; transition: all .15s;
}
.profile-btn-cancel:hover { border-color: var(--soft); color: var(--ink); }
.profile-btn-save {
  background: var(--accent); border: none; color: #fff;
  padding: 5px 16px; border-radius: 20px; cursor: pointer;
  font-size: 12px; font-family: inherit; font-weight: 500; transition: opacity .15s;
}
.profile-btn-save:hover { opacity: 0.85; }
.profile-btn-save:disabled { opacity: 0.45; cursor: default; }
.profile-actions {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px;
}
/* Icon buttons (block eye, map, more) */
.profile-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border, rgba(0,0,0,0.12));
  background: transparent; cursor: pointer;
  color: var(--soft, #888); transition: all 0.15s;
  flex-shrink: 0;
}
.profile-icon-btn:hover { border-color: var(--soft); color: var(--ink); }
.profile-icon-btn.active { border-color: var(--accent); color: var(--accent); }
.profile-icon-btn.active svg { stroke: var(--accent); }

/* Follow / Following pill */
.profile-follow-btn {
  padding: 3px 12px; border-radius: 14px; cursor: pointer;
  font-size: 12px; font-weight: 500; font-family: inherit;
  border: 1px solid var(--accent); color: var(--accent);
  background: transparent; transition: all .15s;
}
.profile-follow-btn:hover { background: var(--accent); color: #fff; }
.profile-follow-btn.following {
  border-color: var(--border); color: var(--muted); background: transparent;
}
.profile-follow-btn.following:hover {
  border-color: rgba(200,80,80,0.5); color: rgba(200,80,80,0.85);
  background: rgba(200,80,80,0.06);
}

/* ── Collections ── */
.profile-collections {
  display: flex; gap: 10px; padding: 10px 16px 14px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.profile-collections::-webkit-scrollbar { display: none; }
.profile-collection-card {
  flex: 0 0 auto; width: 120px; border-radius: 10px;
  background: var(--surface); cursor: pointer;
  border: 2px solid transparent; transition: border-color .15s, background .15s;
  overflow: hidden; position: relative;
}
.profile-collection-card:hover { background: rgba(0,0,0,0.03); }
.profile-collection-card.active { border-color: var(--accent); }
.collection-cover {
  width: 100%; aspect-ratio: 4/3; overflow: hidden; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.collection-cover img { width: 100%; height: 100%; object-fit: cover; }
.collection-cover-empty { font-size: 28px; opacity: 0.4; }
.collection-info { padding: 6px 8px 8px; }
.collection-name {
  font-size: 12px; font-weight: 500; color: var(--ink); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.collection-count { font-size: 10px; color: var(--muted); margin-top: 2px; }
.collection-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px dashed rgba(0,0,0,0.12);
}
.collection-name-input {
  flex: 1; min-width: 0; padding: 6px 8px;
  border: none; border-bottom: 1.5px solid var(--accent);
  background: transparent; color: var(--ink); font-size: 15px; outline: none;
  font-family: inherit;
}
.profile-col-name-confirm {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0;
  border: none; border-radius: 50%;
  background: var(--accent); color: #fff;
  cursor: pointer;
}
/* ── Collection card in-place actions ── */
.col-active { border-color: var(--accent) !important; }
.collection-card-actions {
  display: flex; gap: 4px; padding: 4px 6px 6px;
  justify-content: center; flex-wrap: wrap;
}

/* ── Collection picker (detail page) ── */
.collection-picker {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  width: 200px; max-height: 260px; overflow-y: auto;
  background: var(--surface); border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 100; padding: 6px 0;
}
.collection-picker-title {
  padding: 6px 12px; font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.collection-picker-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; cursor: pointer; font-size: 13px; color: var(--ink);
  transition: background .1s;
}
.collection-picker-item:hover { background: rgba(0,0,0,0.04); }
.collection-picker-item.active { color: var(--accent); }
.collection-picker-check {
  width: 16px; text-align: center; font-size: 12px; color: var(--accent);
}
.collection-picker-new { padding: 6px 8px; border-top: 1px solid rgba(0,0,0,0.06); }
.collection-picker-input {
  width: 100%; padding: 6px 8px; border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px; font-size: 12px; background: transparent; color: var(--ink);
  outline: none;
}
.collection-picker-input:focus { border-color: var(--accent); }

/* ── Posts grid ── */
.profile-posts-head {
  padding: 14px 20px 10px;
  font-size: 10px; color: var(--muted); letter-spacing: 0.14em;
  text-transform: uppercase; border-bottom: 1px solid rgba(0,0,0,0.06);
}
/* aaooee: add 图文 to a curated author */
.profile-add-curated-btn {
  padding: 6px 14px;
  border: 1px solid var(--accent, #34C759);
  border-radius: 16px;
  background: none;
  color: var(--accent, #34C759);
  font-size: 12px; font-weight: 600; letter-spacing: 0;
  text-transform: none; font-family: inherit; cursor: pointer;
  white-space: nowrap;
}
.profile-add-curated-btn:hover { background: var(--accent, #34C759); color: #fff; }
.profile-legal-links {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 0; font-size: 12px;
}
.profile-legal-links a { color: var(--muted, #999); text-decoration: none; }
.profile-legal-links a:hover { color: var(--accent); }
.profile-legal-dot { color: var(--muted, #ccc); font-size: 10px; }
.profile-posts-empty {
  padding: 52px 20px; text-align: center; font-size: 13px; color: var(--muted);
}
.profile-posts-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px; padding: 4px 4px 40px;
  background: transparent;
}
/* .profile-post-card → utilities in profile.js (RFC-0004) */
.profile-post-thumb {
  width: 100%; aspect-ratio: 3/4; overflow: hidden; background: var(--bg);
  position: relative;
}
.profile-post-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.profile-post-thumb-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.profile-post-info { padding: 7px 9px 9px; flex: 1; }
.profile-post-name {
  font-size: 12px; color: var(--ink); font-weight: 500; line-height: 1.4; margin-bottom: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.profile-post-meta { font-size: 10px; color: var(--muted); line-height: 1.4; }
.profile-post-loc { color: var(--muted); }
.profile-post-likes { font-size: 10px; color: var(--muted); margin-top: 4px; }
.profile-post-flag {
  position: absolute; top: 6px; left: 6px;
  font-size: 10px; font-weight: 700;
  color: #fff; background: var(--accent, #E8A838);
  padding: 2px 6px; border-radius: 4px;
}

/* ── Favorites action buttons (sort + map) ── */
.profile-fav-actions {
  display: flex; justify-content: flex-start; flex-wrap: wrap;
  gap: 8px; padding: 10px 16px 6px;
}
.profile-fav-action-btn {
  display: inline-flex; align-items: center;
  padding: 6px 12px;
  font-size: 12px; font-weight: 600;
  color: var(--muted, #888);
  background: var(--glass-light, rgba(0,0,0,0.03));
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 20px; cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.profile-fav-action-btn:hover { background: var(--glass-heavy, rgba(0,0,0,0.06)); }
.profile-fav-action-btn.active {
  color: var(--accent, #E8A838);
  background: rgba(232, 168, 56, 0.08);
  border-color: rgba(232, 168, 56, 0.2);
}
.profile-fav-sort-arrow { font-size: 11px; }
.profile-fav-action-btn--danger { color: #FF3B30; border-color: rgba(255,59,48,0.3); }
.profile-fav-action-btn--danger:hover { background: rgba(255,59,48,0.06); }

/* ── Favorites inner sub-tab bar (收藏夹 | 合集) ── */
.profile-fav-subtabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  margin-bottom: 2px;
}
.profile-fav-subtab {
  padding: 10px 16px 9px;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary, #888);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer; font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
}
.profile-fav-subtab--active {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent, #E67A28);
}

/* ── XHS-style board list ── */
.profile-fav-boards { padding: 8px 0; }
.profile-fav-board {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.profile-fav-board:hover { background: var(--glass-light, rgba(0,0,0,0.02)); }
.profile-fav-board-info { flex: 1; min-width: 0; }
.profile-fav-board-name {
  font-size: 16px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.profile-fav-board-count { font-size: 12px; color: var(--muted); }
.profile-fav-board-thumbs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 3px; width: 132px; flex-shrink: 0;
  border-radius: 6px; overflow: hidden;
}
.profile-fav-board-thumb {
  aspect-ratio: 1; background: var(--glass-light, rgba(0,0,0,0.04));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 14px;
}
.profile-fav-board-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-fav-folder-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 6px;
}
.profile-fav-back-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--glass-light, rgba(0,0,0,0.04));
  color: var(--ink); cursor: pointer; flex-shrink: 0;
}
.profile-fav-back-btn:hover { background: var(--glass-heavy, rgba(0,0,0,0.08)); }
.profile-fav-folder-title { font-size: 16px; font-weight: 600; color: var(--ink); }

/* ── Collections action bar (XHS-style chips row) ── */
.profile-col-action-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 6px 16px 10px;
}
.profile-col-action-chip {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--card-bg, var(--surface));
  color: var(--ink); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.profile-col-action-chip:hover { background: var(--glass-light, rgba(0,0,0,0.04)); }
.profile-col-action-chip--danger {
  border-color: #FF3B30; color: #FF3B30;
}
.profile-col-action-chip--danger:hover { background: rgba(255,59,48,0.07); }

/* ── Create board row ── */
.profile-fav-board--create {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.profile-fav-board-create-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%;
  border: 2px dashed var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--muted); line-height: 1;
}

.profile-collection-card:hover .collection-batch-btn { opacity: 1; }

/* ── Content picker modal ── */
/* removed dead .content-picker* family (RFC-0004 dead-code cleanup; unused in ej) */
@media (max-width: 640px) {
  .profile-panel {
    top: 48px; width: 100%; height: auto;
    border-left: none; border-top: 1px solid rgba(0,0,0,0.06);
    border-radius: 0;
    animation: slideU .22s ease;
  }
  .collection-batch-btn { opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Curated Panel ("Once upon a bite")
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Banner in sidebar ─── */
.curated-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; margin: 0 0 1px;
  background: var(--surface);
  cursor: pointer; transition: background .15s;
  border-bottom: 1px solid var(--border);
}
.curated-banner:hover { background: var(--bg); }
.curated-banner-text {
  flex-shrink: 0; font-size: 12px; font-weight: 400;
  color: var(--ink); letter-spacing: 0.2em; text-transform: uppercase;
  white-space: nowrap;
}
.curated-banner-hint {
  flex: 1; min-width: 0;
  font-size: 10px; color: var(--muted); margin-right: 4px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  animation: hintFlipIn 0.4s ease-out; text-align: right;
}
.curated-banner-hint em { font-style: italic; }
@keyframes hintFlipIn {
  0% { opacity: 0; transform: translateY(100%); }
  100% { opacity: 1; transform: translateY(0); }
}
.curated-banner-arrow {
  font-size: 16px; color: var(--muted); font-weight: 300; flex-shrink: 0;
}

/* ── Panel ─── */
.curated-panel {
  position: fixed; top: 56px; left: 0; bottom: 0;
  width: 370px; max-width: 100vw;
  background: var(--bg);
  border-right: 1px solid rgba(0,0,0,0.06);
  z-index: 80; display: flex; flex-direction: column;
  animation: slideL .22s ease;
}
.curated-navbar {
  height: 44px; display: flex; align-items: center;
  padding: 0 20px; gap: 12px;
}
.curated-back {
  background: none; border: none; cursor: pointer;
  font-size: 14px; color: var(--muted); padding: 4px 0;
  letter-spacing: 0.1em; transition: color .15s;
}
.curated-back:hover { color: var(--ink); }
.curated-navbar-title {
  flex: 1; font-size: 11px; font-weight: 400;
  color: var(--muted); letter-spacing: 0.14em;
  text-align: right;
}
.curated-navbar-right { display: none; }
.curated-scroll {
  flex: 1; overflow-y: auto; padding: 0 0 32px;
}

/* ── Hero (Vogue editorial) ─── */
.curated-hero {
  text-align: center; padding: 56px 32px 40px;
  border-bottom: 1px solid var(--border);
  margin: 0 20px 24px;
}
.curated-hero-title {
  font-size: 26px; font-weight: 300; color: var(--ink);
  letter-spacing: 0.18em; margin-bottom: 16px;
  font-family: var(--font-heading);
}
.curated-hero-sub {
  font-size: 11px; color: var(--muted); line-height: 1.8;
  letter-spacing: 0.08em;
}

/* ── Folder cards (Vogue editorial) ─── */
.curated-folder-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 24px; margin: 0 20px;
  cursor: pointer; transition: all .2s;
  border-bottom: 1px solid var(--border);
  background: transparent; border-radius: 0;
}
.curated-folder-card:last-child { border-bottom: none; }
.curated-folder-card:hover {
  background: var(--surface);
}
.curated-folder-info { flex: 1; }
.curated-folder-name {
  font-size: 13px; font-weight: 400; color: var(--ink);
  letter-spacing: 0.12em; margin-bottom: 4px;
}
.curated-folder-meta {
  font-size: 10px; color: var(--muted); letter-spacing: 0.06em;
}
.curated-folder-arrow {
  font-size: 16px; color: var(--muted); font-weight: 200;
}

/* ── Collection cards (Vogue editorial) ─── */
.curated-collections { padding: 16px 20px; }
.curated-collection-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px 0; margin-bottom: 0;
  background: transparent; border-radius: 0;
  cursor: pointer; transition: all .2s;
  border-bottom: 1px solid var(--border);
}
.curated-collection-card:last-child { border-bottom: none; }
.curated-collection-card:hover { opacity: 0.7; }
.curated-collection-info { flex: 1; }
.curated-collection-title {
  font-size: 15px; font-weight: 400; color: var(--ink);
  letter-spacing: 0.06em; margin-bottom: 4px;
  font-family: var(--font-heading);
}
.curated-collection-author {
  font-size: 11px; color: var(--soft); margin-bottom: 8px;
  letter-spacing: 0.06em;
}
.curated-collection-desc {
  font-size: 11px; color: var(--muted); line-height: 1.7;
  margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.curated-collection-count {
  font-size: 10px; color: var(--accent); font-weight: 400;
  letter-spacing: 0.08em;
}

/* ── Empty state ─── */
.curated-empty {
  text-align: center; padding: 48px 24px;
  font-size: 13px; color: var(--muted);
}

/* ── Author header ─── */
.curated-author-header {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 20px 20px; text-align: center;
  border-bottom: 1px solid var(--border);
}
.curated-author-name {
  font-size: 18px; font-weight: 700; color: var(--ink);
  margin-top: 10px; letter-spacing: 0.06em;
}
.curated-author-work {
  font-size: 13px; color: var(--soft); margin-top: 4px;
}
.curated-author-bio {
  font-size: 12px; color: var(--muted); line-height: 1.6;
  margin-top: 10px; max-width: 300px;
}
.curated-author-stats {
  font-size: 12px; color: var(--accent); font-weight: 500;
  margin-top: 10px;
}

/* ── Artwork-style header (user-created collections) ── */
.curated-artwork-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.curated-artwork-title {
  font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.3;
}
.curated-artwork-year {
  font-size: 13px; color: var(--accent); margin-top: 4px; font-weight: 500;
}
.curated-artwork-desc {
  font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.7;
}
.curated-artwork-footer {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-top: 12px; gap: 8px;
}
.curated-artwork-editor {
  font-size: 11px; color: var(--muted); font-style: italic; text-align: right; flex-shrink: 0;
}
.curated-artwork-actions {
  display: flex; flex-direction: column; gap: 8px; margin-top: 16px;
}

/* ── Unified collection detail header ── */
.curated-unified-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.curated-unified-avatar-wrap {
  position: relative;
  width: 72px; height: 72px;
  margin: 0 0 14px;
  display: inline-block;
}
.curated-unified-avatar {
  width: 72px; height: 72px;
  border-radius: 50%; object-fit: cover;
  display: block; border: 2px solid var(--border);
}
.curated-unified-avatar--placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700;
  color: var(--accent); background: var(--surface-alt);
  border: 2px solid var(--accent); box-sizing: border-box;
}
.curated-unified-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.22);
  cursor: pointer; z-index: 2;
}
.curated-unified-title {
  font-size: 20px; font-weight: 700;
  color: var(--ink); line-height: 1.3;
}
.curated-unified-subtitle {
  font-size: 13px; color: var(--accent);
  margin-top: 4px; font-weight: 500;
}
.curated-unified-desc {
  font-size: 12px; color: var(--soft);
  margin-top: 10px; line-height: 1.7;
}
.curated-unified-stats {
  font-size: 12px; color: var(--muted); margin-top: 10px;
}
.curated-owner-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 14px; border-radius: 10px;
  border: 1.5px dashed var(--accent); color: var(--accent);
  background: var(--accent-subtle); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background 0.15s;
}
.curated-owner-btn--pick { border-style: solid; opacity: 0.85; }
.curated-owner-btn--danger { border-color: #D44; color: #D44; background: rgba(204,68,68,0.06); }
.curated-owner-btn--danger:active { background: rgba(204,68,68,0.14); }
.curated-owner-btn:active { opacity: 0.75; }

/* ── Gourmand badge (food cover top-left) ── */
.gourmand-badge {
  position: absolute; top: 5px; left: 5px; z-index: 2;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #fff; font-size: 9px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
  letter-spacing: 0.04em; pointer-events: none; white-space: nowrap;
}
/* ── Food card cover (image or emoji) ── */
.curated-food-cover {
  position: relative; width: 100%; aspect-ratio: 1/1;
  border-radius: 0; overflow: hidden;
  background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
}
.curated-food-cover-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* ── Remove button ── */
.curated-food-remove {
  position: absolute; top: 4px; right: 4px; z-index: 3;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.5); color: #fff;
  border: none; font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transition: opacity 0.15s;
}
.curated-food-card:hover .curated-food-remove,
.curated-food-card:active .curated-food-remove { opacity: 1; }
/* ── Own-food picker list ── */
.curated-picker-list { display: flex; flex-direction: column; gap: 0; }
.curated-picker-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.curated-picker-item:last-child { border-bottom: none; }
.curated-picker-item:hover, .curated-picker-item:active { background: var(--accent-subtle); }
.curated-picker-thumb {
  width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}
.curated-picker-emoji {
  width: 48px; height: 48px; border-radius: 8px;
  background: var(--surface-alt); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.curated-picker-info { flex: 1; min-width: 0; }
.curated-picker-name {
  font-size: 14px; font-weight: 500; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.curated-picker-tags { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Category groups ─── */
.curated-category-group {
  padding: 0 16px; margin-top: 16px;
}
.curated-category-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  padding: 8px 0; margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.curated-category-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.curated-category-count {
  font-weight: 400; color: var(--muted); font-size: 12px;
}

/* ── Food cards grid ─── */
.curated-foods-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px; padding: 8px 0;
}
.curated-food-card {
  display: flex; flex-direction: column;
  padding: 0; background: var(--surface);
  border-radius: 10px; cursor: pointer; overflow: hidden;
  border: 1px solid var(--border);
  transition: all .15s;
}
.curated-food-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.curated-food-emoji { font-size: 22px; }
.curated-food-name {
  font-size: 12px; font-weight: 500; color: var(--ink);
  line-height: 1.3; padding: 6px 8px 2px;
}
.curated-food-zhname {
  font-size: 10px; color: var(--muted);
  padding: 0 8px 6px;
}

/* ── Mobile ─── */
@media (max-width: 768px) {
  .curated-panel {
    width: 100%; top: 0; border-right: none;
    border-radius: 0; z-index: 101;
  }
  .curated-navbar { height: 56px; }
  .curated-foods-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
}

/* ── Record Gourmand button (in curated folders view) ─── */
.curated-record-cta {
  margin: 20px 20px 8px;
  padding: 14px 20px;
  border: 1.5px dashed var(--accent);
  border-radius: 12px;
  background: var(--accent-subtle, rgba(26,58,40,0.03));
  cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  transition: background .15s;
}
.curated-record-cta-icon {
  flex-shrink: 0; color: var(--accent);
}
.curated-record-cta:hover { background: var(--accent-subtle, rgba(26,58,40,0.07)); }
.curated-record-cta-text {
  font-size: 13px; font-weight: 500; color: var(--accent);
  letter-spacing: 0.04em;
}
.curated-record-cta-hint {
  font-size: 10px; color: var(--muted); margin-top: 2px; letter-spacing: 0.03em;
}
.curated-record-cta-arrow {
  font-size: 18px; color: var(--accent); font-weight: 200;
}

/* ── Record Gourmand modal overlay ─── */
/* .record-gourmand-overlay → u-overlay shortcut (RFC-0004) */
.record-gourmand-sheet {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px;
  padding: 24px 24px 40px;
  box-shadow: var(--shadow-md);
  animation: slideUp .22s ease;
}
[data-theme="luxe"] .record-gourmand-sheet,
[data-theme="eastern"] .record-gourmand-sheet,
[data-theme="homebound"] .record-gourmand-sheet {
  background: rgba(0,0,0,0.75);
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.record-gourmand-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--border); margin: 0 auto 20px;
}
.record-gourmand-title {
  font-size: 16px; font-weight: 600; color: var(--ink);
  margin-bottom: 18px; letter-spacing: 0.04em;
}
.record-gourmand-type-row {
  display: flex; gap: 8px; margin-bottom: 18px;
}
.record-gourmand-type-btn {
  flex: 1; padding: 9px 4px; border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface-alt); cursor: pointer;
  font-size: 12px; font-weight: 500; color: var(--muted);
  text-align: center; transition: all .15s;
  letter-spacing: 0.04em;
}
.record-gourmand-type-btn.active {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-subtle, rgba(26,58,40,0.07));
}
.record-gourmand-label {
  font-size: 12px; color: var(--muted); margin-bottom: 6px;
}
.record-gourmand-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-alt);
  color: var(--ink); font-size: 14px;
  outline: none; margin-bottom: 20px;
  font-family: inherit;
  transition: border-color .15s;
}
.record-gourmand-input:focus { border-color: var(--accent); }
/* ── Search results dropdown ─── */
.record-gourmand-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 10;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.record-gourmand-result-item {
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.record-gourmand-result-item:last-child { border-bottom: none; }
.record-gourmand-result-item:hover { background: var(--accent-subtle); }
.record-gourmand-result-title {
  font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.4;
}
.record-gourmand-result-hint {
  font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Wikipedia info preview card ─── */
.record-gourmand-preview {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 12px; padding: 12px;
  background: var(--surface-alt); border-radius: 10px;
  border: 1px solid var(--border);
}
.record-gourmand-preview-thumb {
  width: 52px; height: 72px; object-fit: cover;
  border-radius: 6px; flex-shrink: 0;
}
.record-gourmand-preview-body { flex: 1; min-width: 0; }
.record-gourmand-preview-year {
  font-size: 10px; font-weight: 600; color: var(--accent);
  letter-spacing: 0.08em; margin-bottom: 4px;
}
.record-gourmand-preview-desc {
  font-size: 11px; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Spinner keyframes ─── */
@keyframes spin { to { transform: rotate(360deg); } }

.record-gourmand-submit {
  width: 100%; padding: 13px; border-radius: 10px;
  border: none; background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer;
  letter-spacing: 0.06em;
  transition: opacity .15s;
}
.record-gourmand-submit:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Textarea variant of input (edit modal) ─── */
.record-gourmand-textarea {
  resize: vertical; min-height: 76px; line-height: 1.55;
}

/* ── Edit button on user-created collection cards ─── */
.curated-edit-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--surface-alt);
  color: var(--muted); cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  flex-shrink: 0;
}
.curated-edit-btn:hover {
  color: var(--accent); border-color: var(--accent);
  background: var(--accent-subtle, rgba(26,58,40,0.06));
}

/* ── "ta记录的老饕" badge on profile post cards ─── */
.profile-post-curated-badge {
  position: absolute; top: 0; left: 0;
  background: rgba(0,0,0,0.42);
  color: #fff; font-size: 9px; font-weight: 500;
  padding: 3px 7px 3px 6px;
  border-radius: 0 0 6px 0;
  letter-spacing: 0.03em; line-height: 1.5;
  max-width: 75%; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

/* ── Emoji Picker ──────────────────────────────────────────────────────── */
.emoji-picker {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  width: 100%; max-width: 320px; overflow: hidden;
  margin-top: 6px;
}
.emoji-picker-search {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.emoji-picker-input { flex: 1; font-size: 13px !important; }
.emoji-picker-close {
  background: none; border: none; cursor: pointer;
  font-size: 14px; color: var(--muted); padding: 2px 6px;
}
.emoji-picker-tabs {
  display: flex; border-bottom: 1px solid var(--border);
}
.emoji-picker-tab {
  flex: 1; padding: 8px 0; font-size: 12px; font-weight: 500;
  background: none; border: none; cursor: pointer;
  color: var(--muted); border-bottom: 2px solid transparent;
  transition: all .15s;
}
.emoji-picker-tab.active {
  color: var(--accent); border-bottom-color: var(--accent);
}
.emoji-picker-body {
  max-height: 220px; overflow-y: auto; padding: 6px;
}
.emoji-picker-group { margin-bottom: 6px; }
.emoji-picker-group-label {
  font-size: 10px; color: var(--muted); padding: 4px 4px 2px;
  letter-spacing: 0.06em; font-weight: 500;
}
.emoji-picker-grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
}
.emoji-picker-btn {
  background: none; border: none; cursor: pointer;
  font-size: 20px; padding: 4px; border-radius: 6px;
  transition: background .1s; line-height: 1;
}
.emoji-picker-btn:hover { background: rgba(0,0,0,0.08); }
.emoji-picker-empty {
  text-align: center; padding: 24px; font-size: 12px; color: var(--muted);
}
/* Custom emoji */
.emoji-picker-btn-custom { padding: 2px; }
.emoji-picker-custom-img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }

/* ══════════════════════════════════════════════════════════════════════════
   VisionOS Spatial Computing Overrides
   Translucent floating cards above the globe — astronaut POV
   Variables defined in ../visionos-space.css
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Background Transparency & Frosted Glass ─────────────────────────── */
.header {
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
  border-radius: 0 0 16px 16px;
}
[data-theme="luxe"] .header,
[data-theme="eastern"] .header,
[data-theme="homebound"] .header {
  background: rgba(0,0,0,0.45);
}

/* ── Floating card panels ─────────────────────────────────────────────── */
/* All panels become rounded floating cards with 16px inset from edges   */

.sidebar {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
  border-radius: 20px;
  transform: translateZ(0);
  top: 72px; left: 16px; bottom: 16px;
  overflow: hidden;
}
[data-theme="luxe"] .sidebar,
[data-theme="eastern"] .sidebar,
[data-theme="homebound"] .sidebar {
  background: rgba(0,0,0,0.55);
}

.detail {
  background: rgba(255,255,255,0.63);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
  border-radius: 20px;
  transform: translateZ(0);
  left: 16px; right: 16px; bottom: 16px;
  height: 380px;
  overflow: hidden;
}
[data-theme="luxe"] .detail,
[data-theme="eastern"] .detail,
[data-theme="homebound"] .detail {
  background: rgba(0,0,0,0.63);
}

[data-theme="luxe"] .rec-section-title,
[data-theme="luxe"] .rec-card-name {
  color: #C9A86C !important;
}

[data-theme="eastern"] .rec-card-name,
[data-theme="homebound"] .rec-card-name {
  color: var(--accent) !important;
}

.xhs-panel {
  background: rgba(255,255,255,0.63);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
  border-radius: 20px;
  transform: translateZ(0);
  top: 72px; right: 16px; bottom: 16px;
  overflow: hidden;
}
[data-theme="luxe"] .xhs-panel,
[data-theme="eastern"] .xhs-panel,
[data-theme="homebound"] .xhs-panel {
  background: rgba(0,0,0,0.63);
}

.xhs-navbar {
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: var(--v-glass-border);
}
[data-theme="luxe"] .xhs-navbar,
[data-theme="eastern"] .xhs-navbar,
[data-theme="homebound"] .xhs-navbar {
  background: rgba(0,0,0,0.45);
}

.profile-panel {
  background: rgba(255,255,255,0.60);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
  border-radius: 20px;
  transform: translateZ(0);
  top: 72px; right: 16px; bottom: 16px;
  overflow: hidden;
}
[data-theme="luxe"] .profile-panel,
[data-theme="eastern"] .profile-panel,
[data-theme="homebound"] .profile-panel {
  background: rgba(0,0,0,0.60);
}

.curated-panel {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
  border-radius: 20px;
  transform: translateZ(0);
  top: 72px; left: 16px; bottom: 16px;
  overflow: hidden;
}
[data-theme="luxe"] .curated-panel,
[data-theme="eastern"] .curated-panel,
[data-theme="homebound"] .curated-panel {
  background: rgba(0,0,0,0.55);
}

.route-panel {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
  border-radius: 20px;
  transform: translateZ(0);
  top: 72px; right: 16px; bottom: 16px;
  overflow: hidden;
}
[data-theme="luxe"] .route-panel,
[data-theme="eastern"] .route-panel,
[data-theme="homebound"] .route-panel {
  background: rgba(0,0,0,0.55);
}
[data-theme="luxe"] .route-stop-item:hover,
[data-theme="eastern"] .route-stop-item:hover,
[data-theme="homebound"] .route-stop-item:hover {
  background: rgba(255,255,255,0.05);
}
[data-theme="luxe"] .route-mode-btn,
[data-theme="eastern"] .route-mode-btn,
[data-theme="homebound"] .route-mode-btn {
  color: var(--ink);
}
[data-theme="luxe"] .route-mode-btn.active,
[data-theme="eastern"] .route-mode-btn.active,
[data-theme="homebound"] .route-mode-btn.active {
  color: var(--accent);
}
[data-theme="luxe"] .route-stop-btn,
[data-theme="eastern"] .route-stop-btn,
[data-theme="homebound"] .route-stop-btn {
  color: var(--muted);
}
[data-theme="luxe"] .route-close-btn,
[data-theme="eastern"] .route-close-btn,
[data-theme="homebound"] .route-close-btn {
  color: var(--muted);
}
[data-theme="luxe"] .sb-route-btn,
[data-theme="eastern"] .sb-route-btn,
[data-theme="homebound"] .sb-route-btn {
  color: var(--accent);
}
[data-theme="luxe"] .search-suggest,
[data-theme="eastern"] .search-suggest,
[data-theme="homebound"] .search-suggest {
  background: var(--surface-alt, #141414);
}
[data-theme="luxe"] .trip-save-sheet,
[data-theme="eastern"] .trip-save-sheet,
[data-theme="homebound"] .trip-save-sheet {
  background: var(--bg);
}
[data-theme="luxe"] .trip-card,
[data-theme="eastern"] .trip-card,
[data-theme="homebound"] .trip-card {
  background: var(--surface-alt);
}
/* trip detail inherits from xhs-panel, no extra overrides needed */

.modal {
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
  border-radius: 16px;
  transform: translateZ(0);
  overflow: hidden;
}
[data-theme="luxe"] .modal,
[data-theme="eastern"] .modal,
[data-theme="homebound"] .modal {
  background: rgba(0,0,0,0.70);
}

.avatar-menu {
  background: rgba(255,255,255,1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
  border-radius: 16px;
  transform: translateZ(0);
}
[data-theme="luxe"] .avatar-menu,
[data-theme="eastern"] .avatar-menu,
[data-theme="homebound"] .avatar-menu {
  background: rgba(0,0,0,1);
}

.toast {
  background: var(--v-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
  border-radius: 16px;
  transform: translateZ(0);
}

#globe-tip {
  background: var(--v-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
}

.cat-dropdown {
  background: var(--v-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: var(--v-glass-border);
  box-shadow: var(--v-glass-shadow);
}

/* ── 2. Text Legibility ─────────────────────────────────────────────────── */
.header, .sidebar, .detail, .xhs-panel,
.modal, .avatar-menu, .toast, #globe-tip {
  color: var(--v-ink);
}

.h-title, .sb-name, .detail-name, .modal-head-title,
.xhs-food-name, .xhs-navbar-title, .xhs-back, .xhs-nav-btn, .fl {
  color: var(--v-ink);
}

.h-title em, .sb-head-title, .sb-loc, .sb-cat, .sb-creator,
.sb-likes, .detail-en, .detail-meta, .detail-creator,
.avatar-menu-item, .xhs-food-en, .xhs-meta, .xhs-author-time,
.d-tab, .placeholder, .lightbox-counter,
.icon-btn, .btn, .lang-toggle, .toast-icon {
  color: var(--v-soft);
}

/* ── 3. Interactive States — Spatial Depth ──────────────────────────────── */
.sb-item:hover, .avatar-menu-item:hover, .icon-btn:hover,
.btn:hover, .lang-toggle:hover, .emoji-picker-btn:hover,
.rest-item:hover, .cat-dropdown-item:hover, .xhs-nav-btn:hover {
  background: var(--v-hover);
}

.sb-item.active, .d-tab.active, .lang-toggle.active {
  background: var(--v-active);
}

/* ── 4. Form & Sub-element Overrides ────────────────────────────────────── */
.sb-search {
  background: var(--v-input-bg);
  border-color: var(--v-input-border);
  color: var(--v-ink);
}
.sb-search::placeholder { color: var(--v-placeholder); }

.fi, .fta, .fsel {
  background: var(--v-input-bg);
  border-color: var(--v-input-border);
  color: var(--v-ink);
}

.xhs-notes-ta {
  background: var(--v-input-bg);
  border-color: var(--v-input-border);
  color: var(--v-ink);
}

.sb-head          { border-bottom-color: var(--v-rule); }
.detail-tabs      { border-bottom-color: var(--v-rule); }
.modal-tabs       { border-bottom-color: var(--v-rule); }
.modal-foot       { border-top-color:    var(--v-rule); }

.rest-item {
  background: rgba(255,255,255,0.04);
  border-color: var(--v-rule);
}

.btn {
  border-color: var(--v-btn-border);
  color: var(--v-ink);
}
.btn:hover {
  border-color: var(--v-btn-hover);
  color: var(--v-ink);
}

/* ── 5. Mobile VisionOS ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .modal { border-radius: 16px 16px 0 0; }
}

/* ── River popup (Pinterest-style card) ─────────────────────────────────── */
.river-popup .maplibregl-popup-content {
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}
.river-popup .maplibregl-popup-close-button {
  font-size: 16px;
  color: #bbb;
  padding: 6px 10px;
  right: 2px;
  top: 2px;
}
.river-popup .maplibregl-popup-close-button:hover {
  color: #666;
  background: none;
}
.river-popup .maplibregl-popup-tip {
  border-top-color: #fff;
}
.railway-popup .maplibregl-popup-content {
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  padding: 0; overflow: hidden; border: 1px solid rgba(0,0,0,0.06);
}
.railway-popup .maplibregl-popup-close-button {
  font-size: 16px; color: #bbb; padding: 6px 10px; right: 2px; top: 2px;
}
.railway-popup .maplibregl-popup-close-button:hover { color: #666; background: none; }
.railway-popup .maplibregl-popup-tip { border-top-color: #fff; }

/* ── Tutorial ───────────────────────────────────────────────────────────── */
.tutorial-overlay { position: fixed; inset: 0; z-index: 9998; }
@keyframes tutorialFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.tutorial-btn {
  border: none; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 600; border-radius: 20px;
  padding: 7px 18px; transition: opacity 0.15s;
}
.tutorial-btn:hover { opacity: 0.85; }
.tutorial-btn-skip { background: none; color: #999; }
.tutorial-btn-next { background: var(--accent, #34C759); color: #fff; }

/* ── Profile header banner background ─────────────────────────────────
 * The banner image is NOT a separate block above the profile info — it
 * sits as a full-bleed background behind the avatar/username/stats,
 * fading from fully-visible at the top to the solid theme color near
 * the bottom so the text remains readable and the header flows into
 * the rest of the panel without a hard seam. */
.profile-header--with-banner {
  position: relative;
  /* Give the banner enough vertical room while keeping the avatar
     roughly where it was (padding-top pushes the content down so the
     photo has breathing room above). */
  padding-top: 150px;
  border-bottom: none;
  overflow: hidden;
  /* Remove the old solid background — the gradient fade provides it. */
  background: transparent;
}
.profile-header-bg {
  position: absolute; inset: 0;
  z-index: 0; pointer-events: none;
}
.profile-header-bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
/* Gradient overlay fades from transparent (top, full photo) to the
   header's theme background color (bottom, clean surface for text).
   Uses var(--glass-heavy) to match the normal header background. */
.profile-header-bg-fade {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 32%,
    var(--glass-heavy) 78%,
    var(--glass-heavy) 100%
  );
}
/* Every direct child of the header needs to sit above the background. */
.profile-header--with-banner > *:not(.profile-header-bg) {
  position: relative;
  z-index: 1;
}

/* Camera "change cover" button — anchors to the top-right of the banner
 * area so it doesn't collide with the avatar that now sits in the middle. */
.profile-header--with-banner .profile-banner-edit {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.45); color: #fff;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: none; cursor: pointer;
  z-index: 2;
  transition: background 0.15s;
}
.profile-header--with-banner .profile-banner-edit:hover {
  background: rgba(0,0,0,0.6);
}
/* Without a banner, the camera button falls back to the same place but
 * with a solid theme tint so it's still visible against the flat header. */
.profile-header:not(.profile-header--with-banner) .profile-banner-edit {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-alt, rgba(0,0,0,0.08));
  color: var(--muted); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}

/* ── EJ Messages Panel ───────────────────────────────────────────────────── */
.ej-messages-panel { /* extends .xhs-panel */ }
.ej-msg-categories {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 16px 16px 12px;
}

/* ── Feature updates section (mirrors mobile .msg-update-card) ───────── */
.ej-msg-section-title {
  padding: 16px 16px 8px;
  font-size: 10px; font-weight: 600;
  color: var(--muted, #999);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ej-msg-update-card {
  margin: 0 16px 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #eee);
  border-radius: 12px;
  overflow: hidden;
}
.ej-msg-update-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; cursor: pointer;
  transition: background 0.15s;
}
.ej-msg-update-header:hover { background: var(--surface-alt, #f9f9f9); }
.ej-msg-update-info { flex: 1; min-width: 0; }
.ej-msg-update-title {
  font-size: 14px; font-weight: 700;
  color: var(--ink, #1a1a1a);
  margin-bottom: 3px;
}
.ej-msg-update-summary {
  font-size: 12px; color: var(--soft, #666);
  line-height: 1.4;
}
.ej-msg-update-date {
  font-size: 11px; color: var(--muted, #999);
  white-space: nowrap;
}
.ej-msg-update-arrow {
  font-size: 12px; color: var(--muted, #999);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.ej-msg-update-arrow.open { transform: rotate(180deg); }
.ej-msg-update-body {
  padding: 14px 16px 16px;
  font-size: 12px; color: var(--soft, #666);
  line-height: 1.8;
  white-space: pre-line;
  border-top: 1px solid var(--border, #eee);
}
.ej-msg-cat-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--surface-alt, #f9f9f9); border: none; border-radius: 10px;
  padding: 12px 8px; cursor: pointer; transition: background 0.15s;
}
.ej-msg-cat-btn:hover { background: var(--border, #eee); }
.ej-msg-cat-icon { position: relative; }
.ej-msg-badge {
  position: absolute; top: -4px; right: -6px;
  min-width: 14px; height: 14px; border-radius: 7px;
  background: #e53e3e; color: #fff; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.ej-msg-cat-label { font-size: 11px; color: var(--ink); }
.ej-msg-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border, #eee);
  cursor: pointer;
}
.ej-msg-item:hover { background: var(--surface-alt, #f9f9f9); }
.ej-msg-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ej-msg-avatar-ph {
  width: 36px; height: 36px; border-radius: 50%; background: var(--border, #eee);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: var(--muted, #999); flex-shrink: 0;
}
.ej-msg-body { flex: 1; min-width: 0; }
.ej-msg-text { font-size: 13px; color: var(--ink); line-height: 1.4; }
.ej-msg-time { font-size: 11px; color: var(--muted, #999); margin-top: 2px; }
.ej-msg-accept-btn {
  margin-top: 6px; padding: 4px 12px; border: none; border-radius: 6px;
  background: var(--accent, #34C759); color: #fff; font-size: 12px;
  font-weight: 600; cursor: pointer;
}
.ej-msg-accept-btn:hover { opacity: 0.85; }
.ej-msg-empty { padding: 40px 16px; text-align: center; color: var(--muted, #999); font-size: 14px; }

/* ── 24h sky gradient transition ── */
body.ej-sky-mode { transition: background-color 90s linear; }
html.ej-sky-mode { transition: background-color 90s linear; }

/* ── Tidal breathing (background color pulse only) ── */
@keyframes ej-breathe {
  0%, 100% { --bg-dim: 0%; }
  50%       { --bg-dim: 8%; }
}

/* ── Theme picker — 昼星夜月 row ── */
.theme-picker-item--auto { grid-column: 1 / -1; width: 100%; }
.theme-picker-auto-label {
  display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0;
}
.theme-picker-auto-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.theme-picker-auto-desc {
  font-size: 9px; opacity: 0.42; letter-spacing: 0.01em; text-align: left;
}
.theme-picker-clock {
  font-size: 12px; font-variant-numeric: tabular-nums;
  opacity: 0.7; letter-spacing: 0.04em; white-space: nowrap; flex-shrink: 0;
}
.theme-picker-divider {
  grid-column: 1 / -1;
  height: 1px; background: var(--border, rgba(0,0,0,0.07)); margin: 2px 8px 4px;
}

/* ── Taste Profile ─────────────────────────────────────────────────────── */
/* ── Food visibility selector ─────────────────────────────────────────── */
.food-visibility-group { display: flex; gap: 6px; margin-top: 6px; }
.food-visibility-btn {
  flex: 1; padding: 8px 4px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface, #fff);
  color: var(--ink); font-size: 12px; cursor: pointer; text-align: center;
  font-family: inherit; transition: all 0.15s;
}
.food-visibility-btn.active {
  border-color: var(--accent); background: var(--accent-subtle);
  color: var(--accent); font-weight: 600;
}

.taste-section { padding-bottom: 24px; }
.taste-empty { text-align: center; padding: 48px 16px; color: var(--muted); font-size: 13px; }

/* ── Identity Card ── */
.taste-card {
  margin: 12px 12px 8px; padding: 20px 16px 14px; border-radius: 20px;
  background: var(--glass-heavy, rgba(255,255,255,0.85));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.taste-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.taste-card-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--accent-subtle); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: var(--accent); }
.taste-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.taste-card-identity { flex: 1; min-width: 0; }
.taste-card-name { font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.taste-card-personality { font-size: 13px; color: var(--accent); font-weight: 600; margin-top: 1px; }
.taste-card-personality-emoji { font-size: 14px; }

.taste-card-tagline { font-size: 12px; color: var(--muted); text-align: center; padding: 6px 0 12px; letter-spacing: 0.3px; line-height: 1.5; }

.taste-card-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.taste-card-stat { text-align: center; padding: 8px 2px; background: var(--accent-subtle); border-radius: 10px; }
.taste-card-stat-v { font-size: 18px; font-weight: 700; color: var(--ink); }
.taste-card-stat-l { font-size: 10px; color: var(--muted); margin-top: 1px; letter-spacing: 0.3px; }

.taste-card-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.taste-card-chart-col { display: flex; flex-direction: column; align-items: center; }
.taste-card-chart-title { font-size: 11px; font-weight: 600; color: var(--ink); letter-spacing: 0.3px; margin-bottom: 4px; }

.taste-radar-svg { width: 140px; height: 140px; }
.taste-donut-svg-sm { width: 110px; height: 110px; }
.taste-card-donut-labels { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 4px; }
.taste-card-donut-label { font-size: 10px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; }

.taste-card-map-wrap { margin-bottom: 10px; text-align: center; }

.taste-card-brand { text-align: center; font-size: 11px; color: var(--muted); letter-spacing: 0.5px; padding-top: 8px; border-top: 1px solid var(--border); opacity: 0.7; }

/* ── Detail sections below card ── */
.taste-heading { font-size: 13px; font-weight: 600; color: var(--ink); padding: 16px 16px 8px; letter-spacing: 0.3px; }

.taste-donut-legend { margin-top: 12px; }
.taste-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink); padding: 3px 0; }
.taste-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.taste-legend-pct { color: var(--muted); font-size: 11px; margin-left: auto; padding-left: 8px; }

.taste-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 16px; justify-content: center; }
.taste-tag { display: inline-block; padding: 4px 10px; border-radius: 12px; font-weight: 500; background: var(--accent-subtle); color: var(--accent); white-space: nowrap; }

.taste-geo-list { padding: 0 16px 16px; }
.taste-geo-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; color: var(--ink); }
.taste-geo-name { min-width: 80px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.taste-geo-bar { height: 6px; border-radius: 3px; background: var(--accent); opacity: 0.6; min-width: 4px; }
.taste-geo-count { color: var(--muted); font-size: 11px; flex-shrink: 0; }

/* ── Restaurant Sheet ──────────────────────────────────────────────────── */
/* .restaurant-sheet-overlay → u-overlay shortcut (RFC-0004) */
.restaurant-sheet {
  width: 100%; max-width: 500px; max-height: 70vh;
  background: var(--glass-heavy); border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.restaurant-sheet-header {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.restaurant-sheet-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.restaurant-sheet-count { font-size: 12px; color: var(--muted); }
.restaurant-sheet-close {
  margin-left: auto; background: none; border: none; font-size: 16px;
  color: var(--muted); cursor: pointer; padding: 4px 8px;
}
.restaurant-sheet-list { overflow-y: auto; padding: 8px 12px 20px; }
.restaurant-sheet-card {
  display: flex; gap: 12px; padding: 10px 8px;
  border-radius: 12px; cursor: pointer; transition: background 0.15s;
}
.restaurant-sheet-card:hover { background: var(--glass-light); }
.restaurant-sheet-card-img {
  width: 56px; height: 56px; border-radius: 10px; overflow: hidden; flex-shrink: 0;
}
.restaurant-sheet-card-img img { width: 100%; height: 100%; object-fit: cover; }
.restaurant-sheet-card-emoji {
  width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; background: var(--accent-subtle);
}
.restaurant-sheet-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.restaurant-sheet-card-name {
  font-size: 14px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.restaurant-sheet-card-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 12px; color: var(--muted);
}
.restaurant-sheet-card-avatar { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.restaurant-sheet-card-avatar-placeholder {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; color: #fff; background: var(--accent);
}
.restaurant-sheet-card-tags { color: var(--accent); font-size: 11px; }

/* ── Rating star badge (overlay on card covers) ── */
.rating-star-badge {
  position: absolute;
  bottom: 7px; left: 7px;
  background: rgba(0,0,0,0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 11px; line-height: 1.5;
  color: #fff;
  pointer-events: none;
  z-index: 3;
  letter-spacing: 1px;
}
.rating-stars-icon svg {
  filter: drop-shadow(0 0 2.5px rgba(245,197,24,0.6));
}

/* ── Rating tab in modal ── */
.rating-step-summary {
  text-align: center;
  padding: 18px 16px 14px;
  background: var(--bg, #f5f5f5);
  border-radius: 14px;
  margin-bottom: 4px;
}
.rating-step-stars { font-size: 22px; letter-spacing: 3px; min-height: 30px; }
.rating-step-avg {
  font-size: 32px; font-weight: 700; color: var(--ink, #1a1a1a);
  line-height: 1.1; margin-top: 2px;
}
.rating-step-avg--unset { font-size: 15px; font-weight: 400; color: var(--muted, #999); }
.rating-step-avg-label { font-size: 11px; color: var(--muted, #999); margin-top: 4px; }
.rating-dim-row {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 14px;
  background: var(--bg, #f5f5f5);
  border-radius: 12px;
}
.rating-dim-labels { display: flex; justify-content: space-between; align-items: flex-start; }
.rating-dim-name { font-size: 13px; font-weight: 600; color: var(--ink, #1a1a1a); }
.rating-dim-desc { font-size: 10px; color: var(--muted, #999); margin-top: 2px; }
.rating-dim-val {
  font-size: 16px; font-weight: 700; color: var(--accent, #E8A838);
  min-width: 34px; text-align: right; line-height: 1; padding-top: 1px;
}
.rating-dim-val.unset { font-size: 12px; font-weight: 400; color: var(--muted, #999); }
.rating-dim-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px;
  background: var(--border, #ddd); outline: none; cursor: pointer; margin: 4px 0 0;
}
.rating-dim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent, #E8A838); cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25); border: 2px solid #fff;
}
.rating-dim-slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent, #E8A838); cursor: pointer;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* ── Rating section in detail panel ── */
.detail-rating {
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--border, #e8e8e8);
  margin-bottom: 14px;
}
.detail-rating--unrated { padding: 8px 0 14px; }
.detail-rating-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.detail-rating-stars { font-size: 18px; letter-spacing: 2px; }
.detail-rating-avg { font-size: 24px; font-weight: 700; color: var(--ink, #1a1a1a); line-height: 1; }
.detail-rating-label { font-size: 12px; color: var(--muted, #999); }
/* Revisit decision pill — inline to the right of the 综合评分 label. Mirrors
   the mobile /app chip: a small rounded pill colour-coded by decision
   (e.g. 会再来 green, 不会再来 red). */
.detail-revisit-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.detail-revisit-chip--will  { background: rgba(52, 199, 89, 0.14); color: #2a8c44; border-color: rgba(52, 199, 89, 0.30); }
.detail-revisit-chip--maybe { background: var(--surface-alt); color: var(--ink); border-color: var(--border); }
.detail-revisit-chip--once  { background: rgba(140, 120, 90, 0.12); color: #7a5e3a; border-color: rgba(140, 120, 90, 0.30); }
.detail-revisit-chip--no    { background: rgba(220, 80, 70, 0.10); color: #b14a3e; border-color: rgba(220, 80, 70, 0.30); }
[data-theme="luxe"] .detail-revisit-chip--will  { color: #6fd587; }
[data-theme="luxe"] .detail-revisit-chip--once  { color: #d3b07a; }
[data-theme="luxe"] .detail-revisit-chip--no    { color: #e58375; }
.detail-rating-dim { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.detail-rating-dim:last-child { margin-bottom: 0; }
.detail-rating-dim-name { font-size: 11px; color: var(--muted, #999); width: 64px; flex-shrink: 0; line-height: 1.3; }
.detail-rating-dim-bar { flex: 1; height: 4px; background: var(--border, #e0e0e0); border-radius: 2px; overflow: hidden; }
.detail-rating-dim-fill { height: 100%; background: var(--accent, #E8A838); border-radius: 2px; transition: width 0.35s ease; }
.detail-rating-dim-val { font-size: 12px; font-weight: 600; color: var(--ink, #1a1a1a); min-width: 28px; text-align: right; }
.detail-rating-unrated-text { font-size: 13px; color: var(--muted, #999); }
.detail-rating-add-btn {
  font-size: 13px; font-weight: 500; color: var(--accent, #E8A838);
  background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
}
.detail-rating-add-btn:active { opacity: 0.7; }

/* ── Account Settings Screen (EJ) — lives inside .xhs-panel glass card ── */
.settings-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--v-glass-border, rgba(0,0,0,0.08));
  background: transparent;
  flex-shrink: 0; min-height: 52px;
}
.settings-header-title { font-size: 1rem; font-weight: 600; color: var(--ink, var(--text)); }
.settings-back-btn {
  background: none; border: none; cursor: pointer;
  padding: 4px 10px 4px 0; color: var(--v-accent, var(--accent));
  display: flex; align-items: center; flex-shrink: 0;
}
.settings-back-btn:hover { opacity: 0.75; }
.settings-nav {
  width: 80px; flex-shrink: 0; overflow-y: auto;
  border-right: 1px solid var(--v-glass-border, rgba(0,0,0,0.08));
  padding: 16px 0;
  background: transparent;
}
.settings-nav-item {
  padding: 12px 4px; font-size: 11px; line-height: 1.3;
  color: var(--v-muted, var(--muted)); cursor: pointer; text-align: center;
  border-left: 2.5px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  word-break: break-all;
}
.settings-nav-item:hover { color: var(--ink, var(--text)); background: rgba(0,0,0,0.03); }
.settings-nav-item.active {
  color: var(--v-accent, var(--accent)); border-left-color: var(--v-accent, var(--accent));
  font-weight: 600; background: rgba(0,0,0,0.03);
}
.settings-content {
  flex: 1; overflow-y: auto; padding: 0 20px 60px;
}
.settings-section-title {
  margin-top: 24px; margin-bottom: 8px;
  font-size: 10.5px; font-weight: 600; color: var(--v-muted, var(--muted));
  text-transform: uppercase; letter-spacing: 0.08em; padding-left: 2px;
}
/* RFC-0007 follow-up: read-only build version + time footer. */
.settings-version {
  margin-top: 22px;
  text-align: center;
  font-size: 11px; color: var(--v-muted, var(--muted));
  letter-spacing: 0.02em; opacity: 0.75;
}
.settings-card {
  background: var(--v-surface, var(--surface, rgba(0,0,0,0.04)));
  border-radius: 12px; overflow: hidden;
}
.settings-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px; cursor: default;
}
.settings-row--border { border-bottom: 1px solid var(--v-glass-border, rgba(0,0,0,0.06)); }
.settings-row--tappable { cursor: pointer; }
.settings-row--tappable:hover { background: rgba(0,0,0,0.03); }
.settings-row--tappable:active { opacity: 0.6; }
.settings-row-label { font-size: 0.875rem; color: var(--ink, var(--text)); }
.settings-row-label--danger { color: #e53935; }
.settings-row-value { font-size: 0.875rem; font-weight: 500; color: var(--ink, var(--text)); }
.settings-row-muted { font-size: 0.8rem; color: var(--v-muted, var(--muted)); }
.settings-row-arrow { color: var(--v-muted, var(--muted)); font-size: 1rem; margin-left: 4px; }
.settings-row-trailing { display: flex; align-items: center; gap: 4px; }
.settings-row-btn-accent {
  background: none; border: none; cursor: pointer;
  font-size: 0.8rem; color: var(--v-accent, var(--accent)); padding: 0;
}
.settings-row-btn-accent:hover { text-decoration: underline; }
