:root {
  --ink: #08003f;
  --muted: #9da3aa;
  --line: #e6e8ec;
  --surface: #fff;
  --soft: #f7f8fa;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 58px;
  --header-h: 56px;
}
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  background: #fff;
  overflow-x: hidden;
}
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Avenir, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Avenir, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { border: 0; background: transparent; color: inherit; cursor: pointer; }
.app-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  min-height: 100svh;
  margin: 0 auto;
  overflow-x: hidden;
  background: #fff;
}
.brand-header {
  background: #fff;
  padding-top: var(--safe-top);
}
.brand-header.hidden { display: none; }
.brand-row {
  height: var(--header-h);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px 6px 16px;
}
.brand-lockup { display: block; padding: 0; flex: 0 0 auto; width: auto; max-width: 80px; }
.brand-lockup img { display: block; width: 72px; height: auto; }
.profile-trigger {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 40px;
  margin-left: auto;
  background: url("assets/ui/profile-icon.png") center / 24px 30px no-repeat;
}
.profile-trigger img { display: block; width: 24px; height: 30px; object-fit: contain; }
main {
  min-height: calc(100dvh - var(--header-h) - var(--nav-h) - var(--safe-top) - var(--safe-bottom));
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 20px);
}
.screen { display: none; animation: screen-in .18s ease; }
.screen.active { display: block; }
@keyframes screen-in { from { opacity: .6; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.search-row {
  display: flex;
  gap: 8px;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.search-box, .filter-button {
  height: 44px;
  display: flex;
  align-items: center;
  border: 1.5px solid #9ba2a9;
  border-radius: 24px;
  color: #929aa3;
}
.search-box { flex: 1; padding: 0 16px; }
.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  font-weight: 300;
}
.search-box input::placeholder { color: #929aa3; }
.search-icon { width: 20px; height: 20px; flex: 0 0 20px; color: #000; stroke-width: 2; }
.filter-button { gap: 8px; padding: 0 14px; color: #000; font-size: 15px; white-space: nowrap; }
.filter-button .ui-icon { width: 18px; height: 18px; }
.section-title {
  margin: 18px 20px 14px;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.8px;
  white-space: nowrap;
}
.hero { position: relative; height: 340px; overflow: hidden; background: #111; }
.hero-track { height: 100%; display: flex; transition: transform .45s ease; width: 100%; }
.hero-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 28px 40px;
  color: #fff;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,0,63,.08), rgba(8,0,63,.58));
}
.hero-slide > * { position: relative; z-index: 1; }
.hero-title {
  max-width: 92%;
  white-space: pre-line;
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.08;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.pill-button, .detail-button {
  min-height: 44px;
  border-radius: 24px;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  padding: 0 18px;
}
.pill-button { width: min(100%, 340px); }
.dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
  z-index: 3;
}
.dots button { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.45); }
.dots button.active { background: #fff; }
.horizontal-scroll {
  display: flex;
  gap: 12px;
  padding: 0 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.horizontal-scroll::-webkit-scrollbar { display: none; }
.offer-card {
  position: relative;
  flex: 0 0 calc(100% - 36px);
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.14);
}
.offer-card img { display: block; width: 100%; height: 168px; object-fit: cover; }
.offer-card-body { display: block; min-height: 118px; padding: 16px 18px 22px; position: relative; }
.offer-card-body h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.1; }
.offer-card-body p { margin: 0; font-size: 14px; line-height: 1.2; font-weight: 300; }
.offer-card-body .brand-word {
  position: absolute;
  right: 16px;
  bottom: 18px;
  max-width: 42%;
  text-align: right;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;
}
.offer-card-body .brand-logo {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 78px;
  height: 48px;
  object-fit: contain;
}
.date-chip {
  position: absolute;
  right: 0;
  top: -24px;
  padding: 7px 14px;
  border-radius: 18px 0 0 0;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.screen-note { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 15px; }
.full-list { padding: 0 20px 12px; }
.full-list .offer-card { width: 100%; margin-bottom: 16px; }
.home-section { padding: 1px 0 8px; }
.discover-button {
  width: calc(100% - 40px);
  margin: 16px 20px 28px;
  height: 48px;
  border-radius: 26px;
  color: #fff;
  background: var(--ink);
  font-size: 17px;
}
.viva-section { padding: 40px 20px 72px; text-align: center; background: #f8f8fb; }
.viva-section h2 { margin: 0 0 12px; font-size: 32px; line-height: 1.1; font-style: italic; }
.viva-section p { margin: 0 auto 20px; max-width: 280px; font-size: 16px; line-height: 1.3; font-weight: 300; }
.viva-card {
  width: 100%;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: white;
  background: #08003f;
  font-size: 17px;
  font-weight: 600;
}
.viva-card b { color: #39a8ff; }
.card-screen { padding: 8px 20px 28px; }
.card-screen h1 {
  margin: 8px 0 16px;
  font-size: 24px;
  line-height: 1;
  font-style: italic;
}
.membership-card-stack { display: grid; gap: 14px; margin-bottom: 20px; }
.member-card-component {
  position: relative;
  width: 100%;
  aspect-ratio: 1024 / 631;
  overflow: hidden;
  border-radius: 16px;
  background: #079fc8;
  box-shadow: 0 6px 16px rgba(0,52,99,.14);
  container-type: inline-size;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
}
.member-card-component > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-person {
  position: absolute;
  left: 5.8%;
  bottom: 9.6%;
  display: flex;
  flex-direction: column;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 400;
}
.card-person strong { font: inherit; }
.card-front time {
  position: absolute;
  right: 6.2%;
  bottom: 10%;
  color: #fff;
  font-size: 14px;
}
.member-number {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 39.2%;
  color: #fff;
  text-align: center;
  font-size: 2.42cqw;
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1;
}
.card-back-copy {
  position: absolute;
  inset: 0;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  pointer-events: none;
}
.card-back-copy,
.card-back-copy p,
.card-back-copy i {
  color: #fff;
}
.card-back-copy p { margin: 0; }
.card-back-label {
  position: absolute;
  top: 27.87%;
  left: 4%;
  right: 4%;
  text-align: center;
  font-size: 2.38cqw;
  font-weight: 400;
  letter-spacing: .098em;
  line-height: 1;
  white-space: nowrap;
}
.card-back-label i,
.card-back-label .card-back-en {
  font-style: italic;
  font-weight: 400;
  letter-spacing: inherit;
}
.card-back-url {
  position: absolute;
  top: 50.54%;
  left: 6%;
  right: 6%;
  text-align: center;
  font-size: 2.26cqw;
  font-weight: 700;
  letter-spacing: .17em;
  line-height: 1;
}
.card-back-legal {
  position: absolute;
  left: 5.6%;
  right: 5.6%;
  top: 76.65%;
  bottom: 3.2%;
  text-align: left;
  font-family: Avenir, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.72cqw;
  line-height: 1.22;
  font-weight: 400;
  letter-spacing: 0.01em;
  overflow: hidden;
}
.card-back-legal p { margin: 0 0 0.62em; }
.card-actions { display: grid; gap: 10px; text-align: center; }
.card-actions p { margin: 4px 0 0; font-size: 13px; line-height: 1.3; font-weight: 300; white-space: nowrap; }
.dark-button {
  height: 46px;
  border-radius: 24px;
  color: #fff;
  background: var(--ink);
  font-size: 15px;
}
.wallet-badge { display: block; width: 118px; height: auto; margin: 0 auto 16px; }
.profile-screen { padding-bottom: 30px; }
.profile-top {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding-top: var(--safe-top);
  position: relative;
}
.back-button { position: absolute; left: 16px; width: 32px; height: 32px; display: grid; place-items: center; }
.back-button .ui-icon { width: 22px; height: 22px; stroke-width: 2.4; }
.profile-top .brand-lockup img { width: 72px; }
.profile-list { padding: 0 22px; }
.profile-group-title {
  margin: 28px 0 10px;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 800;
}
.profile-row {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.28;
  text-align: left;
}
.profile-icon { width: 24px; height: 24px; display: grid; place-items: center; }
.profile-icon .ui-icon { width: 22px; height: 22px; stroke-width: 1.55; }
.profile-chevron { color: #666; font-size: 22px; }
.detail-screen { padding: 0 20px 40px; }
.detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding-top: var(--safe-top);
  border-bottom: 1px solid var(--line);
}
.detail-header button { width: 36px; height: 36px; display: grid; place-items: center; }
.detail-header button .ui-icon { width: 24px; height: 24px; }
.detail-header h1 { margin: 0; font-size: 18px; }
.detail-hero { width: 100%; height: 180px; margin: 16px 0; object-fit: cover; border-radius: 14px; }
.detail-screen h2 { font-size: 22px; margin: 10px 0; }
.detail-screen p { font-size: 15px; line-height: 1.5; font-weight: 300; }
.filter-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: flex-end;
  background: rgba(8,0,63,.25);
}
.filter-sheet.open { display: flex; }
.filter-panel {
  width: min(430px,100%);
  padding: 20px 20px calc(20px + var(--safe-bottom));
  border-radius: 22px 22px 0 0;
  background: #fff;
}
.filter-panel h2 { margin: 0 0 16px; font-size: 22px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-options button { padding: 8px 14px; border: 1px solid #c5c9d0; border-radius: 20px; font-size: 14px; }
.filter-options button.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
  z-index: 40;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 16px;
  border-radius: 20px;
  color: #fff;
  background: rgba(8,0,63,.88);
  font-size: 13px;
  transition: .2s;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%,0); }
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 15;
  width: min(100%, 430px);
  height: calc(var(--nav-h) + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(4,1fr);
  align-items: start;
  padding-bottom: var(--safe-bottom);
  border-top: 1px solid #eef0f2;
  background: #fff;
  transform: translateX(-50%);
}
.bottom-nav button {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  height: var(--nav-h);
  padding: 4px 0 2px;
  overflow: hidden;
}
.nav-state {
  display: block;
  width: auto;
  height: 46px;
  max-width: 92%;
  object-fit: contain;
}
.bottom-nav .nav-active { display: none; }
.bottom-nav button.active .nav-active { display: block; }
.bottom-nav button.active .nav-inactive { display: none; }
@media (min-width: 700px) {
  body { background: #f3f3f6; }
  .app-shell {
    margin-top: 18px;
    border-radius: 32px;
    min-height: calc(100dvh - 36px);
    box-shadow: 0 0 32px rgba(8,0,63,.12);
  }
  .bottom-nav { bottom: 18px; border-radius: 0 0 32px 32px; }
}
