/* Member wallet only; staff and admin retain their shared styles. */
.wallet-body {
  --ink: #12305b;
  --paper: #f2f5fa;
  --line: #d5deeb;
  --blue: #184a86;
  --wallet-muted: #52647d;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}
.wallet-body .shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: #fff;
}
.wallet-body .wallet-brand { gap: 12px; margin: 0 0 36px; letter-spacing: 0; }
.wallet-brand-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; background: var(--ink); color: #fff; }
.wallet-body svg { width: 24px; height: 24px; flex-shrink: 0; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wallet-brand strong { display: block; font-size: 15px; font-weight: 800; }
.wallet-brand div > span { display: block; margin-top: 2px; color: var(--wallet-muted); font-size: 12px; font-weight: 500; }
.wallet-body h1 { margin: 0; font-size: clamp(28px, 7vw, 36px); line-height: 1.3; letter-spacing: -.035em; }
.wallet-body .muted { color: var(--wallet-muted); }
.wallet-body p { line-height: 1.7; }
.wallet-body .panel { padding: 24px; border: 1px solid var(--line); border-radius: 16px; box-shadow: none; }
.wallet-body .stack { gap: 20px; }
.wallet-body .primary, .wallet-body .secondary { min-height: 52px; border-radius: 12px; transition: background-color 120ms, opacity 120ms; }
.wallet-body .primary { background: var(--blue); }
.wallet-body .secondary { background: #eaf0f8; }
.wallet-body button:active:not(:disabled) { opacity: .8; }
.wallet-body .primary:disabled { opacity: .6; }
.wallet-body button:focus-visible, .wallet-body input:focus-visible, .wallet-body summary:focus-visible { outline: 3px solid #648dc4; outline-offset: 4px; }
.wallet-body .status-pill { flex-shrink: 0; padding: 5px 10px; font-size: 13px; line-height: 1.5; }
.ticket-status-neutral { background: #eaf0f8; color: #425772; }
.ticket-status-unavailable { background: var(--amber-soft); color: #6e3d00; }
.wallet-body #loading { padding: 24px 0; border: 0; }
.wallet-body #loading p { margin: 0; color: var(--wallet-muted); }
.wallet-body #login { flex: 1; }
.wallet-body .login-hero { padding: 24px 0 32px; }
.wallet-body .login-hero h1 { font-size: clamp(36px, 10vw, 48px); line-height: 1.3; }
.wallet-body .login-hero p { max-width: 30ch; margin: 20px 0 0; }
.wallet-body #login .panel { padding: 0; border: 0; }
.wallet-body #tickets { gap: 24px; align-content: start; }
.tickets-intro p { margin: 8px 0 0; font-size: 14px; }
.used-ticket-toggle { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 6px 0; cursor: pointer; font-size: 14px; font-weight: 600; }
.used-ticket-toggle input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.used-ticket-switch { flex: 0 0 44px; width: 44px; height: 26px; padding: 3px; border: 1px solid #718198; border-radius: 20px; background: #d5deeb; box-sizing: border-box; }
.used-ticket-switch::before { content: ''; display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #52647d; }
.used-ticket-toggle input:checked + .used-ticket-switch { background: #184a86; border-color: #184a86; }
.used-ticket-toggle input:checked + .used-ticket-switch::before { transform: translateX(18px); }
.used-ticket-toggle input:focus-visible + .used-ticket-switch { outline: 3px solid #648dc4; outline-offset: 4px; }
.wallet-body .used-ticket-note { margin: 0; font-size: 14px; color: var(--wallet-muted); }
.used-ticket-note:empty { display: none; }
.ticket-card h2, .ticket-card p { margin: 0; }
.ticket-card-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.wallet-body .ticket-card-heading h2 { font-size: 24px; line-height: 1.4; letter-spacing: -.03em; }
.wallet-body .ticket-card-annual { position: relative; min-width: 0; border: 1px solid #294154; border-radius: 20px; background: #071f35; color: #fff; box-shadow: 0 12px 28px #102c4614; }
.wallet-body #open-annual-ticket { display: block; width: 100%; padding: 0; border: 0; border-radius: inherit; overflow: hidden; background: transparent; color: inherit; text-align: left; }
.wallet-body #open-annual-ticket:focus-visible { outline: 3px solid #648dc4; outline-offset: 4px; }
.annual-card-art { display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-width: 0; min-height: 200px; aspect-ratio: 1000 / 630; padding: 34px 20px 20px; background: url('assets/annual-pass-mountains-v2.png') top center / 100% auto no-repeat; }
.annual-card-art::before { content: ''; flex: 1 0 0; }
.annual-card-title { display: block; width: 64%; color: #f1d9a2; }
#annual-ticket-title { display: block; font-family: "Noto Serif TC", "PMingLiU", serif; font-size: clamp(22px, 6vw, 32px); font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.annual-card-en { display: block; margin-top: 7px; font-size: 11px; letter-spacing: .16em; }
.annual-accessible { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.annual-card-holder { display: flex; align-items: center; gap: 10px; width: 68%; margin-top: 18px; overflow-wrap: anywhere; }
.annual-avatar { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; border: 1px solid #dcc18b77; object-fit: cover; background: #284960; color: #f5e7c9; }
.annual-avatar-fallback { display: grid; place-items: center; }
.annual-avatar svg { width: 26px; height: 26px; }
.annual-holder-copy { display: block; min-width: 0; }
.annual-holder-copy small { display: block; color: #dcc18b; font-size: 11px; letter-spacing: .08em; }
.annual-holder-copy strong { display: block; margin-top: 3px; color: #f5e7c9; font-size: 20px; font-weight: 500; line-height: 1.35; }
.annual-holder-copy .annual-line-name { margin-top: 3px; color: #c9d6e2; letter-spacing: 0; }
.annual-line-name:empty { display: none; }
.annual-entry-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 20px; padding: 18px 0 16px; border-top: 1px solid #dcc18b55; }
.annual-entry-meta small { display: block; color: #c9d6e2; font-size: 12px; margin-bottom: 4px; }
.annual-entry-meta strong { font-size: 16px; color: #f5e7c9; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.annual-entry-meta > span:first-child { min-width: 0; }
.annual-entry-hint { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 0 20px 18px; font-size: 14px; color: #f5e7c9; }
.annual-entry-hint > span:first-child { color: #c9d6e2; font-size: 13px; }
.ticket-card-annual .status-pill, #pass .status-pill { border-radius: 6px; }
.ticket-card-annual .ticket-status-unavailable, #pass .ticket-status-unavailable { background: #eaf0f8; color: #425772; }
.wallet-body .ticket-card-upcoming { display: flex; align-items: flex-start; gap: 16px; padding: 20px; background: #fff; border-radius: 14px; }
.coffee-icon { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 44px; color: #52647d; }
.coffee-content { min-width: 0; flex: 1; }
.coffee-content .ticket-card-heading { gap: 8px; align-items: center; }
.wallet-body .coffee-content h2 { font-size: 18px; }
.coffee-content p { margin-top: 10px; font-size: 13px; }
.coffee-content .coffee-locations { margin-top: 8px; color: var(--wallet-muted); font-size: 12px; }
.wallet-use-note { display: flex; align-items: flex-start; gap: 10px; padding: 0 4px; color: #52647d; }
.wallet-use-note svg { margin-top: 2px; width: 20px; height: 20px; }
.wallet-use-note p { margin: 0; font-size: 13px; font-weight: 700; }
.wallet-use-note p span { font-weight: 400; }
.wallet-body .mode-back { display: flex; align-items: center; justify-content: flex-start; gap: 4px; min-height: 48px; padding: 8px 0; margin: -12px 0 16px; background: transparent; font-size: 14px; }
.wallet-body .mode-back svg { width: 20px; height: 20px; }
.wallet-body #claim { padding: 0; border: 0; }
.wallet-body #claim > div > p { font-size: 14px; margin: 12px 0 4px; }
.wallet-body .field { font-size: 14px; gap: 8px; }
.wallet-body .field input { min-height: 52px; padding: 14px; border-color: #b1bfd3; border-radius: 10px; font-size: 16px; background: #fff; }
.wallet-body #claim-code-options { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f5f8fc; }
.wallet-body summary { cursor: pointer; line-height: 1.6; font-size: 14px; font-weight: 700; }
.wallet-body #claim-code-options summary { min-height: 44px; display: list-item; align-content: center; }
.wallet-body #claim-code-options[open] .field { margin-top: 12px; }
.wallet-body #claim-prefilled { margin: 0; font-size: 14px; }
.wallet-body .ticket { overflow: visible; padding: 0; color: var(--ink); background: #fff; border: 0; border-radius: 0; box-shadow: none; }
.wallet-body .ticket::after { display: none; }
.annual-detail-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.annual-detail-heading h2 { margin: 0; font-size: 22px; line-height: 1.5; }
.annual-detail-heading .status-pill { margin-top: 3px; }
.annual-member-label { display: block; color: var(--wallet-muted); font-size: 12px; margin-bottom: 2px; }
.wallet-body #pass .member { gap: 14px; padding: 28px 0; margin: 0; }
.wallet-body #pass .member .avatar { width: 52px; height: 52px; flex: 0 0 52px; border: 0; border-radius: 50%; }
.wallet-body #pass .avatar-fallback { background: #edf3f8; color: var(--ink); }
.wallet-body #pass .member > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.wallet-body #pass .member-name { font-size: 24px; font-weight: 600; line-height: 1.5; margin: 2px 0; }
.wallet-body #phone-view { color: var(--wallet-muted); font-size: 13px; }
.wallet-body #pass .ticket-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
.wallet-body #pass .ticket-meta small { color: var(--wallet-muted); font-size: 14px; margin: 0; }
.wallet-body #pass .ticket-meta strong { color: var(--ink); font-size: 17px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.wallet-body #pass .gate-checkin { gap: 24px; margin: 10px 0 24px; padding: 0; background: transparent; border-radius: 0; }
.wallet-body #member-entry-message { margin: 0; padding: 0; border-radius: 0; background: transparent; color: var(--wallet-muted); font-size: 13px; }
.wallet-body #pass .annual-more { margin: 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--wallet-muted); }
.wallet-body #pass .annual-more summary { min-height: 52px; align-content: center; font-weight: 400; }
.wallet-body #pass .annual-more p { margin: 0 0 12px; overflow-wrap: anywhere; }
.wallet-body #pass .annual-more ul { padding-left: 20px; }
.wallet-body #entry-status-refresh { width: 100%; margin-bottom: 12px; background: transparent; color: var(--blue); font-size: 14px; font-weight: 500; }
.wallet-body .message { margin: 0; font-size: 14px; }
.wallet-body #redemption-message:empty, #member-line-name:empty { display: none; }
.wallet-body .qr-wrap { min-width: 0; max-width: 100%; padding: 12px; border: 1px solid var(--line); }
.wallet-body .qr-wrap img, .wallet-body .qr-wrap canvas { max-width: 100%; }
.wallet-body .countdown { color: var(--wallet-muted); font-size: 13px; }
.wallet-body .redemption-dialog { max-height: calc(100dvh - 32px); padding: 24px; border-radius: 18px; }
.wallet-body .redemption-dialog h2 { font-size: 24px; }
.wallet-body .redemption-dialog > form > p { font-size: 14px; }
.wallet-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 40px; font-size: 12px; color: #61718a; }
.wallet-body #coffee-message:empty, .wallet-body #coffee-redeem-message:empty, .wallet-body #coffee-issue-message:empty { display: none; }
.wallet-body .coffee-claim-account strong { font-size: 24px; overflow-wrap: anywhere; }
.wallet-body #open-coffee-ticket { margin-top: 12px; width: 100%; }
.wallet-body .coffee-batch h2 { font-size: 20px; }
.wallet-body .coffee-batch p { overflow-wrap: anywhere; }
.wallet-body #coffee-redeem-dialog { width: min(420px, calc(100% - 32px)); box-sizing: border-box; overflow-y: auto; }
@media (min-width: 601px) {
  .wallet-body .shell { padding: 36px; }
}
@media (max-width: 360px) {
  .wallet-body .shell { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .annual-card-art { padding-left: 16px; padding-right: 16px; }
  .wallet-body .ticket-card-heading h2 { font-size: 22px; }
  .wallet-body .ticket-card-upcoming { gap: 8px; padding: 16px; }

}
@media (prefers-reduced-motion: reduce) {
  .wallet-body button { transition: none; }
}

/* Coffee voucher artwork and redemption flow. */
.wallet-body .voucher-art { position: relative; display: block; width: 100%; overflow: hidden; border: 0; border-radius: 14px; padding: 0; background: #12305b; color: #fff7e7; text-align: left; }
.wallet-body #open-coffee-ticket { margin: 0; }
.voucher-art > img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.voucher-copy { position: absolute; inset: 12% auto auto 8%; width: 53%; display: grid; gap: 10px; }
.voucher-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .04em; }
.voucher-name { font-size: clamp(25px, 7vw, 38px); font-weight: 800; line-height: 1.25; letter-spacing: .02em; }
.voucher-value { font-size: 12px; font-weight: 400; }
.voucher-state { width: fit-content; padding: 5px 10px; border: 1px solid #8ea4be; border-radius: 5px; font-size: 13px; font-weight: 700; }
.voucher-edge { position: absolute; inset: auto 8% 7%; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; }
.voucher-entry .voucher-edge { padding-top: 10px; border-top: 1px solid #6b83a2; }
.section-kicker { color: var(--wallet-muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.coffee-page-heading h1 { margin-top: 8px; }
.wallet-body #coffee { gap: 24px; }
.coffee-balance { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 4px 24px; border-bottom: 1px solid var(--line); }
.coffee-balance > div { display: grid; gap: 4px; }
.coffee-balance > div:last-child { text-align: right; }
.coffee-balance span { color: var(--wallet-muted); font-size: 13px; }
.coffee-balance p { margin: 0; font-size: 16px; }
.coffee-balance p strong { font-size: 44px; font-weight: 800; line-height: 1.2; }
.coffee-balance > div > strong { font-size: 16px; }
.coffee-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.coffee-section-heading h2 { margin: 0; font-size: 18px; }
.wallet-body .coffee-section-heading button { min-height: 44px; padding: 8px 12px; background: transparent; font-size: 13px; }
.wallet-body .coffee-batch { gap: 14px; padding: 20px; border-radius: 14px; border-color: #c3d1e2; }
.wallet-body .coffee-batch h2 { margin: 0; font-size: 24px; }
.wallet-body .coffee-batch p { margin: 0; }
.wallet-body .coffee-expiry { font-size: 14px; color: var(--wallet-muted); }
.coffee-record { border-top: 1px dashed var(--line); padding-top: 4px; }
.coffee-record summary { min-height: 44px; align-content: center; color: var(--wallet-muted); font-size: 13px; }
.wallet-body .coffee-record p { margin-top: 8px; font-size: 12px; }
.coffee-reference { overflow-wrap: anywhere; }
.wallet-body .coffee-batch[data-status="expired"], .wallet-body .coffee-batch[data-status="used"], .wallet-body .coffee-batch[data-status="revoked"], .wallet-body .coffee-batch[data-status="exhausted"] { background: #f5f7fa; border-color: var(--line); }
.coffee-use-guide { padding: 20px 0; border-top: 1px solid var(--line); }
.coffee-use-guide h2 { margin: 0 0 8px; font-size: 16px; }
.coffee-use-guide p { margin: 8px 0 0; color: var(--wallet-muted); font-size: 13px; }
.coffee-empty { padding: 32px 20px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; }
.coffee-empty h2 { margin: 0 0 8px; font-size: 20px; }
.coffee-empty p { margin: 0; font-size: 14px; color: var(--wallet-muted); }
.redeem-top { display: flex; justify-content: space-between; align-items: center; }
.wallet-body .redeem-top button { min-height: 44px; padding: 8px 12px; background: transparent; }
.wallet-body #coffee-redeem-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; }
.wallet-body #coffee-redeem-dialog form { gap: 20px; }
.wallet-body #coffee-redeem-dialog h2 { margin: 0; font-size: 28px; }
.wallet-body #coffee-redeem-dialog .redeem-summary { padding: 16px; border-radius: 12px; background: #edf3fb; font-size: 16px; font-weight: 700; }
.wallet-body #coffee-redeem-confirm { margin-top: 8px; }
@media (max-width: 420px) {
  .voucher-copy { gap: 7px; }
  .voucher-eyebrow, .voucher-value { font-size: 12px; }
  .voucher-name { font-size: 26px; }
  .voucher-state { padding: 3px 8px; font-size: 12px; }
  .wallet-body #coffee-redeem-dialog { width: 100%; height: 100dvh; max-width: none; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
}
@media (max-width: 360px) {
  .voucher-copy { gap: 4px; }
  .voucher-name { font-size: 24px; line-height: 1.2; }
  .voucher-state { padding: 2px 7px; }
}
/* Let voucher content set its height, including large text accessibility modes. */
.wallet-body .voucher-art { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; aspect-ratio: 3 / 2; padding: 8%; }
.voucher-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.voucher-copy { position: relative; inset: auto; width: 60%; z-index: 1; }
.voucher-edge { position: relative; inset: auto; z-index: 1; margin-top: auto; flex-wrap: wrap; }
@media (max-width: 360px) { .wallet-body .voucher-art { gap: 10px; } }
.wallet-body .voucher-art { aspect-ratio: auto; }
/* Solid text surfaces keep contrast independent of decorative image cropping. */
.voucher-copy { background: #12305b; border-radius: 4px; box-shadow: 0 0 0 6px #12305b; }
.voucher-edge { background: #12305b; box-shadow: 0 0 0 4px #12305b; }
