*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;font-family:'Trebuchet MS',system-ui,sans-serif;background:#ece8dc;color:#251339}body{display:flex;flex-direction:column}.shellbar{flex:0 0 auto;min-height:49px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 14px;background:#ffdc00;border-bottom:3px solid #241036}.brandlink{color:#241036;text-decoration:none;font-weight:1000;font-size:16px;white-space:nowrap}.context{display:inline-flex;align-items:center;gap:5px;background:#ffffffbb;border:1px solid #3c2d44;border-radius:20px;padding:4px 10px;font-size:11px;font-weight:900;white-space:nowrap;max-width:50vw;overflow:hidden;text-overflow:ellipsis}.actions{display:flex;gap:6px;align-items:center}.shell-btn{font-size:11px;font-weight:900;border:2px solid #251339;background:white;padding:8px 10px;border-radius:8px;color:#241036;white-space:nowrap;cursor:pointer}.shell-btn:hover{background:#f4e9ff}.frame-wrap{flex:1 1 auto;min-height:0;position:relative;background:#edf3df}.game-frame{border:0;display:block;width:100%;height:100%;background:#edf3df}.sync-status{position:absolute;right:12px;bottom:12px;background:#221532e9;border:1px solid #ba9bdb;border-radius:10px;max-width:min(420px,88vw);color:white;font:750 12px/1.4 system-ui;padding:9px 12px;z-index:11;box-shadow:0 6px 25px #22153240}.sync-status[hidden]{display:none}.shade{position:fixed;inset:0;z-index:99;background:#110c22ac;display:grid;place-items:center;padding:16px}.shade[hidden]{display:none}.modal{background:#fffdf7;border:3px solid #251239;box-shadow:7px 8px 0 #601f93;border-radius:16px;padding:20px;max-width:520px;width:100%;max-height:90dvh;overflow:auto}.modal h2{margin:0 0 10px;font-size:21px}.modal .small{font-size:12px;color:#806e86}.modal-bar{display:flex;justify-content:space-between;gap:10px;align-items:center}.periods{display:flex;gap:5px;margin:15px 0}.periods button{background:#efe9f7;color:#3b2053;border:1px solid #d9c7e5;border-radius:7px;padding:7px 9px;font-weight:900;cursor:pointer}.periods button[aria-pressed=true]{background:#5b00bb;color:white}.table{width:100%;border-collapse:collapse}.table td{padding:10px 6px;border-bottom:1px solid #e8d9ed}.table td:last-child{text-align:right;font-weight:900}.table tr:last-child td{border:0}.notice{margin:11px 0 0;background:#fff0cc;border-radius:8px;padding:10px;color:#68460c;font-size:12px}.empty{text-align:center;color:#82728b;padding:28px 8px}@media(max-width:570px){.shellbar{min-height:42px;padding:4px 7px;gap:5px}.brandlink{font-size:13px}.context{padding:4px 6px;max-width:37vw;font-size:9px}.shell-btn{font-size:10px;padding:6px 7px}.actions{gap:4px}}

/* Consistent site heart/wordmark in both game shells and game-scoreboard modal. */
.brandlink{display:flex;align-items:center;gap:5px;font-family:'Arial Black',Arial,sans-serif;letter-spacing:-.7px}.brandlink img{width:27px;height:27px;object-fit:contain}.brandlink b{color:#5b00bb}.brandlink small{font-size:.7em;color:#5b00bb}.modal-heading{display:flex;align-items:center;gap:12px}.modal-heading .modal-logo{object-fit:contain;width:84px;height:67px;flex:0 0 auto}.modal-heading h2{margin:0;font-size:19px}.modal-bar{align-items:center}
@media(max-width:570px){.brandlink img{height:22px;width:22px}.brandlink{font-size:12px}.modal-heading .modal-logo{width:65px;height:48px}.modal-heading h2{font-size:15px}}

/* Shared square-heart branding, scaled for narrow game headers. */
.brandlink img{padding:2px;background:#ed00ad;border:2px solid #251339;border-radius:8px;box-shadow:1px 2px 0 #251339;transform:rotate(-5deg)}

/* Header brand hotfix: stable single-line domain text, no separate heart icon. */
.shellbar .brandlink{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:flex-start;gap:0;min-width:0;max-width:100%;font:1000 clamp(15px,1.35vw,21px)/1.2 'Arial Black',Arial,system-ui,sans-serif;color:#5b00bb;letter-spacing:-.55px;white-space:nowrap}
.shellbar .brandlink span{display:block;color:inherit;font:inherit;letter-spacing:inherit}
.shellbar .brandlink:focus-visible{outline:3px solid #5b00bb;outline-offset:3px;border-radius:3px}
@media(max-width:590px){
 .shellbar{flex-wrap:wrap;column-gap:7px;row-gap:2px;justify-content:space-between;padding:5px 8px}
 .shellbar .brandlink{font-size:clamp(15px,4vw,18px);order:0}
 .shellbar .actions{order:1;margin-left:auto}
 .shellbar .context{order:2;flex:0 1 auto;max-width:100%;min-width:0;margin:0 auto;padding:1px 7px;line-height:1.2;font-size:9px}
}
@media(max-width:360px){.shellbar .brandlink{font-size:15px}.shellbar .shell-btn{font-size:9px;padding:5px 6px}.shellbar .context{font-size:8px}}

/* Ranked level reached, visible in both public and friends ranking overlays. */
.ranking-table{width:100%;table-layout:auto;border-collapse:collapse;font-variant-numeric:tabular-nums}
.ranking-table th{padding:11px 6px 8px;text-align:left;color:#776083;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;border-bottom:2px solid #e6d6ef}
.ranking-table th:last-child{text-align:right}
.ranking-table td{padding:12px 6px;vertical-align:middle;font-size:15px}
.ranking-table .ranking-place{width:13%;white-space:nowrap}
.ranking-table .ranking-player{font-weight:800;overflow-wrap:anywhere}
.ranking-table .ranking-level{font-weight:900;color:#4a1c6f;white-space:nowrap;width:20%}
.ranking-table .ranking-score{text-align:right;font-weight:900;white-space:nowrap;width:23%}
@media(max-width:400px){.modal{padding:12px}.ranking-table th{font-size:10px;letter-spacing:0;padding:8px 3px}.ranking-table td{font-size:12px;padding:10px 3px}.ranking-table .ranking-place{width:12%}.ranking-table .ranking-level{width:18%}.ranking-table .ranking-score{width:23%}}

/* Hide the header scoreboard shortcut on the initial pre-game welcome screen. */
.shellbar #scoreOpen[hidden]{display:none!important}


/* 2026-10-26: Welcome-screen rankings live in the shell header, beside a clearer Arcade link. */
.shellbar .actions{gap:9px;flex:0 0 auto}
.shellbar .shell-btn-rankings,.shellbar .shell-btn-back{
 display:inline-flex;align-items:center;justify-content:center;gap:7px;
 min-height:36px;padding:6px 13px;border:2px solid #251339;
 border-radius:10px;line-height:1.1;text-decoration:none;
 font-family:'Trebuchet MS',system-ui,sans-serif;font-size:12px;font-weight:1000;
 box-shadow:3px 3px 0 #251339;
 transition:transform .15s ease,box-shadow .15s ease,background .15s ease;
}
.shellbar .shell-btn-rankings{background:#fffdf5;color:#321449}
.shellbar .shell-btn-back{background:#b5f12b;color:#251339}
.shellbar .shell-btn-rankings:hover{background:#f3e5ff}
.shellbar .shell-btn-back:hover{background:#cdff54}
.shellbar .shell-btn-rankings:hover,.shellbar .shell-btn-back:hover{
 transform:translateY(-1px);box-shadow:3px 4px 0 #251339;
}
.shellbar .shell-btn-rankings:active,.shellbar .shell-btn-back:active{
 transform:translate(2px,2px);box-shadow:1px 1px 0 #251339;
}
.shellbar .shell-btn-rankings:focus-visible,.shellbar .shell-btn-back:focus-visible{
 outline:3px solid #5600c2;outline-offset:3px;
}
.shellbar .back-arrow{font-size:17px;line-height:.8;font-weight:1000}
@media(max-width:590px){
 .shellbar .actions{gap:6px}
 .shellbar .shell-btn-rankings,.shellbar .shell-btn-back{
  min-height:30px;padding:5px 8px;font-size:10px;border-radius:8px;gap:4px;box-shadow:2px 2px 0 #251339;
 }
 .shellbar .back-arrow{font-size:14px}
}
@media(max-width:360px){
 .shellbar .actions{gap:5px}
 .shellbar .shell-btn-rankings,.shellbar .shell-btn-back{padding:5px 6px;font-size:9px}
}

/* Public/Friends status: small, designed status badge rather than a browser-style label. */
.shellbar .context{
 order:0;display:inline-flex;align-items:center;justify-content:center;
 flex:0 1 auto;max-width:180px;min-height:30px;min-width:0;
 padding:5px 12px;gap:7px;border:2px solid #62358c;
 border-radius:999px;background:#f9ebff;color:#492168;
 font:900 10px/1.15 'Trebuchet MS',system-ui,sans-serif;
 letter-spacing:.45px;text-transform:uppercase;
 box-shadow:0 2px 0 #331447;white-space:nowrap;
}
.shellbar .context::before{content:"";width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#41c36b;box-shadow:0 0 0 2px #ddf9e8}
.shellbar .context[data-mode="friends"]{background:#e9f7d7;border-color:#4b7f39;color:#295735}
.shellbar .context[data-mode="friends"]::before{background:#7745bd;box-shadow:0 0 0 2px #eadcfb}
.shellbar .context[data-mode="invalid"]{background:#fff3e0;border-color:#9d6330;color:#744011}
.shellbar .context[data-mode="invalid"]::before{background:#f7a832;box-shadow:0 0 0 2px #fff5e0}
@media(max-width:590px){
 .shellbar{flex-wrap:nowrap;min-height:45px;gap:5px;padding:5px 7px}
 .shellbar .brandlink{order:0;flex:0 1 auto;font-size:clamp(12px,3.5vw,16px);min-width:0}
 .shellbar .actions{order:2;flex:0 0 auto;gap:5px;margin-left:0}
 .shellbar .context{order:1;margin:0 auto;min-height:27px;padding:4px 8px;font-size:8px;letter-spacing:0;max-width:110px}
 .shellbar .context::before{width:6px;height:6px;flex-basis:6px}
 .shellbar .shell-btn-rankings,.shellbar .shell-btn-back{min-height:29px;font-size:9px;padding:4px 6px;gap:3px}
}
@media(max-width:380px){
 .shellbar .brandlink{font-size:12px}
 .shellbar .context{padding:4px 6px;font-size:0;min-width:49px}
 .shellbar .context::after{content:attr(data-short-label);font-size:9px;letter-spacing:0}
 .shellbar .actions{gap:3px}
 .shellbar .shell-btn-rankings,.shellbar .shell-btn-back{padding:4px 5px;font-size:9px}
}
/* During phone gameplay, reclaim the game shell header; pause reveals it again. */
@media(max-width:600px) and (orientation:portrait){
 body.mobile-playing .shellbar{display:none!important}
}


/* Small-phone challenge context: show one complete word instead of a clipped title.
   Keep longer, descriptive names on desktop and tablet. */
@media (max-width:600px){
  .shellbar .context{
    flex:0 0 auto;max-width:none;min-width:0;
    padding:4px 8px;font-size:0!important;letter-spacing:0;
    overflow:visible;white-space:nowrap;
  }
  .shellbar .context::after{
    content:attr(data-short-label);display:inline-block;
    font:900 10px/1.15 'Trebuchet MS',system-ui,sans-serif;
    text-transform:none;letter-spacing:.15px;
  }
}
@media (max-width:355px){
  .shellbar{padding-left:4px;padding-right:4px;gap:3px}
  .shellbar .brandlink{font-size:clamp(10px,3vw,12px)}
  .shellbar .context{padding:4px 5px;min-width:0}
  .shellbar .context::after{font-size:9px}
  .shellbar .actions{gap:3px}
  .shellbar .shell-btn-rankings,.shellbar .shell-btn-back{padding:4px 4px;font-size:8.5px}
}
