:root{
  --ink:#17233d;--muted:#6c7890;--blue:#2d4b9d;--blue2:#1a326f;--gold:#f5c84d;--gold2:#ffea82;
  --line:#171b24;--danger:#c83b50;--devil:#6b28b5;--panel:#f8fbff;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Pretendard,"Noto Sans KR",system-ui,sans-serif;background:radial-gradient(circle at 15% 0,#f8fbff 0,#eef4ff 35%,#e6edf9 100%);color:var(--ink)}
button,input,[contenteditable]{font:inherit}
button{touch-action:manipulation}
[hidden]{display:none!important}
.cb-app{min-height:100dvh;max-width:1540px;margin:0 auto;padding:12px 14px calc(24px + env(safe-area-inset-bottom))}
.cb-topbar{display:flex;align-items:center;gap:16px;padding:11px 14px;border:1px solid rgba(75,96,156,.16);border-radius:20px;background:rgba(255,255,255,.9);box-shadow:0 12px 30px rgba(43,62,122,.11);backdrop-filter:blur(16px);position:relative;z-index:30}
.cb-brand{display:flex;align-items:center;gap:11px;min-width:0}.cb-brand-icon{width:50px;height:50px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(145deg,#fff5aa,#efb52e);box-shadow:inset 0 2px #fff,0 7px 16px rgba(151,101,13,.18);font-size:27px}.cb-brand small{display:block;color:#7281a2;font-size:9px;font-weight:1000;letter-spacing:.15em}.cb-brand h1{margin:2px 0 0;font-size:clamp(23px,2vw,34px);line-height:1.05;letter-spacing:-.05em}.cb-top-actions{margin-left:auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:7px}
.cb-btn,.cb-mini-btn{border:0;cursor:pointer;font-weight:950}.cb-btn{min-height:42px;padding:0 14px;border-radius:13px}.cb-btn.ghost{background:#eef3ff;color:#29438c;border:1px solid #d8e2fb}.cb-btn.ghost[aria-pressed=true]{background:#29438c;color:#fff}.cb-btn.expand{background:linear-gradient(180deg,#fff,#edf2ff);color:#243d8d;border:1px solid #d4dff7;box-shadow:inset 0 1px #fff}.cb-btn.expand[aria-pressed=true]{background:linear-gradient(180deg,#3554a9,#213878);color:#fff;border-color:#203875}.cb-btn.dark{background:#18243e;color:#fff}
.cb-toolbar{margin:10px 0;display:flex;align-items:center;gap:12px;justify-content:space-between;padding:9px 11px;border:1px solid rgba(71,94,158,.14);border-radius:16px;background:rgba(255,255,255,.82);box-shadow:0 7px 20px rgba(46,68,130,.07)}.cb-toolbar-group{display:flex;align-items:center;gap:9px;min-width:0}.cb-toolbar-group>span{font-size:11px;font-weight:1000;color:#6d7b9b;white-space:nowrap}.cb-segment{display:flex;gap:4px;padding:4px;border-radius:12px;background:#e9eef9}.cb-segment button{min-height:36px;padding:0 12px;border:0;border-radius:9px;background:transparent;color:#536483;font-size:11px;font-weight:950;cursor:pointer;white-space:nowrap}.cb-segment button small{font-size:8px;color:#8a97af;margin-left:3px}.cb-segment button.active{background:#fff;color:#243c88;box-shadow:0 4px 10px rgba(50,73,139,.13)}.cb-mini-btn{min-height:34px;padding:0 10px;border-radius:9px;background:#263b72;color:#fff;font-size:10px}.cb-mini-btn.danger{background:#fff0f2;color:#b53145;border:1px solid #ffd5dc}.cb-save-state{font-size:10px!important;color:#3c8c62!important}.cb-save-state.saving{color:#b57a14!important}
.cb-board-shell{padding:10px;border:1px solid rgba(60,81,142,.15);border-radius:24px;background:rgba(255,255,255,.78);box-shadow:0 18px 46px rgba(38,61,127,.12)}
.cb-board{--cols:6;--rows:4;position:relative;display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));grid-template-rows:repeat(var(--rows),minmax(0,1fr));width:100%;aspect-ratio:1.76;min-height:520px;max-height:790px;border:5px solid var(--line);border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 16px 38px rgba(15,30,70,.16),inset 0 0 0 1px #fff}
.cb-cell{position:relative;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;padding:10px 8px;border:0;background:linear-gradient(155deg,var(--cell-a,#fff2a8),var(--cell-b,#ffd86a));box-shadow:inset 0 0 0 2px var(--line),inset 0 2px rgba(255,255,255,.42),inset 0 -10px 22px rgba(62,45,17,.06);color:#161b27;text-align:center;font-size:clamp(13px,1.35vw,22px);font-weight:1000;line-height:1.14;letter-spacing:-.035em;overflow:hidden;word-break:keep-all;overflow-wrap:anywhere;transition:filter .18s,transform .18s,box-shadow .18s}.cb-cell::before{content:"";position:absolute;inset:4px;border-radius:8px;border:1px solid rgba(255,255,255,.35);pointer-events:none}.cb-cell .cb-cell-text{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;width:100%;max-height:5em;padding:0 3px;pointer-events:none}.cb-cell.blank .cb-cell-text::before{content:"내용 입력";color:rgba(23,30,45,.28);font-size:.72em}.cb-cell-decor{position:absolute;left:7px;top:6px;z-index:2;font-size:clamp(13px,1.25vw,20px);filter:drop-shadow(0 2px 2px rgba(0,0,0,.12));pointer-events:none}.cb-cell.start{background:linear-gradient(145deg,#66e6a8,#19ac68);color:#07351f}.cb-cell.trap{background:linear-gradient(145deg,#ff7688,#d53250);color:#fff}.cb-cell.fixed .cb-cell-text{font-size:1.24em;text-shadow:0 2px rgba(255,255,255,.22)}.cb-cell.kind-product .cb-cell-decor{transform:scale(1.08)}.cb-cell.kind-blank{filter:saturate(.75)}.cb-cell.kind-punishment{box-shadow:inset 0 0 0 2px var(--line),inset 0 -14px 24px rgba(170,58,42,.09)}.cb-cell.kind-reaction{box-shadow:inset 0 0 0 2px var(--line),inset 0 -14px 24px rgba(111,72,181,.08)}
.cb-cell.product-protected:not(.start):not(.trap){box-shadow:inset 0 0 0 2px var(--line),inset 0 0 0 6px rgba(255,224,91,.88),inset 0 -14px 24px rgba(220,157,20,.08)}.cb-cell.product-protected::after{content:"🎁 보호";position:absolute;right:6px;top:6px;z-index:3;padding:3px 6px;border-radius:999px;background:#fff8db;color:#8e6200;border:1px solid rgba(194,135,11,.22);font-size:8px;font-weight:1000;box-shadow:0 3px 8px rgba(0,0,0,.09)}.cb-cell.protection-disabled::after{content:"🔓 보호 해제";background:#fff;color:#8b3348}.cb-cell.devil{background:radial-gradient(circle at 42% 28%,#c273ff,#7328bb 46%,#291239)!important;color:#fff!important;animation:devilCell .85s ease-in-out infinite alternate}.cb-cell.devil::after{content:"😈 3턴 함정";position:absolute;inset:0;display:grid;place-items:center;background:linear-gradient(135deg,rgba(18,6,31,.18),rgba(255,56,125,.14));color:#fff;font-size:clamp(11px,1.1vw,18px);font-weight:1000;text-shadow:0 3px 10px #1a0327;z-index:5}.cb-cell.devil .cb-cell-text,.cb-cell.devil .cb-cell-decor{opacity:.08}.cb-cell.manual-target{cursor:pointer;z-index:7;animation:manualPulse .68s ease-in-out infinite alternate;box-shadow:inset 0 0 0 3px #1f4aa6,inset 0 0 0 7px #fff,0 0 18px rgba(44,94,210,.32)}.cb-cell.current{filter:brightness(1.07) saturate(1.08)}body.cb-editing .cb-cell:not(.fixed){cursor:text}.cb-cell-text[contenteditable=true]{outline:none;cursor:text;pointer-events:auto}.cb-cell:focus-within{z-index:12;box-shadow:inset 0 0 0 3px #273f91,inset 0 0 0 7px #fff,0 0 22px rgba(44,80,190,.28)}
@keyframes devilCell{to{filter:brightness(1.16) saturate(1.15)}}@keyframes manualPulse{to{filter:brightness(1.15);transform:scale(.985)}}
.cb-center-panel{position:relative;z-index:2;grid-column:2 / var(--cols);grid-row:2 / var(--rows);margin:2px;display:grid;place-items:center;padding:clamp(10px,1.8vw,28px);overflow:hidden;background:radial-gradient(circle at 50% 18%,#fff 0,#f9fbff 44%,#eef3ff 100%);box-shadow:inset 0 0 0 2px var(--line),inset 0 0 34px rgba(66,95,177,.06)}.cb-center-panel::before{content:"";position:absolute;inset:10px;border-radius:22px;background-image:linear-gradient(rgba(79,99,155,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(79,99,155,.035) 1px,transparent 1px);background-size:18px 18px;pointer-events:none}.cb-play-panel,.cb-edit-panel{position:relative;z-index:1;width:min(690px,96%);text-align:center}.cb-center-kicker{color:#7281a3;font-size:8px;font-weight:1000;letter-spacing:.17em}.cb-status-line{margin:5px auto 8px;display:flex;align-items:center;justify-content:center;gap:8px;min-width:0}.cb-status-line span{padding:5px 8px;border-radius:999px;background:#24396e;color:#fff;font-size:8px;font-weight:1000;white-space:nowrap}.cb-status-line strong{min-width:0;font-size:clamp(13px,1.15vw,18px);line-height:1.2}.cb-dice-select{display:inline-flex;gap:4px;padding:4px;border-radius:12px;background:#e8edf8}.cb-dice-select button{height:34px;padding:0 12px;border:0;border-radius:9px;background:transparent;color:#60708f;font-size:10px;font-weight:950;cursor:pointer}.cb-dice-select button.active{background:#fff;color:#213a88;box-shadow:0 4px 10px rgba(47,72,143,.13)}
.cb-dice-stage{position:relative;width:min(380px,88%);height:112px;margin:3px auto 0;display:flex;align-items:center;justify-content:center;gap:32px;perspective:1200px;border-radius:28px;background:radial-gradient(ellipse at 50% 70%,rgba(49,76,125,.12),transparent 48%),linear-gradient(180deg,rgba(255,255,255,.44),rgba(225,233,248,.44));box-shadow:inset 0 1px rgba(255,255,255,.9),inset 0 -16px 26px rgba(68,88,135,.06)}.cb-dice-stage::before{content:"";position:absolute;left:12%;right:12%;bottom:14px;height:18px;border-radius:50%;background:radial-gradient(ellipse,rgba(18,28,55,.2),transparent 70%);filter:blur(4px)}.cb-die{--die-size:70px;--die-half:35px;width:var(--die-size);height:var(--die-size);position:relative;z-index:2;transform-style:preserve-3d;perspective:900px;filter:drop-shadow(0 13px 12px rgba(23,34,66,.2))}.cb-die.second.hidden{display:none}.cb-die-cube{position:absolute;inset:0;transform-style:preserve-3d;transition:transform .72s cubic-bezier(.18,.82,.2,1.06);will-change:transform}.cb-die-face{position:absolute;inset:0;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);place-items:center;padding:11px;border-radius:17px;background:linear-gradient(145deg,#fff 0,#fffdf8 45%,#e9e0d2 100%);border:1px solid #d7cdbd;box-shadow:inset 5px 5px 8px rgba(255,255,255,.98),inset -8px -8px 14px rgba(111,91,63,.13),0 1px 0 rgba(255,255,255,.85);backface-visibility:hidden}.cb-die.second .cb-die-face{background:linear-gradient(145deg,#fff 0,#f8fbff 45%,#dfe9f4 100%);border-color:#cbd8e6}.cb-die-face::after{content:"";position:absolute;inset:5px;border-radius:13px;border-top:1px solid rgba(255,255,255,.95);border-left:1px solid rgba(255,255,255,.65)}.cb-die-face.front{transform:rotateY(0) translateZ(var(--die-half))}.cb-die-face.back{transform:rotateY(180deg) translateZ(var(--die-half))}.cb-die-face.right{transform:rotateY(90deg) translateZ(var(--die-half))}.cb-die-face.left{transform:rotateY(-90deg) translateZ(var(--die-half))}.cb-die-face.top{transform:rotateX(90deg) translateZ(var(--die-half))}.cb-die-face.bottom{transform:rotateX(-90deg) translateZ(var(--die-half))}.cb-pip{width:11px;height:11px;border-radius:50%;opacity:0;background:radial-gradient(circle at 34% 28%,#59647a 0 10%,#1a2338 35%,#060a13 76%);box-shadow:inset 1px 1px 2px rgba(255,255,255,.24),0 1px 1px rgba(255,255,255,.5),0 2px 3px rgba(0,0,0,.16)}.cb-die-face[data-face="1"] .cb-pip:nth-child(5),.cb-die-face[data-face="2"] .cb-pip:nth-child(1),.cb-die-face[data-face="2"] .cb-pip:nth-child(9),.cb-die-face[data-face="3"] .cb-pip:nth-child(1),.cb-die-face[data-face="3"] .cb-pip:nth-child(5),.cb-die-face[data-face="3"] .cb-pip:nth-child(9),.cb-die-face[data-face="4"] .cb-pip:nth-child(1),.cb-die-face[data-face="4"] .cb-pip:nth-child(3),.cb-die-face[data-face="4"] .cb-pip:nth-child(7),.cb-die-face[data-face="4"] .cb-pip:nth-child(9),.cb-die-face[data-face="5"] .cb-pip:nth-child(1),.cb-die-face[data-face="5"] .cb-pip:nth-child(3),.cb-die-face[data-face="5"] .cb-pip:nth-child(5),.cb-die-face[data-face="5"] .cb-pip:nth-child(7),.cb-die-face[data-face="5"] .cb-pip:nth-child(9),.cb-die-face[data-face="6"] .cb-pip:nth-child(1),.cb-die-face[data-face="6"] .cb-pip:nth-child(3),.cb-die-face[data-face="6"] .cb-pip:nth-child(4),.cb-die-face[data-face="6"] .cb-pip:nth-child(6),.cb-die-face[data-face="6"] .cb-pip:nth-child(7),.cb-die-face[data-face="6"] .cb-pip:nth-child(9){opacity:1}.cb-die.rolling{filter:drop-shadow(0 18px 14px rgba(23,34,66,.28))}.cb-dice-sum{position:absolute;left:50%;bottom:5px;z-index:5;transform:translateX(-50%);min-width:78px;padding:5px 10px;border-radius:999px;background:linear-gradient(180deg,#2b457f,#17294f);color:#fff;font-size:10px;font-weight:1000;letter-spacing:.07em;text-align:center;box-shadow:0 4px 12px rgba(31,47,90,.18);transition:.2s}.cb-dice-sum.result{transform:translateX(-50%) scale(1.13);background:linear-gradient(180deg,#ffe778,#e7aa20);color:#352507;letter-spacing:0}.cb-dice-sum.double{background:linear-gradient(180deg,#8ff0ff,#4796e8);color:#0d2a50;box-shadow:0 5px 18px rgba(45,127,215,.27)}
.cb-action-row{display:flex;justify-content:center;gap:7px;margin-top:3px;position:relative;z-index:6}.cb-roll-btn,.cb-manual-btn{min-height:44px;border:0;border-radius:13px;padding:0 15px;font-size:11px;font-weight:1000;cursor:pointer}.cb-roll-btn{background:linear-gradient(180deg,#ffeb85,#f3bf3f 62%,#de9f1e);color:#352708;box-shadow:0 5px 0 #b87912,0 9px 18px rgba(177,118,10,.16)}.cb-roll-btn:active{transform:translateY(3px);box-shadow:0 2px 0 #b87912}.cb-roll-btn:disabled{opacity:.5;cursor:default;transform:none}.cb-manual-btn{background:linear-gradient(180deg,#f1f5ff,#dfe7f7);border:1px solid #d0dbf3;color:#30477d}.cb-manual-btn[aria-pressed=true]{background:linear-gradient(180deg,#3d61bd,#27448e);color:#fff;border-color:#27448e}.cb-play-help{margin:8px auto 0;max-width:610px;color:#6d7891;font-size:9px;line-height:1.45}.cb-play-help b{color:#274492}
.cb-edit-panel{max-height:100%;overflow:auto;padding:2px 5px;scrollbar-width:thin}.cb-edit-panel h2{margin:4px 0;font-size:clamp(20px,1.8vw,30px)}.cb-edit-panel>p{margin:0 auto 8px;max-width:580px;color:#697590;font-size:9px;line-height:1.4}.cb-edit-selected{display:flex;align-items:center;justify-content:center;gap:7px}.cb-edit-selected span{color:#8591a8;font-size:9px;font-weight:900}.cb-edit-selected strong{padding:5px 9px;border-radius:9px;background:#e7edfb;color:#263d85;font-size:10px}.cb-recommend-box{margin:8px auto 0;width:min(560px,100%);padding:8px 9px;border-radius:12px;background:linear-gradient(145deg,#f4f7ff,#eaf0ff);border:1px solid #dbe4fb}.cb-recommend-head{display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left}.cb-recommend-head span{font-size:10px;font-weight:1000;color:#29438d}.cb-recommend-head small{font-size:8px;color:#7b88a1}.cb-recommend-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;margin-top:6px}.cb-recommend-actions button{min-height:32px;padding:0 9px;border:1px solid #d5def3;border-radius:9px;background:#fff;color:#344d84;font-size:9px;font-weight:950;cursor:pointer}.cb-recommend-actions button:hover{background:#edf3ff}.cb-protect-controls{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:8px;flex-wrap:wrap}.cb-protect-toggle{display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer}.cb-protect-toggle input{width:19px;height:19px;accent-color:#dba82e}.cb-protect-toggle span{font-size:10px;font-weight:950}.cb-auto-protect-btn{min-height:32px;padding:0 9px;border:1px solid #d8deea;border-radius:9px;background:#fff;color:#5a6375;font-size:9px;font-weight:950;cursor:pointer}.cb-auto-protect-btn[aria-pressed=true]{background:#fff0f3;color:#aa3448;border-color:#f2c8d1}.cb-auto-protect-btn:disabled{opacity:.45;cursor:default}.cb-protect-hint{margin:4px auto 0!important;font-size:8px!important;color:#71809b!important}.cb-devil-fine-editor{margin:7px auto 0;width:min(540px,100%);display:grid;grid-template-columns:auto minmax(0,1fr);gap:5px 8px;align-items:center;padding:8px 9px;border:1px solid #ead9fa;border-radius:12px;background:linear-gradient(145deg,#faf5ff,#f3eaff);text-align:left}.cb-devil-fine-editor>span{font-size:10px;font-weight:1000;color:#5c2a91;white-space:nowrap}.cb-devil-fine-editor input{width:100%;min-width:0;height:34px;border:1px solid #d8c5ec;border-radius:9px;padding:0 9px;background:#fff;color:#342046;font-size:10px;font-weight:850;outline:none}.cb-devil-fine-editor input:focus{border-color:#8351ba;box-shadow:0 0 0 3px rgba(116,65,163,.11)}.cb-devil-fine-editor small{grid-column:1/-1;color:#7e718c;font-size:7.5px;line-height:1.35}.cb-edit-legend{display:flex;justify-content:center;gap:12px;margin-top:7px;font-size:8px;color:#68748c}.cb-edit-legend span{display:flex;align-items:center;gap:4px}.cb-edit-legend i{width:11px;height:11px;border-radius:3px;border:1px solid #2c3241}.cb-edit-legend i.normal{background:#bce4ff}.cb-edit-legend i.product{background:#ffe578;box-shadow:inset 0 0 0 2px #d49a13}.cb-edit-legend i.trap{background:#e3495e}
.cb-token{position:absolute;z-index:30;width:clamp(42px,5.2vw,66px);transform:translate(-50%,-75%);pointer-events:none;transition:left .24s cubic-bezier(.2,.8,.2,1),top .24s cubic-bezier(.2,.8,.2,1);filter:drop-shadow(0 8px 9px rgba(14,26,55,.34))}.cb-token svg{display:block;width:100%;height:auto}.cb-token.hop{animation:tokenHop .25s ease-out}@keyframes tokenHop{45%{transform:translate(-50%,-92%) scale(1.05)}}
.cb-underboard{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:9px;margin-top:10px}.cb-devil-info,.cb-bottom-note{min-height:68px;border-radius:14px;box-shadow:0 7px 20px rgba(40,55,105,.07)}.cb-devil-info{display:grid;grid-template-columns:auto auto;gap:3px 10px;align-items:center;padding:11px 13px;background:linear-gradient(145deg,#f7efff,#efe1ff);border:1px solid #e2cff9;text-align:left}.cb-devil-info span{font-size:12px;font-weight:1000;color:#5a2690}.cb-devil-info b{justify-self:end;font-size:10px;color:#8b45c7}.cb-devil-info small{grid-column:1/-1;color:#7c7090;font-size:9px;line-height:1.4}.cb-bottom-note{display:flex;align-items:center;gap:10px;padding:11px 13px;background:rgba(255,255,255,.88);border:1px solid rgba(60,80,139,.11);font-size:10px;line-height:1.5;color:#66738e}.cb-bottom-note>b{flex:0 0 auto;padding:5px 8px;border-radius:8px;background:#17264d;color:#fff;font-size:9px}.cb-bottom-note strong{color:#253f8b}
.cb-event-popup,.cb-devil-overlay,.cb-confirm{position:fixed;z-index:1000;inset:0;display:grid;place-items:center;padding:18px;background:rgba(9,16,31,.48);backdrop-filter:blur(7px)}.cb-event-card,.cb-confirm-card{width:min(440px,92vw);padding:24px 22px;border-radius:24px;background:linear-gradient(160deg,#fff,#f4f7ff);box-shadow:0 26px 70px rgba(11,24,56,.32);text-align:center;border:1px solid rgba(255,255,255,.8)}.cb-event-card small{display:block;color:#71809b;font-size:9px;font-weight:1000;letter-spacing:.18em}.cb-event-card strong{display:block;margin:5px 0;font-size:clamp(25px,5vw,38px)}.cb-event-card p{margin:0;color:#55627c;font-size:14px;font-weight:800;line-height:1.55;white-space:pre-line}.cb-event-card>span{display:block;margin-top:13px;color:#9aa5ba;font-size:9px}.cb-event-popup.trap .cb-event-card{background:linear-gradient(160deg,#2c1437,#5a1f50);color:#fff;border-color:#a85cac}.cb-event-popup.trap .cb-event-card p,.cb-event-popup.trap .cb-event-card small{color:#f2c9f1}.cb-event-popup.tone-prize .cb-event-card{background:radial-gradient(circle at 50% 0,#fffbdc,#fff 48%,#fff4c2 100%);border:2px solid #efc44b;box-shadow:0 24px 70px rgba(174,117,14,.34)}.cb-event-popup.tone-prize .cb-event-card strong{color:#9d6200}.cb-event-popup.tone-double .cb-event-card{background:linear-gradient(160deg,#eafcff,#eef5ff);border:2px solid #83dff3}.cb-event-popup.tone-punishment .cb-event-card{border:2px solid #f2a391}.cb-event-popup.tone-reaction .cb-event-card{border:2px solid #c5a8f0}.cb-devil-overlay{background:radial-gradient(circle at 50% 45%,rgba(123,35,177,.35),rgba(9,5,17,.78))}.cb-devil-figure{font-size:84px;filter:drop-shadow(0 15px 18px rgba(0,0,0,.38));animation:devilPop .38s cubic-bezier(.2,1.2,.3,1)}.cb-devil-copy{width:min(460px,90vw);margin-top:-20px;padding:18px;border-radius:20px;background:linear-gradient(160deg,#34144f,#171021);color:#fff;text-align:center;border:1px solid rgba(213,145,255,.35);box-shadow:0 24px 70px rgba(0,0,0,.4)}.cb-devil-copy small{color:#d9a8ff;font-size:9px;font-weight:1000;letter-spacing:.18em}.cb-devil-copy strong{display:block;margin:5px 0;font-size:28px}.cb-devil-copy p{margin:0;color:#e8d6f6;font-size:12px;line-height:1.5}.cb-devil-copy>b{display:block;margin-top:9px;padding:8px 10px;border-radius:10px;background:rgba(255,255,255,.12);color:#fff2a6;font-size:11px}@keyframes devilPop{from{transform:scale(.45);opacity:0}to{transform:none;opacity:1}}.cb-confirm-card strong{font-size:20px}.cb-confirm-card p{color:#65718a;font-size:12px}.cb-confirm-card>div{display:flex;justify-content:center;gap:8px}.cb-confirm-card button{min-height:42px;padding:0 18px;border:0;border-radius:11px;font-weight:950;cursor:pointer}.cb-confirm-card button:first-child{background:#e7edf8;color:#3e4d6b}.cb-confirm-card button:last-child{background:#c83b50;color:#fff}
.cb-fanfare-layer{position:fixed;z-index:1100;inset:0;pointer-events:none;overflow:hidden;display:none}.cb-fanfare-layer.show{display:block}.cb-fanfare-layer i{position:absolute;left:var(--x);top:-30px;font-style:normal;font-size:var(--size);color:#f1bd27;text-shadow:0 1px #fff;animation:fanfareFall 1.7s cubic-bezier(.16,.72,.3,1) var(--delay) both}.cb-fanfare-layer i:nth-child(3n){color:#4ba7ef}.cb-fanfare-layer i:nth-child(4n){color:#ef6ba0}.cb-fanfare-layer i:nth-child(5n){color:#70c68a}@keyframes fanfareFall{to{transform:translate(var(--dx),105vh) rotate(var(--spin));opacity:.2}}

@media(max-width:820px){
  .cb-app{padding:8px 8px calc(20px + env(safe-area-inset-bottom))}.cb-topbar{padding:9px 10px;gap:9px;border-radius:16px}.cb-brand-icon{width:44px;height:44px;font-size:23px}.cb-brand small{font-size:7px}.cb-brand h1{font-size:21px}.cb-btn{min-height:38px;padding:0 9px;font-size:10px}.cb-toolbar{padding:8px 9px;gap:7px}.cb-toolbar-group>span{font-size:11px}.cb-segment button{min-height:38px;font-size:10px;padding:0 8px}.cb-board-shell{padding:5px;border-radius:17px}
  .cb-board{aspect-ratio:auto;min-height:calc(var(--rows) * 118px);height:calc(var(--rows) * 118px);max-height:none;border-width:4px}.cb-cell{padding:6px 4px;font-size:clamp(13px,3.3vw,17px);box-shadow:inset 0 0 0 2px var(--line),inset 0 2px rgba(255,255,255,.42),inset 0 -8px 16px rgba(44,37,26,.05)}.cb-cell-decor{left:5px;top:4px;font-size:13px}.cb-cell.product-protected::after{right:4px;top:4px;padding:2px 4px;font-size:6.5px}.cb-center-panel{margin:2px;padding:7px 5px}.cb-center-panel::before{inset:6px;background-size:14px 14px}.cb-play-panel{width:98%}.cb-center-kicker{display:none}.cb-status-line{margin:2px 0 5px;gap:5px}.cb-status-line span{font-size:7px;padding:3px 6px}.cb-status-line strong{font-size:12px}.cb-dice-select{padding:3px}.cb-dice-select button{height:31px;padding:0 8px;font-size:9px}.cb-dice-stage{width:min(310px,92%);height:84px;gap:20px;border-radius:21px}.cb-die{--die-size:50px;--die-half:25px}.cb-die-face{padding:8px;border-radius:13px}.cb-pip{width:8px;height:8px}.cb-dice-sum{bottom:2px;min-width:62px;font-size:8px;padding:3px 6px}.cb-action-row{gap:5px;margin-top:2px}.cb-roll-btn,.cb-manual-btn{min-height:38px;padding:0 9px;font-size:9px;border-radius:10px}.cb-roll-btn{box-shadow:0 4px 0 #b87912,0 7px 13px rgba(177,118,10,.13)}.cb-play-help{display:none}.cb-token{width:clamp(36px,8vw,49px)}.cb-edit-panel{width:98%}.cb-edit-panel h2{font-size:17px}.cb-edit-panel>p{display:none}.cb-recommend-box{margin-top:5px;padding:6px}.cb-recommend-head small{display:none}.cb-recommend-actions{gap:4px}.cb-recommend-actions button{min-height:29px;padding:0 6px;font-size:8px}.cb-protect-controls{margin-top:5px}.cb-protect-toggle span,.cb-auto-protect-btn{font-size:8px}.cb-protect-hint{font-size:7px!important}.cb-devil-fine-editor{margin-top:5px;padding:6px 7px;grid-template-columns:auto minmax(0,1fr)}.cb-devil-fine-editor>span{font-size:8px}.cb-devil-fine-editor input{height:30px;font-size:9px}.cb-devil-fine-editor small,.cb-edit-legend{display:none}.cb-underboard{grid-template-columns:1fr;gap:7px;margin-top:8px}.cb-devil-info,.cb-bottom-note{min-height:0;padding:10px}.cb-devil-info span{font-size:11px}.cb-devil-info b{font-size:9px}.cb-devil-info small,.cb-bottom-note{font-size:9px}.cb-bottom-note>b{font-size:8px}
}
@media(max-width:520px){
  .cb-topbar{display:grid;grid-template-columns:minmax(0,1fr);gap:7px}.cb-brand{justify-content:center}.cb-top-actions{margin:0;width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.cb-top-actions .cb-btn{min-width:0;padding:0 4px;font-size:9px}.cb-toolbar{display:grid;grid-template-columns:1fr;gap:7px}.cb-toolbar-group{width:100%;justify-content:space-between}.cb-segment{flex:1}.cb-segment button{flex:1;padding:0 3px}.cb-toolbar-group.save-group{justify-content:flex-end}.cb-mini-btn{min-height:36px}.cb-board{min-height:calc(var(--rows) * 122px);height:calc(var(--rows) * 122px)}.cb-cell{font-size:clamp(13px,3.7vw,16px);line-height:1.17}.cb-cell.fixed .cb-cell-text{font-size:1.05em}.cb-center-panel{padding:6px 4px}.cb-status-line strong{font-size:11px}.cb-status-line span{font-size:6.8px}.cb-dice-select button{height:29px;font-size:8px;padding:0 6px}.cb-dice-stage{height:78px;gap:16px}.cb-die{--die-size:46px;--die-half:23px}.cb-die-face{padding:7px;border-radius:12px}.cb-pip{width:7px;height:7px}.cb-roll-btn,.cb-manual-btn{min-height:36px;font-size:8.5px;padding:0 7px}.cb-event-card{padding:20px 16px}.cb-event-card p{font-size:13px}.cb-devil-figure{font-size:68px}
}

/* 확장: 상단 핵심 버튼 + 보드만 남겨 한 화면에 맞춤 */
body.cb-expanded{overflow:hidden;background:#e9effa}
body.cb-expanded .cb-app{height:100dvh;min-height:0;max-width:none;padding:4px;display:grid;grid-template-rows:auto minmax(0,1fr);gap:4px;overflow:hidden}
body.cb-expanded .cb-toolbar,body.cb-expanded .cb-underboard{display:none!important}
body.cb-expanded .cb-topbar{min-height:46px;padding:4px 7px;border-radius:11px;box-shadow:none;gap:7px}
body.cb-expanded .cb-brand-icon{width:36px;height:36px;border-radius:10px;font-size:19px}body.cb-expanded .cb-brand small{display:none}body.cb-expanded .cb-brand h1{font-size:17px;margin:0;white-space:nowrap}
body.cb-expanded .cb-top-actions{gap:4px;flex-wrap:nowrap}body.cb-expanded .cb-btn{min-height:34px;height:34px;padding:0 8px;border-radius:9px;font-size:9px;white-space:nowrap}
body.cb-expanded .cb-board-shell{height:100%;min-height:0;padding:2px;border-radius:10px;overflow:hidden;box-shadow:none}
body.cb-expanded .cb-board{width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto;border-width:3px;border-radius:9px}
body.cb-expanded .cb-center-panel{margin:1px;padding:4px 4px;overflow:hidden}body.cb-expanded .cb-center-panel::before{inset:4px}
body.cb-expanded .cb-play-panel{width:98%;max-height:100%;overflow:hidden}body.cb-expanded .cb-edit-panel{width:98%;height:100%;max-height:100%;overflow:auto;padding:1px 3px}
body.cb-expanded .cb-status-line{margin:1px 0 3px}body.cb-expanded .cb-status-line span{font-size:7px;padding:3px 5px}body.cb-expanded .cb-status-line strong{font-size:10.5px}
body.cb-expanded .cb-dice-select{padding:2px}body.cb-expanded .cb-dice-select button{height:28px;font-size:8px;padding:0 6px}
body.cb-expanded .cb-dice-stage{width:min(300px,90%);height:70px;gap:15px;margin-top:1px}body.cb-expanded .cb-die{--die-size:43px;--die-half:21.5px}body.cb-expanded .cb-die-face{padding:6px;border-radius:11px}body.cb-expanded .cb-pip{width:6.5px;height:6.5px}body.cb-expanded .cb-dice-sum{bottom:1px;font-size:7px;padding:3px 5px;min-width:56px}
body.cb-expanded .cb-action-row{margin-top:1px;gap:4px}body.cb-expanded .cb-roll-btn,body.cb-expanded .cb-manual-btn{height:33px;min-height:33px;font-size:8px;padding:0 7px}body.cb-expanded .cb-play-help{display:none}
body.cb-expanded .cb-cell{font-size:clamp(9px,1.7vw,15px);padding:3px}body.cb-expanded .cb-cell-decor{left:3px;top:3px;font-size:10px}body.cb-expanded .cb-cell.product-protected::after{right:3px;top:3px;padding:1px 3px;font-size:5.8px}body.cb-expanded .cb-token{width:clamp(30px,5vw,44px)}
body.cb-expanded .cb-edit-panel h2{font-size:14px;margin:1px 0 3px}body.cb-expanded .cb-edit-panel>p,body.cb-expanded .cb-edit-legend{display:none}body.cb-expanded .cb-edit-selected span,body.cb-expanded .cb-edit-selected strong{font-size:8px}body.cb-expanded .cb-recommend-box{margin-top:3px;padding:4px}body.cb-expanded .cb-recommend-actions button{min-height:25px;font-size:7px;padding:0 4px}body.cb-expanded .cb-protect-controls{margin-top:3px}body.cb-expanded .cb-protect-toggle span,body.cb-expanded .cb-auto-protect-btn{font-size:7px}body.cb-expanded .cb-protect-hint{display:none}body.cb-expanded .cb-devil-fine-editor{margin-top:3px;padding:4px 5px;grid-template-columns:auto minmax(0,1fr)}body.cb-expanded .cb-devil-fine-editor>span{font-size:7px}body.cb-expanded .cb-devil-fine-editor input{height:26px;font-size:8px}body.cb-expanded .cb-devil-fine-editor small{display:none}
@media(max-width:520px){
  body.cb-expanded .cb-topbar{display:flex;align-items:center;gap:4px}body.cb-expanded .cb-brand{flex:1 1 auto;justify-content:flex-start;min-width:0}body.cb-expanded .cb-brand-icon{display:none}body.cb-expanded .cb-brand h1{font-size:14px;overflow:hidden;text-overflow:ellipsis}body.cb-expanded .cb-top-actions{margin-left:auto;display:flex;width:auto}body.cb-expanded .cb-btn{min-width:0;height:32px;min-height:32px;padding:0 5px;font-size:7.5px}body.cb-expanded .cb-cell{font-size:clamp(8px,2.4vw,12px)}body.cb-expanded .cb-dice-stage{height:66px}body.cb-expanded .cb-die{--die-size:39px;--die-half:19.5px}body.cb-expanded .cb-roll-btn,body.cb-expanded .cb-manual-btn{height:31px;min-height:31px;font-size:7.5px}
}
@media(prefers-reduced-motion:reduce){.cb-cell.devil,.cb-cell.manual-target,.cb-token.hop,.cb-devil-figure,.cb-fanfare-layer i{animation:none!important}.cb-token,.cb-die-cube{transition:none!important}}


/* Custom board visual polish · v20260831_1423 */
.cb-btn.needs-edit{position:relative;border-color:#f3b72b!important;background:linear-gradient(180deg,#fff9cf,#ffe36b)!important;color:#5b3c00!important;box-shadow:0 0 0 3px rgba(255,213,71,.25),0 7px 18px rgba(180,125,15,.2)!important;animation:cbEditNudge 1.1s ease-in-out infinite alternate}
.cb-btn.needs-edit::after{content:"빈 칸 입력";position:absolute;right:-4px;top:-9px;padding:2px 5px;border-radius:999px;background:#e53d5f;color:#fff;font-size:7px;font-weight:1000;line-height:1;box-shadow:0 2px 7px rgba(111,20,38,.2)}
@keyframes cbEditNudge{to{transform:translateY(-2px);filter:brightness(1.04)}}

.cb-cell{font-size:clamp(17px,1.58vw,27px);padding:14px 12px;text-shadow:0 1px rgba(255,255,255,.28)}
.cb-cell .cb-cell-text{position:relative;z-index:4;max-width:88%;padding:0 4px;line-height:1.12}
.cb-cell.text-short .cb-cell-text{font-size:1.34em;letter-spacing:-.05em}
.cb-cell.text-medium .cb-cell-text{font-size:1.12em}
.cb-cell.text-long .cb-cell-text{font-size:.92em;line-height:1.16}
.cb-cell-decor{left:9px;top:8px;font-size:clamp(18px,1.55vw,27px);z-index:5;filter:drop-shadow(0 2px 2px rgba(0,0,0,.16))}
.cb-cell-watermark{position:absolute;right:8px;bottom:-8px;z-index:1;font-size:clamp(42px,4.6vw,74px);font-weight:1000;line-height:1;opacity:.14;filter:saturate(.92) drop-shadow(0 2px rgba(255,255,255,.5));pointer-events:none;transform:rotate(-8deg)}
.cb-cell-accent{position:absolute;right:11px;top:10px;z-index:2;font-size:clamp(13px,1.15vw,20px);opacity:.72;pointer-events:none;filter:drop-shadow(0 1px rgba(255,255,255,.75))}
.cb-cell.kind-product{box-shadow:inset 0 0 0 2px var(--line),inset 0 0 0 5px rgba(255,211,48,.72),inset 0 -18px 30px rgba(201,139,12,.08)}
.cb-cell.kind-product .cb-cell-watermark{opacity:.2;transform:rotate(-10deg) scale(1.05)}
.cb-cell.kind-reaction .cb-cell-watermark{opacity:.16;transform:rotate(-7deg)}
.cb-cell.kind-punishment .cb-cell-watermark{opacity:.17;transform:rotate(8deg)}
.cb-cell.theme-song::before,.cb-cell.theme-dance::before,.cb-cell.theme-reaction::before{background-image:radial-gradient(circle at 15% 18%,rgba(255,255,255,.34) 0 2px,transparent 3px),radial-gradient(circle at 82% 68%,rgba(255,255,255,.28) 0 3px,transparent 4px);background-size:29px 29px,41px 41px}
.cb-cell.theme-money::before,.cb-cell.theme-gift::before,.cb-cell.theme-chicken::before,.cb-cell.theme-pizza::before,.cb-cell.theme-burger::before,.cb-cell.theme-hotdog::before,.cb-cell.theme-coffee::before{border:2px dashed rgba(255,255,255,.56);inset:6px}
.cb-cell.theme-blank::before{background:repeating-linear-gradient(-35deg,transparent 0 11px,rgba(50,58,75,.035) 11px 15px)}
.cb-cell.theme-hammer::before,.cb-cell.theme-mission::before,.cb-cell.theme-fine::before{background:linear-gradient(135deg,rgba(255,255,255,.25),transparent 36%,rgba(108,30,42,.05))}
.cb-cell.product-protected::after{content:"🎁";min-width:22px;height:22px;display:grid;place-items:center;padding:0;border-radius:50%;font-size:12px;line-height:1;background:#fff8cf;border:1px solid rgba(184,128,5,.3)}
.cb-cell.protection-disabled::after{content:none!important;display:none!important}

.cb-dice-stage{width:min(470px,92%);height:154px;gap:48px;border:1px solid rgba(81,98,139,.16);background:radial-gradient(ellipse at 50% 76%,rgba(40,55,86,.16),transparent 45%),radial-gradient(circle at 50% 22%,#fff 0,#f8fbff 44%,#e7edf8 100%);box-shadow:inset 0 2px 0 #fff,inset 0 -24px 40px rgba(48,62,99,.09),0 12px 28px rgba(28,44,83,.08)}
.cb-dice-stage::after{content:"";position:absolute;inset:8px;border-radius:22px;border:1px solid rgba(255,255,255,.82);pointer-events:none}
.cb-dice-stage::before{bottom:20px;height:22px;left:15%;right:15%;background:radial-gradient(ellipse,rgba(18,28,55,.24),transparent 70%);filter:blur(5px)}
.cb-die{--die-size:84px;--die-half:42px;filter:drop-shadow(0 17px 15px rgba(18,27,51,.27)) drop-shadow(0 3px 2px rgba(255,255,255,.45))}
.cb-die-face{padding:13px;border-radius:20px;border:1px solid #cec4b4;background:linear-gradient(145deg,#fff 0,#fffefa 38%,#f1e9dc 72%,#ddd2c1 100%);box-shadow:inset 7px 7px 10px rgba(255,255,255,.98),inset -10px -11px 17px rgba(87,67,42,.16),0 1px 0 rgba(255,255,255,.9)}
.cb-die.second .cb-die-face{background:linear-gradient(145deg,#fff 0,#fbfdff 38%,#e7eef6 72%,#d3dde9 100%)}
.cb-pip{width:13px;height:13px;background:radial-gradient(circle at 33% 27%,#71809a 0 7%,#263149 25%,#090d17 72%);box-shadow:inset 2px 2px 3px rgba(255,255,255,.2),0 1px 1px rgba(255,255,255,.6),0 3px 4px rgba(0,0,0,.22)}
.cb-die.rolling{filter:drop-shadow(0 24px 18px rgba(17,27,55,.31))}
.cb-die.landed{animation:cbDiceLand .32s ease-out}
@keyframes cbDiceLand{0%{transform:translateY(0) scale(1)}35%{transform:translateY(5px) scale(1.055,.94)}70%{transform:translateY(-3px) scale(.99,1.02)}100%{transform:none}}
.cb-dice-sum{bottom:8px;font-size:12px;min-width:96px;padding:6px 12px}
.cb-status-line strong{font-size:clamp(15px,1.28vw,20px)}
.cb-dice-select button{height:40px;font-size:12px;padding:0 16px}
.cb-roll-btn,.cb-manual-btn{min-height:50px;padding:0 19px;font-size:13px}

/* Expanded mode keeps the game readable instead of shrinking it */
body.cb-expanded .cb-center-panel{padding:10px 8px}
body.cb-expanded .cb-play-panel{width:min(760px,96%)}
body.cb-expanded .cb-status-line{margin:4px 0 7px}
body.cb-expanded .cb-status-line span{font-size:9px;padding:5px 8px}
body.cb-expanded .cb-status-line strong{font-size:clamp(15px,1.35vw,21px)}
body.cb-expanded .cb-dice-select{padding:4px}
body.cb-expanded .cb-dice-select button{height:38px;font-size:11px;padding:0 14px}
body.cb-expanded .cb-dice-stage{width:min(500px,92%);height:150px;gap:50px;margin-top:4px}
body.cb-expanded .cb-die{--die-size:86px;--die-half:43px}
body.cb-expanded .cb-die-face{padding:13px;border-radius:20px}
body.cb-expanded .cb-pip{width:13px;height:13px}
body.cb-expanded .cb-dice-sum{bottom:7px;font-size:11px;padding:5px 10px;min-width:92px}
body.cb-expanded .cb-action-row{margin-top:4px;gap:8px}
body.cb-expanded .cb-roll-btn,body.cb-expanded .cb-manual-btn{height:48px;min-height:48px;font-size:12px;padding:0 17px}
body.cb-expanded .cb-cell{font-size:clamp(17px,1.55vw,25px);padding:9px 8px}
body.cb-expanded .cb-cell.text-short .cb-cell-text{font-size:1.3em}
body.cb-expanded .cb-cell.text-medium .cb-cell-text{font-size:1.1em}
body.cb-expanded .cb-cell-decor{left:7px;top:6px;font-size:clamp(16px,1.35vw,24px)}
body.cb-expanded .cb-cell-watermark{right:7px;bottom:-7px;font-size:clamp(38px,4vw,68px)}
body.cb-expanded .cb-cell-accent{right:9px;top:8px;font-size:clamp(12px,1vw,18px)}
body.cb-expanded .cb-cell.product-protected::after{right:5px;top:5px;width:20px;height:20px;font-size:11px;padding:0}
body.cb-expanded .cb-token{width:clamp(42px,5vw,64px)}

@media(max-width:820px){
  .cb-cell{font-size:clamp(15px,3.8vw,20px);padding:8px 5px}
  .cb-cell.text-short .cb-cell-text{font-size:1.18em}
  .cb-cell.text-medium .cb-cell-text{font-size:1.06em}
  .cb-cell-watermark{font-size:clamp(30px,10vw,52px);right:4px;bottom:-5px}
  .cb-cell-accent{right:6px;top:6px;font-size:13px}
  .cb-cell-decor{font-size:15px}
  .cb-dice-stage{width:min(360px,95%);height:112px;gap:28px}
  .cb-die{--die-size:62px;--die-half:31px}
  .cb-die-face{padding:9px;border-radius:15px}.cb-pip{width:9px;height:9px}
  .cb-dice-select button{height:34px;font-size:10px}.cb-roll-btn,.cb-manual-btn{min-height:42px;font-size:10.5px}
}
@media(max-width:520px){
  .cb-btn.needs-edit::after{font-size:6px;top:-7px}
  .cb-cell{font-size:clamp(14px,4.2vw,18px)}
  .cb-cell.text-long .cb-cell-text{font-size:.88em}
  .cb-dice-stage{height:104px;gap:24px}.cb-die{--die-size:58px;--die-half:29px}.cb-die-face{padding:9px}.cb-pip{width:9px;height:9px}
  body.cb-expanded .cb-cell{font-size:clamp(11px,3vw,15px);padding:4px 3px}
  body.cb-expanded .cb-cell.text-short .cb-cell-text{font-size:1.16em}
  body.cb-expanded .cb-dice-stage{width:min(360px,96%);height:104px;gap:25px}
  body.cb-expanded .cb-die{--die-size:58px;--die-half:29px}
  body.cb-expanded .cb-die-face{padding:9px;border-radius:15px}
  body.cb-expanded .cb-pip{width:9px;height:9px}
  body.cb-expanded .cb-status-line strong{font-size:11px}
  body.cb-expanded .cb-dice-select button{height:31px;font-size:8.5px;padding:0 8px}
  body.cb-expanded .cb-roll-btn,body.cb-expanded .cb-manual-btn{height:36px;min-height:36px;font-size:9px;padding:0 8px}
}

/* Always-visible game controls · v20260831_1423 */
.cb-center-panel{container-type:size}
.cb-play-panel{
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:4px 6px 68px;
  overflow:hidden;
}
.cb-play-panel .cb-status-line,
.cb-play-panel .cb-dice-select{flex:0 0 auto}
.cb-play-panel .cb-dice-stage{
  flex:1 1 154px;
  min-height:78px;
  max-height:154px;
  height:auto;
  margin-top:4px;
}
.cb-play-panel .cb-action-row{
  position:absolute!important;
  left:50%;
  bottom:10px;
  transform:translateX(-50%);
  z-index:40;
  margin:0!important;
  width:max-content;
  max-width:calc(100% - 12px);
  padding:4px;
  border-radius:16px;
  background:rgba(248,251,255,.92);
  box-shadow:0 8px 22px rgba(24,42,84,.14),0 0 0 1px rgba(80,101,158,.09);
  backdrop-filter:blur(8px);
}
.cb-play-panel .cb-roll-btn,
.cb-play-panel .cb-manual-btn{
  flex:0 0 auto;
  min-width:118px;
  white-space:nowrap;
  visibility:visible!important;
  opacity:1;
}
.cb-play-panel .cb-play-help{display:none!important}

/* Short center areas: shrink only the dice, never the action buttons. */
@container (max-height:320px){
  .cb-play-panel{padding-bottom:62px}
  .cb-play-panel .cb-status-line{margin:1px 0 3px}
  .cb-play-panel .cb-status-line strong{font-size:12px}
  .cb-play-panel .cb-status-line span{font-size:7px;padding:3px 6px}
  .cb-play-panel .cb-dice-select{padding:2px}
  .cb-play-panel .cb-dice-select button{height:30px;font-size:9px;padding:0 8px}
  .cb-play-panel .cb-dice-stage{min-height:68px;max-height:104px;gap:24px}
  .cb-play-panel .cb-die{--die-size:58px;--die-half:29px}
  .cb-play-panel .cb-die-face{padding:9px;border-radius:15px}
  .cb-play-panel .cb-pip{width:9px;height:9px}
  .cb-play-panel .cb-dice-sum{bottom:3px;font-size:8px;min-width:64px;padding:3px 6px}
  .cb-play-panel .cb-action-row{bottom:6px}
  .cb-play-panel .cb-roll-btn,.cb-play-panel .cb-manual-btn{height:42px;min-height:42px;min-width:108px;font-size:10.5px;padding:0 12px}
}
@container (max-height:255px){
  .cb-play-panel{padding:1px 4px 56px;justify-content:flex-start}
  .cb-play-panel .cb-center-kicker{display:none}
  .cb-play-panel .cb-status-line{margin:1px 0 2px}
  .cb-play-panel .cb-status-line strong{font-size:10.5px}
  .cb-play-panel .cb-dice-select button{height:27px;font-size:8px;padding:0 6px}
  .cb-play-panel .cb-dice-stage{min-height:58px;max-height:78px;gap:18px;margin-top:1px}
  .cb-play-panel .cb-die{--die-size:48px;--die-half:24px}
  .cb-play-panel .cb-die-face{padding:7px;border-radius:12px}
  .cb-play-panel .cb-pip{width:7px;height:7px}
  .cb-play-panel .cb-action-row{bottom:4px;padding:3px}
  .cb-play-panel .cb-roll-btn,.cb-play-panel .cb-manual-btn{height:39px;min-height:39px;min-width:102px;font-size:9.5px;padding:0 9px}
}

/* Expanded mode uses the same pinned control dock. */
body.cb-expanded .cb-play-panel{height:100%;padding-bottom:68px!important;overflow:hidden!important}
body.cb-expanded .cb-play-panel .cb-action-row{position:absolute!important;left:50%!important;bottom:8px!important;transform:translateX(-50%)!important;z-index:50!important;margin:0!important}
body.cb-expanded .cb-play-panel .cb-roll-btn,
body.cb-expanded .cb-play-panel .cb-manual-btn{min-width:116px!important;visibility:visible!important;opacity:1!important}

@media(max-width:520px){
  .cb-play-panel{padding-bottom:62px}
  .cb-play-panel .cb-action-row{width:calc(100% - 10px);justify-content:center;gap:5px}
  .cb-play-panel .cb-roll-btn,.cb-play-panel .cb-manual-btn{flex:1 1 0;min-width:0!important;max-width:150px;height:42px;min-height:42px;font-size:10px;padding:0 7px}
  body.cb-expanded .cb-play-panel{padding-bottom:60px!important}
  body.cb-expanded .cb-play-panel .cb-action-row{width:calc(100% - 8px)!important;bottom:4px!important}
  body.cb-expanded .cb-play-panel .cb-roll-btn,
  body.cb-expanded .cb-play-panel .cb-manual-btn{min-width:0!important;height:40px!important;min-height:40px!important;font-size:9.5px!important}
}
