/* Polish pass (16 Nov 2026): every screen from 320 px phones to 3440 px ultrawides.
   Loaded last on every page, so it overrides styles.css, pages.css and home.css. */

/* ---------- Content width that grows with big screens ---------- */
:root { --maxw: 1180px; --sec-y: clamp(56px, 7.5vw, 112px); }
@media (min-width: 1440px) { :root { --maxw: 1280px; } }
@media (min-width: 1920px) { :root { --maxw: 1440px; } }
.wrap, .nav-in, .hero-in { max-width: var(--maxw); }
@media (min-width: 1180px) {
  .rail, .reel { padding-left: calc((100vw - var(--maxw)) / 2 + 18px); scroll-padding-left: calc((100vw - var(--maxw)) / 2 + 18px); }
}
@media (min-width: 1180px) and (max-width: 1215px) {
  .rail, .reel { padding-left: var(--gut); scroll-padding-left: var(--gut); }
}

/* Nothing may widen the page sideways (the commander showcase slid in 24 px past the edge on load,
   which pushed the menu button off-screen on phones) */
.sec, .hero, .final, .pg > section { overflow-x: clip; }

/* ---------- Even section rhythm (the old gaps were up to 140 px a side) ---------- */
.sec { padding-block: var(--sec-y); }
.story { padding-bottom: calc(var(--sec-y) * .5); }
.factions { padding-bottom: clamp(32px, 5vw, 64px); }
.villain { padding-top: clamp(32px, 5vw, 64px); }
.final { padding-block: clamp(84px, 10vw, 140px); }
.homes-grid { margin-top: clamp(28px, 4vw, 44px); }
.hero-row, .install-grid { margin-top: clamp(28px, 4vw, 40px); }
.s2-banner { margin-top: clamp(22px, 3vw, 32px); }
.theme-show { margin-top: clamp(32px, 4.5vw, 52px); }
.rail-h { margin-top: clamp(26px, 3.5vw, 36px); }
@media (max-width: 760px) {
  :root { --sec-y: 48px; }
  .final { padding-block: 76px; }
  .villain-art { height: 380px; margin-bottom: -24px; }
}

/* ---------- Readable type on large screens ---------- */
@media (min-width: 1280px) {
  body { font-size: 17px; }
  .lead { font-size: 19px; }
  .home-card p, .theme-copy p { font-size: 17px; }
  .feat p { font-size: 16px; }
  .ev p, .sk small, .tr small, .news-card small, .pass-perks figcaption, .prize p { font-size: 15px; }
  .quick small { font-size: 14px; }
  .chips li { font-size: 15px; }
  .nav-links a { font-size: 15px; }
  .kicker { font-size: 14px; }
}
@media (min-width: 1920px) {
  body { font-size: 18px; }
  h2 { font-size: clamp(54px, 3.1vw, 66px); }
  .hero-title { font-size: clamp(128px, 7vw, 150px); }
  .hero-sub { font-size: 22px; }
  .lead { font-size: 20px; }
}

/* ---------- Header: same layout on every page and every phone ---------- */
.nav-in { gap: 10px; }
.nav-in .nav-play { margin-left: auto; }
.nav-in .nav-play + .menu-btn, body[data-page="home"] .nav-in .nav-play + .menu-btn { margin-left: 0; }
@media (min-width: 981px) { .nav-in .nav-play { margin-left: 8px; } }
.nav:not(.solid) { background: linear-gradient(180deg, rgba(7,10,26,.72), rgba(7,10,26,0)); }
@media (max-width: 760px) {
  .nav-in .nav-play, body[data-page="home"] .nav-in .nav-play { display: inline-flex; --h: 40px; padding: 0 14px; font-size: 13px; box-shadow: 0 3px 0 #a86414; }
}
@media (max-width: 400px) {
  .logo { font-size: 16px; letter-spacing: .06em; }
  .nav-in .nav-play, body[data-page="home"] .nav-in .nav-play, body:not([data-page="home"]) .nav-in .nav-play { --h: 38px; padding: 0 11px; font-size: 12px; letter-spacing: .06em; }
  .menu-btn { width: 40px; height: 40px; }
}
@media (max-width: 350px) {
  .logo { font-size: 14px; letter-spacing: .04em; }
  .nav-in { gap: 6px; }
}

/* ---------- Hero ---------- */
/* Desktop and landscape tablets: the wide art keeps the flagship on the right and leaves the left clear for the title */
@media (min-width: 761px) {
  .hero-art img { object-position: 62% 50%; }
  .hero-shade { background: linear-gradient(90deg, rgba(7,10,26,.82) 0%, rgba(7,10,26,.5) 30%, rgba(7,10,26,0) 55%), linear-gradient(0deg, var(--void) 0%, rgba(7,10,26,0) 24%); }
  .hero-title { font-size: clamp(56px, 8.4vw, 128px); }
}
/* Portrait tablets (iPad, Galaxy Tab): stacked like the phone, using the tall art */
@media (min-width: 761px) and (max-width: 1100px) and (orientation: portrait) {
  .hero { min-height: min(100svh, 1180px); align-items: stretch; }
  .hero-art img { object-position: 50% 100%; }
  .hero-shade { background: linear-gradient(180deg, rgba(7,10,26,.7) 0%, rgba(7,10,26,.25) 34%, rgba(7,10,26,0) 52%, rgba(7,10,26,.7) 82%, var(--void) 100%); }
  .hero-in { min-height: min(100svh, 1180px); display: flex; flex-direction: column; justify-content: space-between; padding-top: 110px; padding-bottom: 96px; }
  .hero-title { font-size: clamp(80px, 13vw, 120px); }
  .hero-top { max-width: 640px; padding: 18px 20px 20px; margin: 0 -10px; border-radius: 20px; background: linear-gradient(180deg, rgba(7,10,26,.66), rgba(7,10,26,.32)); backdrop-filter: blur(3px); }
}
@media (max-width: 760px) {
  .eyebrow { font-size: 11px; letter-spacing: .12em; padding: 8px 12px; }
  .hero-top { margin: 0 -4px; }
}
@media (max-width: 350px) {
  .hero-title { font-size: 46px; }
  .hero-sub { font-size: 15px; }
}

/* ---------- Quick tiles: equal columns, nothing past the edge ---------- */
.quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quick a { min-width: 0; }
.quick b, .quick small { min-width: 0; overflow-wrap: anywhere; }
.quick b { white-space: nowrap; }
@media (max-width: 980px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) {
  .quick { gap: 8px; }
  .quick a { grid-template-columns: 40px 1fr; column-gap: 10px; padding: 8px; min-height: 60px; border-radius: 14px; }
  .quick img { width: 40px; height: 40px; border-radius: 10px; }
  .quick a { grid-template-columns: 36px 1fr; column-gap: 8px; }
  .quick img { width: 36px; height: 36px; }
  .quick b { font-size: 13px; letter-spacing: .02em; }
  .quick small { font-size: 12px; line-height: 1.25; }
}

/* ---------- Feature cards: the big faded numbers sit behind the text ---------- */
.feat > *:not(.feat-n) { position: relative; z-index: 1; }
.feat-n { top: auto; bottom: -14px; right: 12px; font-size: 88px; color: rgba(95,224,255,.07); z-index: 0; }
@media (max-width: 760px) { .feat-n { font-size: 72px; } .feat { padding: 22px 20px; } }

/* ---------- Factions: all three on one row on phones ---------- */
@media (max-width: 760px) {
  .tabs { flex-wrap: nowrap; gap: 6px; }
  .tabs button { flex: 1 1 0; min-width: 0; justify-content: center; gap: 6px; padding: 6px 8px 6px 6px; font-size: 12px; letter-spacing: .06em; min-height: 44px; }
  .tabs button img { width: 30px; height: 30px; }
  .tabs button .tl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- Final call to action ---------- */
@media (max-width: 760px) {
  .final .btn-lg { --h: 58px; padding: 0 22px; font-size: 16px; letter-spacing: .05em; white-space: nowrap; max-width: 100%; }
  .final h2 { font-size: clamp(26px, 8vw, 34px); }
}
@media (max-width: 360px) { .final .btn-lg { font-size: 14px; padding: 0 16px; } }

/* ---------- Footer ---------- */
.foot-links { gap: 0 18px; }
@media (max-width: 760px) {
  .foot-in { gap: 8px; }
  .foot-links { gap: 0 14px; margin-left: -4px; }
  .foot-copy { margin-top: 6px; }
}

/* ---------- Inner pages on big screens ---------- */
@media (min-width: 1200px) {
  .cmd-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 900px) {
  .news-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 22px; }
  .post-tx { padding: 20px 24px 24px; }
}
.pg-head { padding: clamp(32px, 4vw, 52px) 0 clamp(16px, 2vw, 24px); }

/* ---------- Small phones (320 to 360 px) ---------- */
@media (max-width: 360px) {
  h2 { font-size: 26px; }
  .sc-thumbs button { width: 64px; }
  .sc-thumbs img { width: 64px; height: 86px; }
  .seg button { padding: 10px; font-size: 12px; }
  .inst { padding: 20px; }
}

/* ---------- Desktop play bar must fit tablets in landscape ---------- */
@media (min-width: 761px) and (max-width: 1180px) {
  .play-bar { gap: 12px; max-width: calc(100vw - 32px); }
  .play-bar .pb-qr, .play-bar span { display: none; }
  .play-bar b { font-size: 17px; }
}

/* Quick tiles on 320-350 px phones */
@media (max-width: 350px) {
  .quick a { grid-template-columns: 30px 1fr; column-gap: 7px; padding: 8px 6px; }
  .quick img { width: 30px; height: 30px; border-radius: 8px; }
  .quick b { font-size: 12px; letter-spacing: 0; }
  .quick small { font-size: 11px; }
}
