/* Scoped exclusively to the replacement /rules view. */
.shell.mz-draw-shell { height:100vh; height:100dvh; min-height:0; max-width:744px; padding:6px 6px calc(64px + env(safe-area-inset-bottom)); overflow:hidden; background:#f3f4f6; color:#0f172a; }
.mz-draw-page { height:100%; min-height:0; display:flex; flex-direction:column; overflow:hidden; font-family:"PingFang SC","Microsoft YaHei","Noto Sans SC",system-ui,sans-serif; }
.mz-draw-page * { box-sizing:border-box; }
.mz-draw-header { flex:none; display:flex; align-items:center; justify-content:space-between; gap:10px; height:44px; min-height:44px; padding:6px 12px; overflow:hidden; color:#fff; border-radius:8px 8px 0 0; background:linear-gradient(90deg,#1e40af,#3b82f6); }
.mz-draw-heading { min-width:0; margin:0; display:flex; align-items:center; gap:7px; font-size:17px; font-weight:900; line-height:1; white-space:nowrap; }
.mz-draw-heading svg,.mz-draw-action svg { width:17px; height:17px; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.mz-draw-actions { display:flex; align-items:center; gap:10px; flex:none; }
.mz-draw-action { min-height:32px; padding:0 12px; border:1px solid rgba(249,115,22,.34); border-radius:12px; display:inline-flex; align-items:center; justify-content:center; gap:5px; color:#fff; background:linear-gradient(135deg,#f59e0b,#f97316); box-shadow:0 7px 16px rgba(249,115,22,.22),inset 0 1px 0 rgba(255,255,255,.24); font:800 12px/1 "PingFang SC","Microsoft YaHei",system-ui,sans-serif; white-space:nowrap; cursor:pointer; text-decoration:none; }
.mz-draw-action svg { width:13px; height:13px; }
.mz-draw-action:disabled { cursor:wait; opacity:.65; }
.mz-draw-frame { flex:1; min-height:0; overflow:auto; overscroll-behavior-y:contain; -webkit-overflow-scrolling:touch; padding:14px; border:1px solid #dbeafe; border-top:0; border-radius:0 0 16px 16px; background:#fff; scrollbar-width:thin; }
.mz-draw-list { display:grid; gap:12px; padding-bottom:8px; }
.mz-draw-card { min-width:0; display:grid; gap:8px; overflow:hidden; padding:10px 10px 9px; border:1px solid #dbeafe; border-radius:14px; background:linear-gradient(#fff,#f8fbff); box-shadow:0 10px 24px rgba(15,23,42,.07); }
.mz-draw-card-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.mz-draw-issue { display:flex; align-items:center; justify-content:center; min-height:28px; padding:0 12px; border-radius:999px; background:linear-gradient(135deg,#2563eb,#1d4ed8); box-shadow:0 6px 14px rgba(37,99,235,.22); color:#fff; font-size:13px; font-weight:800; line-height:1; }
.mz-draw-date { color:#475569; font-size:14px; font-weight:800; line-height:1; }
.mz-draw-numbers { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)) 8px minmax(0,1fr); align-items:start; min-height:58px; padding:5px 0 2px; border:1px solid rgba(34,197,94,.18); border-radius:13px; background:linear-gradient(rgba(34,197,94,.08),rgba(34,197,94,0) 30%),linear-gradient(145deg,#fbfffc,#f1fdf5 56%,#edf9f0); box-shadow:inset 0 1px 0 rgba(255,255,255,.94),0 4px 10px rgba(148,163,184,.08); }
.mz-draw-ball-item { display:grid; align-items:center; justify-items:center; gap:0; min-width:0; grid-template-rows:36.48px 16px; --wave-a:#3b82f6; --wave-b:#2563eb; --wave-c:#1d4ed8; }
.mz-draw-ball-item.red { --wave-a:#f43f5e; --wave-b:#dc2626; --wave-c:#991b1b; }
.mz-draw-ball-item.green { --wave-a:#22c55e; --wave-b:#16a34a; --wave-c:#047857; }
.mz-draw-ball { box-sizing:content-box; width:36.48px; height:36.48px; border:1px solid rgba(255,255,255,.34); border-radius:999px; display:flex; align-items:center; justify-content:center; font-size:18.56px; font-weight:700; line-height:1; color:#111827; background:radial-gradient(circle at 42% 36%,rgba(255,255,255,.98) 0,rgba(255,255,255,.98) 12%,transparent 25%),radial-gradient(circle,#fff 0,#fff 49%,rgba(248,250,252,.99) 50%,rgba(248,250,252,.99) 54%,rgba(15,23,42,.14) 55%,rgba(15,23,42,.14) 57%,transparent 58%),radial-gradient(circle at 31% 20%,rgba(255,255,255,.76) 0,rgba(255,255,255,.76) 9%,transparent 10%),radial-gradient(circle at 42% 34%,var(--wave-a) 0,var(--wave-a) 38%,var(--wave-b) 70%,var(--wave-c) 100%); box-shadow:0 1px 3px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.94); }
.mz-draw-zodiac { color:var(--wave-b); font-size:15.8px; font-weight:800; line-height:.92; margin-top:0; text-shadow:0 1px 0 rgba(255,255,255,.96),0 0 2px rgba(255,255,255,.52); }
.mz-draw-plus { display:flex; justify-content:center; align-items:center; height:36.48px; font-size:28px; line-height:1; font-weight:800; color:#475569; }
.mz-draw-message { min-height:140px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; color:#475569; font-size:14px; }
html[data-visual-theme] #app .mz-draw-shell .bottom-nav { border:1px solid #9ec5fc; border-top:2px solid #a7c3f3; border-radius:15px 15px 0 0; background:linear-gradient(#24528a,#133664); }
html[data-visual-theme] #app .mz-draw-shell .bottom-nav .nav-item { color:#fff; }
html[data-visual-theme] #app .mz-draw-shell .bottom-nav .nav-item.active { background:linear-gradient(#2463ae,#1b4e8c); color:#ffe068; }
html[data-visual-theme] #app .mz-draw-shell .bottom-nav .nav-item.active::after { background:#fbbf24; }
.mz-draw-shell .bottom-nav .nav-item[href="/rules"] .nav-icon { font-family:system-ui,sans-serif; }
#app .mz-draw-shell .bottom-nav .nav-item[href="/rules"] .nav-icon { background:#c86160; color:#164779; box-shadow:inset 0 1px 1px #f0a9a9; }
#app .mz-draw-shell .bottom-nav .nav-item[href="/rules"] .nav-icon svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.mz-draw-action:focus-visible,.mz-draw-filter:focus-visible,.mz-draw-frame:focus-visible { outline:3px solid #93c5fd; outline-offset:-3px; }
.mz-draw-trend { display:grid; gap:12px; }
.mz-draw-filters { display:flex; flex-wrap:wrap; gap:7px; }
.mz-draw-filter { min-height:32px; padding:5px 13px; border:1px solid #dbeafe; border-radius:8px; background:#eff6ff; color:#1e40af; font-family:inherit; font-size:13px; font-weight:700; line-height:1.2; cursor:pointer; }
.mz-draw-filter.active { color:#fff; background:#2563eb; border-color:#2563eb; }
.mz-draw-trend-summary,.mz-draw-trend-legend { margin:0; color:#475569; font-size:12px; line-height:1.7; }
.mz-draw-table-scroll { overflow-x:auto; }
.mz-draw-trend-board { position:relative; width:calc(65px + var(--mz-columns)*45px); }
.mz-draw-trend-table { width:100%; table-layout:fixed; border-collapse:collapse; color:#475569; font-size:12px; text-align:center; }
.mz-draw-trend-table th,.mz-draw-trend-table td { width:45px; height:36px; padding:0; border:1px solid #dbeafe; }
.mz-draw-trend-table th:first-child { width:65px; }
.mz-draw-trend-table thead th { height:40px; background:#dbeafe; color:#1e40af; }
.mz-draw-trend-table tbody tr:nth-child(2n) { background:#f8fafc; }
.mz-draw-trend-table tfoot { background:#eff6ff; }
.mz-draw-trend-hit { position:relative; z-index:2; width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; color:#fff; background:#ef4444; font-size:12px; font-weight:700; }
.mz-draw-trend-lines { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.mz-draw-trend-lines polyline { fill:none; stroke:#ef4444; stroke-width:1.5; }
.mz-draw-missing { margin:4px 12px 0; padding:22px 0 0; border:0; border-top:1px solid #e2e8f0; border-radius:0; background:transparent; }
.mz-draw-missing .mz-draw-missing-heading { margin:0 0 8px; padding:2px 0 9px; display:flex; align-items:center; gap:7px; color:#1e293b; font-size:14px; font-weight:800; line-height:normal; }
.mz-draw-missing-icon { display:inline-flex; flex:none; width:14px; height:14px; color:#4f46e5; }
.mz-draw-missing-icon svg { width:100%; height:100%; }
.mz-draw-missing-heading small { margin-left:auto; color:#94a3b8; font-size:11px; font-weight:600; line-height:normal; }
.mz-draw-missing-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; min-width:0; padding-top:2px; }
.mz-draw-missing-cell { min-width:0; display:flex; align-items:center; justify-content:center; gap:2px; padding:8px 2px; }
.mz-draw-missing-cell.is-now { background:#ecfdf5; border-radius:10px; }
.mz-draw-missing-number { display:inline-flex; flex:none; align-items:center; justify-content:center; width:22px; height:22px; border-radius:50%; color:#fff; font-size:11px; font-weight:900; line-height:1; box-shadow:0 1px 2px rgba(15,23,42,.3),inset 0 1px 0 rgba(255,255,255,.35); }
.mz-draw-missing-number.red { background:radial-gradient(circle at 32% 28%,#ff7070,#d61212 72%); }
.mz-draw-missing-number.blue { background:radial-gradient(circle at 32% 28%,#7fb0ff,#1d4ed8 72%); }
.mz-draw-missing-number.green { background:radial-gradient(circle at 32% 28%,#63c785,#15803d 72%); }
.mz-draw-missing-separator { color:#94a3b8; font-size:12px; font-weight:700; line-height:1; }
.mz-draw-missing-text { color:#475569; font-size:12px; font-weight:700; line-height:1.2; letter-spacing:-.2px; white-space:nowrap; }
.mz-draw-missing-cell.is-now .mz-draw-missing-text { color:#047857; font-weight:900; }
@media(max-width:380px) {
  .mz-draw-missing-number { width:20px; height:20px; font-size:10px; }
  .mz-draw-missing-text { font-size:11.5px; }
}
@media(max-width:390px) {
  .mz-draw-card { padding:9px 8px 8px; }
  .mz-draw-issue { min-height:26px; padding:0 10px; font-size:11px; }
  .mz-draw-date { font-size:12px; }
  .mz-draw-numbers { min-height:52px; padding-bottom:1px; }
  .mz-draw-ball-item { grid-template-rows:clamp(29.76px,7.9vw,32px) clamp(14px,3.56vw,16px); }
  .mz-draw-list { gap:8px; }
  .mz-draw-ball { width:32.32px; height:32.32px; font-size:16.64px; }
  .mz-draw-zodiac { font-size:clamp(12.2px,3.4vw,13.8px); }
  .mz-draw-plus { height:32.32px; font-size:25px; }
}
@media(max-width:360px) {
  .mz-draw-missing { margin-left:18px; margin-right:18px; }
  .mz-draw-header { padding:6px 8px; gap:6px; }
  .mz-draw-heading { gap:4px; font-size:14px; }
  .mz-draw-actions { gap:6px; }
  .mz-draw-action { padding:0 8px; font-size:11px; }
  .mz-draw-frame { padding:10px 8px; }
  .mz-draw-ball { width:28px; height:28px; font-size:15px; }
  .mz-draw-zodiac { font-size:12px; }
}
@media(min-width:721px) {
  #app .shell.mz-draw-shell { max-width:720px; }
  #app .mz-draw-shell .bottom-nav { width:min(100%,720px); }
  .mz-draw-frame { padding:18px; }
  .mz-draw-header { padding-left:16px; padding-right:16px; }
  .mz-draw-heading { font-size:18px; }
  .mz-draw-action { padding-left:14px; padding-right:14px; font-size:13px; }
  .mz-draw-card { padding:13px 14px 12px; border-radius:16px; gap:10px; }
}

/* Phone-only chart fit: keep every column visible without clipping data. */
@media(max-width:720px) {
  .mz-draw-trend { min-width:0; }
  .mz-draw-table-scroll { min-width:0; max-width:100%; }
  .mz-draw-trend-board { max-width:100%; }
  .mz-draw-trend-table th,.mz-draw-trend-table td { width:auto; }
  .mz-draw-trend-table th:first-child { width:var(--mz-issue-width,10.7438%); }
  .mz-draw-trend-table { font-size:10px; font-size:clamp(9px,2.7vw,12px); }
  .mz-draw-trend-hit { width:19px; height:19px; width:clamp(17px,5vw,28px); height:clamp(17px,5vw,28px); max-width:calc(100% - 2px); font-size:9px; font-size:clamp(8px,2.5vw,12px); }
}
