/* =====================================================================
   wow·poly — polymarket-style dark
   Flat surfaces, no glass, no shadows. Single orange accent. Tabular
   numerals. Two cards per row on big screens; hero widget at the top.
   ===================================================================== */

:root{
  /* Backgrounds — kainos canonical */
  --bg:        #0a0b10;
  --surface:   #0d0e14;
  --surface-2: #111218;
  --surface-3: #1a1b25;
  --line:      rgba(255, 255, 255, 0.04);
  --line-2:    rgba(255, 255, 255, 0.10);

  --ink:       #f2f2f2;
  --sub:       #a8a8a8;
  --muted:     #6a6a6a;

  /* Brand — kainos red-pink primary, orange partner only in gradient */
  --accent:    #ff3d5a;
  --accent-2:  #ff7a2d;                        /* gradient partner */
  --accent-hi: #ff5874;
  --accent-dim: rgba(255, 61, 90, 0.10);
  --accent-dim-2: rgba(255, 61, 90, 0.20);
  --brand-grad-90:  linear-gradient(90deg,  #ff3d5a, #ff7a2d);
  --brand-grad-135: linear-gradient(135deg, #ff3d5a, #ff7a2d);

  /* Functional — never blends with brand red */
  --up:        #14F195;                        /* solana green — longs/yes/up */
  --up-hi:     #1aff9f;
  --up-dim:    rgba(20, 241, 149, 0.08);
  --up-dim-2:  rgba(20, 241, 149, 0.18);
  --dn:        #ef5350;                        /* coral red — shorts/no/down */
  --dn-hi:     #ff6a67;
  --dn-dim:    rgba(239, 83, 80, 0.08);
  --dn-dim-2:  rgba(239, 83, 80, 0.18);
  --warn:      #f59e0b;
}

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

/* Author rules with display: flex/grid/etc. would otherwise override the
   built-in [hidden] UA rule. Force hidden to win. */
[hidden] { display: none !important; }

html, body{
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
body{ padding-bottom: 60px; }                  /* room for danmaku bar */
#heatmap, .halo, .grid-bg, .grain, .vignette { display: none !important; }
.reveal { /* no-op */ }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

.mono { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }

/* ─────────────────────────── TOP BAR ─────────────────────────── */

.topbar{
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner{
  max-width: 1280px;
  margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  flex-wrap: wrap;                                /* let wallet pill drop on tablets */
}
.topbar-inner > .search{
  flex: 1 1 240px;                                /* search shrinks/grows; lets wallet wrap */
  min-width: 180px;
}

.brand{ display: flex; align-items: center; gap: 10px; }
.brand-mark{
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
}
.brand-text{
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600; font-size: 13.5px;
  color: var(--ink);
}
.brand-text span{
  background: var(--brand-grad-90);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 0 1px;
  font-weight: 700;
}

.search{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  flex: 1; max-width: 380px;
  color: var(--muted);
}
.search:focus-within{ border-color: var(--accent); color: var(--ink); }
.search input{
  flex: 1;
  background: transparent; border: none; outline: none;
  color: var(--ink);
  font-family: inherit; font-size: 13px;
}
.search input::placeholder{ color: var(--muted); }

.nav-meta{ display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Compact "wallet connect" pill at the top right */
.wallet-pill{ position: relative; }

/* Floating +/− delta indicator above the wallet pill — fires whenever the
   WWB balance changes (bet placed, winnings credited, tie refund). */
.wallet-delta-layer{
  position: absolute;
  top: 0; right: 0;
  pointer-events: none;
  height: 0;
}
.wallet-delta{
  position: absolute;
  right: 0;
  bottom: 100%;
  margin-bottom: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
  pointer-events: none;
  animation: walletDelta 1.8s cubic-bezier(.22, 1, .36, 1) forwards;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.wallet-delta.pos.wwb { color: var(--up); }
.wallet-delta.neg.wwb { color: var(--accent); }
/* Free PT — muted so it visually reads as play-money */
.wallet-delta.pos.free{
  color: var(--sub);
  font-size: 12px;
  font-weight: 600;
}
.wallet-delta.neg.free{
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
@keyframes walletDelta {
  0%   { opacity: 0; transform: translateY(8px) scale(0.85); }
  18%  { opacity: 1; transform: translateY(0)   scale(1.05); }
  30%  { transform: translateY(-2px) scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(0.95); }
}
.btn-wallet{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 12px;
  background: var(--surface);
  border: 1px solid rgba(255, 61, 90, 0.28);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  transition: all .15s;
}
.btn-wallet:hover{ border-color: var(--accent); background: var(--surface-2); }
.btn-wallet .dot{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 6px var(--up);
}
.btn-wallet .addr{
  color: var(--sub);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.btn-wallet .amt{ color: var(--ink); font-weight: 600; }
.btn-wallet .lbl{
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.wallet-menu{
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 80;
  min-width: 240px;
  padding: 12px 14px;
  background: rgba(13, 14, 20, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line-2);
  display: flex; flex-direction: column;
  gap: 6px;
  font-family: 'Inter', sans-serif;
}
.wm-head{
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.wm-head .mono{ color: var(--ink); font-weight: 600; }
.wm-addr{
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 6px;
  margin: -2px -6px;            /* keep visual rhythm with neighbouring elements */
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.wm-addr:hover{
  background: var(--surface-2, #16161a);
  border-color: var(--line);
}
.wm-addr.copied{
  color: var(--up);
  border-color: var(--up);
}
.wm-status{
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--up);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wm-status::before{
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 4px var(--up);
}
.wm-row{
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11.5px;
  color: var(--sub);
}
.wm-row.small{ font-size: 10.5px; color: var(--muted); }
.wm-row .mono{ color: var(--ink); font-size: 12px; font-weight: 600; }
.wm-refresh{
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 1px 6px;
  font-size: 11px;
  cursor: pointer;
  margin-left: 6px;
  border-radius: 3px;
  vertical-align: middle;
  line-height: 1.4;
}
.wm-refresh:hover{ color: var(--accent); border-color: var(--accent); }
.wm-refresh:disabled{ opacity: 0.5; cursor: wait; }
.wm-row .mono.accent{
  background: var(--brand-grad-90);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wm-rule{ height: 1px; background: var(--line); margin: 3px 0; }
.wm-status.connected{
  color: var(--up);
}
.wm-status.connected::before{ background: var(--up); box-shadow: 0 0 4px var(--up); }

/* Wallet menu action buttons */
.wm-connect, .wm-deposit{
  margin-top: 8px;
  width: 100%;
  text-align: center;
  margin-left: 0 !important;          /* override .btn-primary's margin-left:auto */
}
.wm-disconnect{
  margin-top: 4px;
  width: 100%;
  padding: 7px 10px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit; font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.wm-disconnect:hover{ color: var(--dn); border-color: var(--dn); }
.btn-secondary{
  background: transparent;
  border: 1px solid var(--line);
  color: var(--sub);
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.btn-secondary:hover{ color: var(--ink); border-color: var(--line-2); }

/* ─────────────────────── DEPOSIT MODAL ─────────────────────── */

.deposit-modal{
  position: fixed; inset: 0;
  z-index: 150;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  animation: dm-bg-in .2s ease;
}
@keyframes dm-bg-in { from { opacity: 0; } to { opacity: 1; } }
.dm-card{
  width: min(440px, 92vw);
  background: var(--surface);
  border: 1px solid var(--line-2);
  display: flex; flex-direction: column;
  animation: dm-pop .22s cubic-bezier(.22, 1, .36, 1);
}
@keyframes dm-pop { from { opacity: 0; transform: scale(0.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.dm-head{
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 700;
}
.dm-close{
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px; line-height: 1;
  cursor: pointer;
}
.dm-close:hover{ color: var(--ink); }
.dm-body{
  padding: 16px 18px 18px;
  display: flex; flex-direction: column;
  gap: 10px;
}
.dm-row{
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px;
  color: var(--sub);
}
.dm-lbl{
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.dm-val{ color: var(--ink); }
.dm-amount-label{
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}
#dmAmount{
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  letter-spacing: 0.02em;
}
#dmAmount:focus{ border-color: var(--accent); }
.dm-quick{ display: flex; gap: 4px; }
.dm-quick-btn{
  flex: 1;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all .12s;
}
.dm-quick-btn:hover{ color: var(--accent); border-color: var(--accent); }
.dm-status{
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-family: 'JetBrains Mono', monospace;
}
.dm-status.ok{ border-color: var(--up); color: var(--up); }
.dm-status.err{ border-color: var(--dn); color: var(--dn); }
.dm-submit{
  margin-top: 4px !important;
  margin-left: 0 !important;
  width: 100%;
  padding: 11px 14px !important;
  font-size: 13px !important;
  text-align: center;
}
.dm-submit:disabled{ opacity: 0.55; cursor: not-allowed; }
.dm-tiny{
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

.btn-ghost{
  padding: 7px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--sub);
  font-size: 13px;
}
.btn-ghost:hover{ border-color: var(--line-2); color: var(--ink); }
.btn-guide{ font-size: 15px; padding: 5px 9px; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }

.chips-bar{
  border-top: 1px solid var(--line);
}
.chips-bar-inner{
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.chips{
  display: flex;
  gap: 4px;
  flex: 1; min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip{
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--sub);
  font-size: 12px;
  font-family: inherit;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.chip:hover{ color: var(--ink); border-color: var(--line-2); }
.chip.active{
  background: var(--ink);
  color: #000;
  border-color: var(--ink);
  font-weight: 600;
}

/* ─────────────────────────── HERO WIDGET ─────────────────────────── */

.hero-widget-wrap{
  position: relative;
  max-width: 1280px;
  margin: 22px auto 0;
  padding: 0 20px;
  display: flex; align-items: center; gap: 8px;
}

.hw-arrow{
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
  transition: all .15s;
}
.hw-arrow:hover{ background: var(--surface-2); border-color: var(--accent); color: var(--accent); }

.hero-widget{
  flex: 1; min-width: 0;
  display: grid;
  grid-template-columns: 160px 180px 1.4fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

/* rotating news headline ticker (left column) */
.hw-news-ticker{
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  min-height: 240px;
  overflow: hidden;
  isolation: isolate;
}
.hw-nt-head{
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--up);
  text-transform: uppercase;
  font-weight: 700;
  flex-shrink: 0;
  position: relative; z-index: 2;
}
.hw-nt-head .dot.live{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 6px var(--up);
  animation: pulse 1.6s infinite;
}
.hw-nt-head span:not(.dot){ color: var(--ink); font-weight: 600; }

/* Stage: single item visible at a time, others slide in/out */
.hw-nt-stage{
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  clip-path: inset(0);
}
.hw-nt-item{
  position: absolute;
  inset: 0;
  padding: 12px 12px 8px;
  display: flex; flex-direction: column;
  gap: 6px;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.25,0.46,0.45,0.94),
              opacity 0.4s ease;
  pointer-events: none;
  background-size: cover;
  background-position: center;
}
.hw-nt-item[style*="background-image"]::before{
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,.72) 100%);
  z-index: 0;
}
.hw-nt-item[style*="background-image"] .hw-nt-cat,
.hw-nt-item[style*="background-image"] .hw-nt-title,
.hw-nt-item[style*="background-image"] .hw-nt-source,
.hw-nt-item[style*="background-image"] .hw-nt-source a {
  position: relative; z-index: 1;
  color: #fff !important;
}
.hw-nt-item.active{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.hw-nt-item.exiting{
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.55,0.055,0.675,0.19),
              opacity 0.3s ease;
}
.hw-nt-cat{
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}
.hw-nt-title{
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hw-nt-source{
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: auto;
}
.hw-nt-source a{ color: var(--muted); text-decoration: none; }
.hw-nt-source a:hover{ color: var(--accent); }

/* Pagination dots */
.hw-nt-foot{
  display: flex; justify-content: center; align-items: center;
  gap: 4px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  position: relative; z-index: 2;
}
.hw-nt-dot{
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--line-2);
  transition: background 0.3s;
}
.hw-nt-dot.active{ background: var(--accent); }

/* live comment column */
.hw-live-comments{
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  min-height: 240px;
}
.hw-lc-head{
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--up);
  text-transform: uppercase;
  font-weight: 700;
  flex-shrink: 0;
}
.hw-lc-head .dot.live{ width:6px;height:6px;border-radius:50%;background:var(--up);box-shadow:0 0 6px var(--up);animation:pulse 1.6s infinite; }
.hw-lc-head span:not(.dot){ color:var(--ink);font-weight:600; }
.hw-lc-list{
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px 8px;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.hw-lc-list::-webkit-scrollbar{ width:4px; }
.hw-lc-list::-webkit-scrollbar-thumb{ background:var(--line-2); }
.hw-lc-empty{ text-align:center;color:var(--muted);font-size:11px;padding:20px 6px; }
.hw-lc-item{ display:flex;align-items:baseline;gap:6px;font-size:11px;line-height:1.45;padding:3px 4px;border-left:2px solid transparent; }
.hw-lc-item.mine{ border-left-color:var(--accent); }
.hw-lc-item.fresh{ animation:lc-fade-in .25s ease; }
@keyframes lc-fade-in{ from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }
.hw-lc-meta{ flex-shrink:0;font-size:9.5px;color:var(--muted); }
.hw-lc-text{ color:var(--ink);word-break:break-word;flex:1;font-size:11px; }
.hw-lc-del{ flex-shrink:0;background:transparent;border:none;color:var(--muted);font-size:12px;cursor:pointer;padding:0 2px; }
.hw-lc-del:hover{ color:var(--dn); }
.hw-lc-compose{ display:flex;border-top:1px solid var(--line);background:rgba(0,0,0,0.18);flex-shrink:0; }
#hwLcInput{ flex:1;min-width:0;background:transparent;border:none;outline:none;color:var(--ink);font-family:'Inter',sans-serif;font-size:11px;padding:8px 8px; }
#hwLcInput::placeholder{ color:var(--muted); }
.hw-lc-send{ background:transparent;border:none;border-left:1px solid var(--line);color:var(--accent);padding:0 10px;font-size:14px;cursor:pointer; }
.hw-lc-send:hover{ background:var(--accent-dim); }

.hw-chart-pane{
  display: flex; flex-direction: column;
  min-height: 240px;
  border-right: 1px solid var(--line);
  padding: 14px 16px;
  gap: 10px;
}
.hw-head{
  display: flex; justify-content: space-between; align-items: center;
}
.hw-sym-block{
  display: flex; align-items: center; gap: 10px;
}
.hw-sym-text{
  display: flex; align-items: baseline; gap: 8px;
}
/* Coin icon — 24px, image or letter-badge fallback */
.hw-sym-icon{
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--brand-grad-135);
  overflow: hidden;
}
.hw-sym-icon.has-img{
  background: transparent;
}
.hw-sym-icon img{
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
.hw-sym-icon[data-sym="btc"]{ background: linear-gradient(135deg, #f7931a, #ffb547); }
.hw-sym-icon[data-sym="nyan"]{ background: linear-gradient(135deg, #ff4fa3, #ff7a2d); }
.hw-sym-icon[data-sym="wwb"]{ background: linear-gradient(135deg, #14F195, #0db87a); }
.hw-sym{
  font-size: 16px; font-weight: 700; color: var(--ink);
  letter-spacing: 0.01em;
}
.hw-period{
  font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand-grad-90);
  padding: 3px 7px;
  font-weight: 700;
}
.hw-time{
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--ink);
}
.hw-time .dot.live{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--up);
  animation: pulse 1.6s infinite;
}
.hw-phase{
  font-size: 9.5px;
  letter-spacing: 0.18em;
  font-weight: 700;
  padding: 1px 6px;
}
.hw-phase.betting{
  color: var(--up);
  background: var(--up-dim);
}
.hw-phase.locked{
  color: var(--dn);
  background: var(--dn-dim);
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
.hw-chart{
  flex: 1; min-height: 160px;
  width: 100%;
  display: block;
  background:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px) 0 0/100% 25%,
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px) 0 0/8.33% 100%;
}
.hw-meta{
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.hw-pool-delta{
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  animation: poolDelta 1.8s cubic-bezier(.22, 1, .36, 1) forwards;
}
.hw-pool-delta.wwb { color: var(--up); }
.hw-pool-delta.free{
  color: var(--sub);
  font-size: 10.5px;
  font-weight: 600;
  /* offset slightly so a simultaneous WWB + PT pair don't perfectly overlap */
  left: 6px;
  animation-delay: 80ms;
}
@keyframes poolDelta {
  0%   { opacity: 0; transform: translateY(8px)  scale(0.9); }
  18%  { opacity: 1; transform: translateY(0)    scale(1.06); }
  30%  { transform: translateY(-2px) scale(1); }
  100% { opacity: 0; transform: translateY(-22px) scale(1); }
}
.hw-meta span span{ color: var(--ink); }
.hw-meta-up{ color: var(--up); font-weight: 600; }
.hw-meta-dn{ color: var(--dn); font-weight: 600; }
.hw-meta-up span{ color: var(--up); }
.hw-meta-dn span{ color: var(--dn); }
.hw-meta-up .muted, .hw-meta-dn .muted{ color: var(--muted); font-weight: 400; }

.hw-vote-pane{
  padding: 14px 16px;
  display: flex; flex-direction: column;
  gap: 14px;
}
.hw-price-block{
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--line);
}
.hw-price{
  font-size: 30px; font-weight: 700; line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.hw-delta{
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.hw-delta.up{ color: var(--up); }
.hw-delta.dn{ color: var(--dn); }
.hw-vote-split{
  display: flex; flex-direction: column;
  gap: 6px;
  padding: 10px 0 4px;
  border-bottom: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.hwvs-row{
  display: flex; align-items: baseline; gap: 8px;
}
.hwvs-row .hwvs-side{
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  width: 60px;
}
.hwvs-row.up .hwvs-side{ color: var(--up); }
.hwvs-row.dn .hwvs-side{ color: var(--dn); }
.hwvs-pct{
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  min-width: 38px;
}
.hwvs-detail{
  flex: 1;
  text-align: right;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hwvs-bar{
  display: flex;
  height: 4px;
  background: rgba(255,255,255,0.04);
  overflow: hidden;
}
.hwvs-bar-fill{
  height: 100%;
  transition: width .4s ease;
}
.hwvs-bar-fill.up{ background: var(--up); }
.hwvs-bar-fill.dn{ background: var(--dn); }

.hw-quad-wrap{
  position: relative;
  flex: 1;
  display: flex;
}
.hw-quad-wrap > .hw-quad{ flex: 1; }
.hw-quad{
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  flex: 1;
}

/* Settle-phase overlay over the 4 buttons */
.hw-lock-overlay{
  position: absolute; inset: 0;
  z-index: 4;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  background: rgba(13, 14, 20, 0.94);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(239, 83, 80, 0.4);
  text-align: center;
  animation: lockIn .25s ease;
}
@keyframes lockIn { from { opacity: 0; } to { opacity: 1; } }
.hw-lock-icon{
  font-size: 22px;
  animation: pulse 1.4s infinite;
}
.hw-lock-msg{
  font-size: 10.5px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--ink);
}
.hw-lock-sub{
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.hw-lock-time{
  font-size: 16px;
  font-weight: 700;
  color: var(--dn);
  margin-top: 4px;
}

.hw-claim-btn{
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  background: var(--up); color: #fff; border: none; border-radius: 6px;
  font-size: 11px; font-weight: 700; padding: 5px 14px; cursor: pointer;
  white-space: nowrap; letter-spacing: 0.04em; z-index: 2;
}
.hw-claim-btn:hover{ opacity: 0.88; }

.hw-dots{
  position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.hw-dot{
  padding: 3px 10px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: all .15s;
}
.hw-dot:hover{ color: var(--ink); border-color: var(--line-2); }
.hw-dot.on{
  color: var(--accent);
  border-color: var(--accent);
}

/* ─────────────────────────── SECTIONS ─────────────────────────── */

.section{
  max-width: 1280px;
  margin: 32px auto 0;
  padding: 0 20px;
}
.section-head{
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* Daily carousel nav */
.daily-nav{
  display: flex; align-items: center; gap: 6px;
  margin-left: auto;
}
.daily-nav-btn{
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink); font-size: 16px; line-height: 1;
  padding: 2px 8px; cursor: pointer; border-radius: 3px;
  font-family: inherit;
}
.daily-nav-btn:hover{ background: var(--accent-dim); color: var(--accent); }
.daily-dots{ display: flex; gap: 5px; align-items: center; }
.daily-dot{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--line-2); transition: background 0.25s;
}
.daily-dot.active{ background: var(--accent); }

/* Daily carousel — single big card, slides horizontally */
.daily-carousel{
  position: relative;
  overflow: hidden;
  min-height: 460px;
}
.daily-slide{
  position: absolute; inset: 0;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.35s ease;
}
.daily-slide.from-left{ transform: translateX(-100%); }
.daily-slide.active{
  transform: translateX(0);
  opacity: 1;
}
.daily-slide.exiting-left{
  transform: translateX(-100%);
  opacity: 0;
}
.daily-slide.exiting-right{
  transform: translateX(100%);
  opacity: 0;
}
.section-no{
  color: #fff;
  font-weight: 700;
  background: var(--brand-grad-135);
  padding: 2px 7px;
}
.section-title{
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.section-dot{ flex: 1; height: 1px; background: var(--line); }
.section-meta{
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.live-dot{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--up);
  animation: pulse 1.6s infinite;
}

/* ─────────────────────────── FEATURED · TOP 4 ─────────────────────────── */
/* Layout: [big card] [betting col] [3 small cards stacked]                */

.featured-grid{
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 8px;
  /* Big card spans the full left column; right column stacks all small cards. */
}

/* ─── BIG card (left) ─── */
.featured-big{
  grid-column: 1;
  grid-row: 1 / -1;
  position: relative;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  display: block;
  min-height: 460px;
}
.fb-bg{
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(255,61,90,0.85) 0%, rgba(255,122,45,0.85) 100%),
    radial-gradient(800px 400px at 80% 20%, rgba(255,255,255,0.10), transparent 60%);
}
/* Per-category accent on the big card */
.fb-bg[data-cat="crypto"]{ background: linear-gradient(135deg, #ff7a2d, #ffb547); }
.fb-bg[data-cat="ai"]    { background: linear-gradient(135deg, #7a3dff, #b38dff); }
.fb-bg[data-cat="tech"]  { background: linear-gradient(135deg, #ff4fa3, #ff7a2d); }
.fb-bg[data-cat="economy"]{ background: linear-gradient(135deg, #14f195, #0db87a); }
.fb-bg[data-cat="sports"] { background: linear-gradient(135deg, #14f195, #ff7a2d); }
.fb-bg[data-cat="japan"]  { background: linear-gradient(135deg, #b38dff, #ff3d5a); }
.fb-bg[data-cat="world"]  { background: linear-gradient(135deg, #ff3d5a, #ff7a2d); }
.fb-bg[data-cat="science"], .fb-bg[data-cat="entertainment"]{ background: linear-gradient(135deg, #ff4fa3, #b38dff); }
.fb-bg[data-cat="breaking"]{ background: linear-gradient(135deg, #ef4444, #ff3d5a); }
/* When admin set an image, draw a vertical dark gradient over it for legibility */
.fb-bg.has-image{
  background-color: #0a0a0c;
}
.fb-bg.has-image::after{
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.fb-watermark{
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-5deg);
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(60px, 9vw, 110px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.10);
  pointer-events: none;
  white-space: nowrap;
  text-transform: uppercase;
}

.fb-badge{
  position: absolute;
  top: 16px; left: 16px;
  display: flex; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #fff;
}
.fb-badge > span{
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}
.fb-badge .fb-cat{ background: rgba(255,255,255,0.15); }

.fb-pct{
  position: absolute;
  top: 50%; right: 24px;
  transform: translateY(-50%);
  text-align: right;
  color: #fff;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.fb-pct-num{
  font-size: clamp(64px, 8vw, 96px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.fb-pct-num span{
  font-size: 0.4em;
  font-weight: 700;
  vertical-align: top;
  margin-left: 4px;
}
.fb-pct-lbl{
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}

.fb-text{
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 20px 18px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.fb-q{
  font-size: clamp(15px, 1.8vw, 22px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fb-reason{
  font-size: 12px;
  color: rgba(255, 255, 255, 0.70);
  line-height: 1.45;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fb-meta{
  display: flex; justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.10);
  font-size: 10.5px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}
.fb-meta a{ color: #fff; }

/* ─── Bet grid inside the big card ─── */
.fb-bet-grid{
  display: grid;
  grid-template-columns: 64px 1fr 1fr;
  gap: 6px;
  align-items: stretch;
  margin-top: 10px;
  margin-bottom: 12px;
}
.fb-bet-row-lbl{
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.08);
  border-left: 2px solid var(--accent);
  padding: 0 8px;
}
.qbtn.fb-bet{
  padding: 12px 14px;
  min-height: 52px;
}
.qbtn.fb-bet .qb-side{ font-size: 14px; }
.qbtn.fb-bet .qb-kind{ font-size: 10.5px; }

/* ─── Small cards (right column, stacked) ─── */
.featured-small{
  grid-column: 2;
  display: flex; flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  cursor: pointer;
  min-width: 0;
}
.fs-head{
  display: flex; align-items: flex-start; gap: 10px;
  flex: 1;
}
.fs-thumb{
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 5px;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  background: var(--surface-2);
}
.fs-head-text{
  display: flex; flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.fs-head-row{
  display: flex; align-items: baseline; gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.fs-rank{
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.fs-cat{
  color: var(--muted);
  letter-spacing: 0.06em;
  flex: 1;
}
.fs-pct{
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
}
.fs-q{
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.fs-buys{
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
}
.fs-buys .qbtn{
  padding: 6px 8px;
}
.fs-buys .qbtn .qb-side{ font-size: 10.5px; }
.fs-buys .qbtn .qb-kind{ font-size: 8.5px; }

.fs-foot{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding-top: 4px;
}
.fs-foot .card-time{ color: var(--text); }

@media (max-width: 880px) {
  .featured-grid{
    grid-template-columns: 1fr;
  }
  .featured-big{ grid-column: 1; grid-row: 1; min-height: 380px; }
  .featured-small{ grid-column: 1; grid-row: auto !important; }
  .fb-bet-grid{ grid-template-columns: 56px 1fr 1fr; }
}
@media (max-width: 480px) {
  .fb-bet-grid{
    grid-template-columns: 1fr 1fr;
  }
  /* Hide the row-label column on very narrow screens — labels live on the
     button text instead (qb-kind already shows "PT" / "WWB"). */
  .fb-bet-row-lbl{ display: none; }
}

/* ─────────────────────────── MARKET GRID ─────────────────────────── */

.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 8px;
}

.card{
  display: flex; flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .15s, background .15s;
}
.card:hover{
  border-color: var(--line-2);
  background: var(--surface-2);
}

/* When a card has a left thumbnail, switch to a row layout. Small square icon
   on the left, Polymarket style — keeps the card's normal padding. */
.card.has-thumb{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: start;
}
.card.has-thumb .card-thumb{
  width: 56px; height: 56px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
}
.card.has-thumb .card-thumb img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
.card.has-thumb .card-body{
  display: flex; flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.card.is-manual{ border-left: 2px solid var(--accent); }
@media (max-width: 540px){
  .card.has-thumb{ grid-template-columns: 48px 1fr; gap: 10px; }
  .card.has-thumb .card-thumb{ width: 48px; height: 48px; }
}

.card-head{
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
}
.cat{
  color: var(--accent);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.cat.japan{ color: #b38dff; }
.cat.crypto{ color: #ffb547; }
.cat.tech{ color: #ff7ac8; }
.cat.ai{ color: #b38dff; }
.cat.economy, .cat.sports{ color: var(--up); }
.cat.science, .cat.entertainment{ color: #ff7ac8; }
.cat.world{ color: var(--accent); }
.cat.breaking{ color: var(--dn); }
.cat.politics{ color: #b38dff; }
.vol{ color: var(--muted); font-size: 10px; letter-spacing: 0.06em; }

.q{
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(15px * 1.4 * 2);
}
.jp-name{ font-size: 16px; -webkit-line-clamp: 2; min-height: auto; }

.why{
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  font-style: italic;
  border-left: 2px solid var(--line);
  padding-left: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prob-row{
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
/* When a pie canvas is present, shift to a two-column layout */
.prob-row:has(canvas.poll-pie) {
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 4px 8px;
}
.prob-row canvas.poll-pie {
  grid-row: 1 / 3;
  grid-column: 1;
}
.prob-row:has(canvas.poll-pie) .prob-pct,
.prob-row:has(canvas.poll-pie) .prob-bar {
  grid-column: 2;
}
.prob-pct{
  font-size: 13px; font-weight: 600;
  display: flex; gap: 4px; align-items: baseline;
}
.prob-pct .up{ color: var(--up); }
.prob-pct .dn{ color: var(--dn); }
.prob-pct .vs{ color: var(--muted); }
.prob-bar{
  height: 6px;
  background: var(--dn-dim);
  position: relative;
  overflow: hidden;
}
.prob-fill{
  position: absolute; inset: 0;
  width: var(--w, 0%);
  background: var(--up);
}

/* JP price strip */
.jp-prices{
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.jp-prices > div{
  display: flex; flex-direction: column;
  gap: 2px;
  padding: 6px 9px;
  border-right: 1px solid var(--line);
}
.jp-prices > div:last-child{ border-right: none; }
.jp-prices .lbl{
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.jp-prices .mono{ font-size: 12px; font-weight: 600; }
.jp-prices .mono.up{ color: var(--up); }
.jp-prices .mono.dn{ color: var(--dn); }

/* 4-button quad — used by hero, news, and JP cards */
.quad{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.qbtn{
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  font-family: inherit;
  transition: all .12s;
}
.qbtn .qb-side{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.qbtn .qb-kind{
  font-size: 9.5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.qbtn:disabled{ opacity: 0.4; cursor: wait; }

/* Free YES — green outline */
.qbtn.yes.free .qb-side{ color: var(--up); }
.qbtn.yes.free:hover{ background: var(--up-dim); border-color: var(--up); }
/* Free NO — red outline */
.qbtn.no.free .qb-side{ color: var(--dn); }
.qbtn.no.free:hover{ background: var(--dn-dim); border-color: var(--dn); }
/* WWB YES — solid green */
.qbtn.yes.wwb{
  background: var(--up); color: #00120c;
  border-color: var(--up);
}
.qbtn.yes.wwb .qb-side{ color: #00120c; }
.qbtn.yes.wwb .qb-kind{ color: rgba(0, 18, 12, 0.55); }
.qbtn.yes.wwb:hover{ background: var(--up-hi); border-color: var(--up-hi); }
/* WWB NO — solid red */
.qbtn.no.wwb{
  background: var(--dn); color: #ffffff;
  border-color: var(--dn);
}
.qbtn.no.wwb .qb-side{ color: #fff; }
.qbtn.no.wwb .qb-kind{ color: rgba(255, 255, 255, 0.78); }
.qbtn.no.wwb:hover{ background: var(--dn-hi); border-color: var(--dn-hi); }

.card-foot{
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.card-foot a{ color: var(--accent); }
.card-time{
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.04em;
  font-weight: 600;
  padding: 2px 6px;
  background: var(--accent-dim);
  white-space: nowrap;
}
.btn-cmt{
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 4px 10px;
  font-family: inherit;
  font-size: 10.5px;
  transition: color .12s, border-color .12s;
}
.btn-cmt:hover{ color: var(--ink); border-color: var(--line-2); }

.empty{
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line);
}

/* ─────────────────────────── DANMAKU ─────────────────────────── */

.danmaku-layer{
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none;
  overflow: hidden;
}
.danmaku{
  position: absolute;
  white-space: nowrap;
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  font-size: clamp(15px, 1.7vw, 22px);
  font-weight: 600;
  text-shadow: 0 0 4px rgba(0,0,0,0.85), 0 0 10px rgba(0,0,0,0.5);
  left: 100vw;
  animation: danmaku-fly 18s linear forwards;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.danmaku.market{
  pointer-events: none;
}
.danmaku.mine{ pointer-events: auto; }
.danmaku.mine .dm-del{
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  width: 18px; height: 18px;
  font-size: 11px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.danmaku.mine .dm-del:hover{ background: var(--dn); border-color: var(--dn); }
@keyframes danmaku-fly {
  from { transform: translateX(0); }
  to   { transform: translateX(-110vw); }
}

.danmaku-bar{
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: rgba(8, 8, 8, 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.dm-context{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 8px 5px 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(247, 147, 26, 0.4);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  max-width: 50%;
  overflow: hidden;
}
.dm-ctx-arrow{ color: var(--accent); }
.dm-ctx-label{
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10.5px;
}
.dm-ctx-exit{
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  margin-left: 4px;
}
.dm-ctx-exit:hover{ color: var(--ink); }

.danmaku-glyph{ color: var(--accent); font-size: 13px; flex-shrink: 0; }
#danmakuInput{
  flex: 1; min-width: 0;
  background: transparent;
  border: none; outline: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  padding: 6px 0;
}
#danmakuInput::placeholder{ color: var(--muted); }
.danmaku-hint{
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* (right-side wallet drawer removed — replaced by .wallet-pill dropdown above) */

/* ─────────────────────────── TOAST ─────────────────────────── */

.toast{
  position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%);
  z-index: 200;
  padding: 9px 14px;
  background: #0d0d0d;
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.toast.show.ok{ border-color: var(--up); color: var(--up); }
.toast.show.err{ border-color: var(--dn); color: var(--dn); }

/* ─────────────────────────── COLOPHON ─────────────────────────── */

.colophon{
  max-width: 1280px;
  margin: 36px auto 24px;
  padding: 16px 20px 0;
  border-top: 1px solid var(--line);
}
.col-rule{ display: none; }
.col-body{
  display: flex; justify-content: space-between; gap: 18px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.col-body i{ color: var(--ink); font-style: normal; font-weight: 600; }
.col-body u{ text-decoration: none; color: var(--sub); border-bottom: 1px dotted var(--line-2); }
.small-caps{
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-right: 4px;
}
.col-sig{ color: var(--muted); white-space: nowrap; }

/* ─────────────────────────── MARKET DETAIL PANEL ─────────────────────────── */

.detail-panel{
  position: fixed; inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: detail-in .22s ease;
  overflow: hidden;
}
@keyframes detail-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.detail-header{
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}
.dp-back{
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s;
}
.dp-back:hover{ border-color: var(--accent); color: var(--accent); }
.dp-headmeta{
  display: flex; align-items: center; gap: 10px;
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}
.dp-cat{
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dp-divider{ color: var(--line-2); }
.dp-source{
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
}
.dp-source:hover{ text-decoration: underline; }
.dp-close{
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  width: 32px; height: 32px;
  font-size: 18px; line-height: 1;
  cursor: pointer;
}
.dp-close:hover{ color: var(--ink); border-color: var(--line-2); }

.detail-body{
  flex: 1;
  overflow: auto;
  scrollbar-width: none;            /* Firefox: hide scrollbar */
  -ms-overflow-style: none;         /* IE/Edge */
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 28px 80px;
}

.detail-main{
  display: flex; flex-direction: column;
  gap: 24px;
  min-width: 0;
}
.dp-title{
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}
.dp-hero-img{
  width: 100%; height: 200px;
  background-size: cover; background-position: center;
  border-radius: 10px;
  margin-top: 14px;
}

.dp-prob-block{
  display: flex; flex-direction: column;
  gap: 14px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.dp-prob-num{
  display: flex; flex-direction: column;
  gap: 4px;
}
.dp-prob-pct{
  font-family: 'JetBrains Mono', monospace;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--brand-grad-90);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dp-prob-lbl{
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.dp-prob-bar{
  display: flex; flex-direction: column; gap: 8px;
}
.dp-prob-bar > .dp-prob-fill{
  height: 8px;
  background: var(--up);
  position: relative;
  width: 0%;
  transition: width .4s ease;
}
.dp-prob-bar{ position: relative; }
.dp-prob-bar > .dp-prob-fill::after{
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 100%; right: -1000px;            /* spillover red rail */
  background: var(--dn);
}
.dp-prob-legend{
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.dp-prob-legend .up{ color: var(--up); }
.dp-prob-legend .dn{ color: var(--dn); }
.dp-prob-legend .dot{
  display: inline-block;
  width: 7px; height: 7px;
  margin: 0 4px;
}
.dp-prob-legend .dot.up{ background: var(--up); }
.dp-prob-legend .dot.dn{ background: var(--dn); }

.dp-stats{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  background: var(--surface);
}
.dp-stat{
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}
.dp-stat:last-child{ border-right: none; }
.dp-stat .lbl{
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.dp-stat .num{
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.dp-section{
  display: flex; flex-direction: column;
  gap: 10px;
  padding-top: 8px;
}
.dp-section h2{
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.dp-about{
  display: flex; flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
}
.dp-about-row{ display: flex; gap: 10px; }
.dp-about-row .lbl{
  flex-shrink: 0;
  width: 88px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  padding-top: 3px;
}
.dp-about-row .val{ color: var(--sub); flex: 1; }

.dp-cmt-list{
  display: flex; flex-direction: column;
  gap: 6px;
  max-height: 380px;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.dp-cmt-list::-webkit-scrollbar,
.detail-body::-webkit-scrollbar{ width: 0; height: 0; display: none; }
.dp-cmt-list .mcp-item{
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 9px 12px;
}
.dp-cmt-hint{
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding-top: 4px;
}

/* Right sidebar — sticky trade card */
.detail-side{
  display: flex; flex-direction: column;
  gap: 12px;
}
.dp-side-card{
  position: sticky;
  top: 16px;
  display: flex; flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line-2);
}
.dp-side-head{
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.dp-quad{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.dp-quad .qbtn{
  padding: 14px 12px;
}
.dp-quad .qbtn .qb-side{ font-size: 13px; }
.dp-side-foot{
  display: flex; justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

@media (max-width: 920px) {
  .detail-body{ grid-template-columns: 1fr; gap: 22px; padding: 20px 16px 80px; }
  .dp-side-card{ position: static; }
  .dp-stats{ grid-template-columns: repeat(2, 1fr); }
  .dp-stat:nth-child(2){ border-right: none; }
  .dp-stat:nth-child(1), .dp-stat:nth-child(2){ border-bottom: 1px solid var(--line); }
}

/* ─────────────────────────── TOPNAV LINKS ─────────────────────────── */

.topnav-links{
  display: flex;
  gap: 14px;
  margin-left: 4px;
}
.topnav-link{
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--sub);
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.topnav-link:hover{ color: var(--ink); border-bottom-color: var(--accent); text-decoration: none; }

/* ─────────────────────────── STAKE SELECTOR ─────────────────────────── */
/* Single horizontal pill, sits on the right of the chips bar.
   Layout: [STAKE] [WWB] 100 500 1k │ [PT] 100 500 1k                    */

.stake-selector{
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  flex-wrap: wrap;                                /* don't overflow on narrow viewports */
}
.ss-lbl{
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-right: 4px;
  font-size: 9.5px;
  font-weight: 700;
}
.ss-kind{
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 1px 5px;
  margin-right: 1px;
}
.ss-kind.wwb{
  color: var(--accent);
  background: var(--accent-dim);
}
.ss-kind.free{
  color: var(--up);
  background: var(--up-dim);
}
.ss-divider{
  width: 1px;
  height: 14px;
  background: var(--line-2);
  margin: 0 6px;
}
.ss-btn{
  padding: 3px 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--sub);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  min-width: 32px;
}
.ss-btn:hover{ color: var(--ink); }
.ss-btn.wwb.active{
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.ss-btn.free.active{
  background: var(--up);
  color: #00120c;
  border-color: var(--up);
}

/* ─────────────────────────── RESOLVED CARD STATE ─────────────────────────── */

.card.is-resolved{
  opacity: 0.72;
}
.card.is-resolved:hover{ opacity: 0.9; }
.card-resolved{
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  background: var(--brand-grad-90);
  color: #fff;
}

/* ─── Settled / paid-out panels ─── */
.fb-settled{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 0 4px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.fb-settled-outcome{
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.fb-settled-label{
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.fs-settled{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 2px;
}
.fs-settled-outcome{
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.fs-settled-label{
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.outcome-yes{ color: #14f195; }
.outcome-no { color: #ff3d5a; }
.outcome-tie{ color: var(--muted); }

/* ─────────────────────────── RESULT BANNER ─────────────────────────── */

.result-banner{
  margin: 12px auto 0;
  width: min(560px, 92%);
  pointer-events: auto;
  animation: rb-in .35s cubic-bezier(.22, 1, .36, 1);
}
@keyframes rb-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.rb-card{
  pointer-events: auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
  padding: 18px 24px 14px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  text-align: center;
}
.result-banner.won .rb-card{ border-color: var(--up); box-shadow: 0 0 24px rgba(20,241,149,0.25); }
.result-banner.lost .rb-card{ border-color: var(--dn); box-shadow: 0 0 24px rgba(239,83,80,0.25); }
.result-banner.tied .rb-card{ border-color: var(--accent); }
.rb-icon{
  font-size: 36px;
  line-height: 1;
  margin-bottom: 4px;
}
.rb-title{
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.rb-sub{
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.rb-amt{
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 4px;
}
.result-banner.won  .rb-amt{ color: var(--up); }
.result-banner.lost .rb-amt{ color: var(--dn); }
.result-banner.tied .rb-amt{ color: var(--sub); }
.rb-actions{
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px;
}
.rb-close{
  padding: 5px 14px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  cursor: pointer;
}
.rb-close:hover{ color: var(--ink); border-color: var(--line-2); }

.rb-countdown{
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.rb-countdown #rbCountdown{
  color: var(--ink);
  font-weight: 700;
}

/* Depleting progress bar at the bottom of the card */
.rb-progress{
  position: relative;
  width: 100%;
  height: 2px;
  margin-top: 12px;
  background: var(--line);
  overflow: hidden;
}
.rb-progress-fill{
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  /* Initial state: full width. The animation property is set inline by JS
     so it can be re-triggered every time the banner shows. */
}
.result-banner.won  .rb-progress-fill{ background: var(--up); }
.result-banner.lost .rb-progress-fill{ background: var(--dn); }
.result-banner.tied .rb-progress-fill{ background: var(--accent); }
@keyframes rb-deplete {
  from { width: 100%; }
  to   { width: 0%; }
}

/* ─────────────────────────── PORTFOLIO + LEADERBOARD ─────────────────────────── */

.me-stats{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.me-stat{
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
}
.me-stat .lbl{
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.me-stat .num{
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.pnl-pos{ color: var(--up); }
.pnl-neg{ color: var(--dn); }

.me-list{
  display: flex; flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.me-bet{
  display: grid;
  grid-template-columns: 60px 130px 1fr 90px 130px;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.me-bet:hover{ background: var(--surface-2); }
.me-bet-side{
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.me-bet-stake{ color: var(--ink); }
.me-bet-scope{ color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-bet-time{ color: var(--muted); font-size: 10px; }
.me-bet-status{ font-weight: 700; text-align: right; font-size: 10.5px; letter-spacing: 0.06em; }
.me-bet-status.pnl-pos{ color: var(--up); }
.me-bet-status.pnl-neg{ color: var(--dn); }

/* Leaderboard */
.lb-period{ display: flex; gap: 4px; }
.lb-period-btn{
  padding: 4px 12px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.lb-period-btn.active{ background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

.lb-list{
  display: flex; flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.lb-row{
  display: grid;
  grid-template-columns: 70px 1fr 200px 140px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
}
.lb-row:hover{ background: var(--surface-2); }
.lb-row.mine{ border-left: 3px solid var(--accent); }
.lb-rank{ font-size: 14px; font-weight: 700; color: var(--ink); }
.lb-user{ font-size: 13px; font-weight: 600; color: var(--ink); }
.lb-bets{ font-size: 11px; color: var(--muted); }
.lb-pnl{ text-align: right; font-size: 14px; font-weight: 700; }

@media (max-width: 760px) {
  .me-bet{ grid-template-columns: 1fr 1fr; gap: 6px; row-gap: 4px; }
  .me-bet-status{ text-align: left; }
  .lb-row{ grid-template-columns: 50px 1fr 110px; }
  .lb-bets{ display: none; }
}

/* ─────────────────────────── VOTE TICKER ─────────────────────────── */

/* News headline marquee */
.news-marquee{
  position: relative;
  height: 28px;
  overflow: hidden;
  background: rgba(220,38,38,.06);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid rgba(220,38,38,.18);
  padding: 0 12px;
  font-size: 11.5px;
  display: flex; align-items: center;
}
.news-marquee::before, .news-marquee::after{
  content: '';
  position: absolute; top: 0; bottom: 0; width: 40px;
  pointer-events: none; z-index: 1;
}
.news-marquee::before{ left: 0; background: linear-gradient(90deg, var(--bg) 0%, transparent 100%); }
.news-marquee::after { right: 0; background: linear-gradient(90deg, transparent 0%, var(--bg) 100%); }
.news-marquee-track{
  display: inline-flex; flex-shrink: 0;
  white-space: nowrap;
  animation: nm-marquee 90s linear infinite;
  will-change: transform;
}
.news-marquee:hover .news-marquee-track{ animation-play-state: paused; }
@keyframes nm-marquee{
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.nm-item{ display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; }
.nm-dot{ color: #dc2626; font-size: 7px; line-height: 1; }
.nm-title{ color: var(--ink); font-size: 11.5px; }
.nm-sep{ margin: 0 10px; color: var(--line-2); }

.vote-ticker{
  position: relative;
  height: 30px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(255,61,90,0.06), rgba(255,122,45,0.06));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
}
.vote-ticker::before, .vote-ticker::after{
  /* Side fades so items look like they emerge / disappear instead of cut off */
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  pointer-events: none;
  z-index: 1;
}
.vote-ticker::before{
  left: 0;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
}
.vote-ticker::after{
  right: 0;
  background: linear-gradient(90deg, transparent 0%, var(--bg) 100%);
}
.vote-ticker-track{
  display: inline-flex;
  flex-shrink: 0;
  white-space: nowrap;
  animation: tk-marquee 60s linear infinite;
  will-change: transform;
}
.vote-ticker:hover .vote-ticker-track{ animation-play-state: paused; }
@keyframes tk-marquee{
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.tk-item{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
}
.tk-addr{ color: var(--accent); font-weight: 700; font-size: 11px; }
.tk-verb{ color: var(--muted); }
.tk-side{ font-weight: 700; letter-spacing: 0.04em; font-size: 11px; }
.tk-side.tk-yes{ color: var(--up); }
.tk-side.tk-no { color: var(--dn); }
.tk-amt{ color: var(--muted); font-size: 11px; }
.tk-on{ color: var(--muted); }
.tk-title{ color: var(--ink); }
.tk-sep{ margin-right: 14px; color: var(--line-2); }
.tk-empty{
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 0 12px;
}

/* ─────────────────────────── DETAIL PANEL COMMENT COMPOSER ─────────────────────────── */

.dp-cmt-compose{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 10px;
}
.dp-cmt-compose input{
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 12px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
}
.dp-cmt-compose input:focus{ outline: none; border-color: var(--accent); }
.dp-cmt-send{
  background: var(--brand-grad-90);
  color: #fff;
  border: none;
  padding: 8px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.dp-cmt-send:hover{ filter: brightness(1.08); }
.dp-cmt-send:disabled{ opacity: 0.5; cursor: wait; }

/* ─────────────────────────── ADMIN DASHBOARD ─────────────────────────── */

.admin-body{ padding-bottom: 40px; }              /* no danmaku bar on admin */

/* Live markets — sortable table */
#liveList{
  /* Wrap so the table can horizontally scroll on tablets / phones rather
     than overflowing the viewport. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.live-table{
  width: 100%;
  min-width: 880px;                                /* keeps cells legible while scrolling */
  border-collapse: collapse;
  font-size: 12px;
}
.live-table thead th{
  text-align: left;
  padding: 8px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  text-transform: uppercase;
}
.live-row{
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  cursor: default;
}
.live-row.dragging{ opacity: 0.4; }
.live-row td{
  padding: 10px 10px;
  vertical-align: top;
}
.lr-handle{
  cursor: grab;
  user-select: none;
  text-align: center;
  font-size: 18px;
  color: var(--text-soft);
  width: 28px;
}
.lr-handle:active{ cursor: grabbing; }
.lr-rank{ width: 50px; color: var(--accent); font-weight: 700; font-size: 13px; }
.lr-img{ width: 70px; }
.lr-img-preview{
  width: 60px; height: 60px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: block;
}
.lr-img-empty{
  display: inline-block;
  width: 60px; height: 60px;
  border: 1px dashed var(--border);
  color: var(--text-soft);
  text-align: center;
  line-height: 60px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.lr-img-wrap{ position: relative; display: inline-block; }
.lr-img-tag{
  position: absolute;
  bottom: 2px; left: 2px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.04em;
  padding: 1px 4px;
  border-radius: 2px;
  pointer-events: none;
}
.lr-q-text{ font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.lr-q-meta{
  display: flex; gap: 6px; flex-wrap: wrap;
  font-size: 10px;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}
.lr-edit{ width: 280px; }
.lr-field{ display: flex; flex-direction: column; gap: 3px; margin-bottom: 6px; }
.lr-field > span{
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lr-input{
  background: #0e0e10;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 6px 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  width: 100%;
}
.lr-input:focus{ outline: none; border-color: var(--accent); }
.lr-textarea{
  resize: vertical;
  min-height: 44px;
  font-family: 'Inter', sans-serif;
}
.lr-input.lr-locked{
  opacity: 0.55;
  cursor: not-allowed;
  background: #16161a;
}
.lr-lock{
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 1px 6px;
  font-size: 11px;
  margin-left: 6px;
  cursor: pointer;
  border-radius: 3px;
  vertical-align: middle;
}
.lr-lock:hover{ border-color: var(--accent); color: var(--accent); }
/* Custom file picker — replaces the browser-locale "ファイルを選択" / "Choose File"
   text with one we fully control. The native input is overlaid on top of the
   styled button so clicking either opens the OS file dialog. */
.file-pick{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.file-pick-input{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.file-pick-btn{
  display: inline-block;
  background: var(--surface-2, #0e0e10);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 5px 10px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.file-pick:hover .file-pick-btn{
  border-color: var(--accent);
  color: var(--accent);
}
.file-pick-name{
  font-size: 11px;
  color: var(--text-soft);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}
.lr-actions{ width: 130px; display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
.lr-save{ font-size: 11px; padding: 6px 10px; }
.lr-resolve-row{ display: flex; gap: 3px; }
.btn-resolve.sm, .btn-unpublish.sm{
  flex: 1;
  padding: 4px 6px;
  font-size: 10px;
}
.live-row.drag-over{ outline: 2px dashed var(--accent); outline-offset: -2px; }

.live-tabs{
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.live-tab{
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 4px;
  transition: all .12s;
}
.live-tab:hover{ color: var(--text); border-color: var(--accent); }
.live-tab.active{
  background: var(--brand-grad-90);
  color: #fff;
  border-color: transparent;
}

.btn-pin{
  padding: 5px 9px;
  font-size: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  cursor: pointer;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.btn-pin:hover{ color: var(--text); border-color: var(--accent); }
.btn-pin.pinned{
  background: rgba(255,61,90,0.15);
  color: var(--accent);
  border-color: var(--accent);
}

/* Manual-add form */
.add-market-form{
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 12px;
}
.add-market-form .lr-field{ margin: 0; }
.add-market-form .full{ grid-column: 1 / -1; }
.add-market-form button{ align-self: end; }

/* Live header markets editor */
.hdr-cfg-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hdr-cfg-row{
  display: grid;
  grid-template-columns: 70px 90px 1fr 1.2fr 1.1fr 100px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.hdr-cfg-sym{
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.hdr-cfg-toggle{
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  cursor: pointer;
  user-select: none;
}
.hdr-cfg-toggle input{
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}
.hdr-cfg-field{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hdr-cfg-field > span{
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  text-transform: uppercase;
}
.hdr-cfg-field input{
  background: var(--surface-2, #0e0e10);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 9px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}
.hdr-cfg-field input:focus{
  outline: none;
  border-color: var(--accent);
}
.hdr-cfg-save{
  padding: 9px 14px;
  font-size: 12px;
  letter-spacing: 0.05em;
}
@media (max-width: 720px){
  .hdr-cfg-row{
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: 10px;
  }
  .hdr-cfg-sym, .hdr-cfg-save{ grid-column: 1 / -1; }
}

.admin-badge{
  margin-left: 6px;
  padding: 2px 8px;
  background: var(--brand-grad-90);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.admin-gate{
  max-width: 480px;
  margin: 80px auto 0;
  padding: 0 20px;
}
.gate-card{
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  display: flex; flex-direction: column;
  gap: 14px;
}
.gate-card h1{
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.gate-hint{
  font-size: 12px; color: var(--muted); line-height: 1.55;
}
.gate-hint code{
  font-family: 'JetBrains Mono', monospace;
  background: var(--surface-2);
  padding: 1px 5px;
  font-size: 11px;
  color: var(--accent);
}
.gate-card input{
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  outline: none;
  letter-spacing: 0.04em;
}
.gate-card input:focus{ border-color: var(--accent); }
.gate-err{
  color: var(--dn);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.btn-primary{
  padding: 9px 14px;
  background: var(--brand-grad-135);
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  margin-left: auto;                              /* push to right of section-head */
}
.btn-primary:hover{ filter: brightness(1.1); }
.btn-primary:disabled{ opacity: 0.5; cursor: wait; }

/* Draft + live cards */
.draft-card, .live-card{
  gap: 8px;
}
.draft-card .raw{
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
  display: flex; gap: 6px;
  padding: 6px 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.draft-card .raw-lbl{
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.draft-card .raw-text{
  color: var(--sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.draft-meta{
  display: flex; justify-content: space-between;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.draft-actions{
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
  align-items: stretch;
}
.btn-approve{
  padding: 9px 12px;
  background: var(--up);
  color: #00120c;
  border: 1px solid var(--up);
  font-family: inherit; font-size: 12px; font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.btn-approve:hover{ background: var(--up-hi); }
.btn-reject{
  padding: 9px 12px;
  background: transparent;
  color: var(--dn);
  border: 1px solid var(--dn);
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.btn-reject:hover{ background: var(--dn-dim); }
.btn-unpublish{
  padding: 7px 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  font-family: inherit; font-size: 11px; font-weight: 500;
  cursor: pointer;
  grid-column: span 1;
}
.btn-resolve{
  padding: 7px 10px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.btn-resolve:hover{ background: var(--accent); color: #fff; }
.btn-unpublish:hover{ color: var(--dn); border-color: var(--dn); }
.btn-sourcelink{
  display: inline-flex; align-items: center;
  padding: 9px 12px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.btn-sourcelink:hover{ border-color: var(--accent); }

.rejected-list{
  display: flex; flex-direction: column;
  gap: 1px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.rej-row{
  display: grid;
  grid-template-columns: 90px 1fr 80px;
  gap: 12px;
  padding: 8px 14px;
  font-size: 11.5px;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
}
.rej-row:last-child{ border-bottom: none; }
.rej-cat{
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rej-q{
  color: var(--sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rej-time{ color: var(--muted); font-size: 10px; text-align: right; }

/* ─────────────────────────── RESPONSIVE ─────────────────────────── */

@media (max-width: 1100px) {
  .hero-widget{ grid-template-columns: 1.4fr 1fr; }
  .hw-news-ticker{ display: none; }
  .hw-live-comments{ display: none; }
}
@media (max-width: 980px) {
  .hero-widget{ grid-template-columns: 1fr; }
  .hw-chart-pane{ border-right: none; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .topbar-inner{ padding: 10px 12px; flex-wrap: wrap; }
  .search{ order: 3; flex-basis: 100%; max-width: none; }
  .chips{ padding: 8px 12px; }
  .section{ padding: 0 12px; margin-top: 22px; }
  .hero-widget-wrap{ padding: 0 12px; gap: 4px; }
  .hw-arrow{ width: 32px; height: 32px; font-size: 18px; }
  .hw-price{ font-size: 24px; }
  .grid{ grid-template-columns: 1fr; }
  .colophon{ padding: 16px 12px 0; }
  .col-body{ flex-direction: column; gap: 8px; }
  .danmaku-bar{ padding: 8px 12px; }
  .danmaku-hint{ display: none; }
  .dm-context{ max-width: 70%; }
}

/* ── Watch-Ad overlay + Points-Convert dialog ─────────────────────── */
.ad-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.82);
  display: flex; align-items: center; justify-content: center;
}
.ad-overlay[hidden] { display: none; }
.ad-inner {
  background: var(--bg2); border: 1px solid var(--line);
  padding: 32px 28px; width: 320px; max-width: 94vw;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center;
}
.ad-title { font-size: 15px; font-weight: 600; letter-spacing: .03em; }
.ad-countdown-wrap { position: relative; width: 80px; height: 80px; }
.ad-ring { width: 80px; height: 80px; transform: rotate(-90deg); }
.ad-ring-bg   { fill: none; stroke: var(--border); stroke-width: 5; }
.ad-ring-fill { fill: none; stroke: var(--accent); stroke-width: 5;
                stroke-linecap: round; transition: stroke-dashoffset .9s linear; }
.ad-countdown { position: absolute; inset: 0; display: flex;
                align-items: center; justify-content: center;
                font-size: 26px; font-weight: 700; color: var(--fg); }
.ad-label { font-size: 12px; color: var(--muted); }
.ad-cancel { font-size: 12px; margin-top: 4px; }
.wm-watch-ad { width: 100%; margin-top: 6px; font-size: 13px; }

/* Poll pie chart */
canvas.poll-pie {
  flex-shrink: 0;
  border-radius: 50%;
  align-self: center;
}

/* Stock card logo thumb */
.card-thumb.stock-thumb {
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 4px;
}
.card-thumb.stock-thumb img {
  object-fit: contain;
}
.stock-thumb-letter {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  background: var(--surface-2); color: var(--fg);
  border-radius: 4px;
}

/* JP stock sparkline */
.jp-spark {
  display: block;
  width: 100%;
  height: 52px;
  margin: 6px 0 2px;
  border-radius: 4px;
}

/* ── Admin — daily poll cards ───────────────────────────────────────── */
#dailyAdminList { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.daily-admin-card {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 8px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.dac-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.dac-rank { font-size: 11px; color: var(--muted); min-width: 24px; }
.dac-cat {
  font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-dim,rgba(99,102,241,.12));
  padding: 2px 7px; border-radius: 4px;
}
.badge-resolved {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px;
  background: rgba(16,185,129,.15); color: #10b981;
}
.badge-open {
  font-size: 11px; padding: 2px 8px; border-radius: 4px;
  background: rgba(99,102,241,.12); color: var(--muted);
}
.dac-q { font-size: 13px; font-weight: 600; line-height: 1.4; }
.dac-reason { font-size: 11px; color: var(--muted); }
.dac-edit { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.dac-q-input, .dac-cat-input {
  width: 100%; font-size: 13px;
  background: var(--bg3,var(--bg)); border: 1px solid var(--line);
  color: var(--fg); border-radius: 5px; padding: 6px 10px;
  box-sizing: border-box;
}
.dac-actions {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px;
}
.dac-actions .btn-ghost {
  font-size: 12px; padding: 4px 10px;
}

/* ── Admin — featured market cards ─────────────────────────────────── */
.fad-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 8px;
}
.fad-thumb {
  width: 72px; height: 48px; object-fit: cover;
  border-radius: 5px; flex-shrink: 0;
}
.fad-thumb-placeholder {
  width: 72px; height: 48px; border-radius: 5px; flex-shrink: 0;
  background: var(--accent-dim,rgba(99,102,241,.15));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: var(--accent);
}
.fad-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fad-head { display: flex; align-items: center; gap: 6px; }
.fad-q { font-size: 13px; font-weight: 600; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─────────────────────────── GUIDE POPUP ─────────────────────────── */

.guide-overlay{
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 56px 16px 16px;
  backdrop-filter: blur(2px);
  animation: guideIn 0.18s ease;
}
@keyframes guideIn{
  from{ opacity: 0; }
  to  { opacity: 1; }
}
.guide-panel{
  width: 360px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 80px);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: guidePanelIn 0.2s cubic-bezier(.22,1,.36,1);
}
@keyframes guidePanelIn{
  from{ transform: translateY(-12px) scale(0.97); opacity: 0; }
  to  { transform: translateY(0) scale(1);        opacity: 1; }
}
.guide-header{
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.guide-title{
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg);
}
.guide-close{
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 20px; line-height: 1;
  padding: 0 2px; transition: color 0.15s;
}
.guide-close:hover{ color: var(--fg); }
.guide-body{
  overflow-y: auto; padding: 12px 16px 16px;
  display: flex; flex-direction: column; gap: 18px;
}
.guide-section{ display: flex; flex-direction: column; gap: 8px; }
.guide-section-title{
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 2px;
}
.guide-item{
  display: flex; gap: 10px; align-items: flex-start;
}
.guide-icon{
  font-size: 16px; line-height: 1.4; flex-shrink: 0; width: 22px;
  text-align: center;
}
.guide-item > div{
  font-size: 13px; color: var(--sub); line-height: 1.5;
}
.guide-item > div strong{
  color: var(--fg); font-weight: 600;
}

/* ============================================================
   2026-05-08 — first-visit guide popup, convert-points button,
   coming-soon button styling, daily-tickets note
   ============================================================ */

/* "Coming soon" disabled button — applied to the Watch Ad button while
   AdSense approval is pending. Greyed-out, not-allowed cursor, no hover. */
.coming-soon,
button.coming-soon{
  opacity: 0.55;
  cursor: not-allowed !important;
  pointer-events: auto;                     /* still receives clicks for toast */
  position: relative;
}
.coming-soon:hover,
button.coming-soon:hover{
  background: inherit !important;
  border-color: inherit !important;
  transform: none !important;
}

/* Daily-tickets note under the 🎫 row — small muted helper text. */
.wm-tickets-note{
  margin-top: -6px;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.wm-tickets-note .muted{ color: var(--sub); opacity: 0.78; }

/* Convert Points → WWB button inside the wallet menu. Visually pops to
   draw attention when points > 0. Uses kainos red→orange gradient. */
.wm-convert-points{
  width: 100%;
  margin: 4px 0 6px 0;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  background: linear-gradient(135deg, #ff3d5a, #ff7a2d);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.wm-convert-points:hover{
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.wm-convert-points:active{ transform: translateY(0); }

/* First-visit guide modal — same content as ⓘ guide, but with a
   kainos-red outline, slightly stronger backdrop, and a Got It footer
   button. Triggered only once per browser via localStorage flag. */
.guide-overlay.guide-firstvisit{
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.guide-overlay.guide-firstvisit .guide-panel{
  border: 2px solid #ff3d5a;
  box-shadow:
    0 0 0 1px rgba(255, 61, 90, 0.15),
    0 0 32px rgba(255, 61, 90, 0.32),
    0 12px 48px rgba(0, 0, 0, 0.65);
  animation: firstVisitPulse 2.4s ease-in-out infinite;
}
@keyframes firstVisitPulse{
  0%, 100% { box-shadow:
    0 0 0 1px rgba(255, 61, 90, 0.15),
    0 0 32px rgba(255, 61, 90, 0.32),
    0 12px 48px rgba(0, 0, 0, 0.65); }
  50%      { box-shadow:
    0 0 0 1px rgba(255, 61, 90, 0.25),
    0 0 48px rgba(255, 61, 90, 0.50),
    0 12px 56px rgba(0, 0, 0, 0.70); }
}

/* Banner shown only in first-visit mode — friendly intro line at top. */
.guide-firstvisit-banner{
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255, 61, 90, 0.18), rgba(255, 122, 45, 0.18));
  border-bottom: 1px solid rgba(255, 61, 90, 0.35);
  font-size: 13px;
  color: var(--fg);
  text-align: center;
}
.guide-firstvisit-banner strong{
  color: #ff7a2d;
  font-weight: 700;
}

/* Footer with "Got it" CTA — matches kainos red→orange gradient. */
.guide-footer{
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg2);
}
.guide-gotit{
  padding: 9px 22px;
  background: linear-gradient(135deg, #ff3d5a, #ff7a2d);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.guide-gotit:hover{ filter: brightness(1.08); transform: translateY(-1px); }
.guide-gotit:active{ transform: translateY(0); }

/* ============================================================
   Inline WWB pool display next to YES/NO % on every market card
   ============================================================ */
/* News + stock cards — appears at the right edge of the prob-pct row */
.prob-pct{
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}
.prob-pool{
  margin-left: auto;
  padding: 1px 6px;
  font-size: 11px;
  color: var(--sub);
  background: rgba(255, 122, 45, 0.08);
  border: 1px solid rgba(255, 122, 45, 0.22);
  border-radius: 2px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.prob-tickets{
  padding: 1px 6px;
  font-size: 11px;
  color: var(--sub);
  background: rgba(120, 180, 255, 0.06);
  border: 1px solid rgba(120, 180, 255, 0.22);
  border-radius: 2px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  margin-left: 4px;
}

/* Featured small card — slot inside the head row with the rank/category */
.fs-pct-pool{
  color: #ff7a2d;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Featured big + Daily big — line under "YES probability" label */
.fb-pct-pool{
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.fb-pct-pool strong{
  color: #ff7a2d;
  font-weight: 700;
}

/* ============================================================
   Guide carousel — ◀ ▶ navigation, page dots, per-slide layout
   ============================================================ */
.guide-carousel{
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  width: min(620px, 96vw);
}
.guide-step{
  margin-left: auto;
  margin-right: 14px;
  font-size: 11px;
  color: var(--sub);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.guide-stage{
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

.guide-arrow{
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
  margin: 16px 6px;
  height: 44px;
  align-self: center;
  border-radius: 50%;
}
.guide-arrow:hover{
  background: rgba(255, 61, 90, 0.10);
  border-color: #ff3d5a;
  color: #ff7a2d;
  transform: scale(1.06);
}
.guide-arrow:disabled{
  opacity: 0.28;
  cursor: not-allowed;
  transform: none;
  background: transparent;
  border-color: var(--border);
  color: var(--sub);
}

.guide-slides{
  position: relative;
  overflow: hidden;
  min-height: 380px;
  /* allow inner slides to handle their own vertical scroll */
}
.guide-slide{
  position: absolute;
  inset: 0;
  padding: 22px 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateX(28px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}
.guide-slide.active{
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.guide-slide-hero{
  font-size: 48px;
  line-height: 1;
  text-align: center;
  margin-bottom: 4px;
}
.guide-slide-title{
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  text-align: center;
  margin: 0;
  background: linear-gradient(90deg, #ff3d5a, #ff7a2d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.guide-slide-lead{
  font-size: 14px;
  color: var(--fg);
  line-height: 1.55;
  margin: 0;
  text-align: center;
}
.guide-slide-foot{
  font-size: 12px;
  color: var(--sub);
  line-height: 1.5;
  margin: 0;
  text-align: center;
}

.guide-slide-list{
  list-style: none;
  margin: 4px 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.guide-slide-list li{
  font-size: 13px;
  color: var(--sub);
  line-height: 1.5;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}
.guide-slide-list li strong{ color: var(--fg); font-weight: 600; }

/* Two-tile grid used on the bet-phase / lock-phase slide */
.guide-tile-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0;
}
.guide-tile{
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  font-size: 12px;
  color: var(--sub);
}
.guide-tile-icon{ font-size: 22px; line-height: 1; }
.guide-tile strong{ color: var(--fg); font-weight: 700; font-size: 13px; }

/* Payout math summary box */
.guide-payout-box{
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.guide-payout-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--sub);
}
.guide-payout-row .mono{ color: var(--fg); }

/* UP/DOWN/YES/NO color tags inside slide-lead */
.guide-slide-lead .up{ color: #1ec76a; }
.guide-slide-lead .dn{ color: #ff3d5a; }

/* Page dots — kainos red active, dim grey inactive */
.guide-dots{
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 14px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.guide-dot{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.guide-dot:hover{ background: #ff7a2d; }
.guide-dot.active{
  background: linear-gradient(135deg, #ff3d5a, #ff7a2d);
  transform: scale(1.4);
}

/* Got-it CTA inside last slide — keep the existing style but center it */
.guide-slide .guide-gotit{
  align-self: center;
  margin-top: 10px;
}

/* Mobile — collapse arrows under the slide so the panel uses full width */
@media (max-width: 520px){
  .guide-carousel{ width: 96vw; }
  .guide-stage{ grid-template-columns: 1fr; }
  .guide-arrow{ display: none; }            /* dots + swipe is enough */
  .guide-slide{ padding: 18px 16px 12px; }
  .guide-slides{ min-height: 320px; }
}

