/* Chance scenes share the table's dark green, gold and rounded controls. */
#commander-table[data-chance] .ct-seat>.ct-panel{filter:grayscale(1) brightness(.34);transition:filter .16s ease;}
#commander-table[data-chance] .ct-bar{opacity:.3;}
#commander-table[data-chance] .ct-seat[data-rolling]>.ct-panel{filter:grayscale(.15) brightness(.95);}
#commander-table .ct-seat[data-rolling]>.ct-panel::after,
#commander-table .ct-seat[data-selection]>.ct-panel::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:24;border:5px solid #ffe590;box-shadow:inset 0 0 24px 7px #f3b936a8;}
#commander-table .ct-seat[data-selection=gold]>.ct-panel::after{animation:ct-starter-shimmer 2.4s ease-in-out infinite;}
@keyframes ct-starter-shimmer{0%,100%{border-color:#efbb3c;box-shadow:inset 0 0 0 2px #ffe9a3,inset 0 0 23px 8px #ffc948a6;}50%{border-color:#fff2b6;box-shadow:inset 0 0 0 3px #ffe99c,inset 0 0 45px 12px #ffdc6bcc;}}
#commander-table .ct-seat[data-rolling=blood]>.ct-panel::after,
#commander-table .ct-seat[data-selection=blood]>.ct-panel::after{border-color:#f04449;box-shadow:inset 0 0 0 2px #800a12,inset 0 0 33px 10px #be0714ba;background:radial-gradient(ellipse at 0 22%,#aa071280,transparent 22%),radial-gradient(ellipse at 100% 70%,#c6091999,transparent 22%),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23b5081c' stroke-width='.4'%3E%3Cpath d='M0 12 3 18 2 25 6 31 5 37M3 18l4 2 2 6M2 25 1 33M100 63l-4 4 1 6-5 6 1 8M96 67l-5 1-2 6M18 0l2 5 7 2 2 4M20 5l-4 5M75 100l-2-6 3-4-1-5M73 94l-5-2-1-5'/%3E%3C/g%3E%3C/svg%3E");animation:ct-blood-pulse 3.2s ease-in-out infinite;}
@keyframes ct-blood-pulse{50%{border-color:#ff7377;box-shadow:inset 0 0 0 3px #aa1724,inset 0 0 42px 12px #cf1226c2;}}
#commander-table .ct-chance-layer{position:absolute;z-index:2000;display:flex;align-items:center;justify-content:center;overflow:hidden;color:#edf3ec;touch-action:none;}
#commander-table .ct-chance-stage{position:relative;flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:clamp(14px,3vmin,32px);box-sizing:border-box;transform:rotate(var(--chance-angle,0deg));transform-origin:center;overflow:hidden;}
#commander-table .ct-chance-stage h2{margin:0;text-align:center;font-size:clamp(22px,min(var(--chance-width)*.06,var(--chance-height)*.07),34px);line-height:1.2;font-weight:700;text-shadow:0 2px 12px #000;}
#commander-table .ct-chance-stage button{color:#edf3ec;background:#29382fec;border:1px solid #788979;cursor:pointer;touch-action:manipulation;}
#commander-table .ct-chance-stage button:focus-visible,#commander-table .ct-dice-count-wheel:focus-visible{outline:3px solid #f3d66c;outline-offset:4px;}
#commander-table .ct-chance-stage [hidden]{display:none!important;}
#commander-table .ct-chance-close{position:absolute;right:12px;top:12px;z-index:8;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:10px;border-radius:12px;}
#commander-table .ct-chance-close svg{width:24px;height:24px;}
#commander-table .ct-choice-center{display:flex;flex-direction:column;align-items:center;gap:22px;text-align:center;max-width:90%;}
#commander-table .ct-choice-center p{margin:0;font-size:clamp(16px,3.5vmin,24px);text-shadow:0 2px 10px #000;min-height:1.3em;}
#commander-table .ct-choice-orb{width:clamp(100px,min(var(--chance-width)*.4,var(--chance-height)*.35),184px);height:clamp(100px,min(var(--chance-width)*.4,var(--chance-height)*.35),184px);min-height:0;border-radius:50%;padding:22%;display:grid;place-items:center;flex:none;background:radial-gradient(circle at 30% 20%,#64774e,#25392c 60%,#16271d);border:2px solid #f3d66c;box-shadow:0 0 0 8px #efcf6320,0 10px 50px #0009,inset 0 0 25px #c8cb8059;color:#ffe593;}
#commander-table button.ct-choice-orb{padding:24px;background:radial-gradient(circle at 30% 20%,#64774e,#25392c 60%,#16271d);color:#ffe593;border:2px solid #f3d66c;}
#commander-table .ct-choice-orb svg{width:60%;height:60%;min-width:50px;min-height:50px;}
#commander-table .ct-choice-spinning{padding:24px;animation:ct-choice-spin 1.1s linear infinite;}
@keyframes ct-choice-spin{to{transform:rotate(360deg);}}
#commander-table .ct-chance-back{min-height:44px;padding:8px 20px;border-radius:10px;}
#commander-table .ct-chance-result{display:block;min-height:42px;font-size:clamp(24px,5vmin,38px);font-weight:750;text-align:center;color:#ffe495;text-shadow:0 2px 8px #000;line-height:1.1;}
#commander-table .ct-chance-done{height:46px;min-height:46px;min-width:160px;padding:8px 30px;border-radius:12px;font-size:17px;flex:none;}
#commander-table .ct-coin-scene{position:relative;display:grid;place-items:center;perspective:700px;flex:1;width:100%;max-height:min(480px,calc(var(--chance-height)*.68));min-height:100px;--coin-size:clamp(105px,min(var(--chance-width)*.44,var(--chance-height)*.37),240px);}
#commander-table .ct-coin-flight{position:relative;width:var(--coin-size);height:var(--coin-size);transform-style:preserve-3d;}
#commander-table .ct-coin{position:absolute;inset:0;transform-style:preserve-3d;}
#commander-table .ct-coin-face,#commander-table .ct-coin-edge{position:absolute;inset:0;border-radius:50%;box-sizing:border-box;background:repeating-conic-gradient(#987322 0deg 3deg,#eac968 3deg 6deg);}
#commander-table .ct-coin-face{backface-visibility:hidden;-webkit-backface-visibility:hidden;border:8px ridge #d9b75b;outline:1px solid #ffe6a2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#775318;background:radial-gradient(ellipse at 25% 15%,#fff4b8,#e0b951 55%,#a57925);box-shadow:inset 0 0 0 3px #fff0a7,inset 0 0 0 6px #a47c29;}
#commander-table .ct-coin-heads{transform:translateZ(6px);}
#commander-table .ct-coin-tails{transform:rotateY(180deg) translateZ(6px);}
#commander-table .ct-coin-face span{width:48%;height:48%;filter:drop-shadow(1px 2px 0 #fff2ac);}
#commander-table .ct-coin-face svg{width:100%;height:100%;stroke-width:1.4;}
#commander-table .ct-coin-face b{font-size:calc(var(--coin-size)*.085);letter-spacing:.18em;}
#commander-table .ct-coin-face strong{font-size:calc(var(--coin-size)*.5);line-height:.95;text-shadow:1px 2px #fff2ac;}
#commander-table .ct-coin-edge::before,#commander-table .ct-coin-edge::after{content:"";position:absolute;inset:0;border-radius:inherit;background:inherit;transform:translateZ(3px);}
#commander-table .ct-coin-edge::after{transform:translateZ(-3px);}
#commander-table .ct-coin-shadow{position:absolute;width:var(--coin-size);height:calc(var(--coin-size)*.18);border-radius:50%;top:calc(50% + var(--coin-size)*.65);background:#000;filter:blur(10px);}
#commander-table .ct-dice-picker{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;width:min(560px,100%);height:100%;min-height:0;}
#commander-table .ct-dice-picker label{font-size:18px;color:#d5decd;}
#commander-table .ct-dice-count-wheel{display:grid;grid-template-rows:1fr 1.35fr 1fr;width:clamp(88px,calc(var(--chance-width)*.3),150px);height:clamp(110px,calc(var(--chance-height)*.32),225px);min-height:90px;flex-shrink:1;text-align:center;border:1px solid #d8c069;border-radius:18px;background:linear-gradient(#19261ce8,#45593bec 45%,#45593bec 55%,#19261ce8);cursor:ns-resize;touch-action:none;user-select:none;-webkit-user-select:none;overflow:hidden;}
#commander-table .ct-dice-count-wheel>*{display:flex;align-items:center;justify-content:center;line-height:1;min-height:0;pointer-events:none;}
#commander-table .ct-dice-count-wheel>span{font-size:clamp(18px,min(var(--chance-height)*.05,32px),32px);opacity:.38;}
#commander-table .ct-dice-count-wheel output{font-size:clamp(32px,min(var(--chance-height)*.09,60px),60px);font-weight:650;border-block:1px solid #b7c09070;}
#commander-table .ct-dice-types{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;width:100%;}
#commander-table .ct-dice-types button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100%;min-width:0;min-height:64px;padding:10px 3px;border-radius:14px;background:#25392ced;font-size:16px;}
#commander-table .ct-dice-types button svg{width:min(100%,64px);height:clamp(32px,min(var(--chance-width)*.12,var(--chance-height)*.13),64px);}
#commander-table .ct-dice-types button:hover{border-color:#ffe495;color:#ffe495;}
#commander-table .ct-dice-tray{display:grid;gap:8px;flex:1;width:100%;min-height:0;perspective:700px;}
#commander-table .ct-rolling-die{position:relative;min-width:0;min-height:0;perspective:650px;}
#commander-table .ct-dice-tray[data-many=true] .ct-rolling-die{overflow:clip;}
#commander-table .ct-die-flight{position:absolute;left:calc(50% - 50px);top:calc(50% - 50px);width:100px;height:100px;transform-style:preserve-3d;}
#commander-table .ct-die-spin,#commander-table .ct-die-body{position:absolute;inset:0;transform-style:preserve-3d;}
#commander-table .ct-die-body{scale:var(--die-scale);}
#commander-table .ct-poly-face{position:absolute;left:50%;top:50%;transform-origin:0 0;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:visible;}
#commander-table .ct-poly-face polygon{fill:hsl(137 20% var(--face-shade));stroke:#e6cd84;stroke-width:1.25;stroke-linejoin:round;}
#commander-table .ct-poly-face text{fill:#fff1be;font-family:inherit;font-weight:750;paint-order:stroke fill;stroke:#1e2e24;stroke-width:.5;}
#commander-table .ct-die-value{position:absolute;bottom:0;left:0;width:100%;font-size:var(--die-label-size);line-height:1.1;text-align:center;font-variant-numeric:tabular-nums;color:#ffe495;opacity:0;}
#commander-table [data-settled=true] .ct-die-value{opacity:1;}
/* Choose yourself on the real table before drawing a random opponent. */
#commander-table[data-chance=opponent-actor] .ct-seat>.ct-panel{filter:grayscale(.6) brightness(.62);}
#commander-table .ct-actor-choices{position:absolute;inset:0;}
#commander-table .ct-actor-choice{position:absolute;display:block;padding:0;min-width:0;min-height:0;border:3px dashed #edf3ec;border-radius:14px;background:#20362918;box-shadow:inset 0 0 22px #edf3ec28;color:#edf3ec;cursor:pointer;touch-action:manipulation;}
#commander-table .ct-actor-choice:hover,#commander-table .ct-actor-choice:focus-visible{outline:none;border-color:#f3d66c;box-shadow:inset 0 0 0 2px #f3d66c,inset 0 0 30px #f3d66c44;}
#commander-table .ct-actor-label{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(var(--actor-angle));width:max-content;max-width:var(--actor-label-width);display:flex;flex-direction:column;gap:4px;padding:10px 12px;box-sizing:border-box;border:1px solid #edf3ec;border-radius:12px;background:#1d2d24f2;box-shadow:0 3px 16px #0009;text-align:center;pointer-events:none;}
#commander-table .ct-actor-label strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:20px;line-height:1.15;}
#commander-table .ct-actor-label>span{font-size:16px;line-height:1.15;}
#commander-table .ct-chance-layer[data-mode=opponent-actor] .ct-chance-stage{justify-content:flex-start;padding:10px;pointer-events:none;}
#commander-table .ct-actor-notice{display:grid;grid-template-columns:minmax(0,1fr) 44px;column-gap:12px;row-gap:4px;align-items:center;width:min(440px,100%);padding:12px;box-sizing:border-box;border:2px solid #edf3ec;border-radius:14px;background:#1d2d24;box-shadow:0 4px 24px #000b;}
#commander-table .ct-chance-stage .ct-actor-notice h2{grid-column:1;font-size:20px;text-align:left;}
#commander-table .ct-actor-notice p{grid-column:1;margin:0;font-size:clamp(14px,calc(var(--chance-width)*.04),16px);line-height:1.25;}
#commander-table .ct-actor-notice .ct-chance-close{position:static;grid-column:2;grid-row:1/3;pointer-events:auto;}
#commander-table[data-reduce-motion=true] .ct-seat[data-selection]>.ct-panel::after{animation:none;}
#commander-table[data-reduce-motion=true] .ct-choice-spinning{animation:none;}
@media(prefers-reduced-motion:reduce){#commander-table .ct-seat[data-selection]>.ct-panel::after,#commander-table .ct-choice-spinning{animation:none;}#commander-table[data-chance] .ct-seat>.ct-panel{transition:none;}}
