/* 款款欸：手機優先（390px），≥768 平板加寬、≥1100 電腦置中 */
:root {
  --green: #4F7A5A;
  --green-dark: #3C5E45;
  --green-soft: #E4EDE3;
  --green-tint: #F0F5EF;
  --bg: #FAF6EE;
  --card: #FFFFFF;
  --ink: #2B3530;
  --ink-2: #5C675F;
  --ink-3: #8B948D;
  --line: #E8E2D6;
  --warm: #FCEBD7;
  --warm-ink: #9A5B1E;
  --sky: #DCEAF7;
  --sky-ink: #2F5F8A;
  --danger: #C4523F;
  --danger-soft: #FBE9E5;
  --gold: #D9A441;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 10px rgba(60, 94, 69, .08), 0 1px 2px rgba(60, 94, 69, .06);
  --shadow-lg: 0 12px 32px rgba(43, 53, 48, .18);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --header-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  min-height: 100dvh;
}
img { max-width: 100%; display: block; }
a { color: var(--green-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 24px; text-align: center; }
svg.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.icon-lg { width: 28px; height: 28px; }
svg.icon-xl { width: 40px; height: 40px; }

/* ---------- header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  padding-top: var(--safe-top);
  background: rgba(250, 246, 238, .92);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(232, 226, 214, .7);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 8px;
  max-width: 960px; margin: 0 auto;
  padding: 0 calc(12px + var(--safe-right)) 0 calc(12px + var(--safe-left));
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--green-dark); min-height: 44px; padding-right: 8px; }
.brand img { width: 44px; height: 32px; object-fit: contain; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: .04em; }
.header-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; min-width: 44px; padding: 0 12px;
  border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 600;
}
.nav-link:hover, .nav-link.is-active { background: var(--green-soft); color: var(--green-dark); }
.nav-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--green-soft); }
.avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font-size: 14px; font-weight: 700;
}
.nav-label-sm { display: none; }
@media (min-width: 420px) { .nav-label-sm { display: inline; } }

/* ---------- layout ---------- */
.app-main { padding-bottom: calc(24px + var(--safe-bottom)); }
.container {
  max-width: 560px; margin: 0 auto;
  padding: 16px calc(16px + var(--safe-right)) 0 calc(16px + var(--safe-left));
}
.page-head { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; }
.page-head h1 { font-size: 22px; }
.page-sub { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.back-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-left: -10px; border-radius: 50%;
  color: var(--ink); text-decoration: none; flex: none;
}
.back-btn:hover { background: var(--green-soft); }
.section { margin-top: 24px; }
.section-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.grow { flex: 1; min-width: 0; }

@media (min-width: 768px) {
  .container { max-width: 760px; padding-top: 24px; }
  .page-head h1 { font-size: 26px; }
}
@media (min-width: 1100px) {
  .container { max-width: 960px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border-radius: var(--radius-sm); border: 1.5px solid transparent;
  background: var(--card); color: var(--ink);
  font-size: 16px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, transform .05s, box-shadow .15s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(79, 122, 90, .28); }
.btn-primary:hover:not(:disabled) { background: var(--green-dark); }
.btn-outline { border-color: var(--green); color: var(--green-dark); background: transparent; }
.btn-outline:hover:not(:disabled) { background: var(--green-tint); }
.btn-soft { background: var(--green-soft); color: var(--green-dark); }
.btn-soft:hover:not(:disabled) { background: #d6e4d4; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: rgba(0, 0, 0, .04); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 56px; font-size: 18px; border-radius: 14px; }
.btn-line { background: #06C755; color: #fff; }
.btn-line:hover:not(:disabled) { background: #05b04b; }
.btn-google { background: #fff; color: #1f1f1f; border: 1px solid #747775; }
.btn-google:hover:not(:disabled) { background: #f7f8f8; }
/* Google 品牌規範：標誌固定尺寸、不加濾鏡 */
.brand-mark { width: 20px; height: 20px; flex: none; }
.provider-btn { gap: 12px; }
.provider-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px; font-size: 12px; font-weight: 900;
}
.btn-line .provider-mark { background: #fff; color: #06C755; }
.btn-google .provider-mark { background: #4285F4; color: #fff; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-3); flex: none;
}
.icon-btn:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: var(--green-soft); color: var(--green-dark);
}
.badge-warm { background: var(--warm); color: var(--warm-ink); }
.badge-sky { background: var(--sky); color: var(--sky-ink); }
.badge-gray { background: #EEEAE1; color: var(--ink-2); }
.badge-gold { background: #F7EAC8; color: #8A6412; }

/* ---------- boot / error ---------- */
.boot { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--ink-2); }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--green-soft); border-top-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { text-align: center; padding: 48px 16px; }
.error-state h2 { font-size: 20px; margin: 12px 0 6px; }
.error-state p { color: var(--ink-2); margin-bottom: 20px; }
.error-icon { color: var(--gold); display: inline-flex; }

/* ---------- home ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 24px;
  padding: 28px 20px 22px;
  background: linear-gradient(160deg, #FFFDF8 0%, #F3EEDF 55%, #E4EDE3 100%);
  box-shadow: var(--shadow);
}
.hero-logo { width: 78%; max-width: 300px; height: auto; margin: -6px auto 6px; }
.hero-brand { display: flex; align-items: center; gap: 12px; }
.hero h1 { font-size: 36px; font-weight: 900; color: var(--green-dark); letter-spacing: .06em; }
.hero-sub { font-size: 14px; font-weight: 700; color: var(--green); letter-spacing: .2em; }
.hero-tagline { position: relative; margin-top: 18px; font-size: 21px; font-weight: 800; color: var(--ink); }
.hero-tagline::after { content: ""; display: block; width: 72%; height: 6px; margin-top: 2px; border-radius: 3px; background: rgba(217, 164, 65, .45); }
.hero-desc { position: relative; margin-top: 10px; color: var(--ink-2); font-size: 15px; max-width: 30em; }
.hero .btn { position: relative; margin-top: 20px; }

.type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  min-height: 150px; padding: 16px; border: 0; border-radius: var(--radius);
  text-align: left; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .1s, box-shadow .15s;
}
.type-card:active { transform: scale(.98); }
.type-card:hover { box-shadow: 0 6px 18px rgba(60, 94, 69, .16); }
.type-card.domestic { background: var(--warm); }
.type-card.international { background: var(--sky); }
.type-card-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .7); }
.type-card.domestic .type-card-icon { color: var(--warm-ink); }
.type-card.international .type-card-icon { color: var(--sky-ink); }
.type-card-title { font-size: 18px; font-weight: 800; }
.type-card-desc { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.type-card-go { margin-top: auto; display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; }
.type-card.domestic .type-card-go { color: var(--warm-ink); }
.type-card.international .type-card-go { color: var(--sky-ink); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.step { background: var(--card); border-radius: var(--radius-sm); padding: 12px 8px; text-align: center; box-shadow: var(--shadow); }
.step-num { width: 28px; height: 28px; margin: 0 auto 6px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.step-title { font-weight: 700; font-size: 14px; }
.step-desc { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.resume-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-height: 72px; }
.resume-card .progress { margin-top: 8px; }

@media (min-width: 768px) {
  .hero { padding: 40px 36px 32px; }
  .hero h1 { font-size: 46px; }
  .hero-tagline { font-size: 26px; }
  .hero { display: grid; grid-template-columns: 1fr minmax(240px, 42%); column-gap: 24px; align-items: center; }
  .hero-logo { grid-column: 2; grid-row: 1 / span 5; width: 100%; max-width: 380px; margin: 0; }
  .hero > :not(.hero-logo) { grid-column: 1; }
  .hero .btn { justify-self: start; }
  .type-card { min-height: 180px; padding: 22px; }
  .type-card-title { font-size: 21px; }
}

/* ---------- forms ---------- */
.field { display: block; }
.field + .field { margin-top: 18px; }
.field-label { display: flex; align-items: baseline; gap: 6px; font-weight: 700; margin-bottom: 8px; }
.field-hint { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.required { color: var(--danger); font-size: 13px; font-weight: 700; }
.input, .select {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px;
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px;
}
.input:focus, .select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(79, 122, 90, .18); }
input[type="date"].input { min-height: 48px; }
.checkline { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.checkline input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }

.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip {
  min-height: 48px; padding: 6px 8px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.2;
}
.chip:hover { border-color: #cfd9cd; }
.chip.is-active { border-color: var(--green); background: var(--green-tint); color: var(--green-dark); box-shadow: inset 0 0 0 1px var(--green); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 8px; border-radius: var(--radius-sm); background: var(--green-tint); }
.stepper-btn { width: 48px; height: 48px; border-radius: 12px; border: 0; background: #fff; color: var(--green-dark); box-shadow: var(--shadow); display: inline-flex; align-items: center; justify-content: center; }
.stepper-btn:disabled { opacity: .4; }
.stepper-value { font-size: 20px; font-weight: 800; color: var(--green-dark); text-align: center; }
.stepper-value small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); }
@media (min-width: 768px) { .chips { grid-template-columns: repeat(6, 1fr); } }

.pack-list { display: grid; gap: 10px; }
@media (min-width: 768px) { .pack-list { grid-template-columns: 1fr 1fr; } }
.pack-card {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 14px; min-height: 72px; text-align: left;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.pack-card.is-on { border-color: var(--green); background: var(--green-tint); }
.pack-card.is-locked { background: #FBF9F4; }
.pack-check { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #c9d1c8; flex: none; display: flex; align-items: center; justify-content: center; margin-top: 2px; color: #fff; }
.pack-card.is-on .pack-check { background: var(--green); border-color: var(--green); }
.pack-check svg.icon { width: 16px; height: 16px; stroke-width: 3; }
.pack-lock { color: var(--ink-3); margin-top: 2px; }
.pack-name { font-weight: 800; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pack-desc { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.pack-preview { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

.form-actions { position: sticky; bottom: 0; margin-top: 24px; padding: 12px 0 calc(12px + var(--safe-bottom)); background: linear-gradient(180deg, rgba(250, 246, 238, 0) 0%, var(--bg) 28%); }

/* ---------- progress ---------- */
.progress { height: 10px; border-radius: 999px; background: #E9E6DD; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--green); transition: width .3s ease; }
.progress.is-done > span { background: linear-gradient(90deg, var(--green) 0%, #6FA27B 100%); }
.progress-thin { height: 6px; }
.progress-card { position: sticky; top: calc(var(--header-h) + var(--safe-top) + 6px); z-index: 10; }
.progress-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.progress-count { font-size: 15px; font-weight: 700; }
.progress-count strong { font-size: 22px; color: var(--green-dark); }
.progress-pct { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.progress-pct strong { color: var(--green-dark); font-size: 16px; }

/* ---------- 批次勾選 ---------- */
.bulk-row { display: flex; gap: 8px; margin-top: 10px; }
.bulk-btn { flex: 1; gap: 6px; background: #F6F3EB; color: var(--ink-2); }
.bulk-btn:hover:not(:disabled) { background: var(--green-tint); color: var(--green-dark); }
.bulk-btn svg.icon { width: 18px; height: 18px; }
.bulk-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- tips ---------- */
.tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: #FFF4E0; color: #7A5418; font-size: 14px; }
.tip + .tip { margin-top: 8px; }
.tip svg.icon { color: #D98B1E; margin-top: 1px; }

/* ---------- checklist ---------- */
.cats { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 768px) { .cats { grid-template-columns: 1fr 1fr; align-items: start; } }
.cat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cat-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 56px; padding: 8px 12px 8px 14px; border: 0; background: transparent; text-align: left;
}
.cat-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--green-tint); color: var(--green); display: flex; align-items: center; justify-content: center; flex: none; }
.cat-name { font-weight: 800; font-size: 16px; }
.cat-count { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ink-2); background: #F3F0E8; padding: 2px 10px; border-radius: 999px; }
.cat.is-done .cat-count { background: var(--green-soft); color: var(--green-dark); }
.cat-chev { color: var(--ink-3); transition: transform .2s; display: flex; }
.cat.is-collapsed .cat-chev { transform: rotate(-90deg); }
.cat.is-collapsed .cat-body { display: none; }
.cat-mini { height: 3px; background: #F0EDE5; }
.cat-mini > span { display: block; height: 100%; width: 0; background: var(--green); transition: width .3s; }
.cat-body { border-top: 1px solid #F1EDE4; }
.item-row { display: flex; align-items: stretch; border-bottom: 1px solid #F4F1EA; }
.item-row:last-child { border-bottom: 0; }
.item-check {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 8px 4px 8px 14px; border: 0; background: transparent; text-align: left;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.check-box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #C9D1C8; background: #fff; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; transition: background-color .15s, border-color .15s; }
.check-box svg.icon { width: 17px; height: 17px; stroke-width: 3.2; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.item-row.is-checked .check-box { background: var(--green); border-color: var(--green); }
.item-row.is-checked .check-box svg.icon { opacity: 1; transform: scale(1); }
.item-text { min-width: 0; }
.item-name { font-size: 16px; overflow-wrap: anywhere; }
.item-row.is-checked .item-name { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(92, 103, 95, .5); }
.item-note { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.item-tag { font-size: 11px; font-weight: 700; color: var(--sky-ink); background: var(--sky); border-radius: 6px; padding: 0 6px; margin-left: 6px; vertical-align: 2px; }
.item-more { width: 48px; border: 0; background: transparent; color: var(--ink-3); display: flex; align-items: center; justify-content: center; flex: none; }
.item-more:hover { color: var(--ink); background: rgba(0, 0, 0, .03); }
.cat-add { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-top: 1px dashed #EAE5DA; background: transparent; color: var(--green); font-weight: 700; font-size: 14px; }
.cat-add:hover { background: var(--green-tint); }
.hidden-toggle { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-top: 1px solid #F1EDE4; background: #FBFAF6; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.hidden-list { background: #FBFAF6; }
.hidden-row { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 6px 0 14px; border-top: 1px solid #F1EDE4; color: var(--ink-3); }
.hidden-row .grow { text-decoration: line-through; }
.empty-cats { text-align: center; padding: 32px 16px; color: var(--ink-2); }

.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 10px calc(16px + var(--safe-right)) calc(10px + var(--safe-bottom)) calc(16px + var(--safe-left));
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.bottom-bar-inner { max-width: 560px; margin: 0 auto; display: flex; gap: 10px; }
.bottom-bar-inner .btn { flex: 1; }
@media (min-width: 768px) { .bottom-bar-inner { max-width: 760px; } }
@media (min-width: 1100px) { .bottom-bar-inner { max-width: 960px; } }
.has-bottom-bar { padding-bottom: calc(96px + var(--safe-bottom)); }

.done-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-top: 12px; border-radius: var(--radius); background: var(--green); color: #fff; box-shadow: var(--shadow); }
.done-banner .btn { margin-left: auto; background: #fff; color: var(--green-dark); }

/* ---------- international hub ---------- */
/* 兩張卡片永遠等寬等高：欄寬由格線決定，不受內容長度影響（minmax 的 0 讓長字不撐開欄），
   列高統一用 grid-auto-rows: 1fr，堆疊時兩張也一樣高 */
.bag-cards { display: grid; gap: 12px; grid-template-columns: 1fr; grid-auto-rows: 1fr; align-items: stretch; }
@media (min-width: 768px) { .bag-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 格線自己有 gap，卡片之間不再加 margin（否則第二張會被推低 12px） */
.bag-cards .card + .card { margin-top: 0; }
.bag-card { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); min-height: 120px; height: 100%; min-width: 0; }
.bag-card > .grow { min-width: 0; }
.bag-card .progress { width: 100%; }
.bag-card-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--green-tint); color: var(--green); display: flex; align-items: center; justify-content: center; flex: none; }
.bag-card.is-done .bag-card-icon { background: var(--green); color: #fff; }
.bag-card-title { font-size: 18px; font-weight: 800; }
.bag-card-desc { font-size: 13px; color: var(--ink-2); margin: 2px 0 10px; }
.bag-card-count { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-top: 6px; }

/* ---------- complete ---------- */
.complete-hero { text-align: center; padding: 28px 16px 22px; }
.complete-badge { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(79, 122, 90, .35); animation: pop .4s ease-out; }
.complete-badge svg.icon { width: 46px; height: 46px; stroke-width: 3; }
.complete-badge.is-pending { background: #F3E6C8; color: #9A6B12; box-shadow: none; animation: none; }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 80% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.complete-hero h1 { font-size: 26px; font-weight: 900; }
.complete-hero p { color: var(--ink-2); margin-top: 6px; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summary-card { background: var(--card); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: block; }
.summary-card.single { grid-column: 1 / -1; }
.summary-label { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.summary-value { font-size: 24px; font-weight: 900; color: var(--green-dark); margin: 2px 0 8px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.action-grid .btn-primary { grid-column: 1 / -1; }
.pending-list { margin-top: 10px; }
.pending-list a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; text-decoration: none; color: var(--ink); border-bottom: 1px solid #F1EDE4; }
.pending-list a:last-child { border-bottom: 0; }

/* ---------- my list ---------- */
.list-cards { display: grid; gap: 12px; }
@media (min-width: 768px) { .list-cards { grid-template-columns: 1fr 1fr; } }
.list-card { display: flex; flex-direction: column; gap: 10px; }
.list-card-top { display: flex; gap: 12px; align-items: flex-start; }
.list-card-flag { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.list-card-flag.domestic { background: var(--warm); color: var(--warm-ink); }
.list-card-flag.international { background: var(--sky); color: var(--sky-ink); }
.list-card-name { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.list-card-meta { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.list-card-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.list-card-progress .progress { flex: 1; }
.list-card-progress strong { color: var(--green-dark); }
.list-card-actions { display: flex; gap: 6px; }
.list-card-actions .btn-primary { flex: 1; }
.guest-note { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--green-tint); color: var(--green-dark); font-size: 14px; margin-bottom: 14px; }
.guest-note .btn { margin-left: auto; flex: none; }
.empty { text-align: center; padding: 40px 16px; }
.empty-illus { width: 88px; height: 88px; margin: 0 auto 12px; border-radius: 24px; background: var(--green-tint); color: var(--green); display: flex; align-items: center; justify-content: center; }
.empty h2 { font-size: 19px; }
.empty p { color: var(--ink-2); margin: 6px 0 18px; }
.my-items-group + .my-items-group { margin-top: 14px; }
.my-items-bag { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.my-item-chip { display: inline-flex; align-items: center; gap: 2px; padding-left: 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; }
.my-item-chip .icon-btn { width: 40px; height: 40px; }

/* ---------- account ---------- */
.profile { display: flex; align-items: center; gap: 14px; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--green-soft); flex: none; }
.profile-avatar.avatar-fallback { font-size: 26px; background: var(--green); color: #fff; }
.profile-name { font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.provider-row { display: flex; align-items: center; gap: 12px; min-height: 64px; border-bottom: 1px solid #F1EDE4; }
.provider-row:last-child { border-bottom: 0; }
.provider-logo { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; flex: none; }
.provider-logo.line { background: #06C755; color: #fff; }
.provider-logo.google { background: #fff; border: 1px solid #747775; }
.provider-logo .brand-mark { width: 22px; height: 22px; }
.provider-block { border-bottom: 1px solid #F1EDE4; padding-bottom: 10px; }
.provider-block:last-child { border-bottom: 0; padding-bottom: 0; }
.provider-block .provider-row { border-bottom: 0; }
.login-benefits { display: grid; gap: 8px; margin: 12px 0 18px; }
.login-benefits li { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: 15px; }
.login-benefits li svg.icon { color: var(--green); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.login-buttons { display: grid; gap: 10px; }
.dev-login { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }

/* ---------- prose ---------- */
.prose { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.prose h2 { font-size: 17px; margin: 22px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); font-size: 15px; }
.prose p + p { margin-top: 10px; }
.prose ul { margin: 6px 0 0; padding-left: 20px; }
.prose li + li { margin-top: 4px; }
.footer { max-width: 560px; margin: 32px auto 0; padding: 0 16px; text-align: center; font-size: 13px; color: var(--ink-3); }
.footer nav { display: flex; justify-content: center; flex-wrap: wrap; }
.footer a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }

/* ---------- sheet / toast ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(30, 38, 33, .42); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 560px; max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  padding: 8px calc(18px + var(--safe-right)) calc(18px + var(--safe-bottom)) calc(18px + var(--safe-left));
  animation: slide-up .22s ease-out;
}
@keyframes slide-up { from { transform: translateY(40px); opacity: .6; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: #DDD8CD; margin: 4px auto 10px; }
.sheet-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.sheet-title .icon-btn { margin-left: auto; margin-right: -10px; }
.sheet-msg { color: var(--ink-2); margin-bottom: 14px; overflow-wrap: anywhere; }
.sheet-body { margin-top: 10px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet-actions .btn { flex: 1; }
.sheet-menu { display: grid; gap: 4px; margin-top: 6px; }
.sheet-menu .btn { justify-content: flex-start; min-height: 52px; }
@media (min-width: 768px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 22px; max-width: 460px; padding-bottom: 20px; }
  .sheet-grip { display: none; }
}
.toast-wrap { position: fixed; left: 0; right: 0; top: calc(var(--header-h) + var(--safe-top) + 10px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 480px; padding: 12px 18px; border-radius: 14px; background: rgba(43, 53, 48, .94); color: #fff; font-size: 15px; box-shadow: var(--shadow-lg); animation: toast-in .2s ease-out; text-align: center; }
.toast.is-error { background: rgba(160, 58, 42, .96); }
.toast.is-leaving { opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .app-header, .bottom-bar, .footer { display: none; }
}
.resume-card .list-card-name, .resume-card .list-card-meta { display: block; }
.item-text { display: flex; flex-direction: column; }
.spinner-sm { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .8s linear infinite; }
.action-grid .btn-ghost { grid-column: 1 / -1; }
.section.tip { margin-top: 16px; }
.pack-desc, .pack-preview { display: block; }
.pack-card .grow { display: block; }
.bag-card-title, .bag-card-desc, .bag-card-count { display: block; }
