:root {
  --bg: #070706;
  --ink: #f6efe3;
  --mute: rgba(246, 239, 227, 0.38);
  --line: rgba(201, 168, 106, 0.16);
  --gold: #c9a86a;
  --like: #d4c0a0;
  --pass: #8a8680;
  --safe: env(safe-area-inset-top, 0px);
  --safeb: env(safe-area-inset-bottom, 0px);
  --chrome-h: 104px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

img, video {
  max-width: 100%;
  max-height: 100vh;
  max-height: 100dvh;
  max-height: calc(100dvh - var(--chrome-h) - var(--safe) - var(--safeb));
  width: auto;
  height: auto;
  object-fit: contain;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Didot", "Bodoni 72", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.wordmark {
  font-size: 28px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 400;
}
.wordmark.sm {
  font-size: 13px;
  letter-spacing: 0.34em;
  opacity: 0.55;
}

.gate {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse at 50% 18%, #14110d 0%, var(--bg) 62%);
  padding: 32px;
  z-index: 40;
}
.gate-inner { max-width: 360px; text-align: center; }
.gate-kicker {
  margin-top: 18px;
  letter-spacing: 0.32em;
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
}
.gate-copy {
  margin: 22px 0 36px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mute);
}
.gate-btn {
  display: block; width: 100%;
  padding: 15px 20px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  background: transparent;
  color: var(--gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font: inherit; font-size: 11px;
  cursor: pointer;
}
.gate-btn:active { background: rgba(196, 165, 116, 0.12); }
.gate-leave {
  margin-top: 18px;
  background: none; border: 0;
  color: var(--mute);
  font: inherit; font-size: 13px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  height: 100%;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  padding-top: var(--safe);
}
.heat { display: none; }
.mode-browse .heat { display: none; }

.rank-banner {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(201, 168, 106, 0.72);
  padding: 2px 20px 4px;
}

.topbar {
  position: relative; z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + var(--safe)) 20px 8px;
}
.ghost {
  background: none; border: 0;
  color: var(--mute);
  font: inherit; font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
}
.ghost.on { color: var(--ink); }
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.side-toggles {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 6;
  pointer-events: auto;
}
.era,
.view-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.era button,
.view-bar button {
  min-width: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 11, 12, 0.45);
  color: var(--mute);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.16em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.view-bar button { min-width: 52px; }
.era button.on,
.view-bar button.on {
  color: var(--gold);
  border-color: rgba(196, 165, 116, 0.55);
}

.deck {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  margin: 4px 14px 8px;
  border-radius: 12px;
  overflow: hidden;
}
.card {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  background: #141416;
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
  will-change: transform;
  touch-action: none;
}
.card.next {
  transform: scale(0.96);
  opacity: 0.55;
  z-index: 1;
}
.card.current { z-index: 2; }
.card img,
.card video {
  max-width: 100%;
  max-height: 100%;
  max-height: min(100%, calc(100dvh - var(--chrome-h) - var(--safe) - var(--safeb)));
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
.card video {
  background: #141416;
}
.card.fly {
  transition: transform 280ms cubic-bezier(.2,.8,.2,1), opacity 280ms ease;
}
.card.settle {
  transition: transform 220ms cubic-bezier(.2,.7,.2,1);
}
.card.stage-in {
  animation: stageIn 280ms cubic-bezier(.2,.7,.2,1);
}
.card.stage-back {
  animation: stageBack 280ms cubic-bezier(.2,.7,.2,1);
}
@keyframes stageIn {
  from { transform: translateY(14%) scale(0.98); opacity: 0.35; }
  to   { transform: none; opacity: 1; }
}
@keyframes stageBack {
  from { transform: translateY(-14%) scale(0.98); opacity: 0.35; }
  to   { transform: none; opacity: 1; }
}

.stamp {
  position: absolute; top: 36px; left: 24px;
  padding: 8px 14px;
  border: 2px solid var(--like);
  color: var(--like);
  letter-spacing: 0.28em;
  font-size: 18px;
  opacity: 0;
  transform: rotate(-12deg);
  pointer-events: none;
}
.stamp-pass {
  left: auto; right: 24px;
  border-color: var(--pass); color: var(--pass);
  transform: rotate(12deg);
}

.dots {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px;
  z-index: 6;
  pointer-events: none;
}
.dots i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(244,240,234,0.28);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
}
.dots i.on {
  background: var(--ink);
  transform: scale(1.35);
}
.dots i.gone {
  opacity: 0.18;
}

.meta {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 22px 4px;
  font-size: 15px;
  letter-spacing: 0.2em;
}
.elo { color: var(--mute); font-size: 12px; letter-spacing: 0.16em; }
.hint {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(78px + var(--safeb));
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--mute);
  pointer-events: none;
  transition: opacity 600ms ease;
}
.hint.gone { opacity: 0; }

.sheet {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 20;
  display: flex; align-items: flex-end;
}
.sheet-panel {
  width: 100%;
  max-height: 72%;
  background: #121214;
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  padding: 18px 20px calc(24px + var(--safeb));
  overflow: auto;
}
.sheet-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--mute);
}
.top-list { list-style: none; }
.top-list li {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  letter-spacing: 0.08em;
}
.top-list img {
  width: 44px; height: 56px;
  object-fit: cover;
  border-radius: 6px;
  background: #1a1a1c;
}
.top-list .sub { color: var(--mute); font-size: 12px; letter-spacing: 0.12em; }
.top-list .score { color: var(--gold); font-size: 13px; letter-spacing: 0.08em; }

[hidden] { display: none !important; }

/* Mash — head to head */
.wordmark.sm {
  text-decoration: none;
  color: inherit;
}
.mash-app {
  background:
    radial-gradient(ellipse at 50% 0%, #12100c 0%, var(--bg) 58%);
}
.mash-arena {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  justify-items: stretch;
  gap: 0 10px;
  padding: 4px 14px 8px;
  overflow: hidden;
}
.mash-slot {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
}
.mash-side {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #141416;
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mash-side img,
.mash-side video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center top;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
.mash-side:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}
.mash-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  color: var(--mute);
  letter-spacing: 0.28em;
  text-transform: lowercase;
  font-size: 11px;
  pointer-events: none;
}
.mash-vs span {
  opacity: 0.7;
}
.mash-hint {
  position: static;
  padding: 0 22px calc(16px + var(--safeb));
}
.mash-side.win {
  animation: mashWin 220ms cubic-bezier(.2,.7,.2,1);
  z-index: 2;
}
.mash-side.lose {
  animation: mashLose 220ms cubic-bezier(.2,.8,.2,1) forwards;
}
.mash-side.enter {
  animation: mashEnter 180ms ease;
}
@keyframes mashWin {
  0% { transform: scale(1); }
  45% { transform: scale(1.025); }
  100% { transform: scale(1); }
}
@keyframes mashLose {
  to { opacity: 0; transform: scale(0.94); }
}
@keyframes mashEnter {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .mash-app .topbar {
    padding: calc(8px + var(--safe)) 10px 4px;
  }
  .mash-app .rank-banner,
  .mash-app .mash-hint {
    display: none;
  }
  .mash-app .nav {
    gap: 10px;
  }
  .mash-app .ghost {
    font-size: 10px;
  }
  .mash-arena {
    grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0 4px;
    padding: 2px 6px calc(8px + var(--safeb));
  }
  .mash-vs {
    width: 16px;
    font-size: 9px;
    letter-spacing: 0.08em;
  }
  .mash-side {
    height: 100%;
    min-height: 0;
    border-radius: 10px;
  }
  .mash-side img,
  .mash-side video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center top;
  }
  .zoom-btn {
    width: 36px;
    height: 36px;
    bottom: 8px;
    right: 8px;
  }
}

.like-flash {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
}
.like-flash.pop {
  animation: likePop 520ms ease;
}
.like-flash .heart {
  font-size: 92px;
  line-height: 1;
  color: #f2c9c9;
  text-shadow: 0 8px 28px rgba(0,0,0,0.45);
}
@keyframes likePop {
  0% { opacity: 0; transform: scale(0.35); }
  30% { opacity: 1; transform: scale(1.12); }
  100% { opacity: 0; transform: scale(1); }
}

.top-list .empty-row {
  grid-template-columns: 1fr;
  color: var(--mute);
}

.mash-stage {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mash-stage .mash-arena {
  flex: 1 1 0;
}
.mash-intro {
  position: absolute;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  background: var(--bg);
  pointer-events: auto;
}
.intro-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0;
  opacity: 0;
  will-change: left, top, width, height, border-radius, opacity;
  pointer-events: none;
}
.mash-intro .intro-shot,
.intro-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center top;
  opacity: 1;
  transform: scale(1.08);
  will-change: transform;
  pointer-events: none;
  -webkit-user-drag: none;
}
.mash-intro {
  will-change: opacity;
}
.mash-stage.intro-lock .mash-arena {
  pointer-events: none;
}
.mash-stage.intro-lock .zoom-btn {
  opacity: 0;
  pointer-events: none;
}

.zoom-btn {
  position: absolute;
  z-index: 5;
  right: 10px;
  bottom: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(244, 240, 234, 0.22);
  border-radius: 999px;
  background: rgba(11, 11, 12, 0.55);
  color: var(--ink);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.zoom-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.zoom-btn:active {
  background: rgba(196, 165, 116, 0.28);
}
.zoom-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: calc(18px + var(--safe)) 16px calc(22px + var(--safeb));
}
.zoom-view img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
}
.zoom-close {
  position: absolute;
  top: calc(12px + var(--safe));
  right: 16px;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
}

.zoom-view video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.mode-videos .dots,
.mode-videos .side-toggles {
  display: none;
}

.report-btn {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(244, 240, 234, 0.22);
  border-radius: 999px;
  background: rgba(11, 11, 12, 0.55);
  color: var(--ink);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.report-btn svg { width: 17px; height: 17px; display: block; }
.report-btn:active { background: rgba(196, 165, 116, 0.28); }
.mash-stage.intro-lock .report-btn { opacity: 0; pointer-events: none; }
.card .report-btn { pointer-events: auto; }

.report-app { overflow: hidden; touch-action: auto; }
.report-wrap {
  flex: 1;
  overflow: auto;
  padding: 12px 22px 20px;
  max-width: 520px;
  margin: 0 auto;
}
.report-title {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin: 8px 0 10px;
}
.report-lead, .report-help, .report-missing, .report-status {
  color: var(--mute);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0.02em;
}
.report-help { display: block; margin: 4px 0 8px; font-size: 12px; }
.report-preview {
  margin: 18px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #141416;
  max-height: 280px;
}
.report-preview img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center top;
  max-height: none;
}
.report-form { display: grid; gap: 16px; margin-top: 18px; }
.report-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.report-form input[type="email"],
.report-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #141416;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: none;
}
.report-form input[type="file"] { color: var(--ink); font-size: 13px; letter-spacing: 0; text-transform: none; }
.report-form .gate-btn { margin-top: 6px; }

.dock {
  position: relative;
  z-index: 12;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px calc(10px + var(--safeb));
  border-top: 1px solid rgba(201, 168, 106, 0.22);
  background: rgba(7, 7, 6, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.menu-btn {
  width: 44px;
  height: 44px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
}
.menu {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
}
.menu-panel {
  width: 100%;
  background: #121214;
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  padding: 10px 10px calc(18px + var(--safeb));
}
.menu-panel a,
.menu-panel button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 16px;
  border-bottom: 1px solid var(--line);
}
.menu-panel a:last-child,
.menu-panel button:last-child { border-bottom: 0; }
.terms {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-transform: none;
}
.terms p { margin-bottom: 8px; color: var(--ink); }
.terms ul { padding-left: 18px; display: grid; gap: 6px; }
.agree {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  font-size: 14px !important;
  color: var(--ink) !important;
}
.agree input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold); }
.opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--mute); }

.brand {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 16px 2px;
  z-index: 5;
}
.brand-link {
  display: block;
  line-height: 0;
}
.brand img,
.brand-gate img {
  display: block;
  height: 32px;
  width: auto;
  max-width: min(84vw, 380px);
  max-height: none;
  object-fit: contain;
  object-position: center;
}
.brand-gate {
  display: flex;
  justify-content: center;
  margin: 0;
}
.brand-gate img {
  height: 48px;
  max-width: min(88vw, 460px);
}
@media (min-width: 720px) {
  .brand img { height: 40px; max-width: 480px; }
}


.promo {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: block;
  background: #000;
  cursor: pointer;
}
.promo[hidden] { display: none !important; }
.promo video,
.promo #promo-video {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  pointer-events: none;
}
