*{box-sizing:border-box}body{margin:0;background:#f4f3ed;color:#192f36;font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,summary{font:inherit;touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default}button:focus-visible,summary:focus-visible{outline:3px solid #f3c966;outline-offset:3px}main{max-width:1280px;margin:auto;padding:24px 28px 40px}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.eyebrow{margin:0;color:#526f69;font-size:16px}h1{font:normal clamp(36px,5vw,50px)/1.1 Georgia,serif;margin:7px 0}.subtitle{margin:0;color:#52646a;font-size:18px}.badge{border:1px solid #cdd5cc;border-radius:30px;padding:8px 15px;white-space:nowrap}
/* One felt board, two connected playing zones. */
.game-layout{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(0,1.15fr);gap:0;background:#174a43;border:1px solid #306258;border-radius:26px;box-shadow:0 16px 40px #193d3320;overflow:hidden;align-items:stretch;color:#fff8e7}.play-column{min-width:0;padding:22px;display:flex;flex-direction:column;border-right:1px solid #ffffff25}.table,.scorecard,.rainbow-card{background:#174a43;border:0;box-shadow:none;border-radius:0;margin:0;min-width:0}.scorecard{padding:22px}.table{text-align:center}.table-top{display:flex;justify-content:space-between;gap:12px;color:#d8e6db}.table-title{padding:14px 0}.rainbow-mark{font-size:24px;letter-spacing:7px;background:linear-gradient(90deg,#faada2 25%,#a4d9a4 50%,#a4c9fa 75%);color:transparent;background-clip:text}.table h2{font:normal 32px/1.15 Georgia,serif;margin:12px 0;color:#fff0bb}.table-title p{margin:10px 0;color:#d8e6db}.dice{display:flex;justify-content:center;gap:9px;margin:18px 0 26px}.die{border:2px solid #ffffff40;border-radius:12px;width:66px;height:88px;padding:7px 5px;color:white;box-shadow:0 5px 0 #0003;display:flex;flex-direction:column;align-items:center;justify-content:space-between;transition:transform .15s,box-shadow .15s}.die.red{background:#ad383e}.die.green{background:#227345}.die.blue{background:#2866ad}.die.unrolled{background:#f1eee5;color:#25473e;border-color:#d6d9cf}.die[aria-pressed=true]{border-color:#ffe4a0;box-shadow:0 0 0 3px #ffe4a0,0 6px 0 #0003;transform:none}.pips{display:grid;grid-template-columns:repeat(3,8px);grid-template-rows:repeat(3,8px);gap:4px;margin-top:3px}.pip{border-radius:50%;background:currentColor}.die.unrolled .pips{display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:600;width:100%;height:36px;margin:0}.die-caption{font-size:12px;font-weight:700;letter-spacing:.04em}.die.rolling-die .die-caption{font-size:10px}.roll{width:100%;min-height:56px;padding:12px;border:0;border-radius:12px;background:#f8d88e;color:#243c35;font-weight:750;font-size:19px;box-shadow:0 4px 0 #0002}.roll:disabled{opacity:.65}.table-note{font-size:16px;color:#d8e6db;margin:17px 0 8px}.announcement{min-height:48px;color:#fff0bb;margin:10px 0 18px}.stats{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #ffffff30;padding-top:16px;gap:12px}.stats span{display:block;color:#d8e6db;font-size:16px}.stats strong{font:normal 34px/1.3 Georgia,serif}.save-status{font-size:14px;color:#c5d8cd;margin:16px 0 0}.game-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:auto;padding-top:20px}.new-game{border:1px solid #ffffff65;border-radius:9px;padding:10px;color:#fff4d8;background:#ffffff08;min-height:48px;font-size:16px}.new-game:hover:enabled{background:#ffffff18}.new-game:disabled{opacity:.55;cursor:wait}
.score-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.score-heading h2{font:normal 27px Georgia,serif;margin:0;color:#fff0bb}.score-heading #filled{background:#ffffff12;border:1px solid #ffffff35;color:#fff4d8;border-radius:20px;padding:5px 10px;font-size:14px;font-weight:650;white-space:nowrap}.score-help{font-size:14px;line-height:1.4;color:#d0e2d7;margin:10px 0 12px}.category-group,.rainbow-card h2{font-size:16px;font-weight:650;line-height:1.4;margin:14px 0 8px;color:#f3d593}.category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.category{--tile-accent:#267978;--tile-wash:#edf7f3;display:grid;grid-template-columns:32px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:4px 5px;padding:8px;min-height:78px;border:1px solid #c6d7ca;border-radius:10px;background:linear-gradient(145deg,#fffef9,var(--tile-wash));color:#183a32;text-align:left;font:inherit;line-height:1.2;position:relative}.category-icon{width:32px;height:32px;grid-column:1;grid-row:1;color:var(--tile-accent)}.category-label{grid-column:1/-1;grid-row:2;min-width:0;font-size:16px;line-height:1.2}.category-score{grid-column:2;grid-row:1;min-width:0;justify-self:end;display:flex;flex-direction:column;align-items:flex-end;gap:3px;flex-shrink:0}.category strong{font-size:20px;color:var(--tile-accent);flex-shrink:0}.scoring-rule{display:none}.available-tag,.used-tag{font-size:12px;line-height:1.15;font-weight:650;white-space:nowrap}.available-tag{color:#245c3b}.category:enabled:hover{border-color:#f3c966;box-shadow:0 0 0 2px #f3c966}.category.available{background:#dff2cf;border:2px solid #81c35d;box-shadow:0 0 0 1px #81c35d}.category.available strong{color:#245c3b}.category.used{background:#dfe3e2;border:1px solid #aeb8b4;color:#46554e}.category.used .category-icon{filter:grayscale(1);opacity:.6;color:#53625b}.category.used strong{color:#46554e}.category.used .used-tag{background:#53645b;color:white;border-radius:4px;padding:3px;font-size:12px;font-weight:700;letter-spacing:-.02em}.category.closed{background:#e8e9e7;border-style:dashed}
[data-category=n1]{--tile-accent:#ac3e4b;--tile-wash:#fae9e8}[data-category=n2]{--tile-accent:#a65d1c;--tile-wash:#fff0d9}[data-category=n3]{--tile-accent:#95721c;--tile-wash:#fff7d5}[data-category=n4]{--tile-accent:#277446;--tile-wash:#e7f4e5}[data-category=n5]{--tile-accent:#2868a2;--tile-wash:#e6f0fc}[data-category=n6]{--tile-accent:#7850a0;--tile-wash:#f0e7f8}[data-category=three]{--tile-accent:#aa542a;--tile-wash:#fcebdc}[data-category=four]{--tile-accent:#a13f65;--tile-wash:#f8e5ee}[data-category=house]{--tile-accent:#7850a0;--tile-wash:#f0e7f8}[data-category=small]{--tile-accent:#287c8b;--tile-wash:#e1f3f6}[data-category=large]{--tile-accent:#315eaa;--tile-wash:#e6edfb}[data-category=five]{--tile-accent:#9c6a16;--tile-wash:#fff0bf}[data-category=chance]{--tile-accent:#20756a;--tile-wash:#e1f3ec}
.rainbow-card{padding:0}.rainbow-card .category-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.category .icon-red{color:#ad383e}.category .icon-green{color:#227345}.category .icon-blue{color:#2866ad}.category[data-category=red]{border-left:4px solid #ad383e}.category[data-category=green]{border-left:4px solid #227345}.category[data-category=blue]{border-left:4px solid #2866ad}.category[data-category=colorHouse]{border-left:4px solid #7650a2}.rainbow-card .category.used{border-left:4px solid #7d8982}.bonus{display:flex;justify-content:space-between;gap:10px;border-top:1px solid #ffffff30;padding-top:12px;margin-top:16px;color:#fff4d8}.bonus small{margin-left:10px;font-size:16px;color:#d0e2d7}.bonus-note{font-size:14px;color:#d0e2d7;margin:5px 0 0}.below{margin-top:20px}summary{cursor:pointer;padding:12px 0;color:#285f53}.rules{max-width:760px;color:#455d59}.rules li{margin-bottom:8px}.rolling .rolling-die{animation:tumble .3s ease-in-out}@keyframes tumble{50%{transform:translateY(-10px) rotate(9deg)}}@media(prefers-reduced-motion:reduce){.rolling .rolling-die{animation:none}.die{transition:none}}
@media(min-width:701px){.play-column,.game-layout>.scorecard{max-height:calc(100dvh - var(--hs-header-offset) - 24px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.table{display:grid;grid-template-columns:minmax(0,1fr) 76px;grid-template-rows:auto auto auto auto auto auto;gap:12px 16px;text-align:left;align-items:start}.table-top{grid-column:1/-1;grid-row:1;flex-wrap:wrap}.table-title{grid-column:1;grid-row:2;padding:0}.table h2{font-size:32px}.dice{grid-column:2;grid-row:2/7;flex-direction:column;align-items:center;gap:12px;margin:6px 0}.die{width:68px;height:76px;flex-shrink:0}.roll{grid-column:1;grid-row:3}.table-note{grid-column:1;grid-row:4;margin:0}.announcement{grid-column:1;grid-row:5;margin:0;min-height:64px;font-size:15px}.stats{grid-column:1;grid-row:6;grid-template-columns:1fr;gap:10px;padding-top:12px}.stats strong{font-size:32px}.stats span{font-size:14px}.save-status{grid-column:1/-1;grid-row:7;margin-top:8px}.game-layout{position:relative}.play-column{padding:20px}.game-layout>.scorecard{padding:20px}.die[aria-pressed=true]{transform:none}}
@media(min-width:701px) and (max-width:950px){main{padding:22px 16px 32px}.game-layout{grid-template-columns:minmax(245px,.8fr) minmax(0,1.2fr)}.play-column,.game-layout>.scorecard{padding:14px}.table{grid-template-columns:minmax(0,1fr) 62px;column-gap:10px}.table h2{font-size:27px}.die{width:56px;height:76px}.rainbow-card .category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.category{padding:6px;grid-template-columns:28px minmax(0,1fr);column-gap:3px}.category-icon{width:28px;height:28px}.score-heading{flex-wrap:wrap}.game-actions{grid-template-columns:1fr}.save-status{font-size:13px}}
@media(max-width:700px){main{padding:20px 14px 32px}.intro{gap:12px;align-items:flex-start}.badge{font-size:14px;padding:6px 10px}.game-layout{grid-template-columns:1fr}.play-column{border-right:0;border-bottom:1px solid #ffffff30;padding:18px 14px}.game-layout>.scorecard{padding:18px 14px}.table-title h2{font-size:26px}.die{width:clamp(44px,14vw,66px);height:84px}.dice{gap:7px}.game-actions{margin-top:4px}.score-heading{flex-wrap:wrap}.category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rainbow-card .category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.category{min-height:86px}.announcement{min-height:24px}.score-help{font-size:16px}.stats strong{font-size:32px}}
@media(max-width:360px){.intro{display:block}.badge{display:inline-block;margin-top:10px}.category{padding:7px;grid-template-columns:28px minmax(0,1fr);gap:4px 3px}.category-icon{width:28px;height:28px}.game-actions{grid-template-columns:1fr}}
@media(min-width:701px){.category-group,.rainbow-card h2{margin:10px 0 6px;line-height:1.2}.score-help{margin:8px 0 10px}.table h2{font-size:27px}.table-title p{margin:8px 0}.table-note{font-size:14px}.announcement{font-size:14px;min-height:44px}.stats{grid-template-columns:1fr 1fr;gap:10px}.stats strong{font-size:30px}.save-status{display:none}.game-actions{padding-top:16px}}
@media(min-width:951px){#categories .category-grid:last-child{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:951px){.game-layout{grid-template-columns:minmax(280px,.65fr) minmax(0,1.35fr)}.game-layout>.scorecard{padding:16px}.category-group,.rainbow-card h2{margin:8px 0 4px;line-height:1.2}.bonus{margin-top:10px;padding-top:8px}.bonus-note{margin-top:3px}}
@media(min-width:951px){.category{padding:6px 8px;row-gap:3px}.category strong{line-height:1}.category.used .used-tag{padding:2px 3px}.bonus-note{display:none}}
/* Keep the connected board compact and anchored to the page's left edge. */
@media(min-width:951px){.game-layout{max-width:960px;margin-left:0;margin-right:auto;grid-template-columns:320px minmax(0,1fr)}.game-layout>.scorecard{padding:16px}.category-grid{gap:6px}.category{padding:6px;min-height:76px}}

.reset-best-link{display:block;margin:7px 0 0;padding:2px 0;border:0;border-radius:0;background:none;box-shadow:none;color:#c5d8cd;font-size:13px;font-weight:400;line-height:1.4;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.reset-best-link:hover:enabled{color:#fff0bb}.reset-best-link:disabled{opacity:.5;cursor:wait}.game-actions{display:flex;justify-content:flex-end}.game-actions #new-game{width:auto;max-width:100%;min-width:140px;padding:10px 14px}

.reset-best-link{font-size:12px;white-space:nowrap}.stats>div{min-width:0}
/* Spent categories recede into the felt instead of competing with open tiles. */
.category.used{background:#29443e;border-color:#426057;color:#b6c5bc;box-shadow:inset 0 1px 3px #0002}.category.used strong{color:#d0dcd3}.category.used .category-icon{filter:grayscale(1) brightness(.75);opacity:.45}.category.used .used-tag{background:#344f46;color:#c5d3c9}.category.closed{background:#253e38;border-color:#405950;border-style:dashed}.rainbow-card .category.used{border-left-color:#426057}

.rainbow-mark{display:inline-flex;gap:16px;align-items:center;background:none;color:inherit;letter-spacing:0}.rainbow-mark>span{display:block;width:20px;height:20px;border-radius:50%}.mark-red{background:#ad383e}.mark-green{background:#227345}.mark-blue{background:#2866ad}
/* A narrower results panel, closer to a compact game score sheet. */
@media(min-width:951px){.game-layout{max-width:820px;grid-template-columns:320px minmax(0,1fr)}.game-layout>.scorecard{padding:12px}.category-grid{gap:5px}.category{padding:6px;grid-template-columns:28px minmax(0,1fr);column-gap:3px;min-height:74px}.category-icon{width:28px;height:28px}.score-heading{flex-wrap:wrap;gap:6px}.score-heading h2{font-size:25px}.score-help{font-size:13px;margin:7px 0 9px}.category-group,.rainbow-card h2{margin:8px 0 4px}}
.mobile-category-name{display:none}
/* Phone play: one screen, score sheet above a bottom dice/control dock. */
@media(max-width:700px){
body{background:#174a43}body>.hs-site-header{position:relative;min-height:44px;background:#f3f5f2}.hs-site-header .hs-site-header-inner{padding:7px 12px;min-height:44px;gap:6px}.hs-site-header .hs-brand{gap:7px}.hs-site-header .hs-brand-logo{width:28px;height:28px;flex-basis:28px}.hs-site-header .hs-brand .hs-brand-name{font-size:21px}.hs-site-header .hs-brand small{display:none}main{padding:0;max-width:none}.intro{display:none}.game-layout{height:calc(100dvh - 44px);min-height:480px;max-width:none;margin:0;border:0;border-radius:0;box-shadow:none;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:54px 24px minmax(0,1fr) 64px 48px 28px;gap:5px 8px;padding:6px 10px calc(5px + env(safe-area-inset-bottom));overflow:hidden;align-items:stretch}.play-column,.table{display:contents}.table-top{grid-column:1/-1;grid-row:2;font-size:14px;line-height:20px;align-items:center;padding:0 3px}.table-title,.table-note,.save-status{display:none}.stats{grid-column:1/-1;grid-row:1;grid-template-columns:1fr 1fr;text-align:center;border:0;padding:0;gap:12px;align-self:start}.stats>div{display:flex;flex-direction:column;align-items:center}.stats span{font-size:12px;line-height:16px}.stats strong{font:700 25px/27px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.reset-best-link{margin:0;font-size:11px;line-height:14px;padding:0}.dice{grid-column:1/-1;grid-row:4;gap:10px;margin:0;padding:3px 0 0;align-items:center;justify-content:center}.die{width:clamp(46px,15vw,64px);height:58px;border-radius:9px;padding:4px}.pips{grid-template-columns:repeat(3,6px);grid-template-rows:repeat(3,6px);gap:3px;margin-top:1px}.die.unrolled .pips{height:28px;font-size:24px}.die-caption{font-size:10px;line-height:12px}.die.rolling-die .die-caption{font-size:9px}.roll{grid-column:1/-1;grid-row:5;min-height:44px;padding:7px;font-size:19px;line-height:24px;align-self:stretch}.game-actions{grid-column:1/-1;grid-row:6;margin:0;padding:0;display:flex;justify-content:flex-end;align-items:center}.game-actions #new-game{min-width:0;min-height:0;padding:3px 0;border:0;background:none;box-shadow:none;text-decoration:underline;text-underline-offset:3px;font-size:13px;line-height:20px}.announcement{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;min-height:0}
.game-layout>.scorecard{grid-column:1/-1;grid-row:3;padding:0 2px 3px;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.score-heading,.score-help{display:none}#categories{display:grid;grid-template-columns:.82fr 1.18fr;grid-template-rows:auto auto;gap:4px 8px}#categories>.category-group:first-child{grid-column:1;grid-row:1}#categories>.category-grid:nth-child(2){grid-column:1;grid-row:2;align-self:start}#categories>.category-group:nth-child(3){grid-column:2;grid-row:1}#categories>.category-grid:last-child{grid-column:2;grid-row:2}.category-group,.rainbow-card h2{margin:0 0 3px;font-size:14px;line-height:17px}.category-grid,#categories .category-grid{grid-template-columns:1fr;gap:3px}.category{display:grid;grid-template-columns:28px minmax(0,1fr) 26px;grid-template-rows:1fr;gap:3px;padding:3px 5px;min-height:44px;height:44px;border-radius:7px}.category-icon{width:28px;height:28px;grid-column:1;grid-row:1}.category-label{grid-column:2;grid-row:1;font-size:16px;line-height:17px;min-width:0}.category-score{grid-column:3;grid-row:1;gap:1px}.category strong{font-size:18px;line-height:20px}.available-tag,.used-tag{display:none}.category.used .category-score::after{content:'✓';font-size:12px;line-height:12px;color:#c5d3c9}.category.closed .category-score::after{content:'×'}.category[data-category=three] .category-name,.category[data-category=four] .category-name,.category[data-category=five] .category-name{display:none}.mobile-category-name{display:inline}
#categories>.category-grid:nth-child(2) .category{grid-template-columns:28px minmax(0,1fr)}#categories>.category-grid:nth-child(2) .category-score{grid-column:2}.category[data-category^=n] .category-label{display:none}.rainbow-card{padding:0;margin-top:5px}.rainbow-card .category-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.rainbow-card .category{grid-template-columns:28px minmax(0,1fr);padding:3px;column-gap:2px}.rainbow-card .category-label{display:none}.rainbow-card .category-score{grid-column:2}.rainbow-card .category{border-left-width:3px}.bonus{margin-top:5px;padding-top:4px;font-size:14px;line-height:18px}.bonus small{font-size:14px;margin-left:6px}.bonus-note{display:none}.below{margin:0;padding:5px 12px 16px;background:#f4f3ed}.rules{font-size:16px}
}
@media(max-width:360px){.game-layout{column-gap:6px;padding-left:7px;padding-right:7px}#categories{grid-template-columns:.72fr 1.28fr;column-gap:6px}.category{padding:3px;grid-template-columns:24px minmax(0,1fr) 24px;gap:2px}.category-icon{width:24px;height:24px}.rainbow-card .category{grid-template-columns:24px minmax(0,1fr)}.dice{gap:8px}}
@media(max-width:700px) and (max-height:600px){.game-layout{min-height:480px}}
@media(max-width:700px){.game-layout{height:calc(100dvh - 45px);row-gap:4px}.bonus{margin-top:3px;padding-top:2px}}

.mobile-exit{display:none}@media(max-width:700px){body>.hs-site-header{display:none}.game-layout{height:100dvh;padding-top:calc(6px + env(safe-area-inset-top))}.game-actions{justify-content:space-between}.mobile-exit{display:inline;color:#c5d8cd;font-size:13px;line-height:20px;text-decoration:underline;text-underline-offset:3px}.mobile-exit:focus-visible{outline:3px solid #f3c966;outline-offset:3px}}
/* Use spare phone height for comfortable score-sheet spacing. */
@media(max-width:700px){.game-layout>.scorecard{container-type:size;container-name:phone-sheet}.category{border-radius:11px}.category.available{box-shadow:none}.rainbow-card{margin-top:9px}.category-grid,#categories .category-grid{gap:6px}#categories{column-gap:12px}.category-group,.rainbow-card h2{margin-bottom:6px}.category{padding:5px 7px;column-gap:5px}.bonus{margin-top:8px;padding-top:6px}}
@container phone-sheet (min-height:520px){.category{height:48px;min-height:48px}.category-grid,#categories .category-grid{gap:7px}.category-icon{width:30px;height:30px}.category{grid-template-columns:30px minmax(0,1fr) 26px}#categories>.category-grid:nth-child(2) .category{grid-template-columns:30px minmax(0,1fr)}.rainbow-card .category{grid-template-columns:30px minmax(0,1fr)}}
@container phone-sheet (min-height:580px){.category{height:53px;min-height:53px}.category-grid,#categories .category-grid{gap:9px}.category-group,.rainbow-card h2{margin-bottom:9px}.rainbow-card{margin-top:13px}}
@container phone-sheet (min-height:620px){.category{height:60px;min-height:60px}.category-grid,#categories .category-grid{gap:11px}.category{border-radius:13px}.rainbow-card{margin-top:16px}}

@media(max-width:700px){.rainbow-card .category-grid{gap:7px}}
@media(max-width:700px){#categories{grid-template-columns:84px minmax(0,1fr);column-gap:12px}#categories>.category-grid:nth-child(2) .category{padding-left:7px;padding-right:7px;column-gap:5px}}
@media(max-width:360px){#categories{grid-template-columns:76px minmax(0,1fr);column-gap:10px}#categories>.category-grid:nth-child(2) .category{padding-left:5px;padding-right:5px;column-gap:3px}}
/* Phone-specific square score tiles; no stretched spreadsheet rows. */
@media(max-width:700px){
.game-layout>.scorecard{container-type:normal;padding-left:2px;padding-right:2px}#categories{display:block}#categories>.category-group,.rainbow-card h2{margin:0 0 6px;font-size:14px;line-height:17px}#categories>.category-group:nth-child(3){margin-top:12px}#categories .category-grid,.rainbow-card .category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;align-items:stretch}#categories .category,.rainbow-card .category{width:100%;height:auto;min-height:0;aspect-ratio:1;display:grid;grid-template-columns:28px minmax(0,1fr);grid-template-rows:32px minmax(0,1fr);align-items:center;gap:2px 3px;padding:6px;border-radius:12px}.category-icon{width:28px;height:28px;grid-column:1;grid-row:1}.category-score,#categories>.category-grid:nth-child(2) .category-score,.rainbow-card .category-score{grid-column:2;grid-row:1;align-self:center;justify-self:end;gap:1px}.category strong{font-size:19px;line-height:21px}.category-label,.category[data-category^=n] .category-label,.rainbow-card .category-label{display:block;grid-column:1/-1;grid-row:2;font-size:13px;font-weight:600;line-height:15px;align-self:end}.category.used .category-score::after{font-size:11px;line-height:11px}.rainbow-card{margin-top:12px}.bonus{margin-top:9px;padding-top:6px}.category-name{display:inline}.category[data-category=three] .category-name,.category[data-category=four] .category-name,.category[data-category=five] .category-name{display:none}#categories>.category-grid:nth-child(2) .category{padding:6px;column-gap:3px;grid-template-columns:28px minmax(0,1fr)}
}
@media(max-width:360px){#categories .category-grid,.rainbow-card .category-grid{gap:6px}#categories .category,.rainbow-card .category,#categories>.category-grid:nth-child(2) .category{padding:4px;grid-template-columns:24px minmax(0,1fr);grid-template-rows:27px minmax(0,1fr);border-radius:10px}.category-icon{width:24px;height:24px}.category-label,.category[data-category^=n] .category-label,.rainbow-card .category-label{font-size:12px;line-height:13px}.category strong{font-size:18px;line-height:20px}}

@media(max-width:700px){.category-label,.category[data-category^=n] .category-label,.rainbow-card .category-label{font-size:16px;line-height:17px}.category[data-category=colorHouse] .category-name{display:none}}
@media(max-width:360px){.category-label,.category[data-category^=n] .category-label,.rainbow-card .category-label{font-size:14px;line-height:15px}.rainbow-card{margin-top:9px}.bonus{margin-top:6px}}
/* Mobile: wider, shallower number rows and consistent result tile heights. */
@media(max-width:700px){
.game-layout{--result-tile-height:calc((100vw - 48px)/4)}
#categories>.category-grid:nth-child(2){grid-template-columns:repeat(3,minmax(0,1fr))}
#categories>.category-grid:nth-child(2) .category{aspect-ratio:auto;height:calc(var(--result-tile-height)*2/3);min-height:44px;grid-template-columns:28px minmax(0,1fr);grid-template-rows:1fr;align-items:center;padding:7px 9px}
#categories>.category-grid:nth-child(2) .category-icon{grid-column:1;grid-row:1}
#categories>.category-grid:nth-child(2) .category-score{grid-column:2;grid-row:1}
#categories>.category-grid:nth-child(2) .category-label{display:none}
#categories>.category-grid:last-child .category,.rainbow-card .category{aspect-ratio:auto;height:var(--result-tile-height);min-height:44px}
.rainbow-card{margin-top:20px}.rainbow-card h2{margin-bottom:10px}.rainbow-card .category-grid{gap:8px}.bonus{margin-top:12px;padding-top:8px}
}
@media(max-width:360px){.game-layout{--result-tile-height:calc((100vw - 38px)/4)}#categories>.category-grid:nth-child(2) .category{padding:5px 8px;grid-template-columns:24px minmax(0,1fr)}.rainbow-card .category-grid{gap:6px}.rainbow-card{margin-top:17px}}
@media(max-width:700px){#categories>.category-grid:nth-child(2) .category{grid-template-rows:1fr 1fr;row-gap:0;padding:5px 8px}#categories>.category-grid:nth-child(2) .category-icon{grid-row:1/3;align-self:center}#categories>.category-grid:nth-child(2) .category-label{display:block;grid-column:2;grid-row:2;text-align:right;align-self:end;font-size:16px;line-height:17px}#categories>.category-grid:nth-child(2) .category-score{align-self:start}#categories>.category-grid:nth-child(2) .category.used .category-score::after{display:none}}

@media(max-width:700px){.game-layout{grid-template-rows:54px 24px minmax(0,1fr) 64px 28px}.dice{grid-row:4;gap:6px;padding-top:3px}.die,#dice>.roll{width:clamp(42px,calc((100vw - 54px)/6),64px);height:58px;min-height:58px;flex:0 0 clamp(42px,calc((100vw - 54px)/6),64px);border-radius:9px}.die{padding:4px 2px}#dice>.roll{grid-column:auto;grid-row:auto;padding:4px 2px;font-size:0;line-height:1;border:2px solid #f8d88e;box-shadow:0 5px 0 #0003;align-self:center;display:flex;align-items:center;justify-content:center}#dice>.roll::after{content:attr(data-compact-label);font-size:15px;font-weight:800;line-height:1.1}.die-caption{font-size:9px}.die.rolling-die .die-caption{font-size:8px}.game-actions{grid-row:5}.below{padding-top:0}}

.mobile-rules{display:none}#rules-dialog{max-width:680px;max-height:calc(100dvh - 24px);overflow:auto;background:#174a43;color:#fff3cc;border:1px solid #78968a;border-radius:16px;padding:20px}#rules-dialog::backdrop{background:#0009}#rules-dialog button{padding:10px 16px;border-radius:8px} @media(max-width:700px){.below{display:none}.mobile-rules{display:inline;background:none;border:0;padding:2px 4px;color:#c5d8cd;font:inherit;font-size:13px;text-decoration:underline}.game-actions{gap:6px}}

/* Phone: Roll occupies the eighth combination slot; five larger dice fill the dock. */
@media(max-width:700px){
.game-layout{grid-template-rows:54px 24px minmax(0,1fr) 82px 28px}
#categories>.category-grid:last-child .category,.rainbow-card .category{height:calc(var(--result-tile-height)*.9)}
#categories .roll{grid-column:4;grid-row:2;width:100%;height:calc(var(--result-tile-height)*.9);min-height:44px;margin:0;padding:6px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:0;line-height:1;border:2px solid #f8d88e;box-shadow:0 4px 0 #0003}
#categories .roll::after{content:attr(data-compact-label);font-size:20px;font-weight:800;line-height:1.1}
.dice{gap:8px;padding-top:3px}.die{width:calc((100vw - 56px)/5);flex:0 0 calc((100vw - 56px)/5);height:76px;min-height:76px;border-radius:11px;padding:5px 4px}.die .pips{width:35px;height:35px;grid-template-columns:repeat(3,9px);grid-template-rows:repeat(3,9px);gap:4px}.die-caption{font-size:11px}
}

/* Let the dice occupy the middle of the space below the score sheet. */
@media(max-width:700px){.game-layout{grid-template-rows:54px 24px minmax(0,max-content) minmax(82px,1fr) 28px}.dice{align-self:stretch;align-items:center;padding-top:0}}

/* Match the spacing between groups and keep bonus progress beside Combinations. */
@media(max-width:700px){
#categories>.category-group:nth-child(3){display:flex;align-items:center;justify-content:space-between;gap:6px}
#categories .bonus{display:inline-flex;align-items:center;justify-content:flex-start;gap:2ch;margin:0;padding:0;border:0;white-space:nowrap;font-size:12px;line-height:17px;font-weight:400}
#categories .bonus small{font-size:12px;margin-left:5px}#categories .bonus strong{font-size:12px}
.rainbow-card{margin-top:12px}.rainbow-card h2{margin-bottom:6px}
}
@media(max-width:360px){#categories .bonus,#categories .bonus small,#categories .bonus strong{font-size:11px}}

@media(min-width:701px){.dice{align-self:end}}

.mode-choice{display:flex;gap:8px}.mode-choice a{border:1px solid #b8c9bd;border-radius:20px;padding:9px 14px;color:#214f46;text-decoration:none;font-size:16px}.mode-choice [aria-current=page]{background:#174a43;color:#fff0bb}.mobile-mode{display:none}.match-message{color:#fff0bb;font-size:14px;line-height:1.35;margin:8px 0}.reset-best-link:disabled{opacity:.6}body[data-mode=opponent] .score-help{display:none}
@media(max-width:700px){.mobile-mode{display:inline;color:#fff0bb;font-size:13px;text-decoration:underline;text-underline-offset:3px}.game-actions{gap:5px}.game-actions .mobile-exit{font-size:13px}body[data-mode=opponent] .match-message{font-size:12px;margin:0 0 6px;line-height:15px}body[data-mode=opponent] .table-top{font-size:12px}body[data-mode=opponent] #view-card{font-size:11px}}

#rules-dialog .rules{color:#d8e6db}

/* A separate match overview uses the open desktop space without stretching play. */
.match-layout{display:grid;grid-template-columns:minmax(0,820px);gap:20px;align-items:start}.match-summary{padding:20px;background:#174a43;color:#e5eee6;border:1px solid #306258;border-radius:22px;min-width:0}.match-summary h2{font:normal 28px/1.2 Georgia,serif;color:#fff0bb;margin:0 0 8px}.match-lead{font-size:18px;color:#fff0bb;margin:0 0 18px}.match-totals{display:grid;grid-template-columns:1fr 1fr;gap:10px}.summary-score{padding:12px;border:1px solid #628279;border-radius:14px;display:flex;flex-direction:column}.summary-score>span{font-size:16px}.summary-score strong{font:700 38px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#fff5d8}.summary-score small{font-size:13px;color:#c5d8cd}.summary-score.current-player{border-color:#f8d88e;background:#ffffff0b}.accomplishment-player{margin-top:24px}.accomplishment-player h3{display:flex;justify-content:space-between;gap:8px;align-items:baseline;font-size:18px;color:#fff0bb;margin:0 0 10px}.accomplishment-player h3>span{font-size:13px;font-weight:400;color:#c5d8cd}.accomplishment-strip{display:grid;grid-template-columns:repeat(17,minmax(0,1fr));gap:3px}.summary-tile{min-width:0;border:1px solid #78968a;border-radius:5px;padding:3px 1px;display:flex;flex-direction:column;align-items:center;color:#92b3a5;background:#123c36}.summary-tile .category-icon{width:100%;height:auto;max-width:28px;aspect-ratio:1;grid-column:auto;grid-row:auto}.summary-tile small{font-size:11px;line-height:13px;font-weight:700}.summary-tile.achieved{background:#dff1c9;border-color:#9bc773;color:#21653e}.summary-tile.missed{background:#344b45;border-color:#61766d;color:#b2beb7}.summary-tile.missed .category-icon{filter:grayscale(1);opacity:.45}.summary-tile.unfilled .category-icon{opacity:.5}.summary-tile:nth-child(6),.summary-tile:nth-child(13){border-right:3px solid #c7b66b}.accomplishment-stats,.accomplishment-bonus{font-size:14px;margin:9px 0 0;color:#d8e6db}.accomplishment-bonus{margin-top:3px}.accomplishment-key{border-top:1px solid #ffffff25;padding-top:16px;margin:22px 0 0;display:flex;gap:12px;flex-wrap:wrap;font-size:13px}.summary-note{font-size:13px;line-height:1.4;color:#c5d8cd;margin:12px 0 0}
@media(min-width:1280px){body[data-mode=opponent] main{max-width:1600px}.match-layout{grid-template-columns:820px minmax(0,1fr)}.match-summary{position:sticky;top:calc(var(--hs-header-offset,86px) + 16px)}}
@media(max-width:700px){.match-layout{display:block}.match-summary{display:none}}

.accomplishment-groups{display:grid;grid-template-columns:6fr 7fr 4fr;gap:3px;font-size:11px;line-height:15px;color:#c5d8cd;margin-bottom:5px}

.accomplishment-board{display:grid;grid-template-columns:7fr 4fr;gap:12px 10px}.accomplishment-group:first-child{grid-column:1/-1}.accomplishment-group{min-width:0}.accomplishment-group h4{font-size:13px;line-height:18px;font-weight:400;color:#c5d8cd;margin:0 0 5px}.accomplishment-board .summary-tile:nth-child(6),.accomplishment-board .summary-tile:nth-child(13){border-right-width:1px}.accomplishment-board .summary-tile .category-icon{max-width:30px}

.match-summary-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px}.match-summary-heading h2{margin:0}.view-card-button{border:1px solid #b7cbbd;border-radius:9px;padding:8px 12px;background:#ffffff0b;color:#fff0bb;font-size:14px;line-height:20px;white-space:nowrap}.view-card-button:hover:enabled{background:#ffffff18}.view-card-button:disabled{opacity:.6}@media(max-width:700px){.stats .view-card-button{border:0;border-radius:0;background:none;padding:0;font-size:11px;line-height:14px;text-decoration:underline;color:#c5d8cd}}
@media(min-width:701px) and (max-width:1400px){.match-summary-heading{align-items:flex-start;flex-wrap:wrap}}
@media(min-width:701px){body[data-mode=opponent] .stats>div>span{min-height:42px}}

@media(min-width:1280px){.match-layout{align-items:stretch}.match-summary{position:relative;top:auto;display:flex;flex-direction:column}.match-layout>.game-layout .play-column,.match-layout>.game-layout>.scorecard{max-height:none}.match-summary #match-accomplishments{flex:1;display:flex;flex-direction:column;justify-content:space-between}}
.summary-tile[data-tooltip]{position:relative}.summary-tile[data-tooltip]::after{content:attr(data-tooltip);display:none;position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);width:max-content;max-width:220px;padding:7px 9px;border-radius:7px;background:#fff3cc;color:#173f38;box-shadow:0 3px 12px #0004;font-size:13px;line-height:18px;font-weight:500;text-align:left;z-index:20;pointer-events:none}.summary-tile[data-tooltip]:hover::after,.summary-tile[data-tooltip]:focus-visible::after{display:block}.summary-tile[data-tooltip]:nth-child(-n+2)::after{left:0;transform:none}.summary-tile[data-tooltip]:nth-last-child(-n+2)::after{left:auto;right:0;transform:none}.summary-tile:focus-visible{outline:2px solid #ffe08a;outline-offset:3px}
.computer-choice{position:relative;z-index:2;outline:3px solid transparent;outline-offset:2px;animation:computer-choice-pulse .6s ease-in-out 2}
@keyframes computer-choice-pulse{0%,100%{outline-color:transparent;box-shadow:0 0 0 0 #ffdc7500}25%,65%{outline-color:#ffdc75;box-shadow:0 0 12px 3px #ffdc7566}}
@media(prefers-reduced-motion:reduce){.computer-choice{animation:none;outline-color:#ffdc75}}

/* Center the desktop stack in the available space above the game actions. */
@media(min-width:701px){.table{flex:1;grid-template-rows:auto auto auto auto auto 1fr auto}.dice{grid-row:2/8;align-self:center;margin:0}.save-status{grid-column:1}}

/* Keep the overview compact so equal-height panels do not add empty scorecard space. */
@media(min-width:1280px){.match-summary{padding:16px}.match-summary h2{font-size:26px}.match-lead{font-size:16px;margin-bottom:10px}.match-summary .summary-score{padding:8px}.summary-score strong{font-size:32px}.accomplishment-player{margin-top:16px}.accomplishment-player h3{font-size:16px;margin-bottom:6px}.accomplishment-board{gap:8px}.accomplishment-group h4{line-height:16px;margin-bottom:3px}.accomplishment-board .summary-tile .category-icon{max-width:28px}.accomplishment-board .summary-tile{padding-top:2px;padding-bottom:2px}.accomplishment-board .summary-tile small{line-height:12px}.accomplishment-bonus{font-size:13px;margin-top:2px}}

/* Held computer dice keep the same gold selection outline as human-held dice. */
body.computer-turn .summary-score.current-player{border-color:#628279}

.match-records{font-size:13px;line-height:18px;color:#c5d8cd;margin:5px 0}@media(max-width:700px){.match-records{font-size:12px;line-height:15px;margin:0 0 4px}}

.desktop-rules{background:none;border:0;padding:0;color:#285f53;font-size:16px;line-height:24px;text-decoration:underline;text-underline-offset:3px;justify-self:end}@media(min-width:701px){.intro{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 16px}.intro>div{display:contents}.intro h1{grid-column:1;grid-row:1}.intro .mode-choice{grid-column:2;grid-row:1}.intro .subtitle{grid-column:1;grid-row:2}.intro .desktop-rules{grid-column:2;grid-row:2;align-self:center}}
