/* ImageGen-derived chrome; real text/links stay semantic HTML. */
.play-button{gap:.12em;border:12px solid transparent;border-radius:0;border-image-source:url('/assets/button-primary.webp');border-image-slice:55 180 54 175 fill;border-image-width:22px 48px;border-image-repeat:stretch;background:none;box-shadow:none;padding:8px 35px 12px;line-height:1;isolation:isolate}
.play-button span{font-size:.42em;line-height:1;position:relative;transform:translateY(.12em);flex:none}
.play-button .play-arrow{display:block;width:.4em;height:.55em;object-fit:contain;flex:none;transform:translateY(.035em)}
.tagline-ribbon{border:12px solid transparent;border-image:url('/assets/panel.webp') 92 130 95 129 fill / 20px 34px stretch;background:none}
.tagline-ribbon:before,.tagline-ribbon:after{content:none}
.magic-card{border:10px solid transparent;border-radius:0;border-image:url('/assets/card-frame.webp') 90 90 89 89 / 14px stretch;box-shadow:none;background:#131723}
.magic-card figcaption{border:0;background:url('/assets/parchment.webp') center/100% 100% no-repeat}
.deck-motif img{height:100%;width:auto;aspect-ratio:2/3;object-fit:cover;border:1px solid #d8ab62}
.deck-motif img:first-child{transform:rotate(-12deg)}
.deck-motif img:last-child{transform:rotate(12deg)}
.steps,.rules-grid{grid-auto-columns:minmax(0,1fr);gap:14px}
.steps li,.rules-grid article{min-width:0;user-select:text;border:12px solid transparent;border-image:url('/assets/panel.webp') 92 130 95 129 fill / 23px 32px stretch;background:none}
.steps p,.rules-grid p{user-select:text;cursor:text}
.guide-image{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain;background:#0d101a;margin:12px 0;user-select:none}
@media(max-width:760px){.play-button{gap:.12em;padding-inline:26px}.tagline-ribbon{padding-inline:15px}.deck-motif img{max-height:62px}}
.school-crest { width: 1.05em; height: 1.05em; vertical-align: -.12em; object-fit: contain; }
.clash { object-fit: contain; }
.parchment{border:12px solid transparent;border-image:url('/assets/paper-panel.webp') 100 100 100 100 fill / 25px stretch;background:none;box-shadow:none}
.parchment:before,.parchment:after{content:none}
.step-number{border:0;transform:none;width:48px;height:48px;background:url('/assets/timer.webp') center/contain no-repeat;font-size:18px}
.divider{font-size:0;background:url('/assets/divider.webp') center/contain no-repeat;height:33px}
.divider:before,.divider:after{content:none}
/* Opposed transparent action figures keep their generated violet/gold lighting. */
.hero:before{background:linear-gradient(0deg,#18131e 0%,transparent 30%,#21162e0a 90%)}
.hero:after{box-shadow:inset 0 -18px 42px #15131c}
.arena img{opacity:.95}
.champion-left,.champion-right{transform:none;mask-image:linear-gradient(0deg,transparent,#000 16%,#000 100%)}
.champion-left{left:-10%}.champion-right{right:-10%}
.champion-left img,.champion-right img{object-fit:contain;object-position:center bottom}
@media(min-width:761px){.hero-center{align-self:center}.logo{width:clamp(320px,38svh,430px);margin-bottom:0}.champion{top:2%;height:98%;width:59%}.hero{min-height:720px}.card-pair{margin-top:10px}}
@media(min-width:761px) and (max-height:760px){.hero{min-height:670px}.logo{width:290px}.card-pair{height:150px}}
@media(max-width:760px){.hero{gap:14px;padding-inline:14px}.champion{top:145px;height:460px;width:90%;opacity:.95}.champion-left{left:-43%}.champion-right{right:-43%}.parchment{padding:12px 6px;min-height:180px}.parchment h2{font-size:20px;line-height:1.12;hyphens:none;overflow-wrap:normal}.parchment p{font-size:12px}.hero-links{display:grid;grid-template-columns:repeat(3,auto);gap:3px;justify-content:space-evenly}.hero-links .divider{display:none}.hero-links a{font-size:16px;gap:5px;padding:5px 2px}.hero-links img{width:24px;height:24px}}
@media(max-width:760px){.logo{margin-bottom:110px}.champion{top:245px;height:350px;opacity:1}.champion-left{left:-18%}.champion-right{right:-8%}}
@media(max-width:760px){.champion-left{mask-image:linear-gradient(90deg,#000 58%,transparent 70%)}.champion-right{mask-image:linear-gradient(90deg,transparent 30%,#000 42%)}}
/* Keep Play in the first usable phone viewport, including expanded browser bars. */
.hero-center > .play-button{margin-top:8px;scroll-margin-bottom:calc(24px + env(safe-area-inset-bottom))}
@media(max-width:760px){.logo{width:clamp(160px,30svh,220px);margin-bottom:12px}.hero-links{display:flex;flex-wrap:wrap;justify-content:center}}

/* Landing composition uses separate art, copy, and controls. */
.site-header {
  position: relative;
  justify-content: flex-start;
  gap: clamp(10px, 3vw, 54px);
  padding: 5px 5%;
  background: #181522 url('/assets/slate-tile.webp') center / 460px auto;
  border-bottom: 1px solid var(--brass);
}
.site-header .logo { width: auto; height: clamp(50px, 4.3vw, 65px); margin: 0; }
.header-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(9px, 3vw, 38px);
  margin-inline-start: auto;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: bold;
}
.header-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.header-links a + a { border-inline-start: 1px solid var(--brass); padding-inline-start: clamp(9px, 3vw, 38px); }
.header-links a:hover { text-decoration: underline; }
.native-downloads {
  max-width: 1480px;
  margin: 0 auto;
  padding: 23px clamp(14px, 4vw, 56px);
  border: 14px solid transparent;
  border-image: url('/assets/paper-panel.webp') 100 fill / 32px stretch;
  color: #28180e;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 34px);
  align-items: center;
}
.native-downloads h2 {
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 4vw, 54px);
  line-height: 1.08;
  text-shadow: 0 1px #efd8aa, 1px 0 #efd8aa, 0 -1px #efd8aa, -1px 0 #efd8aa;
}
.native-downloads a {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 .38em;
  border: 12px solid transparent;
  border-image: url('/assets/button-secondary.webp') 55 180 54 175 fill / 19px 27px stretch;
  background: #211b2b padding-box;
  padding: .2em .65em;
  color: var(--paper);
  font-size: clamp(18px, 2.35vw, 32px);
  font-weight: bold;
  line-height: 1.16;
  text-decoration: none;
}
.native-downloads a:hover { filter: brightness(1.18); }
.native-downloads small { font: 600 max(12px, .5em)/1.3 system-ui, sans-serif; }
@media (max-width: 760px) {
  .native-downloads { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 22px 10px 17px; }
  .native-downloads h2 { grid-column: 1 / -1; }
  .native-downloads a { min-height: 44px; }
}
.language-switch { display: flex; gap: 3px; }
.language-switch a {
  display: grid;
  min-width: 60px;
  min-height: 44px;
  place-items: center;
  padding: 0 10px;
  border: 8px solid transparent;
  border-image: url('/assets/button-secondary.webp') 55 180 54 175 fill / 12px 18px stretch;
  font-size: 19px;
  font-weight: bold;
  text-decoration: none;
}
.language-switch a[aria-current="page"] { border-image-source: url('/assets/button-primary.webp'); }
.language-switch a:hover { filter: brightness(1.2); }
.hero {
  min-height: clamp(560px, 83svh, 850px);
  height: auto;
  max-height: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, min(56vw, 760px)) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: center;
  justify-items: center;
  gap: 4px 16px;
  padding: 9px clamp(14px, 3vw, 50px) 18px;
  text-align: center;
}
.hero:before {
  background: radial-gradient(ellipse at 50% 43%, #2115259e, transparent 64%),
              linear-gradient(0deg, #18131e 0%, transparent 20%);
}
.hero-center { display: contents; }
.hero-premise, .hero-actions { grid-column: 2; position: relative; z-index: 3; }
.hero-premise { grid-row: 1; width: 100%; }
.hero-brand { width: clamp(175px, 19vw, 302px); margin: 0 auto 2px; object-fit: contain; }
.hero-tagline {
  padding: 8px 20px 11px;
  border: 10px solid transparent;
  border-image: url('/assets/panel.webp') 92 130 95 129 fill / 16px 34px stretch;
}
.hero-premise h1 {
  margin-inline: auto;
  font-size: clamp(33px, 3.65vw, 63px);
  line-height: 1.04;
  text-wrap: balance;
}
.hero-rule {
  margin: 0;
  color: var(--paper);
  font-size: clamp(18px, 1.65vw, 25px);
  line-height: 1.14;
  text-wrap: balance;
}
.hero-rule::before {
  content: '';
  display: block;
  width: min(100%, 244px);
  aspect-ratio: 331 / 43;
  margin: .06em auto;
}
.hero-rule::before, .hero-links .divider {
  background: var(--paper);
  mask: url('/assets/divider.webp') center / contain no-repeat luminance;
  clip-path: polygon(0 46%, 53% 46%, 57.4% 17%, 61.8% 46%, 100% 46%,
                     100% 59%, 61.8% 59%, 57.4% 94%, 53% 59%, 0 59%);
}
.hero-links .divider { height: auto; aspect-ratio: 331 / 43; }
.hero-rule span { display: inline; }
.hero-actions { grid-row: 3; width: 100%; margin-top: -6px; }
.hero-actions .play-button {
  gap: .25em;
  min-height: clamp(75px, 10.8svh, 108px);
  max-width: min(100%, 455px);
  margin-inline: auto;
  font-size: clamp(43px, 4.8vw, 74px);
  scroll-margin-bottom: calc(24px + env(safe-area-inset-bottom));
}
.hero-actions .play-arrow { width: .47em; }
.hero-actions .play-hint { margin: 9px auto 0; text-align: center; }
.hero-guide {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-top: 7px;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: bold;
  text-underline-offset: .15em;
}
.hero-illustration {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero-illustration .card-pair {
  width: 100%;
  height: clamp(146px, min(24svh, 15vw), 235px);
  margin: 0 auto;
  gap: clamp(12px, 2vw, 24px);
}
.hero-illustration .magic-card {
  container-type: inline-size;
  border: 0;
  background: none;
  isolation: isolate;
}
.hero-illustration .magic-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/card-frame.webp') center / 100% 100% no-repeat;
  pointer-events: none;
}
.hero-illustration .card-art {
  position: absolute;
  inset: 8% 11%;
  height: auto;
  clip-path: polygon(9% 0, 91% 0, 100% 7%, 100% 93%, 91% 100%, 9% 100%, 0 93%, 0 7%);
}
.hero-illustration .magic-card figcaption {
  inset: auto 17% 15%;
  gap: 3px;
  padding: 3px 2px;
  min-height: 1.9em;
  font-size: clamp(8px, 7.2cqi, 13px);
  line-height: 1.1;
  text-align: center;
}
.hero-illustration .school-crest {
  flex: 0 0 auto;
  width: clamp(10px, 10cqi, 16px);
}
.hero-illustration .clash { top: 28%; left: 50%; width: clamp(72px, 9vw, 136px); transform: translateX(-50%); }
.hero-gesture { display: none; }
.hero .champion { top: 0; height: 100%; width: 58%; opacity: 1; }
.hero .champion-left { left: -16%; }
.hero .champion-right { right: -16%; }
.hero-feature {
  z-index: 3;
  grid-row: 2 / 4;
  align-self: end;
  width: min(100%, 300px);
  margin-bottom: clamp(18px, 5svh, 52px);
  padding: clamp(10px, 1.8vw, 28px) clamp(8px, 1.65vw, 25px);
  border: 10px solid transparent;
  border-image: url('/assets/paper-panel.webp') 100 fill / 30px stretch;
  color: #28180e;
}
.decks-feature { grid-column: 1; justify-self: end; }
.modes-feature { grid-column: 3; justify-self: start; }
.hero-feature h2 { margin: 7px 0 0; font-size: clamp(18px, 2.05vw, 33px); line-height: 1.08; }
.hero-feature > img { width: 100%; height: auto; }
.feature-decks { display: flex; justify-content: center; gap: 5px; }
.feature-decks img {
  width: clamp(27px, 4.6vw, 68px);
  height: auto;
  transform: rotate(-8deg);
}
.feature-decks img + img { transform: rotate(8deg); }

.how-section {
  max-width: 1200px;
  padding: 45px clamp(14px, 4vw, 45px) 58px;
  background: linear-gradient(0deg, var(--ink), #15131c33 50%, #15131c55),
              url('/assets/slate-tile.webp') center top / 470px auto;
}
.how-section h2 {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto clamp(22px, 4vw, 38px);
  padding: 4px 40px 8px;
  border: 12px solid transparent;
  border-image: url('/assets/panel.webp') 92 130 95 129 fill / 22px 35px stretch;
  line-height: 1.05;
  text-wrap: balance;
}
.steps, .rules-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps li, .rules-grid article {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  gap: 10px;
  align-content: start;
  align-items: start;
  padding: 11px 11px;
}
.steps h3, .rules-grid h4 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(21px, 2.15vw, 27px);
  line-height: 1.13;
  text-wrap: balance;
}
.guide-image { margin: 0; min-width: 0; }
.guide-cover { object-fit: cover; }
.guide-power {
  position: relative;
  overflow: hidden;
}
.guide-power img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.guide-power figcaption {
  user-select: text;
  position: absolute;
  inset: auto 5% 5%;
  color: var(--paper);
  text-align: center;
  padding: 6px 12px;
  border: 8px solid transparent;
  border-image: url('/assets/panel.webp') 92 130 95 129 fill / 14px 22px stretch;
  background: #17121d;
  font: bold clamp(15px, 2vw, 24px)/1.05 Georgia, serif;
}
.guide-ending {
  object-fit: contain;
  background: #15131c url('/assets/slate-tile.webp') center / cover;
}
.guide-path, .guide-clash {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  overflow: hidden;
}
.guide-path span, .guide-clash span {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  text-align: center;
  padding-bottom: 3px;
  font: bold clamp(13px, 1.35vw, 17px)/1.2 Georgia, serif;
}
.guide-path img, .guide-clash img { width: 100%; height: 100%; object-fit: cover; }
.guide-path img { object-position: 69% 50%; clip-path: inset(12% 0); }
.guide-clash { position: relative; }
.guide-reveal span { padding-inline: 5px; }
.guide-reveal img {
  border: 7px solid transparent;
  border-image: url('/assets/card-frame.webp') 42 fill / 7px stretch;
  box-sizing: border-box;
}
.guide-clash::after {
  content: '';
  position: absolute;
  inset: 28% 38%;
  background: url('/assets/reveal-impact.webp') center / contain no-repeat;
}
.steps p, .rules-grid p { margin: 0; font: 15px/1.55 system-ui, sans-serif; color: #efe2ca; }
.steps li, .rules-grid article { text-align: start; }
.steps .gesture-step {
  background: radial-gradient(ellipse at center, #6c2db640, transparent 78%);
}
.gesture-intro p { margin-top: 6px; }
.rules-title { margin-top: 30px; }
.how-section .duel-note { margin-top: 25px; }

@media (min-width: 761px) and (max-width: 950px) {
  .hero-premise h1 { font-size: clamp(36px, 5.15vw, 50px); max-width: 13ch; }
}

@media (max-width: 760px) {
  .site-header { padding: 4px clamp(13px, 4vw, 26px); gap: clamp(10px, 3vw, 26px); }
  .site-header .logo { height: 44px; }
  .header-links { font-size: clamp(14px, 3.8vw, 20px); }
  .header-links a + a { border-inline-start: 0; padding-inline-start: 0; }
  .language-switch a { min-width: 44px; padding-inline: 7px; font-size: 15px; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 2px;
    min-height: 0;
    padding: 9px 10px 12px;
    text-align: center;
  }
  .hero:before {
    background: linear-gradient(180deg, #14111bee 5%, #171221d9 18%, transparent 40%, transparent 70%, #17131ede 95%);
  }
  .arena img { opacity: .87; }
  .hero-center { display: contents; text-align: center; }
  .hero-premise, .hero-actions { position: relative; z-index: 3; }
  .hero-premise { grid-column: 1; grid-row: 1; }
  .hero-brand { width: clamp(80px, 27vw, 126px); margin-bottom: 0; }
  .hero-tagline { padding: 5px 9px 8px; border: 0; border-image: none; }
  .hero-premise h1 {
    margin-inline: auto;
    font-size: clamp(27px, 8.8vw, 42px);
  }
  .hero-rule {
    margin-inline: auto;
    font-size: clamp(16px, 4.5vw, 21px);
    text-shadow: 0 1px 3px #08070a, 0 0 9px #0c0714;
  }
  .hero-rule::before { margin: -2px auto; width: min(84%, 230px); }
  .hero-rule span { display: block; }
  .hero-illustration { grid-column: 1; grid-row: 2; }
  .hero-illustration .card-pair { display: none; }
  .hero-gesture {
    display: block;
    width: min(70%, 310px, 49svh);
    margin: 0 auto;
    mask-image: linear-gradient(0deg, transparent, #000 8%, #000 95%, transparent),
                linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-composite: intersect;
  }
  .hero .champion { top: 33%; height: min(52vw, 212px); width: 53%; }
  .hero .champion-left { left: -10%; }
  .hero .champion-right { right: -9%; }
  .hero .champion img {
    height: 100%;
    mask-image: linear-gradient(0deg, transparent 11%, #000 38%);
  }
  .hero .champion-left {
    mask-image: linear-gradient(90deg, #000 58%, transparent 70%);
  }
  .hero .champion-right {
    mask-image: linear-gradient(90deg, transparent 30%, #000 42%);
  }
  .hero-feature { display: none; }
  .hero-actions { grid-column: 1; grid-row: 3; margin: 0; }
  .hero-actions .play-button {
    max-width: min(92%, 340px);
    min-height: clamp(62px, 10.7svh, 74px);
    margin-inline: auto;
    border-image-width: 16px 44px;
    font-size: clamp(32px, 9.4vw, 42px);
    padding-block: 4px 6px;
  }
  .hero-actions .play-hint { margin: 5px auto 0; font-size: 13px; }
  .hero-guide { display: none; }
  .hero-links { min-height: 56px; gap: 0 clamp(8px, 3vw, 18px); padding-block: 4px; }
  .hero-links a { min-height: 44px; font-size: clamp(13px, 3.6vw, 16px); }
  .how-section { padding: 24px clamp(12px, 4vw, 25px) 38px; }
  .steps, .rules-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .steps li, .rules-grid article {
    grid-template-rows: auto;
    grid-row: auto;
    padding: 12px 9px;
  }
  .steps h3, .gesture-intro { text-align: center; }
}
