/* Measured from the captured responsive layout; values are in CSS pixels. */
:root {
  --page: #f3f5f9;
  --paper: #fff;
  --ink: #172033;
  --muted: #919ba9;
  --red: #d71920;
  --nav-red: #d91e31;
  --border: rgba(15, 23, 42, .055);
  --radius: 20px;
  --font: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { margin: 0; padding: 0; background: #e9edf3; }
body { margin: 0; color: var(--ink); font-family: var(--font); font-size: 16px; overflow-x: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
button, a, input, textarea, select { outline-offset: 3px; }
button { border: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #2468d8; }
button:disabled { cursor: default; opacity: .55; }
[hidden] { display: none !important; }
svg { display: block; }
h1, h2, h3, h4, p { margin: 0; }
.app { width: 100%; max-width: 430px; min-height: 100vh; margin: 0 auto; background: var(--page); overflow-x: clip; }
.page-bottom-space { height: 96px; background: var(--page); }
.page { display: none; padding-bottom: calc(90px + env(safe-area-inset-bottom)); min-height: 100vh; background: var(--page); }
.page.active { display: block; }
.draw-full-page { position: relative; display: flex; flex-direction: column; gap: 11px; width: 100%; padding: 12px 12px 105px; }
/* Home carousel: exactly 16:9 at every width. */
.home-banner-wrap { width: 100%; }
.home-banner-carousel { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: #f0f0f0; box-shadow: 0 4px 15px rgba(0, 0, 0, .08); }
.home-banner-slides { position: absolute; inset: 0; display: flex; transition: transform .4s ease; }
.home-banner-slide { display: block; flex: 0 0 100%; width: 100%; min-width: 100%; height: 100%; padding: 0; text-align: left; background: #f0f0f0; overflow: hidden; }
.banner-art { position: relative; height: 100%; overflow: hidden; padding: 24px 24px; color: white; isolation: isolate; }
.banner-art-one { background: linear-gradient(115deg, #881c42 0%, #d95755 52%, #eda769 100%); }
.banner-art-two { background: linear-gradient(115deg, #142c5d 0%, #276dba 55%, #60bac7 100%); }
.banner-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(255,255,255,.06), transparent 60%); }
.banner-eyebrow { display: block; margin-bottom: 9px; font-size: 8px; font-weight: 600; letter-spacing: 2px; color: rgba(255,255,255,.74); }
.banner-art strong { display: block; font-size: 18px; font-weight: 900; line-height: 1.4; letter-spacing: 2px; text-shadow: 0 2px 8px rgba(65,15,20,.12); }
.banner-pill { display: inline-block; margin-top: 14px; padding: 6px 11px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(255,255,255,.15); color: rgba(255,255,255,.94); font-size: 9px; font-weight: 500; }
.banner-orbit { position: absolute; z-index: -1; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; }
.orbit-one { width: 300px; height: 300px; right: -121px; top: -95px; }
.orbit-two { width: 242px; height: 242px; right: -87px; top: -61px; }
.banner-spark { position: absolute; color: rgba(255,255,255,.65); }
.spark-one { right: 151px; top: 28px; font-size: 17px; }
.spark-two { right: 43px; bottom: 32px; font-size: 11px; }
.banner-phone { position: absolute; width: 87px; height: 159px; right: 51px; top: 42px; transform: rotate(14deg); border: 3px solid rgba(255,255,255,.88); border-radius: 16px; padding: 16px 8px 8px; background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(255,241,224,.81)); box-shadow: 7px 12px 23px rgba(69,18,32,.22); }
.phone-notch { position: absolute; top: 6px; left: 31px; width: 21px; height: 3px; border-radius: 3px; background: rgba(115,57,65,.22); }
.phone-row { display: flex; gap: 5px; }
.phone-row i { display: block; width: 17px; height: 17px; border-radius: 5px; background: #d26969; }
.phone-row i:nth-child(2) { background: #daa561; }
.phone-row i:nth-child(3) { background: #ac6877; }
.phone-panel { display: flex; gap: 3px; margin-top: 12px; padding: 7px 4px; border-radius: 5px; background: rgba(255,255,255,.75); }
.phone-panel b { width: 17px; height: 17px; border-radius: 50%; border: 4px solid #cd6768; }
.phone-panel b:nth-child(2) { border-color: #daa561; }
.phone-panel b:nth-child(3) { border-color: #ac6877; }
.phone-bars { display: flex; gap: 3px; align-items: flex-end; height: 39px; padding: 5px 5px 0; }
.phone-bars i { width: 10px; height: 12px; border-radius: 2px; background: rgba(198,91,98,.3); }
.phone-bars i:nth-child(2) { height: 23px; }
.phone-bars i:nth-child(3) { height: 17px; }
.phone-bars i:nth-child(4) { height: 28px; }
.banner-chart { position: absolute; right: 33px; top: 37px; width: 155px; height: 132px; display: flex; align-items: flex-end; justify-content: space-around; padding: 16px; border: 1px solid rgba(255,255,255,.4); border-radius: 18px; background: rgba(255,255,255,.16); box-shadow: 0 10px 24px rgba(8,33,68,.18); transform: rotate(-6deg); backdrop-filter: blur(3px); }
.banner-chart i { width: 11px; height: 25px; border-radius: 3px 3px 1px 1px; background: rgba(255,255,255,.68); }
.banner-chart i:nth-child(2) { height: 49px; }
.banner-chart i:nth-child(3) { height: 39px; }
.banner-chart i:nth-child(4) { height: 72px; }
.banner-chart i:nth-child(5) { height: 92px; }
.banner-chart svg { position: absolute; inset: 26px 7px auto; width: 140px; height: 70px; }
.banner-chart path { fill: none; stroke: #ffe3a3; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.home-banner-dots { position: absolute; bottom: 8px; left: 50%; display: flex; gap: 6px; transform: translateX(-50%); z-index: 2; }
.home-banner-dot { width: 6px; height: 6px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.5); transition: background .2s; }
.home-banner-dot.active { background: #fff; }
/* Report card. */
.draw-report-card { height: 181px; padding: 13px 10px 12px; border: 1px solid rgba(15,23,42,.065); border-radius: 20px; background: radial-gradient(circle at 100% 0, rgba(225,29,46,.06), transparent 150px), #fff; box-shadow: 0 7px 22px rgba(23,32,51,.055); }
.draw-report-top { display: flex; align-items: center; min-height: 28px; margin-bottom: 11px; overflow: hidden; }
.draw-report-meta { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px; width: 100%; white-space: nowrap; }
#drawReportPeriod { justify-self: start; color: #2468d8; font-size: 13px; line-height: 1.2; font-weight: 950; letter-spacing: -.2px; }
#drawReportTime { justify-self: center; color: #8b95a5; font-size: 10.5px; line-height: 1.2; font-weight: 750; }
.draw-history-entry { display: flex; align-items: center; justify-self: end; gap: 2px; padding: 4px 7px; border: 1px solid rgba(215,25,32,.04); border-radius: 999px; background: rgba(215,25,32,.03); color: rgba(190,45,52,.68); font-size: 9px; line-height: 1.15; font-weight: 780; white-space: nowrap; }
.draw-history-entry span { margin-top: -1px; color: rgba(100,116,139,.55); font-size: 12px; }
.draw-report-balls { display: flex; align-items: flex-start; justify-content: space-between; gap: 2px; width: 100%; padding: 2px 1px 0; white-space: nowrap; }
.draw-report-ball-wrap { display: flex; flex: 0 1 46px; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 0; background: none; }
.draw-report-ball { display: flex; align-items: center; justify-content: center; width: clamp(39px,10.8vw,47px); height: clamp(39px,10.8vw,47px); border-radius: 50%; color: #fff; font-size: clamp(17px,4.7vw,21px); font-weight: 950; text-shadow: 0 1px 2px rgba(0,0,0,.18); box-shadow: 0 6px 12px rgba(15,23,42,.16), inset 0 3px 6px rgba(255,255,255,.3); }
.draw-report-ball.red { background: linear-gradient(145deg,#ff3f4d,#d70c1d); }
.draw-report-ball.blue { background: linear-gradient(145deg,#345cff,#102fd0); }
.draw-report-ball.green { background: linear-gradient(145deg,#24aa42,#07801f); }
.draw-report-ball-wrap small { color: #687385; font-size: 10px; font-weight: 800; line-height: 1.15; white-space: nowrap; }
.draw-report-plus { display: flex; align-items: center; height: clamp(39px,10.8vw,47px); margin: 0 -1px; color: #d71920; font-size: 21px; font-weight: 950; }
.draw-result-summary { display: flex; align-items: center; gap: 0; margin-top: 12px; padding: 9px 2px 0; border-top: 1px solid rgba(15,23,42,.07); }
.draw-result-summary > div { display: flex; flex: 1; align-items: baseline; justify-content: center; gap: 5px; min-width: 0; padding: 3px 4px; }
.draw-result-summary > div + div { border-left: 1px solid rgba(148,163,184,.2); }
.draw-result-summary span { color: #9ca3af; font-size: 11.5px; font-weight: 600; }
.draw-result-summary b { color: #4b5563; font-size: 14.5px; font-weight: 650; }
/* Six compact, bordered shortcuts. */
.draw-entry-section { overflow: hidden; border: 1px solid rgba(15,23,42,.05); border-radius: 20px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.draw-entry-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.draw-entry-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-width: 0; min-height: 78px; padding: 10px 4px 9px; background: transparent; }
.draw-entry-card:nth-child(3n+1), .draw-entry-card:nth-child(3n+2) { border-right: 1px solid rgba(15,23,42,.055); }
.draw-entry-card:nth-child(-n+3) { border-bottom: 1px solid rgba(15,23,42,.055); }
.draw-entry-card:active { background: #f7f8fa; }
.draw-entry-icon-svg { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; }
.draw-entry-icon-svg svg { width: 22px; height: 22px; }
.draw-entry-copy { display: block; }
.draw-entry-card b { color: #6b7280; font-size: 12.5px; font-weight: 400; }
/* Sponsor grid, measured at 345px tall including the card padding. */
.home-partner-section { width: 100%; margin: 0 0 12px; }
.home-partner-card { padding: 16px 6px 10px; border-radius: 20px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.home-partner-title { position: relative; margin: 0 0 12px; padding-left: 10px; color: #2a2d33; font-size: 14px; font-weight: 800; line-height: 1.3; }
.home-partner-title::before { content: ""; position: absolute; top: 50%; left: 0; width: 3px; height: 14px; border-radius: 2px; background: linear-gradient(180deg,#d4af6a,#c9a05a); transform: translateY(-50%); }
.home-partner-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); column-gap: 4px; row-gap: 8px; }
.home-partner-item { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; min-height: 84px; padding: 4px 0 3px; }
.home-partner-logo { display: flex; align-items: center; justify-content: center; width: 100%; height: 64px; overflow: hidden; }
.sponsor-image { display: block; width: 100%; height: 100%; border: 1px solid #eee7dc; border-radius: 7px; background: #fffaf0; object-fit: fill; }
.stats-calendar-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stats-calendar-title strong { color: #6b7280; font-size: 13px; font-weight: 500; }
.mini-calendar { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; margin-top: 15px; text-align: center; }
.mini-calendar span { color: #919ba9; font-size: 10px; }
.mini-calendar b { padding: 5px 0; border-radius: 50%; color: #6b7280; font-size: 11px; font-weight: 500; }
.mini-calendar b.today { background: #d71920; color: #fff; } .sponsor-art { display: flex; }
.sponsor-art svg { flex: 0 0 auto; width: 29px; height: 29px; }
.sponsor-art strong { font-size: 11px; font-weight: 900; line-height: 1.4; letter-spacing: .5px; }
.sponsor-art small { display: block; margin-top: 2px; font-family: Arial,sans-serif; font-size: 4.5px; font-weight: 500; letter-spacing: .5px; }
.sponsor-art.tone-1 { color: #315479; border-color: #e4ecf3; background: linear-gradient(125deg,#fafdff,#e9f0f7); }
.sponsor-art.tone-2 { color: #815033; border-color: #ede3d9; background: linear-gradient(125deg,#fffcf7,#f2e3d4); }
.sponsor-art.tone-3 { color: #663943; border-color: #f0e2e4; background: linear-gradient(125deg,#fffafb,#f4e5e7); }
.sponsor-art.tone-4 { color: #536046; border-color: #e5eadf; background: linear-gradient(125deg,#fdfefa,#edf0e5); }
.home-partner-name { width: 100%; overflow: hidden; color: #4a4e57; font-size: 11.5px; font-weight: 600; line-height: 1.3; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
/* Fixed floating dock, 410px maximum with 14px viewport gutters. */
.bottom-nav-shell { position: fixed; right: 0; bottom: 0; left: 0; z-index: 50; padding: 0 14px calc(8px + env(safe-area-inset-bottom)); pointer-events: none; }
.bottom-nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); align-items: center; width: 100%; max-width: 410px; height: 68px; margin: 0 auto; overflow: hidden; border: 1px solid rgba(15,23,42,.055); border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: 0 5px 18px rgba(23,32,51,.075); backdrop-filter: blur(18px); pointer-events: auto; }
.nav-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 100%; height: 68px; padding: 0; background: transparent; color: #929cab; transition: color .18s; }
.nav-item:active { transform: scale(.97); }
.nav-icon, .nav-label { position: relative; z-index: 1; }
.nav-icon { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; }
.nav-icon svg { width: 22px; height: 22px; }
.nav-label { font-size: 11.5px; font-weight: 500; line-height: 1; }
.nav-active-bg { position: absolute; top: 6px; left: 50%; width: 22px; height: 3px; border-radius: 999px; background: #e11d2e; opacity: 0; transform: translateX(-50%) scaleX(.65); }
.nav-item.active { color: var(--nav-red); }
.nav-item.active .nav-active-bg { opacity: 1; transform: translateX(-50%) scaleX(1); }
.nav-item.active .nav-icon { transform: translateY(-1px) scale(1.04); }
.nav-item.active .nav-label { font-weight: 700; }
/* Shared inner pages. */
.site-header { position: relative; z-index: 10; display: flex; align-items: center; justify-content: center; height: 50px; padding: 0 12px; border-bottom: 1px solid rgba(15,23,42,.045); background: var(--page); }
.site-header__title { color: #1c2228; font-size: 17px; font-weight: 700; }
.site-header__action { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: transparent; color: #344054; }
.site-header__left { position: absolute; left: 8px; font-family: Arial,sans-serif; font-size: 33px; font-weight: 300; line-height: 1; }
.inner-content { display: flex; flex-direction: column; gap: 12px; padding: 14px 12px 24px; }
.white-card { padding: 15px; border: 1px solid var(--border); border-radius: 17px; background: #fff; box-shadow: 0 4px 15px rgba(23,32,51,.045); }
.muted { color: #7b8492; font-size: 13px; line-height: 1.8; }
.section-title { color: #263447; font-size: 16px; font-weight: 800; }
.section-title.marked { position: relative; margin-top: 5px; padding-left: 10px; }
.section-title.marked::before { content: ""; position: absolute; left: 0; top: 2px; width: 4px; height: 18px; border-radius: 3px; background: var(--red); }
.primary { padding: 10px 15px; border-radius: 9px; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; }
.secondary { padding: 10px 15px; border: 1px solid #e2e5e9; border-radius: 9px; background: #f6f7f9; font-size: 13px; }
.wide { width: 100%; }
.banner-mini { position: relative; overflow: hidden; padding: 24px 20px; border-radius: 18px; background: linear-gradient(120deg,#7c183b,#dc6562); color: #fff; }
.banner-mini::after { content: "✦"; position: absolute; right: 23px; top: 20px; color: rgba(255,255,255,.25); font-size: 75px; }
.banner-mini small { font-size: 8px; letter-spacing: 2px; opacity: .75; }
.banner-mini h2 { margin-top: 10px; font-size: 23px; }
.banner-mini p { margin-top: 9px; font-size: 12px; opacity: .8; }
.data-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.data-top strong { font-size: 18px; }
.data-top > span { color: #9ca3af; font-size: 10px; }
.data-top button { padding: 0; background: transparent; color: #c90012; font-size: 11px; }
.segment { display: flex; gap: 3px; margin: 15px 0 13px; padding: 3px; border-radius: 10px; background: #f3f4f6; }
.segment button { flex: 1; padding: 7px 0; border-radius: 8px; background: transparent; color: #6b7280; font-size: 13px; }
.segment button.active { background: #fff; color: #c90012; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.data-group { padding: 8px 0; border-top: 1px solid #f0f1f3; }
.data-group > div:first-child { display: flex; align-items: center; gap: 10px; }
.data-group strong { font-size: 13px; }
.data-group small { color: #9ca3af; font-size: 10px; }
.data-group button { margin-left: auto; padding: 3px 6px; border-radius: 4px; background: #f5f5f5; color: #777; font-size: 10px; }
.small-balls { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 10px; }
.small-balls i { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; color: white; font-size: 12px; font-style: normal; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.small-balls i.red { background: linear-gradient(135deg,#ef4444,#dc2626); }
.small-balls i.blue { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.small-balls i.green { background: linear-gradient(135deg,#22c55e,#16a34a); }
.small-balls b { margin-left: auto; color: #c90012; }
.data-summary { display: flex; justify-content: space-between; margin-top: 8px; padding: 10px; border-radius: 10px; background: #fafafa; color: #9ca3af; font-size: 11px; }
.data-summary b { color: #be1728; font-weight: 500; }
.tools-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.tool-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 10px 6px; border: 1px solid #f0f1f3; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.035); }
.tool-card svg { width: 30px; height: 30px; }
.tool-card strong { color: #374151; font-size: 12px; text-align: center; }
.tool-card small { color: #9ca3af; font-size: 9px; text-align: center; }
.field-label { display: block; margin-bottom: 9px; color: #374151; font-size: 13px; font-weight: 700; }
#toolInput { width: 100%; height: 112px; padding: 10px; resize: none; border: 1px solid #e2e5e9; border-radius: 9px; color: #374151; font-size: 13px; }
.tool-buttons { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.tool-buttons button { padding: 10px 2px; border-radius: 8px; background: #eceff3; font-size: 11px; }
.tool-buttons button:nth-child(2) { background: #fff2e5; color: #d97706; }
.tool-buttons button:nth-child(3) { background: #eaf2fe; color: #2563eb; }
.tool-buttons .primary { background: var(--red); color: white; }
.tool-tip { color: #8a93a1; font-size: 11px; text-align: center; }
.result-card { color: #4b5563; font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }

.tool-buttons.three { grid-template-columns: repeat(3,minmax(0,1fr)); }

.ocr-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; padding: 22px 14px; border: 1.5px dashed #cdd6e4; border-radius: 14px; background: #f8fafc; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.ocr-drop:hover, .ocr-drop.is-over { border-color: #2563eb; background: #eef4ff; }
.ocr-drop b { font-size: 14px; color: #334155; }
.ocr-drop small { font-size: 11px; color: #94a3b8; }
.ocr-drop-icon { width: 34px; height: 34px; color: #2563eb; }
.ocr-drop-icon svg { width: 100%; height: 100%; }
.ocr-preview-wrap { margin-top: 12px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #f8fafc; }
.ocr-preview-wrap img { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.ocr-text { width: 100%; min-height: 170px; margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #f8fafc; color: #334155; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.75; resize: vertical; }
.ocr-text:focus { outline: none; border-color: #93b4ff; background: #fff; }
.ocr-text[readonly] { color: #1f2937; }
.ocr-notes { margin: 8px 0 0; padding-left: 18px; color: #64748b; font-size: 12px; line-height: 1.9; }
.ocr-notes li { margin-bottom: 2px; }
.tool-tip[data-tone="info"] { color: #2563eb; }
.tool-tip[data-tone="error"] { color: var(--red); }
.ai-card { text-align: center; }
.ai-mark { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin: 6px auto 12px; border-radius: 17px; background: #f0eaff; color: #7c3aed; font-size: 31px; }
.ai-card h2 { font-size: 20px; }
.ai-card > p { margin-top: 8px; color: #8a93a1; font-size: 12px; }
.ai-messages { display: flex; flex-direction: column; gap: 8px; min-height: 180px; margin: 18px 0; text-align: left; }
.ai-message { max-width: 90%; padding: 10px 12px; border-radius: 5px 14px 14px 14px; background: #f2f4f8; color: #536173; font-size: 13px; line-height: 1.7; }
.ai-message.user { align-self: flex-end; border-radius: 14px 5px 14px 14px; background: #e81e34; color: white; }
.ai-form { display: flex; gap: 8px; }
.ai-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 9px; }
.picker-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.picker-fields label { color: #687385; font-size: 12px; }
.picker-fields input { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 1px solid #e2e5e9; border-radius: 8px; }
.picker-results { justify-content: center; min-height: 50px; margin: 20px 0; }
.period-select { position: absolute; right: 12px; padding: 5px; border: 0; border-radius: 7px; background: #eceff3; color: #7b8492; font-size: 11px; }
.stats-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 1px; scrollbar-width: none; }
.stats-tabs button { flex: 0 0 auto; padding: 8px 12px; border-radius: 8px; background: #fff; color: #687385; font-size: 12px; }
.stats-tabs button.active { background: var(--red); color: #fff; }
.bar-chart { display: flex; flex-direction: column; gap: 11px; margin-top: 18px; }
.bar-row { display: grid; grid-template-columns: 36px 1fr 25px; align-items: center; gap: 8px; font-size: 11px; }
.bar-row > span { color: #687385; }
.bar-row > b { color: #8a93a1; font-weight: 500; text-align: right; }
.bar-track { height: 8px; overflow: hidden; border-radius: 9px; background: #f0f2f5; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#e65761,#cf1524); }
.month-chart { display: flex; align-items: flex-end; justify-content: space-around; gap: 7px; height: 170px; margin-top: 16px; padding: 10px 0 0; border-bottom: 1px solid #e5e7eb; }
.month-col { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; }
.month-bars { display: flex; align-items: flex-end; gap: 3px; flex: 1; }
.month-bars i { width: 10px; border-radius: 3px 3px 0 0; background: #d22222; }
.month-bars i:nth-child(2) { background: #f59e0b; }
.month-col small { margin-bottom: -20px; transform: translateY(24px); color: #8a93a1; font-size: 10px; }
.chart-legend { display: flex; justify-content: center; gap: 15px; margin-top: 30px; color: #8a93a1; font-size: 10px; }
.chart-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; background: #d22222; }
.chart-legend span:nth-child(2) i { background: #f59e0b; }
.kpi-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.kpi-grid .white-card { display: flex; flex-direction: column; align-items: center; gap: 9px; background: linear-gradient(145deg,#fff0f0,#fff); }
.kpi-grid .white-card.purple { background: linear-gradient(145deg,#f3efff,#fff); }
.kpi-grid small { color: #687385; font-size: 11px; }
.kpi-grid b { color: #dc2626; font-size: 30px; }
.kpi-grid .purple b { color: #7c3aed; }
.kpi-grid b span { margin-left: 3px; font-size: 14px; }
.groups-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.group-card { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 3px; border: 1px solid #edf0f4; border-radius: 13px; background: #fff; }
.group-avatar { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 14px; background: #edf4ff; color: #3c73b9; font-size: 20px; font-weight: 800; }
.group-card:nth-child(3n+2) .group-avatar { background: #fff1eb; color: #d67c54; }
.group-card:nth-child(3n) .group-avatar { background: #f2ecfb; color: #8660b6; }
.group-card strong { overflow: hidden; max-width: 100%; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.group-card small { color: #9ca3af; font-size: 9px; }
.notice-card { padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #f6f7f9; }
.notice-card strong { color: #596273; font-size: 12px; }
.notice-card p { margin-top: 6px; color: #687180; font-size: 12px; line-height: 1.65; }
.channel-search { display: flex; align-items: center; gap: 8px; margin: 12px; padding: 10px 12px; border: 1px solid #edf0f3; border-radius: 12px; background: #fff; color: #9ca3af; }
.channel-search svg { width: 18px; height: 18px; }
.channel-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 13px; }
#app:has(#page-channels.active) .inner-content { padding-top: 0; }
.channels-list { display: flex; flex-direction: column; gap: 9px; }
.channel-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 1px solid #edf0f3; border-radius: 14px; background: #fff; text-align: left; }
.channel-card > div { flex: 1; }
.channel-card strong { display: block; font-size: 14px; }
.channel-card p { margin-top: 5px; color: #8a93a1; font-size: 11px; }
.channel-card > b { color: #c4cbd4; font-size: 21px; font-weight: 400; }
.channel-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 13px; background: #edf4ff; color: #4b84c7; }
.channel-icon svg { width: 22px; height: 22px; }
.sponsor-intro { padding: 24px 18px; text-align: center; }
.gold-symbol { color: #c49a55; font-size: 43px; }
.sponsor-intro h2 { margin-top: 8px; font-size: 18px; }
.sponsor-intro p { margin-top: 10px; color: #8a93a1; font-size: 13px; line-height: 1.8; }
.sponsor-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #eee9df; border-radius: 15px; background: #fff; }
.sponsor-row .home-partner-logo { flex: 0 0 100px; height: 55px; }
.sponsor-row strong { font-size: 13px; }
.sponsor-row p { margin-top: 5px; color: #a1a7b1; font-size: 10px; }
.sponsor-apply { padding: 0; overflow: hidden; }
.apply-art { display: flex; align-items: center; justify-content: center; aspect-ratio: 16/9; background: linear-gradient(145deg,#fff8e8,#ffefdd); color: #de9c69; font-size: 50px; }
.sponsor-apply > div:last-child { padding: 16px; }
.sponsor-apply h2 { font-size: 16px; }
.sponsor-apply button { float: right; padding: 0; background: none; color: #d71920; font-size: 12px; }
.sponsor-apply p { margin-top: 8px; color: #8a93a1; font-size: 12px; line-height: 1.7; }
.account-card { background: linear-gradient(180deg,#fff3f3,#fff); }
.account-top { display: flex; align-items: center; gap: 12px; }
.avatar { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: #f0f1f3; color: #9ca3af; }
.avatar svg { width: 28px; height: 28px; }
.account-top > div:nth-child(2) { flex: 1; }
.account-top strong { font-size: 16px; }
.account-top p { margin-top: 5px; color: #8a93a1; font-size: 11px; }
.account-top > span { padding: 5px 9px; border-radius: 20px; background: #eceef1; color: #8a93a1; font-size: 11px; }
.account-line { display: flex; align-items: center; gap: 9px; margin-top: 15px; padding-top: 12px; border-top: 1px solid #f0e9e9; color: #8a93a1; font-size: 12px; }
.account-line > span { flex: 1; }
.account-line b { max-width: 140px; overflow: hidden; color: #687385; font-size: 11px; font-weight: 400; text-overflow: ellipsis; }
.account-line button { padding: 0; background: none; color: #d71920; font-size: 11px; }
.account-line strong { color: #d71920; font-weight: 500; }
.account-actions { display: flex; gap: 10px; margin-top: 18px; }
.account-actions button { flex: 1; padding: 10px; border: 1px solid #d71920; border-radius: 999px; background: white; color: #d71920; font-weight: 700; }
.account-actions .primary { color: #fff; background: #d71920; }
.settings-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px; border: 1px solid #f0f1f3; border-radius: 12px; background: #fff; text-align: left; }
.settings-row > span { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #f6f7f9; color: #6b7280; }
.settings-row svg { width: 17px; height: 17px; }
.settings-row > div { flex: 1; }
.settings-row strong { display: block; font-size: 13px; font-weight: 500; }
.settings-row small { display: block; margin-top: 5px; color: #9ca3af; font-size: 11px; }
.settings-row > b { color: #c2c7ce; font-size: 22px; font-weight: 400; }
.about-card h2 { margin-bottom: 12px; color: #4b5563; font-size: 16px; }
.about-card > div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid #f0f1f3; font-size: 12px; }
.about-card > div span { color: #8a93a1; }
.about-card > div b { color: #536173; font-weight: 500; text-align: right; }
.about-card > p { margin-top: 15px; padding: 10px; border-radius: 9px; background: #fff0f0; color: #b37679; font-size: 11px; line-height: 1.6; text-align: center; }
/* Dialogs and bottom sheets. */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(13,18,28,.52); backdrop-filter: blur(3px); }
.sheet { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 425px; max-height: 88vh; overflow: hidden; border-radius: 24px 24px 0 0; background: #f6f7fa; box-shadow: 0 -16px 45px rgba(15,23,42,.22); animation: sheet-in .22s ease-out; }
@keyframes sheet-in { from { opacity: .65; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px 12px; border-bottom: 1px solid #edf0f4; background: #fff; }
.sheet-head h2 { color: #222b38; font-size: 17px; font-weight: 900; }
.sheet-head p { margin-top: 4px; color: #929aaa; font-size: 10px; }
.close-button { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; background: #f1f3f6; color: #596273; font-size: 24px; line-height: 1; }
.sheet-body { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 12px; }
.history-row { padding: 12px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: 0 4px 14px rgba(23,32,51,.045); }
.history-row-top { display: flex; justify-content: space-between; color: #8a93a1; font-size: 11px; }
.history-row-top b { color: #2e394b; font-size: 12px; }
.history-numbers { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.history-numbers i { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; color: #fff; font-size: 14px; font-style: normal; font-weight: 800; }
.history-numbers i:nth-child(3n+1) { background: #345cff; }
.history-numbers i:nth-child(3n+2) { background: #ef3347; }
.history-numbers i:nth-child(3n) { background: #24aa42; }
.dialog-card { position: relative; width: calc(100% - 40px); max-width: 380px; max-height: 85vh; margin: auto; overflow-y: auto; padding: 20px; border-radius: 20px; background: #fff; box-shadow: 0 20px 60px rgba(15,23,42,.2); }
.dialog-card .sheet-head { padding: 0 0 13px; }
.dialog-content { padding: 15px 0 20px; color: #687385; font-size: 13px; line-height: 1.8; }
.dialog-content h3 { margin: 12px 0 6px; color: #263447; font-size: 14px; }
.dialog-content ul { padding-left: 20px; }
.dialog-content form { display: flex; flex-direction: column; gap: 12px; }
.dialog-content label { color: #536173; font-size: 12px; }
.dialog-content input { display: block; width: 100%; margin-top: 6px; padding: 10px; border: 1px solid #e2e5e9; border-radius: 8px; }
.detail-number { display: flex; align-items: center; justify-content: center; width: 62px; height: 62px; margin: 0 auto 15px; border-radius: 50%; background: linear-gradient(145deg,#345cff,#102fd0); color: #fff; font-size: 26px; font-weight: 900; }
.detail-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.detail-grid > div { padding: 10px 4px; border-radius: 10px; background: #f6f7fa; text-align: center; }
.detail-grid small { display: block; color: #9ca3af; font-size: 10px; }
.detail-grid b { display: block; margin-top: 5px; color: #536173; }
.toast { position: fixed; left: 50%; bottom: 98px; z-index: 200; max-width: calc(100% - 48px); padding: 11px 18px; border-radius: 999px; background: rgba(23,32,51,.9); color: #fff; font-size: 12px; text-align: center; opacity: 0; transform: translate(-50%,10px); transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (max-width: 400px) {
  .draw-report-card { height: 176px; }
  .banner-art { padding: 21px 20px; }
  .banner-art strong { font-size: 17px; }
  .banner-phone { right: 40px; }
}
@media (max-width: 370px) {
  .home-partner-card { padding: 14px 4px 10px; }
  .home-partner-grid { column-gap: 3px; row-gap: 7px; }
  .home-partner-item { min-height: 78px; padding: 3px 0 2px; }
  .home-partner-logo { height: 58px; }
  .home-partner-name { font-size: 11px; }
  .draw-entry-card { min-height: 74px; padding: 9px 3px 8px; }
  .draw-entry-card b { font-size: 11px; }
  .banner-art strong { font-size: 16px; }
  .banner-art { padding: 17px; }
  .banner-phone { right: 27px; top: 30px; transform: rotate(14deg) scale(.85); }
  .banner-chart { right: 20px; transform: rotate(-6deg) scale(.85); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
