/* siteapp402 - WagerList.
   The scraped reference (casinolistings.com) sits on warm taupe surfaces
   (#e3dcd7 / #ece6e1 / #f5f0ec) with a rust-red action colour (#cb2f03,
   deep #9b0f03), a gold rating highlight (#fac800), a deep purple brand
   tone (#211238) and a blue link accent (#416ed2). Its signature is a dense
   ranked lister table, so the APK catalogue is filed as a ranking table
   rather than a card wall. This stylesheet keeps that reading, with a deep
   plum night mode under [data-p402-mode="dark"].
   Every rule is scoped under the p402 prefix so the file only ever affects
   this template. */

@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("../siteapp/fontawesome/webfonts/fa-solid-900.woff2") format("woff2");
}
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../siteapp/fontawesome/webfonts/fa-regular-400.woff2") format("woff2");
}
@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../siteapp/fontawesome/webfonts/fa-brands-400.woff2") format("woff2");
}
.fa-solid { font-weight: 900; }

:root {
  --p402-canvas: #e3dcd7;
  --p402-surface: #f5f0ec;
  --p402-surface-2: #ece6e1;
  --p402-wash: #efeae5;
  --p402-ink: #241c2e;
  --p402-ink-soft: #4a4053;
  --p402-muted: #7b7083;
  --p402-faint: #a89fae;
  --p402-line: #d9d0ca;
  --p402-line-strong: #c4b8b0;
  --p402-plum: #211238;
  --p402-plum-deep: #160a28;
  --p402-plum-wash: #ece4f6;
  --p402-rust: #cb2f03;
  --p402-rust-deep: #9b0f03;
  --p402-rust-wash: #fbe6e0;
  --p402-gold: #fac800;
  --p402-gold-deep: #eab800;
  --p402-blue: #416ed2;
  --p402-blue-deep: #2d51a8;
  --p402-star: #eab800;
  --p402-shadow: 0 10px 26px rgba(33, 18, 56, .12);
  --p402-shadow-sm: 0 3px 10px rgba(33, 18, 56, .10);
  --p402-radius: 12px;
  --p402-radius-sm: 8px;
  --p402-body: 'PT Sans', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

[data-p402-mode='dark'] {
  --p402-canvas: #150c26;
  --p402-surface: #1f1338;
  --p402-surface-2: #281a45;
  --p402-wash: #2d1d4d;
  --p402-ink: #f3edf7;
  --p402-ink-soft: #d8cde2;
  --p402-muted: #a99bb6;
  --p402-faint: #7e7090;
  --p402-line: #3a2a5c;
  --p402-line-strong: #4d3873;
  --p402-plum: #f3edf7;
  --p402-plum-deep: #ffffff;
  --p402-plum-wash: #2a1b47;
  --p402-rust: #ff5a2b;
  --p402-rust-deep: #ff7a52;
  --p402-rust-wash: #3a1b14;
  --p402-gold: #fac800;
  --p402-gold-deep: #eab800;
  --p402-blue: #7ba0ff;
  --p402-blue-deep: #9ab8ff;
  --p402-star: #fac800;
  --p402-shadow: 0 10px 26px rgba(0, 0, 0, .55);
  --p402-shadow-sm: 0 3px 10px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.p402-body {
  margin: 0;
  background: var(--p402-canvas);
  color: var(--p402-ink);
  font-family: var(--p402-body);
  font-size: 14.5px;
  line-height: 1.7;
}
.p402-body a { color: var(--p402-blue); text-decoration: none; }
.p402-body a:hover { color: var(--p402-blue-deep); }
.p402-body img { max-width: 100%; height: auto; }
.p402-body h1, .p402-body h2, .p402-body h3, .p402-body h4 {
  font-family: var(--p402-body); color: var(--p402-ink); line-height: 1.3;
}
.p402-body p { margin: 0 0 1em; }
.p402-body ul, .p402-body ol { margin: 0 0 1em; padding-left: 1.25em; }

.p402-wrap { width: min(1200px, 100% - 32px); margin: 0 auto; }

.p402-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--p402-plum); color: #ffffff; padding: 10px 18px;
}
.p402-skip:focus { left: 0; color: #ffffff; }

/* ---------- utility strip ---------- */
.p402-utility {
  background: var(--p402-plum-deep); color: #cfc3dc;
  font-size: 12px;
}
.p402-utility-in {
  width: min(1200px, 100% - 32px); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; padding: 7px 0;
}
.p402-utility-note { color: var(--p402-gold); font-weight: 700; }
.p402-utility-note i { margin-right: 5px; }
.p402-utility-links { color: #a294b4; display: inline-flex; align-items: center; gap: 8px; }

/* ---------- header ---------- */
.p402-header {
  background: var(--p402-plum); color: #ffffff;
  border-bottom: 3px solid var(--p402-rust);
  position: relative;
}
.p402-header-in {
  width: min(1200px, 100% - 32px); margin: 0 auto;
  display: flex; align-items: center; gap: 16px; padding: 12px 0;
}
.p402-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.p402-brand-mark {
  width: 44px; height: 44px; display: inline-flex; overflow: hidden;
  border-radius: 10px;
}
.p402-brand-mark img { display: block; width: 44px; height: 44px; }
.p402-brand-word {
  font-size: 22px; font-weight: 700; color: #ffffff; letter-spacing: -.3px;
  display: block; line-height: 1.1;
}
.p402-brand-sub {
  display: block; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--p402-gold);
}
.p402-nav { display: flex; align-items: center; gap: 0; flex: 1 1 auto; flex-wrap: wrap; }
.p402-nav-link {
  padding: 8px 12px; font-size: 13.5px; font-weight: 600; color: #ded4e8;
  border-bottom: 2px solid transparent;
}
.p402-nav-link:hover { background: rgba(255, 255, 255, .08); color: var(--p402-gold); }
.p402-nav-link.is-active { color: var(--p402-gold); border-bottom-color: var(--p402-rust); }
.p402-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.p402-switch {
  display: inline-flex; overflow: hidden; border: 1px solid #4a3867;
  border-radius: 20px;
}
.p402-switch-seg {
  padding: 5px 12px; font-size: 12px; font-weight: 700; color: #c9bcd6;
  text-transform: uppercase; letter-spacing: .5px;
}
.p402-switch-seg.is-active { background: var(--p402-rust); color: #ffffff; }
.p402-mode {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: transparent; border: 1px solid #4a3867; color: #ded4e8;
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
}
.p402-mode:hover { color: #ffffff; border-color: var(--p402-gold); background: var(--p402-gold); }
.p402-burger {
  display: none; width: 38px; height: 38px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid #4a3867; color: #ffffff; font-size: 15px;
}

/* ---------- marquee ---------- */
.p402-marquee {
  background: var(--p402-rust); color: #ffffff; overflow: hidden;
  font-size: 12.5px; font-weight: 600;
}
.p402-marquee-track {
  display: flex; gap: 30px; padding: 7px 0; white-space: nowrap;
  width: max-content; animation: p402-marquee 26s linear infinite;
}
.p402-marquee-item { display: inline-flex; align-items: center; }
.p402-marquee-item i { color: var(--p402-gold); font-size: 10px; margin-right: 5px; }
@keyframes p402-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .p402-marquee-track { animation: none; }
}

/* ---------- hero ---------- */
.p402-hero {
  background: var(--p402-plum);
  background-image: linear-gradient(135deg, #211238 0%, #2d1a4d 55%, #3b1f38 100%);
  color: #ffffff;
  border-bottom: 1px solid #3a2a5c;
}
.p402-hero-in {
  display: grid; grid-template-columns: 1fr 300px; gap: 34px;
  align-items: center; padding: 42px 0 46px;
}
.p402-hero-kicker {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase; color: var(--p402-gold);
  border: 1px solid rgba(250, 200, 0, .45); padding: 4px 12px; border-radius: 16px;
}
.p402-body .p402-hero-h1 {
  font-size: clamp(28px, 4.2vw, 44px); font-weight: 700; color: #ffffff;
  margin: 14px 0 12px; letter-spacing: -.8px;
}
.p402-hero-lead { color: #c6b9d4; font-size: 15px; max-width: 62ch; }
.p402-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 18px; }
.p402-hero-marks {
  list-style: none; padding: 0; margin: 0; display: flex; gap: 18px;
  flex-wrap: wrap; font-size: 12.5px; color: #b3a4c4;
}
.p402-hero-marks i { color: var(--p402-gold); margin-right: 5px; }

.p402-exhibit {
  margin: 0; background: var(--p402-surface); border-radius: var(--p402-radius);
  padding: 18px; text-align: center; box-shadow: var(--p402-shadow);
}
.p402-exhibit-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--p402-rust-deep); background: var(--p402-rust-wash);
  padding: 4px 12px; border-radius: 14px; margin-bottom: 12px;
}
.p402-exhibit-shot {
  display: block; width: 118px; height: 118px; margin: 0 auto;
  background: var(--p402-surface-2); border-radius: var(--p402-radius-sm);
  overflow: hidden;
}
.p402-exhibit-shot img { width: 112px; height: 112px; object-fit: contain; }
.p402-exhibit figcaption b {
  display: block; margin-top: 12px; font-size: 14.5px; color: var(--p402-ink);
}
.p402-exhibit figcaption span { font-size: 12.5px; color: var(--p402-muted); }
.p402-exhibit figcaption i { font-style: normal; margin-left: 10px; }
.p402-exhibit figcaption i.fa-star { color: var(--p402-star); margin-left: 0; }

.p402-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; font-weight: 700; font-size: 14px; border-radius: var(--p402-radius-sm);
  border: 1px solid transparent;
}
.p402-btn.is-brand { background: var(--p402-rust); color: #ffffff; box-shadow: var(--p402-shadow-sm); }
.p402-btn.is-brand:hover { background: var(--p402-rust-deep); color: #ffffff; }
.p402-btn.is-ghost { background: transparent; border-color: var(--p402-line-strong); color: var(--p402-ink); }
.p402-btn.is-ghost:hover { border-color: var(--p402-rust); color: var(--p402-rust-deep); background: var(--p402-rust-wash); }
.p402-hero .p402-btn.is-ghost { border-color: #4a3867; color: #ded4e8; }
.p402-hero .p402-btn.is-ghost:hover { border-color: var(--p402-gold); color: var(--p402-gold); background: rgba(250, 200, 0, .10); }

/* ---------- category ribbon ---------- */
.p402-ribbon { background: var(--p402-surface); border-bottom: 1px solid var(--p402-line); }
.p402-ribbon-in {
  width: min(1200px, 100% - 32px); margin: 0 auto;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0;
}
.p402-ribbon-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--p402-muted); margin-right: 4px;
}
.p402-ribbon-link {
  font-size: 13px; font-weight: 600; color: var(--p402-ink-soft);
  padding: 5px 13px; border: 1px solid var(--p402-line); border-radius: 18px;
}
.p402-ribbon-link:hover { color: var(--p402-rust-deep); border-color: var(--p402-rust); }
.p402-ribbon-link.is-active { background: var(--p402-rust); border-color: var(--p402-rust); color: #ffffff; }

/* ---------- frame ---------- */
.p402-frame {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px;
  padding: 26px 0 48px; align-items: start;
}
.p402-maincol { min-width: 0; }
.p402-block { margin-bottom: 32px; }
.p402-block-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; border-bottom: 2px solid var(--p402-plum); padding-bottom: 8px; margin-bottom: 14px;
}
.p402-block-title {
  font-size: 19px; font-weight: 700; margin: 0; position: relative; padding-left: 13px;
}
.p402-block-title::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 21px; border-radius: 3px; background: var(--p402-rust);
}
.p402-block-note { font-size: 12.5px; color: var(--p402-muted); }
.p402-block-more { font-size: 13px; font-weight: 600; color: var(--p402-blue); }

.p402-filter-note {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; background: var(--p402-plum-wash); border: 1px solid var(--p402-line);
  border-left: 4px solid var(--p402-plum); padding: 10px 14px; margin-bottom: 18px;
  font-size: 13.5px; border-radius: var(--p402-radius-sm);
}
.p402-filter-note a { font-weight: 600; color: var(--p402-rust-deep); }

/* ---------- ranked listing table ---------- */
.p402-tablewrap {
  background: var(--p402-surface); border: 1px solid var(--p402-line);
  border-radius: var(--p402-radius); overflow-x: auto; box-shadow: var(--p402-shadow-sm);
}
.p402-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.p402-table thead th {
  background: var(--p402-plum); color: #ffffff; text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  padding: 10px 12px; white-space: nowrap;
}
.p402-table tbody tr { border-bottom: 1px solid var(--p402-line); }
.p402-table tbody tr:last-child { border-bottom: none; }
.p402-table tbody tr:nth-child(even) { background: var(--p402-wash); }
.p402-table tbody tr:hover { background: var(--p402-rust-wash); }
.p402-table td { padding: 10px 12px; vertical-align: middle; }

.p402-row-rank {
  width: 46px; text-align: center; font-weight: 700; font-size: 15px;
  color: var(--p402-rust-deep); background: var(--p402-surface-2);
  border-right: 1px solid var(--p402-line);
}
.p402-row-app a { display: flex; align-items: center; gap: 11px; color: var(--p402-ink); }
.p402-row-app a:hover { color: var(--p402-rust-deep); }
.p402-row-icon {
  width: 40px; height: 40px; flex: 0 0 40px; overflow: hidden;
  background: var(--p402-surface-2); border: 1px solid var(--p402-line);
  border-radius: var(--p402-radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
}
.p402-row-icon img { width: 38px; height: 38px; object-fit: contain; }
.p402-row-text { min-width: 0; }
.p402-row-text b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.p402-row-text small { display: block; font-size: 11.5px; color: var(--p402-muted); }
.p402-row-ver, .p402-row-size, .p402-row-dl { color: var(--p402-muted); white-space: nowrap; font-size: 12.5px; }
.p402-row-rate { color: var(--p402-gold-deep); font-weight: 700; white-space: nowrap; }
.p402-row-rate i { color: var(--p402-star); }
.p402-row-cta a {
  display: inline-block; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: var(--p402-rust); color: #ffffff; padding: 6px 13px; border-radius: 16px;
}
.p402-row-cta a:hover { background: var(--p402-rust-deep); color: #ffffff; }

/* ---------- card shelf ---------- */
.p402-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.p402-card {
  background: var(--p402-surface); border: 1px solid var(--p402-line);
  border-left: 3px solid var(--p402-rust); border-radius: var(--p402-radius-sm);
  transition: box-shadow .18s ease, transform .18s ease;
}
.p402-card:hover { box-shadow: var(--p402-shadow); transform: translateY(-2px); }
.p402-card-link { display: flex; gap: 12px; padding: 14px; color: var(--p402-ink); }
.p402-card-link:hover { color: var(--p402-ink); }
.p402-card-icon {
  width: 56px; height: 56px; flex: 0 0 56px; overflow: hidden;
  background: var(--p402-surface-2); border: 1px solid var(--p402-line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--p402-plum); border-radius: var(--p402-radius-sm);
}
.p402-card-icon img { width: 44px; height: 44px; object-fit: contain; }
.p402-card-body { min-width: 0; display: flex; flex-direction: column; flex: 1 1 auto; }
.p402-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.p402-card-cat {
  font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--p402-rust-deep); background: var(--p402-rust-wash); padding: 3px 9px;
  border-radius: 12px;
}
.p402-card-ver { font-size: 11.5px; color: var(--p402-faint); }
.p402-card-title {
  font-size: 13.5px; font-weight: 700; margin: 0 0 6px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.p402-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.p402-card-rate { color: var(--p402-gold-deep); font-weight: 700; font-size: 12.5px; }
.p402-card-rate i { color: var(--p402-star); }
.p402-card-more { color: var(--p402-muted); font-size: 12px; white-space: nowrap; }

/* ---------- rail ---------- */
.p402-rail { min-width: 0; }
.p402-rail-box {
  background: var(--p402-surface); border: 1px solid var(--p402-line);
  padding: 15px 16px; margin-bottom: 16px; border-radius: var(--p402-radius);
}
.p402-rail-box.is-brand { border-left: 3px solid var(--p402-rust); }
.p402-rail-title {
  font-size: 14.5px; font-weight: 700; margin: 0 0 10px; position: relative; padding-bottom: 8px;
  border-bottom: 1px solid var(--p402-line);
}
.p402-rail-title i { color: var(--p402-rust); margin-right: 5px; }
.p402-rail-search { display: flex; gap: 8px; }
.p402-rail-search input {
  flex: 1 1 auto; min-width: 0; border: 1px solid var(--p402-line-strong);
  background: var(--p402-surface-2); color: var(--p402-ink);
  padding: 9px 13px; font: inherit; font-size: 13px; border-radius: var(--p402-radius-sm);
}
.p402-rail-search input:focus { outline: 2px solid var(--p402-rust); outline-offset: 1px; }
.p402-rail-search button {
  border: none; cursor: pointer; background: var(--p402-rust); color: #ffffff;
  padding: 0 14px; border-radius: var(--p402-radius-sm); font-size: 13px;
}
.p402-rail-search button:hover { background: var(--p402-rust-deep); }
.p402-rail-empty { font-size: 13px; color: var(--p402-muted); margin: 10px 0 0; }
.p402-rail-cta {
  background: var(--p402-plum); border-radius: var(--p402-radius); padding: 16px;
  color: #cfc3dc;
}
.p402-rail-cta p { font-size: 13.5px; margin: 0 0 12px; }

.p402-ranklist { list-style: none; margin: 0; padding: 0; }
.p402-ranklist li { border-bottom: 1px solid var(--p402-line); }
.p402-ranklist li:last-child { border-bottom: none; }
.p402-ranklist a {
  display: flex; align-items: center; gap: 10px; padding: 9px 0; color: var(--p402-ink);
}
.p402-ranklist a:hover { color: var(--p402-rust-deep); }
.p402-ranklist img {
  width: 40px; height: 40px; object-fit: contain; flex: 0 0 40px;
  background: var(--p402-surface-2); border: 1px solid var(--p402-line); border-radius: 6px;
}
.p402-rankno {
  width: 24px; height: 24px; flex: 0 0 24px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  background: var(--p402-plum-wash); color: var(--p402-plum); border-radius: 6px;
}
.p402-ranklist-text { min-width: 0; }
.p402-ranklist-text b {
  display: block; font-size: 13px; font-weight: 600; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.p402-ranklist-text small { font-size: 11.5px; color: var(--p402-muted); }
.p402-ranklist-text small i { color: var(--p402-star); }

/* ---------- detail page ---------- */
/* The detail page reuses the frame's two-column split, so the rail sits
   beside the article instead of dropping below it. */
.p402-detail {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px;
  align-items: start; padding: 22px 0 48px;
}
.p402-crumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--p402-muted); margin: 0 0 12px;
}
.p402-crumb a { color: var(--p402-ink-soft); }
.p402-crumb a:hover { color: var(--p402-rust-deep); }

.p402-summary {
  background: var(--p402-surface); border: 1px solid var(--p402-line);
  border-top: 3px solid var(--p402-rust); padding: 20px; border-radius: var(--p402-radius);
}
.p402-summary-top { display: flex; gap: 16px; align-items: flex-start; }
.p402-summary-icon {
  width: 80px; height: 80px; flex: 0 0 80px;
  background: var(--p402-surface-2); border: 1px solid var(--p402-line);
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 26px; color: var(--p402-plum); border-radius: var(--p402-radius-sm);
}
.p402-summary-icon img { width: 64px; height: 64px; object-fit: contain; }
.p402-summary-id { min-width: 0; }
.p402-summary-cat {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--p402-rust-deep); background: var(--p402-rust-wash);
  padding: 3px 10px; margin-bottom: 6px; border-radius: var(--p402-radius-sm);
}
.p402-summary-title {
  font-size: clamp(23px, 3vw, 32px); font-weight: 700; margin: 0 0 8px; letter-spacing: -.4px;
}
.p402-summary-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p402-summary-rate { color: var(--p402-gold-deep); font-weight: 700; font-size: 13.5px; }
.p402-summary-rate i { color: var(--p402-star); }
.p402-chip {
  font-size: 11.5px; color: var(--p402-ink-soft); background: var(--p402-surface-2);
  border: 1px solid var(--p402-line); padding: 2px 10px; border-radius: var(--p402-radius-sm);
}
.p402-summary-actions { margin: 18px 0 4px; }

.p402-intro {
  background: var(--p402-plum-wash); border: 1px solid var(--p402-line);
  border-left: 4px solid var(--p402-plum); padding: 14px 16px; margin: 16px 0;
  font-size: 14px; color: var(--p402-ink); border-radius: var(--p402-radius-sm);
}
.p402-intro p { margin: 0; }
.p402-intro.is-steps { background: var(--p402-surface-2); border-left-color: var(--p402-rust); }
.p402-intro.is-steps b { display: block; margin-bottom: 6px; }
.p402-intro.is-steps ol { margin: 0; padding-left: 1.25em; font-size: 13.5px; }

.p402-social {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; border-bottom: 1px solid var(--p402-line); padding-bottom: 14px; margin-bottom: 16px;
}
.p402-social b {
  font-size: 12px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--p402-muted);
}
.p402-social-row { display: flex; gap: 8px; }
.p402-social-row a {
  width: 36px; height: 36px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px;
  background: var(--p402-surface-2); border: 1px solid var(--p402-line);
  color: var(--p402-ink-soft); border-radius: 50%;
}
.p402-social-row a:hover { background: var(--p402-rust); border-color: var(--p402-rust); color: #ffffff; }

.p402-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px; margin: 0 0 18px;
}
.p402-fact {
  background: var(--p402-surface-2); border: 1px solid var(--p402-line); padding: 10px 12px;
  border-radius: var(--p402-radius-sm);
}
.p402-fact dt {
  font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
  color: var(--p402-muted); margin-bottom: 2px;
}
.p402-fact dd { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--p402-ink); }

.p402-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.p402-tag {
  font-size: 12.5px; font-weight: 600; padding: 5px 12px;
  background: var(--p402-surface-2); border: 1px solid var(--p402-line); color: var(--p402-ink-soft);
  border-radius: var(--p402-radius-sm);
}
.p402-tag:hover { border-color: var(--p402-rust); color: var(--p402-rust-deep); }
.p402-tag.is-active { background: var(--p402-rust); border-color: var(--p402-rust); color: #ffffff; }

.p402-toc {
  background: var(--p402-surface); border: 1px solid var(--p402-line);
  border-left: 4px solid var(--p402-rust); padding: 16px 18px; margin: 24px 0 18px;
  border-radius: var(--p402-radius-sm);
}
.p402-toc-title { font-size: 16px; font-weight: 700; margin: 0 0 8px; padding: 0; }
.p402-toc-title i { color: var(--p402-rust); margin-right: 5px; }
.p402-toc ol { margin: 0; padding-left: 1.25em; font-size: 13.5px; }
.p402-toc ol ol { font-size: 13px; color: var(--p402-ink-soft); margin: 2px 0 6px; }

.p402-article {
  background: var(--p402-surface); border: 1px solid var(--p402-line);
  padding: 22px 24px; font-size: 14.5px; border-radius: var(--p402-radius);
}
.p402-article h2 {
  font-size: 20px; font-weight: 700; margin: 26px 0 10px;
  padding-left: 13px; position: relative; scroll-margin-top: 90px;
}
.p402-article h2::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 22px; border-radius: 3px; background: var(--p402-rust);
}
.p402-article h3 { font-size: 17px; font-weight: 700; margin: 20px 0 8px; }
.p402-article h2:first-child { margin-top: 0; }
.p402-article ul, .p402-article ol { font-size: 14px; }
.p402-article a { color: var(--p402-blue); text-decoration: underline; }
.p402-article a:hover { color: var(--p402-blue-deep); }
.p402-article strong { color: var(--p402-plum); }
.p402-article details {
  border: 1px solid var(--p402-line); padding: 10px 14px; margin: 10px 0;
  background: var(--p402-surface-2); border-radius: var(--p402-radius-sm);
}
.p402-article summary { cursor: pointer; font-weight: 700; color: var(--p402-plum); }
.p402-shot { margin: 18px 0; }
.p402-shot img {
  width: 100%; max-width: 520px; display: block; margin: 0 auto;
  border: 1px solid var(--p402-line); border-radius: var(--p402-radius-sm);
}
.p402-shot figcaption { text-align: center; font-size: 12px; color: var(--p402-muted); margin-top: 8px; }
.p402-related-inline {
  background: var(--p402-rust-wash); border: 1px solid var(--p402-line);
  border-left: 4px solid var(--p402-rust); padding: 10px 14px; font-size: 13.5px;
  border-radius: var(--p402-radius-sm);
}
.p402-related-inline a { color: var(--p402-blue); }

/* ---------- download zone (shared appkit markup) ---------- */
.p402-dlzone { margin: 24px 0; }
.app-dl-zone {
  background: var(--p402-surface); border: 1px solid var(--p402-line);
  border-top: 3px solid var(--p402-rust); padding: 18px; text-align: center;
  border-radius: var(--p402-radius);
}
.app-dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 30px; border: none; cursor: pointer; border-radius: var(--p402-radius-sm);
  background: var(--p402-rust); color: #ffffff;
  font: inherit; font-weight: 700; font-size: 14px;
  box-shadow: var(--p402-shadow-sm);
}
.app-dl-btn:hover { background: var(--p402-rust-deep); color: #ffffff; }
.app-dl-progress { margin-bottom: 14px; }
.app-dl-progress span { display: block; font-size: 13px; color: var(--p402-ink-soft); margin-bottom: 8px; }
.app-dl-bar {
  display: block; height: 7px; background: var(--p402-surface-2);
  overflow: hidden; position: relative; border-radius: 4px;
}
.app-dl-bar b {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, var(--p402-rust), var(--p402-gold));
  display: block;
}
.app-dl-install {
  background: var(--p402-surface-2); border: 1px solid var(--p402-line);
  padding: 12px 16px; margin-bottom: 14px; text-align: left;
  border-radius: var(--p402-radius-sm);
}
.app-dl-install b { display: block; margin-bottom: 6px; }
.app-dl-install ol { margin: 0; padding-left: 1.25em; font-size: 13.5px; }
.p402-body .app-dl-final,
.p402-body a.app-dl-final {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 30px; font-weight: 700; font-size: 14px;
  border-radius: var(--p402-radius-sm);
  background: var(--p402-rust); color: #ffffff; text-decoration: none;
  box-shadow: var(--p402-shadow-sm);
}
.p402-body .app-dl-final:hover,
.p402-body a.app-dl-final:hover { background: var(--p402-rust-deep); color: #ffffff; }
.app-dl-final[hidden] { display: none; }

/* ---------- comments ---------- */
.p402-comments {
  background: var(--p402-surface); border: 1px solid var(--p402-line);
  border-top: 3px solid var(--p402-rust); padding: 18px; margin: 24px 0 0;
  border-radius: var(--p402-radius);
}
.p402-comments-title { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.p402-comments-title i { color: var(--p402-rust); margin-right: 5px; }
.p402-cform label { display: block; margin-bottom: 12px; }
.p402-cform label > span {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--p402-muted); margin-bottom: 5px;
}
.p402-cform input, .p402-cform textarea {
  width: 100%; border: 1px solid var(--p402-line-strong);
  padding: 10px 14px; font: inherit; font-size: 14px; border-radius: var(--p402-radius-sm);
  background: var(--p402-surface-2); color: var(--p402-ink);
}
.p402-cform input:focus, .p402-cform textarea:focus {
  outline: 2px solid var(--p402-rust); outline-offset: 1px; border-color: var(--p402-rust);
}
.p402-cform small { display: block; font-size: 11.5px; color: var(--p402-muted); margin-top: 4px; }
.p402-cform button {
  border: none; cursor: pointer; background: var(--p402-gold); color: #241c2e;
  padding: 11px 26px; font: inherit; font-weight: 700; font-size: 13.5px;
  border-radius: var(--p402-radius-sm);
}
.p402-cform button:hover { background: var(--p402-gold-deep); color: #241c2e; }
.p402-cform-success {
  margin: 12px 0 0; font-size: 13.5px; color: #0a6a3c;
  background: #e6f6ec; padding: 9px 12px; border-radius: var(--p402-radius-sm);
}

/* ---------- landing ---------- */
.p402-landing {
  background: var(--p402-surface); border: 1px solid var(--p402-line);
  border-top: 3px solid var(--p402-rust); padding: 24px; max-width: 840px; margin: 0 auto;
  border-radius: var(--p402-radius);
}
.p402-landing-id { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.p402-landing-idmain { min-width: 0; }
.p402-landing-title { font-size: clamp(23px, 3vw, 32px); font-weight: 700; margin: 4px 0 6px; letter-spacing: -.4px; }
.p402-facts.is-landing { margin-bottom: 18px; }
.p402-landing-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.p402-landing-actions .p402-btn.is-ghost { border-color: var(--p402-line-strong); color: var(--p402-ink); }
.p402-landing-actions .p402-btn.is-ghost:hover { border-color: var(--p402-rust); background: var(--p402-rust-wash); color: var(--p402-rust-deep); }

/* ---------- 404 ---------- */
.p402-nf { text-align: center; padding: 60px 20px 80px; }
.p402-nf-stamp {
  display: inline-block; font-weight: 700;
  font-size: 56px; color: var(--p402-rust); line-height: 1;
  border: 2px dashed var(--p402-plum); padding: 12px 26px; margin-bottom: 18px;
  border-radius: var(--p402-radius);
}
.p402-nf h1 { font-size: 27px; font-weight: 700; color: var(--p402-plum); }
.p402-nf p { color: var(--p402-ink-soft); }
.p402-nf .p402-btn.is-brand { margin-top: 6px; }

/* ---------- dock ---------- */
.p402-dock {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 70;
  background: var(--p402-plum); border: 1px solid #4a3867;
  padding: 6px; box-shadow: var(--p402-shadow); border-radius: 24px;
  /* The dock floats over the page, so it never grows past the viewport. */
  max-width: calc(100% - 24px);
}
.p402-dock-btn {
  padding: 9px 22px; font-size: 13px; font-weight: 700;
  color: #c9bcd6; background: transparent; border-radius: 18px;
}
.p402-dock-btn:hover { background: rgba(255, 255, 255, .10); color: var(--p402-gold); }
.p402-dock-btn.is-brand { background: var(--p402-rust); color: #ffffff; }
.p402-dock-btn.is-brand:hover { background: var(--p402-rust-deep); color: #ffffff; }

/* ---------- footer ---------- */
.p402-foot { background: var(--p402-plum-deep); color: #a294b4; margin-top: 20px; }
.p402-foot-in {
  width: min(1200px, 100% - 32px); margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 26px;
  padding: 36px 0 26px;
}
.p402-foot-logo {
  font-weight: 700; font-size: 22px; color: #ffffff;
  display: inline-block; margin-bottom: 10px;
}
.p402-foot-text { font-size: 13px; color: #a294b4; margin: 0 0 12px; }
.p402-foot-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.p402-age-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; font-size: 12px; font-weight: 700;
  color: #241c2e; background: var(--p402-gold); border-radius: 50%;
}
.p402-org-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #a294b4;
  background: rgba(255, 255, 255, .06); border: 1px solid #3a2a5c;
  padding: 6px 12px; border-radius: 18px;
}
.p402-org-badge i { color: var(--p402-gold); }
.p402-foot-col { display: flex; flex-direction: column; gap: 8px; }
.p402-foot-title {
  font-size: 12.5px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--p402-gold); margin: 0 0 4px; position: relative; padding-bottom: 8px;
}
.p402-foot-title::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 42px; height: 2px;
  background: var(--p402-rust);
}
.p402-foot-col a { font-size: 13px; color: #a294b4; }
.p402-foot-col a:hover { color: var(--p402-gold); }
.p402-foot-note { font-size: 12.5px; color: #7e7090; margin: 4px 0 0; }
.p402-foot-social { display: flex; gap: 8px; margin-top: 6px; }
.p402-foot-social a {
  width: 34px; height: 34px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 12.5px;
  background: rgba(255, 255, 255, .06); color: #a294b4;
  border: 1px solid #3a2a5c; border-radius: 50%;
}
.p402-foot-social a:hover { background: var(--p402-rust); border-color: var(--p402-rust); color: #ffffff; }
.p402-foot-base {
  width: min(1200px, 100% - 32px); margin: 0 auto;
  border-top: 1px solid #3a2a5c; padding: 14px 0 22px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: #7e7090;
}
.p402-foot-base p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .p402-frame { grid-template-columns: minmax(0, 1fr) 290px; }
  .p402-detail { grid-template-columns: minmax(0, 1fr) 290px; }
  .p402-hero-in { grid-template-columns: 1fr 260px; }
}

@media (max-width: 900px) {
  .p402-hero-in { grid-template-columns: 1fr; padding: 30px 0; }
  .p402-exhibit { max-width: 340px; }
  .p402-frame { grid-template-columns: 1fr; }
  .p402-detail { grid-template-columns: 1fr; }
  .p402-rail { order: -1; }
  .p402-foot-in { grid-template-columns: 1fr 1fr; }
  .p402-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .p402-burger { display: inline-flex; align-items: center; justify-content: center; }
  .p402-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--p402-plum); border-bottom: 1px solid #3a2a5c;
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 2px;
  }
  .p402-body.is-drawer-open .p402-nav { display: flex; }
  .p402-header-in { position: relative; flex-wrap: wrap; }
  .p402-brand-sub { display: none; }
  .p402-brand-word { font-size: 19px; }
  .p402-tools { margin-left: auto; }
  .p402-card-link { flex-direction: column; gap: 10px; }
  .p402-card-icon { width: 52px; height: 52px; flex: 0 0 52px; }
  .p402-summary-top { gap: 12px; }
  .p402-summary-icon { width: 64px; height: 64px; flex: 0 0 64px; }
  .p402-summary-icon img { width: 50px; height: 50px; }
  .p402-foot-in { grid-template-columns: 1fr; }
  .p402-article { padding: 18px 16px; }
  .p402-dock { bottom: 10px; }
}

@media (max-width: 420px) {
  .p402-grid { grid-template-columns: 1fr; }
}
