@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800;900&family=Newsreader:opsz,wght@6..72,500;6..72,700&display=swap");

:root {
  --red: #b5121b;
  --red-2: #e52231;
  --ink: #12100e;
  --paper: #f8f7f4;
  --surface: #ffffff;
  --soft: #eceff3;
  --line: #d9dde4;
  --muted: #69707d;
  --gold: #c89a45;
  --blue: #2d6cdf;
  --green: #14845f;
  --shadow: 0 18px 48px rgba(18, 16, 14, .12);
  --sans: "DM Sans", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(181, 18, 27, .04) 1px, transparent 1px),
    linear-gradient(rgba(18, 16, 14, .035) 1px, transparent 1px),
    var(--paper);
  background-size: 40px 40px;
  color: var(--ink);
  font-family: var(--sans);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { display: none; }

.app-shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 76px minmax(360px, 430px) minmax(360px, 1fr);
  gap: 28px;
  padding: 24px;
  align-items: start;
}

.desktop-rail {
  position: sticky;
  top: 24px;
  min-height: calc(100vh - 48px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 10px;
}

.desktop-rail img { width: 42px; height: auto; margin-bottom: 12px; }
.rail-item {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--muted);
}
.rail-item:hover, .rail-item.is-active { background: var(--red); color: white; }

.phone-app {
  width: 100%;
  min-height: calc(100vh - 48px);
  background: #f4f5f7;
  border: 1px solid rgba(18, 16, 14, .1);
  border-radius: 34px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 18px 16px 96px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.brand-lockup { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; letter-spacing: -.02em; }
.brand-lockup img { width: 36px; height: auto; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .avatar-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
}
.avatar-button { background: var(--ink); color: white; font-weight: 900; }

.greeting-panel {
  min-height: 184px;
  border-radius: 28px;
  color: white;
  background:
    linear-gradient(135deg, rgba(18, 16, 14, .92), rgba(181, 18, 27, .82)),
    url("../../assets/hero-smansa-courtyard.jpg") center / cover;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 900;
}
.eyebrow.light { color: rgba(255, 255, 255, .7); }
.greeting-panel h1 {
  margin: 0;
  max-width: 280px;
  font-family: var(--serif);
  font-size: 38px;
  line-height: .95;
  font-weight: 700;
  letter-spacing: 0;
}
.today-line { margin: 12px 0 0; color: rgba(255, 255, 255, .7); font-size: 14px; }
.member-chip {
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .13);
  color: white;
  min-width: 78px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  gap: 3px;
  font-weight: 800;
}
.member-chip span { font-size: 13px; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.quick-tile {
  min-height: 104px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 24px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .18s ease, border-color .18s ease;
}
.quick-tile:hover { transform: translateY(-3px); border-color: var(--red); }
.quick-tile strong { font-size: 14px; letter-spacing: -.01em; }
.quick-tile.featured { background: #fff0eb; border-color: rgba(181, 18, 27, .24); }
.tile-icon {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
}
.tile-icon.red { background: var(--red); }
.tile-icon.ink { background: var(--ink); }
.tile-icon.gold { background: var(--gold); }
.tile-icon.blue { background: var(--blue); }
.tile-icon.green { background: var(--green); }

.home-data-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: -2px 0 16px;
}

.home-data-strip a {
  min-height: 78px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 22px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.home-data-strip b {
  color: var(--red);
  font-family: var(--serif);
  font-size: 30px;
  line-height: .95;
}

.home-data-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.member-card {
  background: linear-gradient(135deg, var(--ink), #342822);
  color: white;
  border-radius: 26px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 16px 36px rgba(18, 16, 14, .16);
}
.card-head, .card-body, .section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.member-card h2, .section-head h2, .scan-panel h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.03em;
}
.status-pill {
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 900;
  color: #bdf6d8;
}
.card-body { align-items: end; margin-top: 34px; }
.member-id { font-family: var(--serif); font-size: 30px; line-height: 1; font-weight: 700; }
.card-body p { margin: 6px 0 0; color: rgba(255, 255, 255, .62); font-size: 13px; }
.qr-button {
  border: 0;
  background: white;
  color: var(--ink);
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
}

.section-block { margin-top: 20px; }
.section-head { align-items: end; margin-bottom: 12px; }
.section-head a {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.benefit-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 78%);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.benefit-card {
  scroll-snap-align: start;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 24px;
  padding: 16px;
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.benefit-card.is-hot {
  border-color: rgba(181, 18, 27, .28);
  background: linear-gradient(180deg, #fff3ef, #ffffff);
}
.benefit-type {
  width: max-content;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 900;
}
.benefit-card h3 { margin: 12px 0 4px; font-size: 24px; letter-spacing: -.03em; }
.benefit-card p { margin: 0; color: var(--muted); }
.benefit-card button, .scan-panel button {
  border: 0;
  background: var(--red);
  color: white;
  min-height: 42px;
  border-radius: 15px;
  padding: 0 14px;
  font-weight: 900;
}

.scan-panel {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.scan-icon {
  width: 54px;
  height: 54px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--red);
}
.scan-panel p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.35; }

.news-list { display: grid; gap: 10px; }
.news-row {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 22px;
  padding: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}
.news-row span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--soft);
  color: var(--red);
}
.news-row strong { display: block; }
.news-row small { display: block; margin-top: 3px; color: var(--muted); line-height: 1.35; }

.desktop-preview {
  position: sticky;
  top: 24px;
  min-height: calc(100vh - 48px);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.7)),
    url("../../assets/hero-smansa01.jpg") center / cover;
  border: 1px solid var(--line);
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
}
.desktop-preview h2 {
  margin: 0;
  max-width: 560px;
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 72px);
  line-height: .92;
}
.desktop-preview p:not(.eyebrow) {
  max-width: 560px;
  margin: 18px 0 0;
  color: #3c424c;
  font-size: 18px;
  line-height: 1.55;
}
.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 32px;
}
.preview-stats span {
  min-height: 116px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.preview-stats b { display: block; color: var(--red); font-size: 32px; }

.bottom-nav {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 30;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  border: 1px solid rgba(18, 16, 14, .12);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 8px;
  box-shadow: 0 16px 44px rgba(18, 16, 14, .18);
}
.bottom-nav a {
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--muted);
  border-radius: 17px;
  font-size: 11px;
  font-weight: 900;
}
.bottom-nav a.is-active {
  background: transparent;
  color: var(--red);
}
.bottom-nav svg {
  width: 21px;
  height: 21px;
  padding: 7px;
  box-sizing: content-box;
  border-radius: 15px;
  background: #eef1f5;
  color: #4d5563;
  stroke-width: 2.35;
}
.bottom-nav a.is-active svg {
  background: var(--red);
  color: white;
  box-shadow: 0 9px 22px rgba(181, 18, 27, .28);
}

.member-modal {
  border: 0;
  border-radius: 30px;
  padding: 0;
  background: transparent;
}
.member-modal::backdrop { background: rgba(18, 16, 14, .54); backdrop-filter: blur(8px); }
.modal-card {
  position: relative;
  width: min(360px, calc(100vw - 32px));
  background: white;
  border-radius: 30px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.close-button {
  position: absolute;
  right: 14px;
  top: 14px;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}
.modal-card h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 44px;
}
.fake-qr, .scanner-frame {
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: var(--ink);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 22px;
}
.fake-qr span { background: white; border-radius: 4px; }
.modal-card small { display: block; margin-top: 5px; color: var(--muted); }
.scanner-frame {
  display: grid;
  place-items: center;
  color: white;
  outline: 8px solid #fff0eb;
}
.scanner-frame svg { width: 82px; height: 82px; }
.redeem-card strong { display: block; line-height: 1.35; }

.v3-page-shell {
  width: min(720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px 172px;
}

.v3-page-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 8px 0 14px;
  background: linear-gradient(#f4f5f7 70%, rgba(244, 245, 247, 0));
}

.page-hero-card {
  position: relative;
  min-height: 230px;
  border-radius: 30px;
  overflow: hidden;
  padding: 24px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.95)),
    url("../../assets/hero-smansa-courtyard.jpg") center / cover;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 14px 34px rgba(18, 16, 14, .08);
}

.page-hero-card > :not(.map-dots) {
  position: relative;
  z-index: 1;
}

.page-hero-card.ink,
.page-hero-card.benefit {
  color: white;
  background:
    linear-gradient(135deg, rgba(18, 16, 14, .94), rgba(181, 18, 27, .82)),
    url("../../assets/hero-smansa01.jpg") center / cover;
  border-color: rgba(255,255,255,.12);
}

.page-hero-card.map {
  min-height: clamp(370px, 54vw, 410px);
  padding: clamp(22px, 5vw, 36px);
  background:
    radial-gradient(circle at 72% 24%, rgba(181,18,27,.16), transparent 20%),
    radial-gradient(circle at 34% 24%, rgba(200,154,69,.18), transparent 24%),
    linear-gradient(135deg, #fff, #eef1f5);
}

.page-hero-card.map h1 {
  max-width: 500px;
  font-size: clamp(36px, 6.8vw, 50px);
  line-height: .98;
}

.page-hero-card h1 {
  margin: 0;
  max-width: 520px;
  font-family: var(--serif);
  font-size: clamp(42px, 9vw, 66px);
  line-height: .92;
  letter-spacing: 0;
}

.search-field {
  margin-top: 22px;
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.search-field input {
  width: 100%;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  padding: 0 16px;
  color: var(--ink);
  font: 700 16px var(--sans);
  outline: none;
}

.v3-filter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.v3-filter-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v3-filter-row select {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  padding: 0 10px;
  font: 800 13px var(--sans);
  outline: none;
}

.v3-meta {
  margin: 14px 2px 0;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.mini-list,
.class-grid,
.city-list,
.story-list,
.benefit-list-page,
.profile-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.mini-person,
.v3-person-card,
.class-card,
.city-list a,
.story-list a,
.benefit-list-page article,
.profile-actions a {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(18, 16, 14, .05);
}

.v3-auth-panel,
.v3-claim-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 26px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(18, 16, 14, .05);
}

.v3-auth-panel[hidden],
.v3-claim-panel[hidden],
.profile-actions[hidden] {
  display: none;
}

.v3-auth-form {
  display: none;
  gap: 12px;
}

.v3-auth-form.is-active {
  display: grid;
}

.v3-auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v3-auth-form input,
.v3-auth-form select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  color: var(--ink);
  padding: 0 14px;
  font: 800 15px var(--sans);
  outline: none;
  text-transform: none;
  letter-spacing: 0;
}

.v3-auth-form button,
.v3-logout-button,
.v3-ghost-button {
  border: 0;
  min-height: 48px;
  border-radius: 17px;
  background: var(--red);
  color: white;
  padding: 0 16px;
  font-weight: 900;
}

.v3-auth-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.v3-auth-links.single {
  margin-top: 2px;
}

.v3-auth-links span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.v3-auth-links button {
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--red);
  padding: 4px 0;
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(181, 18, 27, .28);
  text-underline-offset: 3px;
}

.v3-logout-button {
  width: 100%;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: 0 10px 26px rgba(18, 16, 14, .05);
}

.v3-ghost-button {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.v3-alert {
  display: none;
  border-radius: 16px;
  padding: 12px 13px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.v3-alert.is-error,
.v3-alert.is-info,
.v3-alert.is-success,
.v3-alert.is-warn {
  display: block;
}

.v3-alert.is-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.v3-alert.is-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.v3-alert.is-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.v3-alert.is-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

.v3-claim-panel h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -.03em;
}

.v3-claim-panel p:not(.eyebrow) {
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.v3-claim-list {
  display: grid;
  gap: 9px;
  margin: 12px 0;
}

.v3-claim-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  padding: 14px;
  text-align: left;
}

.v3-claim-item b {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.v3-claim-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.v3-person-card {
  width: 100%;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  text-align: left;
  align-items: center;
}

.v3-person-card:hover {
  border-color: rgba(181, 18, 27, .38);
  transform: translateY(-2px);
}

.v3-avatar {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: var(--red);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.v3-avatar.big {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 28px;
  font-size: 28px;
}

.v3-person-main {
  display: block;
  min-width: 0;
}

.v3-person-main b {
  display: block;
  color: var(--ink);
  font-size: 19px;
  letter-spacing: -.03em;
}

.v3-person-main small {
  display: block;
  margin-top: 2px;
  color: var(--red);
  font-weight: 900;
}

.v3-person-main em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.32;
}

.v3-lock-card,
.v3-empty,
.v3-show-more {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 24px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
}

.v3-lock-card {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.v3-lock-card span {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: #fff1ec;
  color: var(--red);
  font-size: 24px;
}

.v3-lock-card b {
  max-width: 280px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.12;
}

.v3-lock-card p {
  max-width: 320px;
  margin: 0;
  line-height: 1.5;
}

.v3-lock-card a,
.v3-show-more {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--red);
  color: white;
  border-radius: 16px;
  padding: 0 18px;
  font-weight: 900;
}

.v3-show-more {
  width: 100%;
  cursor: pointer;
}

.v3-profile-dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  overflow: visible;
}

.v3-profile-dialog::backdrop {
  background: rgba(18, 16, 14, .68);
  backdrop-filter: blur(12px) saturate(.8);
}

.v3-profile-modal {
  position: relative;
  width: 100%;
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 32px;
  background: #fbfaf7;
  box-shadow: 0 30px 90px rgba(18, 16, 14, .34);
  color: var(--ink);
  text-align: left;
  overscroll-behavior: contain;
}

.v3-profile-topline {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 18px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.v3-profile-topline > span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(18, 16, 14, .54);
  backdrop-filter: blur(12px);
  color: white;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.v3-profile-close {
  pointer-events: auto;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 8px 24px rgba(18, 16, 14, .16);
  color: var(--ink);
  backdrop-filter: blur(12px);
}

.v3-profile-close span {
  margin-top: -2px;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}

.v3-profile-close:hover {
  background: white;
  transform: translateY(-1px);
}

.v3-profile-close:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, .92),
    0 8px 24px rgba(18, 16, 14, .16);
}

.v3-profile-visual {
  padding: 74px 16px 16px;
  background:
    radial-gradient(circle at 80% -10%, rgba(229, 34, 49, .52), transparent 38%),
    linear-gradient(145deg, #26090c 0%, #711018 48%, #b5121b 100%);
}

.v3-profile-story-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 13px;
  color: white;
}

.v3-profile-story-head span {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}

.v3-profile-story-head p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, .66);
  font-size: 11px;
  font-weight: 700;
}

.v3-profile-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.v3-photo-item {
  position: relative;
  aspect-ratio: 4 / 5;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 22px;
  background: #351216;
  box-shadow: 0 16px 34px rgba(18, 16, 14, .24);
}

.v3-photo-item::after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(transparent, rgba(10, 7, 6, .84));
  pointer-events: none;
}

.v3-photo-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.v3-photo-item figcaption {
  position: absolute;
  z-index: 1;
  left: 14px;
  right: 14px;
  bottom: 13px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  color: white;
}

.v3-photo-item figcaption strong {
  font-size: 13px;
  line-height: 1.15;
}

.v3-photo-item figcaption span {
  color: rgba(255, 255, 255, .7);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v3-profile-photos.is-single {
  grid-template-columns: 1fr;
}

.v3-profile-photos.is-single .v3-photo-item {
  aspect-ratio: 16 / 10;
}

.v3-profile-monogram {
  min-height: 250px;
  display: grid;
  place-content: center;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .16), transparent 38%),
    rgba(18, 16, 14, .16);
  color: white;
  text-align: center;
}

.v3-profile-monogram span {
  font-family: var(--serif);
  font-size: clamp(86px, 28vw, 128px);
  font-weight: 700;
  line-height: .8;
  letter-spacing: -.08em;
}

.v3-profile-monogram p {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, .66);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.v3-profile-content {
  padding: 24px 22px calc(22px + env(safe-area-inset-bottom));
}

.v3-profile-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.v3-profile-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: #fde9e8;
  color: var(--red);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.v3-profile-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 10vw, 48px);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.v3-profile-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.v3-profile-tribute {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin-top: 18px;
  border: 1px solid #dce1e7;
  border-radius: 18px;
  padding: 12px 14px;
  background: #f1f3f5;
  color: #52606d;
}

.v3-profile-tribute > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: white;
}

.v3-profile-tribute p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
}

.v3-profile-tribute strong {
  display: block;
  color: #364152;
  font-size: 12px;
}

.v3-profile-facts {
  display: grid;
  grid-template-columns: minmax(112px, .72fr) minmax(0, 1.45fr);
  gap: 9px;
  margin: 20px 0 0;
}

.v3-profile-facts > div {
  min-width: 0;
  border: 1px solid #e5e4e0;
  border-radius: 18px;
  padding: 13px 14px 14px;
  background: #f3f1ed;
}

.v3-profile-facts dt {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.v3-profile-facts dt svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.v3-profile-facts dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.v3-profile-signoff {
  margin: 18px 0 0;
  color: #9297a0;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}

.v3-profile-modal.is-alm .v3-profile-visual {
  background:
    radial-gradient(circle at 78% 0%, rgba(148, 163, 184, .32), transparent 38%),
    linear-gradient(145deg, #18202a 0%, #3b4857 55%, #687585 100%);
}

.v3-profile-modal.is-alm .v3-photo-item img {
  filter: grayscale(.72) saturate(.55);
}

.v3-profile-modal.is-alm .v3-profile-avatar {
  background: #e8edf1;
  color: #52606d;
}

@media (max-width: 600px) {
  .v3-profile-dialog {
    width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
  }

  .v3-profile-modal {
    max-height: 92dvh;
    border-width: 1px 0 0;
    border-radius: 32px 32px 0 0;
  }
}

@media (max-width: 370px) {
  .v3-profile-visual {
    padding-inline: 12px;
  }

  .v3-profile-content {
    padding-inline: 17px;
  }

  .v3-profile-facts {
    grid-template-columns: 1fr;
  }
}

.mini-person b,
.class-card b,
.city-list b,
.story-list b,
.benefit-list-page b,
.profile-actions b {
  display: block;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -.03em;
}

.mini-person span,
.class-card span,
.city-list span,
.story-list span,
.benefit-list-page span,
.profile-actions span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.42;
}

.class-grid {
  grid-template-columns: repeat(2, 1fr);
}

.class-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.class-card b {
  font-family: var(--serif);
  font-size: clamp(32px, 8vw, 42px);
  line-height: .94;
  color: var(--red);
  overflow-wrap: anywhere;
}

.map-dots {
  position: absolute;
  inset: 0 0 auto;
  height: 48%;
  pointer-events: none;
  z-index: 0;
}

.map-dots i {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 4px solid white;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 14px 34px rgba(181,18,27,.28);
}
.map-dots i:nth-child(1) { left: 18%; top: 58%; }
.map-dots i:nth-child(2) { left: 45%; top: 68%; background: var(--gold); }
.map-dots i:nth-child(3) { left: 68%; top: 44%; }
.map-dots i:nth-child(4) { left: 83%; top: 70%; background: var(--ink); }
.map-dots i:nth-child(5) { left: 34%; top: 28%; background: var(--blue); }

@media (max-width: 520px) {
  .page-hero-card.map {
    min-height: 360px;
  }
  .page-hero-card.map h1 {
    font-size: clamp(34px, 10.2vw, 42px);
  }
  .map-dots { height: 43%; }
  .map-dots i:nth-child(1) { left: 16%; top: 62%; }
  .map-dots i:nth-child(2) { left: 46%; top: 66%; }
  .map-dots i:nth-child(3) { left: 72%; top: 43%; }
  .map-dots i:nth-child(4) { left: 82%; top: 70%; }
  .map-dots i:nth-child(5) { left: 35%; top: 25%; }
}

.story-list a small,
.benefit-list-page small {
  display: inline-flex;
  width: max-content;
  margin-bottom: 10px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 900;
}

.benefit-list-page article {
  display: grid;
  gap: 8px;
}

.benefit-list-page button {
  margin-top: 8px;
  border: 0;
  background: var(--red);
  color: white;
  min-height: 44px;
  border-radius: 16px;
  font-weight: 900;
}

.member-page-card {
  margin-top: 12px;
  min-height: 240px;
}

.benefit-list-page,
.profile-actions,
.story-list,
.city-list,
.class-grid,
.mini-list {
  margin-bottom: 112px;
}

.v3-page-shell + .bottom-nav {
  display: grid;
}

@media (max-width: 980px) {
  body { background: #f4f5f7; }
  .app-shell {
    display: block;
    width: 100%;
    padding: 0;
  }
  .desktop-rail, .desktop-preview { display: none; }
  .phone-app {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: calc(14px + env(safe-area-inset-top)) 14px 168px;
  }
  #benefit { margin-top: 150px; }
  .bottom-nav { display: grid; }
}

@media (min-width: 981px) {
  .v3-page-shell + .bottom-nav {
    left: 50%;
    right: auto;
    width: min(430px, calc(100% - 32px));
    transform: translateX(-50%);
  }
}

@media (max-width: 370px) {
  .quick-grid { gap: 8px; }
  .quick-tile { min-height: 98px; padding: 10px 8px; }
  .quick-tile strong { font-size: 13px; }
  .greeting-panel { grid-template-columns: 1fr; }
  .member-chip { width: 100%; height: 58px; display: flex; }
}
:root {
  --v3-beta-red: #b5121b;
}

.v3-beta-notice {
  position: fixed;
  z-index: 10000;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(181, 18, 27, 0.94);
  box-shadow: 0 8px 24px rgba(42, 10, 12, 0.2);
  color: #fff;
  font: 800 10px/1.1 Arial, sans-serif;
  letter-spacing: 0.12em;
  pointer-events: none;
}
