*{box-sizing:border-box}html{background:#c2d6f9 url('public/assets/target/backgrounds/bg.jpg') top center/1920px auto no-repeat fixed;scroll-padding-top:16px}body{margin:0;color:#141414;font:16px/1.65 Arial,'Microsoft YaHei',sans-serif}.site{max-width:806px;margin:0 auto;background:#fff;border-inline:3px solid #009cff;min-height:100vh}a{color:inherit;text-decoration:none}button,a{-webkit-tap-highlight-color:transparent}a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #f0a600;outline-offset:2px}img{max-width:100%;vertical-align:middle}.logo img{display:block;width:100%;height:auto}.draw-panel{padding:8px 10px 9px;border-bottom:1px solid #ddd}.draw-heading{display:flex;justify-content:space-between;align-items:center}.draw-heading h1{font-size:18px;color:#d10d0d;margin:0}.draw-heading a{color:#d00000;font-size:14px;text-decoration:underline}#draw-info{font-size:14px;color:#444}.balls{display:grid;grid-template-columns:repeat(6,minmax(0,1fr)) 12px minmax(0,1fr);gap:5px;margin:7px 0}.ball{min-width:0;text-align:center;color:#fff;border-radius:5px;padding:3px 0;background:#007bdc}.ball b{display:block;font-size:30px;line-height:1.2}.ball small{display:block;font-size:13px;line-height:1.6}.ball.red{background:#e5130c}.ball.green{background:#08ac32}.ball.blue{background:#147cdd}.plus{align-self:center;text-align:center;font-size:20px;font-weight:bold}#next-info{font-size:14px;margin:3px 0;color:#333}.navigation{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;padding:8px 6px;background:#fff}.navigation a{display:flex;justify-content:center;align-items:center;min-height:34px;min-width:0;background:#086eac;border-radius:22px;color:white;text-align:center;font-size:16px;line-height:1.25;padding:4px 1px}.navigation a:hover{background:#044f84}.notice{margin:0;padding:6px 9px;background:#fff8d5;border-block:1px solid #f2d886;font-size:13px;color:#784900}.notice span{margin-left:8px;color:#17712d}#page-error{padding:12px;color:#a40000;background:#fff0ed}.board{margin:0 6px 12px;scroll-margin-top:12px}.column-banner{display:block;width:100%;height:auto;margin:8px auto 0}.board-heading{margin:0;padding:3px 6px;color:#ae1205;font-size:19px;text-align:center;border:1px solid #d6a65f;border-bottom:0;background:#fff5d7}.history-row{display:grid;grid-template-columns:76px minmax(0,1fr) 118px;gap:6px;align-items:center;min-width:0;padding:7px 8px;border:1px solid #dfc998;border-top:0;background:#fff;line-height:1.6}.history-row:first-of-type{border-top:1px solid #dfc998}.history-row:nth-of-type(even){background:#fffdf3}.history-row.is-current{background:#fff8c7;border-color:#dbba5b}.issue{font-weight:bold;color:#191919;white-space:nowrap;font-size:16px}.prediction{min-width:0;overflow-wrap:anywhere;color:#d60000;font-size:18px;font-weight:bold}.prediction .value-0{color:#d00000}.prediction .value-1{color:#064ddd}.prediction .value-2{color:#07852a}.prediction .bracket{color:#626262;font-weight:normal}.prediction .label{color:#333;font-size:15px;font-weight:normal}.result{text-align:right;font-size:14px;white-space:normal}.drawn-number{color:#202020;white-space:nowrap}.verdict{display:inline-block;min-width:22px;margin-left:4px;text-align:center;font-size:18px;font-weight:bold}.verdict.hit{color:#d50000}.verdict.miss{color:#0750cb}.pending{display:block;color:#965a00;font-weight:bold;font-size:15px}.pending-note{color:#666;font-size:12px}.more-history{border:1px solid #dfc998;border-top:0}.more-history summary{padding:5px 8px;text-align:center;background:#f7f7f7;color:#215d8e;font-size:13px;cursor:pointer}.more-history .history-row{border-inline:0}.history-note{margin:0;padding:4px 8px;border:1px solid #dfc998;border-top:0;color:#6b6250;font-size:12px}.gallery{margin:12px 6px;scroll-margin-top:12px}.gallery h2,.number-table h2,.draw-history h2{margin:0;padding:5px 8px;text-align:center;color:#fff;background:linear-gradient(#9e2b04,#572700);font-size:21px}.gallery-note{margin:0;padding:5px 8px;color:#925216;background:#fff3ce;text-align:center;font-size:14px}.image-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:6px 0}.image-card{min-width:0;margin:0;border:1px solid #d9b881;background:#fffdf7;align-self:start}.image-card a{display:block;padding:3px}.image-card img{display:block;width:100%;height:auto;object-fit:contain}.image-card figcaption{text-align:center;color:#985017;font-size:14px;line-height:1.45;font-weight:bold;padding:4px 2px;overflow-wrap:anywhere}.image-card figcaption small{font-size:12px;font-weight:normal}.gallery-banner{display:block;width:100%;height:auto}.number-table{margin-top:10px}.number-table img{width:100%;height:auto}.number-table p{font-size:12px;text-align:center;margin:4px 8px;color:#666}.draw-history{margin:12px 6px}.draw-history-row{display:grid;grid-template-columns:75px minmax(0,1fr);gap:6px;padding:6px 9px;border:1px solid #ccc;border-top:0}.draw-history-row span{color:#be1010;word-spacing:5px;overflow-wrap:anywhere}footer{text-align:center;font-size:13px;padding:12px 8px 20px;border-top:2px solid #0a9df3}footer p{margin:2px 0}footer a{text-decoration:underline;color:#0366a6}.back-top{position:fixed;right:10px;bottom:15px;border-radius:50%;background:#086eac;color:white;display:grid;place-items:center;width:36px;height:36px;font-size:25px;box-shadow:0 1px 5px #5555}dialog{padding:0;width:calc(100vw - 16px);max-width:1250px;max-height:calc(100dvh - 20px);border:2px solid #0a75b1;border-radius:5px;overflow:hidden;background:#fff}dialog::backdrop{background:#000c}.viewer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;background:#0667a3;color:#fff}.viewer-toolbar strong{font-size:15px}.viewer-toolbar button{border:1px solid #fff;background:#fff;color:#075a91;padding:5px 10px;font-size:15px;cursor:pointer;white-space:nowrap}.viewer-scroll{overflow:auto;max-height:calc(100dvh - 100px);text-align:center;padding:5px}.viewer-scroll img{max-width:none;width:auto;height:auto}.viewer-scroll p{font-size:13px;color:#555}.scroll-lock{overflow:hidden}
@media(max-width:750px){.site{width:100%;border:0}.logo img{max-height:none}.navigation{gap:5px;padding:7px 5px}.navigation a{font-size:13px;min-height:31px}.draw-panel{padding:6px}.draw-heading h1{font-size:16px}.ball b{font-size:25px}.ball small{font-size:11px}.balls{gap:4px;grid-template-columns:repeat(6,minmax(0,1fr)) 9px minmax(0,1fr)}.notice{font-size:12px}.board{margin:0 4px 10px}.column-banner{margin-top:6px}.board-heading{font-size:17px}.history-row{grid-template-columns:65px minmax(0,1fr);gap:3px 6px;padding:6px}.issue{font-size:14px;grid-column:1;grid-row:1}.prediction{grid-column:1/-1;grid-row:2;font-size:17px;text-align:center;line-height:1.7}.prediction .label{font-size:14px}.result{grid-column:2;grid-row:1;font-size:13px}.pending{display:inline;font-size:14px}.pending-note{margin-left:6px}.verdict{font-size:16px}.gallery{margin:9px 4px}.image-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.image-card a{padding:2px}.image-card figcaption{font-size:13px}.gallery h2,.number-table h2,.draw-history h2{font-size:18px}.history-note{font-size:11px}.draw-history-row{font-size:14px}.viewer-scroll img{max-width:none}.back-top{width:32px;height:32px;right:7px;opacity:.88}}

/* Reuse the banner artwork, while showing the real autonomous column name. */
.column-strip{position:relative;margin-top:8px;background:white;border-bottom:4px solid #c4cd33;overflow:hidden}
.column-strip .column-banner{margin:0;clip-path:inset(0 38% 0 0)}
.column-strip .board-heading{position:absolute;left:63%;right:0;top:0;bottom:0;margin:0;padding:3px 5px;display:flex;align-items:center;justify-content:center;border:0;background:linear-gradient(#fff 80%,#fafbcc);font:bold clamp(17px,3vw,29px)/1.25 KaiTi,'Microsoft YaHei',sans-serif;color:#c91000;text-align:center;overflow-wrap:anywhere}
.issue small{display:block;font-size:11px;line-height:1.3;color:#885700}
@media(max-width:750px){.column-strip{margin-top:6px;border-bottom-width:3px}.column-strip .board-heading{font-size:clamp(16px,4.1vw,21px)}.issue small{font-size:11px}}

/* Traditional reference presentation; data and column semantics stay unchanged. */
.navigation{gap:7px 8px;padding:7px 8px}
.navigation a{background:#086eac;border-radius:20px;min-height:32px}
.notice{background:#fff;color:#333;border-block:1px solid #009cff;padding:5px 8px;font-size:12px}
.board{margin:0 0 14px}
.column-strip{margin-top:8px;border-bottom:3px solid #c5ce27}
.column-strip .board-heading{font-size:clamp(20px,3.3vw,38px);font-weight:900;font-style:italic;flex-wrap:wrap;align-content:center;background:linear-gradient(#fff 86%,#f2f7b4)}
.column-strip .board-heading[data-long="true"]{font-size:clamp(16px,2vw,24px)}
.title-0{color:#e60000}.title-1{color:#068d3b}.title-2{color:#0758da}.title-3{color:#d88b00}
.history-row{grid-template-columns:80px minmax(0,1fr) 80px;gap:0;padding:0;border:0;border-bottom:1px solid #aaa;align-items:stretch;line-height:1.65;background:#fff}
.history-row:first-of-type{border-top:0}
.history-row:nth-of-type(even),.history-row.is-current{background:#fff;border-color:#aaa}
.issue{display:flex;flex-direction:column;justify-content:center;align-items:center;align-self:stretch;background:#000;color:#fff;padding:5px 3px;font-size:16px;line-height:1.5;grid-column:1;grid-row:1}
.issue small{display:block;font-size:11px;line-height:1.3;color:#ffed00}
.prediction{grid-column:2;grid-row:1;align-self:center;padding:7px 8px;font-size:18px;line-height:1.7;text-align:center}
.prediction .label{color:#111;font-size:15px}.prediction .bracket{color:#111}
.prediction .value-0{color:#ee0000}.prediction .value-1{color:#004bff}.prediction .value-2{color:#008f32}
.result{grid-column:3;grid-row:1;display:flex;flex-wrap:wrap;justify-content:center;align-content:center;align-items:center;gap:3px;padding:5px 4px;text-align:center;font-size:14px}
.drawn-number{color:#111;white-space:nowrap}
.verdict{margin:0;min-width:23px;padding:0 2px;background:#ff0;font-size:18px;line-height:1.35;color:#d60000}
.verdict.miss{color:#0046dc}
.pending{color:#333;font-size:14px}.pending-note{color:#777;font-size:11px;margin:0}
.gallery{margin:10px 0 14px}
.gallery h2,.number-table h2,.draw-history h2{background:#ff0;color:#d60000;border-block:1px solid #c4b600;font-size:21px}
.gallery-note{background:#fff;color:#333;border-bottom:1px solid #ccc}
.image-card{border-color:#aaa;background:#fff}.image-card figcaption{color:#111}
.image-grid{gap:6px;padding:6px 3px}
.draw-history{margin-inline:0}
.draw-history-row{border:0;border-bottom:1px solid #aaa;padding:0;gap:0;grid-template-columns:66px minmax(0,1fr);align-items:stretch}
.draw-history-row b{background:#000;color:#fff;text-align:center;padding:5px 3px}
.draw-history-row span{align-self:center;padding:5px 8px}
.back-top{position:static;margin:10px auto 0;width:112px;height:30px;border-radius:18px;font-size:14px;right:auto;bottom:auto;opacity:1;color:#fff;text-decoration:none;box-shadow:none}
@media(max-width:750px){
 .navigation{gap:5px;padding:6px 5px}.navigation a{font-size:13px;min-height:30px}
 .board{margin:0 0 12px}.column-strip{margin-top:6px}
 .column-strip .board-heading{font-size:clamp(17px,4.8vw,23px)}
 .column-strip .board-heading[data-long="true"]{font-size:14px}
 .history-row{grid-template-columns:56px minmax(0,1fr) 56px;gap:0;padding:0}
 .issue{font-size:13px;grid-column:1;grid-row:1;padding:4px 2px}.issue small{font-size:10px}
 .prediction{grid-column:2;grid-row:1;padding:6px 5px;font-size:15px;line-height:1.75;text-align:center}
 .prediction .label{font-size:12px}
 .result{grid-column:3;grid-row:1;padding:4px 2px;font-size:12px;gap:2px}
 .verdict{font-size:15px;min-width:21px}.pending{font-size:12px}.pending-note{font-size:10px;margin:0}
 .gallery{margin:8px 0 12px}.image-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:5px 3px}
 .gallery h2,.number-table h2,.draw-history h2{font-size:18px}
 .draw-history-row{grid-template-columns:49px minmax(0,1fr);font-size:13px}.draw-history-row span{padding:5px}
 .back-top{width:112px;height:30px;right:auto;opacity:1}
}

/* All 30 banner titles fit their own region; source bitmap files stay untouched. */
.column-strip .column-banner{width:92%;height:auto}
.column-strip .board-heading{left:58%;padding:3px 6px;flex-direction:column;flex-wrap:nowrap;gap:0;align-items:center;justify-content:center;overflow:visible}
.heading-main{display:block;width:max-content;max-width:none;line-height:1.08;font-weight:900;white-space:nowrap}
.heading-note{display:block;font:700 16px/1.2 'Microsoft YaHei',sans-serif;text-align:center;white-space:nowrap}
.prediction{text-align:center}
.label-24{display:block;text-align:center}
.numbers-24{display:flex;flex-direction:column;align-items:center;gap:2px;width:100%;font-size:22px;font-weight:bold}
.code-line{display:flex;justify-content:center;align-items:center;gap:2px;width:max-content;white-space:nowrap}
.codes-grid{display:grid;grid-template-columns:repeat(8,2ch);gap:12px}
.code-number{font-variant-numeric:tabular-nums;text-align:center}
.result{overflow-wrap:anywhere}
.drawn-number{white-space:normal}
@media(max-width:750px){
 .heading-note{font-size:11px}
 .prediction{text-align:center}
 .numbers-24{font-size:17px;gap:1px}
 .codes-grid{gap:5px}
}

/* Each actual period is one centered unit, with no left/right status rails. */
.history-row{display:block;padding:7px 8px}
.period-unit{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 9px;width:fit-content;max-width:100%;margin-inline:auto;text-align:center}
.period-unit .issue{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:3px;align-self:center;padding:2px 5px;line-height:1.5;flex:0 0 auto}
.period-unit .issue small{display:inline}
.period-unit .prediction{flex:0 1 auto;max-width:100%;min-width:0;padding:2px 0;text-align:center}
.period-unit .result{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;gap:4px;padding:0;text-align:center}
.period-unit .drawn-number{white-space:nowrap}
.period-unit-24{flex-direction:column;flex-wrap:nowrap;gap:3px}
.period-meta{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:5px 9px;width:fit-content;max-width:100%;margin-inline:auto}
.period-unit-24 .prediction{flex:none;width:100%}
@media(max-width:750px){.history-row{padding:6px 4px}.period-unit{column-gap:6px}.period-unit .issue{padding:2px 4px}.period-unit .result{gap:3px}.period-meta{gap:4px 7px}}

/* Only 24-code rows: one compact left/middle/right unit on every viewport. */
.period-unit-24{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center;gap:6px}
.period-unit-24 .prediction{flex:0 0 auto;width:max-content;max-width:none}
.period-unit-24 .issue{flex-direction:column;gap:0}
.period-unit-24 .result{flex-direction:column;gap:2px}
@media(max-width:750px){
 .period-unit-24{gap:5px}
 .period-unit-24 .numbers-24{font-size:16px}
 .period-unit-24 .codes-grid{gap:4px}
 .period-unit-24 .code-line{gap:1px}
 .period-unit-24 .result{font-size:12px;gap:2px}
}

/* Isolated 2x12 feasibility trial; the 49261 baseline remains 3x8. */
.period-unit-24 .numbers-24{font-size:18px}
.period-unit-24 .codes-grid{grid-template-columns:repeat(12,2ch);gap:2px}
.period-unit-24 .code-line{gap:1px}
@media(max-width:750px){
 .period-unit-24{gap:4px}
 .period-unit-24 .issue{font-size:12px;padding-inline:3px}
 .period-unit-24 .numbers-24{font-size:14px}
 .period-unit-24 .codes-grid{grid-template-columns:repeat(12,2ch);gap:1px}
 .period-unit-24 .result{font-size:11px;gap:1px}
 .period-unit-24 .verdict{font-size:14px;min-width:19px}
}

/* Trial correction: keep the draw result and verdict on one right-side line. */
.period-unit-24 .result{flex-direction:row;flex-wrap:nowrap;align-items:center;white-space:nowrap;gap:4px}
@media(max-width:750px){.period-unit-24 .result{flex-direction:row;flex-wrap:nowrap;gap:3px;white-space:nowrap}}

/* Rule explanations are presentation-only; source data and settlement stay unchanged. */
.board-rule-note{margin:0;padding:6px 12px 8px;border-bottom:1px solid #d9a1bb;background:#fff;text-align:center;color:#a01867;font-size:21px;font-weight:700;line-height:1.35;overflow-wrap:anywhere}
.board-rule-note .rule-note-line{display:block;margin:1px auto;max-width:100%;white-space:normal}
.board-rule-note small{display:block;margin-top:2px;color:#7c526a;font-size:12px;font-weight:400;line-height:1.3}
.board-rule-note[data-rule-status="待确认"]{color:#96375f;background:#fff9fc}
@media(max-width:750px){.board-rule-note{padding:5px 8px 7px;font-size:16px;line-height:1.4}.board-rule-note small{font-size:11px}}
 .gallery-banner-wrap{position:relative;line-height:0}.gallery-brand-redaction{position:absolute;left:39.5%;bottom:0;width:45.5%;height:29%;background:#fff;pointer-events:none}
.row-title{display:inline-block;margin-right:6px;color:#222;font-size:.9em;font-weight:700;white-space:nowrap}.row-data{display:inline}.period-unit-24 .prediction{text-align:center}.period-unit-24 .row-title{display:block;margin:0 auto 2px}.period-unit-24 .row-data{display:block}
.board-rule-note.rule-note-grid-2x2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:14px;row-gap:2px;align-items:center}.rule-note-grid-2x2 .rule-note-line{margin:0}.rule-note-grid-2x2 small{grid-column:1/-1}
@media(max-width:750px){.board-rule-note.rule-note-grid-2x2{column-gap:6px;row-gap:1px}.rule-note-grid-2x2 .rule-note-line{font-size:15px}}

/* Isolated multi-lottery presentation. Each tab uses only its own API identity. */
.lottery-tabs{display:flex;gap:6px;margin:7px 0 8px;border-bottom:1px solid #0b75b2;padding-bottom:5px}
.lottery-tab{flex:1;min-width:0;border:1px solid #0b75b2;border-radius:16px;background:#eef8ff;color:#075a91;padding:5px 6px;font:700 14px/1.3 'Microsoft YaHei',sans-serif;cursor:pointer}
.lottery-tab[aria-selected="true"]{background:#0877b5;color:#fff}
.lottery-source-note{margin:3px 0 7px;padding:5px 7px;border:1px solid #e2c87b;background:#fff9df;color:#765700;font-size:12px;line-height:1.45;text-align:center}
.lottery-source-note[hidden]{display:none}
@media(max-width:750px){.lottery-tabs{gap:4px;margin:5px 0 6px}.lottery-tab{border-radius:13px;padding:4px 2px;font-size:12px}.lottery-source-note{font-size:11px}}



/* Keep each 九肖中特 period, prediction, draw and verdict on one centered line. */
#board-D27 .period-unit{flex-wrap:nowrap;gap:4px;width:100%}
#board-D27 .period-unit .issue{font-size:clamp(13px,calc(1.5vw + 8px),18px);padding-inline:3px}
#board-D27 .period-unit .prediction{flex:0 1 auto;min-width:0;padding-inline:0;font-size:clamp(13px,calc(1.5vw + 8px),18px);white-space:nowrap;overflow:visible}
#board-D27 .period-unit .row-title{margin-right:2px}
#board-D27 .period-unit .row-data{white-space:nowrap}
#board-D27 .period-unit .result{flex:0 0 auto;gap:2px;font-size:clamp(12px,calc(1vw + 8px),14px);white-space:nowrap}
#board-D27 .period-unit .verdict{min-width:0;margin-left:1px;font-size:1.15em}
@media(max-width:750px){#board-D27 .period-unit{gap:3px}#board-D27 .period-unit .issue{padding-inline:2px}}

/* Clear local draw-history table: real rows stay readable without importing an external history page. */
.draw-history{margin:14px 0 0;border-top:2px solid #0a9df3}
.draw-history h2{font-size:22px}
.draw-history-table{width:100%;overflow:hidden;border-inline:1px solid #1768d8;background:#fff}
.draw-history-head,.draw-history-row{display:grid;grid-template-columns:88px minmax(0,1fr) 78px minmax(112px,.72fr);min-width:0;column-gap:4px;align-items:stretch}
.draw-history-head{background:#9aff00;color:#111;border-bottom:2px solid #1768d8;text-align:center;font-size:14px;line-height:1.3}
.draw-history-head b{display:flex;align-items:center;justify-content:center;min-width:0;padding:6px 3px;border-right:1px solid #1768d8;font-weight:700}
.draw-history-head b:last-child{border-right:0}
.draw-history-row{min-height:86px;border-bottom:1px solid #1768d8;background:#fff}
.draw-history-row:nth-child(even){background:#fbfdff}
.draw-history-issue{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;background:#000;color:#fff;text-align:center;line-height:1.25}
.draw-history-issue strong{font-size:14px;font-weight:700}
.draw-history-issue b{font-size:18px;font-weight:800}
.draw-history-regular{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:center;gap:4px;min-width:0;padding:8px 3px}
.history-ball{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:52px;padding:3px 1px;border:1px solid #fff;border-radius:8px;color:#fff;line-height:1.05;text-align:center;box-shadow:0 1px 2px #0003}
.history-ball b{font-size:18px;font-weight:800;font-variant-numeric:tabular-nums}
.history-ball small{margin-top:3px;font-size:11px;line-height:1;white-space:nowrap}
.history-ball.red{background:#e5130c}.history-ball.blue{background:#147cdd}.history-ball.green{background:#08ac32}
.draw-history-special{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;padding:5px 2px;border-inline:1px solid #d4e2f4}
.history-label{font-size:12px;color:#333;font-weight:700}
.draw-history-special .history-ball{width:54px;max-width:100%;min-height:54px;border-radius:50%}
.draw-history-special .history-ball b{font-size:19px}
.draw-history-attributes{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;padding:5px 3px;text-align:center;line-height:1.35}
.draw-history-attributes strong{font-size:11px;color:#333}.draw-history-attributes span{font-size:13px;color:#333;overflow-wrap:anywhere}
.draw-history-table .history-empty{grid-column:1/-1;margin:0;padding:14px;text-align:center;color:#666}
@media(max-width:750px){
 .draw-history{margin-top:10px}
 .draw-history h2{font-size:18px}
 .draw-history-head,.draw-history-row{grid-template-columns:56px minmax(0,1fr) 48px 72px;column-gap:2px}
 .draw-history-head{font-size:10px}
 .draw-history-head b{padding:5px 1px}
 .draw-history-row{min-height:72px}
 .draw-history-issue strong{font-size:10px}.draw-history-issue b{font-size:14px}
 .draw-history-regular{gap:2px;padding:6px 2px}
 .history-ball{min-height:42px;padding:2px 0;border-radius:6px}
 .history-ball b{font-size:14px}.history-ball small{margin-top:2px;font-size:9px}
 .draw-history-special{padding-inline:1px}.history-label{font-size:10px}
 .draw-history-special .history-ball{width:40px;min-height:40px}.draw-history-special .history-ball b{font-size:15px}
 .draw-history-attributes{padding-inline:1px}.draw-history-attributes strong{font-size:9px}.draw-history-attributes span{font-size:10px;line-height:1.25}
}

/* History view: match the reference's wide, high-contrast four-column table. */
body{overflow-x:hidden}
.draw-history{
  position:relative;
  left:50%;
  width:min(calc(100vw - 28px),1600px);
  margin:18px 0 0;
  transform:translateX(-50%);
  border-top:0;
  background:#fff;
}
.draw-history h2{
  margin:0;
  padding:14px 12px;
  background:#fff900;
  border:2px solid #c8b900;
  color:#d00000;
  font-size:clamp(22px,2.4vw,34px);
  font-weight:800;
  line-height:1.2;
  text-align:center;
}
.draw-history-table{
  width:100%;
  overflow:hidden;
  border:2px solid #1768d8;
  border-top:0;
  background:#fff;
}
.draw-history-head,
.draw-history-row{
  display:grid;
  grid-template-columns:minmax(112px,12%) minmax(0,1fr) minmax(108px,11%) minmax(190px,18%);
  column-gap:0;
  min-width:0;
  align-items:stretch;
}
.draw-history-head{
  min-height:62px;
  background:#8dff00;
  border-bottom:3px solid #1768d8;
  color:#111;
  font-size:clamp(16px,1.7vw,26px);
  font-weight:800;
  line-height:1.2;
  text-align:center;
}
.draw-history-head b{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  padding:8px 5px;
  border-right:2px solid #1768d8;
}
.draw-history-head b:last-child{border-right:0}
.draw-history-row{
  min-height:142px;
  border-bottom:2px solid #1768d8;
  background:#fff;
}
.draw-history-row:last-child{border-bottom:0}
.draw-history-row:nth-child(odd){background:#fbfdff}
.draw-history-issue{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-width:0;
  padding:8px 4px;
  background:#000;
  color:#fff;
  line-height:1.18;
  text-align:center;
}
.draw-history-issue strong{font-size:clamp(16px,1.65vw,26px);font-weight:800}
.draw-history-issue b{font-size:clamp(21px,2vw,32px);font-weight:900}
.draw-history-regular{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  align-items:center;
  gap:clamp(6px,0.65vw,14px);
  min-width:0;
  padding:16px clamp(10px,1vw,20px);
  border-right:2px solid #cbdcf1;
}
.history-ball{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-width:0;
  min-height:76px;
  padding:5px 2px;
  border:2px solid #fff;
  border-radius:12px;
  color:#fff;
  line-height:1.05;
  text-align:center;
  box-shadow:0 2px 3px #0004;
}
.history-ball b{
  display:inline-block;
  padding:4px 7px;
  background:#000;
  color:#fff;
  font-size:clamp(20px,2.1vw,34px);
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.history-ball small{margin-top:5px;font-size:clamp(13px,1.25vw,20px);line-height:1;white-space:nowrap}
.history-ball.red{background:#e5130c}.history-ball.blue{background:#147cdd}.history-ball.green{background:#08ac32}
.draw-history-special{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:0;
  padding:8px 4px;
  border-right:2px solid #cbdcf1;
}
.history-label{font-size:clamp(15px,1.45vw,24px);color:#cf0000;font-weight:800}
.draw-history-special .history-ball{
  width:clamp(62px,6.3vw,100px);
  min-height:clamp(62px,6.3vw,100px);
  border-radius:50%;
}
.draw-history-special .history-ball b{background:transparent;padding:0;font-size:clamp(24px,2.8vw,42px)}
.draw-history-attributes{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-width:0;
  gap:12px;
  padding:8px 10px;
  color:#171717;
  line-height:1.35;
  text-align:center;
}
.draw-history-attributes strong{font-size:clamp(14px,1.4vw,22px);color:#222}
.draw-history-attributes span{font-size:clamp(17px,1.7vw,28px);color:#222;overflow-wrap:anywhere}

@media(max-width:750px){
  .draw-history{
    left:auto;
    width:100%;
    margin-top:10px;
    transform:none;
  }
  .draw-history h2{padding:9px 6px;font-size:20px}
  .draw-history-head,.draw-history-row{grid-template-columns:56px minmax(0,1fr) 49px 74px}
  .draw-history-head{min-height:44px;font-size:11px;border-bottom-width:2px}
  .draw-history-head b{padding:5px 1px;border-right-width:1px}
  .draw-history-row{min-height:82px;border-bottom-width:1px}
  .draw-history-issue{gap:2px;padding:5px 2px}
  .draw-history-issue strong{font-size:11px}.draw-history-issue b{font-size:15px}
  .draw-history-regular{gap:2px;padding:7px 3px;border-right-width:1px}
  .history-ball{min-height:49px;padding:2px 0;border-radius:7px;border-width:1px}
  .history-ball b{padding:2px 3px;font-size:14px}
  .history-ball small{margin-top:3px;font-size:9px}
  .draw-history-special{gap:2px;padding:3px 1px;border-right-width:1px}
  .history-label{font-size:10px}
  .draw-history-special .history-ball{width:41px;min-height:41px}
  .draw-history-special .history-ball b{font-size:16px}
  .draw-history-attributes{gap:3px;padding:3px 2px}
  .draw-history-attributes strong{font-size:9px}.draw-history-attributes span{font-size:10px;line-height:1.25}
}

@media(min-width:751px){
  .draw-history{
    left:auto;
    transform:none;
    margin-left:calc((100% - 100vw + 28px) / 2);
  }
}

/* Local history cards follow the readable 1666-style history layout. */
.draw-history h2{
  padding:10px 12px;
  border:0;
  border-radius:8px 8px 0 0;
  background:linear-gradient(180deg,#3b6db8,#2f5fa7);
  color:#fff;
  font-size:clamp(20px,2vw,28px);
  text-align:left;
}
.draw-history-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:10px;
  border:1px solid #dbe3ee;
  border-top:0;
  border-radius:0 0 8px 8px;
  background:#eef2f6;
}
.draw-history-row{
  display:block;
  min-height:0;
  padding:10px 12px;
  border:1px solid #dbe3ee;
  border-radius:10px;
  background:#fff;
  color:#10233b;
}
.draw-history-row:nth-child(odd),.draw-history-row:nth-child(even){background:#fff}
.draw-history-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.draw-history-issue{
  display:flex;
  flex-direction:row;
  align-items:baseline;
  gap:5px;
  min-width:0;
  padding:0;
  background:transparent;
  color:#d83b39;
  line-height:1;
  text-align:left;
}
.draw-history-issue strong{font-size:13px;color:#6b7b8f;font-weight:700}
.draw-history-issue b{font-size:22px;color:#d83b39;font-weight:900;background:transparent;padding:0;text-align:left}
.draw-history-time{
  color:#6b7b8f;
  font-size:13px;
  font-style:normal;
  font-weight:700;
  text-align:right;
  white-space:nowrap;
}
.draw-history-balls{
  display:flex;
  align-items:flex-start;
  flex-wrap:nowrap;
  gap:10px;
  min-width:0;
  margin-bottom:8px;
}
.history-ball-item{
  display:flex;
  flex:0 1 70px;
  flex-direction:column;
  align-items:center;
  min-width:0;
  color:#1f2937;
  text-align:center;
}
.history-ball-item .history-ball,
.history-ball-item.is-special .history-ball{
  width:56px;
  min-width:0;
  height:56px;
  min-height:56px;
  padding:0;
  border:2px solid rgba(255,255,255,.9);
  border-radius:50%;
  background-image:radial-gradient(circle at 32% 30%,rgba(255,255,255,.55),rgba(255,255,255,0) 42%);
  box-shadow:inset 0 2px 5px rgba(255,255,255,.35),0 2px 6px rgba(0,0,0,.15);
}
.history-ball-item .history-ball b,
.history-ball-item.is-special .history-ball b{
  padding:0;
  background:transparent;
  color:#fff;
  font-size:18px;
  font-weight:900;
}
.history-ball-item .history-ball small{display:none}
.history-ball-item>small{
  display:block;
  min-height:15px;
  margin-top:6px;
  color:#1f2937;
  font-size:12px;
  font-weight:800;
  line-height:1.2;
  white-space:nowrap;
}
.history-plus{
  display:flex;
  flex:0 0 24px;
  align-items:center;
  justify-content:center;
  height:56px;
  color:#9ca3af;
  font-size:30px;
  font-weight:900;
}
.draw-history-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-top:1px dashed #e5edf7;
  padding-top:8px;
  margin-top:4px;
  color:#1f2937;
  font-size:13px;
  line-height:1.3;
}
.draw-history-bottom strong{color:#d83b39;font-weight:900}
.draw-history-bottom .draw-history-attributes{display:block;min-width:0;padding:0;color:#6b7b8f;font-size:12px;line-height:1.3;text-align:right}
.history-empty{padding:30px 12px;margin:0;color:#6b7b8f;text-align:center;font-size:15px;font-weight:700}
@media(max-width:750px){
  .draw-history h2{padding:9px 10px;font-size:19px}
  .draw-history-list{gap:8px;padding:8px}
  .draw-history-row{padding:10px 8px}
  .draw-history-top{gap:6px;margin-bottom:7px}
  .draw-history-issue strong{font-size:11px}.draw-history-issue b{font-size:18px}
  .draw-history-time{font-size:11px}
  .draw-history-balls{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr)) 12px minmax(0,1fr);
    gap:4px;
    width:100%;
  }
  .history-ball-item{width:auto;flex:0 0 auto}
  .history-ball-item .history-ball,.history-ball-item.is-special .history-ball{width:100%;height:auto;min-height:0;aspect-ratio:1;border-width:1px}
  .history-ball-item .history-ball b,.history-ball-item.is-special .history-ball b{font-size:clamp(13px,4vw,18px)}
  .history-ball-item>small{margin-top:4px;font-size:10px;white-space:nowrap}
  .history-plus{width:12px;height:auto;min-height:0;font-size:22px}
  .draw-history-bottom{gap:5px;font-size:11px}.draw-history-bottom .draw-history-attributes{font-size:10px}
}

@media(min-width:751px){
  .draw-history{width:min(1200px,calc(100vw - 28px))}
}

dialog#image-viewer{display:flex;flex-direction:column;width:min(calc(100vw - 16px),1250px);height:min(calc(100dvh - 16px),920px);max-width:none;max-height:none;margin:auto;padding:0;overflow:hidden}
.viewer-toolbar{flex:none;min-height:50px}
.viewer-toolbar #viewer-title{min-width:0;overflow-wrap:anywhere}
.viewer-controls{display:flex;align-items:center;gap:5px;flex:none}
.viewer-controls button{min-width:40px;min-height:40px;padding:5px 9px;touch-action:manipulation}
.viewer-toolbar #viewer-close{min-width:64px;min-height:40px;flex:none;touch-action:manipulation}
.viewer-scroll{flex:1;min-height:0;max-height:none;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom}
.viewer-scroll img{display:block;max-width:none;width:auto;height:auto;margin:0 auto;object-fit:contain;transform:none}
.viewer-scroll p{margin:6px 0 0}
@media(max-width:750px){dialog#image-viewer{width:calc(100vw - 12px);height:calc(100dvh - 12px);border-radius:4px}.viewer-toolbar{gap:5px;padding:6px}.viewer-toolbar strong{font-size:13px}.viewer-controls{gap:3px}.viewer-controls button{min-width:38px;min-height:42px;padding:5px}.viewer-toolbar #viewer-close{min-width:56px;min-height:42px;padding:5px}.viewer-scroll{padding:4px}}

#gallery .image-grid[data-packed] { grid-auto-flow: row dense; grid-auto-rows: 1px; row-gap: 0; }
#gallery .image-card figcaption { padding: 4px 6px; line-height: 1.4; }
.older-records summary { cursor: pointer; padding: 3px 8px; }

#gallery .image-card a[data-zoom] { aspect-ratio: auto; overflow: visible; }
#gallery .image-card img[data-business-image] { height: auto; object-fit: contain; }
dialog#image-viewer:not([open]) { display: none; }