/* Game 17 – Kakuro (Cross Sums). Fully scoped visual system. */
.kr-catalog-art{background:linear-gradient(145deg,#e9f4fc,#e3eaf7);display:grid;place-items:center}
.kr-catalog-demo{display:grid;grid-template-columns:repeat(4,30px);grid-template-rows:repeat(4,30px);gap:2px;border:2px solid #173f57;background:#173f57;transform:rotate(-2deg)}
.kr-catalog-demo i{display:grid;place-items:center;background:#fff;color:#254a67;font:900 15px Nunito,Arial,sans-serif;font-style:normal}.kr-catalog-demo i.dark{background:#315166;color:transparent}.kr-catalog-demo i.hint{font-size:10px;color:#fff;background:linear-gradient(132deg,#315166 48%,#c3d4e1 50%,#315166 52%)}
.kr-catalog .catalog-open{color:#235f9a}.kr-playground{min-height:0;flex:1;display:flex;align-items:center;justify-content:center}.kr-play-area{height:100%;width:100%;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:5px}
.kr-board{--kr-n:6;--kr-size:445px;display:grid;grid-template-columns:repeat(var(--kr-n),minmax(0,1fr));grid-template-rows:repeat(var(--kr-n),minmax(0,1fr));width:var(--kr-size);height:var(--kr-size);box-sizing:border-box;border:4px solid #29445e;border-radius:12px;overflow:hidden;box-shadow:0 0 0 4px #e4eef7,0 8px 19px #2a506425;background:#fff}
.kr-cell,.kr-block{min-width:0;min-height:0;box-sizing:border-box;position:relative;border:1px solid #b5c6d4;display:grid;place-items:center}.kr-cell{font:900 clamp(1rem,3.4vmin,2.15rem)/1 Nunito,Arial,sans-serif;background:#f7fbfc;color:#203f5e;padding:0;cursor:pointer;touch-action:manipulation}.kr-cell:nth-child(2n){background:#edf4f9}.kr-cell.fixed{background:#dfeeea!important;color:#18605b!important}.kr-cell.selected{background:#ffe9bc!important;box-shadow:inset 0 0 0 3px #c87c2e;z-index:2}.kr-cell:hover:not(.selected){filter:brightness(.95)}.kr-cell:focus-visible{outline:3px solid #de8a2b;outline-offset:-3px;z-index:3}
.kr-block{background:#2b455d;border-color:#547086}.kr-block.hint{background:#324c63}.kr-diag{position:absolute;inset:0;background:linear-gradient(to bottom right,transparent calc(50% - .65px),#c0d1dd 50%,transparent calc(50% + .65px));pointer-events:none}.kr-down,.kr-across{position:absolute;color:#fff;font:800 clamp(.55rem,1.2vmin,.9rem)/1 Nunito,Arial,sans-serif;pointer-events:none}.kr-down{bottom:8%;left:11%}.kr-across{top:9%;right:10%}
.kr-pad{display:flex;justify-content:center;gap:4px;flex-wrap:nowrap;max-width:100%;padding:1px}.kr-pad button{min-width:0;width:clamp(25px,3.2vw,43px);height:39px;background:#fff;border:1px solid #c4d6e1;color:#204b64;font:900 1.12rem/1 Nunito,Arial,sans-serif;border-radius:8px;box-shadow:0 2px 0 #aabfc9;cursor:pointer}.kr-pad button:last-child{width:47px;font-size:.9rem}.kr-pad button:disabled{opacity:.48;cursor:default}.kr-pad button:not(:disabled):hover{background:#cce7e8;color:#064c54}.kr-controls{display:flex;justify-content:center;gap:8px;align-items:center}.kr-controls .btn{min-height:39px}.kr-play-area .feedback:empty,.kr-race-area .feedback:empty{display:none}
.kr-race-area{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:0}.kr-race-board{--kr-size:360px}.kr-race-stage .race-panels{position:relative}.kr-race-stage .race-center-new{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:5;background:#008f83!important;color:white!important;box-shadow:0 3px 0 #07736a,0 5px 14px #164e4c40}.kr-race-area .kr-pad button{width:clamp(20px,2.5vw,31px);height:33px;font-size:.85rem}.kr-race-area .kr-pad button:last-child{width:36px}.kr-race-stage .race-side{min-width:0}
.kr-print-sheet{padding-top:7mm}.kr-print-body{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));height:252mm;gap:3mm}.kr-print-card{border:.28mm solid #999;border-radius:1.4mm;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0}.kr-print-grid{--kr-n:8;display:grid;grid-template-columns:repeat(var(--kr-n),minmax(0,1fr));grid-template-rows:repeat(var(--kr-n),minmax(0,1fr));width:60.4mm;height:60.4mm;border:.32mm solid #111;box-sizing:border-box}.kr-print-cell,.kr-print-block{position:relative;min-width:0;min-height:0;display:grid;place-items:center;box-sizing:border-box;border:.13mm solid #8a8a8a}.kr-print-cell{background:#fff;font:800 11pt/1 Arial,sans-serif;color:#171717}.kr-print-cell.fixed{font-weight:900}.kr-print-block{background:#ededed!important;color:#171717;-webkit-print-color-adjust:exact;print-color-adjust:exact}.kr-print-diag{position:absolute;inset:0;background:linear-gradient(to bottom right,transparent 49%,#888 50%,transparent 51%);pointer-events:none}.kr-print-down,.kr-print-across{position:absolute;line-height:1;font:700 7pt Arial,sans-serif;color:#171717}.kr-print-down{left:8%;bottom:8%}.kr-print-across{right:8%;top:8%}
html[data-theme='dark'] .kr-board{border-color:#a2bbd1;box-shadow:0 0 0 4px #2e485c,0 10px 18px #0004}html[data-theme='dark'] .kr-cell{background:#23384a;color:#effaff;border-color:#506e82}html[data-theme='dark'] .kr-cell:nth-child(2n){background:#294052}html[data-theme='dark'] .kr-cell.fixed{background:#175148!important;color:#fff!important}html[data-theme='dark'] .kr-block{background:#0c2134}html[data-theme='dark'] .kr-cell.selected{background:#71502d!important;color:#fff}html[data-theme='dark'] .kr-pad button{background:#254152;color:#fff;border-color:#55768a}html[data-theme='dark'] .kr-pad button:hover:not(:disabled){background:#215c63;color:white}
@media(max-width:650px){.kr-play-area{gap:5px;padding:3px}.kr-pad{gap:2px}.kr-pad button{width:clamp(24px,6vw,34px);height:36px;font-size:.98rem}.kr-controls{gap:5px}}
@media print{.kr-print-block{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
@page kakuroA4{size:A4 portrait;margin:5mm}
@media print{
 .kr-print-sheet{page:kakuroA4;width:200mm!important;height:287mm!important;max-height:287mm!important;}
 .kr-print-sheet .sheet-head{height:26mm;min-height:26mm;padding-top:.5mm}
 .kr-print-sheet .sheet-head h1{font-size:18pt!important}
 .kr-print-sheet .sheet-head .print-howto{font-size:8.5pt!important;font-weight:800}
 .kr-print-sheet .sheet-head .print-rule{font-size:8.9pt!important;line-height:1.25!important}
 .kr-print-sheet .kr-print-body{flex:1;height:auto;min-height:0;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:1.5mm}
 .kr-print-sheet .kr-print-grid{width:61mm;height:61mm}
 .kr-print-sheet .sheet-footer{height:8mm}
}
/* Large and high-contrast sums must remain legible even at 8×8 and in dark mode. */
.kr-down,.kr-across{font-size:clamp(.9rem,2.1vmin,1.2rem);text-shadow:0 1px 1px #0d1d2d}
@media(max-width:650px){.kr-down,.kr-across{font-size:clamp(.78rem,3.2vw,1rem)}}
