/* Match3Colors page (/match3colors). Part 1 is the approved design CSS copied unchanged
   from public/files/match3colors-page.html. Part 2 styles the elements that
   match3colors.js requires (real data, filters, Play Card output) in the same look. */

/* ---------- Part 1: approved design ---------- */
:root{--green:#075b13;--deep-green:#054b14;--purple:#8236d1;--purple-dark:#6035a4;--lime:#56df32;--paper:#fff;--ink:#101727;--bg:#eefbf5;--border:#d7dfdc;--shadow:0 5px 11px #1e452523,0 1px 2px #1b37141b}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;color:var(--ink);background:linear-gradient(#f2fff9,#e7f8ef);font:14px/1.35 Arial,Helvetica,sans-serif;min-width:320px}
button,select{font:inherit}
button{cursor:pointer}
a{color:inherit;text-decoration:none}
a:focus-visible,button:focus-visible,select:focus-visible{outline:3px solid #ffb826;outline-offset:2px}
.site-header{background:#fdfefd;border-bottom:2px solid #e1e4e3;box-shadow:0 2px 7px #121b1610}
.header-inner{width:100%;max-width:none;margin:0;min-height:59px;padding:5px 10px;display:flex;align-items:center;justify-content:flex-start;gap:20px}
.brand{display:flex;align-items:center;gap:15px;white-space:nowrap}
.m3c-logo{width:49px;height:49px;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:12px;border:2px solid #d8dce4;background:linear-gradient(150deg,#121f32,#02060f 72%);box-shadow:inset 0 0 0 1px #434d5d,0 1px 4px #17211d44;color:white;flex-shrink:0}
.m3c-logo strong{font-size:16px;font-weight:900;letter-spacing:-.4px;line-height:1.3}
.color-squares{display:flex;gap:3px;margin-top:1px}.color-squares i{width:10px;height:8px;background:#ad6bee;display:block}.color-squares i:nth-child(2){background:#ff7dbf}.color-squares i:nth-child(3){background:#45df80}
.brand-divider{height:35px;width:2px;background:#839286}
.wordmark{font-size:clamp(20px,2.55vw,29px);font-weight:800;letter-spacing:-1.25px;color:#12151d;text-shadow:0 1px #ddd}
.wordmark span{color:#239119}
.primary-nav{display:flex;align-items:center;gap:clamp(13px,2.2vw,28px);font-weight:700}
.primary-nav a{display:inline-block;padding:8px 0;white-space:nowrap}
.primary-nav a.active{padding:7px 21px;border-radius:22px;color:#fff;background:linear-gradient(180deg,#22c700,#087107 64%,#054a00);box-shadow:inset 0 2px 2px #ffffff33,0 1px 4px #143b2440}
.primary-nav a:not(.active):hover,.footer-inner a:hover{color:#7d29cc}
.page{max-width:1400px;margin:auto;padding:11px 10px 21px}
.hero{position:relative;border-radius:21px;overflow:hidden;border:3px solid #fff;box-shadow:var(--shadow);background:#075807;margin:1px 1px 17px;line-height:0}
.hero img{display:block;width:100%;height:auto}
.hero a{position:absolute;inset:0;display:block}
.hero a:focus-visible{outline-offset:-5px}
.panel{background:#fff;border-radius:20px;box-shadow:var(--shadow);border:1px solid #e5efe9}
.results-panel{padding:11px 13px 15px;margin-bottom:16px}
.section-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:37px;margin:0 5px 7px}
.section-title{display:flex;align-items:center;gap:12px;margin:0;font-size:25px;line-height:1.2;letter-spacing:-.6px;font-weight:800}
.chart-bars{height:30px;display:flex;align-items:flex-end;gap:3px;padding-left:3px}.chart-bars i{display:block;width:6px;background:linear-gradient(#8bff62,#25b012);box-shadow:0 0 1px #6aca4a}.chart-bars i:nth-child(1){height:12px}.chart-bars i:nth-child(2){height:20px}.chart-bars i:nth-child(3){height:28px}
.status{display:flex;align-items:center;gap:9px;padding:8px 14px;border-radius:24px;background:#f1f2f6;color:#293044;font-size:13px;white-space:nowrap}
.calendar-icon{height:15px;width:15px;display:inline-block;position:relative;border:2px solid currentColor;border-radius:3px}.calendar-icon:after{content:"";position:absolute;left:0;right:0;top:3px;border-top:2px solid currentColor}.calendar-icon:before{content:"";position:absolute;top:-4px;left:3px;width:2px;height:4px;background:currentColor;box-shadow:6px 0 currentColor}
.table-scroll{width:100%;overflow:auto;border-radius:9px 9px 5px 5px}
.results-table{width:100%;min-width:740px;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:13px;text-align:center;font-weight:600}
.results-table th{background:linear-gradient(95deg,#6d5296,#68438f 55%,#5f417f);color:white;height:34px;font-size:13px;border-right:1px solid #ad9cbd}
.results-table th:first-child{width:29%;text-align:left;padding-left:12px}.results-table th:nth-child(2){width:18%}.results-table th:nth-child(3){width:12%}.results-table th:nth-child(4){width:13%}.results-table th:nth-child(5){width:14%}.results-table th:last-child{width:14%;border:0}
.results-table td{height:26px;background:linear-gradient(#f8fafc,#e8ecf2);border-right:1px solid #cbd1dc;border-bottom:1px solid #cbd1dc;color:#2b3040;padding:1px 6px}
.results-table tr:last-child td{border-bottom:0}
.results-table tbody tr:hover td:first-child,.results-table tbody tr.highlight td:first-child{background:#ffb04c}
.results-table td:nth-child(1){cursor:pointer}
.results-table td.pick-main{color:#297fdb;text-decoration:underline;font-size:15px}
.results-table td.pick-highlight{background:linear-gradient(#ffb14f,#ffcd8e);color:#563e28}
.results-table td.hit-pink{background:linear-gradient(100deg,#d54be2,#d66bdf);color:#42375b}
.results-table td.hit-green{background:linear-gradient(95deg,#7afa72,#9df49a);color:#277c25}
.results-table td.pair-green{background:#20f400;color:#035b15}
.results-table td.pair-pink{background:#f5d1f5;color:#454052}
.results-table td.pair-red{background:linear-gradient(90deg,#fa989b,#f3abab);color:#4f3a47}
.results-table td.count-red{background:#ff0908;color:#fff}
.results-table td.count-green{background:#63f45d;color:#155f1b}
.results-table td.count-pink{background:#f5787f;color:#55292c}
.results-table .pair-wrap{display:flex;justify-content:space-around;gap:6px}.pair-wrap em{font-style:normal;color:#e03245}
.results-table tr.selected td:first-child{outline:2px solid #7d37c5;outline-offset:-2px}
.small-select{appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='m2 3 5 5 5-5' fill='none' stroke='%235d399c' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 9px center;padding:4px 27px 4px 10px;min-width:90px;border:1px solid #d2cfe6;border-radius:6px;color:#38384a;font-weight:700;box-shadow:0 1px 3px #161f2a26}
.th-select{min-width:92px;padding-top:3px;padding-bottom:3px}
.no-data td{padding:22px;background:#fafafa!important;color:#424d4b!important;cursor:default!important}
.filter-panel{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:7px 18px;margin-bottom:16px}
.state-filter{width:170px;min-width:140px;display:flex;flex-direction:column;gap:2px;flex-shrink:0}
.state-filter label{font-size:12px;font-weight:700;color:#454b5d;padding-left:10px}
.state-filter select{width:100%;height:35px;font-size:15px}
.filter-divider{width:2px;height:40px;background:#c1c3d0;flex-shrink:0}
.more-filters{display:flex;align-items:center;gap:18px;flex:1;min-width:0}
.more-filters select{height:35px;min-width:0;width:100%;max-width:130px}
.purple-button{color:#fff;font-weight:700;border:1px solid #c38bee;background:linear-gradient(#b754ff,#8030e2 64%,#5836b4);border-radius:9px;box-shadow:inset 0 2px 2px #ffffff6b,0 1px 4px #552c8e50;padding:9px 22px;white-space:nowrap;transition:filter .15s}
.purple-button:hover{filter:brightness(1.08)}
.filter-right{display:flex;align-items:center;gap:15px;flex-shrink:0}
.filter-right .m3c-logo{width:52px;height:52px}
.tutorial-btn{background:linear-gradient(#fcfaff,#f0e4ff);color:#6a35b2;border:2px solid #c99afc;border-radius:14px;padding:4px 12px 4px 6px;display:flex;align-items:center;gap:10px;font-size:13px;font-weight:800;box-shadow:0 2px 5px #6f4baa26;white-space:nowrap}
.play-circle{width:26px;height:26px;border-radius:50%;background:#9238e8;color:white;display:grid;place-items:center;font-size:15px;padding-left:1px}
.notice{font-size:12px;color:#59637a;margin:6px 6px 0;display:none}
.notice.active{display:block}
.play-panel{padding:9px 16px 19px;scroll-margin-top:12px}
.play-header{height:123px;position:relative}
.play-title-line{display:flex;align-items:center;justify-content:center;gap:25px;margin:1px auto 0}
.title-line{height:2px;width:104px;background:linear-gradient(90deg,transparent,#38c112)}.title-line.right{background:linear-gradient(90deg,#38c112,transparent)}
.play-title{margin:0;font-size:42px;line-height:1.16;letter-spacing:.3px;font-weight:900;color:#0f141a;text-align:center;text-shadow:0 1px 0 #b0b6b3}
.play-date{font-size:19px;line-height:1.25;background:#e8e9f0;border-radius:25px;font-weight:800;width:max-content;max-width:100%;padding:3px 23px;margin:1px auto 5px;text-align:center}
.box-count{font-size:17px;font-weight:800;text-align:center}
.card-tools{position:absolute;left:1px;right:9px;bottom:2px;display:flex;align-items:end;justify-content:space-between;gap:15px}
.card-tools-left,.card-tools-right{display:flex;align-items:center;gap:15px}
.pair-menu{position:relative}
.pair-select{border:0;border-radius:9px;padding:9px 27px 9px 16px;color:white;background:linear-gradient(#a348eb,#7533c7);font-size:13px;font-weight:800;appearance:none;box-shadow:0 1px 4px #442d8930}
.pair-menu:after{content:'⌄';color:white;font-size:17px;position:absolute;right:9px;top:4px;pointer-events:none}
.matrix-icon{width:68px;height:43px;background:#fff;padding:3px;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(5,1fr);gap:2px;border:1px solid #eaedef}
.matrix-icon i{background:#d8ebd6}.matrix-icon i:nth-child(3n){background:#fa898a}.matrix-icon i:nth-child(4n){background:#9ce950}.matrix-icon i:nth-child(7n){background:#d899ee}
.copy-btn{border:0;background:transparent;padding:3px;display:grid;place-items:center;color:#b84af8}
.copy-btn.green{color:#1fba5d}.copy-btn.gray{color:#9fa7bc}
.copy-btn svg{width:27px;height:29px;stroke:currentColor;fill:none;stroke-width:2;stroke-linejoin:round}
.lanes-scroll{overflow-x:auto}
.play-lanes{display:flex;flex-direction:column;gap:8px}
.play-lane{display:grid;grid-template-columns:15% 23% 31% 31%;height:63px;overflow:hidden;background:#fff;border-radius:9px;border-top:7px solid #09651e;box-shadow:0 1px 2px #0d361e1d}
.lane-name{display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:800;color:#fff;background:linear-gradient(110deg,#0c6b1b,#003d0e)}
.lane-types{display:grid;grid-template-rows:repeat(2,1fr);align-items:stretch}
.lane-types div{display:grid;place-items:center;background:linear-gradient(#fdfdfd,#f4f7f5);border-bottom:1px solid #c9ced1;color:#fa3434;font-size:12px;font-weight:800}
.lane-types div:last-child{border:0}
.lane-values{display:grid;grid-template-rows:18px 19px 19px;font-size:12px;min-width:0;text-align:center;font-weight:700}
.lane-values.pink{background:linear-gradient(90deg,#d6a0ef,#d5a8f0)}
.lane-values.lime{background:linear-gradient(90deg,#89fc72,#80f443)}
.lane-values div{display:grid;place-items:center;min-width:0;border-bottom:1px solid #ffffff4a}
.lane-values div:last-child{border:0}
.lane-values .lane-tag{font-weight:800;font-size:13px}
.site-footer{background:linear-gradient(90deg,#064516,#07601b 55%,#034216);color:#fff;min-height:42px;padding:5px 0}
.footer-inner{max-width:1400px;padding:0 4%;margin:auto;display:flex;gap:27px;align-items:center;justify-content:space-between}
.footer-brand{display:flex;align-items:center;gap:11px;font-weight:800;font-size:19px;white-space:nowrap}
.footer-brand span span{color:#6af05d}.footer-brand .m3c-logo{width:38px;height:35px;border-radius:8px}.footer-brand .m3c-logo strong{font-size:12px}.footer-brand .color-squares i{width:7px;height:5px}
.footer-nav{display:flex;gap:23px;align-items:center;justify-content:center;padding-left:34px;border-left:1px solid #effeef88;font-size:12px;font-weight:700}
.footer-inner small{font-size:11px;white-space:nowrap}
.toast{position:fixed;z-index:100;bottom:26px;left:50%;transform:translate(-50%,30px);opacity:0;pointer-events:none;background:#193822;color:white;padding:12px 20px;border-radius:11px;box-shadow:0 7px 24px #0004;transition:.2s;max-width:min(92vw,600px);text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
.dialog-backdrop{position:fixed;inset:0;background:#0b1f1788;z-index:90;display:none;align-items:center;justify-content:center;padding:24px}
.dialog-backdrop.open{display:flex}
.dialog{background:white;border-radius:18px;box-shadow:0 15px 40px #06150f66;max-width:490px;width:100%;padding:24px;position:relative}
.dialog h2{margin:0 30px 12px 0;font-size:25px}.dialog p{color:#444f58;line-height:1.55}.dialog li{margin:5px 0;line-height:1.5}
.dialog-close{position:absolute;right:16px;top:10px;background:transparent;border:0;font-size:28px;color:#56645c}
.dialog-bottom{text-align:right;margin-top:18px}
@media(max-width:940px){.header-inner{padding:8px 10px;flex-wrap:wrap;justify-content:flex-start}.primary-nav{gap:28px}.filter-panel{flex-wrap:wrap;justify-content:center}.more-filters{flex:0 1 auto}.filter-right{margin-left:auto}.footer-inner{flex-wrap:wrap;justify-content:center}.footer-nav{padding-left:0;border:0}}
@media(max-width:650px){body{font-size:13px}.header-inner{gap:8px;min-height:65px}.brand{gap:8px}.m3c-logo{width:39px;height:41px;border-radius:9px}.m3c-logo strong{font-size:13px}.color-squares i{width:8px;height:6px}.brand-divider{height:28px}.wordmark{font-size:23px;letter-spacing:-1.1px}.primary-nav{width:100%;justify-content:space-between;gap:6px;overflow-x:auto;white-space:nowrap;font-size:12px;padding:2px 0}.primary-nav a.active{padding:6px 14px}.page{padding:9px 8px 20px}.hero{margin-bottom:13px;border-radius:13px;border-width:2px}.results-panel{padding:10px 9px 12px;border-radius:14px}.section-title{font-size:20px;gap:8px}.status{font-size:10px;padding:7px;gap:5px}.results-table{font-size:12px}.filter-panel{padding:12px;gap:12px;border-radius:14px}.state-filter{width:calc(100% - 20px);flex:auto}.filter-divider{display:none}.more-filters{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;flex:1 1 100%;min-width:0}.more-filters select{min-width:0;max-width:none;width:100%;box-sizing:border-box;font-size:12px;padding-left:8px;padding-right:21px;background-position:right 6px center}.filter-right{width:100%;margin:auto;justify-content:space-between}.filter-right .m3c-logo{width:41px;height:43px}.tutorial-btn{font-size:12px}.play-panel{padding:8px 8px 15px;border-radius:14px}.play-header{height:142px}.play-title{font-size:35px}.play-title-line{gap:12px}.title-line{width:40px}.play-date{font-size:16px}.box-count{font-size:15px}.card-tools{left:0;right:0;bottom:4px}.card-tools-left{gap:7px}.matrix-icon{width:44px;height:34px}.pair-select{padding:8px 24px 8px 11px}.card-tools-right{gap:4px}.copy-btn svg{width:23px;height:24px}.play-lanes{min-width:660px}.play-lane{height:65px}.footer-brand{font-size:16px}.footer-nav{gap:14px;flex-wrap:wrap}.footer-inner small{white-space:normal;text-align:center}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

/* ---------- Part 2: real data and the match3colors.js interface ---------- */
[hidden]{display:none!important}
.hero{aspect-ratio:1019/256}
.hero img{height:100%;object-fit:cover}

/* results table: real colour calculations mapped onto the design colours */
.results-table td.winner .td-highlight{display:inline-block;min-width:3.2em}
.results-table td.pick-highlight.pick-main{color:#1d5fae}
.results-table td.hit-miss-value.purple-bg{background:linear-gradient(100deg,#d54be2,#d66bdf);color:#42375b}  /* H = hit (design hit-pink) */
.results-table td.hit-miss-value.light-green-bg{background:linear-gradient(95deg,#7afa72,#9df49a);color:#277c25} /* M = miss (design hit-green) */
.results-table td.count.lime-green-bg{background:#63f45d;color:#155f1b}  /* L1–L4 */
.results-table td.count.light-red-bg{background:#f5787f;color:#55292c}   /* H5–H9 */
.results-table td.count.red-bg{background:#ff0908;color:#fff}            /* H10+ */
.results-table td.pairsum{color:#2b3040}
/* recency bars of the original page: draws 1–4 green, 5–9 red, older dark red */
.results-table td.pairsum.ps-g{box-shadow:inset 4px 0 #1fae1f,inset -4px 0 #1fae1f}
.results-table td.pairsum.ps-r{box-shadow:inset 4px 0 #f0787c,inset -4px 0 #f0787c}
.results-table td.pairsum.ps-rr{box-shadow:inset 4px 0 #b3181b,inset -4px 0 #b3181b}
.results-table .ps8{color:#2b3040}
.results-table thead th{position:relative}
.th-filter{display:flex;align-items:center;gap:10px;position:relative}
.th-label{margin-left:6px}
.fd-toggle{margin-left:auto;margin-right:8px;border:1px solid #c6b6dc;background:#ffffff22;color:#fff;border-radius:6px;font-size:11px;font-weight:800;padding:2px 7px}
.fd-toggle[aria-expanded="true"]{background:#fff;color:#5f417f}

/* first-digit HIT/MISS analysis */
.first-digit-panel{overflow-x:auto;margin:0 0 10px;padding:8px;border:1px solid #e5e1ee;border-radius:10px;background:#faf8fd}
.firstDigitAnalysis table{border-collapse:collapse;font-size:12px;font-weight:700;text-align:center}
.firstDigitAnalysis th,.firstDigitAnalysis td{padding:3px 8px;border:1px solid #e3dfe9;white-space:nowrap}
.firstDigitAnalysis th{background:#efe9f7;color:#3d3354}
.firstDigitAnalysis span{display:inline-block;min-width:16px;margin:1px;border-radius:3px}
.fd-red{background:#f75959}.fd-green{background:#7de57d}.fd-miss{color:#f75959}
.win-img{width:90px;margin:0 auto;position:relative;min-height:28px}
.win-img p{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;flex-direction:column;margin:5px 0 0 10px;font-size:15px;font-weight:600;line-height:.9}
.win-img img{display:block}

/* drop-down lists (winner filter and the three Play Card filters) */
.dd{position:absolute;z-index:40;left:0;top:calc(100% + 4px);margin:0;padding:6px;list-style:none;min-width:130px;max-height:260px;overflow-y:auto;background:#fff;border:1px solid #d2cfe6;border-radius:9px;box-shadow:0 8px 22px #1b20333a;text-align:left}
.dd li+li{margin-top:4px}
.dd button{display:block;width:100%;min-height:30px;border:1px solid #d9d6e8;border-radius:6px;background:#f7f6fb;color:#38384a;font-weight:700;font-size:12px;padding:4px 8px;text-align:center}
.dd button.multi{display:flex;padding:0;overflow:hidden}
.dd button.multi span{flex:1;height:30px}
.toggle-off{opacity:.42;text-decoration:line-through}
.dd .toggle-on.number-pattern{outline:0}
.th-filter .dd{top:calc(100% + 8px);color:#38384a}

/* the three filter positions (Hit/Miss, Pairsums, Draw Count) */
.more-filters .play-card-filters{position:relative;flex:1;min-width:0;max-width:130px}
/* match3colors.js removes all classes and the style attribute from these buttons when an option is picked,
   so the .small-select look is repeated here without relying on the class */
.more-filters .play-card-filters>button{appearance:none;background-color:#fff;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='m2 3 5 5 5-5' fill='none' stroke='%235d399c' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E");border:1px solid #d2cfe6;border-radius:6px;color:#38384a;font-weight:700;box-shadow:0 1px 3px #161f2a26}
.more-filters .play-card-filters>button{display:flex!important;align-items:center;justify-content:center;width:100%!important;height:35px!important;max-width:none;min-width:0;padding:0 27px 0 10px!important;overflow:hidden;text-align:left;justify-content:flex-start;background-repeat:no-repeat!important;background-position:right 9px center!important}
.more-filters .play-card-filters>button span{flex:1;height:100%}
.more-filters .play-card-filters>button:has(span){padding:0 0 0 0!important}
.more-filters .play-card-filters::after{content:attr(data-label);position:absolute;left:10px;top:-15px;font-size:10px;font-weight:700;color:#6b6f80;white-space:nowrap}
.view-all-wrap{display:flex;align-items:center;gap:8px;flex-shrink:0}
#paypal-button-container:empty{display:none}
.filter-right .m3c-logo{text-decoration:none}

/* Play Card: the script's own output is kept for the paid View All mode only */
#play-card{display:none}
.play-panel.is-view-all #play-card{display:block;margin-top:10px}
.play-panel.is-view-all .lanes-scroll{display:none}
#play-card>h3,#play-card .pri-num-table+a,#play-card a[href*="youtube"]{display:none}
.matrix-icon{cursor:pointer;border-radius:4px}
.pair-select:disabled{opacity:.7}
.play-lane{height:auto;min-height:63px}
.lane-values{grid-template-rows:18px repeat(2,minmax(19px,auto))}
.lane-values div{padding:2px 6px;word-break:break-word;line-height:1.3}
.lane-values .none{color:#4a5560;font-weight:600}
.lanes-empty{padding:18px;text-align:center;color:#59637a;font-weight:700}

/* View All (paid) output, restyled; markup comes from match3colors.js */
#play-card .two-table{display:flex;flex-direction:column;gap:10px}
#play-card .pri-num-table{width:100%;border-collapse:collapse}
#play-card .pri-num-table thead{display:none}
#play-card .pri-num-table tbody{display:flex;flex-wrap:wrap;gap:6px}
#play-card .pri-num-table tr,#play-card .pri-num-table td{display:block}
#play-card .pri-num-table button{border:1px solid #d2cfe6;border-radius:7px;background:#f7f6fb;font-weight:700;font-size:12px;padding:5px 10px}
#play-card .view-all-outer{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
#play-card .view-main{background:#fff;border-radius:9px;border-top:7px solid #09651e;box-shadow:0 1px 3px #0d361e2a;padding:0 0 8px}
#play-card .view-title{font-size:16px;font-weight:800;color:#fff;background:linear-gradient(110deg,#0c6b1b,#003d0e);padding:6px 10px;margin-bottom:6px}
#play-card .bg-group{display:flex;flex-direction:column;gap:4px;padding:0 8px 6px}
#play-card .match-box{display:flex;gap:8px;align-items:flex-start;font-size:12px;font-weight:700}
#play-card .match-box-color{display:flex;flex-shrink:0;border:1px solid #d7dce2}
#play-card .match-box-color div{width:16px;height:18px}
#play-card .match-box-data p{margin:0;word-break:break-word}
.lime-green-bg{background:#63f45d}.light-red-bg{background:#f5787f}.red-bg{background:#ff0908}

/* filters + colour map dialog */
.dialog.wide{max-width:760px;max-height:calc(100vh - 48px);overflow:auto}
.pc-filter-list{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px;padding:0;list-style:none}
.pc-filter-list button{border:1px solid #d2cfe6;border-radius:7px;background:#f7f6fb;color:#38384a;font-weight:700;font-size:12px;padding:6px 12px}
.color-map{display:block;width:100%;height:auto;border-radius:8px;border:1px solid #e2e5ea}

/* ---------- v1.1.0: Draw Count labels, PairSums menu, 7-row results table ---------- */
/* Draw Count options: the colour classes must win over the generic .dd button background
   (match3colors.js copies the option's computed colour onto the filter button for G/R/M) */
.dd button.lime-green-bg,.dd button.multi span.lime-green-bg{background:#63f45d;color:#155f1b}   /* green: latest 4 draws */
.dd button.light-red-bg,.dd button.multi span.light-red-bg{background:#f5787f;color:#55292c}     /* pink: draws 5-9 */
.dd button.red-bg,.dd button.multi span.red-bg{background:#ff0908;color:#fff}                    /* red: not in the latest 9 */
#playcard-drawcount-filter-toggle{min-width:150px}
#playcard-drawcount-filter-toggle button{font-size:13px;font-weight:800;min-height:32px}
.dd button.multi span{display:flex;align-items:center;justify-content:center;height:32px;font-size:13px;font-weight:800;white-space:nowrap}
.more-filters #drawCountFilter span{display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;white-space:nowrap}
.more-filters #drawCountFilter span.lime-green-bg{color:#155f1b}.more-filters #drawCountFilter span.light-red-bg{color:#55292c}.more-filters #drawCountFilter span.red-bg{color:#fff}
.more-filters #drawCountFilter[data-dc="G"]{color:#155f1b}.more-filters #drawCountFilter[data-dc="R"]{color:#55292c}.more-filters #drawCountFilter[data-dc="M"]{color:#fff}
.more-filters #drawCountFilter .dc-single{flex:1;height:auto}

/* purple PairSums button (same look as the approved select) and its menu */
button.pair-select{cursor:pointer;text-align:left;white-space:nowrap;min-width:118px;line-height:1.2}
.pair-pop{position:absolute;z-index:60;left:0;top:calc(100% + 6px);width:min(430px,calc(100vw - 24px));max-height:min(62vh,440px);overflow-y:auto;background:#fff;border:1px solid #d2cfe6;border-radius:12px;box-shadow:0 12px 30px #1b20334a;padding:10px;text-align:left}
.pp-section+.pp-section{margin-top:10px;padding-top:10px;border-top:1px solid #ebe8f3}
.pp-head{font-size:12px;font-weight:800;color:#5d399c;text-transform:uppercase;letter-spacing:.4px;margin:0 0 7px}
.pp-list{display:flex;flex-wrap:wrap;gap:6px}
.pp-list .play-card-pairsums{border:1px solid #c9c2dc;border-radius:7px;color:#26232f;font-size:14px;font-weight:800;padding:6px 10px;opacity:1;text-decoration:none}
.pp-list .play-card-pairsums.toggle-off{opacity:1;text-decoration:none;outline:3px solid #6a2bc0;outline-offset:1px}   /* the script marks the selected pair sum with .toggle-off */
.pp-list .play-card-pairsums.toggle-off::before{content:"✓ "}
.pp-empty{margin:0;font-size:13px;color:#59637a;font-weight:600}
.pair-pop .pc-filter-list{margin:0}

/* Results / History: 16px text, header stays visible, 7 rows (exact height set by match3colors-ui.js) */
#results .table-scroll{max-height:calc(40px + 7 * 36px);overflow:auto;overscroll-behavior:contain}
.results-table thead th{position:sticky;top:0;z-index:3;height:40px;font-size:16px;font-weight:600}
.results-table td{height:36px;font-size:16px;font-weight:700;line-height:1.2}
.results-table td.pick-main{font-size:17px}
.results-table .th-select,.results-table .th-filter .th-label{font-size:15px;font-weight:600}
.results-table .fd-toggle{font-size:13px}
.th-filter #winnerFilterList{position:fixed;top:0;left:0;z-index:70}

@media(max-width:650px){
	.results-table thead th{font-size:15px}
	.results-table td{font-size:15px;height:34px}
	.results-table td.pick-main{font-size:16px}
	#results .table-scroll{max-height:calc(40px + 7 * 34px)}
	.pair-pop{left:0}
}

/* ---------- v1.2.0: filter bar above Results / History, one line, View All right after Draw Count ---------- */
.filter-panel{justify-content:flex-start}
/* State label is taken out of the flow (like the Hit/Miss, Pairsums, Draw Count labels) so all four controls share one centre line */
.state-filter{position:relative;align-self:center}
.state-filter label{position:absolute;left:0;top:-17px;padding-left:10px;white-space:nowrap}
.more-filters{flex:0 1 auto}
.more-filters .play-card-filters{flex:0 0 130px;width:130px}
.filter-right{margin-left:0}
@media(max-width:940px){
	.filter-panel{justify-content:center}
	.filter-right{margin-left:0}
	.state-filter{width:150px}
	.more-filters .play-card-filters{flex-basis:110px;width:110px}
}

@media(max-width:650px){
	/* the four dropdowns stay on one line: State 25%, the three filters share the rest */
	.filter-panel{justify-content:space-between}
	.state-filter{flex:0 0 calc(25% - 6px);width:auto;min-width:0}
	.state-filter label{font-size:10px;top:-15px;padding-left:8px}
	.state-filter select{font-size:12px;padding-left:8px;padding-right:21px;background-position:right 6px center}
	.more-filters{flex:1 1 0;width:auto;margin-top:0}
	.more-filters .play-card-filters{width:auto}
	.filter-right{width:100%;justify-content:space-between}
}

@media(max-width:650px){
	.more-filters .play-card-filters{max-width:none}
	.more-filters .play-card-filters>button{font-size:12px;padding-left:8px!important;padding-right:21px!important;background-position:right 6px center!important}
	.view-all-wrap{width:100%;justify-content:center}
	.view-all-wrap .purple-button{width:100%}
	.filter-panel{padding-top:20px}
	.dd{min-width:110px}
	.fd-toggle{margin-right:2px}
}

/* ---------- v1.3.0: larger text (sizes only; colours, gradients, column widths and positions unchanged) ---------- */

/* 1. Play Card lanes (purple + green columns). Rows grow with their content: no fixed row heights. */
.play-lane{height:auto;min-height:72px}
.lane-name{font-size:22px;font-weight:800;padding:6px 4px;text-align:center;line-height:1.15}         /* FRONT / BACK / SPLIT / FBS / FSB */
.lane-types{grid-template-rows:none;grid-auto-rows:1fr}
.lane-types div{font-size:18px;font-weight:700;padding:4px 6px;line-height:1.2}                         /* SINGLE / DOUBLE / TRIPLE */
.lane-values{grid-template-rows:auto;grid-auto-rows:1fr}                                               /* pattern row, then equal-height value rows */
.lane-values div{font-size:20px;font-weight:700;line-height:1.3;padding:4px 8px;overflow-wrap:anywhere;word-break:normal}   /* Pick 3 numbers */
.lane-values .lane-tag{font-size:18px;font-weight:700;padding:3px 8px}                                   /* *H/W/F, *M/M/FSB ... */
.lane-values .none{font-size:18px;font-weight:600}
.lanes-empty{font-size:18px}

/* View All (paid) output, same scale */
#play-card .view-title{font-size:22px}
#play-card .match-box{font-size:18px}
#play-card .match-box-color div{width:20px;height:22px}
#play-card .pri-num-table button{font-size:17px;font-weight:700}

/* Play Card date and BOX NUMBERS; header made taller by the extra text height so nothing overlaps the tools row */
.play-header{height:131px}
.play-date{font-size:20px;font-weight:800}
.box-count{font-size:20px;font-weight:800}

/* PairSums and View All buttons */
.pair-select,button.pair-select{font-size:17px;font-weight:700}
.purple-button,#viewAllCombinations{font-size:17px;font-weight:700}
.pair-menu:after{top:7px}

/* PairSums menu options */
.pp-head{font-size:15px;font-weight:700}
.pp-list .play-card-pairsums{font-size:17px;font-weight:600}
.pair-pop .pc-filter-list button,.pc-filter-list button{font-size:17px;font-weight:600}
.pp-empty{font-size:16px}

/* 2. Results / History: per-column sizes; 7 rows (exact height recalculated from the real rows by match3colors-ui.js) */
#results .table-scroll{max-height:calc(44px + 7 * 42px)}
.results-table thead th{height:44px;font-size:17px;font-weight:600}
.results-table td{height:42px;font-size:18px;font-weight:700;line-height:1.2}       /* Hit/Miss, Pairsums, Draw Count: 18px */
.results-table td.winner,.results-table td.pick-main{font-size:19px;font-weight:700} /* winning Pick 3 numbers */
.results-table td.draw-date,.results-table td.draw-type{font-size:17px;font-weight:700}
.results-table td.hit-miss-value,.results-table td.pairsum,.results-table td.count{font-size:18px;font-weight:700}
.results-table .th-select,.results-table .th-filter .th-label{font-size:17px;font-weight:600}
.results-table .th-select{min-width:86px;padding-left:9px;padding-right:25px}
.th-filter{gap:8px}
.results-table .fd-toggle{font-size:14px}

/* 3. Filters: selections 17px, options 17px, labels 15px (all semibold) */
.filter-panel{padding-top:16px}
.state-filter select,.more-filters .play-card-filters>button{font-size:17px;font-weight:600}
.state-filter label,.more-filters .play-card-filters::after{font-size:15px;font-weight:600;top:-21px}
.more-filters .play-card-filters::after{left:10px}
.dd button,#playcard-drawcount-filter-toggle button,.dd button.multi span{font-size:17px;font-weight:600;min-height:34px}
.dd button.multi span{height:34px}
.dd{min-width:140px}

@media(max-width:650px){
	/* Play Card: the lanes keep their 660px scroll width, so text stays large */
	.lane-name{font-size:19px}
	.lane-types div{font-size:16px}
	.lane-values div{font-size:18px}
	.lane-values .lane-tag,.lane-values .none{font-size:16px}
	.play-header{height:152px}
	.play-date,.box-count{font-size:18px}
	.pair-select,button.pair-select{font-size:16px;padding-right:24px}
	.purple-button,#viewAllCombinations{font-size:17px}

	/* Results table: same sizes as desktop (the table scrolls sideways at 740px on phones) */
	.results-table thead th{font-size:17px}
	.results-table td{height:42px}
	.results-table td.winner,.results-table td.pick-main{font-size:19px}
	.results-table td.draw-date,.results-table td.draw-type{font-size:17px}
	.results-table td.hit-miss-value,.results-table td.pairsum,.results-table td.count{font-size:18px}
	#results .table-scroll{max-height:calc(44px + 7 * 42px)}

	/* Filters: four controls share one line on a phone, so selections 15px and labels 13px */
	.state-filter select,.more-filters .play-card-filters>button{font-size:15px}
	.state-filter label,.more-filters .play-card-filters::after{font-size:13px;top:-18px}
	.state-filter label{padding-left:8px}
	.more-filters .play-card-filters::after{left:8px}
	.filter-panel{padding-top:22px}
	.dd{min-width:130px}

	/* v1.4.0: on phones Tutorial Video + M3C sit together at the right end of their row */
	.filter-right{justify-content:flex-end;gap:12px}

	/* Winner heading on the 740px phone table: may wrap to a second line instead of overlapping the Date column */
	.results-table th:first-child{padding-left:6px}
	.th-filter{flex-wrap:wrap;row-gap:2px;padding:3px 0}
	.results-table .th-select{min-width:0}
}

/* ---------- v1.4.0: Tutorial Video + M3C in the right corner; Colors / Patterns toggle ---------- */
/* Tutorial Video and the M3C badge are pushed to the far right of the filter bar (badge last) */
.filter-panel .filter-right{margin-left:auto}

/* toggle button: same pill look as the former status pill, top-right of the Results / History bar */
.mode-toggle{border:1px solid #d6d9e3;cursor:pointer;font-weight:700;font-size:15px;margin-left:auto;min-width:96px;justify-content:center}
.mode-toggle::before{content:"";width:14px;height:14px;border-radius:3px;flex-shrink:0;background:linear-gradient(90deg,#d54be2 0 33%,#20f400 33% 66%,#ff0908 66%)}
.mode-toggle:hover{background:#e6e8f0}
.mode-toggle[aria-pressed="true"]{background:#e9e2f5;border-color:#c6b6dc;color:#4a2f78}

/* Colors mode (default): the three coloured columns keep their backgrounds; their text is made transparent.
   The values stay in the DOM, so row heights, filters and calculations are unchanged. */
.results-panel.is-colors .results-table td.hit-miss-value,
.results-panel.is-colors .results-table td.hit-miss-value *,
.results-panel.is-colors .results-table td.pairsum,
.results-panel.is-colors .results-table td.pairsum *,
.results-panel.is-colors .results-table td.count,
.results-panel.is-colors .results-table td.count *{color:transparent!important;text-shadow:none!important}
@media(max-width:650px){.mode-toggle{font-size:13px;min-width:84px}}

/* ---------- v1.4.1: filter dropdowns never clipped ----------
   With the 17px options the Draw Count list (8 options, about 314px) was taller than the generic .dd max-height
   (260px), so R and M sat in the list's hidden scroll area and a click there landed on the Results table below.
   The three filter lists are short and fixed, so they show every option without an inner scroll, and the
   filter bar is lifted above the Results panel so an open list always paints over the table. */
.filter-panel{position:relative;z-index:30}
.more-filters .dd{max-height:none;overflow:visible}

/* ---------- v1.5.0: footer without navigation links ----------
   Desktop: logo left, copyright right (unchanged justify-content:space-between).
   Phones: the two items stack centred; the 27px column gap would leave a large hole between them. */
@media(max-width:650px){.footer-inner{row-gap:6px}}

/* ---------- v1.6.0: moving / active row highlight is light blue ----------
   Replaces the orange (#ffb04c) hover / .highlight background of the Winner cell. The blue fill plus a blue inner
   border keeps it distinct from the orange double-number cells (td.pick-highlight), which are not changed:
   when the highlight leaves a row, the cell falls back to its own background (orange for doubles).
   Text colours are not changed. */
.results-table tbody tr:hover td:first-child,
.results-table tbody tr.highlight td:first-child{background:#cfe8ff;box-shadow:inset 0 0 0 2px #3d8fe0}

/* ---------- v1.8.0: "(n) = draws skipped" explanation for pair sums ---------- */
.skip-tip{position:fixed;z-index:80;pointer-events:none;background:#2b1f45;color:#fff;font-size:14px;font-weight:700;line-height:1.2;padding:6px 10px;border-radius:7px;box-shadow:0 4px 12px #1b203340;white-space:nowrap}
.pp-head .pp-note{text-transform:none;letter-spacing:0;font-weight:600;color:#6b6f80;margin-left:6px}

/* ---------- v1.7.0: Play Card controls inside the Play Card; count in the date pill ---------- */
/* top bar: State on the left, Tutorial Video + M3C badge at the far right */
.filter-panel{justify-content:space-between}
.filter-panel .filter-right{margin-left:auto}

/* Play Card header in normal flow: title, date pill (with count), one line of controls, then the tools row */
.play-header{height:auto}
.play-date{white-space:nowrap}
.play-date .pd-count:empty{display:none}
.play-controls{display:flex;align-items:center;justify-content:center;gap:18px;margin:30px auto 14px}
.play-controls .more-filters{display:flex;align-items:center;gap:18px;flex:0 0 auto;width:auto;margin:0;min-width:0}
.play-controls .more-filters .play-card-filters{flex:0 0 130px;width:130px;max-width:none}
.play-controls .view-all-wrap{flex:0 0 auto;width:auto}
.play-controls .view-all-wrap .purple-button{width:auto;height:35px;padding:0 22px;display:inline-flex;align-items:center}
.card-tools{position:static;display:flex;align-items:flex-end;justify-content:space-between;gap:15px;margin:0 0 8px}
@media(max-width:940px){.play-controls .more-filters .play-card-filters{flex-basis:110px;width:110px}}

@media(max-width:650px){
	/* top bar: State grows; Tutorial + M3C stay on the same line at the right */
	.state-filter{flex:1 1 0;width:auto;max-width:none;min-width:0}
	.filter-right{width:auto;flex:0 0 auto;margin-left:auto}
	.tutorial-btn{font-size:12px}

	/* the four controls share one line: three equal filters + View All */
	.play-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:6px;width:100%;margin:26px 0 12px}
	.play-controls .more-filters{display:contents}
	.play-controls .more-filters .play-card-filters{width:auto;flex:none;min-width:0}
	.play-controls .more-filters .play-card-filters>button{padding-left:6px!important;padding-right:18px!important;background-position:right 5px center!important}
	.play-controls .more-filters .play-card-filters::after{left:4px}
	.play-controls .view-all-wrap{width:auto}
	.play-controls .view-all-wrap .purple-button,.play-controls #viewAllCombinations{width:auto;font-size:16px;padding:0 8px}
	.card-tools{gap:6px}
}
