/* KingBet — premium casino theme (dark + light) */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ============ Dark theme (default) ============ */
:root {
  --bg: #050505;
  --bg2: #0c0b09;
  --card-solid: #121110;
  --card2: #1c1a16;
  --line: rgba(255,255,255,0.07);
  --line-gold: rgba(212,167,64,0.35);
  --text: #f2f0eb;
  --muted: #94908a;
  --accent: #d9a62e;
  --accent2: #f5cd6d;
  --gold: #e8c464;
  --gold-deep: #b8860b;
  --gold-soft: rgba(232,196,100,0.13);
  --on-gold: #1a1403;
  --green: #2fd575;
  --red: #ff4d5e;
  --red-soft: #ff8f9a;
  --radius: 16px;

  /* surfaces & effects */
  --sheen: rgba(255,255,255,.03);
  --glass: rgba(6,6,8,.8);
  --tabbar-bg: rgba(9,9,12,.92);
  --panel-warm: #211804;
  --sessbar-grad: linear-gradient(120deg, rgba(40,29,6,.94), rgba(18,17,16,.94));
  --tot-bg: rgba(255,255,255,0.045);
  --tot-bg-on: rgba(255,255,255,0.07);
  --shadow: 0 10px 34px rgba(0,0,0,.55);
  --card-hover-shadow: 0 12px 30px rgba(0,0,0,.45);
  --bar-shadow: 0 8px 24px rgba(0,0,0,.4);
  --scroll-thumb: #33302a;
  --dot-off: #38332a;
  --fav-off: #3d3a33;
  --icon-off: #58534a;
  --wtext: #cbc7bd;
  --brand-bet: #ffffff;
  --brand-king-a: #f7d878;
  --brand-king-b: #b8860b;
  --chip-black: #1e1e22;
  --chip-black-line: #3a3a42;
  --tip-bg: rgba(12,10,5,.97);
  --tip-text: #efe8d2;
  --toast-bg: rgba(22,20,14,.96);
  --glow: .55;

  /* strategy line colors */
  --s-ab: #ff4d5e;
  --s-eo: #ffd23f;
  --s-rb: #f5f7fa;
  --s-lh: #4da3ff;

  /* canvas chart palette */
  --ch-grid: rgba(255,255,255,0.06);
  --ch-vgrid: rgba(255,255,255,0.05);
  --ch-label: rgba(255,255,255,0.45);
  --ch-axis: rgba(255,255,255,0.55);
  --ch-axis-text: rgba(255,255,255,0.8);
  --ch-zone1: rgba(216,166,46,0.10);
  --ch-zone2: rgba(216,166,46,0.07);
  --ch-zone-line: rgba(216,166,46,0.38);
  --ch-cross: rgba(255,255,255,0.55);
  --ch-tip-bg: rgba(12,10,5,0.94);
  --ch-tip-border: rgba(212,167,64,0.35);
  --ch-tip-sub: rgba(255,255,255,0.6);
  --ch-spark-zero: rgba(255,255,255,0.18);
}

/* ============ Light theme ============ */
:root[data-theme="light"] {
  --bg: #f7f5f0;
  --bg2: #fffdf9;
  --card-solid: #ffffff;
  --card2: #f1ece1;
  --line: rgba(0,0,0,0.10);
  --line-gold: rgba(150,105,10,0.32);
  --text: #16150f;
  --muted: #6b665d;
  --accent: #c9931f;
  --accent2: #eaba3c;
  --gold: #a87a0c;
  --gold-deep: #8a6208;
  --gold-soft: rgba(184,134,11,0.12);
  --on-gold: #241a02;
  --green: #0d8a46;
  --red: #d01f33;
  --red-soft: #b81f30;

  --sheen: rgba(255,255,255,0);
  --glass: rgba(250,248,243,.85);
  --tabbar-bg: rgba(252,250,246,.94);
  --panel-warm: #fdf4dd;
  --sessbar-grad: linear-gradient(120deg, rgba(253,244,221,.96), rgba(255,255,255,.96));
  --tot-bg: rgba(0,0,0,0.04);
  --tot-bg-on: rgba(0,0,0,0.06);
  --shadow: 0 10px 30px rgba(90,70,20,.13);
  --card-hover-shadow: 0 12px 26px rgba(90,70,20,.15);
  --bar-shadow: 0 8px 20px rgba(90,70,20,.12);
  --scroll-thumb: #d3ccbd;
  --dot-off: #d8d1c3;
  --fav-off: #c4bdae;
  --icon-off: #a49c8c;
  --wtext: #4a463e;
  --brand-bet: #16150f;
  --brand-king-a: #d9a62e;
  --brand-king-b: #8a6208;
  --chip-black: #24242a;
  --chip-black-line: #3f3f48;
  --tip-bg: rgba(28,24,14,.96);
  --tip-text: #f6efdc;
  --toast-bg: rgba(255,253,248,.97);
  --glow: 0;

  --s-ab: #d81f33;
  --s-eo: #9e7200;
  --s-rb: #2b2b30;
  --s-lh: #1a67c7;

  --ch-grid: rgba(0,0,0,0.07);
  --ch-vgrid: rgba(0,0,0,0.05);
  --ch-label: rgba(0,0,0,0.45);
  --ch-axis: rgba(0,0,0,0.5);
  --ch-axis-text: rgba(0,0,0,0.75);
  --ch-zone1: rgba(184,134,11,0.13);
  --ch-zone2: rgba(184,134,11,0.08);
  --ch-zone-line: rgba(184,134,11,0.45);
  --ch-cross: rgba(0,0,0,0.5);
  --ch-tip-bg: rgba(255,253,247,0.97);
  --ch-tip-border: rgba(150,105,10,0.4);
  --ch-tip-sub: rgba(0,0,0,0.55);
  --ch-spark-zero: rgba(0,0,0,0.2);
}

html, body { height: 100%; }
body {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(216,166,46,.1) 0%, transparent 55%),
    radial-gradient(900px 500px at -10% 15%, rgba(216,166,46,.05) 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .3s ease, color .3s ease;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
b { color: var(--text); }

/* ---------- icons (SVG sprite, наследуют currentColor) ---------- */
.ico { vertical-align: -0.16em; flex-shrink: 0; }
/* кнопки только с иконкой */
#detailBack, #detailFav, #favFilter { display: flex; align-items: center; justify-content: center; }
button .ico, .advice-bet .ico, h3 .ico { pointer-events: none; }
.empty .big .ico { color: var(--gold); opacity: .55; }
.advice-reason .ico { color: var(--gold); }
.confirm-warn .ico { color: var(--gold); }
.toast .ico { color: var(--gold); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- tooltips (JS-движок: прижим к краям экрана + long-press) ---------- */
.rr-tip {
  position: fixed; z-index: 600;
  background: var(--tip-bg);
  border: 1px solid var(--line-gold);
  color: var(--tip-text); padding: 8px 12px; border-radius: 10px;
  font-size: 11.5px; font-weight: 500; line-height: 1.5; text-align: left;
  max-width: min(250px, calc(100vw - 16px));
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  animation: tipIn .15s ease;
}
@keyframes tipIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ---------- Welcome ---------- */
.welcome {
  position: fixed; inset: 0; z-index: 100;
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--panel-warm) 0%, transparent 60%),
    radial-gradient(800px 400px at 50% 110%, rgba(232,196,100,.08) 0%, transparent 60%),
    var(--bg);
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto;
}
.welcome-inner { max-width: 420px; width: 100%; padding: 32px 22px; text-align: center; }
.welcome-logo {
  position: relative; display: flex; justify-content: center; margin-bottom: 2px;
  animation: floaty 3.6s ease-in-out infinite;
  filter: drop-shadow(0 10px 26px rgba(216,166,46,.5));
}
/* золотое сияние за короной */
.welcome-logo::before {
  content: ''; position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
  width: 220px; height: 160px; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(232,196,100,.32), rgba(232,196,100,.08) 55%, transparent 72%);
  animation: haloPulse 3.6s ease-in-out infinite;
}
@keyframes haloPulse { 0%,100% { opacity: .75; transform: translate(-50%,-50%) scale(1); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.1); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.welcome h1 { margin-bottom: 10px; }
.brand-rule {
  width: 168px; height: 2px; margin: 2px auto 20px;
  background: linear-gradient(90deg, transparent, var(--gold) 22%, #fff3c4 50%, var(--gold) 78%, transparent);
  border-radius: 2px; opacity: .85;
}
.wslide {
  display: none; text-align: left;
  background: linear-gradient(165deg, var(--sheen), transparent 45%), var(--card-solid);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-height: 300px;
  box-shadow: var(--shadow);
}
.wslide.active { display: block; animation: fadeIn .35s ease; }
.wslide h2 { font-size: 18px; margin-bottom: 12px; color: var(--gold); letter-spacing: .3px; }
.wslide p { margin-bottom: 10px; line-height: 1.55; color: var(--wtext); }
.strat-legend { display: flex; flex-direction: column; gap: 7px; margin: 12px 0; }
.strat-legend span { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.strat-legend i { width: 20px; height: 4px; border-radius: 2px; display: inline-block; }
.welcome-dots { margin: 18px 0; display: flex; gap: 7px; justify-content: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot-off); transition: .25s; }
.dot.active { background: linear-gradient(90deg, var(--accent), var(--gold)); width: 24px; border-radius: 5px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons / inputs ---------- */
.btn {
  border: 1px solid var(--line); background: var(--card2); color: var(--text);
  border-radius: 12px; padding: 9px 16px; font-size: 14px; cursor: pointer;
  transition: transform .12s, border-color .2s, box-shadow .2s, background-color .2s; font-family: inherit;
  position: relative; overflow: hidden;
}
.btn:hover { border-color: var(--line-gold); }
.btn:active { transform: scale(.965); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent2), var(--gold-deep)); border: none;
  color: var(--on-gold); font-weight: 750;
  box-shadow: 0 6px 20px rgba(216,166,46,.3);
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-20deg); transition: left .5s ease;
}
.btn-primary:hover::after { left: 130%; }
.btn-lg { width: 100%; padding: 13px; font-size: 16px; }
.btn-ghost { background: transparent; }
.btn-danger { background: linear-gradient(135deg, #e0384a, #a01f2e); border: none; color: #fff; font-weight: 650; box-shadow: 0 6px 18px rgba(224,56,74,.28); }
.btn-success { background: linear-gradient(135deg, #23b566, #148a49); border: none; color: #fff; font-weight: 650; box-shadow: 0 6px 18px rgba(35,181,102,.3); }

.select, .input {
  background: var(--card-solid); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 12px; font-size: 14px; font-family: inherit;
  outline: none; min-width: 0; transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(216,166,46,.16); }

.pill {
  display: inline-block; padding: 2.5px 10px; border-radius: 20px; font-size: 11.5px;
  background: var(--card2); border: 1px solid var(--line); color: var(--muted);
}
.pill.hot { background: rgba(224,40,60,.12); color: var(--red-soft); border-color: rgba(224,40,60,.32); }
.pill.warm { background: var(--gold-soft); color: var(--gold); border-color: var(--line-gold); }
.pill.live {
  background: rgba(30,170,90,.12); color: var(--green); border-color: rgba(30,170,90,.35);
  animation: livePulse 2.4s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(47,213,117,.25); } 50% { box-shadow: 0 0 10px 1px rgba(47,213,117,.2); } }

/* ---------- App shell ---------- */
.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px 11px; border-bottom: 1px solid var(--line);
  background: var(--glass); backdrop-filter: blur(12px);
}
.app-title { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 19px; letter-spacing: 1.2px; }
.brand-crown {
  filter: drop-shadow(0 2px 7px rgba(216,166,46,.6));
  animation: crownGlow 3.6s ease-in-out infinite;
}
@keyframes crownGlow {
  0%,100% { filter: drop-shadow(0 2px 7px rgba(216,166,46,.45)); }
  50%     { filter: drop-shadow(0 2px 12px rgba(232,196,100,.85)); }
}
/* «KING» — вертикальный металлический градиент как на логотипе + бегущий блик */
.brand-king {
  background-image:
    linear-gradient(102deg, transparent 42%, rgba(255,255,255,.7) 50%, transparent 58%),
    linear-gradient(180deg, #f6dd93 0%, #e9c359 26%, #d9a62e 52%, #f0d179 68%, #a5760a 100%);
  background-size: 300% 100%, 100% 100%;
  background-position: 300% center, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brandShimmer 6s linear infinite;
}
@keyframes brandShimmer {
  0%   { background-position: 300% center, 0 0; }
  100% { background-position: -60% center, 0 0; }
}
/* в светлой теме блик не должен уходить в белый — иначе буквы пропадают на фоне */
:root[data-theme="light"] .brand-king {
  background-image:
    linear-gradient(102deg, transparent 42%, rgba(255,240,190,.55) 50%, transparent 58%),
    linear-gradient(180deg, #d9a62e 0%, #bd8a15 30%, #a87a0c 60%, #c9931f 76%, #7a5606 100%);
}
.brand-bet { color: var(--brand-bet); margin-left: 5px; }
/* крупный логотип на приветственном экране: пропорции как в исходном логотипе —
   корона примерно вдвое уже надписи */
.brand-lg { font-size: 56px; letter-spacing: .5px; font-weight: 900; line-height: 1.02; }
.brand-lg .brand-bet { margin-left: 8px; }
.welcome-logo svg { width: 132px; height: 77px; }
@media (max-width: 380px) {
  .brand-lg { font-size: 48px; }
  .welcome-logo svg { width: 114px; height: 66px; }
}
.live-dot { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--green); font-weight: 700; letter-spacing: .8px; }
.live-dot span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: blink 1.4s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

#views { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.view { padding: 12px 12px 24px; animation: viewIn .28s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.tabbar {
  display: flex; border-top: 1px solid var(--line);
  background: var(--tabbar-bg); backdrop-filter: blur(12px);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; background: none; border: none; color: var(--muted); font-size: 10.5px;
  padding: 9px 2px 10px; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 3px; font-family: inherit; transition: .2s; position: relative;
}
.tab::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%) scaleX(0);
  width: 34px; height: 2.5px; border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: transform .25s ease;
}
.tab.active::before { transform: translateX(-50%) scaleX(1); }
.tab-ico { display: flex; opacity: .5; transition: .2s; }
.tab-ico svg { display: block; }
.tab.active { color: var(--gold); }
.tab.active .tab-ico { opacity: 1; transform: translateY(-1px); }

/* ---------- Session mini-bar (tables tab) ---------- */
.sessbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--sessbar-grad);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-gold); border-left: 3px solid var(--gold);
  border-radius: 13px; padding: 9px 12px; margin-bottom: 12px; cursor: pointer;
  box-shadow: var(--bar-shadow);
  animation: fadeIn .3s ease; transition: border-color .2s;
}
.sessbar:hover { border-color: var(--gold); }
.sessbar-left { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.sessbar-lbl { font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px; color: var(--gold); }
.sessbar-bal { font-size: 17px; font-weight: 800; }
.sessbar-bal.up, .sessbar-pl.up { color: var(--green); }
.sessbar-bal.down, .sessbar-pl.down { color: var(--red); }
.sessbar-pl { font-size: 12px; font-weight: 700; }
.sessbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sessbar-go { display: flex; color: var(--gold); margin-left: 2px; }

.bump { animation: bumpAnim .5s ease; }
@keyframes bumpAnim { 0% { transform: scale(1); } 35% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ---------- Toolbar / cards ---------- */
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; padding: 0 2px; }
.toolbar .select { flex: 1; }
#favFilter { color: var(--icon-off); }
#favFilter.on { color: var(--gold); border-color: var(--gold); }

.cards { display: flex; flex-direction: column; gap: 11px; }
.tcard {
  background: linear-gradient(165deg, var(--sheen), transparent 45%), var(--card-solid);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px; cursor: pointer;
  transition: transform .22s ease, border-color .22s, box-shadow .22s;
  animation: fadeIn .3s ease;
}
.tcard:hover {
  transform: translateY(-2px);
  border-color: var(--line-gold);
  box-shadow: var(--card-hover-shadow);
}
.tcard-top { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.tcard-name { font-weight: 750; font-size: 15px; flex: 1; letter-spacing: .2px; }
.tcard-fav { display: flex; background: none; border: none; color: var(--fav-off); cursor: pointer; padding: 3px 5px; transition: transform .15s, color .2s; }
.tcard-fav:hover { transform: scale(1.2); }
.tcard-fav.on { color: var(--gold); }
.tcard-mid { display: flex; gap: 12px; align-items: center; }
.tcard-spark { flex: 1; height: 62px; min-width: 0; }
.tcard-spark canvas { width: 100%; height: 62px; display: block; }
.tcard-tots { display: flex; flex-direction: column; gap: 3px; min-width: 96px; align-items: flex-end; }
.tots-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 2px; }
.tot {
  font-size: 12px; font-weight: 800; letter-spacing: .2px;
  background: var(--tot-bg); border: 1px solid transparent;
  border-radius: 7px; padding: 2.5px 8px; white-space: nowrap; transition: .2s;
}
.tot .lbl { opacity: .78; font-weight: 700; }
.tot-active { border-color: currentColor; background: var(--tot-bg-on); }
.tcard-desc { margin-top: 9px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.tcard-nums { display: flex; gap: 4.5px; margin-top: 9px; flex-wrap: wrap; }
.numchip {
  width: 25px; height: 25px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 750; color: #fff;
  background-image: radial-gradient(circle at 32% 28%, rgba(255,255,255,.28), transparent 55%);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.25);
}
.numchip.red { background-color: #c92a3a; }
.numchip.black { background-color: var(--chip-black); border: 1px solid var(--chip-black-line); }
.numchip.green { background-color: #1d9e57; }
.numchip.big { width: 31px; height: 31px; font-size: 13px; }

/* ---------- Overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  display: flex; flex-direction: column; animation: overlayIn .25s ease;
}
@keyframes overlayIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
.overlay-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px);
}
.overlay-title { flex: 1; font-weight: 750; font-size: 15px; }
.overlay-body { flex: 1; overflow-y: auto; padding: 12px; }
#detailFav { color: var(--icon-off); }
#detailFav.on { color: var(--gold); }

/* ---------- Chart block ---------- */
.chart-box {
  background: linear-gradient(165deg, var(--sheen), transparent 40%), var(--bg2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 6px 6px; margin-bottom: 12px;
}
.chart-controls { display: flex; gap: 6px; padding: 0 6px 8px; align-items: center; flex-wrap: wrap; }
.chart-controls .spacer { flex: 1; }
.seg { display: flex; background: var(--card2); border-radius: 10px; padding: 3px; border: 1px solid var(--line); }
.seg button {
  background: none; border: none; color: var(--muted); font-size: 12px; padding: 5px 12px;
  border-radius: 8px; cursor: pointer; font-family: inherit; transition: .2s;
}
.seg button.on { background: linear-gradient(135deg, var(--accent2), var(--accent)); color: var(--on-gold); font-weight: 750; }
.zoom-btns { display: flex; gap: 4px; }
.zoom-btns .btn { display: flex; align-items: center; padding: 6px 10px; color: var(--muted); }
.zoom-btns .btn:hover { color: var(--gold); }
.strat-toggles { display: flex; gap: 5px; flex-wrap: wrap; padding: 6px 6px 2px; }
.strat-toggle {
  border: 1.5px solid; background: transparent; border-radius: 20px; padding: 4.5px 12px;
  font-size: 12px; cursor: pointer; font-weight: 650; font-family: inherit; opacity: .38;
  transition: opacity .2s, transform .15s;
}
.strat-toggle:hover { transform: translateY(-1px); }
.strat-toggle.on { opacity: 1; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 12px; }
.info-cell {
  background: linear-gradient(165deg, var(--sheen), transparent 50%), var(--card-solid);
  border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px;
}
.info-cell .k { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.info-cell .v { font-size: 15px; font-weight: 750; }

.strat-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.strat-table td, .strat-table th { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.strat-table th { color: var(--muted); font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .6px; }

/* ---------- Session ---------- */
.form-card {
  background: linear-gradient(165deg, var(--sheen), transparent 45%), var(--card-solid);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; margin-bottom: 12px;
}
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 650; }
.form-row .input, .form-row .select { width: 100%; }

.sess-head {
  background:
    radial-gradient(400px 160px at 90% -30%, rgba(232,196,100,.1), transparent 60%),
    linear-gradient(160deg, var(--panel-warm), var(--card-solid));
  border: 1px solid var(--line-gold);
  border-radius: var(--radius); padding: 15px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.sess-head-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sess-balance { font-size: 27px; font-weight: 800; letter-spacing: .3px; transition: color .3s; }
.sess-balance.up { color: var(--green); }
.sess-balance.down { color: var(--red); }
.sess-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.sess-stats { display: flex; gap: 14px; margin-top: 9px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.sess-stats b { font-size: 14px; }

.advice-card {
  background: linear-gradient(165deg, var(--sheen), transparent 45%), var(--card-solid);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 13px; margin-bottom: 11px;
  transition: border-color .25s, box-shadow .25s;
  animation: fadeIn .3s ease;
}
.advice-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.advice-bet {
  font-weight: 800; font-size: 15px; padding: 5px 13px; border-radius: 10px;
  border: 1.5px solid; display: inline-flex; gap: 6px; align-items: center;
  background: var(--tot-bg);
}
.arm-bar { height: 6px; background: var(--card2); border-radius: 3px; overflow: hidden; margin: 9px 0 7px; }
.arm-bar i {
  display: block; height: 100%; border-radius: 3px; transition: width .4s ease;
  background: repeating-linear-gradient(100deg, var(--accent) 0 12px, var(--accent2) 12px 24px);
  background-size: 200% 100%; animation: stripes 1.6s linear infinite;
}
@keyframes stripes { to { background-position: -34px 0; } }
.advice-reason { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 5px; }
.advice-chart { margin-top: 10px; }
.advice-chart canvas { width: 100%; display: block; }
.advice-stats { display: flex; gap: 12px; margin-top: 9px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }

.confirm-card {
  background:
    radial-gradient(350px 130px at 100% 0%, rgba(232,196,100,.09), transparent 60%),
    linear-gradient(160deg, var(--panel-warm), var(--card-solid));
  border: 1px solid var(--line-gold); border-radius: var(--radius);
  padding: 15px; margin-bottom: 12px; animation: fadeIn .3s ease;
  box-shadow: var(--shadow);
}
.confirm-card h3 { font-size: 15px; margin-bottom: 10px; letter-spacing: .2px; }
.confirm-warn {
  background: var(--gold-soft); border: 1px solid var(--line-gold);
  border-radius: 11px; padding: 10px 12px; font-size: 12px; color: var(--gold);
  line-height: 1.55; margin: 11px 0;
}
/* мелкий текст на золотой подложке в светлой теме нужен темнее */
:root[data-theme="light"] .confirm-warn { color: var(--gold-deep); }
:root[data-theme="light"] .pill.warm { color: var(--gold-deep); }
.confirm-actions { display: flex; gap: 8px; margin-top: 12px; }
.confirm-actions .btn { flex: 1; }
.detail-actions { margin-bottom: 12px; }
.detail-actions > .btn { width: 100%; }

.flash-win { animation: flashWin 1s ease; }
.flash-lose { animation: flashLose 1s ease; }
@keyframes flashWin { 0% { box-shadow: 0 0 0 2px var(--green); } 100% { box-shadow: none; } }
@keyframes flashLose { 0% { box-shadow: 0 0 0 2px var(--red); } 100% { box-shadow: none; } }

/* ---------- History / ratings ---------- */
.hist-card {
  background: linear-gradient(165deg, var(--sheen), transparent 45%), var(--card-solid);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
  animation: fadeIn .3s ease;
}
.hist-top { display: flex; justify-content: space-between; margin-bottom: 6px; align-items: center; }
.hist-profit { font-weight: 800; font-size: 17px; }
.rating-row {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(165deg, var(--sheen), transparent 50%), var(--card-solid);
  border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; margin-bottom: 8px; cursor: pointer;
  transition: transform .2s, border-color .2s;
  animation: fadeIn .3s ease;
}
.rating-row:hover { transform: translateX(3px); border-color: var(--line-gold); }
.rating-pos { font-size: 15px; font-weight: 800; color: var(--muted); width: 26px; }
.rating-pos.top { color: var(--gold); }
.rating-bar { flex: 1; height: 5px; background: var(--card2); border-radius: 3px; overflow: hidden; }
.rating-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 3px; }

/* ---------- Profile ---------- */
.currency-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cur-btn {
  background: var(--card2); border: 1.5px solid var(--line); border-radius: 13px; padding: 13px 6px;
  color: var(--text); cursor: pointer; font-family: inherit; text-align: center;
  transition: transform .18s, border-color .2s, background-color .2s;
}
.cur-btn:hover { transform: translateY(-2px); }
.cur-btn.on { border-color: var(--gold); background: var(--gold-soft); }
.cur-sym { font-size: 23px; font-weight: 800; display: block; }
.cur-name { font-size: 10.5px; color: var(--muted); }

/* theme switcher */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-btn {
  background: var(--card2); border: 1.5px solid var(--line); border-radius: 13px;
  padding: 12px 6px 10px; color: var(--text); cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  transition: transform .18s, border-color .2s, background-color .2s;
}
.theme-btn:hover { transform: translateY(-2px); }
.theme-btn.on { border-color: var(--gold); background: var(--gold-soft); }
.theme-btn .swatch {
  width: 100%; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; gap: 3px; overflow: hidden;
}
.theme-btn .swatch i { width: 7px; height: 14px; border-radius: 2px; display: block; }
.swatch-dark { background: #0a0a0a; }
.swatch-light { background: #f7f5f0; }
.swatch-auto { background: linear-gradient(100deg, #0a0a0a 50%, #f7f5f0 50%); }
.theme-btn .lbl2 { font-size: 11px; color: var(--muted); font-weight: 650; }
.theme-btn.on .lbl2 { color: var(--text); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 500; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: var(--toast-bg); backdrop-filter: blur(8px); color: var(--text);
  border: 1px solid var(--line-gold); border-radius: 13px;
  padding: 12px 15px; font-size: 13px; line-height: 1.45; animation: toastIn .3s cubic-bezier(.2,.9,.3,1.2);
  box-shadow: var(--shadow);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.97); } to { opacity: 1; transform: none; } }

.empty { text-align: center; color: var(--muted); padding: 44px 20px; line-height: 1.65; animation: fadeIn .3s ease; }
.empty .big { display: flex; justify-content: center; margin-bottom: 12px; }

@media (min-width: 700px) {
  .view, .overlay-body { max-width: 640px; margin: 0 auto; width: 100%; }
  .overlay-head { max-width: 640px; margin: 0 auto; width: 100%; }
}
