/* New Arena games: quiet paper surfaces, tangible pieces, and fixed play regions. */
.ax-game{--ax-paper:#fcfbf6;--ax-ink:#24473b;--ax-line:#e2e7da}
.ax-new-card .row-name:before{content:'NEW';display:inline-block;font-size:8px;letter-spacing:1px;color:#95722d;background:#f5edcf;border:1px solid #e5d49b;border-radius:5px;padding:3px 5px;margin-right:7px;vertical-align:middle}
body.pg-playing #app>.view.ax-game{background:#2e9e6d;color:#fff}
body.pg-app #app .ax-game>.game-header .brand{flex:1}body.pg-app #app .ax-game>.game-header .brand>span:last-child{white-space:normal;overflow-wrap:anywhere;line-height:1.35;text-align:right}
.ax-game .ax-ready{display:none}.ax-game .cs-play{position:relative;gap:10px!important;padding:12px 18px!important;justify-content:flex-start!important;isolation:isolate}
.ax-game.state-play>.series-guide-band{height:54px;min-height:54px;flex:0 0 54px;display:flex;align-items:center;justify-content:center;padding:6px 15px}
.ax-game.state-play>.series-control-band{height:48px;min-height:48px;flex:0 0 48px;display:flex;align-items:center;justify-content:center;padding:6px 15px}
.ax-game .series-live-guide,.ax-game .series-control-guide{margin:0;line-height:20px!important;font-size:13px!important;max-width:600px}
.ax-game .cs-phase{display:none!important}.ax-game .ax-board{width:min(100%,580px);margin:auto;display:flex;flex-direction:column;gap:14px;min-height:0;flex:1;max-height:590px;padding:22px;background:var(--ax-paper);border:1px solid #fff8;border-radius:24px;box-shadow:0 12px 28px #15533f21;color:var(--ax-ink);position:relative;overflow:hidden}
.ax-hud{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-shrink:0;font:600 14px/1.2 inherit;font-variant-numeric:tabular-nums;min-height:30px}
.ax-score{font-size:23px;font-weight:800;letter-spacing:-.5px}.ax-score:after{content:' PT';font-size:10px;letter-spacing:1px;opacity:.5}.ax-lives{display:flex;gap:4px;background:#f3e5dc;padding:6px 10px;border-radius:20px;color:#b84843;line-height:1;white-space:nowrap;font-size:19px}.ax-lost{opacity:.17}.ax-counter{font-size:13px;color:#63786a;white-space:nowrap}
.ax-meter{height:3px;width:100%;background:#e4e8dd;border-radius:6px;overflow:hidden;flex-shrink:0}.ax-meter i{display:block;height:100%;background:#d6af57;transform-origin:left;transition:transform .12s linear}
.ax-stage{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:12px}
.ax-choices{display:grid;gap:10px;flex-shrink:0}.ax-choices button{font:inherit;color:var(--ax-ink);border:1px solid #dbe2d5;background:#fff;border-radius:15px;min-height:74px;display:flex;align-items:center;justify-content:center;gap:9px;position:relative;touch-action:manipulation;cursor:pointer;transition:background .14s,border-color .14s,transform .14s;padding:9px 18px;box-shadow:0 3px 0 #e7ebdf}
.ax-choices button:hover{background:#f0f5e9;border-color:#81ac91}.ax-choices button:active{transform:translateY(2px);box-shadow:none}.ax-choices button:focus-visible{outline:3px solid #377e60;outline-offset:3px}.ax-choices button:disabled{opacity:.6;cursor:default}.ax-choices button.ax-answer{background:#e1efdd;border-color:#559570;opacity:1}.ax-choices kbd{font:600 10px/1 inherit;color:#8b998c;position:absolute;right:8px;top:7px}
.ax-game.ax-waiting .ax-board,.ax-game.ax-waiting .series-live-guide,.ax-game.ax-waiting .series-control-guide{visibility:hidden}.ax-game.ax-waiting .ax-ready{display:flex;position:absolute;inset:0;align-items:center;justify-content:center;font-size:clamp(40px,8vw,64px);font-weight:800;color:white;margin:0}
.ax-game:is(.state-play,.state-complete)>.game-header{background:var(--go);color:#fff}.ax-game.ax-waiting,.ax-game.ax-waiting>.game-header,.ax-game.ax-waiting .cs-play{background:var(--wait)!important}.ax-game:is(.state-play,.state-complete) .game-header .back-btn{color:#fff!important;background:#ffffff20!important;border-color:#ffffff55!important}
/* A train-like window frames the scenery; answers occupy a separate fixed panel. */
#view-scenery .ax-choices{grid-template-columns:repeat(2,minmax(0,1fr))}#view-scenery .ax-choices button{min-height:76px;font-size:13px}#view-scenery .ax-choices svg{width:47px;height:47px;flex-shrink:0}
.ax-option-ghost{height:76px;display:flex;align-items:center;justify-content:center;color:#bdc9ba;border:1px dashed #d8e0d0;border-radius:15px;letter-spacing:6px}
.ax-window{position:relative;background:linear-gradient(#dcebe5,#ecf3e6 75%);width:100%;min-height:100px;flex:1;max-height:230px;border:7px solid #c7d4c2;border-bottom-width:17px;border-radius:65px 65px 20px 20px;box-shadow:inset 0 0 0 2px #ffffff90;overflow:hidden}
.ax-cloud{position:absolute;top:15%;height:10px;width:49px;background:#fff9;border-radius:20px}.ax-cloud:before{content:'';width:21px;height:17px;border-radius:100%;position:absolute;left:11px;bottom:1px;background:inherit}.ax-cloud-one{left:12%}.ax-cloud-two{right:16%;top:24%;transform:scale(.7)}
.ax-hills{position:absolute;width:150%;height:45%;border-radius:50% 50% 0 0;bottom:4%;left:-20%;background:#bdd4b4;transform:rotate(-5deg)}.ax-hills:after{content:'';position:absolute;width:70%;height:120%;right:-10%;bottom:-12%;border-radius:50%;background:#a4c6a3}
.ax-landmark{position:absolute;width:100px;height:100px;bottom:14px;left:calc(50% - 50px);z-index:2}.ax-landmark svg{width:100%;height:100%;filter:drop-shadow(0 3px 0 #406e5020)}.ax-road{position:absolute;bottom:0;height:20px;width:100%;background:#d4c6a2;border-top:2px solid #f3e6c0}.ax-road:after{content:'';position:absolute;top:8px;left:0;width:100%;border-top:2px dashed #f9f1d7}
.ax-window-sill{position:absolute;bottom:0;left:0;right:0;background:#859d85;color:#f6f8e9;z-index:3;padding:3px 12px;display:flex;align-items:center;justify-content:space-between;font-size:7px;letter-spacing:2px}.ax-window-sill b{letter-spacing:4px;font-size:5px}
.ax-travel-progress{display:flex;gap:6px;justify-content:center;height:5px;flex-shrink:0}.ax-travel-progress i{height:4px;width:18px;border-radius:5px;background:#d8e1d0}.ax-travel-progress i.on{background:#4c8967}
.ax-memory-question{display:grid;place-items:center;width:100%;height:100%;font-size:48px;font-weight:800;color:#4c785b;opacity:.7}.ax-answer-time{position:absolute;top:8px;right:9px;font-size:11px;font-weight:700;color:#4c785b;background:#ffffffe0;border-radius:10px;padding:4px 8px;z-index:4}
/* The reference and answer track share geometry, avoiding eye travel and layout jumps. */
#view-weave .ax-choices{grid-template-columns:repeat(3,minmax(0,1fr))}.ax-pattern-label{font-size:10px;color:#718774;letter-spacing:1.5px;text-align:left;font-weight:700}
.ax-reference,.ax-slots{display:flex;gap:7px;justify-content:center}.ax-reference>div,.ax-slots>div{flex:1;max-width:48px;aspect-ratio:1;display:flex;align-items:center;justify-content:center;min-width:0;border:1px solid var(--ax-line);background:#f1f3e9;border-radius:12px;position:relative}
.ax-reference{padding:12px;background:#eaf0e1;border-radius:16px}.ax-reference>div{background:#fcfcf5;border:0}.ax-slots>div{background:#fff;border:1px dashed #cbd5c1}.ax-slots>div>span:not(.ax-token){font-size:12px;color:#adb8a6}.ax-slots>div.current{outline:2px solid #caa34b;border:1px solid #caa34b;background:#fff8e6}.ax-slots>div.filled{border-style:solid;background:#f1f6e9}
.ax-stitch-line{height:22px;position:relative;flex-shrink:0}.ax-stitch-line:after{content:'↓';position:absolute;left:0;right:0;color:#a7b99c;text-align:center;font-size:22px;line-height:22px}
.ax-token{display:block;width:clamp(18px,5vw,32px);height:clamp(18px,5vw,32px);background:var(--token);box-shadow:inset 0 -3px 0 #0000000c;flex-shrink:0}.ax-shape-0{border-radius:50%}.ax-shape-1{border-radius:6px}#view-weave .ax-choices .ax-token{width:32px;height:32px}
/* Parcels, belt and mailboxes use the same color + independent mark pairs. */
#view-chroma .ax-choices{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}#view-chroma .ax-choices button{flex-direction:column;gap:5px;padding:10px 3px;font-size:11px;min-height:100px;background:#fbfcf6}
.ax-mailbox{display:flex;width:48px;height:48px;position:relative;background:var(--bin);border-radius:18px 18px 9px 9px;align-items:center;justify-content:center;box-shadow:inset 0 -4px 0 #0000000c}.ax-mailbox:before{content:'';position:absolute;top:8px;width:23px;height:3px;border-radius:8px;background:#ffffff77}.ax-mailbox svg{width:31px;height:31px;color:#fff;margin-top:9px}
#view-chroma .ax-choices kbd{top:auto;bottom:4px;right:4px;font-size:8px;color:#6a7d6b}
.ax-next{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-height:48px}.ax-next>span{font-size:9px;letter-spacing:1.1px;color:#81917e;margin-right:5px}.ax-next>div{width:42px;height:42px;border:1px solid var(--ax-line);border-radius:10px;background:white;opacity:.65}.ax-next>div:last-child{opacity:.35}.ax-next svg{width:100%;height:100%}
.ax-conveyor{position:relative;flex:1;display:flex;align-items:center;justify-content:center;min-height:100px;max-height:230px;background:linear-gradient(#eef1e7,#f8f7ed);border-radius:18px;overflow:hidden}.ax-parcel{width:clamp(100px,25vw,170px);height:clamp(100px,25vw,170px);position:relative;z-index:2;filter:drop-shadow(0 9px 0 #3665450c);animation:ax-arrive .25s ease-out}.ax-parcel svg{width:100%;height:100%}.ax-belt{position:absolute;left:0;right:0;height:25px;background:repeating-linear-gradient(90deg,#d5ddc9 0 27px,#eef0e4 27px 29px);bottom:10%;border-top:4px solid #a7b99c;border-bottom:4px solid #a7b99c;transform:skewY(-3deg)}
.ax-miss .ax-board{border-color:#c5675a}.ax-hit .ax-score{color:#277858}
@keyframes ax-arrive{from{transform:translateX(30px);opacity:.3}to{transform:translateX(0);opacity:1}}
@media(max-width:600px){.ax-game .ax-board{padding:15px;gap:10px;border-radius:19px}.ax-game .cs-play{padding:6px 12px!important}.ax-reference{padding:8px;gap:5px}.ax-slots{gap:5px}.ax-reference>div,.ax-slots>div{border-radius:8px}.ax-stage{gap:9px}#view-chroma .ax-choices button{min-height:85px}.ax-mailbox{width:40px;height:43px}#view-scenery .ax-choices button{padding:6px 11px;gap:4px;font-size:12px}.ax-window{border-width:5px;border-bottom-width:12px;border-radius:45px 45px 14px 14px}.ax-landmark{width:88px;height:88px;left:calc(50% - 44px)}}
@media(max-height:700px){.ax-game.state-play>.series-guide-band{height:42px;min-height:42px;flex-basis:42px}.ax-game.state-play>.series-control-band{height:38px;min-height:38px;flex-basis:38px}.ax-game .ax-board{padding:10px;gap:8px}.ax-game .ax-choices button{min-height:56px}#view-scenery .ax-choices button,.ax-option-ghost{min-height:56px;height:56px}#view-scenery .ax-choices svg{width:35px;height:35px}.ax-game .ax-hud{min-height:26px}.ax-stage{gap:6px}.ax-stitch-line{height:12px}.ax-stitch-line:after{font-size:16px;line-height:12px}.ax-reference{padding:6px}#view-chroma .ax-choices button{min-height:75px}.ax-next{min-height:34px}.ax-next>div{width:31px;height:31px}.ax-conveyor{min-height:80px}.ax-parcel{width:100px;height:100px}.ax-window{min-height:85px}.ax-landmark{width:76px;height:76px;left:calc(50% - 38px)}}
@media(max-height:700px){.ax-reference>div,.ax-slots>div{max-width:32px}.ax-pattern-label{font-size:9px;line-height:11px}.ax-reference{padding:6px}.ax-token{width:23px;height:23px}.ax-stage{gap:4px}.ax-stitch-line{display:none}}
@media(prefers-reduced-motion:reduce){.ax-game *{animation:none!important;transition:none!important}}

/* Bonus progress has its own reserved line; feedback never shifts the game board. */
.ax-bonus{min-height:16px;flex:0 0 16px;font-size:11px;line-height:16px;text-align:center;color:#697d66;font-variant-numeric:tabular-nums}
.ax-bonus-earned{color:#237c57;font-weight:800}
#view-chroma .ax-board{overflow:visible}#view-chroma .ax-stage{position:relative;z-index:2}#view-chroma .ax-conveyor{overflow:visible}
.ax-parcel{touch-action:none;user-select:none;cursor:grab}.ax-parcel.ax-dragging{cursor:grabbing;z-index:8;filter:drop-shadow(0 10px 8px #24473b33);animation:none}
#view-chroma .ax-choices button.ax-drop-target{background:#e6f3df;border-color:#358560;outline:2px solid #358560;outline-offset:2px}

@media(max-height:700px){
 #view-weave .ax-choices button{min-height:50px;padding:8px}
 #view-weave .ax-reference>div,#view-weave .ax-slots>div{max-width:26px}
 #view-weave .ax-reference{padding:4px}
 #view-weave .ax-stage{justify-content:flex-start}
}

#view-chroma .ax-choices button{cursor:default;touch-action:none}
#view-chroma .ax-choices button:hover{background:#fbfcf6;border-color:#dbe2d5}
#view-chroma .ax-choices button:active{transform:none;box-shadow:0 3px 0 #e7ebdf}
#view-chroma .ax-choices button.ax-drop-target{background:#e6f3df;border-color:#358560}

/* Block Stack uses the same paper component as the other new Arena games. */
#view-tower.state-play .tower-paper{background:var(--ax-paper);color:var(--ax-ink)}
#view-tower.state-play .tower-paper .tower-score{flex:0 0 38px;height:38px;min-height:38px;max-height:38px;margin:0;font-size:32px;line-height:38px;color:var(--ax-ink)}
#view-tower.state-play .tower-paper .tower-board{width:100%;height:auto;min-height:0;max-height:none;flex:1 1 0;margin:0;box-shadow:none;border:0;border-radius:12px;background:transparent}
#view-tower.tower-waiting .tower-paper{visibility:hidden}
#view-tower.tower-waiting,#view-tower.tower-waiting>.game-header,#view-tower.tower-waiting .cs-play{background:var(--wait)!important}

/* The tower's legacy ID rules must not reserve larger guide bands. */
#view-tower.state-play>.series-guide-band{height:54px;min-height:54px;flex:0 0 54px;padding:6px 15px}
#view-tower.state-play>.series-control-band{height:48px;min-height:48px;flex:0 0 48px;padding:6px 15px}
#view-tower.state-play .cs-play{padding:8px 16px!important}
@media(max-height:700px){
 #view-tower.state-play>.series-guide-band{height:42px;min-height:42px;flex-basis:42px}
 #view-tower.state-play>.series-control-band{height:38px;min-height:38px;flex-basis:38px}
}

/* Keep pattern tracks intrinsic: shrinking the play panel must never overlap answers. */
#view-weave .ax-board{overflow-x:hidden;overflow-y:auto;gap:8px}
#view-weave .ax-weave-workspace{display:grid;grid-template-rows:minmax(max-content,1fr) auto;gap:10px;flex:1 0 auto;min-height:0;--weave-piece:36px}
#view-weave .ax-stage{flex:none;min-height:max-content;gap:6px;justify-content:center}
#view-weave .ax-pattern-label{font-size:10px;line-height:14px;flex-shrink:0}
#view-weave .ax-reference,#view-weave .ax-slots{flex-shrink:0;gap:6px;padding:6px}
#view-weave .ax-reference>div,#view-weave .ax-slots>div{flex:0 1 var(--weave-piece);width:var(--weave-piece);max-width:var(--weave-piece);min-height:0;aspect-ratio:1;border-radius:8px}
#view-weave .ax-reference .ax-token,#view-weave .ax-slots .ax-token{width:68%;height:68%}
#view-weave .ax-stitch-line{display:block;height:14px}
#view-weave .ax-stitch-line:after{font-size:16px;line-height:14px}
#view-weave .ax-choices{gap:8px}
#view-weave .ax-choices button{min-height:52px;padding:6px}
#view-weave .ax-choices .ax-token{width:28px;height:28px}
@supports(container-type:size){
 #view-weave .ax-board{container-name:weave-board;container-type:size}
 #view-weave .ax-weave-workspace{--weave-piece:clamp(20px,7cqh,44px);flex:1 1 0}
 #view-weave .ax-choices button{min-height:clamp(44px,13cqh,72px)}
 @container weave-board (max-height:340px){
  #view-weave .ax-weave-workspace,#view-weave .ax-choices{gap:6px}
  #view-weave .ax-stage{gap:4px}
  #view-weave .ax-pattern-label{line-height:12px}
  #view-weave .ax-stitch-line{height:10px}
  #view-weave .ax-stitch-line:after{line-height:10px;font-size:14px}
 }
 @container weave-board (max-height:340px) and (min-width:440px){
  #view-weave .ax-weave-workspace{grid-template-columns:minmax(0,1fr) minmax(160px,.75fr);grid-template-rows:minmax(max-content,1fr);gap:14px}
  #view-weave .ax-choices{grid-template-columns:repeat(2,minmax(0,1fr));align-content:center}
 }
}
/* Repeat the ordinal prompt in the window, clear of the timer and the sill. */
#view-scenery .ax-question-landmark{top:8px;right:12px;bottom:18px;left:12px;width:auto;height:auto;display:grid;place-items:center}
#view-scenery .ax-memory-question{width:100%;height:auto;max-width:330px;min-height:0;padding:8px 12px;border-radius:16px;background:#fffffff0;color:#24473b;opacity:1;text-align:center;font-size:clamp(16px,2.5vw,24px);line-height:1.4;font-weight:800;text-wrap:balance;box-sizing:border-box}
@media(max-height:700px){#view-scenery .ax-memory-question{font-size:18px;line-height:1.3;padding:6px 10px}}
#view-scenery .ax-answer-time{top:auto;bottom:0;right:8px;padding:1px 7px;font-size:10px;line-height:14px;border-radius:6px}
#view-scenery .ax-question-landmark~.ax-window-sill b{visibility:hidden}

/* Match the Arena play frame while giving each game its own usable workspace. */
:is(#view-weave,#view-chroma,#view-scenery,#view-tower).state-play{
 --arena-play-inset:20px;
 --arena-play-bar:62px;
 --arena-play-guide:38px;
}
body.pg-playing #app :is(#view-weave,#view-chroma,#view-scenery,#view-tower).state-play>.game-header{
 box-sizing:border-box;
 height:var(--arena-play-bar);
 min-height:var(--arena-play-bar);
 flex:0 0 var(--arena-play-bar);
}
:is(#view-weave,#view-chroma,#view-scenery,#view-tower).state-play>.series-guide-band{
 box-sizing:border-box;
 height:var(--arena-play-guide);
 min-height:var(--arena-play-guide);
 flex:0 0 var(--arena-play-guide);
 padding:2px 10px;
}
:is(#view-weave,#view-chroma,#view-scenery,#view-tower).state-play>.series-control-band{
 box-sizing:border-box;
 min-height:34px;
 flex:0 0 34px;
 height:34px;
 padding:2px 10px;
}
:is(#view-weave,#view-chroma,#view-scenery,#view-tower).state-play .cs-play{
 padding:0 var(--arena-play-inset)!important;
 min-height:0;
 touch-action:none;
}
:is(#view-weave,#view-chroma,#view-scenery,#view-tower).state-play .ax-board{
 box-sizing:border-box;
 width:100%;
 max-width:820px;
 max-height:none;
 margin:0 auto;
 flex:1 1 0;
}
#view-weave.state-play .ax-board{overflow:clip}
@media(max-width:600px){
 :is(#view-weave,#view-chroma,#view-scenery,#view-tower).state-play{
  --arena-play-inset:12px;
  --arena-play-bar:58px;
 }
}
@media(max-height:600px){
 :is(#view-weave,#view-chroma,#view-scenery,#view-tower).state-play{
  --arena-play-bar:48px;
  --arena-play-guide:30px;
 }
 :is(#view-weave,#view-chroma,#view-scenery,#view-tower).state-play>.series-control-band{display:none}
}
@media(min-width:600px) and (max-height:500px){
 :is(#view-chroma,#view-scenery).state-play .ax-board{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:auto 3px minmax(0,1fr);
 }
 :is(#view-chroma,#view-scenery) .ax-board>.ax-hud{grid-area:1 / 1 / 2 / -1}
 :is(#view-chroma,#view-scenery) .ax-board>.ax-meter{grid-area:2 / 1 / 3 / -1}
 :is(#view-chroma,#view-scenery) .ax-board>.ax-stage{grid-area:3 / 1}
 :is(#view-chroma,#view-scenery) .ax-board>.ax-choices{
  grid-area:3 / 2;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-content:center;
 }
 :is(#view-chroma,#view-scenery) .ax-choices button{min-height:48px}
 #view-chroma .ax-choices button{padding-block:3px}
 #view-chroma .ax-mailbox{width:32px;height:34px}
 #view-chroma .ax-conveyor{min-height:62px}
 #view-chroma .ax-parcel{width:76px;height:76px}
 #view-chroma .ax-next{min-height:24px}
 #view-chroma .ax-next>div{width:22px;height:22px}
}
@media(min-width:600px) and (max-height:500px){
 :is(#view-weave,#view-chroma,#view-scenery).state-play .ax-board{padding:6px;gap:5px}
 #view-weave.state-play .ax-weave-workspace{
  --weave-piece:22px;
  grid-template-columns:minmax(0,1fr) minmax(0,.85fr);
  grid-template-rows:minmax(0,1fr);
  gap:10px;
 }
 #view-weave.state-play .ax-stage{min-height:0;gap:3px}
 #view-weave.state-play .ax-reference,
 #view-weave.state-play .ax-slots{padding:3px}
 #view-weave.state-play .ax-choices{
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-content:center;
  gap:5px;
 }
 #view-weave.state-play .ax-choices button{min-height:42px;padding:4px}
 #view-chroma.state-play .ax-choices button{
  flex-direction:row;
  min-height:44px;
 }
 #view-scenery.state-play .ax-choices button,
 #view-scenery.state-play .ax-option-ghost{min-height:44px}
}
