/* Tai Xiu - interface-adaptive-f828ad.css
   Mobile-first phone canvas for tai-xiu.cyou (vi).
   Class prefix: shellf828a-  |  CSS variable prefix: --shellf828a- */

/* ===== Tokens ===== */
:root {
  --shellf828a-canvas: 430px;            /* hard anchor: phone canvas width */
  --shellf828a-bg: #1A1A2E;              /* deep navy background */
  --shellf828a-surface: #232347;
  --shellf828a-surface-2: #2c2c54;
  --shellf828a-line: #3a3a5c;
  --shellf828a-slate: #708090;           /* slate accent */
  --shellf828a-light: #E0E0E0;           /* light text */
  --shellf828a-muted: #a8b0c0;
  --shellf828a-accent: #f5c45e;          /* warm gold CTA */
  --shellf828a-accent-2: #4ad0c0;        /* teal support */
  --shellf828a-danger: #e0648a;
  --shellf828a-radius: 14px;
  --shellf828a-radius-sm: 9px;
  --shellf828a-header-h: 58px;
  --shellf828a-bottomnav-h: 64px;
}

/* ===== Reset ===== */
*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Segoe UI", "Inter", "Helvetica Neue", system-ui, -apple-system, "Roboto", sans-serif;
  background: #0f0f1e;
  color: var(--shellf828a-light);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: var(--shellf828a-light); text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--shellf828a-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ===== Header (compact brand bar) ===== */
.shellf828a-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  margin: 0 auto;
  max-width: var(--shellf828a-canvas);
  height: var(--shellf828a-header-h);
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(26, 26, 46, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--shellf828a-line);
  z-index: 120;
}

.shellf828a-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
}
.shellf828a-brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--shellf828a-line);
}
.shellf828a-brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shellf828a-actions { display: flex; align-items: center; gap: 6px; }

.shellf828a-btn {
  min-height: 36px;
  padding: 0 13px;
  border-radius: var(--shellf828a-radius-sm);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color .18s, color .18s, transform .12s, border-color .18s;
}
.shellf828a-btn-login {
  color: var(--shellf828a-light);
  border: 1px solid var(--shellf828a-slate);
}
.shellf828a-btn-register {
  background: var(--shellf828a-accent);
  color: #2a2200;
}
.shellf828a-btn:active { transform: translateY(-1px); }
.shellf828a-btn-register:active { background: #ffd97a; }

.shellf828a-menu-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--shellf828a-radius-sm);
  border: 1px solid var(--shellf828a-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shellf828a-menu-btn .bar,
.shellf828a-menu-btn .bar::before,
.shellf828a-menu-btn .bar::after {
  content: "";
  display: block;
  width: 17px;
  height: 2px;
  background: var(--shellf828a-light);
  border-radius: 2px;
}
.shellf828a-menu-btn .bar { position: relative; }
.shellf828a-menu-btn .bar::before { position: absolute; top: -6px; }
.shellf828a-menu-btn .bar::after { position: absolute; top: 6px; }

/* ===== Layered dropdown drawer ===== */
.shellf828a-drawer {
  position: fixed;
  top: var(--shellf828a-header-h);
  left: 0; right: 0;
  margin: 0 auto;
  max-width: var(--shellf828a-canvas);
  background: var(--shellf828a-surface);
  border-bottom: 1px solid var(--shellf828a-line);
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  z-index: 110;
}
.shellf828a-drawer.open { max-height: 600px; }
.shellf828a-drawer-inner { padding: 10px 14px 18px; }
.shellf828a-drawer-group { margin-top: 12px; }
.shellf828a-drawer-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--shellf828a-slate);
  padding: 4px 2px 6px;
}
.shellf828a-drawer-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.shellf828a-drawer-list a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--shellf828a-radius-sm);
  background: var(--shellf828a-surface-2);
  font-size: 13px;
  font-weight: 500;
  transition: background-color .16s, transform .12s;
}
.shellf828a-drawer-list a:active { background: var(--shellf828a-line); transform: translateY(-1px); }

/* ===== Main shell ===== */
.shellf828a-main {
  padding-top: var(--shellf828a-header-h);
  padding-bottom: calc(var(--shellf828a-bottomnav-h) + 18px);
}

.shellf828a-section { padding: 18px 14px 4px; }

/* ===== Hero carousel ===== */
.shellf828a-hero { padding: 12px 14px 2px; }
.shellf828a-carousel {
  position: relative;
  border-radius: var(--shellf828a-radius);
  overflow: hidden;
  background: var(--shellf828a-surface);
  border: 1px solid var(--shellf828a-line);
}
.shellf828a-track {
  display: flex;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scrollbar-width: none;
}
.shellf828a-track::-webkit-scrollbar { display: none; }
.shellf828a-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
  cursor: pointer;
}
.shellf828a-slide img {
  width: 100%;
  height: 184px;
  object-fit: cover;
}
.shellf828a-slide-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 30px 14px 12px;
  background: linear-gradient(transparent, rgba(26, 26, 46, 0.94));
}
.shellf828a-slide-caption b {
  display: block;
  font-size: 14px;
  color: var(--shellf828a-accent);
}
.shellf828a-slide-caption span { font-size: 12px; color: var(--shellf828a-muted); }
.shellf828a-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 9px 0 2px;
}
.shellf828a-dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--shellf828a-slate);
  transition: background-color .18s;
}
.shellf828a-dots button.active { background: var(--shellf828a-accent); }

/* ===== H1 + lead ===== */
.shellf828a-title-block { padding: 10px 14px 4px; }
.shellf828a-h1 {
  font-size: 21px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.1px;
}
.shellf828a-lead {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--shellf828a-muted);
}

/* ===== Section heading ===== */
.shellf828a-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.shellf828a-head h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.shellf828a-head .shellf828a-tag {
  font-size: 10.5px;
  color: var(--shellf828a-accent-2);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* ===== Game grid + cards ===== */
.shellf828a-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
}
.shellf828a-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.shellf828a-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--shellf828a-surface-2);
  border: 1px solid var(--shellf828a-line);
  transition: transform .12s, border-color .18s;
}
.shellf828a-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shellf828a-card:active .shellf828a-card-img {
  transform: translateY(-2px);
  border-color: var(--shellf828a-accent);
}
.shellf828a-card-name {
  font-size: 11px;
  line-height: 1.25;
  color: var(--shellf828a-muted);
  min-height: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Category group cover ===== */
.shellf828a-group {
  background: var(--shellf828a-surface);
  border-radius: var(--shellf828a-radius);
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--shellf828a-line);
}
.shellf828a-group-head { margin-bottom: 12px; }
.shellf828a-group-meta {
  font-size: 11px;
  color: var(--shellf828a-slate);
  margin-top: 3px;
}

/* ===== Prose ===== */
.shellf828a-prose { font-size: 14px; }
.shellf828a-prose p { margin-bottom: 10px; color: var(--shellf828a-light); }
.shellf828a-prose h3 {
  font-size: 15px;
  margin: 16px 0 6px;
  color: var(--shellf828a-accent);
  font-weight: 700;
}
.shellf828a-inlink {
  color: var(--shellf828a-accent-2);
  border-bottom: 1px dashed var(--shellf828a-accent-2);
}

/* metric-explanation row */
.shellf828a-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.shellf828a-metric {
  background: var(--shellf828a-surface-2);
  border-radius: 10px;
  padding: 10px;
  border: 1px solid var(--shellf828a-line);
}
.shellf828a-metric b {
  display: block;
  font-size: 14px;
  color: var(--shellf828a-accent);
  margin-bottom: 2px;
}
.shellf828a-metric span { font-size: 11.5px; color: var(--shellf828a-muted); }

/* ===== Steps ===== */
.shellf828a-steps { counter-reset: step; margin: 4px 0; }
.shellf828a-step {
  position: relative;
  padding: 0 0 14px 32px;
}
.shellf828a-step:last-child { padding-bottom: 4px; }
.shellf828a-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 23px; height: 23px;
  border-radius: 50%;
  background: var(--shellf828a-accent);
  color: #2a2200;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shellf828a-step b {
  font-size: 13.5px;
  display: block;
  margin-bottom: 2px;
}
.shellf828a-step span { font-size: 12.5px; color: var(--shellf828a-muted); }

/* ===== FAQ ===== */
.shellf828a-faq { border-top: 1px solid var(--shellf828a-line); }
.shellf828a-faq details {
  border-bottom: 1px solid var(--shellf828a-line);
  padding: 12px 2px;
}
.shellf828a-faq summary {
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.shellf828a-faq summary::-webkit-details-marker { display: none; }
.shellf828a-faq summary::after {
  content: "+";
  color: var(--shellf828a-accent);
  font-size: 18px;
  flex-shrink: 0;
}
.shellf828a-faq details[open] summary::after { content: "−"; }
.shellf828a-faq-body {
  padding-top: 8px;
  font-size: 13px;
  color: var(--shellf828a-muted);
}

/* ===== Comparison table ===== */
.shellf828a-table-wrap {
  overflow-x: auto;
  border-radius: var(--shellf828a-radius-sm);
  border: 1px solid var(--shellf828a-line);
}
.shellf828a-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 360px;
}
.shellf828a-table th,
.shellf828a-table td {
  border: 1px solid var(--shellf828a-line);
  padding: 8px 9px;
  text-align: left;
  vertical-align: top;
}
.shellf828a-table th {
  background: var(--shellf828a-surface-2);
  color: var(--shellf828a-accent);
  font-weight: 700;
}
.shellf828a-table td { color: var(--shellf828a-muted); }

/* ===== Term list ===== */
.shellf828a-term {
  border-bottom: 1px solid var(--shellf828a-line);
  padding: 10px 0;
}
.shellf828a-term b { color: var(--shellf828a-accent-2); font-size: 13.5px; }
.shellf828a-term span { display: block; font-size: 12.5px; color: var(--shellf828a-muted); margin-top: 3px; }

/* ===== CTA inline ===== */
.shellf828a-cta-row {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
}
.shellf828a-cta {
  flex: 1;
  min-height: 42px;
  border-radius: 10px;
  background: var(--shellf828a-accent);
  color: #2a2200;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color .16s, transform .12s;
}
.shellf828a-cta.alt { background: var(--shellf828a-surface-2); color: var(--shellf828a-light); border: 1px solid var(--shellf828a-line); }
.shellf828a-cta:active { transform: translateY(-1px); }

/* ===== Extended footer ===== */
.shellf828a-ext { padding: 20px 14px 8px; }
.shellf828a-ext-block { margin-bottom: 18px; }
.shellf828a-ext h2 { font-size: 15px; margin-bottom: 9px; }
.shellf828a-ext-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.shellf828a-ext-links a {
  padding: 9px 10px;
  background: var(--shellf828a-surface-2);
  border-radius: 9px;
  font-size: 12.5px;
  transition: background-color .16s;
}
.shellf828a-ext-links a:active { background: var(--shellf828a-line); }
.shellf828a-ext-brand p { font-size: 12.5px; color: var(--shellf828a-muted); }
.shellf828a-promo-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.shellf828a-promo-row button {
  padding: 11px 3px;
  border-radius: 10px;
  background: var(--shellf828a-accent);
  color: #2a2200;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color .16s, transform .12s;
}
.shellf828a-promo-row button:active { transform: translateY(-1px); background: #ffd97a; }
.shellf828a-disclaimer {
  font-size: 11.5px;
  color: var(--shellf828a-slate);
  border-left: 3px solid var(--shellf828a-slate);
  padding: 6px 0 6px 11px;
  line-height: 1.5;
}

/* ===== Footer ===== */
.shellf828a-footer {
  padding: 14px;
  text-align: center;
  font-size: 11.5px;
  color: var(--shellf828a-slate);
  border-top: 1px solid var(--shellf828a-line);
  margin-top: 6px;
}

/* ===== Bottom nav (fixed, within canvas) ===== */
.shellf828a-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  margin: 0 auto;
  max-width: var(--shellf828a-canvas);
  height: var(--shellf828a-bottomnav-h);
  background: rgba(26, 26, 46, 0.99);
  border-top: 1px solid var(--shellf828a-line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 120;
}
.shellf828a-bottomnav a,
.shellf828a-bottomnav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  color: var(--shellf828a-slate);
  transition: color .16s, transform .12s;
}
.shellf828a-bottomnav .shellf828a-ic {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.shellf828a-bottomnav a.active { color: var(--shellf828a-accent); }
.shellf828a-bottomnav a:active,
.shellf828a-bottomnav button:active {
  color: var(--shellf828a-accent);
  transform: translateY(-2px);
}
.shellf828a-bottomnav .promo { color: var(--shellf828a-accent); }

/* ===== Responsive grid tuning ===== */
@media (min-width: 380px) {
  .shellf828a-grid { grid-template-columns: repeat(5, 1fr); }
  .shellf828a-card-name { font-size: 11.5px; }
}
@media (max-width: 359px) {
  .shellf828a-grid { grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
  .shellf828a-card-name { font-size: 10.5px; min-height: 26px; }
  .shellf828a-h1 { font-size: 19px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}

/* ===== Help-page additions ===== */
.shellf828a-help-hero {
  margin: 12px 14px 4px;
  padding: 18px 16px;
  border: 1px solid var(--shellf828a-line);
  border-radius: var(--shellf828a-radius);
  background: linear-gradient(145deg, var(--shellf828a-surface), #20203d);
}
.shellf828a-kicker {
  color: var(--shellf828a-accent-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}
.shellf828a-help-hero .shellf828a-h1 { margin-top: 6px; }
.shellf828a-help-hero p { margin-top: 9px; color: var(--shellf828a-muted); font-size: 13.5px; }
.shellf828a-inline-action {
  display: inline;
  padding: 0;
  color: var(--shellf828a-accent-2);
  border-bottom: 1px dashed currentColor;
  font: inherit;
  text-align: left;
}
.shellf828a-answer-band {
  margin-top: 13px;
  padding: 12px;
  border-left: 3px solid var(--shellf828a-accent);
  background: rgba(245, 196, 94, .08);
  border-radius: 0 var(--shellf828a-radius-sm) var(--shellf828a-radius-sm) 0;
  font-size: 13px;
}
.shellf828a-scenario-list { display: grid; gap: 9px; }
.shellf828a-scenario {
  padding: 12px;
  border: 1px solid var(--shellf828a-line);
  border-radius: var(--shellf828a-radius-sm);
  background: var(--shellf828a-surface-2);
}
.shellf828a-scenario h3 { margin: 0 0 5px; font-size: 14px; color: var(--shellf828a-accent); }
.shellf828a-scenario p { margin: 0; font-size: 12.75px; color: var(--shellf828a-muted); }
.shellf828a-branch {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid var(--shellf828a-line);
}
.shellf828a-branch:last-child { border-bottom: 0; }
.shellf828a-branch strong { color: var(--shellf828a-accent-2); font-size: 12px; }
.shellf828a-branch span { color: var(--shellf828a-muted); font-size: 12.5px; }
.shellf828a-ledger { display: grid; gap: 8px; }
.shellf828a-ledger-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 11px;
  background: var(--shellf828a-surface-2);
  border: 1px solid var(--shellf828a-line);
  border-radius: 10px;
}
.shellf828a-ledger-no {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--shellf828a-bg);
  color: var(--shellf828a-accent);
  font-weight: 700;
  font-size: 12px;
}
.shellf828a-ledger-row h3 { font-size: 13.5px; color: var(--shellf828a-light); margin-bottom: 3px; }
.shellf828a-ledger-row p { color: var(--shellf828a-muted); font-size: 12.5px; }
.shellf828a-checks { list-style: none; display: grid; gap: 7px; }
.shellf828a-checks li {
  position: relative;
  padding: 9px 10px 9px 34px;
  border: 1px solid var(--shellf828a-line);
  border-radius: 9px;
  color: var(--shellf828a-muted);
  font-size: 12.75px;
}
.shellf828a-checks li::before {
  content: "✓";
  position: absolute;
  left: 10px;
  color: var(--shellf828a-accent-2);
  font-weight: 700;
}
.shellf828a-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shellf828a-split > div { padding: 11px; border-radius: 10px; border: 1px solid var(--shellf828a-line); }
.shellf828a-split h3 { font-size: 13px; margin-bottom: 5px; color: var(--shellf828a-accent); }
.shellf828a-split p { font-size: 12px; color: var(--shellf828a-muted); }
.shellf828a-qa { margin: 0; }
.shellf828a-qa dt { color: var(--shellf828a-accent); font-weight: 700; font-size: 13px; margin-top: 12px; }
.shellf828a-qa dd { color: var(--shellf828a-muted); font-size: 12.75px; margin-top: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--shellf828a-line); }
.shellf828a-compact-promo {
  min-height: 44px;
  padding: 8px 12px;
  margin: 7px 0;
  border-radius: 9px;
  border: 1px solid var(--shellf828a-slate);
  color: var(--shellf828a-light);
  font-size: 12.75px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shellf828a-compact-promo.primary { background: var(--shellf828a-accent); color: #2a2200; border-color: var(--shellf828a-accent); }
.shellf828a-note { font-size: 11.75px; color: var(--shellf828a-slate); margin-top: 9px; }

@media (max-width: 339px) {
  .shellf828a-header { padding-inline: 8px; gap: 5px; }
  .shellf828a-brand { gap: 5px; }
  .shellf828a-brand img { width: 30px; height: 30px; }
  .shellf828a-brand-name { font-size: 15px; }
  .shellf828a-btn { min-height: 34px; padding-inline: 8px; font-size: 11px; }
  .shellf828a-menu-btn { width: 34px; height: 34px; }
  .shellf828a-split { grid-template-columns: 1fr; }
}
