* { box-sizing: border-box; }
:root { color-scheme: light; --green: #17aa40; --blue-ball: #2783eb; --green-ball: #16b918; --red-ball: #ee1005; }
html { scroll-behavior: smooth; background: white; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; color: #333; font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 3px solid #073eff; outline-offset: -3px; }
.site { width: 100%; max-width: 720px; margin: 0 auto; background: #fff; }
.analysis-entrances { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; padding: 8px 6px; background: #fff; border-top: 1px solid #91d7a5; border-bottom: 1px solid #91d7a5; }
.analysis-entrances a { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: clamp(56px,10vw,72px); padding: 10px 64px 10px 76px; border: 1px solid #f2b6b1; border-radius: 5px; background: linear-gradient(#fff9ed,#fff0e8); color: #f00; font-size: clamp(18px,4.8vw,34px); font-weight: 700; line-height: 1.3; text-align: center; white-space: nowrap; }
.analysis-entrances .analysis-horn { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: block; width: clamp(38px,7.1vw,50px); height: clamp(46px,8.5vw,60px); object-fit: contain; pointer-events: none; }
.analysis-entrances .analysis-title { display: inline-block; min-width: 0; font-size: 1em; transform-origin: center; animation: analysis-title-pulse 1.8s ease-in-out infinite; }
.analysis-entrances .analysis-title small { font-size: .76em; font-weight: inherit; }
.analysis-entrances a:nth-child(2) .analysis-title { animation-delay: -.9s; }
@keyframes analysis-title-pulse { 0%, 100% { transform: translateY(1px) scale(1); text-shadow: 0 0 0 #ff303000; } 50% { transform: translateY(-3px) scale(1.045); text-shadow: 0 2px 3px #fa303030, 0 0 12px #ff30304d; } }
.analysis-entrances a:nth-child(2) { border-color: #a9c9f4; background: linear-gradient(#f4faff,#eaf3ff); }
.analysis-entrances a:hover { filter: brightness(.97); }
.analysis-entrances a:active { background: #17aa40; border-color: #17aa40; }
.analysis-entrances .analysis-hot { position: absolute; top: 6px; right: 12px; color: #ffd037; font: italic 900 clamp(14px,2.8vw,21px)/1 Arial, sans-serif; letter-spacing: .5px; -webkit-text-stroke: .5px #b66b00; text-shadow: 0 1px 1px #aa5900, 0 0 7px #ffc83d80; pointer-events: none; animation: analysis-hot-bounce .9s ease-in-out infinite; }
@keyframes analysis-hot-bounce { 0%, 100% { transform: translateY(4px) scale(1); } 50% { transform: translateY(-4px) scale(1.08); } }
@media (max-width: 480px) { .analysis-entrances a { min-height: 66px; padding: 20px 34px 8px 56px; font-size: clamp(15px,4.4vw,21px); } .analysis-entrances .analysis-horn { left: 8px; width: 38px; height: 48px; } .analysis-entrances .analysis-hot { top: 7px; right: 10px; } }
.masthead { height: 58px; display: flex; align-items: center; justify-content: space-between; background: var(--green); padding: 2px 7px 2px 4px; }
.brand { display: flex; align-items: center; max-width: calc(100% - 62px); }
.brand img { display: block; width: 240px; height: 53px; max-width: 100%; object-fit: contain; object-position: left center; }
.brand-seal { display: block; width: 56px; height: 53px; object-fit: contain; }
.lottery-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: 46px; background: white; }
.lottery-tab { display: flex; gap: 1px; align-items: center; justify-content: center; padding: 0 2px; border: 0; border-radius: 26px; background: #eee; color: #080808; font-weight: 700; font-size: clamp(15px, 3.1vw, 22px); white-space: nowrap; }
.lottery-tab[aria-pressed="true"] { background: var(--green); color: white; }
.lottery-tab img { width: 25px; height: 25px; border-radius: 50%; flex-shrink: 0; }
.compact-draw { height: 42px; display: grid; grid-template-columns: 20% repeat(6, minmax(0, 1fr)) 20px minmax(0, 1fr); line-height: 20px; }
.compact-label { font-size: 14px; line-height: 20px; text-align: center; color: black; font-weight: 700; }
.compact-label button, .compact-history-link { display: block; border: 0; padding: 0; margin: 0 auto; color: red; background: #ff0; font-size: 16px; font-weight: 700; line-height: 20px; }
.mini-ball { min-width: 0; text-align: center; font-weight: 700; border: 1px solid #ddd; border-top: 0; }
.mini-value { display: block; color: white; font-size: 20px; line-height: 21px; }
.mini-animal { display: block; font-size: 18px; line-height: 19px; }
.mini-refresh { padding: 0; border: 0; color: #f00; background: #ff0; writing-mode: vertical-rl; text-orientation: upright; font-size: 14px; font-weight: 700; line-height: 18px; justify-self: center; align-self: center; }
.blue { background: var(--blue-ball); }
.green { background: var(--green-ball); }
.red { background: var(--red-ball); }
.pending { background: #e8eeeb; color: #486358; }
.ball.pending .ball-value, .mini-value.pending { font-size: 20px; }
.draw-connection-status { margin: 0; padding: 4px; font-size: 12px; line-height: 18px; color: #69756c; background: #f5f8f6; }
.draw-connection-status[hidden] { display: none; }
.draw-connection-status[data-state="live"] { color: #147637; }
.draw-connection-status[data-state="offline"], .draw-connection-status[data-state="reconnecting"] { color: #a15a00; background: #fff8e9; }
.hero { margin-top: 4px; }
.hero img { display: block; width: 100%; height: auto; border-radius: 5px; }
.announcement { container-type: inline-size; margin-top: 2px; padding: 3px 4px 5px; border-top: 1px solid #188b37; border-radius: 5px; background: linear-gradient(180deg,#ffffe5 0%,#effbff 40%,#54a5ff 100%); overflow: hidden; text-align: center; }
.announcement-line { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0; white-space: nowrap; font-family: "Microsoft YaHei",sans-serif; font-weight: 900; line-height: 1.03; }
.announcement-heading { font-size: 6.1cqi; min-height: 7.4cqi; }
.announcement-copy { color: #95001d; -webkit-text-stroke: .09em #fff; paint-order: stroke fill; animation: announcement-copy-flash 1.2s steps(2,end) infinite; }
.announcement-primary { color: #000; font-family: Arial,sans-serif; font-size: 1.02em; font-weight: 400; text-decoration: none; }
.announcement-backup { min-height: 8.7cqi; font-size: 8.3cqi; text-decoration: none; }
.announcement-backup .announcement-copy { display: inline-block; font-size: .92em; }
.announcement-domain { display: inline-flex; align-items: baseline; font-family: Arial,sans-serif; font-weight: 900; letter-spacing: -.045em; -webkit-text-stroke: .09em #fff; paint-order: stroke fill; animation: announcement-domain-hop .8s ease-in-out infinite; }
.announcement-digits-blue { color: #1717ff; animation: announcement-blue-flash 1.2s steps(2,end) infinite; }
.announcement-digits-red { color: #ff1717; animation: announcement-red-flash 1.2s steps(2,end) infinite; }
.announcement-suffix { color: #000; }
.announcement-backup:last-child .announcement-domain { animation-delay: -.4s; }
.announcement-backup:last-child .announcement-copy { animation-delay: -.6s; }
@keyframes announcement-domain-hop { 0%,100% { transform: translateY(1px); } 50% { transform: translateY(-3px); } }
@keyframes announcement-copy-flash { 0%,100% { color: #95001d; } 50% { color: #e60020; } }
@keyframes announcement-blue-flash { 0%,100% { color: #1717ff; } 50% { color: #006dff; } }
@keyframes announcement-red-flash { 0%,100% { color: #ff1717; } 50% { color: #d90014; } }
.draws { margin-top: 1px; }
.draw-card { padding: 4px 4px 0; border: 1px solid #00d225; border-top: 0; scroll-margin-top: 4px; }
.draw-header { height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.draw-title { margin: 0; font-size: 24px; font-weight: 400; line-height: 30px; white-space: nowrap; }
.issue { color: #ff180b; }
.countdown { font-family: Arial, sans-serif; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 30px; }
.history-button { background: none; border: 0; padding: 0; color: red; font-size: 24px; white-space: nowrap; line-height: 30px; }
.balls { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) 32px minmax(0, 1fr); gap: 6px; align-items: center; }
.ball { height: 74px; border-radius: 4px; display: flex; align-items: center; justify-content: flex-start; flex-direction: column; padding-top: 2px; color: white; min-width: 0; }
.ball-value { font-family: Arial, sans-serif; font-weight: 700; font-size: 40px; line-height: 43px; }
.ball-animal { margin-top: 2px; padding: 0 2px; border-radius: 2px; font-size: 20px; font-weight: 700; line-height: 20px; background: white; color: #333; }
.plus { text-align: center; font-family: Arial, sans-serif; font-size: 48px; font-weight: 700; line-height: 48px; }
.draw-footer { min-height: 41px; display: flex; align-items: center; justify-content: space-between; gap: 3px; }
.next-draw { font-size: 24px; line-height: 32px; white-space: nowrap; }
.refresh-button { background: #ff9600; border: 0; padding: 0 3px; color: #fff; border-radius: 4px; font-size: 24px; line-height: 30px; white-space: nowrap; }
.refresh-button:disabled { opacity: .65; cursor: wait; }
.directory { margin-top: 6px; }
.directory-banner { width: 100%; height: auto; display: block; }
.navigation-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.navigation-card { min-width: 0; text-align: center; font-weight: 700; color: black; }
.navigation-art { background: #ffffcc; height: 88px; display: flex; align-items: center; justify-content: center; }
.navigation-art img { width: 83px; height: 82px; max-width: 90%; object-fit: contain; border-radius: 17px; }
.navigation-title { display: flex; min-height: 44px; align-items: center; justify-content: center; padding: 2px; font-size: 20px; background: #effffb; }
.navigation-card:hover .navigation-title { background: #d7ffe9; }
.history-dialog { border: 2px solid var(--green); border-radius: 10px; padding: 16px; width: min(560px, calc(100% - 24px)); max-height: calc(100% - 40px); color: #333; }
.history-dialog::backdrop { background: #0007; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-heading h2 { margin: 0; font-size: 22px; }
.close-dialog { border: 0; background: #eee; border-radius: 50%; width: 32px; height: 32px; font: 28px/28px Arial; }
.history-meta { font-size: 15px; margin: 0 0 14px; line-height: 1.6; }
.history-dialog .balls { grid-template-columns: repeat(6, minmax(0, 1fr)) 18px minmax(0, 1fr); gap: 4px; }
.history-dialog .ball { height: 64px; }
.history-dialog .ball-value { font-size: 28px; line-height: 32px; }
.history-dialog .ball-animal { font-size: 16px; line-height: 18px; }
.history-dialog .plus { font-size: 28px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 9px 18px; border-radius: 6px; background: #222e; color: #fff; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 10; }
.toast.is-visible { opacity: 1; }
@media (max-width: 560px) {
  .lottery-tab { font-size: clamp(15px, 4vw, 20px); }
  .lottery-tab img { width: 22px; height: 22px; }
  .draw-header { height: 36px; gap: 3px; }
  .draw-title, .history-button { font-size: clamp(14px, 3.34vw, 20px); }
  .countdown { font-size: clamp(17px, 3.62vw, 24px); }
  .balls { grid-template-columns: repeat(6, minmax(0, 1fr)) 20px minmax(0, 1fr); gap: 4px; }
  .ball { height: clamp(52px, 10.28vw, 70px); }
  .ball-value { font-size: clamp(24px, 5.56vw, 36px); line-height: 1.12; }
  .ball-animal { font-size: 16px; line-height: 17px; margin-top: 3px; }
  .plus { font-size: 32px; }
  .draw-footer { min-height: 35px; }
  .next-draw { font-size: clamp(12px, 3.34vw, 19px); line-height: 28px; }
  .refresh-button { font-size: clamp(16px, 3.34vw, 21px); line-height: 26px; }
  .navigation-title { font-size: clamp(14px, 3.34vw, 19px); }
  .navigation-art { height: 87px; }
  .navigation-art img { width: min(83px, 90%); height: auto; }
  .compact-label { font-size: 12px; }
  .compact-label button, .compact-history-link { font-size: 13px; }
  .mini-value { font-size: 17px; }
  .mini-animal { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .toast { transition: none; } }
