@font-face{font-family:PlexArabic;src:url('./assets/arabic-bold.ttf') format('truetype');font-weight:600 900;font-display:swap}
@font-face{font-family:PlexArabic;src:url('./assets/arabic.ttf') format('truetype');font-weight:400 500;font-display:swap}
:root{color-scheme:dark;--bg:#10151d;--surface:#111a23;--line:#394958;--muted:#a2aebb;--white:#f4f5f0;--lime:#d7fb75;--font:PlexArabic,'Tahoma',sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--white);font-family:var(--font);font-size:16px;-webkit-font-smoothing:antialiased}button{font-family:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:disabled{cursor:wait;opacity:.5}button:focus-visible,canvas:focus-visible{outline:2px solid var(--lime);outline-offset:5px}button{transition:background .16s,border-color .16s,transform .12s}button:active{transform:translateY(1px)}button:hover{border-color:#8395a5;background:#1d2932}button svg,[data-icon]>svg{width:22px;height:22px;display:block;flex-shrink:0}button[hidden],[hidden]{display:none!important}.app{width:min(1440px,calc(100% - 72px));margin:auto;padding:30px 0 12px}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;min-height:95px}.brand h1{display:flex;align-items:center;gap:15px;font-size:52px;line-height:1.25;letter-spacing:-1.5px;font-weight:700;margin:0 0 8px}.brand-door{width:32px;height:42px;color:var(--lime)}.brand p{margin:0;color:var(--muted);font-size:18px}.header-actions{display:flex;gap:14px;direction:rtl}.icon-button{width:47px;height:45px;border:1px solid #667889;background:transparent;border-radius:6px;display:grid;place-items:center}.statusbar{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:58px;padding:8px 25px;border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;background:#101820}.room-info,.stats,.stat{display:flex;align-items:center;gap:13px;white-space:nowrap}.room-info strong{font-size:15px;font-weight:500}.room-info b{margin-inline-start:8px;font-size:15px}.stats{gap:16px}.stat{gap:10px;font-size:14px}.stat b{font-family:var(--font);font-variant-numeric:tabular-nums;font-size:16px;min-width:23px}.stat #timer{min-width:47px}.lime{color:var(--lime)}.small-icon svg{width:18px;height:18px}.divider{height:22px;width:1px;background:#2c3c4a;display:block}.progress{display:flex;direction:ltr;gap:15px;list-style:none;margin:0;padding:0;position:absolute;left:50%;transform:translateX(-50%)}.progress li{width:11px;height:11px;border-radius:50%;background:#465565;transition:background .3s,box-shadow .3s}.progress li[aria-current=step]{background:var(--lime);box-shadow:0 0 16px #d7fb7525}.progress li.complete{background:#829950}.progress li span,.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}.arena{position:relative;isolation:isolate;aspect-ratio:1200/430;border:1px solid #657787;border-radius:4px;overflow:hidden;background:#17212b;direction:ltr}.arena:before,.arena:after{content:'';position:absolute;pointer-events:none;z-index:3;width:14px;height:14px;border-top:2px solid #d4dedf;top:0}.arena:before{left:0;border-left:2px solid #d4dedf;border-radius:3px 0 0}.arena:after{right:0;border-right:2px solid #d4dedf;border-radius:0 3px 0 0}#game{display:block;width:100%;height:100%;outline:none;touch-action:none}.arena-pause{position:absolute;top:12px;left:12px;width:31px;height:31px;display:grid;place-items:center;background:#10151d80;border:1px solid #8196a32b;border-radius:4px;opacity:.65;z-index:2}.arena-pause svg{width:15px;height:15px}.arena-pause:hover{opacity:1}.start-cue{position:absolute;bottom:28px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;direction:rtl;border:1px solid #64755365;color:#e3edcd;background:#111a21db;border-radius:5px;padding:8px 15px;font-size:13px;pointer-events:none;white-space:nowrap;transition:opacity .2s}.start-cue.invisible{opacity:0}.pulse-dot{height:5px;width:5px;background:var(--lime);border-radius:50%;animation:pulse 2s infinite}.cue-arrow svg{width:15px;height:15px}.guide{display:flex;align-items:center;gap:20px;border:1px solid var(--line);border-radius:7px;min-height:95px;margin-top:16px;padding:12px 24px;background:#111a22}.guide-avatar{position:relative;width:64px;height:64px;flex-shrink:0}.guide-avatar canvas{width:100%;height:100%}.online{position:absolute;bottom:3px;left:2px;width:8px;height:8px;background:var(--lime);border:2px solid #111a22;border-radius:50%}.guide-copy{flex:1}.guide-label{color:var(--lime);font-weight:600;font-size:14px}.guide-copy p{margin:5px 0 0;font-size:18px;line-height:1.6;min-height:29px}.wave{height:46px;display:flex;align-items:center;justify-content:center;gap:5px;width:185px;direction:ltr;border-right:1px solid #304352;margin-right:20px;padding-right:28px}.wave span{display:block;width:2px;border-radius:2px;background:var(--lime);opacity:.85;transform:scaleY(.55)}.wave.speaking span{animation:wave .65s ease-in-out infinite alternate;animation-delay:var(--delay)}.controls{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:20px;min-height:48px}.keyboard-help{display:flex;align-items:center;gap:21px;font-size:14px}.keyboard-help>div{display:flex;align-items:center;gap:7px}.keyboard-help>div>span:last-child{margin-right:6px}.keyboard-help i{height:25px;width:1px;background:var(--line)}kbd{font-family:Arial,sans-serif;font-size:14px;font-weight:600;min-width:28px;height:30px;display:grid;place-items:center;border:1px solid #98a4ae;border-bottom-width:2px;border-radius:4px;background:#ffffff06;padding:0 5px}kbd.wide{min-width:64px;padding:0 12px;font-size:13px}kbd[data-icon] svg{width:17px;height:17px}.room-actions{display:flex;gap:13px;white-space:nowrap}.secondary,.hint-button,.primary{display:inline-flex;align-items:center;justify-content:center;gap:11px;border-radius:6px;min-height:46px;padding:9px 17px;font-size:15px;font-weight:500;border:1px solid #607689;background:transparent}.hint-button{color:var(--lime);border-color:var(--lime)}.hint-button[aria-pressed=true]{background:#d7fb7514}.primary{background:var(--lime);border-color:var(--lime);color:#172016;font-weight:600}.primary:hover{background:#e3ffa3;border-color:#e3ffa3}footer{display:flex;justify-content:space-between;gap:20px;margin-top:19px;color:var(--muted);font-size:12px}footer p{margin:6px 0}.arena-overlay{position:absolute;inset:0;z-index:5;background:#101820f5;display:flex;align-items:center;justify-content:center;flex-direction:column;direction:rtl;text-align:center;padding:20px;backdrop-filter:blur(5px)}.arena-overlay h2{font-size:42px;line-height:1.35;margin:7px 0 3px;letter-spacing:-1px}.arena-overlay p{color:var(--muted);font-size:17px;margin:5px 0 16px}.overlay-symbol{color:var(--lime);margin-bottom:8px}.overlay-symbol svg{width:28px;height:28px}.loading-mark{width:30px;height:30px;border:2px solid #485546;border-top-color:var(--lime);border-radius:50%;animation:spin 1s linear infinite}.victory{background:#101b16e8}.victory-icon{color:var(--lime)}.victory-icon svg{width:38px;height:38px}.victory .ending-note{font-size:12px;color:var(--lime);margin:10px 0 0}.victory-stats{display:flex;gap:50px;margin:6px 0 20px}.victory-stats>div{display:flex;flex-direction:column;gap:1px}.victory-stats b{font-size:30px;line-height:1.3;font-variant-numeric:tabular-nums}.victory-stats span{font-size:12px;color:var(--muted)}.victory-actions{display:flex;gap:12px}.victory .share-status{font-size:12px;min-height:18px;margin:9px 0 0}.touch-controls{display:none}.app:fullscreen{background:var(--bg);width:100%;height:100%;padding:20px max(24px,calc((100vw - 1440px)/2));overflow:auto}.app:fullscreen .arena{max-height:66vh}.app:fullscreen .header{min-height:70px}.app:fullscreen .brand h1{font-size:36px}@keyframes pulse{50%{opacity:.35}}@keyframes wave{from{transform:scaleY(.28)}to{transform:scaleY(1)}}@keyframes spin{to{transform:rotate(360deg)}}
@media(min-width:1500px){.app{padding-top:33px}.header{margin-bottom:26px}.guide{min-height:108px}.guide-avatar{width:73px;height:73px}.controls{margin-top:24px}.arena{aspect-ratio:1200/420}}
@media(max-width:1100px){.app{width:calc(100% - 40px);padding-top:23px}.brand h1{font-size:42px}.brand p{font-size:16px}.header{min-height:82px}.statusbar{padding:9px 17px;gap:12px}.progress{position:static;transform:none;gap:9px}.stats{gap:10px}.stat{gap:7px;font-size:12px}.small-icon{display:none}.room-info{gap:10px}.room-info b{margin-inline-start:4px}.keyboard-help{gap:13px;font-size:12px}.keyboard-help>div{gap:5px}.controls{gap:10px}.secondary,.hint-button{font-size:13px;padding:8px 12px}.guide-copy p{font-size:16px}.guide{gap:14px;padding:12px 17px}.wave{width:135px;gap:4px;padding-right:18px}.arena-overlay h2{font-size:32px}.victory-icon{display:none}.victory-stats{margin:2px 0 12px}.victory .ending-note{margin-top:0}}
@media(max-width:800px),(pointer:coarse){.keyboard-help{display:none}.touch-controls{display:flex;justify-content:space-between;align-items:center;margin-top:17px;gap:20px;user-select:none;-webkit-user-select:none;touch-action:none}.touch-move,.touch-action{display:flex;gap:12px}.touch-controls button{width:62px;height:57px;display:flex;align-items:center;justify-content:center;gap:7px;border:1px solid #576876;border-radius:8px;background:#18212b;touch-action:none;-webkit-touch-callout:none;user-select:none}.touch-controls button.active{background:#354532;border-color:var(--lime)}.touch-controls .jump-button{width:99px;background:var(--lime);border-color:var(--lime);color:#172016;font-weight:700;font-size:16px}.touch-action #backwards{display:flex;flex-direction:column;gap:0;width:60px}.touch-action #backwards svg{width:20px;height:20px}.touch-action #backwards small{font-size:10px}.controls{justify-content:center;margin-top:16px}.room-actions{width:100%;justify-content:space-between}.room-actions button{min-height:43px}.header-actions{gap:10px}.wave{display:none}.guide{min-height:90px}.stats .stat>span:not(.small-icon){display:none}.statusbar{min-height:49px}.stat b{font-size:14px}.room-info strong{font-size:13px}.room-info>span{font-size:12px}.room-info b{font-size:13px}.guide-copy p{font-size:15px}.guide-avatar{width:51px;height:51px}.guide-label{font-size:12px}footer{font-size:11px}.arena{aspect-ratio:1200/510}.arena canvas{object-fit:fill}.arena-overlay h2{font-size:28px}.arena-overlay p{font-size:14px;margin:4px 0 10px}.victory-stats b{font-size:22px}.victory-actions button{font-size:12px;min-height:36px;padding:6px 11px}.victory-stats{gap:30px}.victory .share-status{margin:4px 0 0}}
@media(max-width:520px){.app{width:calc(100% - 24px);padding:19px 0 12px}.header{min-height:77px;margin-bottom:20px;align-items:flex-start}.brand h1{font-size:35px;gap:8px;letter-spacing:-1px}.brand-door{height:30px;width:24px}.brand p{font-size:12px;margin-top:4px}.icon-button{width:34px;height:34px}.icon-button svg{width:18px;height:18px}.header-actions{gap:7px;padding-top:7px}.statusbar{padding:9px 10px;flex-wrap:wrap;gap:6px}.room-info{gap:8px;flex:1}.room-info .divider{height:16px}.stats{gap:8px}.stats .divider{height:15px}.progress{order:3;justify-content:center;width:100%;gap:10px;padding-top:5px;padding-bottom:2px}.progress li{width:6px;height:6px}.stat b{font-size:12px}.stat #timer{min-width:34px}.arena{aspect-ratio:1200/650}.arena-pause{top:7px;left:7px;width:26px;height:26px}.start-cue{font-size:10px;padding:5px 9px;bottom:9px;gap:7px}.guide{padding:11px 12px;gap:11px;min-height:92px;margin-top:12px;align-items:flex-start}.guide-avatar{width:43px;height:43px;margin-top:8px}.guide-copy p{font-size:13px;line-height:1.8;margin-top:2px;min-height:45px}.touch-controls{margin-top:14px}.touch-controls button{width:57px;height:55px}.touch-move,.touch-action{gap:8px}.touch-controls .jump-button{width:83px}.touch-action #backwards{width:49px}.controls{margin-top:14px}footer{margin-top:14px;gap:7px;font-size:9px}.arena-overlay{padding:10px}.arena-overlay h2{font-size:23px;margin:1px 0}.arena-overlay p{font-size:11px;margin:1px 0 9px}.overlay-symbol{display:none}.arena-overlay .primary{min-height:35px;padding:5px 12px;font-size:12px}.victory .ending-note{font-size:8px}.victory-stats{gap:30px;margin:2px 0 7px}.victory-stats b{font-size:19px}.victory-stats span{font-size:9px}.victory-actions{gap:7px}.victory-actions .secondary{min-height:35px;font-size:10px;padding:5px 9px}.victory-actions svg{width:16px;height:16px}.victory .share-status{font-size:9px;min-height:12px}}
@media(max-height:520px) and (orientation:landscape){.app{padding:10px 0;width:calc(100% - 36px)}.header{min-height:30px;margin-bottom:9px;align-items:center}.brand h1{font-size:25px;margin:0}.brand-door{height:26px;width:21px}.brand p,footer,.wave{display:none}.header-actions{padding:0}.icon-button{height:30px;width:34px}.statusbar{min-height:37px;padding:5px 12px}.arena{aspect-ratio:1200/390;max-height:calc(100svh - 175px)}.guide{min-height:50px;padding:6px 12px;margin-top:8px;gap:10px}.guide-avatar{width:34px;height:34px;margin:0}.guide-label{font-size:10px}.guide-copy p{font-size:12px;min-height:0;line-height:1.5;margin:0}.touch-controls{position:absolute;inset:125px 33px auto;z-index:4;pointer-events:none}.touch-controls button{pointer-events:auto;opacity:.8;height:47px;width:48px}.touch-controls .jump-button{width:70px}.touch-action #backwards{width:43px}.controls{margin-top:7px}.room-actions button{min-height:32px;padding:3px 12px;font-size:11px}.start-cue{bottom:8px;font-size:10px}.victory h2{font-size:24px}.victory .ending-note{display:none}.victory-stats{margin-bottom:8px}.victory-actions .primary,.victory-actions .secondary{min-height:32px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

.victory{background:linear-gradient(90deg,#0d19158c,#0d1915b8,#0d19158c);backdrop-filter:none}.victory h2{text-shadow:0 2px 20px #0008}
body{line-height:1.5}.brand p{line-height:1.5}button{line-height:1.4}
@media(min-width:1101px){.app{width:min(1476px,calc(100% - 60px));padding-top:28px}.header{min-height:92px;margin-bottom:22px}.brand h1{font-size:48px;line-height:1.15;margin-bottom:6px}}
@media(min-width:801px) and (min-height:600px) and (max-height:900px){.app{width:min(calc(100% - 48px),calc((100svh - 322px)*2.79));padding:16px 0 8px}.header{min-height:64px;margin-bottom:12px}.brand h1{font-size:34px;line-height:1.15;margin-bottom:4px}.brand p{font-size:13px}.brand-door{width:26px;height:34px}.statusbar{min-height:44px;padding:7px 18px}.arena{aspect-ratio:1200/430}.guide{min-height:70px;margin-top:12px;padding:8px 18px}.guide-avatar{width:50px;height:50px}.guide-copy p{font-size:15px;line-height:1.5;margin:2px 0 0;min-height:23px}.guide-label{font-size:12px}.controls{min-height:40px;margin-top:12px}.secondary,.hint-button{min-height:40px;font-size:13px;padding:7px 13px}.keyboard-help{gap:15px;font-size:12px}.keyboard-help>div{gap:5px}footer{margin-top:12px;font-size:11px}footer p{margin:0}.wave{height:35px}}

.touch-controls.unavailable{visibility:hidden;pointer-events:none}
@media(max-height:520px) and (orientation:landscape){.touch-controls{display:flex}.keyboard-help{display:none}.arena{max-height:calc(100svh - 195px)}}
/* The fake finish belongs to the room; it never intercepts real game controls. */
.finish-bait{position:absolute;top:17%;left:50%;transform:translateX(-50%);z-index:3;display:flex;align-items:center;flex-direction:column;gap:7px;min-width:255px;padding:18px 32px;border:1px solid #d7fb7580;border-radius:8px;direction:rtl;text-align:center;background:#15231be8;box-shadow:0 8px 55px #0005;pointer-events:none}.finish-bait strong{font-size:30px;color:#e5fac1}.finish-bait>span:not(.bait-symbol){font-size:15px;color:#c6d4b5}.finish-bait .bait-symbol{font:24px Arial;color:#d7fb75}.finish-bait b{font-size:26px;line-height:1.2;color:#d7fb75;font-variant-numeric:tabular-nums}.progress{gap:11px}
@media(max-width:520px){.finish-bait{top:10%;padding:8px 16px;min-width:215px;gap:3px}.finish-bait strong{font-size:20px}.finish-bait>span:not(.bait-symbol){font-size:11px}.finish-bait b{font-size:19px}.finish-bait .bait-symbol{font-size:18px}}
@media(max-height:520px) and (orientation:landscape){.finish-bait{top:5%;padding:7px 25px;gap:2px}.finish-bait strong{font-size:20px}.finish-bait>span:not(.bait-symbol){font-size:11px}.finish-bait .bait-symbol{font-size:16px}.finish-bait b{font-size:19px}}

/* Platforming HUD stays outside the playfield. */
.progress{position:static;transform:none;gap:8px}.progress li{width:8px;height:8px}.coin-stat{color:#f0cd7e}.coin-stat .small-icon{display:block}.pipe-help{display:flex;align-items:center;gap:8px;font-size:12px;white-space:nowrap}.pipe-help kbd{font-size:12px}.touch-action #enter-pipe{flex-direction:column;gap:0;width:49px;color:#a5efcf}.touch-action #enter-pipe small{font-size:10px}
@media(max-width:1100px){.progress{gap:5px}.progress li{width:6px;height:6px}.room-info{gap:7px}.statusbar{gap:8px}.stats{gap:7px}}
@media(max-width:800px),(pointer:coarse){.pipe-help{display:none}}
@media(max-width:520px){.progress{gap:10px}.touch-controls{gap:8px}.touch-controls:has(#enter-pipe:not([hidden])) .touch-action{gap:6px}.touch-controls:has(#enter-pipe:not([hidden])) .jump-button{width:70px}.coin-stat .small-icon svg{width:12px;height:12px}.coin-stat{gap:3px}.room-info strong{font-size:12px}.room-info{gap:5px}}
