/* baliaos.com - Global Styles */
/* Dark theme: #0a0a0a bg / Purple→Cyan gradient / Inter font / Mobile-first */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-card2: #1a1a1a;
  --border: #2a2a2a;
  --text: #f0f0f0;
  --text-muted: #888;
  --grad-start: #7c3aed;
  --grad-end: #06b6d4;
  --accent: #7c3aed;
  --accent2: #06b6d4;
  --logo-grad-start: #e91ee0;
  --logo-grad-end: #0ccef4;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== GRADIENT UTILITIES ===== */
.grad-text {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-grad {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  display: inline-block;
  text-align: center;
}
.btn-grad:hover { opacity: 0.9; transform: translateY(-1px); text-decoration: none; color: #fff; }
.btn-grad:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--accent2);
  border: 1.5px solid var(--accent2);
  border-radius: 8px;
  padding: 11px 26px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
  text-align: center;
}
.btn-outline:hover { background: var(--accent2); color: #0a0a0a; text-decoration: none; }

.btn-full { width: 100%; display: block; text-align: center; }

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
}
.navbar .inner {
  width: 100%; max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.navbar .logo {
  font-size: 1.2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--logo-grad-start), var(--logo-grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-icon { width: 26px; height: 26px; border-radius: 7px; display: block; flex-shrink: 0; }
.logo-text-grad {
  background: linear-gradient(135deg, var(--logo-grad-start), var(--logo-grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar .nav-links { display: flex; gap: 6px; align-items: center; }
.navbar .nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.navbar .nav-links a:hover { color: var(--text); text-decoration: none; }
.navbar .nav-links .nav-cta { color: #fff; }

/* Icon-only header buttons (language switcher, X link), styled after
   guide.baliaos.com's VitePress navbar: borderless, ~34px square hit area,
   muted icon color that brightens on hover. Kept visually separate from
   #nav-email/Log out via .nav-divider + a slightly larger left margin,
   since those two elements read as a distinct "account" group. */
.nav-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.nav-icon-btn:hover { color: var(--text); background: var(--bg-card2); text-decoration: none; }
.nav-icon-btn-wide { width: auto; padding: 0 8px; gap: 3px; }
.nav-icon-btn-chevron { opacity: 0.7; }
.nav-divider { width: 1px; height: 20px; background: var(--border); margin: 0 6px; flex-shrink: 0; }

/* Dashboard navbar mobile fix (2026-07-17):
   at narrow widths the long #nav-email used to squeeze the logout button into
   a vertical character stack (375px) or push it off-screen (320px).
   The email now shrinks with ellipsis and the button/logo never shrink. */
.navbar .logo-brand { flex-shrink: 0; }
.navbar .logo { white-space: nowrap; }
.navbar .nav-links { min-width: 0; margin-left: 12px; }
.navbar .nav-links #nav-email {
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 480px) {
  /* Icon buttons + divider + Log out already fill most of the width at
     this size; hide the email rather than let it collapse to 0 and
     disappear without even an ellipsis. */
  .navbar .nav-links #nav-email { display: none; }
  /* 320px measured 20px of real overflow (scrollWidth 340 vs viewport 320)
     even with the email hidden; trim the remaining fixed-size elements
     just enough to close that gap with some margin. */
  .nav-icon-btn { width: 30px; height: 30px; }
  .nav-divider { display: none; }
  .navbar .nav-links button.btn-outline { padding: 6px 10px; }
}
.navbar .nav-links button {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .navbar .nav-links { gap: 10px; }
}

/* Dashboard language switcher (globe icon dropdown, matches guide.baliaos.com's
   VitePress translations menu conceptually; styled with the dashboard's own
   dark-theme tokens rather than the LP's green accent). */
.lang-opt {
  padding: 7px 14px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.lang-opt:hover { background: var(--bg-card2); color: var(--text); }

/* ===== HERO ===== */
.hero {
  padding: 140px 20px 100px;
  text-align: center;
}
.hero .badge {
  display: inline-block;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.4);
  color: #a78bfa;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
}
.hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}
.hero .cta-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 20px;
}
.stats-bar .inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-item .val { font-size: 1.6rem; font-weight: 800; }
.stat-item .lbl { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ===== SECTION TITLES ===== */
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
}
.section-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 48px;
}

/* ===== POINTS CAMPAIGN ===== */
.points-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.point-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.2s;
}
.point-card:hover { border-color: var(--accent); }
.point-card .icon { font-size: 2rem; margin-bottom: 12px; }
.point-card .pts { font-size: 1.4rem; font-weight: 800; }
.point-card .pts span { font-size: 0.85rem; font-weight: 400; color: var(--text-muted); }
.point-card .act { font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }

/* ===== PROBLEM/SOLUTION ===== */
.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.ps-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
.ps-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; }
.ps-card ul { list-style: none; }
.ps-card ul li { padding: 8px 0; font-size: 0.95rem; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.ps-card ul li:last-child { border-bottom: none; }
.ps-card ul li::before { content: ''; margin-right: 8px; }
.ps-card.problem h3 { color: var(--danger); }
.ps-card.solution h3 { color: var(--success); }
.ps-card.problem li::before { content: '✗'; color: var(--danger); }
.ps-card.solution li::before { content: '✓'; color: var(--success); }

/* ===== PRODUCTS ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.product-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.product-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(6,182,212,0.05));
}
.product-card .tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  color: #fff;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.product-card h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.product-card .price { font-size: 2rem; font-weight: 800; margin: 12px 0; }
.product-card .price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.product-card .features { list-style: none; margin: 16px 0 24px; }
.product-card .features li { padding: 6px 0; font-size: 0.9rem; color: var(--text-muted); }
.product-card .features li::before { content: '✓ '; color: var(--success); }

/* ===== TOKENOMICS ===== */
.tokenomics-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.alloc-list { list-style: none; }
.alloc-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.alloc-list li:last-child { border-bottom: none; }
.alloc-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.alloc-pct { font-weight: 700; margin-left: auto; color: var(--accent2); }
.token-info-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.token-info-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--accent2); }
.info-row {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.info-row:last-child { border-bottom: none; }
.info-row .lbl { color: var(--text-muted); }
.info-row .val { font-weight: 600; }

/* ===== PRESALE PHASES ===== */
.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.phase-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.phase-card h3 { font-size: 1rem; font-weight: 700; color: var(--accent2); margin-bottom: 12px; }
.badge-soon { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; background: rgba(6,182,212,0.12); color: var(--accent2); border: 1px solid rgba(6,182,212,0.3); border-radius: 4px; padding: 3px 8px; margin-bottom: 12px; }
.phase-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.88rem; }
.phase-row .k { color: var(--text-muted); }
.phase-row .v { font-weight: 600; }

/* ===== ROADMAP ===== */
.roadmap-list { max-width: 700px; margin: 0 auto; position: relative; }
.roadmap-list::before {
  content: '';
  position: absolute;
  left: 20px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--grad-start), var(--grad-end));
}
.rm-item {
  padding: 0 0 32px 56px;
  position: relative;
}
.rm-dot {
  position: absolute;
  left: 12px; top: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  border: 3px solid var(--bg);
}
.rm-item h4 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.rm-item p { font-size: 0.88rem; color: var(--text-muted); }
.rm-item .phase-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.rm-item .phase-tag.done { background: rgba(34,197,94,0.15); color: var(--success); }
.rm-item .phase-tag.current { background: rgba(124,58,237,0.2); color: #a78bfa; }
.rm-item .phase-tag.upcoming { background: rgba(6,182,212,0.1); color: var(--accent2); }

/* ===== AFFILIATE ===== */
.affil-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}
.affil-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
}
.affil-card .tier { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.affil-card .pct { font-size: 2.4rem; font-weight: 800; margin: 8px 0; }
.affil-card .desc { font-size: 0.85rem; color: var(--text-muted); }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 20px 32px;
}
.footer .inner {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.footer .logo-col .logo { font-size: 1.2rem; font-weight: 800; display: block; margin-bottom: 12px; }
.footer .logo-col p { font-size: 0.85rem; color: var(--text-muted); }
.footer h4 { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 12px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a { font-size: 0.88rem; color: var(--text-muted); }
.footer ul li a:hover { color: var(--text); text-decoration: none; }
.footer .bottom {
  max-width: 1100px; margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--text-muted);
  flex-wrap: wrap; gap: 8px;
}

/* ===== FORMS ===== */
.form-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 40px;
}
.form-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
}
.form-box h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.form-box .sub { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.form-group input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--accent); }
.form-msg { padding: 12px; border-radius: 8px; font-size: 0.88rem; margin-bottom: 16px; display: none; }
.form-msg.error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; display: block; }
.form-msg.success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #86efac; display: block; }
.form-switch { text-align: center; margin-top: 20px; font-size: 0.88rem; color: var(--text-muted); }
.form-divider { text-align: center; color: var(--text-muted); font-size: 0.8rem; margin: 20px 0; position: relative; }
.form-divider::before, .form-divider::after {
  content: '';
  position: absolute;
  top: 50%; width: 40%;
  height: 1px;
  background: var(--border);
}
.form-divider::before { left: 0; }
.form-divider::after { right: 0; }

/* ===== DASHBOARD ===== */
.dash-layout {
  min-height: 100vh;
}
.dash-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 80px 0 0;
  position: fixed;
  top: 0; bottom: 0;
  width: 240px;
  overflow-y: auto;
}
.dash-sidebar .logo-wrap {
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.dash-sidebar .logo-wrap .logo { font-size: 1.1rem; font-weight: 800; display: block; }
.dash-nav { list-style: none; padding: 0 12px; }
.dash-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.dash-nav li a:hover { background: var(--bg-card2); color: var(--text); text-decoration: none; }
.dash-nav li a.active { background: rgba(124,58,237,0.15); color: #a78bfa; }
/* サイドバー/タブバー用SVGアイコン: 絵文字からブランドカラーの
   アウトラインアイコンに変更(高級感アップグレード)。既存の絵文字アイコン
   (.icon、カード見出し等で使用中)には影響しない別クラス。 */
.dash-nav li a .nav-icon {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex-shrink: 0;
}
.dash-nav li a .nav-icon svg {
  width: 20px; height: 20px;
  stroke: var(--text-muted);
  stroke-width: 1.8;
  fill: none;
  transition: stroke 0.2s, filter 0.2s, fill 0.2s;
}
.dash-nav li a .nav-icon.nav-icon-fill svg { stroke: none; fill: var(--text-muted); }
.dash-nav li a:hover .nav-icon svg { stroke: url(#navIconGrad); }
.dash-nav li a:hover .nav-icon.nav-icon-fill svg { fill: url(#navIconGrad); }
.dash-nav li a.active .nav-icon svg {
  stroke: url(#navIconGrad);
  filter: drop-shadow(0 0 4px rgba(124,58,237,0.55));
}
.dash-nav li a.active .nav-icon.nav-icon-fill svg {
  fill: url(#navIconGrad);
  filter: drop-shadow(0 0 4px rgba(124,58,237,0.55));
}
.dash-main {
  margin-left: 240px;
  margin-top: 64px;
  min-height: calc(100vh - 64px);
  padding: 48px 32px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.dash-header {
  width: 100%;
  max-width: 760px;
  margin: 0 auto 28px;
}
.dash-header h1 { font-size: 1.6rem; font-weight: 800; }
.dash-header p { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }
#global-alert { width: 100%; max-width: 760px; margin: 0 auto 20px; }
.dash-grid {
  width: 100%;
}
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: none;
}
.dash-card.active-section {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 48px;
  border-radius: 20px;
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow: 0 28px 70px -28px rgba(124, 58, 237, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.dash-card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.dash-card.active-section h2 { font-size: 1.25rem; margin-bottom: 24px; }
.dash-card h2 .icon { font-size: 1.1rem; }
.points-big { font-size: 3rem; font-weight: 800; }
.points-big span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.points-sub { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.progress-bar-wrap { margin: 12px 0; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.progress-bar {
  height: 8px; border-radius: 999px;
  background: var(--bg-card2);
  overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
  transition: width 0.5s ease;
}
.history-list { list-style: none; }
.history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.history-item:last-child { border-bottom: none; }
.history-item .act-col { display: flex; flex-direction: column; gap: 2px; }
.history-item .act { color: var(--text-muted); }
.history-item .act-date { font-size: 0.72rem; color: var(--text-muted); opacity: 0.65; }
.history-item .pts-pos { color: var(--success); font-weight: 700; }
.history-item .pts-neg { color: var(--danger); font-weight: 700; }

/* X連携: 外部リンクへ遷移する行(フォロー/最新投稿)のクリック可能アフォーダンス */
.x-link-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.x-link-row .x-link-label {
  color: var(--accent2);
  transition: color 0.15s ease;
}
.x-link-row .x-link-icon {
  font-size: 0.75em;
  opacity: 0.75;
  margin-left: 3px;
}
.x-link-row:hover {
  background: rgba(6, 182, 212, 0.08);
}
.x-link-row:hover .x-link-label {
  color: var(--text);
}
.x-link-row[data-pending="true"] {
  cursor: default;
  pointer-events: none;
}
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-success { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-pending { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-muted { background: rgba(136,136,136,0.1); color: var(--text-muted); }
.badge-bronze { background: rgba(205,127,50,0.15); color: #cd7f32; }
.badge-silver { background: rgba(192,192,192,0.15); color: #c0c0c0; }
.badge-gold { background: rgba(234,179,8,0.15); color: #eab308; }

/* ===== MILESTONE CHEST ===== */
.milestone-list { list-style: none; margin-top: 14px; }
.milestone-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.milestone-row:last-child { border-bottom: none; }
.milestone-label { color: var(--text-muted); font-weight: 600; }
.btn-grad-sm { padding: 6px 16px; font-size: 0.8rem; border-radius: 6px; }

/* ===== DAILY CHEST ANIMATIONS ===== */
/* 単体表示時は「開封の瞬間」を主役にするため、ステータス/連続日数表示を
   中央揃えのヒーロー的レイアウトに再構成する。
   カード幅を760pxに統一した際、宝箱は元々の情報量が少なく中身が
   カード幅に対して小さく間延びして見えたため、内部要素(アイコン・
   開封エリアの幅・上下余白)を拡大しカード幅とのバランスを取っている
   （カード自体の幅は他セクションと統一のまま変更しない）。 */
#chest.active-section { padding-top: 64px; padding-bottom: 64px; }
#chest-status-badge { text-align: center; }
#chest-status-badge .status-badge { font-size: 0.85rem; padding: 5px 14px; }
#chest-streak-info { text-align: center; font-size: 1rem; color: var(--text-muted); margin-bottom: 20px; }
#chest-open-area { text-align: center; max-width: 560px; margin: 12px auto 0; }
.chest-icon-stage { text-align: center; font-size: 5.2rem; margin: 16px 0 24px; }
/* 開封済み(ボタン非表示)状態は文字情報のみになり間延びしやすいため、
   既存の情報ボックス意匠(referral-boxやaffiliate内の補足box等と同系統)を
   踏襲したカード内カードとして視覚的な重みを持たせる */
#chest-next-info {
  text-align: center;
  max-width: 480px;
  margin: 28px auto 0;
  padding: 18px 28px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@keyframes chestShake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  10% { transform: translateX(-4px) rotate(-6deg); }
  20% { transform: translateX(4px) rotate(6deg); }
  30% { transform: translateX(-6px) rotate(-8deg); }
  40% { transform: translateX(6px) rotate(8deg); }
  50% { transform: translateX(-4px) rotate(-6deg); }
  60% { transform: translateX(4px) rotate(6deg); }
  70% { transform: translateX(-2px) rotate(-3deg); }
  80% { transform: translateX(2px) rotate(3deg); }
  90% { transform: translateX(-1px) rotate(-1deg); }
}
.chest-shake { animation: chestShake 0.6s ease-in-out; }

@keyframes chestPop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.chest-pop { animation: chestPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes chestFlash {
  0%, 100% { box-shadow: 0 0 0 rgba(234,179,8,0); }
  50% { box-shadow: 0 0 40px rgba(234,179,8,0.6); }
}
.chest-rare-flash { animation: chestFlash 0.9s ease-out; }

@keyframes chestParticleFly {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--px)), calc(-50% + var(--py))) scale(0); opacity: 0; }
}
.chest-particle {
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  pointer-events: none;
  animation: chestParticleFly 0.8s ease-out forwards;
}

/* ===== DOUBLE-UP SUCCESS FIREWORKS ===== */
@keyframes chestFireworkFly {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--fx)), calc(-50% + var(--fy))) scale(0.2); opacity: 0; }
}
.chest-firework-burst {
  position: absolute;
  width: 0; height: 0;
  pointer-events: none;
  z-index: 10001;
}
.chest-firework-particle {
  position: absolute;
  top: 0; left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 8px currentColor;
  animation: chestFireworkFly 1.1s cubic-bezier(0.12, 0.75, 0.3, 1) forwards;
}

/* ===== DOUBLE-UP NEXT-CHALLENGE BUTTON EMPHASIS ===== */
@keyframes chestNextBtnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(124,58,237,0); }
  50% { transform: scale(1.05); box-shadow: 0 0 18px rgba(124,58,237,0.55); }
}
.chest-gamble-actions .btn-grad.chest-btn-emphasis { animation: chestNextBtnPulse 1.1s ease-in-out infinite; }

#chest-result { position: relative; overflow: visible; }

.chest-gamble-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.chest-gamble-actions button { flex: 1; min-width: 140px; }
.chest-gamble-status { margin-top: 10px; font-size: 0.85rem; color: var(--text-muted); min-height: 1.2em; text-align: center; }

/* ===== CHEST FULLSCREEN OVERLAY ===== */
.chest-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: rgba(5,5,10,0.92);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
  overflow-y: auto;
}
.chest-overlay.active { display: flex; opacity: 1; }
.chest-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(circle at 50% 45%, rgba(124,58,237,0.35), transparent 60%);
}
.chest-overlay.rank-bronze::before { opacity: 1; background: radial-gradient(circle at 50% 45%, rgba(205,127,50,0.35), transparent 60%); }
.chest-overlay.rank-silver::before { opacity: 1; background: radial-gradient(circle at 50% 45%, rgba(192,192,192,0.3), transparent 60%); }
.chest-overlay.rank-gold::before { opacity: 1; background: radial-gradient(circle at 50% 45%, rgba(234,179,8,0.4), transparent 60%); }
.chest-overlay::after {
  content: '';
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: conic-gradient(from 0deg, rgba(234,179,8,0) 0deg, rgba(234,179,8,0.25) 40deg, rgba(234,179,8,0) 90deg, rgba(234,179,8,0) 180deg, rgba(234,179,8,0.25) 220deg, rgba(234,179,8,0) 270deg);
  animation: chestRareRaysSpin 6s linear infinite;
}
.chest-overlay.rare::after { opacity: 1; }
@keyframes chestRareRaysSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.chest-overlay-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 560px;
}
.chest-overlay-flash {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}
.chest-overlay-flash.flash-anim {
  animation: chestFlashScreen 0.4s ease-out;
  background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(234,179,8,0.4) 55%, transparent 80%);
}
.chest-overlay-flash.dim-anim {
  animation: chestDimScreen 0.45s ease-out;
  background: #000;
}
@keyframes chestFlashScreen {
  0% { opacity: 0; }
  25% { opacity: 0.85; }
  100% { opacity: 0; }
}
@keyframes chestDimScreen {
  0% { opacity: 0; }
  30% { opacity: 0.65; }
  100% { opacity: 0; }
}
.chest-overlay-icon {
  font-size: clamp(6rem, 20vw, 11rem);
  line-height: 1;
  margin-bottom: 16px;
}
@keyframes chestShakeBig {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  15% { transform: translateX(-10px) rotate(-10deg); }
  30% { transform: translateX(10px) rotate(10deg); }
  45% { transform: translateX(-14px) rotate(-13deg); }
  60% { transform: translateX(14px) rotate(13deg); }
  75% { transform: translateX(-8px) rotate(-8deg); }
  90% { transform: translateX(8px) rotate(8deg); }
}
.chest-shake-big { animation: chestShakeBig 0.35s ease-in-out infinite; }
@keyframes chestBurstOpen {
  0% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.5) rotate(-10deg); }
  70% { transform: scale(0.85) rotate(6deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.chest-burst-open { animation: chestBurstOpen 0.5s ease-out; }
.chest-slot-reels {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  max-width: 420px;
  margin: 4px auto 16px;
  padding: 18px 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, #2a2a30, #141416 55%, #1c1c22);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.4),
    0 0 22px rgba(124,58,237,0.35),
    0 0 34px rgba(6,182,212,0.28),
    inset 0 2px 5px rgba(255,255,255,0.08),
    inset 0 -8px 16px rgba(0,0,0,0.55);
}
.chest-slot-reel {
  position: relative;
  width: clamp(4.2rem, 17vw, 6.4rem);
  height: clamp(4.2rem, 17vw, 6.4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.4rem, 10vw, 3.8rem);
  line-height: 1;
  background: radial-gradient(circle at 50% 38%, #27272e 0%, #101012 78%);
  border: 3px solid #3a3a42;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    inset 0 3px 8px rgba(0,0,0,0.75),
    inset 0 -2px 4px rgba(255,255,255,0.05),
    0 1px 0 rgba(255,255,255,0.08);
  transition: border-color 0.2s;
}
/* faint top-of-glass highlight so the window reads as recessed, not flat */
.chest-slot-reel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.10), rgba(255,255,255,0));
  pointer-events: none;
}
@keyframes chestReelSpin {
  0%, 100% { transform: scaleY(1); filter: blur(0); }
  50% { transform: scaleY(0.78); filter: blur(2px); }
}
.chest-slot-reel.spinning { animation: chestReelSpin 0.1s linear infinite; border-color: #4a4a54; }
@keyframes chestReelLand {
  0% { transform: scale(1.35) rotate(-4deg); }
  50% { transform: scale(0.85) rotate(3deg); }
  75% { transform: scale(1.08) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.chest-slot-reel.landed { animation: chestReelLand 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
/* brief cyan glow + border flash the instant a reel is stopped, so each of the
   3 taps gets its own tactile "locked in" feedback before the final verdict. */
@keyframes chestReelPop {
  0% { box-shadow: inset 0 3px 8px rgba(0,0,0,0.75), inset 0 -2px 4px rgba(255,255,255,0.05), 0 0 0 rgba(6,182,212,0); border-color: #3a3a42; }
  35% { box-shadow: inset 0 3px 8px rgba(0,0,0,0.75), inset 0 -2px 4px rgba(255,255,255,0.05), 0 0 24px rgba(6,182,212,0.85); border-color: var(--accent2); }
  100% { box-shadow: inset 0 3px 8px rgba(0,0,0,0.75), inset 0 -2px 4px rgba(255,255,255,0.05), 0 0 0 rgba(6,182,212,0); border-color: #3a3a42; }
}
.chest-slot-reel.reel-pop { animation: chestReelPop 0.45s ease-out; }
.chest-slot-reel.win {
  border-color: var(--success);
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.6), 0 0 26px rgba(34,197,94,0.75), 0 0 46px rgba(34,197,94,0.4);
}
.chest-overlay-points { font-size: clamp(3rem, 12vw, 6.5rem); font-weight: 900; }
.chest-rare-label { color: var(--warning); font-weight: 700; font-size: clamp(0.9rem, 2.5vw, 1.15rem); margin-top: 8px; }
.chest-overlay-mute, .chest-overlay-close {
  position: fixed;
  top: 20px;
  z-index: 10000;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  min-height: 40px;
}
.chest-overlay-mute { right: 20px; padding: 8px 12px; font-size: 1.1rem; }
.chest-overlay-close { left: 20px; }
.chest-overlay-mute:hover, .chest-overlay-close:hover { border-color: var(--accent2); color: var(--accent2); }
.chest-overlay .chest-gamble-actions { justify-content: center; max-width: 480px; }
.chest-overlay .chest-gamble-status { font-size: 1rem; }
@media (max-width: 480px) {
  .chest-overlay-mute, .chest-overlay-close { top: 12px; font-size: 0.8rem; padding: 7px 10px; }
  .chest-overlay-mute { right: 12px; }
  .chest-overlay-close { left: 12px; }
  .chest-overlay .chest-gamble-actions { flex-direction: column; }
  .chest-overlay .chest-gamble-actions button { min-width: 0; width: 100%; }
  .chest-slot-reels { gap: 8px; padding: 12px 10px; }
}

/* ===== MILESTONE REWARD OVERLAY =====
   独立した専用オーバーレイ。.chest-overlayとは別クラスのため、デイリー宝箱の
   rank系/rare状態やチェスト演出には一切影響しない。close/mute等のボタン外観のみ
   .chest-overlay-close を共用(見た目統一のため。IDは別)。 */
.milestone-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: rgba(5,5,10,0.92);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
  overflow-y: auto;
}
.milestone-overlay.active { display: flex; opacity: 1; }
.milestone-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(234,179,8,0.4), transparent 60%);
}
.milestone-overlay-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 560px;
}
.milestone-overlay-icon {
  font-size: clamp(4rem, 15vw, 7rem);
  line-height: 1;
  margin-bottom: 8px;
  animation: chestBurstOpen 0.6s ease-out;
}
.milestone-overlay-title {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: 800;
  color: var(--warning);
  margin-bottom: 4px;
}
#milestone-overlay-points-wrap { position: relative; overflow: visible; }
.milestone-overlay-sub {
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  color: var(--text-muted);
  margin-top: 10px;
}
@media (max-width: 480px) {
  .milestone-overlay-icon { margin-bottom: 4px; }
}

.action-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.action-row button, .action-row a {
  flex: 1; min-width: 120px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  border: none;
}
.referral-box {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: monospace;
  font-size: 0.85rem;
  word-break: break-all;
  margin-bottom: 12px;
}
.copy-btn {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s;
}
.copy-btn:hover { border-color: var(--accent2); color: var(--accent2); }

/* ===== ALERTS & NOTIFICATIONS ===== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: none;
}
.alert.show { display: block; }
.alert-info { background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.3); color: #67e8f9; }
.alert-warn { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #fde68a; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .ps-grid { grid-template-columns: 1fr; }
  .tokenomics-wrap { grid-template-columns: 1fr; }
  .affil-grid { grid-template-columns: 1fr; }
  .footer .inner { grid-template-columns: 1fr; gap: 24px; }
  /* モバイルでは固定サイドバーの代わりに、navbar直下に貼り付く
     水平スクロールタブバーへ変換する（タブ切り替え化に伴い、モバイルでも
     全セクションへアクセスする導線を維持するため） */
  .dash-sidebar {
    display: block;
    position: sticky;
    top: 64px;
    margin-top: 64px;
    width: 100%;
    height: auto;
    padding: 8px 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-y: visible;
    z-index: 90;
  }
  .dash-sidebar .logo-wrap,
  .dash-sidebar > div:last-child { display: none; }
  .dash-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 0 12px;
    gap: 6px;
  }
  .dash-nav li { flex: 0 0 auto; scroll-snap-align: start; }
  .dash-nav li a { white-space: nowrap; padding: 8px 12px; font-size: 0.82rem; }
  .dash-nav li a .nav-icon,
  .dash-nav li a .nav-icon svg { width: 17px; height: 17px; }
  /* タブバーが横スクロール可能であることを示すフェードヒント。
     scroll-fade-endクラス(JS側で末尾到達時に付与)で右端フェードを消す。 */
  .dash-sidebar { position: sticky; }
  .dash-sidebar::after {
    content: '';
    position: absolute;
    top: 8px; right: 0; bottom: 8px;
    width: 28px;
    background: linear-gradient(to right, transparent, var(--bg-card));
    pointer-events: none;
    transition: opacity 0.2s;
  }
  .dash-sidebar.scroll-fade-end::after { opacity: 0; }
  .dash-main {
    margin-left: 0;
    margin-top: 0;
    min-height: auto;
    padding: 24px 16px 40px;
  }
  .dash-card.active-section { padding: 28px 24px; border-radius: 16px; }
  .navbar .nav-links .hide-mobile { display: none; }
}
@media (max-width: 480px) {
  .hero { padding: 110px 16px 80px; }
  .form-box { padding: 28px 20px; }
  .points-big { font-size: 2.2rem; }
  .dash-card.active-section { padding: 22px 18px; }
}
