:root{--board-zoom:1;--text-scale:1;--title-scale:1;--timer-scale:1}
/* The top decoration occupies the first 15% of every illustrated card. */
.team-card,.dense .team-card{padding:0 5% 5%;display:grid;grid-template-rows:17% auto minmax(0,1fr) auto;row-gap:0}
.team-card:before{content:'';grid-row:1}.team-top,.dense .team-top{grid-row:2;padding:2px 2px 7px;min-height:0;align-items:flex-start}.team-name,.dense .team-name{font-size:calc(clamp(12px,1.35vw,23px)*var(--text-scale));line-height:1.12}.team-space{grid-row:3;margin:0 4% 3px;min-height:0}.card-ink-actions{grid-row:4}.team-students{grid-row:3;max-height:54px;overflow:auto;font-size:calc(11px*var(--text-scale));padding:0 6%;text-align:center;line-height:1.4;color:#594a37}.lists-on-cards .team-card{grid-template-rows:17% auto auto minmax(0,1fr) auto}.lists-on-cards .team-space{grid-row:4}.lists-on-cards .card-ink-actions{grid-row:5}.lists-on-cards .team-card:not(:has(.team-students)){grid-template-rows:17% auto minmax(0,1fr) auto}.lists-on-cards .team-card:not(:has(.team-students)) .team-space{grid-row:3}.lists-on-cards .team-card:not(:has(.team-students)) .card-ink-actions{grid-row:4}
body[data-screen=game] main{width:calc(100% * var(--board-zoom));height:calc((100dvh - 122px)*var(--board-zoom));transform-origin:top left}body.zoomed-board[data-screen=game]{overflow:auto}body[data-screen=game] main .stage{min-width:0}
#task{padding:52px 6% 27px;max-height:60vh;text-align:center}#task .task-top{justify-content:center;position:relative}#taskHeading{font-family:Georgia,serif;font-weight:900;font-size:calc(clamp(24px,3.2vw,49px)*var(--text-scale));letter-spacing:1px;color:#5c4934;text-transform:uppercase;text-shadow:1px 1px #fff,0 2px 1px #fff,0 4px 3px #72553755}#taskNumber{position:absolute;right:0;font-size:16px}#topic{font-size:calc(clamp(25px,2.6vw,43px)*var(--text-scale)*var(--title-scale));line-height:1.12;margin:15px 0 12px;overflow-wrap:anywhere;max-height:18vh;overflow:auto}#target{font-size:calc(clamp(16px,1.45vw,23px)*var(--text-scale));line-height:1.45;max-height:26vh}.phase-tabs button{font-size:calc(11px*var(--text-scale))}#menu{max-height:calc(100dvh - 120px);overflow:auto}
#timerBox{width:calc(195px*var(--timer-scale));max-width:95vw}#timer{font-size:calc(52px*var(--timer-scale))}.timer-heading{font-size:calc(9px*var(--timer-scale));letter-spacing:1px}.timer-heading button{font-size:calc(15px*var(--timer-scale));min-height:32px}.timer-bottom{font-size:calc(8px*var(--timer-scale))}.timer-size-tools{display:flex;justify-content:center;gap:8px;padding-bottom:6px}.timer-size-tools button{padding:3px 12px;min-height:30px;font-size:13px;background:#ffffff15}.timer-heading #timerDrag{font-size:calc(20px*var(--timer-scale))}#timerShade{position:fixed;inset:0;z-index:20;background:#000c}.timer-spotlight #timerBox{position:fixed!important;z-index:21;left:50%!important;top:50%!important;transform:translate(-50%,-50%);width:min(92vw,1000px);background:#060d10;border-width:3px}.timer-spotlight #timer{font-size:min(29vw,44vh);line-height:1.1}.timer-spotlight .timer-heading{font-size:17px;padding:10px 20px}.timer-spotlight .timer-heading button{font-size:28px}.timer-spotlight .timer-bottom{font-size:15px;padding:12px 22px}.timer-spotlight .timer-size-tools,.timer-spotlight #timerDrag{display:none}.timer-spotlight>header,.timer-spotlight>main,.timer-spotlight #inkTools,.timer-spotlight #menu{visibility:hidden}.timer-spotlight[data-spotlight-style=clear] #timerShade{background:#000}
body[data-screen=story]>header,body[data-screen=story]>main{display:none!important}body:not([data-screen=game]) #timerShade{display:none}
#storyScreen{display:block;padding:5vh 5vw;overflow:auto}#openingTablet{position:relative;margin-left:34%;width:66%;background:var(--task-art) center/100% 100% no-repeat;padding:6vh 5vw;min-height:85vh;max-height:90vh;overflow:auto;color:#493b2b;filter:drop-shadow(0 10px 20px #0006);animation:enter-copy .8s .15s both}#openingTitle{font-size:calc(clamp(30px,3.5vw,56px)*var(--text-scale));line-height:1.1}#openingText{white-space:pre-wrap;font-family:Georgia,serif;font-size:calc(clamp(18px,1.8vw,29px)*var(--text-scale));line-height:1.55}#openingTablet .entry-actions{margin-top:22px}.independent-builder{position:absolute;z-index:2;left:3vw;top:10vh;height:80vh;width:28vw;animation:enter-builder .9s both;display:flex;flex-direction:column;align-items:center}.independent-builder img{width:100%;height:calc(100% - 45px);object-fit:contain;filter:drop-shadow(0 10px 12px #0006);pointer-events:none}.independent-builder button{touch-action:none;cursor:grab;background:#152e35b3;font-size:11px;min-height:33px;border:1px solid #ffffff50}body[data-builder-side=right] #openingTablet{margin-left:0}body[data-builder-side=right] .independent-builder{left:68vw}
#directionsScreen{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;padding:4vh 3vw;gap:18px;cursor:pointer;background:#10232c55}.directions-heading{text-align:center;text-shadow:0 3px 10px #0008}.directions-heading h2{font-size:calc(clamp(26px,3vw,48px)*var(--text-scale));margin:8px 0}.directions-heading p{color:#f8e8c9;margin:6px 0;font-size:calc(14px*var(--text-scale))}.direction-banners{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;flex:1;min-height:0}.direction-banner{background:var(--card-art) center/100% 100% no-repeat;color:#463729;padding:17% 10% 9%;filter:drop-shadow(0 7px 12px #0005);visibility:hidden;overflow:auto;max-height:68vh}.direction-banner.revealed{visibility:visible}.direction-banner.just-revealed{animation:banner-enter .65s both}.direction-banner .step-number{display:block;font-family:Georgia,serif;font-size:calc(22px*var(--text-scale));font-weight:bold;color:#80633c}.direction-banner h3{font-size:calc(clamp(23px,2.2vw,36px)*var(--text-scale));margin:8px 0 15px}.direction-banner p{font-size:calc(clamp(16px,1.35vw,22px)*var(--text-scale));line-height:1.5;color:#4c3e2f;white-space:pre-wrap;margin:0}.direction-banner:not(.revealed){pointer-events:none}#directionsScreen>.entry-actions{justify-content:center;margin:0;flex-shrink:0}#directionsScreen>.entry-actions button{font-size:calc(16px*var(--text-scale))}@keyframes banner-enter{from{opacity:0;transform:translateY(45px) rotate(-2deg)}to{opacity:1;transform:translateY(0) rotate(0)}}
#studentLists{padding:20px 28px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}#studentLists article{border:1px solid #c9bea5;border-radius:10px;padding:18px;background:#f0e7d6}#studentLists h3{font-size:calc(20px*var(--text-scale))}#studentLists li{line-height:1.7;font-size:calc(16px*var(--text-scale))}#randomResult{margin:15px 28px;text-align:center;min-height:130px;display:flex;flex-direction:column;justify-content:center;gap:14px;font-family:Georgia,serif}#randomResult strong{font-size:calc(25px*var(--text-scale));color:#8b6737}#randomResult span{font-size:calc(37px*var(--text-scale));overflow-wrap:anywhere}#randomResult.chosen{animation:enter-copy .5s both}#setup input[type=range]{padding:0;width:100%}#setup output{font-weight:normal;color:#50757a}.welcome-tag{font-size:calc(clamp(21px,2.2vw,35px)*var(--text-scale))}.section-label{font-size:calc(10px*var(--text-scale))}
@media(max-height:740px){body[data-screen=game] main{height:calc((100dvh - 95px)*var(--board-zoom))}#task{padding-top:40px;padding-bottom:18px}#openingTablet{padding:5vh 4vw}#openingText{font-size:calc(18px*var(--text-scale))}.direction-banners{gap:14px}.direction-banner p{font-size:calc(15px*var(--text-scale))}.direction-banner h3{font-size:calc(23px*var(--text-scale))}#directionsScreen{padding-top:20px;gap:12px}}
@media(max-width:900px){#studentLists{grid-template-columns:repeat(2,minmax(0,1fr))}#openingTablet{padding:40px 35px}#openingText{font-size:calc(17px*var(--text-scale))}.direction-banner{padding-left:10%;padding-right:10%}.direction-banners{gap:10px}.team-name,.dense .team-name{font-size:calc(12px*var(--text-scale))}.direction-banner p{font-size:calc(14px*var(--text-scale))}#taskHeading{font-size:calc(25px*var(--text-scale))}}
@media(max-width:600px){#storyScreen{padding:15px}#openingTablet,body[data-builder-side=right] #openingTablet{margin:230px 0 0;width:100%;max-height:none;padding:45px 28px}.independent-builder{height:240px!important;width:45vw!important;top:10px!important;left:27vw!important}.direction-banners{grid-template-columns:1fr}.direction-banner{max-height:none;min-height:260px;padding-top:60px}.direction-banner:not(.revealed){display:none}#directionsScreen{overflow:auto}.direction-banner p{font-size:calc(17px*var(--text-scale))}#studentLists{grid-template-columns:1fr}body[data-screen=game] main{height:auto;min-height:calc(100dvh - 100px)}#task{max-height:none}}
@media(prefers-reduced-motion:reduce){.direction-banner,.independent-builder,#openingTablet,#randomResult{animation:none!important}}
body[data-screen=game] main{width:100vw;height:calc(100dvh - 122px);zoom:var(--board-zoom)}.team-score{font-size:calc(clamp(25px,4.3vw,70px)*var(--text-scale))}.dense .team-score{font-size:calc(clamp(21px,2.5vw,38px)*var(--text-scale))}header h1{font-size:calc(clamp(24px,2.7vw,43px)*var(--text-scale))}#worldName{font-size:calc(20px*var(--text-scale))}.round-controls button{font-size:calc(14px*var(--text-scale))}.pill{font-size:calc(11px*var(--text-scale))}#phaseLabel{font-size:calc(11px*var(--text-scale))}.lists-on-cards .team-students{max-height:32px}.timer-spotlight #timerBox{zoom:1}
@media(max-height:740px){body[data-screen=game] main{height:calc(100dvh - 95px)}}@media(max-width:600px){body[data-screen=game] main{height:auto}}
#openingTablet{padding-top:10vh}body[data-builder-side=right] .independent-builder{left:auto;right:3vw}@media(max-width:600px){#openingTablet{padding-top:100px}.direction-banner{padding-top:90px}}
