/* Protected centers, unique cultural craft panels, and no in-game scrolling. */
body{--safe-x:14%;--safe-y:14%}
body[data-theme=egypt]{--safe-x:14%;--safe-y:19%;--panel-image:url('assets/panels/sandstone.webp');--display-font:Cinzel}
body[data-theme=greece],body[data-theme=rome]{--safe-x:13%;--safe-y:14%}
body[data-theme=india]{--panel-image:url('assets/panels/india.webp');--display-font:Palatino;--reading-font:Palatino}
body[data-theme=muslim]{--panel-image:url('assets/panels/muslim.webp');--display-font:Palatino;--reading-font:Roman}
body[data-theme=japan]{--panel-image:url('assets/panels/japan.webp');--display-font:Roman;--reading-font:Roman}
body[data-theme=china]{--panel-image:url('assets/panels/china.webp');--display-font:Palatino;--reading-font:Roman}
body[data-theme=europe]{--panel-image:url('assets/panels/europe.webp');--display-font:Bookman;--reading-font:Palatino}
body[data-theme=russia]{--panel-image:url('assets/panels/russia.webp');--display-font:Cinzel;--reading-font:Bookman}
body[data-theme=england]{--panel-image:url('assets/panels/england.webp');--display-font:Bookman;--reading-font:Roman}
body[data-theme=france]{--panel-image:url('assets/panels/france.webp');--display-font:Palatino;--reading-font:Palatino}
body[data-theme=polynesia]{--panel-image:url('assets/panels/polynesia.webp');--display-font:Bookman;--reading-font:Palatino}
body[data-theme=spain]{--panel-image:url('assets/panels/spain.webp');--display-font:Palatino;--reading-font:Roman}
body[data-theme=aztecs]{--panel-image:url('assets/panels/aztecs.webp');--display-font:Cinzel;--reading-font:Roman}
body[data-theme=incas]{--panel-image:url('assets/panels/incas.webp');--display-font:Cinzel;--reading-font:Palatino}
body[data-theme=japan] #taskHeading,body[data-theme=japan] .team-name{letter-spacing:.04em}body[data-theme=china] #taskHeading{letter-spacing:.07em}body[data-theme=france] #topic{font-style:italic}
#task,#openingTablet.board-widget,.random-widget,.direction-banner,.team-card,.dense .team-card{padding:0!important;position:relative;overflow:hidden!important}
.panel-content{position:absolute;inset:var(--safe-y) var(--safe-x);display:flex;flex-direction:column;gap:6px;min-width:0;min-height:0;overflow:hidden!important;box-sizing:border-box;color:#2f291f}
.panel-content>*{min-width:0;min-height:0;box-sizing:border-box;flex-shrink:0}
#teams,.dense #teams{grid-auto-rows:minmax(0,1fr)!important;min-height:0!important;overflow:hidden!important;padding:0 0 20px;gap:4px}
#scoreboard{overflow:hidden!important;padding:26px 0 0}#scoreboard .section-label{font-size:10px;min-height:16px;line-height:1.1;gap:8px;white-space:nowrap;overflow:hidden;margin:0 8px 4px;padding:0}
.team-card,.dense .team-card{display:block!important;min-height:0!important;max-height:none!important;min-width:0!important;isolation:isolate}.team-card .panel-content{gap:3px}.team-top,.dense .team-top{display:block!important;flex:none!important;margin:0!important;padding:0!important;min-height:0!important;width:100%;overflow:hidden!important}
.team-name,.dense .team-name{display:block!important;-webkit-line-clamp:unset!important;height:100%;width:100%;overflow:hidden!important;margin:0;line-height:1.05;overflow-wrap:anywhere;text-align:center}
.team-space,.dense .team-space,.lists-on-cards .team-space{flex:1!important;min-height:0!important;width:100%;margin:0!important;border:0;overflow:hidden!important}.team-space canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none}
.team-card.digital .team-space{display:flex;align-items:center;justify-content:center;gap:3px}.team-score,.dense .team-score{height:100%;max-height:100%;flex:1;min-width:0;margin:0;padding:0;overflow:hidden!important;line-height:1}.quick-score,.dense .quick-score{flex:0 0 36px;min-width:36px;width:36px;min-height:44px;height:44px;max-height:100%;padding:0}
.card-ink-actions,.dense .card-ink-actions{display:flex!important;flex:none!important;height:44px;min-height:44px;padding:0;gap:3px;margin:0}.card-ink-actions button,.dense .card-ink-actions button{flex:1;min-width:0;min-height:44px;height:44px;padding:3px 1px;font:12px Arial,sans-serif;white-space:nowrap}
.team-students,.lists-on-cards .team-students{max-height:none!important;min-height:0;overflow:hidden!important;flex:none;margin:0;padding:0;text-align:center;line-height:1.1;overflow-wrap:anywhere}
.team-card:after{opacity:.4}.team-card:before{filter:none}.team-card:nth-child(3n+2):before{filter:brightness(.97)}.team-card:nth-child(3n):before{filter:brightness(1.025)}
#task .panel-content{gap:6px}.task-top{flex:none;display:flex;justify-content:center;align-items:stretch;overflow:hidden!important}.task-top[hidden]{display:none!important}#taskHeading{display:block;width:100%;height:100%;line-height:1.05;overflow:hidden!important;text-align:center;letter-spacing:.02em}#topic{flex:none!important;min-height:0!important;max-height:none!important;margin:0!important;line-height:1.08;overflow:hidden!important;overflow-wrap:anywhere}#target{flex:1!important;min-height:0;max-height:none!important;margin:0;line-height:1.18;white-space:pre-wrap;overflow:hidden!important;overflow-wrap:anywhere}#topic[hidden],#target[hidden]{display:none!important}.round-top,#roundLabel,#taskNumber{display:none!important}
#timerBox{padding:7px 48px 7px 7px!important;overflow:hidden!important}#timerSettings{position:absolute;right:1px;top:0;z-index:40;width:44px;height:44px;min-height:44px;padding:0;font-size:27px;background:transparent;color:#f2d79c;border:0;line-height:1}#timerBox>.resize-corner{width:44px;height:44px;min-height:44px;font-size:31px;right:0;bottom:0;z-index:40}
.random-widget{overflow:hidden!important}.random-widget .panel-content{gap:4px}.random-head{display:flex;flex:none;height:44px;min-height:44px;gap:3px}.random-head strong{height:44px;line-height:1.05;overflow:hidden;display:flex;align-items:center}.random-head button{flex:none;width:44px;min-height:44px;padding:0}.random-answer{flex:1;min-height:0;max-height:none;overflow:hidden!important;line-height:1.1;overflow-wrap:anywhere;align-content:center}.random-left{flex:none;height:24px;min-height:0;overflow:hidden!important;line-height:1.1;margin:0;align-content:center}.random-actions{flex:none;height:44px;min-height:44px;padding:0;gap:4px}.random-actions button{flex:1;min-width:0;min-height:44px;padding:3px;font:13px Arial}.random-widget>.resize-corner{display:block!important;right:2px;bottom:2px;width:44px;height:44px;min-height:44px;border:1px solid #f1d28c;color:#ffe5a0;background:#18343ce8;border-radius:12px 0 0 0;z-index:60;font-size:33px;opacity:1;pointer-events:auto;touch-action:none}
#openingTablet .panel-content{gap:8px}#openingWorkshop{flex:none;font-size:12px;line-height:1.15}#openingTitle{flex:none;min-height:0;overflow:hidden!important;line-height:1.05;margin:0}#openingText{flex:1;min-height:0;overflow:hidden!important;line-height:1.25}#openingTablet .entry-actions{flex:none;min-height:44px;gap:6px;margin:0;display:flex;flex-wrap:nowrap}#openingTablet .entry-actions button{min-height:44px;padding:8px;min-width:0;flex:1;font-size:14px}
.direction-banner{position:relative!important;min-height:0!important;max-height:none!important;overflow:hidden!important}.direction-banner .panel-content{gap:6px}.direction-banner .step-number{height:22px;flex:none;font-size:18px}.direction-banner h3{flex:none;height:18%;min-height:0;line-height:1.05;margin:0;overflow:hidden!important;overflow-wrap:anywhere}.direction-banner p{flex:1;min-height:0;line-height:1.18;margin:0;overflow:hidden!important;overflow-wrap:anywhere}
#directionsScreen,#directionBanners{overflow:hidden!important}.board-widget::-webkit-scrollbar,.board-widget *::-webkit-scrollbar,.direction-banner::-webkit-scrollbar,.direction-banner *::-webkit-scrollbar{display:none!important}.board-widget,.board-widget *,.direction-banner,.direction-banner *{scrollbar-width:none!important}
#typeControls h3{margin:0 0 12px}#typeControls{border-bottom:1px solid #ffffff33;padding-bottom:14px;margin-bottom:16px}.type-row{display:grid;grid-template-columns:minmax(0,1fr) 44px 42px 44px;align-items:center;gap:3px;margin:7px 0;font:13px Arial;color:#f4ebda}#menu .type-row button{width:44px;min-height:44px;margin:0;padding:0;text-align:center;background:#ffffff15;border:1px solid #ffffff22;font-size:16px}.type-row output{font-size:11px;color:#e5c68c;text-align:center}
.task-order-control{max-width:360px}.task-editor{margin:10px 0;background:#f0e9d8;border:1px solid #c9bfa7;border-radius:10px;overflow:hidden}.task-editor summary{list-style:none;display:flex;align-items:center;gap:8px;padding:5px 8px;cursor:pointer;min-height:54px}.task-editor summary::-webkit-details-marker{display:none}.task-summary{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;font-weight:bold}.task-grab,.delete-task{width:44px;min-width:44px;min-height:44px;padding:0!important}.task-grab{cursor:grab;touch-action:none;font-size:25px!important}.delete-task{margin-left:auto;color:#7b392d!important;font-size:18px!important}.task-fold{font-size:22px;transition:transform .2s}.task-editor[open] .task-fold{transform:rotate(180deg)}.task-editor-fields{padding:10px 20px 18px;border-top:1px solid #d6cdb8}.task-editor-fields textarea{width:100%}.task-editor-fields .duration label{flex:0 1 120px}.task-dragging{opacity:.65}.task-editor.drop-target{border-color:#226872;box-shadow:0 3px 0 #226872}.task-grab:focus-visible{outline:3px solid #226872}
@media(max-width:700px){#directionBanners{grid-template-columns:repeat(3,minmax(0,1fr));height:65vh}.direction-banner{display:block!important;height:100%;min-height:0!important}.direction-banner:not(.revealed){visibility:hidden}#directionsScreen{height:100dvh;overflow:hidden!important}.random-widget .panel-content{inset:14% 12%}#setup{padding-right:54px}.type-row{font-size:12px}.round-controls{bottom:8px}}
body[data-theme=india]{--safe-x:16%;--safe-y:19%}body[data-theme=muslim]{--safe-x:17%;--safe-y:24%}body[data-theme=japan]{--safe-x:14%;--safe-y:19%}body[data-theme=china]{--safe-x:17%;--safe-y:19%}
body[data-theme=europe]{--safe-x:15%;--safe-y:19%}body[data-theme=russia]{--safe-x:18%;--safe-y:21%}body[data-theme=england]{--safe-x:18%;--safe-y:21%}body[data-theme=france]{--safe-x:16%;--safe-y:21%}body[data-theme=india]{--safe-x:17%;--safe-y:21%}body[data-theme=china]{--safe-x:18%;--safe-y:21%}body[data-theme=greece],body[data-theme=rome]{--safe-x:15%;--safe-y:18%}
#studentLists li{font-size:calc(18px*var(--student-font,1))}
body[data-theme=polynesia]{--safe-x:15%;--safe-y:21%}body[data-theme=spain]{--safe-x:18%;--safe-y:23%}body[data-theme=aztecs]{--safe-x:21%;--safe-y:20%}
body[data-theme=incas]{--safe-x:16%;--safe-y:19%}
