/* ══════════════════════════════════════
   ltc-query.css — 長照補助查詢精靈
   ══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans TC', system-ui, sans-serif;
  background: #F1F5F9; color: #1E293B; min-height: 100vh;
}

/* ── Topbar ── */
.wz-topbar {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid #E2E8F0;
  display: flex; align-items: center; gap: 1rem;
  padding: .75rem 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.wz-back { color: #4F7EFF; text-decoration: none; font-size: .875rem; font-weight: 500; }
.wz-back:hover { text-decoration: underline; }
.wz-brand { flex: 1; text-align: center; font-weight: 700; }
.wz-brand small { font-weight: 400; color: #94A3B8; margin-left: .3rem; font-size: .875rem; }

/* ── Progress ── */
.wz-progress-wrap {
  background: #fff; border-bottom: 1px solid #E2E8F0;
  padding: 1rem 1.5rem .875rem;
}
.wz-progress-labels {
  display: flex; justify-content: space-between;
  margin-bottom: .5rem;
}
.wz-progress-label {
  font-size: .7rem; color: #94A3B8; font-weight: 500;
  text-align: center; flex: 1; transition: color .2s;
}
.wz-progress-label.active { color: #4F7EFF; font-weight: 700; }
.wz-progress-label.done   { color: #16A34A; }
.wz-progress-track {
  height: 6px; background: #E2E8F0; border-radius: 99px; overflow: hidden;
}
.wz-progress-fill {
  height: 100%; background: linear-gradient(90deg, #4F7EFF, #7C3AED);
  border-radius: 99px; transition: width .4s ease;
}

/* ── Wrapper ── */
.wz-wrap {
  max-width: 720px; margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

/* ── Step container ── */
.wz-step { display: none; }
.wz-step.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wz-step-eyebrow {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #4F7EFF; margin-bottom: .4rem;
}
.wz-step-title {
  font-size: clamp(1.25rem, 4vw, 1.625rem); font-weight: 900;
  color: #1E293B; margin-bottom: .35rem; line-height: 1.25;
}
.wz-step-sub {
  font-size: .9rem; color: #64748B; margin-bottom: 1.5rem; line-height: 1.5;
}

/* ── County grid ── */
.wz-region { margin-bottom: 1.25rem; }
.wz-region-label {
  font-size: .75rem; font-weight: 700; color: #94A3B8;
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: .5rem; padding-bottom: .35rem;
  border-bottom: 1px solid #E2E8F0;
}
.wz-county-grid {
  display: flex; flex-wrap: wrap; gap: .45rem;
}
.wz-county-btn {
  padding: .45rem .875rem; border: 2px solid #E2E8F0;
  border-radius: .5rem; background: #fff;
  font-family: inherit; font-size: .875rem; font-weight: 500;
  color: #475569; cursor: pointer; transition: all .15s;
}
.wz-county-btn:hover { border-color: #4F7EFF; color: #4F7EFF; }
.wz-county-btn.selected { border-color: #4F7EFF; background: #4F7EFF; color: #fff; }

/* ── Care type cards ── */
.wz-care-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .875rem;
}
@media (max-width: 480px) { .wz-care-grid { grid-template-columns: 1fr; } }

.wz-care-card {
  border: 2px solid #E2E8F0; border-radius: .875rem;
  background: #fff; padding: 1.1rem 1rem;
  cursor: pointer; text-align: left; transition: all .18s;
  display: flex; flex-direction: column; gap: .4rem;
}
.wz-care-card:hover { border-color: #4F7EFF; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(79,126,255,.12); }
.wz-care-card.selected { border-color: #4F7EFF; background: #EEF2FF; }
.wz-care-card.multi-selected { border-color: #7C3AED; background: #F5F3FF; }
.wz-care-icon { font-size: 2rem; }
.wz-care-name { font-size: 1rem; font-weight: 700; color: #1E293B; }
.wz-care-desc { font-size: .8125rem; color: #64748B; line-height: 1.4; }
.wz-care-tag  { display: inline-block; font-size: .7rem; background: #F1F5F9; color: #64748B; padding: .15rem .5rem; border-radius: 99px; }
.wz-care-card.selected .wz-care-tag,
.wz-care-card.multi-selected .wz-care-tag { background: #C7D2FE; color: #3730A3; }

/* ── Level cards ── */
.wz-level-grid { display: flex; flex-direction: column; gap: .6rem; }

.wz-level-card {
  border: 2px solid #E2E8F0; border-radius: .75rem;
  background: #fff; padding: .85rem 1.1rem;
  cursor: pointer; display: flex; align-items: center; gap: 1rem;
  transition: all .15s;
}
.wz-level-card:hover { border-color: #4F7EFF; }
.wz-level-card.selected { border-color: #4F7EFF; background: #EEF2FF; }
.wz-level-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: #F1F5F9; color: #475569;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem; font-weight: 900; flex-shrink: 0;
}
.wz-level-card.selected .wz-level-num { background: #4F7EFF; color: #fff; }
.wz-level-body { flex: 1; }
.wz-level-title { font-size: .9375rem; font-weight: 700; margin-bottom: .1rem; }
.wz-level-desc  { font-size: .8rem; color: #64748B; line-height: 1.35; }
.wz-level-badge {
  flex-shrink: 0; font-size: .75rem; font-weight: 700;
  padding: .2rem .6rem; border-radius: 99px;
}
.wz-badge-light  { background: #DBEAFE; color: #1E40AF; }
.wz-badge-mid    { background: #FEF3C7; color: #92400E; }
.wz-badge-heavy  { background: #FEE2E2; color: #DC2626; }
.wz-badge-limit  { background: #F3E8FF; color: #6B21A8; }

/* ── Identity cards ── */
.wz-id-grid { display: flex; flex-direction: column; gap: .6rem; }
.wz-id-card {
  border: 2px solid #E2E8F0; border-radius: .75rem;
  background: #fff; padding: .875rem 1.1rem;
  cursor: pointer; display: flex; align-items: center; gap: 1rem;
  transition: all .15s;
}
.wz-id-card:hover { border-color: #4F7EFF; }
.wz-id-card.selected { border-color: #4F7EFF; background: #EEF2FF; }
.wz-id-icon { font-size: 1.75rem; }
.wz-id-body { flex: 1; }
.wz-id-name { font-size: .9375rem; font-weight: 700; }
.wz-id-desc { font-size: .8rem; color: #64748B; }
.wz-id-rate { font-size: 1.125rem; font-weight: 900; color: #4F7EFF; }

/* Foreigner toggle */
.wz-extra-box {
  margin-top: 1.25rem; padding: 1rem 1.25rem;
  background: #FFFBEB; border: 1.5px solid #FDE68A; border-radius: .75rem;
}
.wz-extra-label {
  display: flex; align-items: flex-start; gap: .75rem; cursor: pointer;
}
.wz-extra-label input { margin-top: .2rem; width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
.wz-extra-text strong { display: block; font-size: .9375rem; font-weight: 700; color: #92400E; }
.wz-extra-text small  { font-size: .8rem; color: #A16207; line-height: 1.4; }

/* ── Service picker ── */
.wz-svc-section { margin-bottom: 1.25rem; }
.wz-svc-section-title {
  font-size: .8125rem; font-weight: 700; color: #64748B;
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: .65rem; padding-bottom: .4rem;
  border-bottom: 2px solid #F1F5F9;
}
.wz-svc-grid { display: flex; flex-direction: column; gap: .5rem; }
.wz-svc-row {
  display: flex; align-items: center; gap: .875rem;
  background: #fff; border: 1.5px solid #E2E8F0; border-radius: .625rem;
  padding: .75rem 1rem; transition: border-color .15s;
}
.wz-svc-row:hover { border-color: #CBD5E1; }
.wz-svc-row.has-qty { border-color: #4F7EFF; background: #FAFBFF; }
.wz-svc-info { flex: 1; }
.wz-svc-code { font-size: .7rem; font-family: monospace; color: #94A3B8; background: #F1F5F9; padding: .1rem .3rem; border-radius: .2rem; }
.wz-svc-name-row { font-size: .9rem; font-weight: 600; margin: .15rem 0 .05rem; }
.wz-svc-price { font-size: .8rem; color: #94A3B8; }
.wz-svc-subtotal { font-size: .9rem; font-weight: 700; color: #4F7EFF; min-width: 72px; text-align: right; }
.wz-svc-subtotal.zero { color: #CBD5E1; font-weight: 400; }

/* Qty stepper */
.wz-qty-wrap { display: flex; align-items: center; border: 1.5px solid #CBD5E1; border-radius: .5rem; overflow: hidden; }
.wz-qty-btn {
  width: 2rem; height: 2rem; border: none; background: #F8FAFC;
  font-size: 1.125rem; font-weight: 700; color: #475569;
  cursor: pointer; transition: background .1s; flex-shrink: 0;
}
.wz-qty-btn:hover { background: #E2E8F0; }
.wz-qty-input {
  width: 2.25rem; height: 2rem; border: none;
  border-left: 1.5px solid #CBD5E1; border-right: 1.5px solid #CBD5E1;
  text-align: center; font-family: inherit; font-size: .9rem; font-weight: 700;
  -moz-appearance: textfield; background: #fff;
}
.wz-qty-input::-webkit-outer-spin-button,
.wz-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Running total bar */
.wz-running-total {
  position: sticky; bottom: 0; background: #fff;
  border-top: 2px solid #E2E8F0;
  padding: .875rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  z-index: 50;
}
.wz-rt-label { font-size: .875rem; color: #64748B; }
.wz-rt-amount { font-size: 1.25rem; font-weight: 900; color: #1E293B; flex: 1; }

/* ── Result page ── */
.wz-result-hero {
  background: linear-gradient(135deg, #1E3A8A, #4F7EFF 60%, #7C3AED);
  color: #fff; border-radius: 1rem; padding: 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
}
.wz-result-hero h2 { font-size: 1.25rem; font-weight: 900; margin-bottom: .3rem; }
.wz-result-hero p  { font-size: .875rem; opacity: .8; }
.wz-result-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; }
.wz-chip {
  font-size: .75rem; font-weight: 600; padding: .25rem .7rem;
  background: rgba(255,255,255,.2); border-radius: 99px; color: #fff;
}

/* Category result cards */
.wz-cat-cards { display: grid; grid-template-columns: repeat(2,1fr); gap: .875rem; margin-bottom: 1.25rem; }
@media (max-width: 440px) { .wz-cat-cards { grid-template-columns: 1fr; } }
.wz-cat-card {
  background: #fff; border: 1.5px solid #E2E8F0; border-radius: .875rem;
  padding: 1rem 1.1rem;
}
.wz-cat-card-icon { font-size: 1.5rem; margin-bottom: .35rem; }
.wz-cat-card-name { font-size: .8125rem; font-weight: 700; color: #64748B; margin-bottom: .5rem; }
.wz-cat-bar-wrap { height: 8px; background: #E2E8F0; border-radius: 99px; overflow: hidden; margin-bottom: .35rem; }
.wz-cat-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg,#4F7EFF,#7C3AED); }
.wz-cat-bar-fill.over { background: linear-gradient(90deg,#F59E0B,#DC2626); }
.wz-cat-used   { font-size: 1.1rem; font-weight: 900; color: #1E293B; }
.wz-cat-limit  { font-size: .75rem; color: #94A3B8; }
.wz-cat-remain { font-size: .75rem; margin-top: .2rem; }
.wz-cat-remain.ok   { color: #16A34A; }
.wz-cat-remain.over { color: #DC2626; }

/* Big summary card */
.wz-summary-card {
  background: #fff; border: 1.5px solid #E2E8F0; border-radius: .875rem;
  overflow: hidden; margin-bottom: 1.25rem;
}
.wz-summary-head {
  padding: .875rem 1.25rem; background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0; font-size: .875rem; font-weight: 700;
}
.wz-summary-body { padding: 1.1rem 1.25rem; }
.wz-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .6rem 0; border-bottom: 1px solid #F8FAFC;
  font-size: .9375rem;
}
.wz-summary-row:last-child { border-bottom: none; }
.wz-summary-label { color: #64748B; }
.wz-summary-value { font-weight: 700; }
.wz-summary-value.gov  { color: #16A34A; }
.wz-summary-value.self { font-size: 1.5rem; font-weight: 900; color: #1E293B; }
.wz-summary-value.warn { color: #DC2626; }

/* Status band */
.wz-status-band {
  padding: .75rem 1.25rem; border-radius: .875rem;
  font-size: .875rem; font-weight: 600;
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: 1.25rem;
}
.wz-status-band.ok   { background: #F0FDF4; color: #15803D; border: 1.5px solid #BBF7D0; }
.wz-status-band.over { background: #FEF2F2; color: #DC2626; border: 1.5px solid #FECACA; }
.wz-status-band.info { background: #EFF6FF; color: #1D4ED8; border: 1.5px solid #BFDBFE; }

/* CTAs */
.wz-cta-grid { display: flex; flex-direction: column; gap: .65rem; margin-bottom: 1.5rem; }
.wz-cta {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9rem 1.25rem; border-radius: .75rem; border: none;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: all .15s;
}
.wz-cta.primary { background: #4F7EFF; color: #fff; }
.wz-cta.primary:hover { background: #3B6FEE; box-shadow: 0 4px 12px rgba(79,126,255,.4); }
.wz-cta.secondary { background: #fff; color: #475569; border: 2px solid #E2E8F0; }
.wz-cta.secondary:hover { background: #F8FAFC; }
.wz-cta.tel { background: #16A34A; color: #fff; }
.wz-cta.tel:hover { background: #15803D; }

/* Restart */
.wz-restart { text-align: center; margin-top: 1rem; }
.wz-restart button {
  background: none; border: none; font-family: inherit;
  font-size: .875rem; color: #94A3B8; cursor: pointer; text-decoration: underline;
}

/* ── Nav Buttons ── */
.wz-nav {
  display: flex; gap: .75rem; margin-top: 1.75rem; align-items: center;
}
.wz-nav-prev {
  padding: .75rem 1.25rem; border-radius: .625rem;
  background: #F1F5F9; color: #475569; border: none;
  font-family: inherit; font-size: .9375rem; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.wz-nav-prev:hover { background: #E2E8F0; }
.wz-nav-next {
  flex: 1; padding: .85rem 1.5rem; border-radius: .625rem;
  background: #4F7EFF; color: #fff; border: none;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all .15s;
}
.wz-nav-next:hover { background: #3B6FEE; box-shadow: 0 4px 12px rgba(79,126,255,.4); }
.wz-nav-next:disabled { background: #CBD5E1; cursor: not-allowed; box-shadow: none; }

.wz-skip {
  background: none; border: none; font-family: inherit;
  font-size: .8rem; color: #94A3B8; cursor: pointer; text-decoration: underline;
}

/* ════════════════════════════════════════════════════
   我們的故事 木牌+貓水彩點綴 (wz-wrap 最左側)
   ════════════════════════════════════════════════════ */
.wz-wrap { position: relative; }
.our-story-deco {
  position: absolute;
  left: calc(50% - 50vw + 16px);
  top: 50%;
  transform: translateY(-50%);
  width: 180px;
  pointer-events: none;
  z-index: 0;
}
.our-story-deco img {
  display: block;
  width: 180px;
  max-width: 180px;
  height: auto;
}
@media (max-width: 1100px) { .our-story-deco { display: none; } }
