/* 100jili frame - mobile-first base styles for 100jili.homes. */
/* All class tokens use the viewe5f8c- prefix. English comments only. */

:root {
  /* Palette: deep slate, Indian red, silver, cyan. */
  --viewe5f8c-bg: #2E4057;
  --viewe5f8c-bg-deep: #233648;
  --viewe5f8c-bg-soft: #36506B;
  --viewe5f8c-bg-light: #3E5774;
  --viewe5f8c-card: rgba(255, 255, 255, 0.04);
  --viewe5f8c-card-border: rgba(173, 184, 189, 0.18);

  --viewe5f8c-red: #CD5C5C;
  --viewe5f8c-red-deep: #A84545;
  --viewe5f8c-red-soft: #E07474;
  --viewe5f8c-silver: #ADB5BD;
  --viewe5f8c-silver-dim: #8893A0;
  --viewe5f8c-cyan: #00B8D4;
  --viewe5f8c-cyan-soft: #34D8F0;
  --viewe5f8c-ink: #0F1B26;

  --viewe5f8c-text: #EEF3F6;
  --viewe5f8c-text-dim: #C8D2D9;

  --viewe5f8c-font-display: "Helvetica Neue", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --viewe5f8c-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --viewe5f8c-radius-xs: 4px;
  --viewe5f8c-radius-sm: 6px;
  --viewe5f8c-radius-md: 10px;

  --viewe5f8c-header-h: 98px;
  --viewe5f8c-bottomnav-h: 62px;
  --viewe5f8c-canvas-max: 430px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #14222D;
  color: var(--viewe5f8c-text);
  font-family: var(--viewe5f8c-font-body);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a {
  color: var(--viewe5f8c-cyan-soft);
  text-decoration: none;
}
a:focus-visible {
  outline: 2px solid var(--viewe5f8c-cyan-soft);
  outline-offset: 2px;
  border-radius: 2px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

/* Centered phone canvas. */
.viewe5f8c-canvas {
  position: relative;
  max-width: var(--viewe5f8c-canvas-max);
  margin: 0 auto;
  background: var(--viewe5f8c-bg);
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.45);
}

/* ===== Header (brand + action double layer) ===== */
.viewe5f8c-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, #2C4258 0%, #2E4057 100%);
  border-bottom: 1px solid rgba(173, 184, 189, 0.20);
}

.viewe5f8c-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px 7px;
}

.viewe5f8c-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.viewe5f8c-brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--viewe5f8c-radius-sm);
  background: #fff;
  object-fit: contain;
  padding: 3px;
  flex: 0 0 auto;
}
.viewe5f8c-brand-name {
  font-family: var(--viewe5f8c-font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 22px;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
}
.viewe5f8c-brand-name em {
  font-style: normal;
  color: var(--viewe5f8c-cyan-soft);
}

.viewe5f8c-menu-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(173, 184, 189, 0.30);
  border-radius: var(--viewe5f8c-radius-sm);
  background: rgba(0, 0, 0, 0.20);
  flex: 0 0 auto;
}
.viewe5f8c-menu-btn:hover { background: rgba(0, 0, 0, 0.34); }
.viewe5f8c-menu-btn:active { transform: translateY(1px); }
.viewe5f8c-menu-btn svg { width: 22px; height: 22px; stroke: #fff; }

.viewe5f8c-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 9px;
}

/* ===== Buttons (square-edge, high contrast) ===== */
.viewe5f8c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--viewe5f8c-radius-xs);
  font-family: var(--viewe5f8c-font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.viewe5f8c-btn:active { transform: translateY(1px); }

.viewe5f8c-btn--ghost {
  background: transparent;
  border: 1px solid var(--viewe5f8c-silver);
  color: #fff;
}
.viewe5f8c-btn--ghost:hover {
  background: rgba(173, 184, 189, 0.18);
  border-color: #fff;
}

.viewe5f8c-btn--solid {
  background: var(--viewe5f8c-red);
  color: #fff;
  border: 1px solid var(--viewe5f8c-red-deep);
}
.viewe5f8c-btn--solid:hover { background: var(--viewe5f8c-red-deep); }

.viewe5f8c-btn--cyan {
  background: var(--viewe5f8c-cyan);
  color: var(--viewe5f8c-ink);
  border: 1px solid #009BB3;
}
.viewe5f8c-btn--cyan:hover { background: var(--viewe5f8c-cyan-soft); }

.viewe5f8c-btn--block { width: 100%; }

/* ===== Compact route panel (slide-down menu) ===== */
.viewe5f8c-route-panel {
  position: absolute;
  top: var(--viewe5f8c-header-h);
  left: 0;
  right: 0;
  background: var(--viewe5f8c-bg-deep);
  border-bottom: 1px solid rgba(173, 184, 189, 0.22);
  padding: 12px 14px 16px;
  z-index: 55;
  transform: translateY(-14px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.18s ease, opacity 0.18s ease, visibility 0.18s ease;
}
.viewe5f8c-route-panel.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.viewe5f8c-route-title {
  font-family: var(--viewe5f8c-font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--viewe5f8c-silver);
  margin: 4px 0 8px;
}
.viewe5f8c-route-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.viewe5f8c-route-link {
  display: flex;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid rgba(173, 184, 189, 0.18);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--viewe5f8c-radius-xs);
  color: var(--viewe5f8c-text);
  font-size: 12.5px;
  line-height: 1.25;
  min-height: 44px;
}
.viewe5f8c-route-link:hover {
  background: rgba(0, 184, 212, 0.16);
  border-color: rgba(0, 184, 212, 0.45);
  color: #fff;
}

.viewe5f8c-route-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 38, 0.55);
  z-index: 54;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.viewe5f8c-route-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* ===== Main ===== */
.viewe5f8c-main {
  padding-bottom: calc(var(--viewe5f8c-bottomnav-h) + 22px);
}

/* ===== Hero carousel ===== */
.viewe5f8c-hero {
  position: relative;
  margin: 12px 12px 0;
  border-radius: var(--viewe5f8c-radius-md);
  overflow: hidden;
  border: 1px solid rgba(173, 184, 189, 0.20);
  background: var(--viewe5f8c-bg-deep);
}
.viewe5f8c-hero-viewport { overflow: hidden; }
.viewe5f8c-hero-track {
  display: flex;
  transition: transform 0.42s cubic-bezier(0.22, 0.70, 0.25, 1);
  will-change: transform;
}
.viewe5f8c-hero-slide {
  flex: 0 0 100%;
  position: relative;
}
.viewe5f8c-hero-slide a {
  display: block;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.viewe5f8c-hero-slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.viewe5f8c-hero-cap {
  position: absolute;
  left: 12px;
  bottom: 10px;
  right: 12px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
}
.viewe5f8c-hero-cap span {
  display: inline-block;
  font-family: var(--viewe5f8c-font-display);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
  background: var(--viewe5f8c-red);
  padding: 3px 7px;
  border-radius: var(--viewe5f8c-radius-xs);
}
.viewe5f8c-hero-cap strong {
  display: block;
  font-size: 16px;
  margin-top: 6px;
  font-family: var(--viewe5f8c-font-display);
  letter-spacing: -0.01em;
  line-height: 1.18;
}
.viewe5f8c-hero-dots {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  gap: 5px;
}
.viewe5f8c-hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  border: 0;
  padding: 0;
  transition: all 0.2s ease;
}
.viewe5f8c-hero-dot.is-active {
  background: var(--viewe5f8c-cyan-soft);
  width: 18px;
  border-radius: 4px;
}

/* ===== Sections ===== */
.viewe5f8c-section {
  padding: 18px 14px 4px;
}

.viewe5f8c-lead {
  border-left: 3px solid var(--viewe5f8c-cyan);
  padding: 4px 0 4px 12px;
  margin-bottom: 12px;
}

.viewe5f8c-h1 {
  font-family: var(--viewe5f8c-font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.06;
  font-size: 30px;
  margin: 0 0 12px;
  color: #fff;
}

.viewe5f8c-lead-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--viewe5f8c-text-dim);
  margin: 0 0 12px;
}

.viewe5f8c-answer {
  background: var(--viewe5f8c-bg-deep);
  border: 1px solid rgba(0, 184, 212, 0.30);
  border-radius: var(--viewe5f8c-radius-sm);
  padding: 12px 14px;
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--viewe5f8c-text);
}
.viewe5f8c-answer b {
  color: var(--viewe5f8c-cyan-soft);
  font-weight: 700;
}

.viewe5f8c-h2 {
  font-family: var(--viewe5f8c-font-display);
  font-weight: 800;
  letter-spacing: -0.012em;
  font-size: 19px;
  line-height: 1.2;
  margin: 0 0 10px;
  color: #fff;
}

.viewe5f8c-h3 {
  font-family: var(--viewe5f8c-font-display);
  font-size: 13px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--viewe5f8c-cyan-soft);
  margin: 16px 0 6px;
}

.viewe5f8c-p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--viewe5f8c-text-dim);
  margin: 0 0 10px;
}
.viewe5f8c-p a {
  color: var(--viewe5f8c-cyan-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Category highlight tiles. */
.viewe5f8c-cat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.viewe5f8c-cat-tile {
  border: 1px solid rgba(173, 184, 189, 0.18);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--viewe5f8c-radius-sm);
  padding: 10px 11px;
  position: relative;
}
.viewe5f8c-cat-tile h3 {
  margin: 0 0 4px;
  font-family: var(--viewe5f8c-font-display);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--viewe5f8c-cyan-soft);
}
.viewe5f8c-cat-tile p {
  margin: 0;
  font-size: 12px;
  color: var(--viewe5f8c-text-dim);
  line-height: 1.5;
}

/* ===== Game sections ===== */
.viewe5f8c-game-section {
  padding: 18px 12px 6px;
}
.viewe5f8c-game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 2px;
}
.viewe5f8c-game-title {
  font-family: var(--viewe5f8c-font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.viewe5f8c-game-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--viewe5f8c-red);
  display: inline-block;
}
.viewe5f8c-game-count {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--viewe5f8c-silver);
  text-transform: uppercase;
}

.viewe5f8c-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.viewe5f8c-card {
  position: relative;
  border-radius: var(--viewe5f8c-radius-sm);
  overflow: hidden;
  background: var(--viewe5f8c-bg-deep);
  border: 1px solid rgba(173, 184, 189, 0.16);
  display: block;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.viewe5f8c-card:hover,
.viewe5f8c-card:focus-visible {
  border-color: var(--viewe5f8c-cyan);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 184, 212, 0.18);
  outline: none;
}
.viewe5f8c-card:active { transform: translateY(0); }
.viewe5f8c-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #1C2C3A;
  display: block;
}
.viewe5f8c-card-name {
  display: block;
  font-size: 10.5px;
  line-height: 1.20;
  padding: 4px 4px 5px;
  color: var(--viewe5f8c-text);
  background: linear-gradient(180deg, rgba(15, 27, 38, 0) 0%, rgba(15, 27, 38, 0.88) 100%);
  min-height: 28px;
  word-break: break-word;
}

/* Inline game-section footer links (real subpage hrefs). */
.viewe5f8c-game-footer {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.viewe5f8c-game-footer a {
  font-size: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(0, 184, 212, 0.35);
  border-radius: var(--viewe5f8c-radius-xs);
  color: var(--viewe5f8c-cyan-soft);
  background: rgba(0, 184, 212, 0.08);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}
.viewe5f8c-game-footer a:hover {
  background: rgba(0, 184, 212, 0.18);
  color: #fff;
}

/* ===== Play Now CTA ===== */
.viewe5f8c-cta {
  margin: 18px 14px 4px;
  padding: 16px 14px;
  border: 1px dashed rgba(0, 184, 212, 0.55);
  background: linear-gradient(180deg, rgba(0, 184, 212, 0.12), rgba(0, 184, 212, 0.02));
  border-radius: var(--viewe5f8c-radius-sm);
}
.viewe5f8c-cta h2 {
  text-align: left;
  margin-bottom: 8px;
}
.viewe5f8c-cta p {
  font-size: 13px;
  color: var(--viewe5f8c-text-dim);
  margin: 0 0 12px;
  line-height: 1.55;
}
.viewe5f8c-cta-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ===== Page Fact Summary ===== */
.viewe5f8c-facts {
  margin: 4px 14px 0;
  border: 1px solid rgba(173, 184, 189, 0.18);
  background: var(--viewe5f8c-bg-deep);
  border-radius: var(--viewe5f8c-radius-sm);
  padding: 12px 14px;
}
.viewe5f8c-facts ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.viewe5f8c-facts li {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--viewe5f8c-text-dim);
  margin-bottom: 6px;
}
.viewe5f8c-facts li strong { color: #fff; }

/* ===== Extended footer ===== */
.viewe5f8c-ext {
  margin: 22px 12px 6px;
  border-top: 1px solid rgba(173, 184, 189, 0.22);
  padding-top: 14px;
}
.viewe5f8c-ext-title {
  font-family: var(--viewe5f8c-font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--viewe5f8c-silver);
  margin: 14px 0 8px;
}
.viewe5f8c-ext-title:first-child { margin-top: 0; }

.viewe5f8c-ext-brand {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--viewe5f8c-text-dim);
  margin: 6px 0 4px;
}

.viewe5f8c-ext-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.viewe5f8c-ext-link {
  display: flex;
  align-items: center;
  padding: 9px 10px;
  font-size: 12px;
  border: 1px solid rgba(173, 184, 189, 0.16);
  border-radius: var(--viewe5f8c-radius-xs);
  background: rgba(255, 255, 255, 0.03);
  color: var(--viewe5f8c-text);
  min-height: 40px;
  line-height: 1.2;
}
.viewe5f8c-ext-link:hover {
  background: rgba(0, 184, 212, 0.14);
  border-color: rgba(0, 184, 212, 0.45);
  color: #fff;
}

.viewe5f8c-ext-promo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.viewe5f8c-ext-promo button {
  padding: 10px 8px;
  font-size: 11.5px;
  border-radius: var(--viewe5f8c-radius-xs);
  background: var(--viewe5f8c-red);
  color: #fff;
  font-family: var(--viewe5f8c-font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--viewe5f8c-red-deep);
  text-align: center;
  min-height: 40px;
}
.viewe5f8c-ext-promo button.alt {
  background: transparent;
  color: var(--viewe5f8c-cyan-soft);
  border: 1px solid var(--viewe5f8c-cyan);
}
.viewe5f8c-ext-promo button:hover { transform: translateY(-1px); }

.viewe5f8c-ext-disclaimer {
  font-size: 11px;
  line-height: 1.6;
  color: var(--viewe5f8c-silver-dim);
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(173, 184, 189, 0.20);
}

/* Footer copyright row. */
.viewe5f8c-foot {
  padding: 14px 14px 8px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--viewe5f8c-silver-dim);
}

/* ===== Bottom nav (outlined function bar) ===== */
.viewe5f8c-bottomnav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--viewe5f8c-canvas-max);
  height: var(--viewe5f8c-bottomnav-h);
  background: rgba(20, 34, 45, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(173, 184, 189, 0.30);
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.viewe5f8c-bottomnav a,
.viewe5f8c-bottomnav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--viewe5f8c-silver);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  border-top: 3px solid transparent;
  padding: 6px 2px 4px;
  min-height: 44px;
  transition: color 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
  text-align: center;
}
.viewe5f8c-bottomnav a:hover,
.viewe5f8c-bottomnav button:hover { color: #fff; }
.viewe5f8c-bottomnav a:active,
.viewe5f8c-bottomnav button:active { transform: translateY(1px); }
.viewe5f8c-bottomnav svg { width: 22px; height: 22px; }
.viewe5f8c-bottomnav .viewe5f8c-bn-promo { color: var(--viewe5f8c-red-soft); }
.viewe5f8c-bottomnav .viewe5f8c-bn-promo:hover { color: var(--viewe5f8c-red-soft); }
.viewe5f8c-bottomnav .is-active {
  color: var(--viewe5f8c-cyan-soft);
  border-top-color: var(--viewe5f8c-cyan);
  transform: translateY(-2px);
}
.viewe5f8c-bottomnav .is-active svg {
  fill: var(--viewe5f8c-cyan-soft);
  stroke: var(--viewe5f8c-cyan-soft);
}

/* ===== Utility ===== */
.viewe5f8c-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: rgba(0, 184, 212, 0.18);
  color: var(--viewe5f8c-cyan-soft);
  border-radius: var(--viewe5f8c-radius-xs);
  border: 1px solid rgba(0, 184, 212, 0.35);
}

.viewe5f8c-skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.viewe5f8c-skip:focus {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: var(--viewe5f8c-cyan);
  color: var(--viewe5f8c-ink);
  z-index: 90;
  border-radius: var(--viewe5f8c-radius-xs);
}

/* ===== Responsive tweaks inside the phone canvas ===== */
@media (min-width: 375px) {
  .viewe5f8c-h1 { font-size: 34px; }
  .viewe5f8c-grid { gap: 8px; }
  .viewe5f8c-card-name { font-size: 11px; }
}

@media (min-width: 414px) {
  .viewe5f8c-grid { grid-template-columns: repeat(5, 1fr); }
  .viewe5f8c-card-name { font-size: 10.5px; }
  .viewe5f8c-h1 { font-size: 36px; }
}

@media (min-width: 600px) {
  .viewe5f8c-canvas { box-shadow: 0 0 90px rgba(0, 0, 0, 0.55); }
}

/* Respect reduced motion preferences. */
@media (prefers-reduced-motion: reduce) {
  .viewe5f8c-hero-track,
  .viewe5f8c-route-panel,
  .viewe5f8c-route-backdrop,
  .viewe5f8c-card,
  .viewe5f8c-btn {
    transition: none !important;
  }
}
