:root {
  --bg: #eef2f7;
  --bg-light: #ffffff;
  --card-bg: #ffffff;
  --card-border: #d0dbe8;
  --fg: #334155;
  --fg-strong: #0f172a;
  --accent: #0369a1;
  --accent-dark: #075985;
  --gold: #d97706;
  --gold-light: #f59e0b;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(4rem + 12px); }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 45%);
  color: var(--fg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 0.5rem;
}
.logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--fg-strong);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.logo-img { height: 2rem; width: auto; }
.logo .highlight { color: var(--accent); }
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  list-style: none;
  justify-content: flex-end;
}
.nav-links a {
  padding: 0.4rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #475569;
}
.nav-links a:hover { color: var(--accent); background: rgba(3, 105, 161, 0.08); }
.burger {
  display: none;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.5rem;
}
.burger svg { width: 24px; height: 24px; }
.mobile-nav {
  display: none;
  flex-direction: column;
  list-style: none;
  padding: 0 1rem 1rem;
  max-height: 70vh;
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
}
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .burger { display: block; }
}

.footer {
  background: var(--bg-light);
  border-top: 1px solid var(--card-border);
  margin-top: 4rem;
}
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 2.5rem 1rem; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { font-size: 0.875rem; color: #64748b; }
.footer-links a:hover { color: var(--accent); }
.footer-desc { font-size: 0.875rem; color: #64748b; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--fg-strong);
  margin-bottom: 0.75rem;
}
.footer-brand:hover {
  opacity: 0.92;
  color: var(--fg-strong);
}
.footer-brand .logo-img {
  display: block;
  flex-shrink: 0;
}
.footer-brand .footer-brand-text {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
}
.footer-brand .footer-brand-text .highlight {
  color: var(--accent);
}
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--card-border);
}
.footer-disclaimer { font-size: 0.75rem; color: #475569; line-height: 1.65; }

.container { max-width: 1280px; margin: 0 auto; padding: 2.5rem 1rem; }
.section { margin-bottom: 3rem; }
h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--fg-strong);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--fg-strong);
  margin-bottom: 1rem;
}
.text-muted { color: #64748b; }
.leading-relaxed { line-height: 1.75; }
.mb-4 { margin-bottom: 1rem; }

.site-breadcrumb {
  font-size: 0.875rem;
  margin: 0 0 1.25rem;
  padding: 0.65rem 1rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
}
.site-breadcrumb a { color: #2d6092; font-weight: 500; }
.site-breadcrumb a:hover { text-decoration: underline; }
.site-breadcrumb-sep { color: #94a3b8; margin: 0 0.35rem; }
.site-breadcrumb [aria-current="page"] { color: #6c757d; font-weight: 500; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}
.article-figure {
  margin: 1.25rem 0;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}
.article-figure figcaption {
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
  color: #64748b;
  border-top: 1px solid var(--card-border);
  background: #f1f5f9;
}

.about-profile-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.about-avatar {
  margin: 0;
  flex: 0 0 auto;
}
.about-avatar img {
  display: block;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--card-border);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
.about-profile-intro {
  flex: 1;
  min-width: min(100%, 220px);
}
.about-profile-intro h1 {
  margin-top: 0;
}
@media (min-width: 640px) {
  .about-avatar img {
    width: 180px;
    height: 180px;
  }
}

.v2-hero {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  background: linear-gradient(180deg, rgba(3, 105, 161, 0.06), transparent);
  border-radius: 0.75rem;
  margin-bottom: 2rem;
  border: 1px solid var(--card-border);
}
.v2-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.v2-hub-card {
  display: block;
  padding: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.v2-hub-card:hover {
  border-color: rgba(3, 105, 161, 0.35);
  box-shadow: 0 6px 24px rgba(3, 105, 161, 0.1);
}
.v2-hub-card h3 { color: var(--accent); font-size: 1.05rem; margin-bottom: 0.35rem; }
.v2-hub-card p { font-size: 0.875rem; color: #64748b; }

.btn-partner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  min-width: min(100%, 18rem);
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
  border-radius: 9999px;
  background: linear-gradient(180deg, #fde68a, #fbbf24 50%, #f59e0b);
  border: 1px solid #d97706;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}
.btn-partner:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  color: #0f172a;
}
.btn-partner:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.v2-cta-wrap { text-align: center; margin: 2rem 0; }

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.65rem;
}
.history-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  padding: 0.75rem 0.9rem;
  font-size: 0.8125rem;
}
.history-card .amt {
  font-weight: 800;
  color: #059669;
  font-size: 1rem;
}
.history-card .who { color: var(--fg-strong); font-weight: 600; }
.history-card .tx {
  color: #64748b;
  margin-top: 0.35rem;
  line-height: 1.45;
}

.score-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 2rem;
}
.score-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.score-tab {
  padding: 0.45rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
  background: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}
.score-tab:hover { border-color: var(--accent); color: var(--accent); }
.score-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.score-cad-summary {
  font-size: 0.875rem;
  color: #475569;
  margin: 0 0 0.65rem;
}
.score-cad-summary #score-cad-amount {
  color: #059669;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.score-axis-unit {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0 0 0.35rem;
}
.score-chart-box {
  position: relative;
  width: 100%;
  min-height: 260px;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  padding: 0.75rem;
}
.score-chart-box svg { width: 100%; height: 240px; display: block; }
.score-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
}
.score-legend span.win::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 2px;
  margin-right: 0.35rem;
}
.score-legend span.loss::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 2px;
  margin-right: 0.35rem;
}

.info-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
}
.info-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.info-table th, .info-table td { padding: 0.65rem 1rem; text-align: left; border-bottom: 1px solid var(--card-border); }
.info-table th { background: #f1f5f9; color: #64748b; font-weight: 600; }

.external-ref {
  font-size: 0.875rem;
  margin-top: 1rem;
}
.external-ref a { color: var(--accent); font-weight: 600; text-decoration: underline; }

.v2-img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 640px) {
  .v2-img-pair { grid-template-columns: 1fr; }
}

/* ── 4-screen slider (APK / App) ── */
.v2-screen-slider {
  position: relative;
  margin: 2rem 0;
  padding: 0 2.5rem;
}
.v2-slider-viewport {
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}
.v2-slider-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.v2-slider-slide {
  flex: 0 0 100%;
  margin: 0;
  min-width: 0;
}
.v2-slider-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #0f172a;
}
.v2-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.1);
  transition: background 0.2s, color 0.2s;
}
.v2-slider-arrow:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.v2-slider-prev { left: 0; }
.v2-slider-next { right: 0; }
.v2-slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
}
.v2-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #cbd5e1;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.v2-slider-dot.active {
  background: var(--accent);
  transform: scale(1.15);
}
@media (min-width: 901px) {
  .v2-screen-slider {
    padding: 0;
  }
  .v2-slider-arrow,
  .v2-slider-dots {
    display: none !important;
  }
  .v2-slider-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    transform: none !important;
    transition: none;
  }
  .v2-slider-slide {
    flex: none;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--card-border);
  }
}

/* History rotator */
.history-rotator-hint {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}
.v2-history-json {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
