/* ══════════════════════════════════════════
   Edison 华人家庭生活指南 · 主样式表
   styles.css
   ══════════════════════════════════════════ */

/* ── CSS 变量 ── */
:root {
  --sage: #7B9E87;
  --sage-light: #EAF0EB;
  --sage-dark: #4A6B56;
  --warm: #C4956A;
  --warm-light: #F5EDE3;
  --cream: #FAF7F2;
  --ink: #1C1C1C;
  --ink-light: #5A5A5A;
  --ink-muted: #9A9A9A;
  --white: #FFFFFF;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 2px 20px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
}

/* ── Reset ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Body ── */
body {
  font-family: 'DM Sans', 'PingFang SC', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
}

/* ════════════════════════════════════════
   HEADER
   ════════════════════════════════════════ */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  width: 32px; height: 32px;
  background: var(--sage);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.logo-text {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.location-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-muted);
  background: var(--cream);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.location-dot {
  width: 6px; height: 6px;
  background: var(--sage);
  border-radius: 50%;
}

/* ════════════════════════════════════════
   HERO
   ════════════════════════════════════════ */
.hero {
  background: var(--white);
  padding: 28px 20px 24px;
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-greeting {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.hero-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 18px;
  line-height: 1.3;
}
.hero-title em {
  font-style: normal;
  color: var(--sage-dark);
}

/* ════════════════════════════════════════
   NAV TABS
   ════════════════════════════════════════ */
.nav-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--cream);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-light);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', 'PingFang SC', sans-serif;
  white-space: nowrap;
}
.tab-btn.active {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--white);
}
.tab-btn:hover:not(.active) {
  border-color: var(--sage);
  color: var(--sage-dark);
}

/* ════════════════════════════════════════
   QUICK SCENE ACTIONS
   ════════════════════════════════════════ */
.scene-section {
  background: linear-gradient(to bottom, var(--white), var(--cream));
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}
.scene-inner {
  max-width: 720px;
  margin: 0 auto;
}
.scene-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}
.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 400px) {
  .scene-grid { grid-template-columns: repeat(2, 1fr); }
}
.scene-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.scene-card:hover {
  border-color: var(--sage);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.scene-icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}
.scene-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}
.scene-hint {
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* ════════════════════════════════════════
   MAIN / SECTIONS
   ════════════════════════════════════════ */
.main { max-width: 720px; margin: 0 auto; padding: 20px; }

.section { display: none; }
.section.active { display: block; }

/* ════════════════════════════════════════
   TOP3 BANNER
   ════════════════════════════════════════ */
.top3-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.top3-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm);
  background: var(--warm-light);
  padding: 3px 10px;
  border-radius: 20px;
}
.top3-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.top3-subtitle {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 14px;
  margin-left: 2px;
}

/* ── Compact Top3 Strip ── */
.top3-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 16px;
  margin-bottom: 4px;
}
.top3-strip::-webkit-scrollbar { display: none; }
.top3-strip-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
.top3-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}
.top3-pill:hover {
  border-color: var(--sage);
  color: var(--sage-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.top3-pill-tag {
  font-size: 10px;
  color: var(--ink-muted);
  font-weight: 400;
}

/* ════════════════════════════════════════
   CARDS
   ════════════════════════════════════════ */
.card-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }

.card-rank {
  position: absolute;
  top: 14px; right: 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--warm);
  background: var(--warm-light);
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.5;
}
.card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  padding-right: 30px;
}
.card-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.card-note {
  font-size: 12px;
  color: var(--ink-light);
  line-height: 1.6;
  margin-bottom: 12px;
  border-left: 2px solid var(--sage-light);
  padding-left: 10px;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  margin-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.card-addr {
  font-size: 11px;
  color: var(--ink-muted);
  flex: 1;
}
.map-btn, .web-btn {
  font-size: 11px;
  color: var(--sage-dark);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  margin-left: 10px;
}
.map-btn:hover, .web-btn:hover { color: var(--sage); }

.card-phone {
  font-size: 12px;
  color: var(--ink-light);
  margin-top: 8px;
}
.phone-label { color: var(--ink-muted); }
.phone-num {
  color: var(--sage-dark);
  text-decoration: none;
  font-weight: 600;
}
.phone-num:hover { color: var(--sage); }

/* Explore more CTA */
.card-explore {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.explore-link {
  font-size: 12px;
  color: var(--sage-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: color 0.2s;
}
.explore-link:hover { color: var(--sage); }
.explore-arrow { font-size: 10px; }

/* ════════════════════════════════════════
   TAGS
   ════════════════════════════════════════ */
.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 500;
  white-space: nowrap;
}
.tag-green   { background: #E8F5E9; color: #2E7D32; }
.tag-warm    { background: var(--warm-light); color: #8B5E3C; }
.tag-blue    { background: #E3F2FD; color: #1976D2; }
.tag-gray    { background: #F5F5F5; color: #616161; }
.tag-avoid   { background: #FFEBEE; color: #C62828; }
.tag-free    { background: #E8F5E9; color: #2E7D32; }
.tag-paid    { background: #FFF3E0; color: #E65100; }
.tag-nature  { background: #E8F5E9; color: #2E7D32; }
/* Context tags for Top3 */
.tag-age      { background: #F3E5F5; color: #7B1FA2; }
.tag-price    { background: #E8F5E9; color: #388E3C; }
.tag-distance { background: #E1F5FE; color: #0277BD; }

/* ════════════════════════════════════════
   FILTER ROW
   ════════════════════════════════════════ */
.filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 12px 0;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-light);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-chip.on {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--white);
}
.filter-chip:hover:not(.on) {
  border-color: var(--sage);
  color: var(--sage-dark);
}

/* ════════════════════════════════════════
   LIST HEADERS
   ════════════════════════════════════════ */
.list-header {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 28px 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--sage-light);
}

/* Sub-category badge (inline) */
.sub-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  margin-top: 4px;
}
.sub-badge-sage  { background: var(--sage-light);  color: var(--sage-dark); }
.sub-badge-blue  { background: #E3F2FD;             color: #1565C0; }
.sub-badge-purple{ background: #F3E5F5;             color: #6A1B9A; }
.sub-badge-yellow{ background: #FFF8E1;             color: #F57F17; border: 1px solid #FFE082; }
.sub-badge-pink  { background: #FCE4EC;             color: #880E4F; border: 1px solid #F48FB1; }

/* ════════════════════════════════════════
   AVOID CARDS
   ════════════════════════════════════════ */
.avoid-card {
  background: #FFF3E0;
  border: 1.5px solid #FFB74D;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.avoid-name {
  font-size: 14px;
  font-weight: 600;
  color: #E65100;
  margin-bottom: 6px;
}
.avoid-reason {
  font-size: 12px;
  color: #5D4037;
  line-height: 1.6;
}

/* ════════════════════════════════════════
   PLAY BLOCKS
   ════════════════════════════════════════ */
.play-block { margin-bottom: 32px; }
.play-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.play-icon { font-size: 24px; }
.play-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

/* ════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════ */
.site-footer {
  text-align: center;
  padding: 24px 20px 40px;
  font-size: 11px;
  color: #aaa;
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: 20px;
}
.site-footer .disclaimer {
  color: #bbb;
  font-size: 10.5px;
  margin-top: 8px;
}

/* ════════════════════════════════════════
   CHECKLIST
   ════════════════════════════════════════ */
.checklist-group {
  margin-bottom: 14px;
}
.checklist-group:last-of-type {
  margin-bottom: 8px;
}
.group-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.item-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.check-item:hover {
  border-color: var(--sage);
  background: var(--sage-light);
}
.check-item.checked {
  background: var(--sage-light);
  border-color: var(--sage);
  color: var(--sage-dark);
}
.check-box {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border: 1.5px solid var(--ink-muted);
  border-radius: 3px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: transparent;
}
.check-item.checked .check-box {
  background: var(--sage);
  border-color: var(--sage);
  color: white;
}
.check-item.checked .check-box::after {
  content: '✓';
}
.check-item.warn-item {
  background: #FFF8E1;
  border-color: #FFD54F;
  color: #E65100;
}
.check-item.warn-item .check-box {
  border-color: #FFB300;
}

/* ════════════════════════════════════════
   SAVE/FAVORITE BUTTON
   ════════════════════════════════════════ */
.save-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  transition: all 0.2s;
  font-weight: 500;
  margin-top: 8px;
  user-select: none;
}

.save-btn:hover {
  border-color: var(--sage);
  color: var(--sage-dark);
  background: var(--sage-light);
}

.save-btn.saved {
  color: #e74c3c;
  border-color: rgba(231, 76, 60, 0.3);
  background: rgba(231, 76, 60, 0.05);
  font-weight: 600;
}

.save-btn.saved:hover {
  border-color: rgba(231, 76, 60, 0.5);
  background: rgba(231, 76, 60, 0.1);
}
