:root {
  --forest: #072014;
  --forest-soft: #0b2d1c;
  --emerald: #0d6e3f;
  --emerald-bright: #14935a;
  --paper: #f4efe4;
  --paper-deep: #e7ddcc;
  --ink: #183426;
  --muted: #756f65;
  --gold: #c9a35c;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--forest); }

body {
  min-height: 100vh;
  margin: 0;
  color: #fff;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(39, 142, 90, .32), transparent 42%),
    linear-gradient(160deg, #04170e 0%, var(--forest) 48%, #0a2a1a 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

a { color: inherit; }

.share-shell {
  position: relative;
  width: min(100%, 1040px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 26px 22px 42px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .12em;
}

.brand img { width: 38px; height: 38px; border-radius: 9px; }

.share-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 26px;
  align-items: stretch;
  margin-top: 26px;
}

.ticket {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 30px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 36px 90px rgba(0,0,0,.38);
}

.ticket::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    repeating-linear-gradient(95deg, rgba(64, 43, 21, .025) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(4deg, rgba(255, 255, 255, .12) 0 1px, transparent 1px 7px);
  background-size: auto;
  mix-blend-mode: multiply;
}

.ticket-hero {
  position: relative;
  min-height: 275px;
  display: flex;
  align-items: flex-end;
  padding: 26px;
  overflow: hidden;
  background:
    linear-gradient(to top, rgba(2,20,11,.96), rgba(2,20,11,.12) 70%),
    linear-gradient(135deg, #0c5030, #061a10);
}

.ticket-hero.has-image { background-size: cover; background-position: center; }

.ticket-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(8,76,44,.2), rgba(0,0,0,.1));
}

.hero-copy { position: relative; z-index: 1; width: 100%; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  color: rgba(255,255,255,.9);
  background: rgba(4,28,16,.58);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-title {
  max-width: 720px;
  margin: 14px 0 5px;
  color: #fff;
  font-family: "Bebas Neue", "DM Sans", sans-serif;
  font-size: clamp(48px, 8vw, 78px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: .01em;
}

.hero-subtitle { margin: 0; color: rgba(255,255,255,.78); font-size: 15px; font-weight: 600; }

.ticket-body { position: relative; z-index: 1; padding: 26px; }

.matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid #d8cebd;
}

.team { min-width: 0; text-align: center; }
.team img, .entity-mark img {
  width: 82px;
  height: 82px;
  padding: 8px;
  object-fit: contain;
  border-radius: 20px;
  background: rgba(255,255,255,.75);
  box-shadow: inset 0 0 0 1px rgba(24,52,38,.08);
}
.team-name { margin-top: 9px; font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.score { font-family: "JetBrains Mono", monospace; font-size: clamp(29px, 6vw, 48px); font-weight: 700; white-space: nowrap; }
.score-note { margin-top: 4px; color: var(--muted); text-align: center; font-size: 10px; font-weight: 800; letter-spacing: .12em; }

.entity-overview { display: flex; gap: 20px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid #d8cebd; }
.entity-mark { flex: 0 0 auto; }
.entity-mark img { width: 104px; height: 104px; }
.entity-summary h2 { margin: 0 0 6px; font-size: clamp(26px, 5vw, 40px); line-height: 1.05; }
.entity-summary p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.fact { min-width: 0; padding: 14px; border-radius: 15px; background: rgba(255,255,255,.55); border: 1px solid rgba(24,52,38,.08); }
.fact-label { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.fact-value { margin-top: 5px; font-family: "JetBrains Mono", monospace; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }

.conversion {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 30px;
  background: rgba(255,255,255,.07);
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
  backdrop-filter: blur(18px);
}

.conversion-icon { width: 60px; height: 60px; border-radius: 15px; }
.conversion h2 { margin: 20px 0 9px; font-size: 30px; line-height: 1.05; }
.conversion > p { margin: 0 0 22px; color: rgba(255,255,255,.66); font-size: 15px; line-height: 1.55; }

.open-app {
  display: none;
  justify-content: center;
  align-items: center;
  min-height: 54px;
  padding: 14px 18px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald-bright), var(--emerald));
  box-shadow: 0 13px 28px rgba(7,107,60,.34);
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
}

.website-link {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 54px;
  padding: 14px 18px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald-bright), var(--emerald));
  box-shadow: 0 13px 28px rgba(7,107,60,.34);
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
}

.native-mobile .open-app { display: flex; }
.native-mobile .website-link { display: none; }

.unavailable .open-app {
  display: flex;
}

.store-label { margin: 22px 0 11px; color: rgba(255,255,255,.55); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.store-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.store-actions a { display: block; }
.store-actions img { display: block; width: auto; height: 44px; }

.desktop-qr { display: flex; gap: 14px; align-items: center; margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); }
.desktop-qr img { width: 82px; height: 82px; padding: 7px; border-radius: 11px; background: #fff; }
.desktop-qr p { margin: 0; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.45; }

.share-footer { margin-top: 24px; color: rgba(255,255,255,.44); text-align: center; font-size: 11px; }
.share-footer a { text-underline-offset: 3px; }

.unavailable { text-align: center; padding: 80px 28px; }
.unavailable img { width: 72px; height: 72px; border-radius: 18px; }
.unavailable h1 { margin: 22px 0 9px; font-size: 38px; }
.unavailable p { max-width: 470px; margin: 0 auto 24px; color: rgba(255,255,255,.65); line-height: 1.6; }

@media (max-width: 760px) {
  .share-shell { padding: 18px 14px 30px; }
  .share-stage { grid-template-columns: 1fr; margin-top: 18px; gap: 16px; }
  .ticket { min-height: 0; border-radius: 23px; }
  .ticket-hero { min-height: 230px; padding: 21px; }
  .ticket-body { padding: 20px; }
  .conversion { padding: 24px 21px; border-radius: 23px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .desktop-qr { display: none; }
  .store-actions { justify-content: center; }
  .store-actions img { height: 46px; }
}

@media (max-width: 420px) {
  .team img, .entity-mark img { width: 68px; height: 68px; border-radius: 16px; }
  .entity-mark img { width: 82px; height: 82px; }
  .matchup { gap: 9px; }
  .team-name { font-size: 12px; }
  .score { font-size: 26px; }
}

@media (prefers-reduced-motion: no-preference) {
  .ticket, .conversion { animation: rise .45s ease-out both; }
  .conversion { animation-delay: .08s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
}
