/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green-main:    #3A8C45;
  --green-dark:    #2A6A32;
  --green-light:   #E8F0DC;
  --green-xlight:  #F2F5E8;
  --cream:         #FAF8F0;
  --text-main:     #1A2010;
  --text-sub:      #7A8C6A;
  --warn-bg:       #FFF8EE;
  --tab-height:    64px;
}

html, body {
  height: 100%;
  background-color: var(--cream);
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* ===== App Shell ===== */
#app {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background-color: var(--cream);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.06);
}

/* ===== Pages ===== */
.page {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--tab-height);
  min-height: 100vh;
}

.page.active {
  display: flex;
}

/* ===== Page Header (Tab2/3/4) ===== */
.page-header {
  background-color: var(--green-xlight);
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--green-light);
}

.logo-title {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--green-dark);
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.logo-sub {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 3px;
  font-weight: 400;
}

/* ===== Placeholder Content ===== */
.placeholder-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 12px;
}
.placeholder-icon { font-size: 52px; line-height: 1; margin-bottom: 4px; }
.placeholder-title { font-family: 'Noto Sans SC', sans-serif; font-size: 26px; font-weight: 700; color: var(--green-dark); }
.placeholder-desc  { font-family: 'Noto Sans SC', sans-serif; font-size: 15px; color: var(--text-sub); }

/* ===== Tab1: Hero ===== */
.order-hero {
  background-color: var(--green-main);
  padding: 28px 20px 14px;
  flex-shrink: 0;
}

.order-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.header-left { flex: 1; min-width: 0; }

/* Logo内联：BiteLink · 点餐不慌 */
.logo-inline {
  display: flex;
  align-items: baseline;
  gap: 0;
  flex-wrap: nowrap;
}
.order-hero .logo-title { color: #fff; font-size: 26px; }
.logo-sep {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: rgba(255,255,255,0.45);
  margin: 0 3px;
  line-height: 1;
}
.logo-cn {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  font-weight: 400;
  white-space: nowrap;
  line-height: 1;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.header-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: var(--green-light);
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, transform 0.1s;
}

.hero-btn { background-color: rgba(255,255,255,0.22) !important; }
.hero-btn:active { background-color: rgba(255,255,255,0.38) !important; transform: scale(0.93); }

.hero-subtitle {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 4px;
}

.hero-title {
  font-family: 'DM Serif Display', serif;
  font-size: 21px;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 16px;
}

/* ===== Search Box ===== */
.hero-search {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 10px 10px 10px 14px;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.search-icon {
  font-size: 16px;
  flex-shrink: 0;
  opacity: 0.5;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  color: var(--text-main);
  background: transparent;
  min-width: 0;
}
.search-input::placeholder { color: var(--text-sub); }

.search-badge {
  background-color: var(--green-light);
  color: var(--green-dark);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 9px;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s;
  white-space: nowrap;
}
.search-badge:active { background-color: #c8ddb0; }

/* Hero Chips */
.hero-chips-label {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  text-align: center;
  margin: 10px 0 6px;
}
.hero-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hero-chips::-webkit-scrollbar { display: none; }
.hero-chip {
  flex-shrink: 0;
  background: #fff;
  border: 1.5px solid var(--green-light);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--green-dark);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.hero-chip:active {
  background: var(--green-xlight);
  border-color: var(--green-main);
}

/* Loading state on search badge */
.search-badge.loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== Category Row ===== */
.category-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 12px 14px;
  background: var(--cream);
  border-bottom: 1px solid var(--green-light);
  flex-shrink: 0;
}

.cat-selector {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--green-xlight);
  border: 1.5px solid var(--green-light);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background-color 0.15s;
}
.cat-selector:active { background-color: var(--green-light); border-color: var(--green-main); }

.cat-sel-icon  { font-size: 20px; flex-shrink: 0; line-height: 1; }
.cat-sel-text  { flex: 1; font-family: 'Noto Sans SC', sans-serif; font-size: 13px; font-weight: 500; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-sel-switch { font-family: 'Noto Sans SC', sans-serif; font-size: 12px; color: var(--green-main); font-weight: 600; flex-shrink: 0; }

/* ===== Tip Card ===== */
.tip-card {
  width: 84px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid var(--green-light);
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.tip-card-label   { font-family: 'Noto Sans SC', sans-serif; font-size: 10px; color: var(--text-sub); margin-bottom: 1px; }
.tip-card-context { font-family: 'Noto Sans SC', sans-serif; font-size: 11px; color: var(--text-sub); line-height: 1.3; }
.tip-card-amount  { font-family: 'DM Sans', 'Noto Sans SC', sans-serif; font-size: 13px; font-weight: 700; color: var(--green-dark); line-height: 1.3; }
.tip-card-amount:empty { display: none; }

/* ===== Order Content ===== */
.order-content { flex: 1; }

/* ===== Skeleton Screen ===== */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* ===== Empty State (Tab1 before search) ===== */
.empty-state {
  margin: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.empty-hint {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: var(--text-sub);
  text-align: center;
  margin-bottom: 4px;
}

/* Preset chips */
.preset-chips-section {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--green-light);
  padding: 14px 14px 12px;
  margin-bottom: 4px;
}
.preset-chips-label {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 11px;
  color: var(--text-sub);
  display: block;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.preset-chip {
  background: var(--green-xlight);
  border: 1.5px solid var(--green-light);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  color: var(--green-dark);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.preset-chip:active {
  background: var(--green-light);
  border-color: var(--green-main);
  transform: scale(0.97);
}
.empty-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid var(--green-light);
}
.empty-row-icon {
  font-size: 24px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-xlight);
  border-radius: 12px;
  flex-shrink: 0;
}
.empty-row-info { flex: 1; }
.empty-row-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}
.empty-row-desc {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
}

/* ===== Loading State ===== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 20px;
  gap: 18px;
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--green-light);
  border-top-color: var(--green-main);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-sub);
  letter-spacing: 0.03em;
}

.skeleton-card {
  margin: 12px 14px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.skel-top {
  background: var(--green-main);
  padding: 16px;
  display: flex;
  gap: 12px;
}

.skel-info {
  background: var(--green-xlight);
  padding: 16px;
}

.skel-block {
  background: white;
  padding: 14px 16px;
  border-bottom: 1px solid var(--green-light);
}

.skel {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.1) 25%,
    rgba(255,255,255,0.28) 50%,
    rgba(255,255,255,0.1) 75%
  );
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}

.skel-info .skel,
.skel-block .skel {
  background: linear-gradient(
    90deg,
    var(--green-xlight) 25%,
    var(--green-light) 50%,
    var(--green-xlight) 75%
  );
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite;
}

.skel-img   { width: 60px; height: 60px; border-radius: 12px; flex-shrink: 0; }
.skel-title { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.skel-line  { height: 13px; border-radius: 6px; }
.skel-line.w80 { width: 80%; }
.skel-line.w65 { width: 65%; }
.skel-line.w45 { width: 45%; }
.skel-chip  { height: 28px; width: 72px; border-radius: 20px; }

/* ===== Result Card ===== */
.result-card {
  margin: 12px 14px 20px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

/* Translation delay bar */
.trans-delay-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #FFF3CD;
  color: #856404;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  padding: 7px 16px;
  text-align: center;
  border-bottom: 1px solid #FFECB5;
}

/* ① Card Top */
.card-top {
  background: var(--green-main);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.card-img-wrap {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.18);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img { width: 100%; height: 100%; object-fit: cover; }
.card-img-placeholder { font-size: 28px; line-height: 1; }

.card-title-area { flex: 1; min-width: 0; }

.card-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.card-name-en {
  font-family: 'DM Serif Display', serif;
  font-size: 19px;
  color: #fff;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}

.card-name-cn {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 5px;
}

.card-phonetic {
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
}

.card-rest-types {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.rest-type-tag {
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}

/* ② ③ ④ Info Area */
.card-info {
  background: var(--green-xlight);
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--green-light);
}

.card-section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.card-description {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.65;
}

.ingredients-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 0 6px;
  scrollbar-width: none;
}
.ingredients-scroll::-webkit-scrollbar { display: none; }

.ingredient-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border-radius: 20px;
  padding: 5px 10px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: var(--text-main);
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.06);
}

.nutrition-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.nutrition-tag {
  background: #FFF0D8;
  color: #8B5E00;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
}

/* ⑤ ⑥ Card Blocks */
.card-block {
  background: #fff;
  padding: 14px 16px;
  border-bottom: 1px solid var(--green-light);
}
.card-block:last-child { border-bottom: none; }

.block-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

/* Dialog Items */
.dialog-item {
  margin-bottom: 13px;
}
.dialog-item:last-child { margin-bottom: 0; }

.dialog-context {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.dialog-en-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.dialog-en {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  flex: 1;
  line-height: 1.4;
}

.dialog-cn {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
  cursor: pointer;
  transition: filter 0.25s ease;
}

/* Speak Button */
.speak-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-xlight);
  border: none;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, transform 0.1s;
}
.speak-btn:active { background: var(--green-light); transform: scale(0.88); }

/* Speak button on green background (card-top) */
.speak-on-green {
  background: rgba(255,255,255,0.2) !important;
}
.speak-on-green:active {
  background: rgba(255,255,255,0.35) !important;
}

/* Translation blur */
.trans-blur {
  filter: blur(5px);
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
.trans-blur:active { filter: blur(0px); }

/* ⑦ Allergy Block */
.card-allergy {
  background: var(--warn-bg);
}

.allergy-label {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 7px;
}

.allergen-tags-row {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.6;
}

.no-allergen {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: var(--text-sub);
}

/* ===== Chat Bubbles (怎么点) ===== */
.bubble {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: flex-start;
}
.bubble:last-child { margin-bottom: 0; }

.bubble-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
  overflow: hidden;
}
.waiter-avatar { background: #EDEDE9; }
.user-avatar   { background: var(--green-xlight); }

.bubble-body {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
}
.waiter-bubble .bubble-body {
  background: #F5F5F2;
  border-radius: 4px 12px 12px 12px;
}
.user-bubble {
  flex-direction: row-reverse;
}
.user-bubble .bubble-body {
  background: var(--green-xlight);
  border-radius: 12px 4px 12px 12px;
}

.bubble-en-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}
.bubble-en {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  flex: 1;
  line-height: 1.4;
}
.bubble-cn {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
  cursor: pointer;
  transition: filter 0.25s ease;
}
.user-bubble .speak-btn { background: rgba(255,255,255,0.7); }

/* Fun Fact */
.card-funfact { background: var(--green-xlight) !important; }
.fun-fact-text {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: var(--green-dark);
  line-height: 1.6;
}

/* Error Card */
.error-card {
  margin: 32px 14px;
  padding: 36px 24px;
  text-align: center;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--green-light);
}
.error-icon { font-size: 42px; margin-bottom: 12px; }
.error-msg {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ===== Category Bottom Sheet ===== */
.cat-sheet {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  height: 62vh;
}

.sheet-header { padding: 0 20px 10px; flex-shrink: 0; }
.sheet-title  { font-family: 'Noto Sans SC', sans-serif; font-size: 16px; font-weight: 700; color: var(--text-main); }

.sheet-cols {
  flex: 1;
  display: flex;
  overflow: hidden;
  border-top: 1px solid var(--green-light);
}

.sheet-left {
  width: 110px;
  flex-shrink: 0;
  overflow-y: auto;
  background: var(--green-xlight);
  -webkit-overflow-scrolling: touch;
}

.sheet-right {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
  -webkit-overflow-scrolling: touch;
}

.cat-major-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 10px 13px 12px;
  cursor: pointer;
  border-right: 3px solid transparent;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.12s, border-color 0.12s;
}
.cat-major-item.active { border-right-color: var(--green-main); background: #fff; }

.cat-major-icon { font-size: 16px; flex-shrink: 0; }
.cat-major-name { font-family: 'Noto Sans SC', sans-serif; font-size: 12px; color: var(--text-sub); line-height: 1.3; }
.cat-major-item.active .cat-major-name { color: var(--green-dark); font-weight: 700; }

.cat-sub-item {
  padding: 11px 14px;
  margin: 3px 0;
  border-radius: 9px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.12s;
}
.cat-sub-item.active { background: var(--green-light); color: var(--green-dark); font-weight: 600; }
.cat-sub-item:not(.active):active { background: var(--green-xlight); }

.sheet-footer { padding: 12px 16px; border-top: 1px solid var(--green-light); flex-shrink: 0; }

/* ===== Settings Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.42);
  z-index: 600;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.hidden { display: none; }

.settings-modal {
  width: 100%;
  max-width: 480px;
  background-color: #fff;
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 36px;
  max-height: 62vh;
  overflow-y: auto;
}

.modal-handle {
  width: 36px;
  height: 4px;
  background-color: #e0e0e0;
  border-radius: 2px;
  margin: 0 auto 20px;
}

.modal-title { font-family: 'Noto Sans SC', sans-serif; font-size: 18px; font-weight: 700; color: var(--text-main); margin-bottom: 22px; }
.settings-section { margin-bottom: 24px; }
.settings-label { display: block; font-family: 'Noto Sans SC', sans-serif; font-size: 11px; font-weight: 500; color: var(--text-sub); letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 10px; }

.settings-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--green-light);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-main);
  background-color: var(--green-xlight);
  outline: none;
  transition: border-color 0.15s;
}
.settings-input:focus { border-color: var(--green-main); background-color: #fff; }

.radio-group { display: flex; flex-direction: column; gap: 8px; }

.radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--green-light);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.radio-item:has(input:checked) { border-color: var(--green-main); background-color: var(--green-xlight); }
.radio-item input[type="radio"] { accent-color: var(--green-main); width: 16px; height: 16px; flex-shrink: 0; }
.radio-label { font-family: 'Noto Sans SC', sans-serif; font-size: 14px; color: var(--text-main); font-weight: 500; flex: 1; }
.radio-desc  { font-family: 'Noto Sans SC', sans-serif; font-size: 11px; color: var(--text-sub); }

.btn-save {
  width: 100%;
  padding: 14px;
  background-color: var(--green-main);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, transform 0.1s;
}
.btn-save:active { background-color: var(--green-dark); transform: scale(0.98); }

/* ===== Tip Popup ===== */
.tip-popup {
  position: fixed;
  width: 270px;
  background-color: #1A2010;
  border-radius: 16px;
  padding: 12px 14px 14px;
  z-index: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
}
.tip-popup::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 52px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #1A2010;
}
.tip-popup.hidden { display: none; }

.tip-tag {
  display: inline-block;
  background-color: var(--green-main);
  color: #fff;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.tip-text {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.88);
  line-height: 1.65;
}
.tip-en { color: #7DC48E; font-family: 'DM Sans', sans-serif; font-weight: 500; }

/* ===== TabBar ===== */
#tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--tab-height);
  background-color: #fff;
  border-top: 1px solid var(--green-light);
  display: flex;
  align-items: stretch;
  z-index: 100;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-sub);
  transition: color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  padding: 8px 4px;
}
.tab-btn:active { background-color: var(--green-xlight); }
.tab-btn.active { color: var(--green-main); }
.tab-icon  { font-size: 22px; line-height: 1; display: block; }
.tab-label { font-family: 'Noto Sans SC', sans-serif; font-size: 14px; font-weight: 500; line-height: 1; display: block; }

/* ===== Tab2: 名词页 ===== */
.words-header {
  background: var(--green-main);
  padding: 28px 20px 20px;
  flex-shrink: 0;
}
.words-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}
.words-subtitle {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 16px;
}
.words-search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.words-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  color: var(--text-main);
  background: transparent;
}
.words-search-input::placeholder { color: var(--text-sub); }

.words-list { flex: 1; overflow-y: auto; }

/* Category */
.word-category { border-bottom: 1px solid var(--green-light); }

.cat-header-btn {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border: none;
  cursor: pointer;
  gap: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.cat-header-btn:active { background: var(--green-xlight); }

.cat-emoji { font-size: 18px; flex-shrink: 0; line-height: 1; }
.cat-name {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  flex: 1;
  text-align: left;
}
.cat-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--text-sub);
  background: var(--green-xlight);
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}
.cat-chevron {
  font-size: 16px;
  color: var(--text-sub);
  transition: transform 0.22s ease;
  flex-shrink: 0;
  line-height: 1;
}
.word-category.open .cat-chevron { transform: rotate(90deg); }

.cat-items { display: none; padding-bottom: 6px; }
.word-category.open .cat-items { display: block; }

/* Word Item */
.word-item { cursor: pointer; -webkit-tap-highlight-color: transparent; }

.word-item-row {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  gap: 10px;
  transition: background 0.12s;
}
.word-item.expanded .word-item-row,
.word-item-row:active { background: var(--green-xlight); }

.word-en {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--green-dark);
  flex: 1;
  min-width: 0;
}
.word-cn {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: var(--text-sub);
  flex-shrink: 0;
  white-space: nowrap;
}

.word-tip {
  display: none;
  margin: 0 12px 8px 42px;
  padding: 8px 12px;
  background: var(--green-xlight);
  border-radius: 8px;
  border-left: 3px solid var(--green-main);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: var(--green-dark);
  line-height: 1.65;
}
.word-item.expanded .word-tip { display: block; }

/* Search highlight */
mark.word-hl {
  background: #FFF3C4;
  border-radius: 2px;
  padding: 0 1px;
  color: inherit;
  font: inherit;
}

.words-no-results {
  padding: 48px 20px;
  text-align: center;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  color: var(--text-sub);
}

/* Category hint chips row (Tab2 & Tab3) */
.page-cats-hint {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 14px 0 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.page-cats-hint::-webkit-scrollbar { display: none; }

.cats-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 20px;
  padding: 4px 11px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== Tab3: 手册页 ===== */
.handbook-list {
  flex: 1;
  overflow-y: auto;
}

/* Handbook accordion card */
.hb-card {
  border-bottom: 1px solid var(--green-light);
}

.hb-card-header {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border: none;
  cursor: pointer;
  gap: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.hb-card-header:active { background: var(--green-xlight); }

.hb-emoji { font-size: 18px; flex-shrink: 0; line-height: 1; }
.hb-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  flex: 1;
  text-align: left;
}
.hb-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--text-sub);
  background: var(--green-xlight);
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}
.hb-chevron {
  font-size: 16px;
  color: var(--text-sub);
  transition: transform 0.22s ease;
  flex-shrink: 0;
  line-height: 1;
}
.hb-card.open .hb-chevron { transform: rotate(90deg); }

.hb-phrases { display: none; padding: 2px 0 10px; }
.hb-card.open .hb-phrases { display: block; }

/* Each phrase row */
.hb-phrase {
  padding: 10px 16px 10px 48px;
  border-top: 1px solid var(--green-xlight);
}
.hb-phrase:first-child { border-top: none; }

.hb-phrase-en-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.hb-phrase-en {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--green-dark);
  flex: 1;
  line-height: 1.45;
}
.hb-phrase-cn {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.55;
  cursor: pointer;
  transition: filter 0.25s ease;
}

/* Tips table at bottom */
.hb-tips-section {
  margin: 6px 0 0;
  background: #fff;
  border-top: 6px solid var(--green-xlight);
  padding: 18px 16px 32px;
}
.hb-tips-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}
.hb-tips-table {
  width: 100%;
  border-collapse: collapse;
}
.hb-tips-table tr {
  border-bottom: 1px solid var(--green-xlight);
}
.hb-tips-table tr:last-child { border-bottom: none; }
.hb-tips-table td {
  padding: 10px 0;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  color: var(--text-main);
}
.hb-tips-table td:first-child {
  color: var(--text-sub);
  width: 50%;
}
.hb-tips-table td:last-child {
  font-weight: 600;
  color: var(--green-dark);
  text-align: right;
}

/* ===== Tab4: 对话页 ===== */

/* Scene grid */
.dialog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}

.dialog-scene-card {
  background: #fff;
  border: 1.5px solid var(--green-light);
  border-radius: 14px;
  padding: 12px 12px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.dialog-scene-card:active { background: var(--green-xlight); transform: scale(0.97); }

/* 上半：emoji方块 + 预览句 */
.scene-card-top {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.scene-emoji-box {
  width: 50px;
  height: 50px;
  background: var(--green-xlight);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  line-height: 1;
}
.scene-preview {
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #3A8C45;
  line-height: 1.55;
}

/* 下半：标题+描述 / 查看按钮 */
.scene-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--green-light);
  padding-top: 8px;
  gap: 6px;
}
.scene-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}
.scene-desc {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.4;
  margin-top: 1px;
}
.scene-view-btn {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 10px;
  color: #3A8C45;
  background: #E8F0DC;
  border: none;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  flex-shrink: 0;
  flex-shrink: 0;
}

/* Detail hero */
.dialog-detail-hero {
  background: var(--green-main);
  padding: 20px 16px 18px;
  flex-shrink: 0;
}

.dialog-back-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.2px;
}
.dialog-back-btn:active { opacity: 0.7; }

.dialog-hero-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dialog-hero-emoji { font-size: 34px; line-height: 1; }
.dialog-hero-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}
.dialog-hero-desc {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

/* Topic chip bar — sticky */
.dialog-topic-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--green-light);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
}
.dialog-topic-bar::-webkit-scrollbar { display: none; }

.topic-chip {
  background: var(--green-xlight);
  color: var(--text-main);
  border: 1.5px solid transparent;
  border-radius: 20px;
  padding: 5px 13px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
}
.topic-chip.active {
  background: var(--green-main);
  color: #fff;
}

/* Cards container */
.dialog-cards {
  padding: 8px 0 24px;
}

/* Dialog card */
.dialog-card {
  margin: 10px 14px;
  background: #fff;
  border: 1.5px solid var(--green-light);
  border-radius: 14px;
  overflow: hidden;
}

.dialog-card-header {
  background: var(--green-xlight);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--green-light);
}
.card-topic-icon { font-size: 16px; line-height: 1; }
.card-topic-name {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--green-dark);
}

.dialog-card-body { padding: 14px; }

/* "他们会说" / "你可以回答" labels */
.they-say-label, .you-say-label {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* They-say bubble */
.they-say-bubble {
  background: var(--green-xlight);
  border-radius: 4px 12px 12px 12px;
  padding: 10px 12px;
}
.they-say-en {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--green-dark);
  line-height: 1.4;
}
.they-say-note {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 5px;
  line-height: 1.6;
}

/* You-say block */
.you-say-block { margin-top: 14px; }
.answer-items { display: flex; flex-direction: column; gap: 7px; }

/* Each answer item */
.answer-item {
  background: #fff;
  border: 1.5px solid var(--green-light);
  border-radius: 10px;
  padding: 10px 10px 8px;
}

.answer-en-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.answer-label {
  width: 52px;
  min-width: 52px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 10px;
  font-weight: 600;
  background: var(--green-xlight);
  color: var(--green-dark);
  border-radius: 4px;
  padding: 3px 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  margin-top: 2px;
  line-height: 1.4;
}

.answer-en {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
  flex: 1;
  line-height: 1.45;
}

/* Chinese translation — indented to align with English */
.answer-cn {
  margin-top: 4px;
  padding-left: 60px; /* 52px label + 8px gap */
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
  cursor: pointer;
  transition: filter 0.25s ease;
}

/* Footer tip box */
.dialog-footer-tip {
  margin: 10px 14px 4px;
  background: var(--warn-bg);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.65;
}
.footer-tip-icon { font-size: 16px; flex-shrink: 0; }

/* ===== Settings hint text ===== */
.settings-hint {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 10px;
}

/* ===== Spotlight 引导动效 ===== */
#spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.42);
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
#spotlight-overlay.visible {
  opacity: 1;
}
#hero-chips.spotlit,
.hero-chips-label.spotlit {
  position: relative;
  z-index: 201;
}

/* ===== 中文输入错误提示 ===== */
.input-error-card {
  margin: 24px 16px;
  padding: 28px 20px;
  background: #fff;
  border-radius: 14px;
  text-align: center;
}
.input-error-icon { font-size: 36px; margin-bottom: 12px; }
.input-error-msg  { font-size: 16px; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
.input-error-hint { font-size: 13px; color: var(--text-sub); }
.input-error-hint strong { color: var(--green-main); }

/* ===== Onboarding Modal ===== */
#onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#onboarding-overlay.ob-hidden { display: none; }

.onboarding-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  max-width: 340px;
  width: 100%;
  position: relative;
  text-align: center;
}

.ob-skip {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  color: var(--green-dark);
  cursor: pointer;
  padding: 0;
  z-index: 1;
}
.ob-skip:active { opacity: 0.6; }

/* 上方绿色区 */
.ob-top {
  background: var(--green-xlight);
  padding: 40px 24px 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}
.ob-icon-big {
  font-size: 72px;
  line-height: 1;
  display: block;
}
.ob-top-icons {
  display: flex;
  gap: 20px;
  font-size: 44px;
  line-height: 1;
}

/* 下方白色区 */
.ob-bottom {
  padding: 24px 24px 24px;
}

.ob-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.4;
}

.ob-desc {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
  margin-bottom: 24px;
  text-align: left;
}

.ob-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}
.ob-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-light);
  transition: background 0.2s;
}
.ob-dot.active { background: var(--green-main); }

.ob-btn {
  width: 100%;
  padding: 14px;
  background: var(--green-main);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.ob-btn:active { background: var(--green-dark); transform: scale(0.98); }

/* ===== Desktop Sidebar ===== */
#desktop-sidebar { display: none; }

@media (min-width: 820px) {
  #desktop-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    right: calc(50% + 268px);
    top: 80px;
    width: 180px;
    text-align: left;
    align-items: flex-start;
    gap: 6px;
  }
  .sidebar-tips-box {
    border: 1.5px solid var(--green-light);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 20px;
    text-align: left;
    background: #fff;
  }
  .sidebar-tips-title {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 11px;
    color: var(--text-sub);
    margin-bottom: 8px;
    letter-spacing: 0.03em;
  }
  .sidebar-tips-words {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--green-dark);
    line-height: 1.9;
  }
  .sidebar-logo {
    font-family: 'DM Serif Display', serif;
    font-size: 28px;
    color: var(--green-dark);
    line-height: 1.1;
  }
  .sidebar-cn {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--green-dark);
  }
  .sidebar-sub {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.65;
    margin-top: 8px;
  }
  .sidebar-hint {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 11px;
    color: #b0b8a8;
    margin-top: 10px;
  }
}

/* ===== Desktop App Shadow ===== */
@media (min-width: 480px) {
  body { background-color: var(--cream); }
  #app { box-shadow: 0 0 60px rgba(0,0,0,0.08); }
}

/* ===== Safe Area ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #tabbar {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--tab-height) + env(safe-area-inset-bottom));
  }
  .page { padding-bottom: calc(var(--tab-height) + env(safe-area-inset-bottom)); }
  .settings-modal, .sheet-footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
