@font-face{font-family:Bungee;src:url('./assets/Bungee.ttf') format('truetype');font-display:swap}
:root{color-scheme:dark;font-family:system-ui,-apple-system,'Segoe UI',sans-serif;--ink:#261f30;--paper:#fff0d8;--gold:#ffd383;--accent:#fa6765;--island-dark:#542d58;--sky:#985169;--tile:#ebd6b5}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 42% 0,#313149,#171d2c 62%);color:#fff4dc;min-height:100dvh}button{font:inherit;cursor:pointer;touch-action:manipulation}button:disabled{opacity:.48;cursor:default}button:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid #0c916f;outline-offset:2px}button[hidden],[hidden]{display:none!important}.app{width:min(1050px,100%);padding:0 20px 26px;margin:auto}.top{min-height:63px;display:flex;align-items:center;justify-content:space-between;gap:7px}.brand,.panel-kicker{font-weight:900;font-size:10px;letter-spacing:.16em;color:#ffd48c}.top-actions{display:flex;gap:7px}.plain,.soft,.cta{min-height:41px;border-radius:9px;padding:6px 12px;font-weight:750;border:1px solid #785e64;font-size:13px}.plain{background:#ffffff0b;color:#ffefd7;border-color:#ffffff40}.plain:hover{background:#ffffff20}.soft{background:#f8e6c9;color:#382e3a;border-color:#d7bc98}.cta{background:#3d2155;color:#fff3cc;border-color:#2c193c}.layout{display:grid;grid-template-columns:minmax(0,2.15fr) minmax(240px,1fr);gap:17px;align-items:start}.market{min-width:0;border-radius:20px;overflow:hidden;box-shadow:0 22px 60px #110f1c55}.marquee{position:relative;min-height:170px;display:flex;align-items:flex-end;justify-content:space-between;gap:4px;isolation:isolate;padding:20px 20px 15px;background:linear-gradient(145deg,var(--island-dark),var(--sky));overflow:hidden}.parade-sky{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}.sun{position:absolute;right:15%;top:18%;width:85px;height:85px;background:linear-gradient(var(--gold),var(--accent));border-radius:50%;opacity:.85}.hills{position:absolute;left:34%;bottom:-44px;width:77%;height:130px;background:#26213988;clip-path:polygon(0 68%,19% 48%,28% 25%,43% 44%,59% 14%,67% 34%,78% 45%,87% 29%,100% 62%,100% 100%,0 100%)}.hills.second{left:0;bottom:-65px;width:100%;background:#1d233688;transform:scaleX(-1)}.bunting{position:absolute;inset:0 0 auto;display:flex;justify-content:space-around;border-top:2px solid #fbe1aa60}.bunting i{width:20px;height:17px;display:block;background:var(--gold);clip-path:polygon(0 0,100% 0,50% 100%);transform-origin:top;animation:sway 3s ease-in-out infinite alternate}.bunting i:nth-child(2n){background:var(--accent);animation-delay:-1.3s}.bunting i:nth-child(3n){background:#fff1cc;animation-delay:-2.1s}@keyframes sway{from{transform:rotate(-9deg)}to{transform:rotate(9deg)}}.title{flex:none}.title p{margin:0 0 6px;color:#fff2cc;font-weight:900;font-size:9px;letter-spacing:.16em}.title h1{margin:0;font:400 clamp(32px,7vw,60px)/.91 Bungee,system-ui,sans-serif;letter-spacing:-.065em;text-shadow:0 3px #2418279e}.title em{font-style:normal;color:var(--gold)}.float{min-width:125px;max-width:215px;width:37%;position:relative;right:1%;text-align:center;align-self:flex-end}.float-roof{height:16px;background:repeating-linear-gradient(105deg,var(--accent) 0 14px,#fff0be 15px 26px);border-radius:16px 16px 1px 1px;box-shadow:0 3px 0 #372241;position:relative;z-index:2}.float-cargo{display:flex;align-items:flex-end;justify-content:center;flex-wrap:wrap;gap:0;min-height:51px;border-inline:3px solid #f2a751;background:#25224393;padding:4px}.float-cargo .sprite-art{width:29px;height:32px;animation:pop .37s cubic-bezier(.2,.75,.29,1.28) both}.float-cargo .ghost{width:32px;height:28px;border:1px dashed #ffd48680;border-radius:5px;margin:3px}.float-base{position:relative;height:13px;background:repeating-linear-gradient(0deg,#ba6634 0 2px,#ecc06c 2px 5px);border-radius:2px;box-shadow:0 3px 0 #47303a}.float-base:before,.float-base:after{content:"";position:absolute;bottom:-5px;width:13px;height:13px;background:#262332;border:3px solid #715061;border-radius:50%}.float-base:before{left:14%}.float-base:after{right:14%}.float-progress{margin-top:9px;color:#fff5d3;font-size:10px;font-weight:850;text-shadow:0 1px #302134}
.play{background:var(--paper);color:var(--ink);padding:14px 20px 13px;border-top:4px solid var(--accent)}.level-head{display:flex;align-items:center;justify-content:space-between;gap:9px}.board-location{display:flex;align-items:center;gap:6px;font-weight:800;text-transform:uppercase;font-size:10px;letter-spacing:.07em;color:#715448}.level-head h2{margin:4px 0 0;font-size:clamp(20px,4.8vw,31px);line-height:1.04;letter-spacing:-.045em}.moves{background:#ead6b7;border:1px solid #d9bc94;border-radius:10px;padding:4px 8px;min-width:57px;text-align:center;flex:none}.moves b{display:block;font-size:23px;line-height:1}.moves span{font-size:9px;font-weight:800}.moves.low{background:#ffe0cc;color:#962c2b;border-color:#ec9a75}.board-nav{display:flex;gap:5px;margin:10px 0 0}.board-nav button{flex:1;background:#f8e7c9;border:1px solid #ddc3a0;border-radius:7px;min-height:35px;color:#56404f;font-size:12px;font-weight:800}.board-nav button[aria-current]{background:#492b60;color:#fff1d1;border-color:#492b60}.message{min-height:32px;display:flex;align-items:center;margin:4px 0 3px;font-size:12px;font-weight:750;color:#60494d}.message.good{color:#196245}.message.error{color:#a2362b}.shelf-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:8px;background:linear-gradient(135deg,#d0ad83,#b78764);border:2px solid #8d6244;border-radius:13px;box-shadow:inset 0 0 0 2px #e2bd8e,0 3px 0 #8b6448}.shelf{position:relative;min-width:0;border-radius:8px;padding:4px 4px 9px;background:linear-gradient(180deg,#503624,#775443 65%,#694735);box-shadow:inset 0 2px 2px #2e1e17aa,0 3px 0 #815d41;border:1px solid #815a3b;isolation:isolate}.slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;min-width:0}.slot{height:clamp(44px,8vw,78px);width:100%;min-width:0;border:1px solid #f2c6852b;padding:1px;position:relative;display:grid;place-items:center;border-radius:5px;background:#baa48022;touch-action:none;user-select:none;-webkit-user-select:none}.slot.empty{background:#3e2a2870;border-style:dashed;border-color:#dab18260}.slot.empty.ready{background:#d2c37f55;border-color:#ffe59a}.slot.empty.hint-target,.slot.hint-source{box-shadow:inset 0 0 0 2px #ffd86e;background:#d6a4566a}.slot.selected{outline:2px solid #f8cb63;outline-offset:-2px;background:#a77447}.slot.blocked{background:repeating-linear-gradient(135deg,#352521 0 4px,#46312a 4px 8px);border-color:transparent;color:#d7ae8b;font-size:16px}.slot .sprite-art{width:100%;height:100%;max-width:73px;pointer-events:none;transition:transform .12s ease}.slot:not(.empty):hover .sprite-art{transform:translateY(-1px)}.shelf:after{content:"";position:absolute;inset:auto 0 0;height:8px;border-radius:0 0 7px 7px;background:linear-gradient(#f0ba76,#bc7a46 62%,#a56940 64%);z-index:-1}.shelf-note{position:absolute;right:3px;bottom:1px;padding:1px 3px;line-height:1;color:#ffedc0;font-size:8px;font-weight:800;background:#4b332a;border-radius:3px;pointer-events:none}.shelf.locked .slot{opacity:.46}.shelf.locked .shelf-note{background:#533a62}.shelf.revealed{animation:reveal .42s ease-out}.shelf.cleared{animation:clear .42s ease-out}.sprite-art{display:inline-block;object-fit:contain;user-select:none;-webkit-user-drag:none;filter:drop-shadow(0 3px 2px #211b283e)}.controls{display:flex;gap:6px;margin:11px 0 4px}.controls button{flex:1;min-height:41px}.help{font-size:12px;color:#674d55}.help summary{width:max-content;font-weight:800;cursor:pointer}.help p{margin:5px 0 1px}
.atlas-panel{padding:16px;border:1px solid #ffffff25;border-radius:17px;background:#262b3b}.atlas-panel h2,.dialog-head h2{margin:4px 0 9px;font-size:24px;letter-spacing:-.04em}.atlas-panel .collection-heading{font-size:19px;margin-bottom:2px}.atlas-panel p{margin:0 0 10px;color:#e0cfc4;font-size:12px}.island-list{display:grid;gap:7px}.island-card{display:flex;align-items:center;gap:9px;text-align:left;width:100%;min-height:60px;border-radius:9px;border:1px solid #fffffe25;color:#fff1d7;background:#ffffff09;padding:7px 8px}.island-card[aria-current]{background:#ffdf9c1b;border-color:#ffcf7d80}.island-card strong,.island-card small{display:block}.island-card small{font-size:10px;color:#e1c6b4}.island-card .stamp{margin-left:auto;color:#ffce77;font-size:10px;font-weight:850;white-space:nowrap}.panel-divider{height:1px;background:#fff2dc2c;margin:15px 0 11px}.collection{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.collectible{display:grid;place-items:center;min-width:0;background:#ffffff0e;border:1px solid #ffffff2c;border-radius:7px;padding:1px;color:#fee0b0;height:47px;font-size:16px}.collectible .sprite-art{height:100%;width:100%;max-height:40px}.side-notes{width:100%;margin-top:9px}.flag{display:inline-block;width:32px;height:21px;border-radius:4px;vertical-align:middle;background-size:100% 100%;background-repeat:no-repeat;box-shadow:0 0 0 1px #0004;flex:none}.board-location .flag{width:20px;height:13px;border-radius:2px}.flag-trinidad{background:linear-gradient(45deg,#d82f3e 0 38%,#fff 38% 42%,#18151d 42% 58%,#fff 58% 62%,#d82f3e 62%)}.flag-jamaica{background:linear-gradient(33deg,transparent 44%,#ffcc54 44% 56%,transparent 56%),linear-gradient(147deg,transparent 44%,#ffcc54 44% 56%,transparent 56%),conic-gradient(from 57deg,#161616 0 66deg,#238d4b 66deg 180deg,#161616 180deg 246deg,#238d4b 246deg)}.flag-barbados{position:relative;background:linear-gradient(90deg,#082876 0 33.333%,#ffc72c 33.333% 66.666%,#082876 66.666%)}.flag-barbados:after{content:"";position:absolute;inset:22% 35% 23%;background:#171316;clip-path:polygon(47% 0,56% 21%,62% 18%,59% 33%,58% 67%,74% 67%,80% 42%,72% 44%,94% 13%,100% 12%,95% 38%,91% 44%,83% 81%,58% 81%,58% 100%,44% 100%,44% 81%,17% 81%,9% 44%,5% 38%,0 12%,6% 13%,28% 44%,20% 42%,26% 67%,44% 67%,43% 33%,40% 18%,47% 21%)}
dialog{width:min(calc(100% - 26px),440px);max-height:calc(100dvh - 24px);overflow:auto;border-radius:16px;border:1px solid #e3c287;background:#282339;color:#fff0d3;padding:15px;box-shadow:0 16px 50px #1c1627a8}dialog::backdrop{background:#141522b8}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.dialog-head .panel-kicker{margin:0}.dialog-head .soft{min-width:43px}.fact-row{display:flex;align-items:center;gap:10px;border-bottom:1px solid #ffeddc25;padding:6px 0;font-size:12px}.fact-row .sprite-art{width:44px;height:45px;flex:none}.fact-row b{display:block}.source-links{color:#ffcf81;font-size:12px}.source-links a{color:inherit}.finish{text-align:center;background:radial-gradient(ellipse at 50% 8%,var(--sky),#312445 67%)}.finish-art{height:80px;display:flex;justify-content:center;align-items:center;gap:6px}.finish-art .sprite-art{width:min(24%,66px);height:69px;animation:pop .48s both}.finish-art .sprite-art:nth-child(2n){animation-delay:.1s}.finish h2{margin:5px 0 1px;font:400 clamp(21px,6vw,31px)/1.1 Bungee,system-ui;text-shadow:0 2px #27203a}.finish p{font-size:13px}.result-stars{font-size:29px;color:#ffda7d;height:36px}.finish-controls{display:flex;gap:7px}.finish-controls button{flex:1}.finish-controls .cta{background:#ffd582;color:#341f4b;border-color:#edb263}#fx{position:fixed;inset:0;pointer-events:none;z-index:4}.flight{position:fixed;object-fit:contain;animation:flight .47s cubic-bezier(.34,.74,.41,1) both}.spark{position:fixed;width:7px;height:8px;border-radius:2px;background:var(--spark);animation:spark .57s ease-out both}
@keyframes flight{from{transform:translate(0,0) scale(.96)}to{transform:translate(var(--dx),var(--dy)) scale(.34);opacity:.3}}@keyframes spark{from{opacity:1;transform:translate(0,0) scale(.8)}to{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(120deg) scale(.3)}}@keyframes pop{0%{opacity:0;transform:translateY(7px) scale(.6)}100%{opacity:1;transform:none}}@keyframes reveal{from{filter:brightness(1.3);transform:translateY(2px)}to{filter:none;transform:none}}@keyframes clear{35%{box-shadow:inset 0 0 0 3px #ffd877,0 0 13px #f7be62}100%{box-shadow:inset 0 2px 2px #2e1e17aa,0 3px 0 #815d41}}
@media(max-width:720px){.app{width:min(545px,100%);padding:0 9px 17px}.top{min-height:53px}.layout{display:block}.atlas-panel{display:none}.marquee{padding:18px 13px 10px;min-height:133px}.play{padding:11px 10px 10px}.brand{font-size:9px}.top-actions .plain{font-size:11px;padding:5px 8px;min-height:38px}.float{right:0}.float-cargo{min-height:45px}.float-cargo .sprite-art{width:24px;height:26px}.float-cargo .ghost{height:21px;width:25px}.shelf-grid{gap:7px;padding:6px}.slot{height:clamp(44px,13.2vw,70px)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
.sprite-art{background-image:var(--sheet);background-repeat:no-repeat;background-size:var(--sheet-width) 300%;background-position:var(--sheet-x) var(--sheet-y)}

.shelf-grid.dense{grid-template-columns:repeat(3,minmax(0,1fr))}
.shelf-grid.dense .slot{height:clamp(49px,6.2vw,65px)}
.shelf-grid.dense .slot .sprite-art{max-width:60px}
@media(max-width:480px){
  .shelf-grid.dense{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .shelf-grid.dense .slot{height:46px}
  .shelf-grid.dense .slot .sprite-art{max-width:51px}
}
.shelf-zoom{min-height:37px;margin:0 0 7px;font-size:12px}
.shelf-grid.market-hall{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.shelf-grid.market-hall .slot{height:clamp(34px,6vw,48px)}
.shelf-grid.market-hall .shelf{padding:2px 2px 7px}
.shelf-grid.market-hall .shelf-note{font-size:7px}
.shelf-grid.market-hall.large-pieces{grid-template-columns:repeat(2,minmax(0,1fr))}
.shelf-grid.market-hall.large-pieces .slot{height:clamp(49px,9vw,66px)}
@media(max-width:480px){
  .shelf-grid.market-hall{padding:4px;gap:3px}
  .shelf-grid.market-hall .slots{gap:1px}
  .shelf-grid.market-hall .shelf{border-radius:4px}
}
