/* =========================================================
   樂齡生活 · 全局設計系統
   ========================================================= */
:root {
  --brand: #E4572E;
  --brand-dark: #C74621;
  --brand-soft: #FDEDE6;
  --brand-tint: #FFF7F1;
  --teal: #1F6F5C;
  --teal-dark: #173F35;
  --teal-soft: #E8F3EF;
  --gold: #D99A2B;
  --gold-soft: #FBF3E1;
  --ink: #2B2723;
  --ink-2: #564F47;
  --muted: #857A6F;
  --muted-2: #A49A8E;
  --bg: #FBF8F3;
  --card: #FFFFFF;
  --line: #EDE4D9;
  --line-soft: #F4EDE5;
  --danger: #BD4439;
  --danger-soft: #FAEAE7;
  --purple: #74549E;
  --purple-soft: #F1ECF8;
  --blue: #346A99;
  --blue-soft: #EAF1F9;
  --green: #2C7A66;
  --green-soft: #E9F4F0;
  --amber: #A8750F;
  --amber-soft: #FBF2DD;
  --shadow-sm: 0 2px 10px rgba(58, 42, 27, .045);
  --shadow: 0 12px 34px rgba(58, 42, 27, .08);
  --shadow-lg: 0 28px 80px rgba(45, 32, 20, .18);
  --radius: 18px;
  --radius-lg: 26px;
  --max: 1240px;
}
* , *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 88% -10%, #FDF0E3 0%, rgba(253, 240, 227, 0) 60%),
    radial-gradient(900px 480px at 4% 4%, #F3F7F3 0%, rgba(243, 247, 243, 0) 55%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body.locked { overflow: hidden; }
h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
:focus-visible { outline: 3px solid rgba(228, 87, 46, .55); outline-offset: 2px; border-radius: 6px; }
::selection { background: #F7CDBB; color: #4A2417; }
[hidden] { display: none !important; }

.icon { display: inline-block; vertical-align: -.18em; flex: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.page { padding: 30px 0 72px; min-height: 60vh; }
.section { margin-top: 44px; }
.block { display: block; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 999;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .76rem; font-weight: 700; letter-spacing: .09em; color: var(--brand);
  text-transform: uppercase;
}
.eyebrow.light { color: #F6D8B8; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 4px rgba(228, 87, 46, .13);
  animation: pulse 2.4s infinite;
}
.eyebrow.light .live-dot { background: #F2C186; box-shadow: 0 0 0 4px rgba(242, 193, 134, .2); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ---------------- 頂欄 / 頭部 ---------------- */
.topbar { background: var(--teal-dark); color: rgba(255, 255, 255, .82); font-size: .76rem; }
.topbar-inner { height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-link { display: inline-flex; align-items: center; gap: 5px; color: inherit; transition: color .2s; }
.topbar-link:hover { color: #fff; }
.topbar-link .icon { opacity: .8; }
.topbar-note { display: inline-flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, .58); }
.topbar-sep { width: 1px; height: 12px; background: rgba(255, 255, 255, .18); }

.app-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(251, 248, 243, .9);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(237, 228, 217, .8);
}
.header-inner { height: 76px; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand) 5%, #E9954E 55%, #D9A441 100%);
  color: #fff; font-weight: 800; font-size: 1.32rem;
  display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(228, 87, 46, .25), inset 0 1px 0 rgba(255,255,255,.25);
  letter-spacing: -.04em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.13rem; letter-spacing: -.02em; }
.brand-text small { font-size: .55rem; letter-spacing: .22em; color: var(--muted-2); margin-top: 4px; font-weight: 600; }
.main-nav { display: flex; align-items: center; gap: 1px; margin-left: 2px; }
.main-nav a {
  padding: 8px 12px; border-radius: 10px; font-size: .89rem; color: var(--ink-2);
  font-weight: 500; white-space: nowrap; transition: background .18s, color .18s;
}
.main-nav a:hover { background: #F5EEE5; color: var(--ink); }
.main-nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.header-search {
  display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px;
  background: #F5EFE7; border: 1px solid transparent; border-radius: 999px;
  width: 216px; margin-left: auto; transition: width .25s, border-color .2s, background .2s;
}
.header-search:focus-within { width: 250px; background: #fff; border-color: #EBCDBD; box-shadow: 0 0 0 4px rgba(228, 87, 46, .07); }
.search-ic { color: var(--muted-2); display: inline-flex; }
.header-search input {
  border: 0; background: transparent; outline: 0; width: 100%; font-size: .86rem;
}
.header-search input::placeholder { color: var(--muted-2); }
.header-actions { display: flex; align-items: center; gap: 5px; flex: none; }
.persona-switch {
  display: flex; background: #F3ECE2; border-radius: 999px; padding: 3px; gap: 2px;
}
.persona-switch button {
  padding: 5px 11px; border-radius: 999px; font-size: .78rem; color: var(--muted);
  font-weight: 600; transition: all .18s; white-space: nowrap;
}
.persona-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(60, 44, 28, .1); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); transition: background .18s, color .18s;
}
.icon-btn:hover { background: #F3ECE2; color: var(--ink); }
.icon-btn.ghost { background: transparent; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.active { background: var(--brand-soft); color: var(--brand); }
.senior-toggle { font-weight: 800; gap: 0; letter-spacing: -.08em; width: 44px; }
.senior-toggle .aa { font-size: 1rem; }
.senior-toggle .aa-plus { font-size: .72rem; color: var(--brand); margin-left: 1px; }
.senior-toggle.active { background: var(--brand); color: #fff; }
.senior-toggle.active .aa-plus { color: #FFD9C7; }
.mobile-search-btn { display: none; }
.badge {
  position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--brand); color: #fff; font-size: .6rem;
  font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg);
}
.avatar-link { margin-left: 3px; border-radius: 50%; }
.avatar-link img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(60,44,28,.15); }

/* ---------------- 底部導航 ---------------- */
.bottom-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 85;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .66rem; color: var(--muted); position: relative; padding: 5px 0; border-radius: 12px;
}
.bottom-nav a .icon { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--brand); font-weight: 700; }
.bottom-nav .bottom-orders { display: none; }
body.senior-mode .bottom-nav { grid-template-columns: repeat(4, 1fr); }
body.senior-mode .bottom-nav [data-nav="services"],
body.senior-mode .bottom-nav [data-nav="community"] { display: none; }
body.senior-mode .bottom-nav .bottom-orders { display: flex; }
.bottom-badge { top: 2px; right: calc(50% - 19px); border-color: #fff; }

/* ---------------- 頁腳 ---------------- */
.site-footer { margin-top: 56px; background: var(--teal-dark); color: rgba(255,255,255,.68); padding: 46px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.1fr; gap: 36px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand .brand-text strong { color: #fff; }
.footer-brand .brand-text small { color: rgba(255,255,255,.42); }
.footer-brand p { font-size: .84rem; line-height: 1.8; max-width: 420px; color: rgba(255,255,255,.58); }
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.footer-badges span {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.7); font-size: .72rem;
}
.footer-scope {
  margin-top: 14px; font-size: .72rem; line-height: 1.7; color: rgba(255,255,255,.5);
  border-left: 2px solid rgba(242, 193, 134, .5); padding-left: 10px;
}
.footer-col h4 { color: #fff; font-size: .9rem; margin-bottom: 12px; font-weight: 600; }
.footer-col a, .footer-col span { display: block; font-size: .8rem; color: rgba(255,255,255,.54); padding: 4px 0; transition: color .18s; }
.footer-col a:hover { color: #F5C79A; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.09);
  font-size: .72rem; color: rgba(255,255,255,.36);
}
.footer-demo { max-width: 620px; }

/* ---------------- 按鈕 / 標籤 / 表單 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 999px; font-size: .9rem; font-weight: 600;
  line-height: 1.25; white-space: nowrap; transition: transform .16s, background .18s, color .18s, border-color .18s, box-shadow .18s;
  border: 1px solid transparent; cursor: pointer;
}
.btn .icon { flex: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(228, 87, 46, .22);
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #E8BCA6; color: var(--brand); background: #FFFBF7; }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: #FBE0D3; }
.btn-light { background: #FFF6EC; color: var(--teal-dark); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.btn-light:hover { background: #fff; }
.btn-outline-light { border-color: rgba(255,255,255,.34); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.1); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #A63A30; }
.btn-lg { padding: 13px 25px; font-size: 1rem; }
.btn-sm { padding: 7px 13px; font-size: .8rem; gap: 5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .48; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  background: rgba(255,255,255,.22); border-radius: 999px; font-size: .68rem;
}

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 8px 15px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  font-size: .84rem; color: var(--ink-2); white-space: nowrap;
  transition: all .16s; cursor: pointer;
}
.chip:hover { border-color: #E6B79E; color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.chip.sm { padding: 6px 12px; font-size: .79rem; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 17px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: .86rem; color: var(--ink-2); white-space: nowrap; transition: all .16s;
}
.pill:hover { border-color: #E6B79E; color: var(--brand); }
.pill.active { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.pill span { font-size: .74rem; opacity: .7; }

.star-row { color: #E9A23B; letter-spacing: .5px; font-size: .82rem; display: inline-flex; }
.star-off { color: #E6DED3; }
.status-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap;
}
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-teal { background: var(--teal-soft); color: var(--teal); }
.tone-gray { background: #F2EEE8; color: #7B7064; }
.tone-purple { background: var(--purple-soft); color: var(--purple); }
.tone-red { background: var(--danger-soft); color: var(--danger); }
.tone-warn { background: var(--danger-soft); color: var(--danger); }
.tone-info { background: var(--blue-soft); color: var(--blue); }
.tone-gold { background: var(--gold-soft); color: #98701D; }
.tone-good { background: var(--green-soft); color: var(--green); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px;
}
.section-head h2 { font-size: clamp(1.35rem, 2.2vw, 1.62rem); letter-spacing: -.02em; line-height: 1.3; }
.section-head p { color: var(--muted); font-size: .88rem; margin-top: 5px; }
.link-more { display: inline-flex; align-items: center; gap: 3px; color: var(--brand); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.link-more:hover { color: var(--brand-dark); }
.link-inline { display: inline-flex; align-items: center; gap: 3px; color: var(--brand); font-size: .82rem; font-weight: 600; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin: 4px 0 24px; flex-wrap: wrap;
}
.page-head-copy h1 { font-size: clamp(1.75rem, 3vw, 2.35rem); letter-spacing: -.03em; line-height: 1.2; margin: 5px 0 0; }
.page-head-copy p { color: var(--muted); font-size: .92rem; margin-top: 7px; max-width: 700px; }
.page-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ph-note { display: inline-block; margin-left: 8px; color: var(--ink-2); }
.ph-note b { color: var(--brand); }

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-head h2 { font-size: 1.08rem; display: flex; align-items: center; gap: 7px; letter-spacing: -.01em; }
.card-head h2 .icon { color: var(--brand); }
.card-head p { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.card-head .link-inline { flex: none; margin-top: 2px; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 64px 24px; color: var(--muted);
}
.empty-ic {
  width: 74px; height: 74px; border-radius: 50%; background: #F5EEE5; color: var(--muted-2);
  display: grid; place-items: center; margin-bottom: 16px;
}
.empty-state h3 { font-size: 1.05rem; color: var(--ink); margin-bottom: 6px; }
.empty-state p { font-size: .86rem; max-width: 380px; margin-bottom: 18px; line-height: 1.7; }

.avatar { border-radius: 50%; object-fit: cover; background: #EEE6DB; flex: none; }
.subject-avatar { display: inline-flex; flex: none; }
.avatar-text { display: inline-grid; place-items: center; color: #6D5137; font-weight: 700; border: 2px solid #fff; box-shadow: 0 2px 7px rgba(60,44,28,.1); }
.trust-dot { width: 6px; height: 6px; border-radius: 50%; background: #4E9B7F; display: inline-block; margin-right: 5px; }

/* ---------------- 表單 ---------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > label { font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.field input, .field select, .field textarea, .modal-panel input:not([type="radio"]):not([type="checkbox"]), .modal-panel select, .modal-panel textarea {
  width: 100%; background: #FBF7F1; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; font-size: .9rem; outline: 0; transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input:focus, .field select:focus, .field textarea:focus, .modal-panel input:focus, .modal-panel select:focus, .modal-panel textarea:focus {
  border-color: #E9B9A2; background: #fff; box-shadow: 0 0 0 4px rgba(228, 87, 46, .07);
}
.field textarea { resize: vertical; min-height: 70px; }
.field.span2 { grid-column: span 2; }
.fineprint { color: var(--muted-2); font-size: .74rem; line-height: 1.65; margin-top: 10px; }
.modal-note {
  display: flex; align-items: flex-start; gap: 7px; background: #FBF7F0;
  border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px;
  font-size: .78rem; color: var(--muted); line-height: 1.6; margin-top: 14px;
}
.modal-note .icon { color: var(--gold); margin-top: 2px; }
.switch {
  width: 46px; height: 26px; border-radius: 999px; background: #E3DCD2; position: relative;
  transition: background .2s; flex: none;
}
.switch i {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: transform .2s;
}
.switch.on { background: var(--green); }
.switch.on i { transform: translateX(20px); }
.switch[disabled] { opacity: .55; cursor: not-allowed; }
.segmented { display: inline-flex; background: #F3ECE3; border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button { padding: 5px 12px; border-radius: 8px; font-size: .78rem; color: var(--muted); }
.segmented button.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 2px 6px rgba(60,44,28,.09); }
.qty-stepper {
  display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; overflow: hidden;
}
.qty-stepper button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink-2); }
.qty-stepper button:hover { background: #F7F1E9; color: var(--brand); }
.qty-stepper > span { min-width: 34px; text-align: center; font-weight: 700; font-size: .86rem; }
.qty-stepper.sm button { width: 26px; height: 26px; }
.qty-stepper.sm > span { min-width: 24px; font-size: .78rem; }
.reason-list { display: grid; gap: 8px; margin-bottom: 14px; }
.reason-item {
  display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid var(--line);
  border-radius: 12px; font-size: .86rem; cursor: pointer; transition: all .16s;
}
.reason-item:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); font-weight: 600; }
.reason-item input { accent-color: var(--brand); }

/* ---------------- 彈窗 / 抽屜 / Toast ---------------- */
.modal-root, .drawer-root { position: fixed; inset: 0; z-index: 200; display: none; }
.modal-root.open, .drawer-root.open { display: block; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(35, 28, 22, .5);
  backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s;
}
.modal-root.show .modal-backdrop { opacity: 1; }
.modal-panel {
  position: absolute; left: 50%; top: 50%; width: min(94vw, 560px); max-height: 88vh;
  background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg);
  transform: translate(-50%, -46%) scale(.97); opacity: 0;
  transition: transform .24s cubic-bezier(.2,.8,.2,1), opacity .2s; overflow: hidden;
}
.modal-root.show .modal-panel { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal-panel.lg { width: min(94vw, 820px); }
.modal-panel.md { width: min(94vw, 680px); }
.modal-panel.sm { width: min(94vw, 460px); }
.modal-scroll { padding: 30px 28px; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; }
.modal-x {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 50%; background: #F3ECE3; color: var(--ink-2);
  transition: background .18s;
}
.modal-x:hover { background: #EDE2D5; }
.modal-head { padding-right: 40px; margin-bottom: 18px; }
.modal-head h2 { font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.3; margin: 4px 0 0; }
.modal-head p { font-size: .86rem; color: var(--muted); margin-top: 5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.drawer-backdrop { position: absolute; inset: 0; background: rgba(35,28,22,.45); backdrop-filter: blur(2px); opacity: 0; transition: opacity .2s; }
.drawer-root.show .drawer-backdrop { opacity: 1; }
.drawer {
  position: absolute; top: 0; right: 0; height: 100%; width: min(92vw, 420px);
  background: #fff; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.drawer-root.show .drawer { transform: none; }

.toasts {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 400;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  width: max-content; max-width: 90vw;
}
.toast {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: #26332D; color: #fff; font-size: .86rem; box-shadow: 0 14px 34px rgba(0,0,0,.24);
  opacity: 0; transform: translateY(16px); transition: opacity .24s, transform .24s;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: none; }
.toast-ic { display: inline-grid; place-items: center; color: #7BD8B2; }
.toast-warn .toast-ic { color: #F5C46B; }
.toast-info .toast-ic { color: #9FC7EE; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; display: inline-block; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 加載佔位 / 動效 ---------------- */
.is-fallback { object-fit: cover; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page > .wrap { animation: fadeUp .45s ease both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------------- 響應式基礎 ---------------- */
@media (max-width: 1180px) {
  .main-nav a { padding: 8px 9px; font-size: .84rem; }
  .header-search { width: 190px; }
  .header-search:focus-within { width: 215px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-col:last-child { grid-column: span 3; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
  .footer-col:last-child h4 { margin: 0; }
}
@media (max-width: 1020px) {
  .main-nav { display: none; }
  .header-search { display: none; }
  .mobile-search-btn { display: inline-flex; }
  .topbar { display: none; }
  .header-inner { height: 66px; gap: 12px; }
  .header-actions { margin-left: auto; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); }
  body { padding-bottom: 68px; }
  .site-footer { padding-bottom: 90px; }
  .toasts { bottom: 86px; }
  .page { padding-top: 22px; }
}
@media (max-width: 640px) {
  html { font-size: 15.5px; }
  .wrap { padding: 0 16px; }
  .brand-mark { width: 38px; height: 38px; font-size: 1.15rem; border-radius: 12px; }
  .brand-text strong { font-size: 1.02rem; }
  .brand-text small { font-size: .5rem; letter-spacing: .16em; }
  .header-actions { gap: 1px; }
  .icon-btn { width: 36px; height: 36px; }
  .senior-toggle { width: 38px; }
  .avatar-link img { width: 34px; height: 34px; }
  .persona-switch { display: none; }
  .page { padding-bottom: 48px; }
  .page-head { align-items: flex-start; gap: 14px; }
  .page-head-copy h1 { font-size: 1.72rem; }
  .page-head-copy p { font-size: .84rem; }
  .page-head-actions { width: 100%; }
  .page-head-actions .btn { flex: 1; }
  .section { margin-top: 32px; }
  .section-head { align-items: center; gap: 10px; }
  .section-head p { display: none; }
  .section-head h2 { font-size: 1.25rem; }
  .site-footer { display: none; }
  .toasts { bottom: 82px; }
  .toast { font-size: .82rem; padding: 9px 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.span2 { grid-column: auto; }
  .modal-panel {
    top: auto; bottom: 0; left: 0; transform: translateY(30px); width: 100%;
    max-height: 92vh; border-radius: 24px 24px 0 0;
  }
  .modal-panel.lg, .modal-panel.md, .modal-panel.sm { width: 100%; max-height: 92vh; }
  .modal-root.show .modal-panel { transform: none; }
  .modal-scroll { padding: 26px 18px calc(26px + env(safe-area-inset-bottom)); max-height: 92vh; }
  .modal-head h2 { font-size: 1.24rem; }
  .modal-x { top: 10px; right: 10px; }
  .modal-actions .btn { flex: 1; }
  .drawer {
    top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: min(86vh, 720px);
    border-radius: 24px 24px 0 0; transform: translateY(100%);
  }
  .drawer-root.show .drawer { transform: none; }
}
@media (max-width: 400px) {
  .wrap { padding: 0 13px; }
  .brand-text small { display: none; }
}

/* ---------------- 長輩大字模式 ---------------- */
body.senior-mode { line-height: 1.75; }
body.senior-mode .btn { padding-top: 12px; padding-bottom: 12px; }
body.senior-mode .btn-sm { padding-top: 9px; padding-bottom: 9px; }
body.senior-mode .main-nav a { font-size: .98rem; }
body.senior-mode .icon-btn { width: 44px; height: 44px; }
body.senior-mode .chip { padding: 10px 17px; font-size: .9rem; }
body.senior-mode .status-pill { padding: 5px 12px; font-size: .8rem; }
body.senior-mode .hero-float.float-top,
body.senior-mode .hero-rating { display: none; }
body.senior-mode .section-head p { font-size: .94rem; }
body.senior-mode .card-head p { font-size: .86rem; }
body.senior-mode .empty-state p { font-size: .92rem; }
body.senior-mode .fineprint { font-size: .8rem; }