/* Arena presentation only. Actor geometry, maps and departure motion are owned by the game. */
@import url('/arena-university-palette.css');
@import url('/arena-combat-polish.css');
@import url('/style-button.css');
@import url('/settings-switch.css');
@font-face{font-family:Pixelingo;src:url('/fonts/fusion-pixel/fusion-pixel-12px-proportional-ja.otf.woff2');font-display:swap}
html[data-ui-theme]{--arena-paper:#fff9ee;--arena-soft:#eee2f6;--arena-frame-edge:#aa96b9;--arena-ink:#352844;--arena-muted:#74677f;--arena-radius:20px}
html[data-ui-theme=dark]{--arena-paper:#222528;--arena-soft:#292c30;--arena-frame-edge:#42474d;--arena-ink:#e8e9e7;--arena-muted:#a8afb7}
html body :is(.arena-page,.arena-guide,.arena-collection){font-family:Pixelingo,monospace;user-select:none;-webkit-user-select:none}
html body .arena-page :is(input,textarea){user-select:text;-webkit-user-select:text}
html[data-ui-theme] body :is(.arena-welcome,.arena-mode-selection,.arena-training,.arena-challenge,.arena-nameplate,.arena-roster-item,.arena-team-card):not(#da-a#da-b#da-c#da-d#da-e){border:3px solid var(--arena-frame-edge)!important;border-image:none!important;outline:none!important;border-radius:var(--arena-radius)!important;background:var(--arena-paper)!important;color:var(--arena-ink)!important;box-shadow:none!important}
html body :is(.arena-welcome,.arena-mode-selection,.arena-training){width:min(580px,100%);padding:24px;gap:16px}
html body .arena-lobby{overflow:auto;justify-content:safe center;padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom))}
  html body .arena-ready-count{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:20px;padding:6px 0 12px}
html[data-ui-theme] body :is(.arena-ready-count h2,.arena-mode-selection h2,.arena-training h2,.arena-result>h2,.arena-story):not(#da-a#da-b#da-c#da-d#da-e){color:var(--arena-ink)!important;-webkit-text-stroke:0!important;text-shadow:none!important;font-weight:400!important}
html body :is(.arena-ready-count h2,.arena-mode-selection h2,.arena-training h2){font:400 32px/1.1 UniversityActions,Pixelingo;text-transform:uppercase;text-align:center}
html body .arena-ready-count p{font-size:18px;color:var(--arena-muted)}
html body .arena-lobby-resources{grid-template-columns:1fr 1fr;gap:12px;margin-top:4px}
html[data-ui-theme] body .arena-button:not(#da-a#da-b#da-c#da-d#da-e){--action-face:#c6f5df;--action-edge:#76ab99;--action-ink:#285f54;border:3px solid var(--action-edge)!important;border-image:none!important;border-radius:14px!important;background:var(--action-face)!important;color:var(--action-ink)!important;outline:none!important;box-shadow:0 3px 0 var(--action-edge)!important;min-height:52px;padding:10px 14px;font:400 25px/1.05 UniversityActions,Pixelingo;text-transform:uppercase;transition:transform 90ms,box-shadow 90ms,filter 90ms}
html body .arena-button.blue{--action-face:#d5eafa!important;--action-edge:#88abc4!important;--action-ink:#365e7b!important}
html body .arena-button.lavender{--action-face:#e8dafa!important;--action-edge:#ae95c1!important;--action-ink:#49345f!important}
html body .arena-button.cream{--action-face:#fff1c6!important;--action-edge:#c7ad69!important;--action-ink:#735b27!important}
html body .arena-button:is(.peach,.red){--action-face:#fbd6dc!important;--action-edge:#cf94a1!important;--action-ink:#873d51!important}
html[data-ui-theme=dark] body .arena-button:not(#da-a#da-b#da-c#da-d#da-e){--action-face:#59de98;--action-edge:#42474d!important;--action-ink:#1b1d1f!important}
html[data-ui-theme=dark] body .arena-button.blue{--action-face:#55beff!important}
html[data-ui-theme=dark] body .arena-button.lavender{--action-face:#be91ff!important}
html[data-ui-theme=dark] body .arena-button.cream{--action-face:#ffe45e!important}
html[data-ui-theme=dark] body .arena-button:is(.peach,.red){--action-face:#ff7383!important}
html[data-ui-theme] body .arena-button:is(:active,[data-pressed=true]):not(:disabled):not(#da-a#da-b#da-c#da-d#da-e){transform:translateY(2px)!important;box-shadow:0 1px 0 var(--action-edge)!important;filter:brightness(.96)}
html[data-ui-theme] body .arena-button:disabled:not(#da-a#da-b#da-c#da-d#da-e){background:var(--arena-soft)!important;border-color:var(--arena-frame-edge)!important;color:var(--arena-muted)!important;box-shadow:none!important;opacity:1}
html body .arena-button strong{font-weight:400}
html[data-ui-theme] body .arena-button strong:not(#da-a#da-b#da-c#da-d#da-e){font:inherit!important;color:inherit!important}
html[data-ui-theme] body .arena-button .study-text:not(#da-a#da-b#da-c#da-d#da-e){font-family:Arial,'Yu Gothic',sans-serif;text-transform:none;color:inherit!important}
html body .arena-mode-bonus{font:16px/1.2 Pixelingo;text-transform:none;color:inherit}
html body .arena-combat-modes{gap:14px;margin:20px 0}
html body .arena-training{display:flex;flex-direction:column;overflow:hidden;max-height:100%;gap:8px}
html body .arena-training-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 2px 8px}
html body .arena-training-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
html body .arena-training-options .arena-button{min-width:0;padding:8px 2px;font-size:22px}
html body .arena-training-options .arena-button strong{font:inherit}
html body .arena-training>p{font-size:17px;text-align:center;color:var(--arena-muted);margin-top:8px}
html[data-ui-theme] body .arena-training :is(fieldset,select):not(#da-a#da-b#da-c#da-d#da-e){border:2px solid var(--arena-frame-edge)!important;border-image:none!important;outline:none!important;border-radius:14px!important;background:var(--arena-paper)!important;color:var(--arena-ink)!important}
html body .arena-training fieldset{padding:12px;margin:12px 0;min-width:0}
html body .arena-training legend{font-size:17px;color:var(--arena-muted);padding:0 6px}
html body .arena-training-check{font-size:18px;min-height:34px;gap:10px}
html body .arena-training input[type=checkbox]{width:20px;height:20px;accent-color:#76ab99}
html body .arena-training-actions{display:grid;grid-template-columns:1fr 1fr;flex:none;gap:12px;padding:6px 0}
html body .arena-training-actions .arena-button{font-size:21px;padding:8px 6px;min-width:0}
html[data-ui-theme] body .arena-training :is(.arena-training-options,.arena-training-actions) .arena-button:not(#da-a#da-b#da-c#da-d#da-e){font:400 21px/1.05 UniversityActions,Pixelingo!important;padding:8px 4px!important;min-width:0}
html[data-ui-theme] body .arena-mode-bonus:not(#da-a#da-b#da-c#da-d#da-e){position:static;border:0!important;border-image:none!important;outline:none!important;background:none!important;box-shadow:none!important;color:inherit!important;padding:4px 0;font:16px Pixelingo}
html[data-ui-theme] body .arena-answers .arena-button:not(#da-a#da-b#da-c#da-d#da-e){font:400 clamp(22px,6vw,27px)/1.1 UniversityActions,Pixelingo;text-transform:none;padding:2px 6px}
html[data-ui-theme] body .arena-answers .arena-button[lang=ja]:not(#da-a#da-b#da-c#da-d#da-e){font:700 clamp(24px,7vw,30px)/1.15 'Yu Gothic','Hiragino Kaku Gothic ProN',Meiryo,sans-serif}
@media(orientation:landscape) and (max-height:600px){html[data-ui-theme] body .arena-answers .arena-button:not(#da-a#da-b#da-c#da-d#da-e){font-size:23px;padding:4px 8px}html[data-ui-theme] body .arena-answers .arena-button[lang=ja]:not(#da-a#da-b#da-c#da-d#da-e){font-size:26px}}
html[data-ui-theme] body :is(.arena-nameplate,.arena-team-card,.arena-roster-item):not(#da-a#da-b#da-c#da-d#da-e){--arena-radius:14px}
html[data-ui-theme] body .arena-team-card[aria-pressed=true]:not(#da-a#da-b#da-c#da-d#da-e){border-color:#76ab99!important;background:#e1f3e9!important}
html[data-ui-theme=dark] body .arena-team-card[aria-pressed=true]:not(#da-a#da-b#da-c#da-d#da-e){border-color:#59de98!important;background:#263c32!important}
html body .arena-collection .arena-roster-item{padding:10px 4px;gap:6px}
html[data-ui-theme=dark] body :is(.arena-roster-item,.arena-team-card)>canvas{background:transparent;border-radius:0}
/* Style carré: compact 8px corners across every viewport. */
html[data-ui-theme] body .arena-nameplate:not(#da-a#da-b#da-c#da-d#da-e){--arena-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:min(168px,100%);max-width:168px;height:60px;min-height:60px;padding:6px 8px}
html[data-ui-theme] body .arena-nameplate.hearts-only:not(#da-a#da-b#da-c#da-d#da-e){min-height:60px}
html[data-ui-theme] body .arena-nameplate strong:not(#da-a#da-b#da-c#da-d#da-e){display:block;width:100%;text-align:center;font:500 16px/1.15 Arial,'Yu Gothic',sans-serif;white-space:nowrap}
html[data-ui-theme] body .arena-page .arena-battle .arena-nameplate:not(#da-a#da-b#da-c#da-d#da-e){border:3px solid var(--arena-frame-edge)!important}
html body .arena-nameplate .arena-hearts{justify-content:center;gap:3px}
html body .arena-nameplate .arena-hearts>img{width:18px;height:18px}
html[data-ui-theme=dark] body .arena-nameplate:not(#da-a#da-b#da-c#da-d#da-e){background:#292c30!important;border-color:#42474d!important;color:#e8e9e7!important}
/* One full card surface behind art and labels, without a second sprite tile. */
html[data-ui-theme=dark] body :is(.arena-roster-item,.arena-team-card):not(#da-a#da-b#da-c#da-d#da-e){background:#a6b2af!important;border-color:#596963!important;color:#202729!important}
html[data-ui-theme=dark] body :is(.arena-roster-item,.arena-team-card) :is(.study-text,.ready):not(#da-a#da-b#da-c#da-d#da-e){color:#285f54!important}
html[data-ui-theme=dark] body .arena-roster-item .resting:not(#da-a#da-b#da-c#da-d#da-e){color:#873d51!important}
html[data-ui-theme=dark] body .arena-team-card[aria-pressed=true]:not(#da-a#da-b#da-c#da-d#da-e){background:#bbd6c9!important;border-color:#59de98!important}
/* Difficulty label stays at the centre; the reward badge is attached outside. */
html body .arena-combat-modes .arena-button{min-height:100px;display:grid;place-items:center}
html[data-ui-theme] body .arena-combat-modes .arena-button:not(#da-a#da-b#da-c#da-d#da-e){min-height:100px;padding:10px 4px;font-size:clamp(18px,4.8vw,23px)}
html[data-ui-theme] body .arena-combat-modes .arena-mode-bonus:not(#da-a#da-b#da-c#da-d#da-e){position:absolute;right:-5px;bottom:-16px;display:flex;align-items:center;justify-content:center;gap:4px;padding:4px 7px;border:2px solid var(--action-edge)!important;border-radius:12px;background:var(--action-face)!important;color:var(--action-ink)!important;font:16px/1 Pixelingo;white-space:nowrap}
.arena-mode-bonus img{width:22px;height:22px;object-fit:contain;image-rendering:pixelated}
html body .arena-mode-selection .arena-combat-modes{margin-bottom:34px}
html[data-ui-theme] body dialog.arena-training-sheet:not(#da-a#da-b#da-c#da-d#da-e){position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;overflow:hidden;border:0!important;border-image:none!important;border-radius:0!important;outline:none!important;box-shadow:none!important;background:var(--arena-paper)!important;color:var(--arena-ink)!important}
.arena-training-sheet[open]{display:flex;flex-direction:column}
.arena-training-sheet::backdrop{background:transparent}
html body .arena-training-sheet .arena-sheet-header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;flex:none;gap:4px;padding:max(12px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-left)) 12px}
html body .arena-training-sheet .arena-sheet-header>.minimal-close{position:static;grid-column:1;grid-row:1;width:44px;height:44px;min-height:44px;transform:none}
.arena-training-sheet .arena-sheet-header h2{grid-column:2;grid-row:1;margin:0;text-align:center;font:400 clamp(18px,4.7vw,28px)/1.2 Pixelingo;text-transform:uppercase}
.arena-training-content{display:flex;justify-content:center;flex:1;min-height:0;padding:0 max(16px,env(safe-area-inset-left)) max(16px,env(safe-area-inset-bottom))}
html[data-ui-theme] body .arena-training-sheet .arena-training:not(#da-a#da-b#da-c#da-d#da-e){border:0!important;border-radius:0!important;padding:0;max-height:none;height:100%;width:min(740px,100%)}
.arena-training-sheet .arena-training-body{flex:1}
html body .arena-training-sheet .arena-training>p{margin:4px 0 12px}
html body .arena-training-sheet .arena-training-actions{grid-template-columns:1fr}
html[data-ui-theme] body .arena-training-sheet .arena-training-actions .arena-button:not(#da-a#da-b#da-c#da-d#da-e){width:100%;min-height:60px;font-size:27px!important;background:var(--action-face)!important;color:var(--action-ink)!important}
html body .arena-training-sheet .arena-training-check{gap:14px;min-height:44px;align-items:center;cursor:pointer}
html body .arena-training-sheet .arena-training-check>span{min-width:0}
@media(orientation:landscape) and (max-height:600px){html body .arena-training-sheet .arena-sheet-header{padding-top:max(2px,env(safe-area-inset-top));padding-bottom:2px}}
html body .arena-nameplate strong{font-weight:400}
html body .arena-result>h2{font-family:UniversityActions;text-transform:uppercase}
html body .arena-result{display:flex;flex-direction:column;gap:8px}
html[data-ui-theme] body .arena-end-actions .arena-button:not(#da-a#da-b#da-c#da-d#da-e){min-height:40px;padding:6px;font-size:22px}
html body .arena-rest-team .study-text{white-space:normal;overflow-wrap:anywhere;font-size:13px}
html body .arena-rest-team small{font-size:14px;white-space:normal}
html[data-ui-theme] body .arena-xp-gain .home-status:not(#da-a#da-b#da-c#da-d#da-e){border:3px solid var(--arena-frame-edge)!important;border-image:none!important;border-radius:14px!important;outline:none!important;background:var(--arena-paper)!important;color:var(--arena-ink)!important}
html[data-ui-theme] body .arena-xp-gain :is(h3,.arena-xp-level):not(#da-a#da-b#da-c#da-d#da-e){color:var(--arena-ink)!important;font-weight:400}
html body .arena-roster-item .ready{color:#285f54}
html[data-ui-theme=dark] body .arena-roster-item .ready{color:#59de98}
html[data-ui-theme=dark] body .arena-roster-item .resting{color:#ff7383}
@media(max-width:380px){html body :is(.arena-welcome,.arena-mode-selection,.arena-training){padding:16px;gap:12px}html body .arena-lobby-resources{gap:10px}html body .arena-button{font-size:22px}html body .arena-training-check{font-size:16px}}
@media(orientation:landscape) and (max-height:600px){html body .arena-welcome{display:grid;grid-template-columns:1fr 1fr;width:min(740px,100%);padding:16px;gap:12px}html body .arena-ready-count{grid-column:1/-1;padding:0;gap:2px}html body .arena-lobby-resources{grid-column:1/-1;margin:0}html body .arena-welcome>.arena-local-reset{grid-column:1}html body .arena-welcome>[data-arena-home]{grid-column:2}html body .arena-welcome .arena-button{min-height:40px;padding:5px 10px;font-size:22px}html body .arena-training{width:min(740px,100%)}html body .arena-battle .arena-button{min-height:32px;font-size:19px;padding:4px}}
@media(prefers-reduced-motion:reduce){html body .arena-button{transition:none}}
.arena-stage[data-ink-motion] :is(.arena-sequential-spell,.arena-charge-symbol){visibility:hidden!important}
@media(orientation:landscape) and (max-height:600px){
 html body .arena-welcome>:is(.arena-ready-count,.arena-local-reset,.arena-lobby-resources,button){grid-area:auto}
 html body .arena-welcome>.arena-ready-count{grid-column:1/-1}
 html body .arena-welcome>.arena-lobby-resources{grid-column:1/-1}
 html body .arena-welcome>.arena-local-reset{grid-column:1}
 html body .arena-welcome>[data-arena-home]{grid-column:2}
}
.arena-stage[data-aura-motion] :is(.arena-sequential-spell,.arena-charge-symbol){visibility:hidden!important}

/* A shot has one subject. Keep its live name/hearts above the world camera. */
.arena-stage[data-aura-motion] .arena-round{opacity:calc(1 - var(--aura-focus,0))}
.arena-stage .arena-fighter[data-aura-swept=true] .arena-ground-pad{visibility:hidden}
.arena-stage .arena-ground-pad{border:0!important;outline:none!important;box-shadow:none!important;background:rgba(38,27,48,.17)!important;opacity:1}
@media(orientation:landscape){
 html[data-ui-theme] body .arena-battle[data-aura-resolving=true]>.arena-challenge:not(#da-a#da-b#da-c#da-d#da-e){left:50%;right:auto;bottom:16px;transform:translateX(-50%);width:min(680px,85%);height:auto;min-height:72px;max-height:110px;padding:16px 24px;overflow:hidden}
 html body .arena-battle[data-aura-resolving=true] .arena-story{font:400 clamp(19px,2.2vw,25px)/1.25 UniversityActions,Pixelingo;margin:0;text-align:center}
}
@media(orientation:landscape) and (max-height:600px){
 html[data-ui-theme] body .arena-battle[data-aura-resolving=true]>.arena-challenge:not(#da-a#da-b#da-c#da-d#da-e){bottom:8px;min-height:54px;padding:8px 14px}
}
/* Whole slate surfaces support black artwork without a second inset tile. */
html[data-ui-theme=dark] body :is(.arena-roster-item,.arena-team-card):not(#da-a#da-b#da-c#da-d#da-e){background:linear-gradient(155deg,#9cabad,#809396)!important;border-color:#5c7075!important;color:#192a30!important}
html[data-ui-theme=dark] body :is(.arena-roster-item,.arena-team-card) :is(.study-text,.ready):not(#da-a#da-b#da-c#da-d#da-e){color:#203b40!important}
html[data-ui-theme=dark] body .arena-team-card[aria-pressed=true]:not(#da-a#da-b#da-c#da-d#da-e){background:linear-gradient(155deg,#b5d6c5,#8eb5a4)!important;border-color:#59de98!important}
html body .arena-training-sheet .arena-training fieldset{padding:8px 12px;margin:10px 0}
html body .arena-training-sheet .arena-training-check{font-size:17px}
html[data-ui-theme] body .arena-training-options .arena-button[aria-pressed=true]:not(#da-a#da-b#da-c#da-d#da-e){transform:translateY(2px);box-shadow:0 1px 0 var(--action-edge)!important}
html body .arena-training-options .arena-button[aria-pressed=false]{filter:saturate(.7);opacity:1}
html body .arena-training-options .arena-button{transition:transform 120ms,box-shadow 120ms,filter 180ms,opacity 180ms}
html body .arena-training-actions{position:relative}
html body .arena-training-actions::before{content:'';position:absolute;bottom:100%;left:0;right:0;height:16px;background:linear-gradient(transparent,var(--arena-paper));pointer-events:none}
@media(min-width:760px) and (min-height:650px){
 html body .arena-training-sheet .arena-training-body{display:grid;grid-template-columns:1fr 1fr;align-content:start;column-gap:18px}
 html body .arena-training-sheet .arena-training-body>fieldset:first-child{grid-column:1/-1}
 html body .arena-training-sheet .arena-training-time{grid-column:1/-1;padding:6px 0}
 html body .arena-training-sheet .arena-training-body>fieldset:last-of-type{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;column-gap:20px}
}

/* The arena keeper belongs to reception, never to the combat field. */
/* The first guided fight keeps its authoritative buttons, but uses the same
   map and an actor with its natural proportions instead of a stretched grid row. */
html body .arena-page:has(.arena-guided-welcome)>.arena-background{z-index:0;display:block;object-fit:cover}
html body .arena-page:has(.arena-guided-welcome)>.arena-main{z-index:1;justify-content:flex-end;padding-top:180px}
html body .arena-guided-welcome{position:relative;flex:none;width:min(100%,520px);grid-template-columns:1fr;gap:10px;padding:16px}
html body .arena-guided-welcome>.arena-keeper{position:absolute;bottom:calc(100% + 14px);left:50%;transform:translateX(-50%);display:block;width:auto;height:clamp(90px,18dvh,150px);max-width:none;object-fit:contain;image-rendering:pixelated;pointer-events:none}
html body .arena-guided-welcome>h2{font-size:26px;margin:0}
html body .arena-guided-welcome>p{font-size:18px;margin:0}
html body .arena-ready-count .arena-keeper{display:block;flex:none;width:auto;height:134px;max-width:90px;object-fit:contain;image-rendering:pixelated}
@media(orientation:landscape) and (max-height:600px){html body .arena-ready-count .arena-keeper{height:72px}}


html[data-ui-theme] body .arena-coin-gain .home-status{grid-template-columns:32px 1fr!important;align-items:center;gap:10px!important;text-align:center}
.arena-coin-gain strong{font:22px/1.2 PixelUI;white-space:nowrap}.arena-coin-gain img{image-rendering:pixelated}
