/* NovaLotto — original theme: deep indigo + gold */
:root {
  --ink: #16133a;
  --ink-2: #2a2566;
  --brand: #4c3fd1;
  --gold: #f5b301;
  --gold-2: #ffd257;
  --bg: #f4f3fb;
  --card: #ffffff;
  --text: #1c1a33;
  --muted: #6b6886;
  --line: #e4e2f2;
  --ok: #12936b;
  --bad: #d23a4b;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(22, 19, 58, .08);
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; font-size: 15px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(24px, 4vw, 40px); }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }
.inline { display: inline; margin: 0; }
.big { font-size: 22px; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.win { color: var(--ok); }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 999px; font: 600 14px var(--font);
  transition: transform .08s, filter .15s; text-decoration: none !important; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--ink); }
.btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5); }
.btn--ghost-dark { background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--lg { padding: 13px 26px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }

/* ---------- top bar ---------- */
.topbar { background: #fff; color: #14233c; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 12px #17233c20; }
.topbar__inner { display: flex; align-items: center; gap: 24px; min-height: 68px; max-width: 1280px; }
.topbar .brand { color: inherit; min-width: 0; flex: none; }
.topbar .brand__mark { flex: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 20px; letter-spacing: .3px; text-decoration: none !important; }
.brand__mark { width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--gold-2), var(--gold) 55%, #b88300); box-shadow: inset 0 0 0 6px rgba(22,19,58,.0), 0 0 0 3px rgba(245,179,1,.25); position: relative; }
.brand__mark::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--ink); }
.nav, .nav__primary, .nav__account { display: flex; align-items: center; gap: 6px; }
.nav { flex: 1; justify-content: space-between; min-width: 0; gap: 12px; }
.nav__link { color: #14233c; padding: 8px 10px; font-size: 14px; white-space: nowrap; text-decoration: none !important; }
.nav__link:hover, .nav__link.is-active { color: #c91843; }
.nav__primary .nav__link { display: inline-flex; align-items: center; min-height: 68px; border-bottom: 3px solid transparent; }
.nav__primary .nav__link.is-active { border-color: #e61f4d; }
.nav__btn { background: none; border: 0; cursor: pointer; }
.nav__nickname { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; text-decoration: none !important; }
.pill--gold { background: rgba(245,179,1,.14); color: var(--gold-2); box-shadow: inset 0 0 0 1px rgba(245,179,1,.4); }
.nav__balance { background: #f2f4f7; color: #14233c; white-space: nowrap; }
.nav__action { background: #d51d48; white-space: nowrap; }
.lang { position:relative; margin-left:6px; font-size:13px; white-space:nowrap; }
.lang summary { cursor:pointer; padding:6px 10px; border:1px solid #dfe6f1; border-radius:18px; color:#14233c; }
.lang__options { position:absolute; z-index:1; top:calc(100% + 6px); right:0; min-width:130px; background:#fff; border:1px solid #dfe6f1; border-radius:10px; padding:5px; box-shadow:0 6px 16px #17233c20; }
.lang__options a { display:block; color:#44536a; padding:6px 10px; border-radius:6px; }
.lang__options a:hover, .lang__options a[aria-current] { color:#132e68; background:#eaf0fa; text-decoration:none; }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; background: #f2f4f7; border: 0; border-radius: 50%; color: inherit; font-size: 22px; cursor: pointer; }
.notice-bar { background: #f7f8fa; color: #475569; font-size: 13px; padding: 6px 0; }
.notice-bar .wrap { max-width: 1280px; }

@media (max-width: 1080px) {
  .nav-toggle { display: block; flex: none; }
  .nav { display: none; position: absolute; top: 100%; inset-inline: 0; background: #fff; box-shadow: 0 6px 12px #17233c20; flex-direction: column; align-items: stretch; padding: 12px 16px 16px; max-height: calc(100dvh - 68px); overflow: auto; }
  .nav.is-open { display: flex; }
  .nav__primary, .nav__account { flex-wrap: wrap; }
  .nav__primary .nav__link { min-height: 44px; }
  .nav__account { border-top: 1px solid #e8edf4; padding-top: 10px; }
  .lang[open] { flex-basis:100%; }
  .lang__options { position:static; display:flex; flex-wrap:wrap; margin-top:6px; box-shadow:none; }
}

/* ---------- alerts / tags ---------- */
.alert { padding: 12px 14px; border-radius: 10px; margin: 14px 0; font-size: 14px; }
.alert--success { background: #e6f7f0; color: #0b6b4e; }
.alert--error { background: #fdecee; color: #a52434; }
.alert--info { background: #eef0ff; color: #3730a3; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: #eceaf6; color: var(--muted); white-space: nowrap; }
.tag--won, .tag--paid, .tag--settled, .tag--approved { background: #e1f6ee; color: #0b6b4e; }
.tag--pending, .tag--fetched, .tag--open { background: #fff4d6; color: #8a5a00; }
.tag--lost, .tag--failed, .tag--void, .tag--rejected { background: #f0eef5; color: #77738f; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(1200px 400px at 80% -10%, #5b4cf0 0%, transparent 60%), linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%); color: #fff; padding: 56px 0 64px; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--gold-2); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 12px; margin: 0 0 10px; }
.hero__lead { color: rgba(255,255,255,.78); font-size: 17px; max-width: 520px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.jackpot-card { --accent: var(--brand); display: flex; flex-direction: column; gap: 6px; padding: 28px; border-radius: 22px; color: #fff; text-decoration: none !important;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 70%, #000 0%), color-mix(in srgb, var(--accent) 45%, var(--ink) 55%));
  box-shadow: 0 20px 60px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.12); }
.jackpot-card__name { font-weight: 700; font-size: 18px; }
.jackpot-card__label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; opacity: .8; }
.jackpot-card__amount { font-size: clamp(28px, 5vw, 44px); font-weight: 900; color: var(--gold-2); line-height: 1.1; }
.jackpot-card__amount small { font-size: 16px; color: #fff; }
.jackpot-card__meta { font-size: 13px; opacity: .8; }
@media (max-width: 860px) { .hero__inner { grid-template-columns: 1fr; } .hero { padding: 36px 0 44px; } }

.countdown { display: inline-flex; gap: 6px; font-variant-numeric: tabular-nums; }
.countdown b { display: inline-flex; flex-direction: column; align-items: center; min-width: 46px; padding: 6px 4px; border-radius: 10px; background: rgba(0,0,0,.25); font-size: 20px; }
.countdown b small { font-size: 10px; font-weight: 400; opacity: .75; }
.countdown--sm b { min-width: 34px; font-size: 14px; padding: 4px 3px; background: #efedf9; color: var(--ink-2); }

/* ---------- sections & cards ---------- */
.section { padding: 36px 16px; }
.section--alt { background: #fff; padding: 48px 0; }
.section__head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.grid { display: grid; gap: 18px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; min-width: 0; }
.card h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }

.lot-card { --accent: var(--brand); background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 14px; border-top: 4px solid var(--accent); }
.lot-card__top { display: flex; gap: 12px; align-items: center; }
.lot-card__top h3 { margin: 0; font-size: 18px; }
.lot-card__ball { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 20px;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 60%, #fff), var(--accent)); flex: none; }
.lot-card__jackpot strong { display: block; font-size: 26px; color: var(--ink); }
.lot-card__next, .lot-card__last { display: flex; flex-direction: column; gap: 6px; }
.lot-card .btn { margin-top: auto; }

.steps { text-align: center; margin-top: 24px; }
.step__n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 900; font-size: 20px; margin-bottom: 10px; }

/* ---------- balls ---------- */
.balls { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ball { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff, #e7e5f3); box-shadow: inset 0 -2px 0 rgba(0,0,0,.08); font-variant-numeric: tabular-nums; }
.ball--special { background: radial-gradient(circle at 35% 30%, #ffe08a, var(--gold)); }
.balls--sm .ball { width: 26px; height: 26px; font-size: 12px; }
.ball.is-hit { background: radial-gradient(circle at 35% 30%, #7ff0c5, var(--ok)); color: #fff; }
.ball.is-miss { opacity: .45; }

/* ---------- page head / tables ---------- */
.page-head { --accent: var(--brand); background: linear-gradient(160deg, var(--ink), var(--ink-2)); color: #fff; padding: 28px 0; border-bottom: 4px solid var(--accent); }
.page-head h1 { margin: 6px 0 4px; }
.page-head .muted, .page-head a { color: rgba(255,255,255,.7); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.table th.right, .table td.right { text-align: right; }
.table--compact th, .table--compact td { padding: 7px 6px; }
.row-win { background: #f1fbf6; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; }
.addr { word-break: break-all; }
@media (max-width: 640px) { .hide-sm { display: none; } }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; }
.pager a { padding: 4px 12px; border-radius: 8px; background: #efedf9; }

.result-block { --accent: var(--brand); border-left: 4px solid var(--accent); }
.result-block__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.result-block__head h2 { margin: 0; }
.result-block__links { display: flex; gap: 8px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.check-result { margin-top: 14px; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea { font: 15px var(--font); color: var(--text); padding: 11px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(76,63,209,.15); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.auth { padding: 48px 16px; display: flex; justify-content: center; }
.auth__card { width: 100%; max-width: 420px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); padding: 6px 14px; border-radius: 999px; font: 600 13px var(--font); cursor: pointer; text-decoration: none !important; }
.chip.is-on, .chip:hover { border-color: var(--brand); color: var(--brand); }
.kv { display: grid; gap: 10px; margin: 0 0 18px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }

/* ---------- account ---------- */
.subnav { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 18px; background: #fff; padding: 6px; border-radius: 12px; box-shadow: var(--shadow); }
.subnav a { padding: 8px 14px; border-radius: 8px; color: var(--muted); white-space: nowrap; text-decoration: none !important; }
.subnav a.is-active { background: var(--ink); color: #fff; }
.stats { margin-bottom: 14px; }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; }
.stat span { font-size: 12px; color: var(--muted); }
.stat strong { font-size: 24px; color: var(--ink); }
.stat small { color: var(--muted); }
.stat--gold { background: linear-gradient(150deg, var(--ink), var(--ink-2)); }
.stat--gold span, .stat--gold small { color: rgba(255,255,255,.7); }
.stat--gold strong { color: var(--gold-2); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }

/* ---------- play ---------- */
.play-hero { --accent: var(--brand); background: linear-gradient(150deg, var(--ink), color-mix(in srgb, var(--accent) 45%, var(--ink-2))); color: #fff; padding: 26px 0; }
.play-hero__inner { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.play-hero a, .play-hero .muted { color: rgba(255,255,255,.75); }
.play-hero__jackpot { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.play-hero__jackpot strong { font-size: 30px; color: var(--gold-2); }
.play { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; padding-top: 22px; padding-bottom: 40px; align-items: start; }
@media (max-width: 960px) { .play { grid-template-columns: 1fr; } .play-hero__jackpot { align-items: flex-start; } }
.play__toolbar { display: flex; align-items:center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.play__add-lines { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.play__add-lines label { font-size:13px; }
.play__add-lines input { width:4.75em; min-height:32px; border:1px solid var(--line); border-radius:8px; padding:4px 6px; font:inherit; }
.lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.line { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; border: 2px solid transparent; }
.line.is-complete { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.line__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.line__head strong { font-size: 14px; }
.line__btns { display: flex; gap: 4px; }
.line__btns button { border: 0; background: #efedf9; color: var(--ink-2); padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.line__label { font-size: 12px; color: var(--muted); margin: 8px 0 6px; }
.numgrid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.num { aspect-ratio: 1; border: 1px solid var(--line); background: #fff; border-radius: 50%; font: 600 12px var(--font); color: var(--ink-2); cursor: pointer; padding: 0; font-variant-numeric: tabular-nums; }
.num:hover { border-color: var(--brand); }
.num.is-on { background: var(--brand); color: #fff; border-color: var(--brand); }
.numgrid--sp .num.is-on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.line__picked { min-height: 28px; margin-top: 10px; }
.play__side { position: sticky; top: 80px; }
@media (max-width: 960px) { .play__side { position: static; } }
.slip { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }
.slip__rows { margin: 0; display: grid; gap: 6px; font-size: 14px; }
.slip__rows div { display: flex; justify-content: space-between; }
.slip__rows dt { color: var(--muted); }
.slip__rows dd { margin: 0; }
.slip__total { border-top: 1px solid var(--line); padding-top: 8px; font-size: 18px; font-weight: 800; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.75); padding: 40px 0 20px; margin-top: 40px; }
.footer h4 { color: #fff; margin: 0 0 10px; }
.footer a { display: block; color: rgba(255,255,255,.7); margin: 4px 0; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.footer .muted { color: rgba(255,255,255,.55); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 24px; padding-top: 16px; }
.brand--footer { margin-bottom: 10px; }
.badge-18 { display: inline-block; border: 2px solid var(--gold); color: var(--gold); border-radius: 50%; width: 40px; height: 40px; line-height: 36px; text-align: center; font-weight: 900; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }
.prose { max-width: 820px; }
.prose h3 { margin-top: 1.4em; }
.err-code { font-size: 72px; color: var(--brand); margin: 0; }

/* ---------- support chat widget ---------- */
.chat { position: fixed; right: 18px; bottom: 18px; z-index: 100; font-size: 14px; }
.chat__launcher { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font: 600 14px var(--font); box-shadow: 0 10px 30px rgba(22,19,58,.35); position: relative; }
.chat__launcher svg { color: var(--gold); }
.chat__badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.chat__panel { position: absolute; right: 0; bottom: 0; width: 370px; height: 560px; max-height: calc(100vh - 36px); background: #fff; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(22,19,58,.35); display: flex; flex-direction: column; overflow: hidden; }
.chat__head { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 12px 12px 12px 16px; }
.chat__logo { width: 30px; height: 30px; border-radius: 50%; position: relative; flex: none; font-size: 13px; }
.chat__logo, .msg__avatar {
  display:inline-grid; place-items:center; color:#fff; font-weight:800;
  background:hsl(var(--avatar-hue, 225) 54% 35%);
}
.chat__logo img, .msg__avatar img { position:absolute; inset:0; width:100%; height:100%; border-radius:inherit; object-fit:cover; z-index:1; }
.chat__title { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.chat__title small { opacity: .65; font-size: 11px; }
.chat__icon { background: none; border: 0; color: #fff; cursor: pointer; font-size: 16px; padding: 4px 8px; border-radius: 6px; }
.chat__icon:hover { background: rgba(255,255,255,.12); }
.chat__body { flex: 1; overflow-y: auto; padding: 14px; background: #f4f3f8; display: flex; flex-direction: column; gap: 12px; }
.chat__hint { text-align: center; font-size: 12px; color: var(--muted); }
.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg__meta { font-size: 11px; color: var(--muted); margin-bottom: 3px; display: flex; gap: 6px; align-items: center; }
.msg__avatar { position:relative; width:20px; height:20px; border-radius:50%; font-size:10px; }
.msg__bubble { padding: 9px 12px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06); white-space: pre-wrap; word-break: break-word; }
.msg--user { align-self: flex-end; align-items: flex-end; }
.msg--user .msg__bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg--agent .msg__bubble, .msg--system .msg__bubble { border-bottom-left-radius: 4px; }
.msg__bubble img { display: block; max-width: 220px; max-height: 220px; border-radius: 8px; }
.msg__file { display: inline-flex; gap: 6px; align-items: center; color: inherit; }
.msg--user .msg__file { color: #fff; }
.msg--pending { opacity: .6; }
.chat__emoji { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; padding: 8px; border-top: 1px solid var(--line); max-height: 130px; overflow-y: auto; }
.chat__emoji button { border: 0; background: none; font-size: 20px; cursor: pointer; border-radius: 6px; padding: 2px; }
.chat__emoji button:hover { background: #efedf9; }
.chat__foot { border-top: 1px solid var(--line); padding: 8px 12px 12px; }
.chat__tools { display: flex; gap: 6px; margin-bottom: 6px; }
.chat__tools button, .chat__tools label { background: none; border: 0; font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.chat__tools button:hover, .chat__tools label:hover { background: #efedf9; }
.chat__foot textarea { width: 100%; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 14px var(--font); }
.chat__foot textarea:focus { outline: none; border-color: var(--brand); }
.chat__actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.chat.is-open .chat__launcher { display: none; }
@media (max-width: 520px) {
  .chat { right: 12px; bottom: 12px; }
  .chat.is-open { inset: 0; }
  .chat__panel { position: fixed; inset: 0; width: auto; height: auto; max-height: none; border-radius: 0; }
}
/* 首页彩票展示 */
.home-page { background:#fff; color:#101e38; }
.home-carousel { position:relative; max-width:1280px; margin-top:18px; }
.home-carousel__frame { aspect-ratio:4 / 1; overflow:hidden; border-radius:12px; background:#edf2f8; }
.home-carousel__frame img { display:block; width:100%; height:100%; object-fit:cover; }
.home-carousel__controls {
  display:flex; align-items:center; justify-content:center; gap:4px; width:max-content;
  max-width:calc(100% - 40px); margin:8px auto 0; flex-wrap:wrap;
}
.home-carousel__controls button {
  display:grid; place-items:center; min-width:32px; min-height:32px;
  border:0; border-radius:50%; color:#14233c; background:#f2f4f7;
  font:700 16px var(--font); cursor:pointer;
}
.home-carousel__controls .home-carousel__dot { min-width:20px; background:transparent; }
.home-carousel__dot::before { content:""; width:7px; height:7px; border-radius:50%; background:#8192a9; }
.home-carousel__dot[aria-current]::before { background:#1461ce; }
.home-carousel__controls button:focus-visible { outline:2px solid #1461ce; outline-offset:2px; }
.lottery-home { max-width:1280px; padding-top:28px; padding-bottom:72px; min-height:65vh; }
.lottery-home h1 { text-align:center; font-size:22px; font-weight:500; margin:0 0 58px; }
.lottery-tools { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.lottery-controls, .lottery-categories { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.lottery-filter { border:1px solid #e1e4ea; border-radius:30px; padding:5px 13px; white-space:nowrap; color:#14233c; background:#f2f2f3; font-size:14px; }
.lottery-filter.is-active { border-color:#1461ce; box-shadow:inset 0 0 0 1px #1461ce; color:#0757be; background:#edf4ff; }
.lottery-filter:hover { text-decoration:none; background:#e9eff8; }
.lottery-sort__control { display:flex; align-items:center; gap:5px; border-radius:24px; background:#f2f2f3; padding:5px 9px; }
.lottery-sort select, .lottery-search button { border:0; background:transparent; color:inherit; font:inherit; cursor:pointer; }
.lottery-sort select { font-size:13px; max-width:170px; }
.lottery-search button { display:grid; place-items:center; flex:0 0 24px; width:24px; height:24px; padding:0; }
.lottery-search__icon { position:relative; display:block; width:18px; height:18px; }
.lottery-search__icon::before { content:""; position:absolute; inset:1px auto auto 1px; width:12px; height:12px; border:1.6px solid currentColor; border-radius:50%; box-sizing:border-box; }
.lottery-search__icon::after { content:""; position:absolute; top:11px; left:11px; width:6px; height:1.6px; border-radius:2px; background:currentColor; transform:rotate(45deg); transform-origin:left center; }
.lottery-search { display:flex; align-items:center; gap:10px; width:395px; max-width:60%; border-radius:28px; background:#f2f2f3; padding:0 16px; min-height:56px; }
.lottery-search:focus-within { box-shadow:0 0 0 2px #1461ce; }
.lottery-search input { width:100%; min-width:0; height:24px; padding:0; border:0; outline:0; background:transparent; font:inherit; font-size:15px; line-height:24px; color:#172744; }
.lottery-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px 24px; }
.lottery-tile { position:relative; overflow:hidden; border-radius:12px; background:#4377ca; color:white; min-width:0; container-type:inline-size; }
.lottery-tile[hidden] { display:none; }
.lottery-tile::before {
  content:'✦　⋆　✧　✦';
  position:absolute; inset:0 auto auto 0; width:62%; height:60px;
  color:#ffffff55; font-size:24px; letter-spacing:7px;
  background:radial-gradient(ellipse at 22% 0%, #78a5e577, transparent 64%);
  pointer-events:none;
}
.lottery-tile__result { position:absolute; right:24px; top:24px; z-index:1; border-radius:22px; background:#f5f6f8; color:#13233d; padding:6px 16px; font-size:13px; text-decoration:none; }
.lottery-tile__body {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);
  align-items:center; gap:12px; min-height:216px; padding:24px;
  color:white; text-decoration:none;
}
.lottery-tile__body:hover { text-decoration:none; }
.lottery-tile__ball {
  display:grid; place-items:center; position:relative; isolation:isolate;
  width:min(100%, 125px); aspect-ratio:1; border-radius:50%;
  background:radial-gradient(circle at 35% 35%, #fff 42%, #e7edf7 74%, #a9bfd9);
  box-shadow:0 7px 9px #17325b55;
}
.lottery-tile__ball::before {
  content:''; position:absolute; z-index:-1; inset:0; border-radius:inherit;
  clip-path:polygon(0 0, 100% 0, 100% 40%, 0 61%);
  background:repeating-linear-gradient(-19deg,#ee4f66 0 9px,#fff5f5 9px 17px);
}
.lottery-tile__ball::after {
  content:'✦ ✦ ✦'; position:absolute; z-index:-1; inset:10% auto auto 11%;
  border-radius:50%; padding:4% 6%; background:#5544b2; color:#fff;
  font-size:clamp(9px,3cqw,13px); transform:rotate(-16deg);
}
.lottery-tile[data-lottery-code="megamillions"] .lottery-tile__ball::after { background:#7352c6; }
.lottery-tile__ball span { width:104%; padding:8px 5px; background:#fff; border-radius:4px; color:#172644; font-weight:900; text-align:center; text-transform:uppercase; font-size:clamp(12px,4cqw,17px); line-height:1.15; overflow-wrap:anywhere; box-shadow:0 2px 5px #20325744; }
.lottery-tile__amount {
  display:grid; grid-template-columns:auto auto; justify-content:end;
  align-items:baseline; gap:5px 7px; text-align:right; line-height:1.1; margin-top:35px;
}
.lottery-tile__amount small { font-size:clamp(12px,4cqw,20px); font-weight:750; }
.lottery-tile__amount strong { font-size:min(43px, 10.5cqw, calc(65cqw / var(--amount-length))); font-variant-numeric:tabular-nums; white-space:nowrap; }
.lottery-tile__amount b { grid-column:1 / -1; font-size:clamp(19px,7cqw,29px); }
.lottery-tile__amount--full { grid-template-columns:minmax(0,1fr); }
.lottery-tile__amount--full strong { font-size:min(32px, calc(62cqw / var(--amount-length))); }
.lottery-tile__foot { min-height:40px; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:5px 8px; padding:4px 8px; background:#ffffff38; font-size:13px; }
.lottery-tile__foot .countdown { display:inline-flex; align-items:center; gap:8px; }
.lottery-tile__foot .countdown b { min-width:24px; background:#ffffff18; border:1px solid #ffffff66; border-radius:5px; padding:3px; font-size:12px; color:white; }
.lottery-empty { text-align:center; padding:40px; color:#6b7280; }
.lottery-pagination { display:flex; justify-content:center; flex-wrap:wrap; gap:7px; margin-top:32px; }
.lottery-pagination > * { display:grid; place-items:center; min-width:40px; min-height:40px; padding:6px 10px; border:1px solid #dfe6f1; border-radius:8px; color:#14233c; }
.lottery-pagination [aria-current] { border-color:#1461ce; background:#edf4ff; color:#0757be; font-weight:700; }
.lottery-page-count { margin:10px 0 0; text-align:center; color:#475569; font-size:13px; }
@media (max-width: 980px) {
  .lottery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .home-carousel__frame { aspect-ratio:2.4 / 1; }
  .lottery-home { padding-top:24px; padding-bottom:44px; }
  .lottery-home h1 { font-size:19px; margin-bottom:30px; }
  .lottery-grid { grid-template-columns:1fr; gap:18px; }
  .lottery-tools { flex-wrap:wrap; gap:12px; margin-bottom:18px; }
  .lottery-search { flex:1 1 100%; max-width:none; min-width:0; padding-inline:12px; }
  .lottery-tile__body { min-height:194px; padding-inline:18px; }
  .lottery-tile__result { right:18px; top:16px; }
}
