:root { --bg: #f6f5f1; --card: #fff; --ink: #1d1d1f; --muted: #6b6b70; --line: #e6e4de;
  --green: #1e7d4a; --green-bg: #dcf3e5; --red: #b3261e; --amber-bg: #fdf0cf; --amber: #7a5200; --blue: #2457c5; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 12px 14px 88px; }
h1 { font-size: 22px; margin: 8px 0 14px; }
h2 { font-size: 16px; margin: 0 0 8px; }
a { color: inherit; text-decoration: none; }
.card, .tile, .ticket { background: var(--card); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.tile span { display: block; font-size: 13px; color: var(--muted); }
.tile b { font-size: 26px; }
.tile.big b { font-size: 32px; }
.plus { color: var(--green); } .minus { color: var(--red); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
a.row.draw { background: var(--card); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; border: 0; }
a.row.draw.free { background: #eef3ff; margin-left: 14px; }
.muted, small { color: var(--muted); }
small { display: block; font-size: 12px; margin-top: 4px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 13px; background: #ecebe6; }
.chip.win { background: var(--green-bg); color: var(--green); font-weight: 600; }
.chip.wait { background: var(--amber-bg); color: var(--amber); }
.chip.warn { background: var(--amber-bg); color: var(--amber); display: block; border-radius: 10px; padding: 8px 10px; }
.ticket.win { border-left: 5px solid var(--green); }
.row.mine { background: var(--green-bg); border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.btn, button { display: block; width: 100%; text-align: center; background: var(--blue); color: #fff; border: 0;
  border-radius: 12px; padding: 12px; font-size: 16px; font-weight: 600; margin: 8px 0; cursor: pointer; }
.btn.light { background: #e3e9fb; color: var(--blue); }
button.link { background: none; color: var(--muted); font-weight: 400; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 8px 0; }
input, select, textarea { display: block; width: 100%; font-size: 16px; padding: 10px; margin-top: 4px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.pair { display: flex; align-items: center; gap: 8px; } .pair input { flex: 1; }
.prize .row input { flex: 1; margin: 0; } .prize .row select { width: auto; margin: 0; }
.prize .row button { width: auto; margin: 0; padding: 10px 14px; }
.prize.unpriced { border: 2px solid var(--amber); }
.search { display: flex; gap: 8px; } .search input { margin: 0; } .search button { width: auto; margin: 0; }
.error { color: var(--red); }
.note { background: #f3f2ee; border-radius: 10px; padding: 10px; margin-top: 10px; font-size: 14px; }
.bar { display: inline-block; height: 9px; background: #8fb0f0; border-radius: 4px; vertical-align: middle; max-width: 50vw; }
.digits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; font-size: 13px; text-align: center; }
.digits small { margin: 0; }
details summary { cursor: pointer; color: var(--blue); padding: 6px 0; }
.back { color: var(--blue); }
.logout { margin-top: 20px; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; text-align: center; padding: 14px 0; color: var(--muted); font-weight: 600; }
.tabs a.on { color: var(--blue); }
.links h2 { display: flex; align-items: center; gap: 6px; }
.links.telegram h2::before { content: '✈'; color: #229ed9; }
.links.max h2::before { content: '◆'; color: #7b3fe4; }
.link-item { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
.link-item:last-child { border-bottom: 0; }
.link-item b { color: var(--blue); }
.link-item b.nolink { color: var(--ink); }
