/*
 * Explosive Racing 官方網站 / official website
 * 跟遊戲一樣的深藍／奶油／珊瑚紅；只用系統字型（跟遊戲的 style.css 同一組），不載入外部字型或程式。
 * Same navy / cream / coral as the game; system fonts only (same stack as the game's style.css).
 * 手機優先：360 px 寬也不用左右捲動。Phone first: no sideways scrolling at 360 px.
 */
:root {
  --navy: #13284b;
  --navy-2: #1d3a68;
  --navy-3: #0b1a33;
  --cream: #f3ead5;
  --cream-2: #e8dcbe;
  --paper: #fbf6ea;
  --muted: #c9bfa6;
  --ink: #13284b;
  --ink-2: #47566f;
  --coral: #e8574a;
  --coral-2: #c8443a;
  --coral-3: #a8362e;
  --gold: #f2b61a;
  --line: rgba(243, 234, 213, 0.16);
  --line-ink: rgba(19, 40, 75, 0.14);
  --radius: 18px;
  --gutter: 16px;
  --font: "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  --font-display: "Segoe UI Black", "Arial Black", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color-scheme: dark;
}
html[lang="en"] {
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--navy-3);
  scroll-padding-top: 120px;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--navy);
  background-image:
    repeating-linear-gradient(-35deg, rgba(243, 234, 213, 0.035) 0 22px, transparent 22px 44px),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-3) 100%);
  background-attachment: fixed;
  color: var(--cream);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: break-word;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--coral);
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  background: var(--cream);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
}
.skip:focus {
  left: 8px;
}
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.wrap-narrow {
  max-width: 860px;
}

/* ---------- 上方列 header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(11, 26, 51, 0.96);
  border-bottom: 2px solid var(--line);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
}
.head .brand {
  order: 0;
  min-height: 56px;
}
.head-tools {
  order: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-wrap {
  order: 2;
  flex: 1 0 100%;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.05;
  white-space: nowrap;
  margin-right: auto;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}
.brand span {
  font-size: 15px;
}
.brand span b {
  display: block;
  color: var(--coral);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.42em;
}
.brand:hover {
  color: var(--cream);
}
.lang {
  font-size: 14px;
  font-weight: 800;
  color: var(--cream);
  text-decoration: none;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}
.lang:hover {
  border-color: var(--cream);
  color: var(--cream);
}
.nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 0 8px;
  margin: 0;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}
.nav::-webkit-scrollbar {
  display: none;
}
.nav a {
  display: block;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover {
  color: var(--cream);
  background: rgba(243, 234, 213, 0.08);
}
.nav a[aria-current="page"] {
  color: var(--navy);
  background: var(--cream);
}

/* ---------- 按鈕 buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 20px;
  border-radius: 14px;
  border: 2px solid transparent;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.08s ease, background-color 0.15s ease;
}
.btn:active {
  transform: translateY(2px);
}
.btn-play {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 4px 0 var(--coral-3);
}
.btn-play:hover {
  background: #f0675a;
  color: #fff;
}
.btn-play::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 8px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.btn-sm {
  min-height: 36px;
  padding: 4px 12px;
  font-size: 14px;
  border-radius: 11px;
  box-shadow: 0 3px 0 var(--coral-3);
}
.btn-lg {
  min-height: 58px;
  padding: 12px 30px;
  font-size: 21px;
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--coral-3);
}
.btn-ghost {
  border-color: var(--cream);
  color: var(--cream);
  background: rgba(11, 26, 51, 0.35);
}
.btn-ghost:hover {
  background: var(--cream);
  color: var(--navy);
}
.btn-ink {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-ink:hover {
  background: var(--navy);
  color: var(--cream);
}

/* ---------- 首頁主視覺 home hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--coral);
  background: var(--navy-3);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 26, 51, 0.55) 0%, rgba(11, 26, 51, 0.35) 40%, rgba(11, 26, 51, 0.92) 100%),
    repeating-linear-gradient(-35deg, rgba(243, 234, 213, 0.04) 0 22px, transparent 22px 44px);
}
.hero-in {
  position: relative;
  z-index: 1;
  padding-top: 28px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.emblem {
  width: min(300px, 78vw);
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}
.hero h1 {
  margin: 14px 0 6px;
  font-size: clamp(28px, 7.4vw, 50px);
  line-height: 1.2;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  max-width: 18em;
}
html[lang="en"] .hero h1 {
  max-width: 16em;
}
.hero p.lead {
  margin: 0 0 18px;
  font-size: clamp(16px, 4.2vw, 19px);
  max-width: 34em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  align-items: center;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  font-size: 14px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(243, 234, 213, 0.14);
  border: 1px solid var(--line);
}

/* ---------- 區塊 sections ---------- */
main {
  flex: 1;
}
.section {
  padding: 40px 0;
}
.section + .section {
  padding-top: 8px;
}
.section-title {
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1.25;
  font-weight: 900;
  margin: 0 0 6px;
}
.section-title::after {
  content: "";
  display: block;
  width: 54px;
  height: 5px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--coral);
}
.section-lead {
  margin: 10px 0 22px;
  color: var(--muted);
  max-width: 44em;
}
.page-head {
  padding: 30px 0 18px;
}
.page-head h1 {
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1.2;
  font-weight: 900;
  margin: 0;
}
.page-head h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 6px;
  margin-top: 10px;
  border-radius: 4px;
  background: var(--coral);
}
.page-head p {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 44em;
  font-size: 17px;
}
.meta {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 卡片 cards ---------- */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.card {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
}
.card > img,
.card > a > img,
.card picture img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--navy-2);
}
.card-body {
  padding: 16px 18px 18px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 900;
}
.card h3 small {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--coral-2);
}
.card p {
  margin: 0;
  color: var(--ink-2);
}
.card p + p {
  margin-top: 8px;
}
.card a {
  color: var(--ink);
}
.card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.card .tags li {
  font-size: 13px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(232, 87, 74, 0.12);
  color: var(--coral-3);
}
.card .tags li.tag-ink {
  background: rgba(19, 40, 75, 0.08);
  color: var(--navy);
}
.mini-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.mini-cards a {
  display: block;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--cream);
  background: var(--navy-2);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
}
.mini-cards img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.mini-cards span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 10px 7px;
  font-weight: 900;
  font-size: 14px;
  line-height: 1.3;
  background: linear-gradient(180deg, transparent, rgba(11, 26, 51, 0.92));
}
.mini-cards a:hover span {
  color: var(--gold);
}

/* ---------- 文章 paper (long text pages) ---------- */
.paper {
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px;
  padding: 22px 18px 26px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.22);
  margin-bottom: 26px;
}
.paper h2 {
  font-size: 23px;
  line-height: 1.35;
  font-weight: 900;
  margin: 30px 0 8px;
  padding-top: 18px;
  border-top: 2px dashed var(--line-ink);
}
.paper > h2:first-child,
.paper > .toc + h2,
.paper > div:first-child + h2 {
  margin-top: 6px;
}
.paper h2:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
.paper h3 {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 900;
  margin: 20px 0 4px;
}
.paper p,
.paper li {
  color: #24324a;
}
.paper p {
  margin: 8px 0;
}
.paper ul,
.paper ol {
  padding-left: 1.3em;
  margin: 8px 0;
}
.paper li {
  margin: 4px 0;
}
.paper li::marker {
  color: var(--coral);
}
.paper a {
  color: var(--navy);
  font-weight: 700;
}
.paper a:hover {
  color: var(--coral-2);
}
.paper b,
.paper strong {
  color: var(--ink);
}
.paper figure {
  margin: 16px 0;
}
.paper figure img {
  border-radius: 14px;
  width: 100%;
}
.paper figcaption {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 6px;
}
.note {
  background: rgba(19, 40, 75, 0.06);
  border-left: 5px solid var(--coral);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 14px 0;
}
.note p {
  margin: 4px 0;
}
.summary {
  background: var(--navy);
  color: var(--cream);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 0 0 18px;
}
.summary h2 {
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 19px;
  color: var(--cream);
}
.summary li,
.summary p {
  color: var(--cream);
}
.summary b {
  color: #fff;
}
.summary a {
  color: var(--cream);
}
.toc {
  background: rgba(19, 40, 75, 0.05);
  border-radius: 14px;
  padding: 12px 16px;
  margin: 0 0 18px;
}
.toc b {
  display: block;
  margin-bottom: 4px;
}
.toc ol {
  columns: 2 180px;
  column-gap: 24px;
  margin: 0;
}
.toc li {
  break-inside: avoid;
}
kbd {
  display: inline-block;
  min-width: 1.6em;
  text-align: center;
  font-family: inherit;
  font-size: 0.86em;
  font-weight: 800;
  line-height: 1.5;
  padding: 0 0.45em;
  border-radius: 6px;
  background: var(--navy);
  color: var(--cream);
  border-bottom: 3px solid var(--navy-3);
  white-space: nowrap;
}
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 10px 0 14px;
  border-radius: 12px;
  border: 2px solid var(--line-ink);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 15px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-ink);
}
th {
  background: var(--navy);
  color: var(--cream);
  font-weight: 800;
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:nth-child(even) td {
  background: rgba(19, 40, 75, 0.035);
}

/* FAQ */
.faq details {
  border-bottom: 2px dashed var(--line-ink);
  padding: 4px 0;
}
.faq details:last-child {
  border-bottom: 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 900;
  font-size: 17px;
  padding: 10px 34px 10px 0;
  position: relative;
  line-height: 1.45;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  text-align: center;
  line-height: 26px;
  font-weight: 900;
}
.faq details[open] summary::after {
  content: "−";
  background: var(--coral);
}
.faq details > div {
  padding: 0 0 10px;
}
.faq h2 {
  margin-bottom: 0;
}

/* 更新紀錄 changelog */
.log {
  list-style: none;
  margin: 0;
  padding: 0;
}
.log > li {
  position: relative;
  padding: 0 0 6px 22px;
  margin: 0 0 18px;
  border-left: 3px solid var(--cream-2);
}
.log > li::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--coral);
  border: 3px solid var(--paper);
}
.log h2 {
  margin: 0 0 4px !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 20px;
}
.log h2 time {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--coral-2);
}

/* CTA 橫條 band */
.band {
  background: var(--coral);
  color: #fff;
  border-radius: 22px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  box-shadow: 0 6px 0 var(--coral-3);
  margin: 10px 0 40px;
}
.band h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 900;
}
.band p {
  margin: 0;
}
.band .btn {
  background: var(--navy);
  color: var(--cream);
  box-shadow: 0 4px 0 var(--navy-3);
}
.band .btn:hover {
  background: var(--navy-2);
}

/* 404 */
.lost {
  text-align: center;
  padding: 48px 0 30px;
}
.lost .code {
  font-family: var(--font-display);
  font-size: clamp(76px, 26vw, 150px);
  line-height: 1;
  font-weight: 900;
  color: var(--coral);
  text-shadow: 0 6px 0 var(--coral-3);
  margin: 0;
}
.lost h1 {
  margin: 12px 0 6px;
  font-size: clamp(24px, 6vw, 34px);
}
.lost p {
  color: var(--muted);
  margin: 0 auto 20px;
  max-width: 30em;
}
.lost .hero-cta {
  justify-content: center;
}

/* ---------- 頁尾 footer ---------- */
.site-foot {
  background: var(--navy-3);
  border-top: 2px solid var(--line);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 15px;
  color: var(--muted);
}
.foot-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
}
.foot-grid h2 {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 0 0 6px;
}
.foot-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.foot-grid li {
  margin: 3px 0;
}
.foot-grid a {
  color: var(--muted);
  text-decoration: none;
}
.foot-grid a:hover {
  color: var(--cream);
  text-decoration: underline;
}
.foot-brand {
  grid-column: 1 / -1;
}
.foot-brand p {
  margin: 6px 0 0;
  max-width: 32em;
}
.copy {
  margin: 22px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

/* ---------- 寬一點的螢幕 wider screens ---------- */
@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mini-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .paper {
    padding: 30px 34px 34px;
  }
  .band {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 26px 30px;
  }
  .foot-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
  .foot-brand {
    grid-column: auto;
  }
}
@media (min-width: 960px) {
  .head {
    flex-wrap: nowrap;
    column-gap: 14px;
  }
  .head .brand {
    min-height: 66px;
    margin-right: 0;
  }
  .nav-wrap {
    order: 1;
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
  }
  .nav {
    padding: 0;
  }
  .head-tools {
    order: 2;
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mini-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hero-in {
    padding-top: 56px;
    padding-bottom: 60px;
    min-height: 560px;
    justify-content: center;
  }
  .section {
    padding: 56px 0;
  }
  .split {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 28px;
    align-items: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* 遊戲分級標示（每一頁的頁尾）Taiwan game rating label, in every footer */
.rating {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 0 0 24px;
  border: 3px solid #0a8fd6;
}
.rating img {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
}
.rating p {
  margin: 0;
  line-height: 1.55;
}
.rating-title {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 16px;
}
.rating-title b {
  color: #0a6fae;
  font-weight: 900;
}
.rating-title span {
  font-weight: 800;
}
.rating-warn {
  font-size: 15px;
  font-weight: 700;
}
.rating-en {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 2px !important;
}

/* 廣告欄位：還沒開廣告前一律隱藏（js/site-config.js 的 ADS_ENABLED） Ad slots stay hidden until ads are switched on */
.ad-slot {
  display: none;
}
html.ads-on .ad-slot {
  display: block;
  max-width: 970px;
  min-height: 100px;
  margin: 24px auto;
  padding: 6px 8px 8px;
  border-radius: 14px;
  background: rgba(243, 234, 213, 0.06);
  border: 1px dashed var(--line);
  overflow: hidden;
}
.ad-label {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* 小工具 utilities */
.mt {
  margin-top: 22px;
}
.mb {
  margin-bottom: 18px;
}
.section.pt0 {
  padding-top: 8px;
}
.chips-ink li {
  background: rgba(243, 234, 213, 0.1);
}
