:root {
  --navy: #17344e;
  --navy-deep: #102d47;
  --slate: #84939e;
  --slate-dark: #304b63;
  --cream: #f4f6f7;
  --white: #ffffff;
  --ink: #20272c;
  --muted: #74818a;
  --gold: #8b6e2e;
  --green: #63e4ad;
  --border: #dde2e5;
  --nav-height: 94px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #dce2e6;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 48px rgb(26 47 62 / 18%);
}

.hero {
  background: var(--navy);
  color: white;
  padding: max(36px, env(safe-area-inset-top)) 20px 30px;
}

.heading { margin-top: 0; }
.heading .eyebrow { display: none; }
.heading h1 { margin: 0; font-size: clamp(37px, 9.6vw, 47px); line-height: 1; letter-spacing: -.9px; }
.heading > p:last-child { margin: 20px 0 23px; font-size: clamp(19px, 4.6vw, 22px); line-height: 1.35; font-weight: 350; }

.association-card { background: var(--slate); border-radius: 16px; padding: 18px 20px 21px; }
.active-label { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 350; }
.active-label span { width: 10px; height: 10px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgb(99 228 173 / 10%); }
.association-info { display: grid; grid-template-columns: 36px 1fr auto; gap: 11px; align-items: center; margin-top: 17px; }
.visa-mark, .mini-visa { display: grid; place-items: center; background: white; color: #17338f; border: 1px solid #d7dbe0; font-size: 12px; font-style: italic; font-weight: 900; border-radius: 5px; height: 26px; box-shadow: 0 1px 3px rgb(0 0 0 / 12%); }
.card-data { display: flex; flex-direction: column; gap: 7px; color: white; font-size: 19px; font-weight: 350; }
.card-data strong { font-weight: 400; }
.change-button { align-self: end; display: flex; align-items: center; gap: 13px; min-height: 44px; color: white; background: none; border: 0; padding: 5px 0; cursor: pointer; font-size: 18px; }
.change-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.content { padding: 30px 20px calc(var(--nav-height) + 52px); }
.membership-card { background: var(--navy); color: white; border-radius: 16px; padding: 20px; }
.brand-row { display: flex; justify-content: space-between; align-items: center; min-height: 39px; }
.vac-brand { display: flex; align-items: center; gap: 9px; font-size: 14px; line-height: 1.15; }
.wing-logo { width: 54px; height: 47px; object-fit: contain; }
.dragonpass { font-family: Georgia, serif; font-size: 15px; font-weight: 800; white-space: nowrap; }
.dragon-icon { display: inline-grid; place-items: center; margin-left: 4px; width: 21px; height: 21px; border-radius: 3px; color: var(--navy); background: white; font-family: sans-serif; font-size: 12px; transform: rotate(5deg); }
.qr-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 17px; min-height: 292px; margin-top: 18px; border-radius: 9px; background: var(--slate-dark); }
.qr-code { position: relative; width: 184px; aspect-ratio: 1; padding: 12px; border: 0; border-radius: 10px; background: white; cursor: pointer; overflow: hidden; box-shadow: 0 2px 8px rgb(7 24 39 / 15%); }
.qr-code canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.qr-code::after { content: ""; position: absolute; inset: 0; background: rgb(255 255 255 / 0%); transition: background .2s; }
.qr-code:hover::after { background: rgb(255 255 255 / 9%); }
.qr-hint { position: absolute; inset: auto 0 14px; color: var(--navy); font-size: 11px; font-weight: 650; opacity: 0; transform: translateY(4px); transition: .2s; }
.qr-code:hover .qr-hint, .qr-code:focus-visible .qr-hint { opacity: .7; transform: translateY(0); }
.access-code { color: white; font-size: clamp(20px, 5.3vw, 25px); font-weight: 350; letter-spacing: 1px; line-height: 1; }
.member-details { display: grid; grid-template-columns: 1fr 1.15fr; gap: 12px; margin-top: 17px; }
.member-details div { display: flex; flex-direction: column; gap: 3px; }
.member-details span { color: #b7c2cc; font-size: 13px; line-height: 1.25; }
.member-details strong { color: white; font-size: 19px; font-weight: 350; }
.member-details .renewal { text-align: right; }

.benefit-card { display: flex; justify-content: space-between; align-items: center; margin: 20px 2px 0; padding: 20px 18px; min-height: 112px; border: 1px solid var(--border); border-radius: 15px; background: white; box-shadow: 0 4px 14px rgb(29 51 68 / 4%); }
.benefit-card > div { display: flex; flex-direction: column; gap: 3px; }
.benefit-card div span { color: var(--muted); font-size: 16px; }
.benefit-card div strong { color: var(--ink); font-size: clamp(38px, 10vw, 48px); line-height: 1.05; letter-spacing: -1px; font-weight: 500; }
.benefit-card button { flex: none; display: flex; align-items: center; gap: 7px; min-height: 44px; border: 0; background: none; color: var(--navy); font-weight: 750; cursor: pointer; }
.benefit-card button span { color: #b7c1c8; font-size: 29px; font-weight: 300; }
.visits-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; margin-top: 14px; padding: 15px; background: white; border-radius: 15px; border: 1px solid var(--border); }
.visits-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: #edf1f4; color: var(--navy); }
.visits-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.visits-card div:nth-child(2) { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.visits-card div:nth-child(2) span { color: var(--muted); line-height: 1.25; }
.explore-button { min-height: 40px; border: 0; border-radius: 10px; background: #edf1f4; color: var(--navy); padding: 0 12px; font-weight: 700; cursor: pointer; }

.bottom-nav { position: fixed; z-index: 10; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 480px); height: calc(var(--nav-height) + env(safe-area-inset-bottom)); padding: 10px 15px max(10px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); background: rgb(255 255 255 / 96%); backdrop-filter: blur(16px); border-top: 1px solid #eef0f1; box-shadow: 0 -8px 22px rgb(29 51 68 / 6%); }
.bottom-nav button { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; min-width: 0; border: 0; padding: 0; color: #68757d; background: none; font-size: 11.5px; cursor: pointer; transition: color .2s, transform .2s; }
.bottom-nav button:active { transform: scale(.94); }
.bottom-nav button.active { color: var(--gold); }
.bottom-nav svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

dialog { border: 0; padding: 0; }
dialog::backdrop { background: rgb(5 22 36 / 58%); backdrop-filter: blur(3px); }
.sheet-dialog { width: min(calc(100% - 24px), 456px); max-height: 86svh; margin: auto auto 0; border-radius: 24px 24px 0 0; color: var(--ink); }
.sheet-dialog[open] { animation: sheet-up .28s ease-out; }
.sheet-dialog form { position: relative; padding: 16px 22px calc(24px + env(safe-area-inset-bottom)); }
.sheet-handle { width: 42px; height: 5px; margin: 0 auto 18px; border-radius: 9px; background: #d6dadd; }
.close-button { position: absolute; right: 18px; top: 20px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #eef1f3; color: #53606a; font-size: 25px; cursor: pointer; }
.sheet-dialog h2 { margin: 0 45px 7px 0; color: var(--navy); font-size: 25px; }
.sheet-dialog p { margin: 0 30px 20px 0; color: var(--muted); line-height: 1.45; }
.card-option { display: grid; grid-template-columns: 20px 42px 1fr; align-items: center; gap: 11px; margin-top: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; }
.card-option:has(input:checked) { border-color: var(--navy); background: #f3f6f8; }
.card-option input { accent-color: var(--navy); }
.card-option > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.card-option small { color: var(--muted); }
.mini-visa { width: 42px; }
.primary-button { width: 100%; min-height: 51px; margin-top: 20px; border: 0; border-radius: 13px; background: var(--navy); color: white; font-weight: 700; cursor: pointer; }
.modal-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 15px; border-radius: 15px; background: #f2e9d8; color: var(--gold); font-size: 24px; }
.sheet-dialog ul { padding-left: 22px; color: #52606a; line-height: 1.65; }

.account-dialog form { max-height: 86svh; overflow-y: auto; }
.account-heading { display: flex; align-items: center; gap: 12px; margin: 0 46px 12px 0; }
.account-heading h2 { margin: 2px 0 0; }
.account-heading > div:last-child > span { color: var(--muted); font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; }
.account-avatar { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--navy); color: white; }
.account-avatar svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.text-field { display: flex; flex-direction: column; gap: 7px; margin-top: 18px; }
.text-field > span, .qr-options legend { color: var(--navy); font-size: 14px; font-weight: 750; }
.text-field input { width: 100%; min-height: 50px; border: 1px solid #cfd6da; border-radius: 12px; padding: 0 14px; color: var(--ink); background: white; font-size: 17px; transition: border-color .2s, box-shadow .2s; }
.text-field input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgb(23 52 78 / 10%); outline: 0; }
.text-field small { color: var(--muted); }
.qr-options { display: grid; gap: 9px; margin: 22px 0 0; padding: 0; border: 0; }
.qr-options legend { margin-bottom: 10px; }
.qr-option { position: relative; display: grid; grid-template-columns: 20px 58px 1fr 25px; align-items: center; gap: 11px; min-height: 76px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; transition: background .2s, border-color .2s; }
.qr-option:has(input:checked) { border-color: var(--navy); background: #f2f6f8; }
.qr-option input { accent-color: var(--navy); }
.qr-thumb { overflow: hidden; width: 58px; height: 58px; border: 5px solid white; border-radius: 6px; background: white; box-shadow: 0 1px 4px rgb(0 0 0 / 10%); }
.qr-thumb canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.qr-option > span:nth-of-type(2) { display: flex; flex-direction: column; gap: 3px; }
.qr-option small { color: var(--muted); }
.checkmark { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--navy); color: white; opacity: 0; transform: scale(.7); transition: .2s; }
.qr-option:has(input:checked) .checkmark { opacity: 1; transform: scale(1); }
.prototype-note { margin: 14px 0 0 !important; padding: 10px 12px; border-radius: 10px; background: #f5f6f7; font-size: 12px; }

.qr-dialog { width: min(calc(100% - 42px), 380px); border-radius: 23px; color: white; background: var(--navy); }
.qr-dialog[open] { animation: pop-in .22s ease-out; }
.qr-dialog form { position: relative; display: flex; flex-direction: column; align-items: center; padding: 35px 28px 30px; }
.qr-dialog .close-button { top: 14px; right: 14px; }
.close-button.light { background: rgb(255 255 255 / 12%); color: white; }
.qr-dialog p { margin: 5px 0 20px; font-weight: 700; font-size: 18px; }
.large-code { width: 220px; height: 220px; border: 14px solid white; border-radius: 9px; background: white; image-rendering: pixelated; }
.large-access-code { margin-top: 16px !important; color: white !important; font-size: 19px !important; letter-spacing: 1px; }
.qr-dialog strong { margin-top: 19px; font-size: 20px; }
.qr-dialog span { margin-top: 5px; color: #bac5ce; font-size: 13px; }

.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--nav-height) + 16px); transform: translate(-50%, 12px); width: max-content; max-width: calc(100% - 36px); padding: 11px 16px; border-radius: 12px; background: #1f2d37; color: white; box-shadow: 0 8px 24px rgb(0 0 0 / 20%); font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

:focus-visible { outline: 3px solid #e4b957; outline-offset: 3px; }
@keyframes sheet-up { from { transform: translateY(100%); opacity: .7; } }
@keyframes pop-in { from { transform: scale(.92); opacity: 0; } }

@media (max-width: 390px) {
  .hero, .content { padding-left: 16px; padding-right: 16px; }
  .heading { margin-top: 20px; }
  .association-info { grid-template-columns: 34px 1fr auto; }
  .change-button { gap: 5px; }
  .membership-card { padding: 16px; }
  .qr-panel { min-height: 270px; }
  .qr-code { width: 168px; }
  .access-code { font-size: 19px; }
  .benefit-card { align-items: end; flex-direction: column; }
  .bottom-nav { padding-left: 4px; padding-right: 4px; }
  .bottom-nav button { font-size: 10.5px; }
}

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100svh - 48px); border-radius: 28px; }
  .bottom-nav { bottom: 24px; border-radius: 0 0 28px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
