*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#000;font-family:Arial,sans-serif}#game{position:absolute;inset:0;touch-action:none;isolation:isolate}#game canvas{touch-action:none}button{font:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid #fc0;outline-offset:2px}[hidden]{display:none!important}#touch-chat{position:fixed;left:12px;right:12px;bottom:max(80px,env(safe-area-inset-bottom));z-index:30;display:flex;padding:7px;border-radius:15px;border:2px solid white;background:#087dbc;gap:5px}#touch-chat input{min-width:0;flex:1;font-size:16px;padding:10px;border:0;border-radius:8px}#touch-chat button{border:0;background:#00558b;color:white;font-size:24px;min-width:44px;border-radius:8px}#connection{position:fixed;top:8px;left:50%;transform:translateX(-50%);z-index:35;color:#064c74;background:#ffffffdb;border-radius:10px;padding:6px 12px;font-size:12px;pointer-events:none}#connection:empty{display:none}#game-controls{position:fixed;inset:0;pointer-events:none;z-index:25}.touch #game{bottom:70px}.touch input{font-size:16px!important}@media(orientation:landscape) and (max-height:550px){.touch #game{bottom:0}#touch-chat{left:25%;right:15%;bottom:60px}}@media(min-width:900px){#touch-chat{left:30%;right:30%}}
#boot-static{position:absolute;inset:0;z-index:1;margin:auto;width:100%;height:100%;max-width:1520px;max-height:960px;object-fit:contain;background:#0280cd;pointer-events:none}
#island-catalog{width:min(900px,94vw);max-height:88dvh;padding:0;border:3px solid #fff;border-radius:20px;color:#064975;background:#eaf8ff;box-shadow:0 10px 60px #00334c80;overflow:auto}#island-catalog::backdrop{background:#003d6870}#island-catalog header{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;background:#087dbc;color:#fff;position:sticky;top:0;z-index:1}#island-catalog h2{margin:0;font-size:22px}#island-catalog button{min-height:44px;min-width:44px;border:0;border-radius:10px;background:#087dbc;color:#fff;padding:8px 14px;font-weight:bold;font-size:16px}#island-catalog button:disabled{opacity:.55;cursor:default}#island-catalog header button{background:#005a94;font-size:24px}.catalog-tools{display:flex;gap:12px;align-items:center;padding:12px 16px}.catalog-tools input{flex:1;min-width:0}.catalog-tools strong{white-space:nowrap}#island-catalog input{border:1px solid #89bed8;border-radius:8px;padding:10px;font:inherit;min-height:44px;max-width:100%}.catalog-status{min-height:20px;margin:0 16px 10px}.catalog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:12px;padding:0 16px 16px}.catalog-grid article{display:flex;flex-direction:column;align-items:center;gap:5px;background:white;padding:12px;border:1px solid #baddec;border-radius:14px}.catalog-grid img{width:90px;height:90px;object-fit:contain}.catalog-grid h3{font-size:15px;text-align:center;margin:0;min-height:35px}.catalog-grid p{font-size:14px;margin:0 0 5px}.catalog-grid button{width:100%;margin-top:auto}#island-catalog footer{display:flex;align-items:center;justify-content:center;gap:20px;padding:12px}.pet-stats{text-align:center;padding:18px}.pet-care{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;padding:0 20px 20px}@media(max-width:430px){.catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0 8px 8px}.catalog-grid article{padding:8px}.catalog-tools{padding:10px;gap:8px}.catalog-tools strong{font-size:13px}}@media(orientation:landscape){}

.room-audit .dpad,.room-audit .game-actions{bottom:calc(var(--audit-toolbar-height,58px) + 12px)}

@media(max-width:430px){.touch #game{bottom:122px}#touch-chat{bottom:124px}}
@media(max-width:430px){}

@media(max-width:430px){}

#joystick{position:fixed;left:24px;top:0;width:120px;height:120px;border-radius:50%;background:#003e6d33;border:2px solid #ffffffb0;box-shadow:inset 0 0 0 6px #ffffff26;z-index:24;touch-action:none;user-select:none;-webkit-user-select:none}
#joystick span{position:absolute;left:27.5%;top:27.5%;width:45%;height:45%;border-radius:50%;background:radial-gradient(circle at 35% 30%,#9edcff,#0a74c4 70%);border:2px solid #fff;box-shadow:0 3px 8px #003e6d66;pointer-events:none}
#joystick.active{background:#003e6d4d}
#tray{position:fixed;left:0;top:0;width:0;height:0;z-index:24}
#tray button{position:absolute;left:0;top:0;width:46px;height:46px;margin:-23px;padding:0;border-radius:50%;border:2px solid #fff;background:#0a6db5 url('/assets/media/interface/game/main/touch-tray/icons-hd.png') no-repeat;background-size:460px 46px;background-origin:border-box;box-shadow:0 2px 6px #003e6d66;transform:rotate(var(--a)) translate(96px) rotate(calc(-1 * var(--a)))}
#tray button[aria-expanded="true"]{box-shadow:0 0 0 3px #fbc454,0 2px 6px #003e6d66}
#tray .tray-main{width:68px;height:68px;margin:-34px;background-size:680px 68px;background-position:-272px 0;transform:none}
#tray .snowball-knob{display:none;pointer-events:none}
#tray .tray-main{touch-action:none}
#tray .tray-main.aiming{border-color:transparent;background:none;box-shadow:none;z-index:1}
#tray .tray-main.aiming::before{content:"";position:absolute;left:50%;top:50%;width:120px;height:120px;transform:translate(-50%,-50%);border:3px solid #036;border-radius:50%;background:#0280cd;box-shadow:inset 0 0 0 3px #0cf,0 0 0 2px #fff,0 3px 0 #0cf;pointer-events:none}
#tray .tray-main.aiming .snowball-knob{display:block;position:absolute;left:50%;top:50%;width:52px;height:52px;margin:-26px;border:3px solid #036;border-radius:50%;background:#0280cd url('/assets/media/interface/game/main/touch-tray/icons-hd.png') no-repeat -208px 0/520px 52px;background-origin:border-box;box-shadow:inset 2px 2px 0 #1dbfff,0 2px 0 #0cf;transform:translate(var(--aim-x,0px),var(--aim-y,0px))}
#tray [data-tray="chat"]{background-position:-92px 0}
#tray [data-tray="emote"]{background-position:-138px 0}
#tray [data-tray="map"]{background-position:0 0}
#tray [data-tray="action"]{background:#0a6db5 url('/assets/media/interface/game/main/touch-tray/action.png') no-repeat center/24px auto}
#tray [data-tray="more"]{background:#0a6db5;display:flex;align-items:center;justify-content:center;gap:4px}
#tray [data-tray="more"] i{width:6px;height:6px;border-radius:50%;background:#fff}
#tray [data-tray="more"] b{position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#e03131;border:2px solid #fff;color:#fff;font:bold 11px/16px Arial}
#tray-menu{position:fixed;right:8px;bottom:0;z-index:26;display:grid;gap:6px;padding:10px;border:2px solid #fff;border-radius:18px;background:#0a6db5f2;box-shadow:0 6px 24px #003e6d66;overflow:auto;overscroll-behavior:contain}
#tray-menu[data-menu="emote"]{grid-template-columns:repeat(7,40px)}
#tray-menu[data-menu="action"]{grid-template-columns:repeat(3,minmax(0,76px));max-width:calc(100vw - 16px);overflow:hidden}
#tray-menu[data-menu="more"]{grid-template-columns:repeat(3,minmax(0,1fr));width:min(320px,calc(100vw - 24px));right:12px;gap:8px;padding:14px;overflow:visible;background:#0280cd;border:3px solid #036;border-radius:28px;box-shadow:inset 0 0 0 3px #0cf,0 0 0 2px #fff,0 0 0 4px #ffffff80,0 12px 50px #0007}
#tray-menu[data-menu="more"] button{min-height:72px;padding:8px 4px;font:bold 14px/1.15 'Arial Narrow',Arial,sans-serif}
#tray-menu[data-menu="more"] button:focus-visible{outline:3px solid #fc0;outline-offset:2px}
#tray-menu button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:40px;padding:4px;border:0;border-radius:12px;background:#ffffff1f;color:#fff;font:bold 12px Arial}
#tray-menu button:active{background:#ffffff40}
#tray-menu img{max-width:32px;max-height:32px;pointer-events:none}
#tray-menu[data-menu="action"] img{max-width:56px;max-height:56px}
#tray-menu span{width:40px;height:40px;background:url('/assets/media/interface/game/main/touch-tray/icons-hd.png') no-repeat;background-size:400px 40px}
#tray-menu span.reader{background-image:url('/assets/media/interface/game/main/touch-tray/reader-hd.png');background-size:80px 40px}
#tray-menu b{position:absolute;top:2px;right:6px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#e03131;color:#fff;font:bold 11px/18px Arial}
body.touch:not(.room-audit) #game{bottom:0}

#console{position:fixed;inset:0;z-index:0;pointer-events:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:linear-gradient(160deg,#3aa6f5 0%,#1677cf 45%,#0c58a8 100%);box-shadow:inset 0 40px 90px #ffffff1c}
body.touch{position:fixed;inset:0;background:#0c58a8;overscroll-behavior:none}
body.touch{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
body.touch input,body.touch textarea,body.touch [contenteditable="true"]{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}
body.touch #game{z-index:1;border-radius:3px;overflow:hidden}
#console .bezel{position:absolute;background:linear-gradient(#3d4859,#29323f);border-radius:10px 10px 36px 10px;box-shadow:inset 0 2px 0 #ffffff1f,0 3px 0 #083d73}
#console .bezel-label{position:absolute;left:0;right:0;top:6px;text-align:center;font:bold 8px/10px Arial,sans-serif;letter-spacing:.22em;color:#aebdd0}
#console .bezel-label::before,#console .bezel-label::after{content:"";position:absolute;top:3px;width:18%;height:2px;border-top:2px solid #e35d6a;border-bottom:2px solid #6aa3ff}
#console .bezel-label::before{left:14px}#console .bezel-label::after{right:14px}
#console .led{position:absolute;left:3px;top:46%;width:6px;height:6px;border-radius:50%;background:#ff4d5e;box-shadow:0 0 6px #ff4d5e}
#console .brand{position:absolute;text-align:center}
#console .brand img{display:block;width:160px;height:64px;max-width:100%;object-fit:contain;margin:0 auto}
#console .speaker{position:absolute;left:calc(env(safe-area-inset-left) + 88px);bottom:calc(env(safe-area-inset-bottom) + 22px);display:flex;gap:7px;transform:translateX(-50%) rotate(-28deg)}
#console .speaker i{width:6px;height:40px;border-radius:3px;background:#0a4a8c;box-shadow:inset 0 2px 2px #00000055}
[data-layout="landscape"] #console .bezel{border-radius:14px}
[data-layout="landscape"] #console .bezel-label,[data-layout="landscape"] #console .speaker{display:none}
[data-layout="portrait"] #chat-close{display:none}
#tray [data-tray="igloo"]{background-position:-230px 0}
#tray-menu{z-index:31;background:#0a6db5}
#touch-chat{box-sizing:border-box;align-items:center;gap:6px;padding:4px 5px;border-radius:14px;border:2px solid #033562;background:#0280cc;box-shadow:inset 0 2px 0 #3fc4ff,0 3px 8px #003e6d66}
#touch-chat input{box-sizing:border-box;height:36px;padding:0 14px;border:2px solid;border-color:#00529b #01ccff #01ccff #00529b;border-radius:18px 6px 6px 18px;background:#036;color:#fff;font:bold 16px Arial,sans-serif;outline:0}
#touch-chat input:focus-visible{outline:3px solid #fc0;outline-offset:-3px}
#touch-chat input::placeholder{color:#7fb6e0;font-weight:normal}
#touch-chat button{flex:none;box-sizing:border-box;width:36px;height:36px;min-width:0;padding:0;border:2px solid #033562;border-radius:50%;background:#0280cc;box-shadow:inset 0 2px 0 #1dbfff,inset 0 -2px 0 #00cdff;color:#fff;font:bold 20px/1 Arial,sans-serif}
#touch-chat button[type="submit"]{font-size:0;background:#0280cc url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAACi0lEQVR4nLXWP0xTQRwH8O/v+lqIlRJGo0QkMRSICYOuwmiQoTUhJDLwNGp0UgeNDA2tMrBoUKPG+K8sJsaBtyAmLhAHV42RtmCkBpgtlBaSlp65V9pe/9j3nnn9Je29Xu76ye/u3t0RDKKtc7jV3ZRRAfj2qxJ8j4Iby7PfYCEUowbupoxGRAPlvXhHW+fwwJ9f7zfNQsyoQRUi6kB97ubMgsjWNkiOM4On/xtjVqDxwFUMnu0vww42Z6Zth0QEJq5haKiEAaS29/jeGPUj8XWo+9xRB3I+aWXVnKPFL2/hcjA4GWH0/G3Eln9LLXl4bUm78E/osNc/xhjCZrKRoZ1UGpevhBCNxU1hjIhXZWEmPC1uzLwMorurw9QwUnuPnxd+XJ+6BYURFCK9dBKgMLZfB5w62VvMyMkILkbYTaUxenECSwaZlUFPPrwq+xPxcTpYvizUVUAuByG9vYMRNVCGcc5vrEe0h8Whgw3R6nHjXfgeeqRhJKJpMf+2QjLmaTmAQohFVsBsg+phR7z+flshEb3eY1UYMa7aDhWwF4/uQApfQ6DNrRRCU69LFRwJ1ghkpHKpE8K2Qj+iq1WIeHnXl7SQYjeylUxLBp9ei2g3xaPSKCSXg7oR1WZqbkHHT3SBKH92MKL9Uj/g9PrHTwNVW9DPlbi+11Ujs0UknxHncRDpe8fK95ilTCKxVYxdCiJpgIhguT3y6ZjFiMbiFQhPiPelFlI8YfW7myvbV7MBw0LlwfdxbhEP7s8guV1CclkaqHfX06F6Ic+hgD7Nf8bk3WdSC2PE8qqbn1vE1ORzy4jljOTg4F95llSzV2PDnYFzXpwjGUntOk1lYhraA1NlTDwLxMq9W/T7C9vpJ0khDabpAAAAAElFTkSuQmCC') no-repeat 55% center/16px auto}
#touch-chat button:active{background-color:#0369ad}
#rotate{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;text-align:center;background:linear-gradient(160deg,#3aa6f5,#0c58a8);color:#fff;font:24px/1.2 'Burbank Big Regular',Arial,sans-serif;text-shadow:0 2px 0 #08457f}
#rotate[hidden]{display:none}
#rotate p{margin:18px 0 0}
.rotate-phone{display:block;width:44px;height:76px;margin:auto;border:4px solid #fff;border-radius:10px;box-shadow:0 2px 0 #08457f;animation:upright 1.8s ease-in-out infinite}
@keyframes upright{0%,25%{transform:rotate(-90deg)}65%,100%{transform:rotate(0)}}
@media(prefers-reduced-motion:reduce){.rotate-phone{animation:none}}
#game-controls .dpad{position:fixed;display:grid;grid-template:repeat(3,46px)/repeat(3,46px);filter:drop-shadow(0 3px 0 #08345f)}
#game-controls[data-pad="row"] .dpad{grid-template:46px/repeat(3,46px)}
#game-controls .dpad button,#game-controls .dpad i{display:flex;align-items:center;justify-content:center;margin:0;padding:0;border:3px solid #036;background:#0280cd;box-shadow:inset 2px 2px 0 #1dbfff;pointer-events:auto;touch-action:none}
#game-controls .dpad button[hidden]{display:flex;visibility:hidden}
#game-controls .dpad i{grid-area:2/2;pointer-events:none;background:#0280cd}
#game-controls [data-key="ArrowUp"]{grid-area:1/2;border-radius:9px 9px 0 0}
#game-controls [data-key="ArrowLeft"]{grid-area:2/1;border-radius:9px 0 0 9px}
#game-controls [data-key="ArrowRight"]{grid-area:2/3;border-radius:0 9px 9px 0}
#game-controls [data-key="ArrowDown"]{grid-area:3/2;border-radius:0 0 9px 9px}
#game-controls[data-pad="row"] [data-key="ArrowLeft"]{grid-area:1/1}
#game-controls[data-pad="row"] .dpad i{grid-area:1/2}
#game-controls[data-pad="row"] [data-key="ArrowRight"]{grid-area:1/3}
#game-controls .dpad button::before{content:"";width:16px;height:13px;background:#fff;clip-path:polygon(50% 0,100% 100%,0 100%)}
#game-controls [data-key="ArrowLeft"]::before{transform:rotate(-90deg)}
#game-controls [data-key="ArrowRight"]::before{transform:rotate(90deg)}
#game-controls [data-key="ArrowDown"]::before{transform:rotate(180deg)}
#game-controls .dpad button:active{background:#004280}
#game-controls .dpad button:active::before{background:#fff}
#game-controls .game-actions{position:fixed;display:flex;flex-direction:column;align-items:center;gap:12px}
#game-controls .game-actions button{width:100px;min-height:60px;padding:8px 4px;border:3px solid #036;border-radius:18px;background:#0280cd;box-shadow:inset 0 2px 0 #1aa3e8,0 3px 0 #0cf;color:#fff;font:bold 23px/1.15 'Arial Narrow',Arial,sans-serif;pointer-events:auto;touch-action:none}
#game-controls .game-actions button:hover{background:#00529b}
#game-controls .game-actions button:active{background:#004280;transform:translateY(1px)}

#game-controls[data-pad="none"] .dpad{display:none}
#game-controls .game-actions [data-key="Enter"]{width:100px;height:46px;border:3px solid #036;border-radius:18px;background:#0280cd;box-shadow:inset 0 2px 0 #1aa3e8,0 3px 0 #0cf;font:bold 23px/1.15 "Arial Narrow",Arial,sans-serif;text-shadow:none}
#game-controls .game-actions [data-key="Enter"]:active{background:#004280;transform:translateY(1px)}

#table-controls{position:fixed;z-index:25;width:min(334px,100vw);padding:8px 0;display:flex;flex-direction:column;align-items:center;gap:12px;background:#0280cd;border:3px solid #036;border-radius:18px;box-shadow:inset 0 0 0 3px #0cf,0 0 0 2px #fff}
#table-controls p{margin:0;padding:0 8px;text-align:center;color:#000;font:19px/1.35 'Arial Narrow',Arial,sans-serif}
#table-controls .table-choices{display:flex;gap:2px}
#table-controls button{width:44px;min-height:44px;padding:4px;border:3px solid #036;border-radius:12px;background:#0280cd;box-shadow:inset 0 2px 0 #1aa3e8,0 3px 0 #0cf;color:#fff;font:bold 23px/1.15 'Arial Narrow',Arial,sans-serif;touch-action:manipulation}
#table-controls button:hover{background:#00529b}
#table-controls button:active{background:#004280;transform:translateY(1px)}
#table-controls button:disabled{opacity:.55;cursor:default}
#table-controls [data-table-exit]{width:100px}

/* Mobile tables reuse the original canvas and board artwork at a readable size. */
body.touch[data-table-view] #game canvas{position:absolute;width:100%!important;height:100%!important;left:0;top:0;margin:0!important}
body.touch[data-table-view] #game{border:0;border-radius:0}
body.touch[data-table-view] #joystick,body.touch[data-table-view] #tray,body.touch[data-table-view] #touch-chat{display:none}
body.touch[data-table-view] #table-controls{width:100px;padding:0;gap:0;border:0;background:none;box-shadow:none}
body.touch[data-table-view] #table-controls .table-choices{display:none}
/* Keep turn announcements available to assistive technology without repeating
   the original board's visible player and turn indicators. */
body.touch[data-table-view] #table-controls p{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
