/* ============================================================
   table game 5 - layers-dynamic-d11171.css
   Mobile-first shell (320-430px canvas), centered on desktop.
   Prefix: cd1117-  |  palette: felt navy / magenta / orchid
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --cd1117-bg: #212F3D;
  --cd1117-deep: #1A2530;
  --cd1117-panel: #24333F;
  --cd1117-navy: #000080;
  --cd1117-magenta: #8B008B;
  --cd1117-orchid: #9932CC;
  --cd1117-ink: #F5F5F5;
  --cd1117-mute: #BDC3C7;
  --cd1117-line: rgba(189, 195, 199, 0.22);
  --cd1117-line-soft: rgba(189, 195, 199, 0.12);
  --cd1117-glow: rgba(153, 50, 204, 0.35);
  --cd1117-hi: rgba(245, 245, 245, 0.06);
  --cd1117-top-h: 96px;
  --cd1117-bnav-h: 62px;
  --cd1117-r-card: 10px;
  --cd1117-r-btn: 6px;
  --cd1117-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { background: var(--cd1117-bg); }
body {
  font-family: var(--cd1117-font);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.62;
  color: var(--cd1117-ink);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 44px rgba(0, 0, 0, 0.55);
  overflow-x: hidden;
  /* keep clear of the fixed bottom action bar */
  padding-bottom: calc(var(--cd1117-bnav-h) + 26px + env(safe-area-inset-bottom, 0px));
}
img { display: block; max-width: 100%; height: auto; border: 0; }
a { color: var(--cd1117-orchid); text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cd1117-orchid);
  outline-offset: 2px;
  border-radius: 4px;
}
ul, ol { list-style: none; }
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* selection flavor */
::selection { background: var(--cd1117-magenta); color: #fff; }

/* ---------- shared type ---------- */
.cd1117-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cd1117-mute);
}
.cd1117-kicker::before {
  content: "";
  width: 16px; height: 2px;
  background: linear-gradient(90deg, var(--cd1117-orchid), var(--cd1117-magenta));
}
h2.cd1117-h2 {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--cd1117-ink);
  margin: 6px 0 10px;
}
h3.cd1117-h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--cd1117-ink);
  margin: 14px 0 6px;
}
.cd1117-p { color: var(--cd1117-mute); margin-bottom: 10px; }
.cd1117-p strong, .cd1117-row strong { color: var(--cd1117-ink); font-weight: 700; }

/* ============================================================
   TOP BAR - tab-style header
   ============================================================ */
.cd1117-top {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 60;
  background: linear-gradient(180deg, #101B26 0%, #182430 100%);
  border-bottom: 1px solid var(--cd1117-line-soft);
}
.cd1117-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 9px 12px 7px;
}
/* brand zone: logo + name only */
.cd1117-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.cd1117-brand-logo {
  width: 36px; height: 36px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--cd1117-line);
  background: var(--cd1117-navy);
  flex: 0 0 auto;
}
.cd1117-brand-name {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--cd1117-ink);
}
.cd1117-brand-name em {
  font-style: normal;
  color: var(--cd1117-orchid);
}
/* action zone: segmented register/login pair + menu key */
.cd1117-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.cd1117-duo {
  display: flex;
  align-items: stretch;
  border-radius: var(--cd1117-r-btn);
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(139, 0, 139, 0.35);
}
.cd1117-btn-reg, .cd1117-btn-log {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: filter 0.18s ease, transform 0.18s ease;
}
.cd1117-btn-reg {
  background: linear-gradient(135deg, var(--cd1117-orchid), var(--cd1117-magenta) 85%);
  color: #fff;
}
.cd1117-btn-log {
  background: rgba(0, 0, 128, 0.55);
  color: var(--cd1117-ink);
  border-left: 1px solid rgba(245, 245, 245, 0.28);
}
.cd1117-btn-reg:hover { filter: brightness(1.12); }
.cd1117-btn-log:hover { filter: brightness(1.3); }
.cd1117-duo:active .cd1117-btn-reg,
.cd1117-duo:active .cd1117-btn-log { transform: scale(0.97); }
.cd1117-menu-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 38px; min-height: 38px;
  border: 1px solid var(--cd1117-line);
  border-radius: var(--cd1117-r-btn);
  background: var(--cd1117-hi);
}
.cd1117-menu-btn span {
  display: block;
  width: 16px; height: 2px;
  background: var(--cd1117-mute);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.cd1117-menu-btn:active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.cd1117-menu-btn:active span:nth-child(2) { opacity: 0; }
.cd1117-menu-btn:active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* category tab strip */
.cd1117-tabs {
  display: flex;
  gap: 4px;
  padding: 0 10px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cd1117-tabs::-webkit-scrollbar { display: none; }
.cd1117-tab {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 13px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cd1117-mute);
  border: 1px solid transparent;
  border-radius: 999px;
  position: relative;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.cd1117-tab::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 0; height: 2px;
  background: var(--cd1117-orchid);
  transform: translateX(-50%);
  transition: width 0.22s ease;
}
.cd1117-tab:hover { color: var(--cd1117-ink); }
.cd1117-tab.cd1117-is-on {
  color: var(--cd1117-ink);
  border-color: var(--cd1117-line);
  background: var(--cd1117-hi);
}
.cd1117-tab.cd1117-is-on::after { width: 18px; }

/* ============================================================
   FULL-HEIGHT MENU LAYER
   ============================================================ */
.cd1117-veil {
  position: fixed;
  inset: 0;
  background: rgba(8, 13, 19, 0.66);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 70;
}
.cd1117-veil-on { opacity: 1; pointer-events: auto; }
.cd1117-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(84vw, 340px);
  background: linear-gradient(175deg, #131E29 0%, #0F1822 100%);
  border-left: 1px solid var(--cd1117-line-soft);
  z-index: 80;
  transform: translateX(102%);
  transition: transform 0.28s cubic-bezier(0.22, 0.9, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px));
}
.cd1117-menu-open { transform: translateX(0); }
.cd1117-lock { overflow: hidden; }
.cd1117-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cd1117-line-soft);
}
.cd1117-menu-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cd1117-orchid);
}
.cd1117-menu-close {
  min-width: 36px; min-height: 36px;
  border: 1px solid var(--cd1117-line);
  border-radius: 50%;
  color: var(--cd1117-mute);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
.cd1117-menu-group { padding: 14px 0 4px; }
.cd1117-menu-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(189, 195, 199, 0.6);
  margin-bottom: 6px;
}
.cd1117-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cd1117-ink);
  border-bottom: 1px solid var(--cd1117-line-soft);
  transition: color 0.16s ease, padding-left 0.16s ease;
}
.cd1117-menu-link small {
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(189, 195, 199, 0.62);
  text-align: right;
}
.cd1117-menu-link::after {
  content: "\203A";
  color: var(--cd1117-orchid);
  font-weight: 800;
}
.cd1117-menu-link:hover { color: var(--cd1117-orchid); padding-left: 8px; }
.cd1117-menu-cta {
  margin-top: 18px;
  display: block;
  text-align: center;
  min-height: 46px;
  line-height: 46px;
  border-radius: var(--cd1117-r-btn);
  background: linear-gradient(135deg, var(--cd1117-orchid), var(--cd1117-magenta) 85%);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 18px rgba(139, 0, 139, 0.4);
}
.cd1117-menu-cta:active { transform: scale(0.98); }

/* ============================================================
   MAIN / HERO
   ============================================================ */
.cd1117-main {
  padding: calc(var(--cd1117-top-h) + 14px) 14px 10px;
}
.cd1117-hero { padding: 8px 0 4px; }
.cd1117-h1 {
  font-size: 26px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 8px 0 12px;
  color: var(--cd1117-ink);
}
.cd1117-h1 b {
  color: transparent;
  background: linear-gradient(90deg, #C77DFF, var(--cd1117-orchid) 55%, var(--cd1117-magenta));
  -webkit-background-clip: text;
  background-clip: text;
}
/* segmented hero action: solid segment + outline segment */
.cd1117-hero-duo {
  display: flex;
  align-items: stretch;
  border-radius: 8px;
  margin: 14px 0 12px;
  box-shadow: 0 8px 22px rgba(139, 0, 139, 0.32);
}
.cd1117-hero-duo a {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: filter 0.18s ease;
}
.cd1117-hero-duo .cd1117-seg-a {
  background: linear-gradient(135deg, var(--cd1117-orchid), var(--cd1117-magenta) 88%);
  color: #fff;
  border-radius: 8px 0 0 8px;
}
.cd1117-hero-duo .cd1117-seg-b {
  background: rgba(0, 0, 128, 0.5);
  color: var(--cd1117-ink);
  border: 1px solid var(--cd1117-line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
}
.cd1117-hero-duo a:hover { filter: brightness(1.12); }
.cd1117-hero-duo:active a { filter: brightness(0.94); }
.cd1117-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 6px;
}
.cd1117-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--cd1117-mute);
  border: 1px solid var(--cd1117-line-soft);
  border-radius: 999px;
  background: var(--cd1117-hi);
}
.cd1117-chip::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cd1117-orchid);
}

/* ============================================================
   PROMO CAROUSEL
   ============================================================ */
.cd1117-stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--cd1117-line-soft);
  background: var(--cd1117-deep);
  margin: 14px 0 6px;
  aspect-ratio: 2 / 1;
}
.cd1117-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}
.cd1117-slide.cd1117-is-live { opacity: 1; transform: translateX(0); pointer-events: auto; }
.cd1117-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.cd1117-slide-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 14px 12px;
  background: linear-gradient(180deg, rgba(10, 16, 23, 0) 0%, rgba(10, 16, 23, 0.88) 78%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.cd1117-slide-cap p {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--cd1117-ink);
  max-width: 66%;
}
.cd1117-slide-go {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cd1117-orchid), var(--cd1117-magenta));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.cd1117-dots {
  position: absolute;
  right: 10px; top: 10px;
  display: flex;
  gap: 5px;
  z-index: 3;
}
.cd1117-dot {
  width: 7px; height: 7px;
  min-width: 7px;
  border-radius: 999px;
  border: 1px solid rgba(245, 245, 245, 0.75);
  background: transparent;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cd1117-dot.cd1117-is-live {
  background: var(--cd1117-orchid);
  border-color: var(--cd1117-orchid);
  transform: scale(1.25);
}

/* ============================================================
   GAME SHELVES - outlined tile cards
   ============================================================ */
.cd1117-shelf {
  margin-top: 26px;
  scroll-margin-top: calc(var(--cd1117-top-h) + 8px);
  animation: cd1117-rise 0.5s ease both;
}
.cd1117-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--cd1117-line-soft);
  padding-bottom: 7px;
  margin-bottom: 9px;
}
.cd1117-shelf-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cd1117-orchid);
  white-space: nowrap;
}
.cd1117-shelf h2 { margin: 0; }
.cd1117-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.cd1117-tile {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--cd1117-panel), var(--cd1117-deep));
  border: 1px solid var(--cd1117-line);
  border-radius: var(--cd1117-r-card);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.cd1117-tile:hover {
  border-color: var(--cd1117-orchid);
  box-shadow: 0 4px 14px rgba(153, 50, 204, 0.22);
}
.cd1117-tile:active { transform: scale(0.965); }
.cd1117-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #101821;
}
.cd1117-tile-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 5px 6px 6px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: var(--cd1117-mute);
}
/* related-reading chips under each shelf */
.cd1117-shelf-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.cd1117-chiplink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--cd1117-mute);
  border: 1px dashed var(--cd1117-line);
  border-radius: 999px;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.cd1117-chiplink::before { content: "\22C5"; color: var(--cd1117-orchid); font-weight: 800; }
.cd1117-chiplink:hover { color: var(--cd1117-ink); border-color: var(--cd1117-orchid); }

/* ============================================================
   CONTENT MODULES
   ============================================================ */
.cd1117-prose {
  margin-top: 30px;
  padding: 16px 15px 14px;
  background: linear-gradient(180deg, rgba(36, 51, 63, 0.6), rgba(26, 37, 48, 0.6));
  border: 1px solid var(--cd1117-line-soft);
  border-left: 3px solid var(--cd1117-orchid);
  border-radius: var(--cd1117-r-card);
  animation: cd1117-rise 0.5s ease both;
}
/* label rows: conclusion line + detail */
.cd1117-rows { margin: 10px 0 4px; }
.cd1117-row {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--cd1117-line-soft);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--cd1117-mute);
}
.cd1117-row:last-child { border-bottom: 0; }
.cd1117-row b {
  flex: 0 0 auto;
  color: var(--cd1117-ink);
}
/* numbered steps */
.cd1117-steps { counter-reset: cd1117step; margin: 10px 0 2px; }
.cd1117-step {
  position: relative;
  counter-increment: cd1117step;
  padding: 8px 0 8px 38px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--cd1117-mute);
  border-bottom: 1px dashed var(--cd1117-line-soft);
}
.cd1117-step:last-child { border-bottom: 0; }
.cd1117-step::before {
  content: counter(cd1117step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 10px;
  width: 26px; height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--cd1117-orchid);
  border: 1px solid var(--cd1117-line);
  border-radius: 8px;
  background: var(--cd1117-hi);
}
/* profile bullets */
.cd1117-bullets { margin: 10px 0 4px; }
.cd1117-bullets li {
  position: relative;
  padding: 8px 0 8px 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--cd1117-mute);
  border-bottom: 1px dashed var(--cd1117-line-soft);
}
.cd1117-bullets li:last-child { border-bottom: 0; }
.cd1117-bullets li::before {
  content: "";
  position: absolute;
  left: 2px; top: 15px;
  width: 7px; height: 7px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--cd1117-orchid), var(--cd1117-magenta));
}
/* compact verdict strip */
.cd1117-verdict {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--cd1117-ink);
  background: rgba(0, 0, 128, 0.32);
  border: 1px solid rgba(153, 50, 204, 0.35);
  border-radius: 8px;
}
.cd1117-verdict b { color: #E4C4FF; }

/* ============================================================
   EXTENDED FOOTER (directory > brand > promos > disclaimer)
   ============================================================ */
.cd1117-xfoot {
  margin: 34px 14px 0;
  border-top: 1px solid var(--cd1117-line-soft);
  padding-top: 18px;
}
.cd1117-xfoot-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cd1117-orchid);
  margin: 18px 0 8px;
}
.cd1117-xfoot-label:first-child { margin-top: 0; }
.cd1117-dir { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cd1117-dir-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 44px;
  padding: 7px 9px;
  background: var(--cd1117-hi);
  border: 1px solid var(--cd1117-line-soft);
  border-radius: 8px;
  transition: border-color 0.16s ease;
}
.cd1117-dir-link:hover { border-color: var(--cd1117-orchid); }
.cd1117-dir-link b {
  font-size: 12px;
  font-weight: 700;
  color: var(--cd1117-ink);
  line-height: 1.3;
}
.cd1117-dir-link small {
  font-size: 10.5px;
  color: rgba(189, 195, 199, 0.72);
  line-height: 1.35;
}
.cd1117-promos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cd1117-promo-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 54px;
  padding: 8px 11px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(153, 50, 204, 0.24), rgba(139, 0, 139, 0.34));
  border: 1px solid rgba(153, 50, 204, 0.5);
  transition: filter 0.16s ease, transform 0.16s ease;
}
.cd1117-promo-btn:hover { filter: brightness(1.15); }
.cd1117-promo-btn:active { transform: scale(0.97); }
.cd1117-promo-btn b {
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
}
.cd1117-promo-btn small {
  font-size: 10.5px;
  color: rgba(245, 245, 245, 0.78);
}
.cd1117-note {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(189, 195, 199, 0.75);
  padding: 10px 11px;
  border: 1px dashed var(--cd1117-line);
  border-radius: 8px;
}

/* ============================================================
   COMMON FOOTER + BOTTOM ACTION BAR
   ============================================================ */
.cd1117-foot {
  margin-top: 26px;
  padding: 14px 14px 8px;
  border-top: 1px solid var(--cd1117-line-soft);
  text-align: center;
}
.cd1117-foot p {
  font-size: 11px;
  color: rgba(189, 195, 199, 0.66);
}
.cd1117-foot p b { color: var(--cd1117-mute); }

.cd1117-bnav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--cd1117-bnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  z-index: 65;
  background: linear-gradient(180deg, #141F2A 0%, #0E1720 100%);
  border-top: 1px solid var(--cd1117-line-soft);
}
/* segmented action bar: thin seams between roles */
.cd1117-bnav-item {
  flex: 1 1 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: var(--cd1117-bnav-h);
  position: relative;
  color: var(--cd1117-mute);
  transition: color 0.18s ease;
}
.cd1117-bnav-item + .cd1117-bnav-item::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 30px;
  background: var(--cd1117-line-soft);
}
.cd1117-bnav-ico {
  width: 23px; height: 23px;
  display: block;
}
.cd1117-bnav-ico svg {
  width: 100%; height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.2s ease, stroke 0.2s ease;
}
.cd1117-bnav-txt {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.82;
  transform: translateY(0);
  transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}
/* label reveal micro-interaction */
.cd1117-bnav-item:hover .cd1117-bnav-txt,
.cd1117-bnav-item:focus-visible .cd1117-bnav-txt {
  opacity: 1;
  transform: translateY(-1px);
}
/* active role: icon fill flips to accent */
.cd1117-bnav-item.cd1117-is-here { color: var(--cd1117-orchid); }
.cd1117-bnav-item.cd1117-is-here .cd1117-bnav-txt { opacity: 1; color: #D9A8FF; }
.cd1117-bnav-item.cd1117-is-here .cd1117-bnav-ico svg { fill: rgba(153, 50, 204, 0.3); }
/* center promo role gets a raised plate */
.cd1117-bnav-item.cd1117-bnav-go { color: #fff; }
.cd1117-bnav-item.cd1117-bnav-go .cd1117-bnav-ico {
  width: 30px; height: 30px;
  margin-top: -12px;
  padding: 5px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cd1117-orchid), var(--cd1117-magenta));
  box-shadow: 0 5px 14px rgba(139, 0, 139, 0.5);
}
.cd1117-bnav-item.cd1117-bnav-go .cd1117-bnav-ico svg { stroke: #fff; stroke-width: 2; }
.cd1117-bnav-item.cd1117-bnav-go .cd1117-bnav-txt { color: #E9D3FF; }

/* ============================================================
   MOTION + BREAKPOINTS
   ============================================================ */
@keyframes cd1117-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* roomier phones */
@media (min-width: 375px) {
  .cd1117-h1 { font-size: 28px; }
  .cd1117-tile-name { font-size: 11px; }
  .cd1117-dir-link b { font-size: 12.5px; }
}
/* wider handsets: shelves may carry a 5th column */
@media (min-width: 400px) {
  .cd1117-grid { grid-template-columns: repeat(5, 1fr); }
}
/* 430px canvas and up */
@media (min-width: 430px) {
  body { font-size: 15.5px; }
  .cd1117-h1 { font-size: 30px; }
  h2.cd1117-h2 { font-size: 20px; }
  .cd1117-main { padding-left: 18px; padding-right: 18px; }
  .cd1117-xfoot { margin-left: 18px; margin-right: 18px; }
  .cd1117-grid { gap: 10px; }
  .cd1117-tile-name { font-size: 11.5px; }
  .cd1117-stage { aspect-ratio: 21 / 9; }
}
/* desktop keeps the phone canvas centered with breathing room */
@media (min-width: 520px) {
  html { background: #0B121B; }
  .cd1117-stage { aspect-ratio: 5 / 2; }
}

/* readability guard for very long game names */
.cd1117-tile-name { word-break: break-word; overflow-wrap: anywhere; hyphens: auto; }
