body[data-game="world-loop"] .board-panel{overflow:visible;border:0;background:transparent;box-shadow:none;border-radius:0}
body[data-game="world-loop"] .board-toolbar{display:none!important}
body[data-game="world-loop"] .game-board{max-width:none;width:100%;padding:0;background:transparent}
body[data-game="world-loop"] .board-feedback{max-width:100%}
body[data-game="world-loop"] .difficulty-reward,body[data-game="world-loop"] .daily-reward{display:none!important}
body[data-game="world-loop"] .left-panel .control-stack{display:none!important}
.world-loop-app{--wl-accent:#8a7dff;--wl-accent2:#45e1b5;--wl-lanes:8;--wl-racer-size:42px;display:grid;gap:7px;width:100%;min-width:0}
.world-loop-racebar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 2px}.world-loop-title{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:2px 9px;flex-shrink:0}.world-loop-title strong{font-size:15px}.world-loop-title small{grid-column:2;color:var(--muted);font-size:10px;white-space:nowrap}.world-loop-title small:empty{display:none}
.world-loop-live{display:inline-flex;align-items:center;gap:5px;color:#ff708d;font-size:9px;font-weight:950;letter-spacing:.13em}.world-loop-live i{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 11px currentColor;animation:wlPulse 1.3s ease-in-out infinite}
.world-loop-race-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.world-loop-audio-controls{display:flex;align-items:center;gap:4px}.world-loop-audio-controls .world-loop-sound-toggle{min-width:82px}.world-loop-audio-controls .world-loop-sound-mute{min-width:34px;padding-left:7px;padding-right:7px}.world-loop-volume{display:flex;align-items:center;gap:4px;padding:0 2px}.world-loop-volume input{width:72px;accent-color:var(--wl-accent2);cursor:pointer}.world-loop-volume input:disabled{cursor:default;opacity:.4}.world-loop-volume span{min-width:28px;color:var(--muted);font-size:7px;font-weight:800;text-align:right}.world-loop-race-actions button,.world-loop-pick-head button{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:inherit;border-radius:9px;padding:7px 10px;font:inherit;font-size:10px;font-weight:800;cursor:pointer}.world-loop-race-actions button:hover,.world-loop-pick-head button:hover{border-color:rgba(255,255,255,.24);background:rgba(255,255,255,.085)}.world-loop-race-actions button:disabled{opacity:.38;cursor:default}.world-loop-race-actions .world-loop-fullscreen{border-color:color-mix(in srgb,var(--wl-accent) 42%,rgba(255,255,255,.12));background:color-mix(in srgb,var(--wl-accent) 11%,rgba(255,255,255,.04))}
.world-loop-orderbar{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:7px;min-width:0;padding:5px 7px;border:1px solid rgba(255,255,255,.08);border-radius:13px;background:rgba(255,255,255,.025)}.world-loop-order-label{display:grid;min-width:88px}.world-loop-order-label span{font-size:8px;font-weight:950;letter-spacing:.1em}.world-loop-order-label small{font-size:7px;color:var(--wl-accent2);font-weight:850}
.world-loop-orderbar ol{display:flex;gap:5px;min-width:0;margin:0;padding:0;overflow-x:auto;list-style:none;scrollbar-width:none}.world-loop-orderbar ol::-webkit-scrollbar{display:none}.world-loop-orderbar li{display:grid;grid-template-columns:14px 20px auto auto;align-items:center;gap:4px;flex:0 0 auto;min-width:94px;padding:5px 7px;border:1px solid transparent;border-radius:9px;background:rgba(255,255,255,.025)}.world-loop-orderbar li.leader{border-color:color-mix(in srgb,var(--wl-accent2) 45%,transparent);background:color-mix(in srgb,var(--wl-accent) 12%,transparent)}.world-loop-orderbar li b{font-size:8px;color:var(--muted)}.world-loop-orderbar li span{font-size:16px}.world-loop-orderbar li strong{font-size:9px}.world-loop-orderbar li small{font-size:7px;color:var(--muted)}.world-loop-orderbar li.more{grid-template-columns:18px auto auto;min-width:78px;border:1px dashed rgba(255,255,255,.11);background:rgba(255,255,255,.018)}.world-loop-orderbar li.more b{font-size:13px}.world-loop-orderbar li.more strong{font-size:9px}.world-loop-orderbar li.more small{font-size:7px}
.world-loop-viewport{position:relative;height:clamp(350px,40vw,500px);min-height:350px;border:1px solid rgba(255,255,255,.075);border-radius:20px;overflow:hidden;background:#111722;box-shadow:inset 0 0 70px rgba(0,0,0,.28)}.world-loop-track-top{position:absolute;left:8px;right:8px;top:8px;height:36px;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 13px;border-bottom:1px solid rgba(255,255,255,.055);border-radius:13px 13px 0 0;background:linear-gradient(90deg,rgba(138,125,255,.11),rgba(69,225,181,.05))}.world-loop-track-top>div:first-child{display:grid}.world-loop-track-top span{font-size:9px;font-weight:950;letter-spacing:.11em}.world-loop-track-top small{font-size:8px;color:var(--muted)}.world-loop-wake{font-size:7px;font-weight:950;letter-spacing:.11em;color:var(--wl-accent2)}
.world-loop-lanes{position:absolute;left:8px;right:8px;top:44px;bottom:8px;display:grid;grid-template-rows:repeat(var(--wl-lanes),minmax(0,1fr));overflow:hidden;border-radius:0 0 13px 13px;background-color:#303742;background-image:repeating-linear-gradient(90deg,transparent 0 86px,rgba(220,230,246,.032) 86px 88px,transparent 88px 96px);background-size:96px 100%;background-repeat:repeat;will-change:background-position}
.world-loop-lane{position:relative;min-height:0;border-bottom:1px solid rgba(214,224,242,.14)}.world-loop-lane:nth-child(odd){background:rgba(255,255,255,.014)}.world-loop-lane:nth-child(even){background:rgba(8,14,24,.055)}.world-loop-lane:last-child{border-bottom:0}.world-loop-lane-watermark{position:absolute;left:16%;right:6%;top:50%;z-index:1;transform:translateY(-50%);pointer-events:none;user-select:none;text-align:center;white-space:nowrap;font-size:clamp(18px,1.8vw,28px);font-weight:900;letter-spacing:.035em;color:rgba(255,255,255,.065)}.world-loop-lane:before{content:"";position:absolute;left:12.4%;right:4%;top:50%;border-top:1px dashed rgba(220,230,246,.07)}.world-loop-lane:after{content:"→";position:absolute;right:1.1%;top:50%;transform:translateY(-50%);color:rgba(220,230,246,.13);font-size:20px;font-weight:900}
.world-loop-lane-label{position:absolute;left:1.2%;top:50%;z-index:2;transform:translateY(-50%);display:grid;grid-template-columns:auto auto;align-items:center;gap:0 5px;width:10.5%;min-width:58px}.world-loop-lane-label span{grid-row:1/3;font-size:20px}.world-loop-lane-label b{font-size:9px}.world-loop-lane-label small{font-size:7px;color:var(--muted)}
.world-loop-racer{position:absolute;left:13%;top:50%;z-index:3;transform:translate(-50%,-50%);display:flex;align-items:center;gap:2px;will-change:left;filter:drop-shadow(0 4px 5px rgba(0,0,0,.35))}.world-loop-mascot{display:inline-block;font-size:var(--wl-racer-size);line-height:1}.world-loop-mascot--face-right{transform:scaleX(-1);transform-origin:center}.world-loop-racer-flag{display:grid;place-items:center;min-width:calc(var(--wl-racer-size)*.72);height:calc(var(--wl-racer-size)*.48);margin-left:calc(var(--wl-racer-size)*-.19);border:1px solid rgba(255,255,255,.65);border-radius:4px;background:#10151f;font-size:calc(var(--wl-racer-size)*.38);box-shadow:0 2px 5px rgba(0,0,0,.35)}
.world-loop-setup{position:absolute;inset:0;z-index:10;display:grid;place-items:start center;padding:52px 8px 8px;background:linear-gradient(180deg,rgba(7,10,17,.55),rgba(7,10,17,.9));backdrop-filter:blur(7px)}.world-loop-setup[hidden]{display:none}.world-loop-setup-card{position:relative;width:min(720px,98%);overflow:visible;padding:12px;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(11,16,29,.97);box-shadow:0 22px 70px rgba(0,0,0,.5)}.world-loop-setup-card h2{margin:0 0 8px;font-size:19px}
.world-loop-pick-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}.world-loop-pick-head>div{display:flex;gap:6px}.world-loop-pick-head strong{font-size:10px}
.world-loop-selected{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;min-height:36px;margin-bottom:7px}.world-loop-selected:empty{display:flex}.world-loop-selected:empty:before{content:"No countries selected yet.";display:flex;align-items:center;color:var(--muted);font-size:9px}
.world-loop-selected-chip{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:5px;width:100%;min-width:0;min-height:34px;padding:5px 7px;border:1px solid rgba(255,255,255,.10);border-radius:9px;background:rgba(255,255,255,.04);color:inherit;cursor:pointer}.world-loop-selected-chip span{font-size:17px}.world-loop-selected-chip strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px}.world-loop-selected-chip i{font-style:normal;color:var(--muted);font-size:12px}
.world-loop-country-picker{position:relative}.world-loop-country-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:38px;padding:7px 10px;border:1px solid rgba(255,255,255,.11);border-radius:10px;background:rgba(255,255,255,.035);color:inherit;font:inherit;cursor:pointer}.world-loop-country-trigger b{font-size:10px}.world-loop-country-trigger span{font-size:8px;color:var(--muted)}.world-loop-country-trigger:disabled{opacity:.45;cursor:default}
.world-loop-country-menu{position:absolute;left:0;right:0;top:auto;bottom:calc(100% + 6px);z-index:30;box-sizing:border-box;max-height:172px;padding:7px;border:1px solid rgba(255,255,255,.13);border-radius:12px;background:#0d1320;box-shadow:0 18px 50px rgba(0,0,0,.52)}.world-loop-country-menu[hidden]{display:none}.world-loop-country-menu input{box-sizing:border-box;width:100%;height:36px;margin-bottom:6px;padding:0 10px;border:1px solid rgba(255,255,255,.12);border-radius:9px;outline:none;background:#151d2b;color:#f5f7ff;font:inherit;font-size:10px}.world-loop-country-menu input:focus{border-color:var(--wl-accent)}
.world-loop-country-options{display:grid;gap:3px;max-height:118px;overflow-y:auto;overscroll-behavior:contain}.world-loop-country-option{display:grid;grid-template-columns:24px minmax(0,1fr) 28px 18px;align-items:center;gap:6px;width:100%;min-height:34px;padding:5px 7px;border:1px solid transparent;border-radius:8px;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}.world-loop-country-option:hover{background:rgba(255,255,255,.055)}.world-loop-country-option.selected{border-color:color-mix(in srgb,var(--wl-accent) 42%,transparent);background:color-mix(in srgb,var(--wl-accent) 10%,transparent)}.world-loop-country-option>span{font-size:17px}.world-loop-country-option strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px}.world-loop-country-option small{font-size:7px;color:var(--muted);text-align:right}.world-loop-country-option i{font-style:normal;color:var(--wl-accent2);text-align:center}.world-loop-country-empty{padding:12px;text-align:center;color:var(--muted);font-size:9px}
.world-loop-start{width:100%;margin-top:7px;border:0;border-radius:10px;padding:9px 12px;background:linear-gradient(135deg,var(--wl-accent),var(--wl-accent2));color:#071019;font:inherit;font-size:10px;font-weight:950;cursor:pointer}.world-loop-start:disabled{opacity:.4;cursor:not-allowed}
.world-loop-story-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px}.world-loop-story-grid article{min-width:0;padding:7px 9px;border:1px solid rgba(255,255,255,.075);border-radius:12px;background:rgba(255,255,255,.025)}.world-loop-story-grid article>span{display:block;margin-bottom:3px;color:var(--muted);font-size:7px;font-weight:900;letter-spacing:.1em}.world-loop-story-grid article>strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.world-loop-story-grid article>small{display:block;margin-top:2px;color:var(--muted);font-size:7px}
.world-loop-app:fullscreen,.world-loop-app.is-fullscreen{box-sizing:border-box;width:100vw;height:100vh;max-width:none;padding:10px 13px;background:#070a12;grid-template-rows:auto auto minmax(0,1fr) auto;gap:7px;overflow:hidden}.world-loop-app:fullscreen .world-loop-viewport,.world-loop-app.is-fullscreen .world-loop-viewport{height:100%;min-height:0}.world-loop-app:fullscreen .world-loop-story-grid article,.world-loop-app.is-fullscreen .world-loop-story-grid article{padding:7px 9px}.world-loop-app:fullscreen .world-loop-racebar,.world-loop-app.is-fullscreen .world-loop-racebar{padding:0}
@keyframes wlPulse{50%{opacity:.38;transform:scale(.76)}}
@media(max-width:900px){.world-loop-volume input{width:58px}.world-loop-volume span{display:none}.world-loop-selected{grid-template-columns:repeat(4,minmax(0,1fr))}.world-loop-country-options{max-height:112px}.world-loop-viewport{height:clamp(390px,58vw,500px)}}
@media(max-width:680px){.world-loop-audio-controls{order:3;width:100%;justify-content:flex-end}.world-loop-volume input{width:64px}body[data-game="world-loop"] .game-layout{display:block}body[data-game="world-loop"] .board-panel{margin-top:12px}.world-loop-racebar{align-items:flex-start}.world-loop-title small{display:none}.world-loop-race-actions{max-width:230px}.world-loop-race-actions button{padding:6px 7px}.world-loop-orderbar{grid-template-columns:1fr;gap:5px}.world-loop-order-label{display:flex;justify-content:space-between;min-width:0}.world-loop-orderbar li{min-width:88px}.world-loop-viewport{height:500px}.world-loop-lane-label{width:12%;left:.8%}.world-loop-lane-label span{font-size:17px}.world-loop-selected{grid-template-columns:repeat(2,minmax(0,1fr))}.world-loop-country-options{max-height:104px}.world-loop-story-grid{grid-template-columns:1fr}.world-loop-story-grid article{padding:8px 9px}}
@media(max-width:460px){.world-loop-race-actions{max-width:180px}.world-loop-setup-card{padding:10px}.world-loop-country-menu{left:-2px;right:-2px;max-height:158px}.world-loop-country-options{max-height:96px}.world-loop-race-actions button{font-size:9px}.world-loop-viewport{height:520px}.world-loop-track-top{padding:0 8px}.world-loop-track-top small{display:none}.world-loop-lane-label b{font-size:8px}.world-loop-lane-label small{font-size:6px}.world-loop-lane-label span{font-size:15px}.world-loop-orderbar li{min-width:82px;padding:4px 6px}.world-loop-orderbar li span{font-size:14px}}
@media(prefers-reduced-motion:reduce){.world-loop-live i{animation:none}}

/* Compact layouts: readable touch targets and a race toolbar that wraps rather
   than forcing horizontal page scrolling on narrow mobile screens. */
@media(max-width:680px){
  .world-loop-race-actions button,.world-loop-start,
  .world-loop-country-trigger,.world-loop-selected-chip,
  .world-loop-country-option,.world-loop-pick-head button{min-height:44px}
  .world-loop-racebar{flex-wrap:wrap}
  .world-loop-race-actions{flex:1 1 100%;max-width:none;justify-content:flex-start}
  .world-loop-audio-controls{justify-content:flex-start}
  .world-loop-viewport{max-width:100%}
}
@media(max-width:460px){
  .world-loop-title{flex:1 1 auto;min-width:0}
  .world-loop-race-actions{max-width:none}
  .world-loop-country-options{max-height:120px}
  .world-loop-story-grid{min-width:0}
}


/* Ambient screensaver layout: keep the entire race in one immersive column. */
body[data-game="world-loop"] .game-layout.world-loop-layout,
body[data-game="world-loop"] .game-hero.world-loop-hero{
  /* Mirror .footer-inner: a 1280px outer container with 24px gutters. */
  width:100%;
  max-width:1280px;
  padding-inline:24px;
  margin-left:auto;
  margin-right:auto;
}
body[data-game="world-loop"] .game-layout.world-loop-layout{
  display:block;
  grid-template-columns:none;
  gap:0;
}
body[data-game="world-loop"] .world-loop-panel{
  width:100%;
  padding:0;
  margin:0;
  background:transparent;
  border:0;
  box-shadow:none;
  min-width:0;
}
body[data-game="world-loop"] .game-hero.world-loop-hero{padding-block:26px 18px}
body[data-game="world-loop"] .game-hero.world-loop-hero h1{
  font-size:clamp(25px,3.2vw,43px);
  margin:7px 0 10px;
}
body[data-game="world-loop"] .game-hero.world-loop-hero p{font-size:14px}
body[data-game="world-loop"] .game-hero.world-loop-hero .hero-pills{margin-top:12px}
body[data-game="world-loop"] .world-loop-viewport{height:clamp(540px,72vh,940px)}
/* Pace presets live next to the race toolbar, not in a puzzle sidebar. */
.world-loop-racebar{flex-wrap:wrap;column-gap:12px;row-gap:9px}
.world-loop-pace{
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:3px;
  border:1px solid rgba(132,153,205,.26);
  border-radius:12px;
  background:#10182a;
  flex:0 0 auto;
}
.world-loop-pace button{
  min-height:38px;
  min-width:72px;
  padding:7px 12px;
  border:1px solid transparent;
  border-radius:9px;
  color:#aebbd8;
  background:transparent;
  font:inherit;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.world-loop-pace button:hover{color:white;background:rgba(255,255,255,.07)}
.world-loop-pace button.active,
.world-loop-pace button[aria-pressed="true"]{
  border-color:rgba(150,132,255,.7);
  background:rgba(124,105,240,.24);
  color:#fff;
  box-shadow:inset 0 -2px 0 #8c76ff;
}
.world-loop-pace button:focus-visible{outline:3px solid #9bdfff;outline-offset:2px}
.world-loop-race-actions{flex:1 1 470px;justify-content:flex-end}
.world-loop-race-actions .world-loop-sound-toggle[aria-pressed="true"]{
  border-color:rgba(69,225,181,.6);
  background:rgba(69,225,181,.13);
}
@media(max-width:900px){
  body[data-game="world-loop"] .world-loop-viewport{height:clamp(510px,68vh,780px)}
  .world-loop-race-actions{flex:1 1 100%;justify-content:flex-start}
}
@media(max-width:680px){
  body[data-game="world-loop"] .game-layout.world-loop-layout,
  body[data-game="world-loop"] .game-hero.world-loop-hero{
    padding-inline:16px;
  }
  body[data-game="world-loop"] .game-hero.world-loop-hero{padding-block:24px 14px}
  body[data-game="world-loop"] .world-loop-viewport{height:clamp(510px,75vh,760px)}
  .world-loop-pace{order:1;width:100%;justify-content:center;box-sizing:border-box}
  .world-loop-pace button{flex:1;min-height:44px;min-width:0}
  .world-loop-race-actions{order:2;flex:1 1 100%;max-width:none;justify-content:flex-start}
  .world-loop-audio-controls{width:auto;order:0;justify-content:flex-start}
}
@media(max-width:460px){
  .world-loop-race-actions{max-width:none;gap:5px}
  .world-loop-race-actions button{font-size:10px}
  .world-loop-pace button{padding:7px 6px}
}


/* Controls stay in stable groups when pace, pause state, or audio state changes. */
.world-loop-race-actions{
  display:flex;
  flex:1 1 auto;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  gap:8px;
  min-width:0;
}
.world-loop-session-controls{
  display:flex;
  flex:0 0 auto;
  align-items:center;
  gap:6px;
  min-width:0;
}
.world-loop-session-controls > button{
  flex:0 0 72px;
  min-width:72px;
  white-space:nowrap;
}
.world-loop-session-controls .world-loop-pace{
  order:0;
  display:flex;
  flex:0 0 auto;
  width:auto;
  min-width:0;
  margin-right:5px;
}
.world-loop-session-controls .world-loop-pace button{
  flex:0 0 76px;
  min-width:76px;
}
.world-loop-audio-controls{
  flex:0 0 auto;
  width:auto;
  order:0;
  flex-wrap:nowrap;
  justify-content:flex-start;
  white-space:nowrap;
}
.world-loop-audio-controls .world-loop-sound-toggle{
  flex:0 0 110px;
  width:110px;
  min-width:110px;
  white-space:nowrap;
}
.world-loop-volume span{
  flex:0 0 34px;
  min-width:34px;
  font-variant-numeric:tabular-nums;
}
.world-loop-race-actions .world-loop-fullscreen{
  flex:0 0 140px;
  width:140px;
  white-space:nowrap;
}

/* Never size leaderboard cards from changing flags, leaders or metre values. */
.world-loop-orderbar{grid-template-columns:132px minmax(0,1fr)}
.world-loop-order-label{width:132px;min-width:132px}
.world-loop-order-label small{
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.world-loop-orderbar ol{align-items:stretch}
.world-loop-orderbar li{
  box-sizing:border-box;
  flex:0 0 166px;
  width:166px;
  min-width:166px;
  max-width:166px;
  grid-template-columns:12px 24px 24px minmax(0,1fr);
  font-variant-numeric:tabular-nums;
}
.world-loop-orderbar li > span{
  display:block;
  width:24px;
  min-width:24px;
  text-align:center;
  overflow:hidden;
}
.world-loop-orderbar li > strong{display:block;min-width:24px;white-space:nowrap}
.world-loop-orderbar li > small{
  display:block;
  min-width:0;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
}
.world-loop-orderbar li.more{
  box-sizing:border-box;
  flex:0 0 98px;
  width:98px;
  min-width:98px;
  max-width:98px;
  grid-template-columns:18px 25px 1fr;
}
.world-loop-title small,.world-loop-lane-label small,
.world-loop-story-grid article>strong{font-variant-numeric:tabular-nums}

/* Responsive: wrap whole control groups rather than reshuffling buttons. */
@media(max-width:1170px){
  .world-loop-racebar{flex-wrap:wrap}
  .world-loop-race-actions{
    flex:1 1 100%;
    max-width:none;
    justify-content:flex-start;
    flex-wrap:wrap;
  }
}
@media(max-width:680px){
  .world-loop-session-controls{
    order:0;
    width:100%;
    flex:1 1 100%;
    flex-wrap:wrap;
  }
  .world-loop-session-controls .world-loop-pace{
    order:0;
    width:auto;
    flex:0 0 auto;
    justify-content:flex-start;
  }
  .world-loop-session-controls .world-loop-pace button{
    flex:0 0 auto;
    min-width:64px;
    min-height:44px;
    padding-inline:8px;
  }
  .world-loop-session-controls > button{
    flex:0 0 72px;
    min-height:44px;
  }
  .world-loop-race-actions{order:0;gap:7px}
  .world-loop-audio-controls{order:0;width:auto;justify-content:flex-start}
  .world-loop-orderbar{grid-template-columns:minmax(0,1fr)}
  .world-loop-order-label{width:100%;min-width:0}
  .world-loop-orderbar li{min-width:166px}
}


/* Leader changes and growing metre counts must not change toolbar geometry. */
.world-loop-title{flex:0 0 240px;width:240px;min-width:0}
.world-loop-title small{
  width:100%;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media(max-width:680px){
  .world-loop-title{flex:1 1 100%;width:100%;max-width:100%}
}


/* Roomy country selection overlay: the ambient race has enough horizontal
   space for readable, full country names instead of six tiny chips per row. */
.world-loop-setup{
  padding:clamp(18px,4vh,42px) 16px 16px;
  overflow-y:auto;
  overscroll-behavior:contain;
}
.world-loop-setup-card{
  width:min(1020px,100%);
  max-width:100%;
  padding:24px;
  border-radius:20px;
}
.world-loop-setup-card h2{
  margin-bottom:16px;
  font-size:clamp(20px,2vw,25px);
}
.world-loop-pick-head{gap:14px;margin-bottom:14px}
.world-loop-pick-head strong{font-size:13px}
.world-loop-pick-head>div{gap:9px}
.world-loop-pick-head button{min-height:40px;padding:9px 14px;font-size:12px}
.world-loop-selected{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  min-height:50px;
  margin-bottom:14px;
}
.world-loop-selected-chip{
  min-height:50px;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
}
.world-loop-selected-chip span{font-size:22px}
.world-loop-selected-chip strong{font-size:12px;font-weight:750}
.world-loop-selected-chip i{font-size:16px}
.world-loop-country-trigger{
  min-height:52px;
  padding:11px 16px;
  border-radius:12px;
}
.world-loop-country-trigger b{font-size:13px}
.world-loop-country-trigger span{font-size:11px}
.world-loop-country-menu{
  display:flex;
  flex-direction:column;
  top:calc(100% + 8px);
  bottom:auto;
  max-height:320px;
  padding:11px;
  border-radius:14px;
}
.world-loop-country-menu.open-up{
  top:auto;
  bottom:calc(100% + 8px);
}
.world-loop-country-menu input{
  flex:0 0 auto;
  height:45px;
  margin-bottom:9px;
  padding-inline:13px;
  font-size:13px;
}
.world-loop-country-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px 9px;
  flex:1 1 auto;
  min-height:0;
  max-height:255px;
}
.world-loop-country-option{
  grid-template-columns:28px minmax(0,1fr) 30px 20px;
  gap:9px;
  min-height:46px;
  padding:9px 11px;
  border-radius:10px;
}
.world-loop-country-option>span{font-size:21px}
.world-loop-country-option strong{font-size:12px}
.world-loop-country-option small{font-size:10px}
.world-loop-start{
  min-height:52px;
  margin-top:14px;
  padding:12px 16px;
  border-radius:12px;
  font-size:13px;
}
@media(max-width:950px){
  .world-loop-setup-card{padding:20px}
  .world-loop-selected{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:680px){
  .world-loop-setup{padding:16px 10px;overflow-y:auto}
  .world-loop-setup-card{padding:16px;border-radius:16px}
  .world-loop-setup-card h2{margin-bottom:11px;font-size:20px}
  .world-loop-selected{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    max-height:238px;
    overflow-y:auto;
    margin-bottom:11px;
  }
  .world-loop-selected-chip{min-height:46px;padding:8px 9px;gap:7px}
  .world-loop-selected-chip strong{font-size:11px}
  .world-loop-selected-chip span{font-size:19px}
  .world-loop-country-options{grid-template-columns:1fr;max-height:200px}
  .world-loop-country-menu{max-height:270px;padding:9px}
  .world-loop-country-menu input{height:43px;font-size:12px}
  .world-loop-country-option{min-height:44px}
  .world-loop-country-trigger{min-height:48px;padding:10px 12px}
  .world-loop-start{min-height:48px;margin-top:11px}
  .world-loop-pick-head strong{font-size:11px}
  .world-loop-pick-head button{min-height:40px;padding:7px 10px;font-size:11px}
}
@media(max-width:360px){
  .world-loop-setup{padding:12px 8px}
  .world-loop-setup-card{padding:12px}
  .world-loop-pick-head{flex-wrap:wrap}
  .world-loop-selected{grid-template-columns:1fr;max-height:215px}
  .world-loop-selected-chip strong{font-size:12px}
}


/* Unified Loop toolbar: use Aquarium's filled segmented-control interaction,
   with theme-specific accent tokens (World blue, Animal green). */
.world-loop-app[data-race-theme="flag"]{
  --wl-pace-from:#2153a2;
  --wl-pace-to:#397be8;
  --wl-pace-border:rgba(119,177,255,.55);
}
.world-loop-app[data-race-theme="animal"]{
  --wl-pace-from:#126855;
  --wl-pace-to:#259f78;
  --wl-pace-border:rgba(96,236,183,.55);
}
.world-loop-app .world-loop-pace{
  border-radius:13px;
  background:rgba(8,20,30,.72);
  border-color:color-mix(in srgb,var(--wl-accent) 28%,transparent);
}
.world-loop-app .world-loop-pace button{
  border-radius:9px;
  min-height:38px;
  transition:background .18s ease,color .18s ease,box-shadow .18s ease;
}
.world-loop-app .world-loop-pace button:hover:not(:disabled):not([aria-pressed="true"]){
  color:#fff;
  background:color-mix(in srgb,var(--wl-accent) 14%,transparent);
}
.world-loop-app .world-loop-pace button.active,
.world-loop-app .world-loop-pace button[aria-pressed="true"],
.world-loop-app .world-loop-pace button[aria-pressed="true"]:hover:not(:disabled){
  background:linear-gradient(135deg,var(--wl-pace-from,#2153a2),var(--wl-pace-to,#397be8));
  border-color:var(--wl-pace-border,rgba(119,177,255,.55));
  color:#fff;
  box-shadow:0 2px 10px rgba(3,13,31,.35);
}
.world-loop-app .world-loop-race-actions button:hover:not(:disabled),
.world-loop-app .world-loop-pick-head button:hover:not(:disabled){
  border-color:color-mix(in srgb,var(--wl-accent) 58%,rgba(255,255,255,.12));
  background:color-mix(in srgb,var(--wl-accent) 14%,rgba(255,255,255,.04));
  color:#fff;
}
.world-loop-app .world-loop-start:not(:disabled){
  color:#071b20;
  background:linear-gradient(110deg,var(--wl-accent),var(--wl-accent2));
  border:1px solid transparent;
  box-shadow:0 4px 16px rgba(0,0,0,.17);
}
.world-loop-app .world-loop-start:hover:not(:disabled){
  color:#071b20;
  background:linear-gradient(110deg,color-mix(in srgb,var(--wl-accent) 76%,white),color-mix(in srgb,var(--wl-accent2) 77%,white));
  border-color:rgba(255,255,255,.55);
  box-shadow:0 7px 24px rgba(0,0,0,.22);
  transform:translateY(-1px);
}
.world-loop-app .world-loop-start:active:not(:disabled){transform:translateY(0)}
.world-loop-app .world-loop-start:disabled{opacity:.42;cursor:not-allowed}
.world-loop-app .world-loop-race-actions button:focus-visible,
.world-loop-app .world-loop-pick-head button:focus-visible,
.world-loop-app .world-loop-start:focus-visible,
.world-loop-app .world-loop-selected-chip:focus-visible,
.world-loop-app .world-loop-country-option:focus-visible{
  outline:3px solid color-mix(in srgb,var(--wl-accent) 70%,white);
  outline-offset:2px;
}
@media(prefers-reduced-motion:reduce){
  .world-loop-app .world-loop-pace button{transition:none}
  .world-loop-app .world-loop-start:hover:not(:disabled){transform:none}
}


/* Loop chooser typography matches Aquarium; specific compact layout settings
   remain theme-specific to prevent crowding. */
.world-loop-app .world-loop-setup-card{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-synthesis:none;
}
.world-loop-app .world-loop-setup-card h2{
  font-size:21px;font-weight:850;line-height:1.2;letter-spacing:-.025em;
}
.world-loop-app .world-loop-pick-head strong{
  font-size:12px;font-weight:800;line-height:1.3;
}
.world-loop-app .world-loop-pick-head button{
  font-family:inherit;font-size:12px;font-weight:800;line-height:1.2;
}
.world-loop-app .world-loop-selected-chip strong,
.world-loop-app .world-loop-country-option strong{
  font-family:inherit;font-size:11px;font-weight:800;line-height:1.25;
  letter-spacing:0;
}
.world-loop-app .world-loop-selected-chip,
.world-loop-app .world-loop-country-option{font-family:inherit}
.world-loop-app .world-loop-country-menu input{
  font-family:inherit;font-size:12px;font-weight:450;line-height:1.3;
}
.world-loop-app .world-loop-start{
  font-family:inherit;font-size:13px;font-weight:850;line-height:1.3;
  letter-spacing:0;
}
@media(max-width:680px){
  .world-loop-app .world-loop-setup-card h2{font-size:17px}
  .world-loop-app .world-loop-pick-head strong,
  .world-loop-app .world-loop-pick-head button{font-size:10px}
  .world-loop-app .world-loop-selected-chip strong,
  .world-loop-app .world-loop-country-option strong{font-size:10px}
  .world-loop-app .world-loop-country-menu input{font-size:11px}
  .world-loop-app .world-loop-start{font-size:12px}
}
