/* Load after mobile-layout.css. No fixed caps on provider creative content. */
/* Six side reservations; supplied creatives may grow each slot in normal flow. */
.site-layout>.ad-rail{
  --ad-tall:clamp(100px,calc((100dvh - 180px)/3),240px);
  --ad-short:var(--ad-tall);
  gap:12px;
}
.site-layout>.ad-rail>.ad-slot{
  --ad-reserved-height:var(--ad-tall);
  min-width:0;min-height:var(--ad-reserved-height);height:auto;
  overflow:visible;
}
/* Empty viewport preview only. Real fixed ads use the provider-owned Auto anchor. */
html{--ad-preview-height:clamp(50px,10dvh,90px);--ad-bottom-space:calc(var(--ad-preview-height) + 12px + env(safe-area-inset-bottom,0px));scroll-padding-bottom:calc(var(--ad-bottom-space) + 16px)}
body{padding-bottom:var(--ad-bottom-space)}
html.ad-preview-collapsed{--ad-bottom-space:calc(44px + env(safe-area-inset-bottom,0px))}
html.ads-enabled,html:has(dialog[open]){--ad-bottom-space:0px}
.ad-bottom{
  position:fixed;z-index:80;inset-inline:0;bottom:0;min-width:0;
  padding:6px 52px calc(6px + env(safe-area-inset-bottom,0px));
  background:#FFFFFFF5;border-top:1px solid #C6DCF6;box-shadow:0 -4px 20px #174BB815;
}
.ad-bottom>.ad-slot{
  inline-size:min(100%,970px);height:var(--ad-preview-height);min-height:0;margin-inline:auto;
  background:#EEF5FF;border:1px solid #D4E4F7;border-radius:6px;
}
.ad-bottom>.ad-slot>span{top:50%;transform:translateY(-50%);color:#52728C;font-size:9px;letter-spacing:1.8px}
.ad-bottom-control,.ad-bottom-tab{display:flex;align-items:center;justify-content:center;min-height:44px;border:1px solid #C6DCF6;background:#FFFFFF;color:#2563EB;border-radius:9px;box-shadow:0 2px 5px #174BB80C}
.ad-bottom-control{position:absolute;inset-inline-end:4px;top:6px;width:44px;padding:10px}
.ad-bottom-tab{position:fixed;z-index:80;inset-inline-end:max(12px,env(safe-area-inset-right,0px));bottom:0;gap:7px;padding:9px 12px calc(9px + env(safe-area-inset-bottom,0px));border-radius:10px 10px 0 0;font-size:9px;letter-spacing:1px;box-shadow:0 -2px 12px #174BB815}
.ad-bottom-tab svg{width:16px;height:16px}
.ad-bottom-control:hover,.ad-bottom-tab:hover{background:#E8F4FF;border-color:#2563EB}
html.ads-enabled .ad-bottom,html.ads-enabled .ad-bottom-tab,body:has(dialog[open]) .ad-bottom,body:has(dialog[open]) .ad-bottom-tab{display:none}

/* Compact the question without omitting feedback, progress, flags or score. */
.game-sidebar .activity-card{min-height:0;padding:14px 13px 13px;border-radius:14px}
.game-sidebar .activity-card>.eyebrow{margin-bottom:10px;font-size:9px;line-height:1.35;letter-spacing:1.5px}
.game-sidebar .activity-card .meta{margin:0 0 6px;font-size:11px;line-height:1.4}
.game-sidebar .activity-card .progress{margin:7px 0 12px;height:4px}
.game-sidebar .activity-card h2{font-size:25px;line-height:1.15;letter-spacing:-.55px;margin:0 0 8px}
.game-sidebar .activity-card p{font-size:13px;line-height:1.45;margin:8px 0}
.game-sidebar .activity-card .place-heading{gap:6px 9px;margin-bottom:8px}
.game-sidebar .activity-card .place-heading .place-flag{width:40px;height:30px}
.game-sidebar .activity-card .feedback{font-size:12px;line-height:1.4;margin-top:11px;padding:9px 10px;border-radius:9px}
.game-sidebar .activity-card .score{gap:8px;margin-top:11px}
.game-sidebar .activity-card .score>div{
  min-width:0;display:flex;align-items:center;gap:6px;padding:9px 8px;
  font-size:10px;line-height:1.3;overflow-wrap:anywhere;
}
.game-sidebar .activity-card .score strong{flex-shrink:0;display:inline;font-size:23px;line-height:1;margin:0;font-variant-numeric:tabular-nums}
.game-sidebar .activity-card .answer-legend{margin-top:12px;gap:6px 8px;font-size:10px}
.game-sidebar .activity-card .primary,.game-sidebar .activity-card .secondary{margin-top:10px;padding:10px 12px;min-height:44px}
.game-sidebar .activity-card .welcome-mark{font-size:29px;line-height:1;margin:2px 0 10px}
.game-sidebar .activity-card .detail{margin-top:12px;padding-top:10px}
.game-sidebar .activity-card .province-list{margin-top:9px}
.game-sidebar .activity-card .flag-question{min-height:94px;margin:4px 0}
.game-sidebar .activity-card .flag-question .place-flag{width:120px;height:86px}
.game-sidebar .activity-card .sprint-clock{margin-bottom:10px;padding:7px 9px;min-height:34px;font-size:12px}
.game-sidebar .activity-card .hardcore-live{margin-top:12px;gap:8px}
.game-sidebar .activity-card .hardcore-live>div{gap:3px;padding:9px 8px;border-radius:9px}
.game-sidebar .activity-card .hardcore-live strong{font-size:25px}
.game-sidebar .activity-card .hardcore-live span{font-size:10px;line-height:1.35}
.game-sidebar .activity-card .hardcore-rule{margin:10px 0 0;font-size:11px;line-height:1.4}
.game-sidebar .controls-note{margin:11px 4px 7px;gap:8px;font-size:10px;line-height:1.55}
.game-sidebar .controls-note svg{width:18px;height:21px;margin-top:2px}
.game-sidebar .scope{margin:7px 4px 0;font-size:10px;line-height:1.4}

/* Portrait stacks the six manual units in document flow. */
@media(max-width:1024px){
  .site-layout>.ad-rail{
    --ad-tall:clamp(50px,8vw,72px);--ad-short:var(--ad-tall);
    display:grid;grid-template-columns:minmax(0,1fr);gap:8px;
    inline-size:100%;width:100%;padding:0;
  }
  .game-sidebar .activity-card{padding:12px}
  .game-sidebar .activity-card h2{font-size:24px}
  .game-sidebar .activity-card>.eyebrow{margin-bottom:8px}
  .game-sidebar .activity-card .score>div{padding:8px 9px}
}
/* Each landscape rail gets three compact placements beside the gameplay column. */
@media(min-width:700px) and (max-width:1024px) and (orientation:landscape){
  .site-layout>.ad-rail{
    --ad-tall:clamp(68px,calc((100dvh - 150px)/3),120px);--ad-short:var(--ad-tall);
    display:flex;flex-direction:column;gap:8px;
  }
  .game-sidebar .activity-card{padding:11px 9px}
  .game-sidebar .activity-card>.eyebrow{font-size:8px;letter-spacing:1px}
  .game-sidebar .activity-card h2{font-size:21px;letter-spacing:-.3px}
  .game-sidebar .activity-card p,.game-sidebar .activity-card .feedback{font-size:12px}
  .game-sidebar .activity-card .meta{font-size:10px}
  .game-sidebar .activity-card .place-heading .place-flag{width:36px;height:27px}
  .game-sidebar .activity-card .score{gap:6px}
  .game-sidebar .activity-card .score>div{gap:5px;padding:8px 6px;font-size:9px}
  .game-sidebar .activity-card .score strong{font-size:21px}
  .game-sidebar .activity-card .answer-legend{font-size:9px}
  .game-sidebar .activity-card .hardcore-live{gap:6px}
  .game-sidebar .activity-card .hardcore-live>div{padding:8px 6px}
  .game-sidebar .activity-card .hardcore-live strong{font-size:22px}
}
@media(max-width:699px) and (orientation:landscape){
  .site-layout>.ad-rail{--ad-tall:50px;--ad-short:var(--ad-tall)}
}

/* Empty writing feedback should not reserve another card. */
.game-sidebar .activity-card .feedback:empty{display:none}

/* Advertising is a separate region; no creative is clipped or scaled. */
.ad-slot:has(.adsbygoogle){padding-top:25px}
.ad-slot>.adsbygoogle{display:block;margin-inline:auto;text-align:center}
.ad-slot.ad-unavailable>.adsbygoogle{display:none}

/* Live display placements follow Google’s gameplay spacing recommendation. */
@media(min-width:1800px){html.ads-enabled .site-layout{max-width:1920px;grid-template-columns:minmax(160px,180px) minmax(0,1080px) minmax(160px,180px);column-gap:150px;justify-content:center}}
@media(max-width:1799px){html.ads-enabled .site-layout{display:flex;flex-direction:column;gap:150px;max-width:1200px}html.ads-enabled .site-layout>main{width:100%}html.ads-enabled .site-layout>.ad-rail{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;inline-size:100%;--ad-tall:125px;--ad-short:var(--ad-tall)}}
@media(max-width:640px){html.ads-enabled .site-layout>.ad-rail{grid-template-columns:minmax(0,1fr);--ad-tall:76px;--ad-short:var(--ad-tall)}}
