/* Bopuloo original pastel card-game UI — independent of Klondike's .sol-* rules. */
.cg-game{--cg-w:clamp(39px,4.25vw,72px);--cg-h:calc(var(--cg-w)*1.43);--cg-step:clamp(22px,2.15vw,32px)}
.cg-deck{background:linear-gradient(140deg,#d9f5e6,#bfeada 68%,#c5efec);border:2px solid #9bd7c4;border-radius:20px;padding:15px 12px 20px;box-shadow:0 6px 0 #a5d7c9;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-color:#88c9b5 transparent}
.cg-board{min-width:490px;max-width:100%;margin:0 auto}
.cg-spider .cg-board{min-width:545px}
.cg-toprow{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px;min-height:70px}
.cg-top-pockets{display:grid;grid-auto-flow:column;gap:8px;align-items:start}
.cg-stock-button{display:flex;gap:11px;align-items:center;background:#fdfbf3;border:2px solid #a6d5b9;border-radius:13px;padding:7px 12px;min-height:49px;font-weight:900;color:#526b61;cursor:pointer}
.cg-stock-button:hover:not(:disabled){background:#fff}
.cg-stock-button:disabled{opacity:.55;cursor:not-allowed}
.cg-stock-image{background:repeating-linear-gradient(45deg,#a795e2,#a795e2 7px,#c7b8f7 7px,#c7b8f7 14px);border:3px solid #fff;box-shadow:0 2px 0 #7b7b9a;border-radius:5px;width:31px;height:40px}
.cg-finished{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.cg-complete-badge{display:flex;align-items:center;justify-content:center;font-weight:950;color:#447768;background:#ffffffb9;border:2px solid #a8d9cb;border-radius:9px;width:46px;height:52px}
.cg-columns{display:grid;gap:6px;align-items:start}
.cg-spider .cg-columns{grid-template-columns:repeat(10,minmax(0,1fr))}
.cg-freecell .cg-columns{grid-template-columns:repeat(8,minmax(0,1fr))}
.cg-column{position:relative;min-height:400px;min-width:0;scroll-margin:10px}
.cg-card{width:var(--cg-w);height:var(--cg-h);border-radius:8px;background:#fffdf9;color:#3e3357;border:2px solid #fff;box-shadow:0 2px 0 #a3aaa6,0 3px 6px #4d777a24;position:absolute;left:50%;transform:translateX(-50%);font-family:var(--heading,system-ui);font-weight:1000;text-align:left;display:flex;flex-direction:column;padding:4px 5px;cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:manipulation;transition:filter .12s,background-color .12s}
.cg-card:hover{filter:brightness(.98)}.cg-card.cg-red{color:#e94e72}
.cg-corner{display:flex;flex-direction:column;font-size:clamp(12px,1.25vw,18px);line-height:1;gap:2px}.cg-corner span{font-size:clamp(12px,1.3vw,17px)}
.cg-center{font-size:clamp(15px,2.3vw,27px);align-self:center;margin:auto 0}
.cg-back{background:repeating-linear-gradient(45deg,#9986d7,#9986d7 7px,#bdadef 7px,#bdadef 14px);border:4px solid white;box-shadow:0 2px 0 #94b9ad;align-items:center;justify-content:center}
.cg-back-mark{font-size:23px;color:#fff9e9;text-shadow:0 1px #7f6aab}
.cg-card.cg-selected{outline:3px solid #ffa747;outline-offset:1px;filter:drop-shadow(0 0 4px #ffae4e)}
.cg-card.cg-hint{outline:3px solid #7d6be5;outline-offset:0}.cg-card.cg-target{outline:3px solid #34a89c;outline-offset:0}
.cg-card:focus-visible,.cg-slot:focus-visible,.cg-stock-button:focus-visible{outline:3px solid #6a50ca;outline-offset:2px}
.cg-empty{width:var(--cg-w);height:var(--cg-h);border:2px dashed #80bfa9;background:#d8f3e7;border-radius:9px;display:flex;justify-content:center;align-items:center;color:#8cbdaa;font-weight:900;font-size:22px;cursor:pointer;margin:0 auto;touch-action:manipulation}
.cg-empty:hover{background:#f4fffb}
.cg-freecell-top{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;margin-bottom:19px;min-height:var(--cg-h)}
.cg-cell-wrap{position:relative;display:flex;justify-content:center;min-width:0;min-height:var(--cg-h)}
.cg-cell-wrap .cg-card{top:0!important;position:relative;left:auto;transform:none}
.cg-cell-wrap .cg-empty{font-size:clamp(17px,2.2vw,27px);padding:0}
.cg-cell-wrap .cg-empty.cg-target,.cg-column .cg-empty.cg-target{outline:3px solid #32b5a3;outline-offset:1px;background:#e8fff6}
.cg-cell-wrap:nth-child(n+5) .cg-empty{background:#e8ebfb;border-color:#a8b6df;color:#8b8ec4}
.cg-tableau-hint{color:#597d72;font-size:12px;font-weight:750;margin:6px 0 0}
.cg-notice{padding:11px 13px;margin-top:14px;border-radius:12px;background:#f8f3ff;color:#7459aa;font-size:13px;font-weight:800;min-height:41px}
.cg-notice:empty{visibility:hidden;min-height:24px;padding:0;margin-top:0}
.cg-status{margin-top:12px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.cg-streak{border-radius:12px;padding:8px 13px;background:#fff1d4;color:#997038;font-size:13px;font-weight:900}
.cg-celebrate{background:linear-gradient(105deg,#ffdfaf,#f9cfff,#c9eedd);padding:16px;border-radius:16px;margin:15px 0;text-align:center;font-size:16px;font-weight:950;color:#574080}
.cg-help{font-size:12px;color:#786f83;margin:14px 0 4px;line-height:1.7}
.cg-choice{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.cg-label{font-size:12px;color:#7e7394;font-weight:900}
.cg-choice .difficulty-select{max-width:none}
@media(max-width:700px){
 .cg-deck{padding:12px 8px;max-width:100%;--cg-w:49px;--cg-step:25px}
 .cg-spider .cg-board{min-width:555px}.cg-freecell .cg-board{min-width:490px}
 .cg-card{padding:3px 4px}.cg-corner{font-size:14px}.cg-corner span{font-size:14px}.cg-center{font-size:19px}
 .cg-toprow{min-height:59px}.cg-stock-button{font-size:12px;padding:6px 9px}
 .cg-column{min-height:345px}.cg-complete-badge{width:35px;height:42px;font-size:13px}
}
@media(min-width:1400px){.cg-game{--cg-w:clamp(47px,4.25vw,72px);--cg-step:30px}.cg-spider .cg-board{min-width:610px}.cg-freecell .cg-board{min-width:540px}}
/* Keep a wide inner card table scrollable without widening the mobile page. */
.game-page-grid > div{min-width:0}
.cg-game{min-width:0;max-width:100%}
.cg-deck{width:100%;max-width:100%;min-width:0}

.cg-mobile-cue{display:none;margin:3px 0 9px;padding:6px 10px;border-radius:10px;background:#e7f9ef;color:#4e8774;font-size:12px;font-weight:800}
@media(max-width:700px){.cg-mobile-cue{display:block}}
.ill-spider .cards-mini span{color:#392f52}
.ill-freecell .cards-mini span:nth-child(1),.ill-freecell .cards-mini span:nth-child(3){color:#e25272}
.ill-freecell .cards-mini span:nth-child(2){color:#392f52}
