
.board-wrap{position:relative;isolation:isolate;perspective:none;margin-top:-18px;margin-bottom:-12px}
.webgl-stage{width:100%;aspect-ratio:1.12;position:relative;touch-action:pan-y}
.webgl-stage canvas{display:block;width:100%;height:100%;outline:none}
.scene-loading{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:30px;color:#7c8c74;font-size:13px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[hidden]{display:none!important}
.center-controls{position:absolute;left:50%;top:52%;width:31%;min-width:150px;transform:translate(-50%,-50%);z-index:5;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none}.center-turn{color:#d9efd3;font-size:9px;font-weight:600;letter-spacing:2px;text-shadow:0 1px 5px #06371a}.center-buttons{width:100%;pointer-events:auto}.center-action{position:relative;width:100%;display:flex;align-items:center;justify-content:center;gap:17px;min-height:49px;border-radius:14px;background:linear-gradient(150deg,#fff5d9,#e9cc93);color:#3b442d;border:1px solid #fff9e9;box-shadow:0 5px 0 #a68a52,0 11px 22px #00351f65,inset 0 1px #fff;font-size:15px;font-weight:700;letter-spacing:.1px;transition:box-shadow .15s,transform .15s,opacity .2s}.center-action:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 7px 0 #a68a52,0 15px 25px #00351f65,inset 0 1px #fff;filter:brightness(1.04)}.center-action:active:not(:disabled){transform:translateY(3px);box-shadow:0 2px 0 #a68a52,0 5px 10px #00351f65}.center-action:disabled{opacity:.64;color:#3b442d}.center-action .roll-symbol{font-size:27px;line-height:1}.center-action:focus-visible{outline:3px solid white;outline-offset:7px}#center-caption{color:#e1f1d4;font-size:10px;line-height:1.4;margin-top:5px;text-shadow:0 1px 3px #053c25}.control-help{font-size:10px;color:#89927f}.actions{justify-content:space-between;align-items:center;border-top:1px solid #dfe1d6;padding-top:9px}.actions>.quiet{background:#e5ebdf;padding:9px 13px;font-size:11px}.table{background:radial-gradient(ellipse at 50% 30%,#fffefa,#f2eee0 85%);box-shadow:0 16px 45px #4d553e0a}.board-status{margin-top:3px}.board-status>span:last-child{max-width:220px;text-align:right}.selection{min-height:52px}.intro{margin-bottom:20px}h1{font-size:30px}.board-wrap:before{content:'';position:absolute;left:15%;right:15%;bottom:3%;height:12%;background:#634b2a17;filter:blur(22px);border-radius:50%;z-index:-1}
@media(min-width:1200px){.board-wrap{max-width:760px;margin-left:auto;margin-right:auto}.center-action{min-height:54px}}
@media(max-width:800px){.center-controls{width:32%;min-width:142px;gap:6px}.center-turn{font-size:8px;letter-spacing:1.6px}.center-action{font-size:13px;min-height:43px;padding:9px 10px;gap:10px;border-radius:11px}#center-caption{font-size:9px}.board-status>span:last-child{display:none}}
@media(max-width:480px){.center-controls{width:37%;min-width:126px;gap:4px;top:52%}.center-turn{font-size:6.5px;letter-spacing:1.2px}.center-action{min-height:37px;padding:6px 8px;font-size:11px;border-radius:9px;box-shadow:0 3px 0 #a68a52,0 8px 15px #00351f65}.center-action .roll-symbol{font-size:21px}#center-caption{font-size:7.5px;margin-top:3px}.control-help{font-size:9px;max-width:210px}.board-wrap{margin-left:-9px;margin-right:-9px}h1{font-size:27px}.table-top{margin-bottom:7px}}
@media(prefers-reduced-motion:reduce){.tile-body,.dice-shell{transition:none}.center-action:hover{transform:none}}

.board-wrap:before{display:none}.center-controls{top:57%;width:29%;min-width:142px}.webgl-stage.context-lost:after{content:'Grafik pausiert. Bitte lade die Seite neu.';position:absolute;inset:0;display:grid;place-items:center;background:#f4f0e3e8;color:#244b32}
@media(min-width:1200px){.board-wrap{max-width:900px;margin-left:-12px;margin-right:-12px}.center-action{min-height:47px;font-size:14px}.layout{grid-template-columns:minmax(0,1fr) 270px}}
@media(max-width:480px){.center-controls{min-width:118px;width:34%;gap:3px}.center-action{font-size:10px;min-height:33px}.center-turn{font-size:6px}.webgl-stage{aspect-ratio:1.04}.board-wrap{margin-top:-7px}.center-caption{font-size:7px}}

.table-top{position:relative;gap:12px}.table-top #round{margin-left:auto}.view-toggle{padding:7px 10px;background:#e7ecdf;border:1px solid #d1dcc8;border-radius:30px;color:#45613d;font-size:10px;letter-spacing:.2px}.view-toggle:disabled{opacity:.45}.view-toggle:hover{background:#dce6d1}@media(max-width:480px){.view-toggle{font-size:8px;padding:7px}.table-top{gap:6px}.table-top #round{font-size:7px;letter-spacing:.5px}}

.table-top{z-index:10}

/* The dice themselves are the controls; the transparent targets follow their 3D bounds. */
.die-hit{position:absolute;z-index:6;padding:0;border:0;background:transparent!important;box-shadow:none!important;border-radius:24%;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.die-hit:focus-visible{outline:2px solid #fff2ca;outline-offset:7px}.die-hit:hover{outline:1px solid #fff5cf66;outline-offset:4px}
.center-controls{width:58%;min-width:0;gap:8px}.center-turn{font-size:10px;letter-spacing:2px;color:#f9f1d9}#center-caption{font-size:12px;color:#f6efd9;font-weight:500;letter-spacing:.2px}
#idle-hint{font-size:11px;line-height:1.65;color:#eaf1d8;background:#173d2bbd;border:1px solid #cfd7a636;padding:10px 19px;border-radius:18px;box-shadow:0 5px 25px #15352125;animation:hint-in .6s both}#idle-hint strong{font-weight:500;color:#ffe4a4}.awaiting-roll .die-hit{animation:invitation 3s ease-in-out infinite}
@keyframes invitation{0%,100%{outline:1px solid #fff3c500;outline-offset:4px}50%{outline:1px solid #fff3c580;outline-offset:8px}}@keyframes hint-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.actions{flex-wrap:wrap;gap:12px}.actions #close,.actions #roll{width:auto;font-size:13px;padding:11px 18px;margin:0}.actions:has(#close:not([hidden])) .control-help{display:none}.rules-lead{font-size:18px;color:#496048}#modal a{color:#386841}#modal{max-height:85vh;overflow:auto}
@media(max-width:480px){.center-turn{font-size:7px;letter-spacing:1px}#center-caption{font-size:8px}.center-controls{gap:3px}#idle-hint{font-size:8px;padding:6px 10px;border-radius:10px}.actions #close{font-size:11px}}
@media(prefers-reduced-motion:reduce){.awaiting-roll .die-hit,#idle-hint{animation:none}}

.awaiting-roll #center-caption{display:none}.center-controls #idle-hint{max-width:240px}.center-controls{pointer-events:none}

.die-hit{transform:translate(-50%,-50%);min-width:44px;min-height:44px}

/* The close action belongs to the board, aligned with its center. */
.board-row{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:16px;align-items:center}.board-row .board-wrap{margin:0;max-width:none;min-width:0}.turn-action{position:static;margin:0;padding:14px 12px;border:1px solid #d9dece;border-radius:16px;background:#fcfbf5;box-shadow:0 8px 28px #203e2310;min-width:0}.turn-action .eyebrow,.turn-action h2,.action-shortcut{display:none}.turn-action p{font-size:11px;line-height:1.5;color:#78816f;margin:0}.action-total{font-size:11px;font-weight:600;color:#697a5c;padding:12px 0}.turn-action.choosing .action-total{font-size:28px;letter-spacing:-1px}.turn-action #close{width:100%;display:flex;justify-content:space-between;gap:4px;align-items:center;padding:12px 10px;border-radius:10px;background:#254a38;color:#fff7dc;border:1px solid #426450;font-size:12px;font-weight:600;box-shadow:0 3px 0 #193425}.turn-action #close:disabled{opacity:.38;box-shadow:none}.turn-action.can-close{border-color:#96ae81}.turn-action.can-close .action-total{color:#254a38}
@media(max-width:1100px){.layout{grid-template-columns:1fr}aside{display:grid;grid-template-columns:1fr 1fr;gap:16px}}
@media(max-width:600px){.board-row{grid-template-columns:minmax(0,1fr) 92px;gap:6px}.turn-action{padding:9px 7px;border-radius:11px}.turn-action p{font-size:9px}.turn-action #close{padding:10px 5px;font-size:10px;justify-content:center}.turn-action #close span{display:none}.turn-action.choosing .action-total{font-size:21px}.action-total{font-size:9px;padding:8px 0}.center-controls #center-caption{font-size:6px}.center-controls .center-turn{font-size:5px}aside{grid-template-columns:1fr}}
.tile.closed{position:relative}.tile.closed small{font-size:10px;margin-left:3px}

.tile:not(.closed){color:var(--team-ink,#fff6dc);text-shadow:none}

.new-game{background:#254a38;color:#fff8e0;border:1px solid #496d52;border-radius:10px;padding:11px 15px;font-size:12px;font-weight:600;letter-spacing:0;white-space:nowrap}.table-top{flex-wrap:wrap}.table-top #round{margin-left:auto}.new-game:disabled{opacity:.5}@media(max-width:600px){.new-game{font-size:10px;padding:9px 10px}.table-top{gap:6px}.table-top .pill{padding:8px}.table-top #round{display:none}}

.board-wrap,.webgl-stage,.die-hit{touch-action:none}.webgl-stage canvas{cursor:grab}.camera-dragging,.camera-dragging *{cursor:grabbing!important;user-select:none}.camera-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 0 16px;border-bottom:1px solid #dfe2d4;margin-bottom:16px}.camera-help{font-size:11px;font-weight:600;color:#496048}.camera-help small{display:block;font-size:10px;font-weight:400;color:#7c8579;margin-top:4px}.camera-buttons{display:flex;gap:5px;flex-wrap:wrap}.camera-buttons button{background:#e7ecdf;color:#36513e;border:1px solid #d6dece;border-radius:9px;padding:9px 11px;font-size:11px;min-height:36px}.camera-buttons button:hover{background:#dae4d3}.webgl-stage:focus-visible{outline:2px solid #729b80;outline-offset:-3px}@media(max-width:600px){.camera-toolbar{gap:10px}.camera-buttons button{min-height:44px;padding:9px 12px}}
/* Phones: give the 3D surface the full card width, with the action directly below. */
@media(max-width:600px){
 header{height:64px;padding:0 18px}main{padding:20px 12px 0}.intro{margin-bottom:18px}h1{font-size:27px}.intro p{font-size:12px}
 .table{padding:14px 12px}.table-top{flex-wrap:wrap;gap:8px}.table-top button{min-height:44px;font-size:11px}.pill{font-size:10px}
 .board-row{grid-template-columns:minmax(0,1fr);gap:0}.board-row .board-wrap{width:100%}.webgl-stage{aspect-ratio:1.06}
 .board-row .turn-action{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:center;width:100%;padding:12px;margin:0 0 10px;border-radius:13px}
 .turn-action #action-detail{font-size:12px;line-height:1.4;margin:0;grid-column:1}.turn-action #action-total{font-size:17px;grid-column:1;margin:5px 0 0}
 .turn-action #close{grid-column:2;grid-row:1 / 3;min-height:48px;width:auto;padding:12px 17px;font-size:13px;margin:0}
 .center-controls{max-width:84%}.center-turn{font-size:10px}#center-caption{font-size:11px}#idle-hint{font-size:11px;padding:7px 12px}
 .camera-toolbar{padding:5px 0 14px}.camera-help{font-size:12px}.camera-help small{font-size:11px;line-height:1.5}.camera-buttons{width:100%;gap:6px}.camera-buttons button{min-width:44px;min-height:44px;font-size:12px;flex:1;padding:8px}.camera-buttons button[data-camera=reset]{flex:2}
 .panel select,.panel input:not([type=checkbox]):not([type=range]){font-size:16px;min-height:48px}.panel label{font-size:12px}.panel button,.actions button{min-height:44px}.tiles{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.tile{min-height:52px}
}
.center-controls{transform:translate(-50%,0)}
@media(max-width:600px){.center-controls .center-turn{font-size:10px}.center-controls #center-caption{font-size:11px}.center-controls{gap:4px}}

@media(min-width:601px){.board-row .turn-action{align-self:end;margin-bottom:clamp(24px,5vw,72px)}}
/* Reuse the empty upper-right strip; keep the same board-row height. */
@media(min-width:901px){
 .board-row{display:block;position:relative;container-type:inline-size}
 .board-row .board-wrap{width:100%}
 .board-row #board.webgl-stage{aspect-ratio:auto;height:calc((100cqw - 166px)/1.12)}
 .board-row .turn-action{position:absolute;right:0;bottom:0;width:140px;margin:0;z-index:7}
}
/* Keep the action clear of the enlarged near-right board edge. */
@media(min-width:901px){
 .board-row .turn-action{width:128px;padding:12px}
 .board-row .turn-action #action-detail{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .board-row .turn-action #action-total{font-size:12px;line-height:1.35;margin:0 0 8px}
 .board-row .turn-action #close{margin:0;padding:12px 8px}
}
