* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #fff; color: #222; }
body { font: 14px/1.4 Arial, "Microsoft YaHei", sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, a:focus-visible { outline: 2px solid #0865bc; outline-offset: -3px; }
.draw-widget { width: 100%; max-width: 800px; margin: 0 auto; }
.draw-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; }
.draw-tabs button { min-width: 0; min-height: 38px; padding: 5px 2px; border: 0; border-radius: 7px; background: #eee; color: #111; font-size: 17px; font-weight: bold; }
.draw-tabs button[aria-selected="true"] { background: #e81708; color: #fff; }
.tab-short { display: none; }
.draw-toolbar { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 5px 12px 1px; }
.draw-toolbar strong { font-size: 15px; color: #d8170c; }
.draw-toolbar > span { color: #666; font-size: 12px; }
.draw-toolbar a { margin-left: auto; color: #0865bc; text-decoration: none; font-size: 12px; }
.draw-toolbar button { padding: 2px 10px; border: 1px solid #ddd; border-radius: 4px; background: #fff; color: #444; font-size: 12px; }
.draw-balls { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) 14px minmax(0, 1fr); gap: clamp(3px, .8vw, 10px); align-items: start; padding: 3px 14px 2px; }
.draw-ball-slot { display: flex; align-items: center; flex-direction: column; min-width: 0; }
.draw-number { display: grid; place-items: center; width: 100%; max-width: 56px; aspect-ratio: 1; border-radius: 50%; color: #fff; font: bold clamp(20px, 4.5vw, 29px)/1 Arial, sans-serif; }
.draw-number-red { background: #ec3027; }
.draw-number-blue { background: #236ce9; }
.draw-number-green { background: #14964b; }
.draw-number-pending { background: #eee; color: #888; }
.draw-meta { margin-top: 3px; color: #444; font-size: 13px; white-space: nowrap; }
.draw-plus { align-self: start; padding-top: 14px; color: #555; font-size: 23px; text-align: center; }
.draw-footer { display: flex; align-items: center; justify-content: space-between; gap: 5px; flex-wrap: wrap; margin: 3px 10px 0; padding-top: 5px; border-top: 1px solid #eee; font-size: 12px; color: #555; }
.draw-footer strong { color: #df291e; font-variant-numeric: tabular-nums; }
.draw-notice { min-height: 18px; margin: 3px 10px; color: #a85a08; font-size: 12px; }
.draw-history { margin: 15px 10px; }
.draw-history h1 { margin: 0; padding: 8px; border-top: 2px solid #148437; background: #f2f2f2; font-size: 16px; }
.history-record { border: 1px solid #ddd; border-top: 0; padding: 9px; }
.history-title { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 12px; color: #555; }
.history-title strong { color: #111; }
.history-balls { display: flex; align-items: center; gap: 6px; }
.history-number { display: inline-grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: white; font-weight: bold; }
[hidden] { display: none !important; }
@media (max-width: 480px) {
  .draw-tabs button { min-height: 36px; font-size: 13px; }
  .tab-full { display: none; }
  .tab-short { display: inline; }
  .draw-toolbar { gap: 7px; padding-right: 8px; padding-left: 8px; }
  .draw-toolbar strong { font-size: 14px; }
  .draw-balls { padding-left: 8px; padding-right: 8px; }
  .draw-plus { padding-top: 8px; }
  .draw-meta { font-size: 12px; }
  .draw-footer { font-size: 11px; }
}
