@font-face {
  font-family: "Anastasia Script";
  src: url("/fonts/AnastasiaScript.woff") format("woff");
  font-display: swap;
}
:root {
  color-scheme: light;
  --navy: #1f2770;
  --navy-2: #2d3a9c;
  --ink: #1a1f45;
  --muted: #4a5078;
  --gold: #c9a24a;
  --gold-deep: #9b7a2c;
  --gold-soft: #e6cf96;
  --card: rgba(255,255,255,.72);
  --ice-1: #f4f6fc;
  --ice-2: #dfe4f5;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--ice-2); }
body {
  min-height: 100vh;
  font-family: "Roboto", "Segoe UI", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 15% -10%, #ffffff 0%, transparent 60%),
    radial-gradient(900px 700px at 110% 30%, #cfd6f2 0%, transparent 55%),
    radial-gradient(700px 500px at -20% 90%, #d5dcf4 0%, transparent 60%),
    linear-gradient(160deg, var(--ice-1), var(--ice-2));
  background-color: var(--ice-2);
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .35;
  background:
    linear-gradient(115deg, transparent 40%, rgba(255,255,255,.9) 41%, transparent 47%),
    linear-gradient(65deg, transparent 55%, rgba(120,135,200,.18) 56%, transparent 63%),
    linear-gradient(150deg, transparent 20%, rgba(255,255,255,.7) 21%, transparent 28%),
    linear-gradient(30deg, transparent 75%, rgba(120,135,200,.15) 76%, transparent 84%);
}
.wrap { position: relative; max-width: 460px; margin: 0 auto; padding: 14px 16px 24px; }

/* language switch */
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-height: 36px; }
.topbar.spread { justify-content: space-between; }
.lang-switch {
  display: inline-flex; background: rgba(255,255,255,.75); border: 1px solid var(--gold-soft);
  border-radius: 999px; padding: 3px; gap: 2px; box-shadow: 0 2px 8px rgba(31,39,112,.08);
}
.lang-switch button {
  border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--navy); padding: 6px 11px; border-radius: 999px; cursor: pointer; min-width: 44px;
}
.lang-switch button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.lang-switch button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

header { text-align: center; }
h1 {
  font-family: "Anastasia Script", "Great Vibes", cursive;
  font-weight: normal;
  font-size: clamp(54px, 15vw, 72px);
  line-height: .95;
  margin: 6px 0 0;
  color: var(--navy);
  text-shadow: 0 1px 0 #fff, 0 6px 18px rgba(31,39,112,.15);
}
h1 a { color: inherit; text-decoration: none; }
h1 .gold {
  background: linear-gradient(100deg, var(--navy) 0%, var(--navy) 45%, #a8822f 60%, var(--gold) 75%, #8a6a22 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none;
  display: inline-block; padding: 0 .3em .08em; margin: 0 -.3em;
}
.divider { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px auto 12px; color: var(--gold); }
.divider::before, .divider::after { content: ""; height: 1px; width: 70px; background: linear-gradient(90deg, transparent, var(--gold)); }
.divider::after { transform: scaleX(-1); }
.intro { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0 4px 16px; text-align: center; }

.card {
  background: var(--card); border: 1.5px solid var(--gold-soft); border-radius: 18px;
  padding: 14px 12px; box-shadow: 0 10px 30px rgba(31,39,112,.10);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); margin-bottom: 14px;
}
.stack { display: grid; gap: 11px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 50px; padding: 12px 18px;
  border: 1px solid rgba(201,162,74,.55); border-radius: 999px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  color: #fff; font: inherit; font-size: 17px; letter-spacing: .2px;
  text-decoration: none; cursor: pointer; text-align: center;
  box-shadow: 0 4px 0 rgba(17,22,70,.35), 0 8px 16px rgba(31,39,112,.22), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(17,22,70,.35), 0 4px 10px rgba(31,39,112,.2); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn svg { width: 21px; height: 21px; flex: none; }
.btn .chev { width: 16px; height: 16px; margin-left: auto; transition: transform .2s; opacity: .8; }
.btn .spacer { width: 16px; margin-right: auto; }
.btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.btn.gold-ic svg.ic { color: var(--gold-soft); }

/* light gold button (Save contact / Care guide) */
.btn.light {
  background: linear-gradient(180deg, #fffdf7, #fbf3df);
  color: var(--navy); border: 1.5px solid var(--gold);
  box-shadow: 0 4px 0 rgba(155,122,44,.35), 0 8px 16px rgba(155,122,44,.15), inset 0 1px 0 #fff;
  font-weight: 600;
}
.btn.light svg.ic { color: var(--gold-deep); }
.btn.light:active { box-shadow: 0 1px 0 rgba(155,122,44,.35), 0 4px 10px rgba(155,122,44,.15); }
.save-row { margin: 0 0 16px; }

.panel { display: none; padding: 4px 2px 2px; }
.panel.open { display: block; animation: drop .2s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.branch { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e3e6f3; border-radius: 14px; padding: 10px 12px; margin: 8px 0; }
.branch .pin { color: var(--gold); flex: none; width: 20px; height: 20px; }
.branch .info { flex: 1; min-width: 0; }
.branch .name { font-weight: 600; color: var(--navy); font-size: 15.5px; }
.branch .sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.branch .dist { color: var(--gold); font-weight: 600; }
.mini { flex: none; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--navy); border: 1.5px solid var(--navy); border-radius: 999px; padding: 7px 12px; white-space: nowrap; }
.mini:hover { background: var(--navy); color: #fff; }

.nearest { text-align: center; padding: 4px 4px 0; }
.nearest p { margin: 2px 0; font-size: 13.5px; color: var(--muted); }
.linkish { background: none; border: 0; font: inherit; font-size: 14px; color: var(--navy); font-weight: 600; cursor: pointer; padding: 6px 4px; display: inline-flex; align-items: center; gap: 4px; }
.linkish:hover { text-decoration: underline; }
.near-result { margin-top: 8px; padding: 12px; border-radius: 14px; background: linear-gradient(180deg, #fffaf0, #fff); border: 1px solid var(--gold-soft); text-align: center; }
.near-result .label { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-deep); }
.near-result .nm { font-size: 19px; color: var(--navy); font-weight: 700; margin: 2px 0; }
.near-result .sub { font-size: 13px; color: var(--muted); }
.near-result .btn { margin-top: 10px; min-height: 44px; font-size: 15.5px; }
.status { font-size: 13px; color: var(--muted); margin-top: 6px; min-height: 1em; }

.email-row { display: grid; gap: 8px; padding-top: 8px; }
.email-row a { display: block; text-align: center; text-decoration: none; color: var(--navy); font-weight: 600; background: #fff; border: 1px solid #e3e6f3; border-radius: 12px; padding: 11px 10px; font-size: 15px; word-break: break-all; }
.email-row a:hover { border-color: var(--gold); }

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 8px 24px rgba(31,39,112,.3); opacity: 0; pointer-events: none; transition: all .25s ease; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* WeChat */
.btn.wechat svg.ic { color: #4ee07a; }
.btn[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(15,20,60,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fade .18s ease;
}
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative; width: 100%; max-width: 340px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: #fff; border-radius: 20px; border: 1.5px solid var(--gold-soft);
  padding: 20px 18px 16px; text-align: center; box-shadow: 0 20px 50px rgba(15,20,60,.35);
}
.modal-card h3 { margin: 0 0 8px; color: var(--navy); font-size: 18px; }
.modal-x { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; background: #f1f3fb; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--navy); cursor: pointer; }
.wc-qr { width: 100%; max-width: 230px; height: auto; display: block; margin: 0 auto 6px; border-radius: 10px; -webkit-touch-callout: default; }
.wc-id { margin: 2px 0 12px; font-size: 15px; color: var(--muted); }
.wc-id b { color: var(--navy); font-size: 18px; letter-spacing: .3px; display: block; margin-top: 2px; user-select: all; }
.modal-card .btn { min-height: 46px; font-size: 16px; }
.wc-note { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 12px 0 0; }

/* care guide */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--navy); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 2px; }
.back:hover { text-decoration: underline; }
h1.small { font-size: clamp(40px, 11vw, 52px); }
h2.page-title { text-align: center; color: var(--navy); font-size: 22px; letter-spacing: .5px; margin: 4px 0 6px; font-weight: 700; }
.care-intro { text-align: center; color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0 4px 16px; }
.care details { background: #fff; border: 1px solid #e3e6f3; border-radius: 14px; margin: 0 0 10px; overflow: hidden; }
.care details[open] { border-color: var(--gold-soft); box-shadow: 0 6px 18px rgba(31,39,112,.08); }
.care summary {
  list-style: none; cursor: pointer; padding: 14px 14px; display: flex; align-items: center; gap: 12px;
  font-weight: 700; color: var(--navy); font-size: 16px;
}
.care summary::-webkit-details-marker { display: none; }
.care summary .num { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: var(--gold-soft); font-size: 14px; }
.care summary .chev { margin-left: auto; width: 16px; height: 16px; color: var(--gold-deep); transition: transform .2s; flex: none; }
.care details[open] summary .chev { transform: rotate(180deg); }
.care .body { padding: 0 16px 14px 56px; color: var(--ink); font-size: 14.5px; line-height: 1.65; }
.care .body p { margin: 0 0 8px; }
.care .body ul { margin: 0; padding-left: 18px; }
.care .body li { margin: 0 0 7px; }
.care .body li::marker { color: var(--gold); }
.care .body .warn { background: #fff7e6; border-left: 3px solid var(--gold); padding: 8px 10px; border-radius: 6px; margin-top: 8px; }
.care .body b { color: var(--navy); }

footer { text-align: center; font-size: 12.5px; color: var(--muted); padding: 18px 0 calc(10px + env(safe-area-inset-bottom)); }
@media (max-width: 360px) { .care .body { padding-left: 16px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
