.draw-widget { container-type: inline-size; padding: .7cqw .65cqw 2.4cqw; margin-top: 1.2cqw; background: #f6f6f8; color: #090909; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-weight: 700; }
.draw-tabs { display: grid; grid-template-columns: 18% 14% 22% 23%; gap: 1.3cqw; position: relative; align-items: end; padding-bottom: 0; }
.draw-tabs button { position: relative; z-index: 1; min-width: 0; padding: 1.05cqw .3cqw 1.1cqw; border: .22cqw solid #c8d4e4; border-bottom: none; border-radius: .5cqw .5cqw 0 0; background: linear-gradient(#fff, #f3f4f6); color: #222; font: inherit; font-size: clamp(11px, 2.9cqw, 37px); line-height: 1.35; white-space: nowrap; cursor: pointer; }
.draw-tabs button[aria-selected="true"] { z-index: 3; margin-bottom: -.22cqw; padding-bottom: 1.32cqw; border-color: #e80000; background: #f6f6f8; color: #43a4da; text-shadow: 0 1px #fff; }
.draw-tabs button:hover { color: #2199db; }
.draw-panel { position: relative; z-index: 2; padding: 2.9cqw 1.8cqw 2.7cqw; border: .22cqw solid #e80000; }
.draw-heading { display: flex; align-items: center; justify-content: space-between; gap: 1cqw; margin-bottom: 2.2cqw; }
.draw-heading h2 { margin: 0; font-size: clamp(12px, 3.1cqw, 40px); line-height: 1.4; font-weight: 700; }
.draw-history-button { flex: none; padding: .25cqw 0; border: 0; background: transparent; color: #e90000; font: inherit; font-size: clamp(11px, 3.1cqw, 39px); line-height: 1.4; cursor: pointer; }
.draw-history-button:hover { text-decoration: underline; }
.draw-accent { color: #ed0000; font-style: normal; }
.draw-balls { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .45cqw; }
.draw-card { display: flex; min-width: 0; min-height: clamp(78px, 17.5cqw, 224px); flex-direction: column; align-items: center; justify-content: center; gap: 1cqw; padding: 1.4cqw .4cqw 1cqw; border: .2cqw solid #dcdcdc; border-radius: 1.3cqw; background: linear-gradient(#fff, #ededed); box-shadow: 0 0 .8cqw #00000017; }
.draw-card.is-empty { min-height: clamp(78px, 14cqw, 178px); }
.draw-card.is-special { border-color: var(--ball-edge); box-shadow: 0 0 1cqw color-mix(in srgb, var(--ball-edge) 35%, transparent); }
.draw-ball { position: relative; isolation: isolate; display: grid; flex: none; place-items: center; width: 9.5cqw; max-width: calc(100% - 4px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 32% 20%, #f7ffff 0%, var(--ball-light) 22%, var(--ball-fill) 52%, var(--ball-edge) 81%, var(--ball-light) 100%); box-shadow: inset .13cqw .2cqw .3cqw #ffffffa6, inset -.2cqw -.2cqw .4cqw #00000012; }
.draw-ball::before { content: ""; position: absolute; z-index: -1; inset: 12%; border-radius: 50%; border: .35cqw solid #ffffff8f; background: linear-gradient(130deg, #fff 25%, #fff 65%, #e9e9e9); box-shadow: 0 0 .4cqw #ffffffb8, inset .1cqw .2cqw .4cqw #00000012; }
.draw-ball-number { color: #000; font-family: Arial, sans-serif; font-weight: 800; font-size: 4.45cqw; line-height: 1; letter-spacing: -.1cqw; }
[data-ball-color="blue"] { --ball-light: #9eeafa; --ball-fill: #03b9f0; --ball-edge: #008cce; }
[data-ball-color="red"] { --ball-light: #ffb4b6; --ball-fill: #ff151e; --ball-edge: #eb0007; }
[data-ball-color="green"] { --ball-light: #c9f8ae; --ball-fill: #50d324; --ball-edge: #0ba500; }
.draw-zodiac { font-size: clamp(12px, 3.7cqw, 47px); line-height: 1.15; font-weight: 800; }
.draw-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1.5cqw; margin-top: 2cqw; }
.draw-schedule { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: .2em; margin: 0; font-size: clamp(11px, 3.1cqw, 40px); line-height: 1.5; }
.draw-schedule > span { white-space: nowrap; }
.draw-refresh { flex: none; min-width: 12cqw; min-height: 4.7cqw; padding: .25cqw 1.5cqw; border: 0; border-radius: 99px; background: #e90000; color: #fff; font: inherit; font-size: clamp(14px, 3.1cqw, 40px); letter-spacing: .4cqw; cursor: pointer; }
.draw-refresh:hover { background: #c90000; }
.draw-refresh:disabled { opacity: .65; cursor: progress; }
.draw-status { margin: 0; color: #778194; font-size: clamp(11px, 1.2cqw, 15px); line-height: 1.6; }
.draw-status:not(:empty) { margin-top: 1cqw; }
.draw-footer { display: flex; justify-content: flex-end; gap: 24px; padding: 12px 18px; background: #f6f6f8; }
.draw-footer a { display: inline-flex; align-items: center; min-height: 36px; color: #707a8e; font-size: 12px; text-decoration: none; }
.draw-history-dialog { width: min(1020px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 14px; background: #f5f7fb; color: #202b3b; box-shadow: 0 20px 80px #0004; }
.draw-history-dialog::backdrop { background: #111b35ae; backdrop-filter: blur(4px); }
.draw-dialog-heading { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #e2e7f0; background: #fff; }
.draw-dialog-heading h2 { margin: 0; font-size: 18px; font-weight: 600; }
.draw-dialog-close { width: 44px; height: 44px; border: 0; border-radius: 8px; background: #f0f3f8; color: #34445c; font-size: 28px; cursor: pointer; }
.draw-history-content { padding: 16px; }
.draw-history-message { margin: 24px 0; color: #778194; text-align: center; font-size: 14px; }
.draw-history-record { padding: 16px; margin-bottom: 12px; border: 1px solid #e3e8f2; border-radius: 10px; background: #fff; }
.draw-history-record header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 14px; font-size: 14px; }
.draw-history-record header time { color: #798396; font-size: 12px; }
.draw-history-balls { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.draw-history-balls .draw-card { min-height: 0; padding: 8px 2px; gap: 6px; border-width: 1px; border-radius: 8px; box-shadow: none; }
.draw-history-balls .draw-ball { width: min(8vw, 78px); }
.draw-history-balls .draw-ball-number { font-size: clamp(13px, 3.1vw, 34px); letter-spacing: 0; }
.draw-history-balls .draw-zodiac { font-size: clamp(12px, 2.8vw, 23px); }
.draw-widget button:focus-visible, .draw-history-dialog button:focus-visible { outline: 3px solid #f1a628; outline-offset: 2px; }
body.draw-history-open { overflow: hidden; }
@media (max-width: 600px) {
  .draw-widget { margin-top: 12px; padding: 6px 5px 12px; }
  .draw-tabs { grid-template-columns: 1.1fr .8fr 1.3fr 1.3fr; gap: 5px; }
  .draw-tabs button { min-height: 38px; padding: 7px 1px; border-width: 1px; border-radius: 4px 4px 0 0; font-size: clamp(10px, 3cqw, 17px); }
  .draw-tabs button[aria-selected="true"] { margin-bottom: -2px; padding-bottom: 9px; }
  .draw-panel { padding: 14px 7px 12px; border-width: 1px; }
  .draw-heading { gap: 4px; margin-bottom: 12px; }
  .draw-history-button { min-height: 32px; }
  .draw-balls { gap: 3px; }
  .draw-card { padding: 9px 1px 7px; border-width: 1px; border-radius: 7px; gap: 7px; }
  .draw-ball { max-width: calc(100% - 2px); }
  .draw-bottom { margin-top: 12px; gap: 8px; }
  .draw-refresh { min-height: 36px; min-width: 52px; letter-spacing: 1px; }
  .draw-history-content { padding: 8px; }
  .draw-history-record { padding: 10px 6px; }
  .draw-history-balls { gap: 3px; }
}
