/* Compiled render caches of reviewed native SVG controls. */
#companion .building-rotation-toolbar button,#companion .placement-actions .placement-turn{background-image:url("/vectors/approved-hd/runtime/rotation-controls-v089.webp")!important}
#companion .placement-actions .placement-ok,#companion .placement-actions .placement-cancel,#companion .building-rotation-toolbar button.placement-cancel{background-image:url("/vectors/approved-hd/runtime/placement-controls-v089.webp")!important}
#companion .placement-actions .placement-connect{background-image:url("/vectors/approved-hd/runtime/connect-control-v089.webp")!important}
#companion .soldier-card-art[data-unit="guard"]{background-image:url("/vectors/approved-hd/runtime/guardian-card-guard-v095.webp")!important}
#companion .soldier-card-art[data-unit="archer"]{background-image:url("/vectors/approved-hd/runtime/guardian-card-cinderwing-30-v3.webp")!important}
#companion .soldier-card-art[data-unit="knight"]{background-image:url("/vectors/approved-hd/runtime/guardian-card-knight-v095.webp")!important}
/* Shared native vector action frame; preserve approved illustrated icon controls. */
#companion button:not([data-gold-icon]):not(.fence-shape-arrow):not(:has(img)):not(:has(.hud-symbol)):not(.world-map-button):not(.home-portal):not(.quick-item-slot):not(.quick-item-remove):not(.map-destination-hit):not(.quick-item-bar button):not(.inventory-slot):not(.school-mission-card):not(.school-entry-button):not(.game-audio-toggle):not(#companionFullscreen):not(.placement-actions button):not(.building-rotation-toolbar button):not(.game-confirmation-actions button):not(.developer-delete-profile):not(.world-map-ui):not(.scout-action):not(.detail-action):not(.companion-blueprint>button):not(.recipe-row button):not(.companion-raid-button):not(.dev-graphics-button):not(.developer-action){border:2px solid #9a6a26!important;border-radius:9px!important;background:linear-gradient(180deg,#22365d,#15213a) padding-box!important;box-shadow:inset 0 1px 0 #ffffff26,0 0 0 1px #4a2c0c!important;color:#f8efd6;min-height:42px;padding:4px 16px;text-shadow:0 1px 2px #070f17}
#companion button:disabled{filter:saturate(.35);opacity:.55}
#companion .companion-blueprint>button{display:block!important;margin:12px auto 0!important;align-self:center!important;justify-self:center!important;width:min(240px,100%)!important}
#companion .training-dock.school-entry{inset:0!important;width:100%!important;max-height:none!important;height:100%!important;border:0;border-radius:0;background:radial-gradient(ellipse at center,#182533,#06090eee 65%,#020305)!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:20px;z-index:55}
#companion .training-dock.school-entry[hidden]{display:none!important}
#companion .school-entry-choices{display:flex;gap:24px;justify-content:center}
#companion .school-entry-button{background:linear-gradient(155deg,#254557,#142d3d) padding-box!important;border:1px solid #928263!important;border-radius:9px;box-shadow:inset 0 0 0 1px #192630,inset 0 0 0 2px #abb2b032!important;width:clamp(150px,24vw,260px);height:clamp(110px,25vh,180px);padding:10px;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#fff0d5;font-size:20px;font-weight:700;text-shadow:0 2px 3px #000}
#companion .school-entry-button img{width:clamp(55px,10vh,90px);height:clamp(55px,10vh,90px);object-fit:contain}
#companion .school-missions{display:flex;flex-direction:column;gap:14px;width:100%}
#companion .school-mission-card{display:flex;align-items:center;gap:18px;width:100%;min-height:120px!important;padding:20px 28px!important;background:linear-gradient(100deg,#263d4c,#142330)!important;border:1px solid var(--hud-gold-edge)!important;border-radius:9px;color:#fff0d5;text-align:left;box-shadow:inset 0 0 18px #050c13}
#companion .school-mission-card img{width:85px;height:85px;object-fit:contain;flex-shrink:0}
#companion .school-mission-copy{display:flex;flex-direction:column;gap:8px}
#companion .school-mission-copy strong{font-size:19px;color:#f4d895}
#companion .school-mission-copy small{color:#afc8ce}
#companion .school-mission-hero{display:flex;align-items:center;gap:20px}
#companion .school-mission-hero img{width:110px;height:110px;object-fit:contain}
#companion .school-mission-actions{display:flex;justify-content:center;gap:14px;flex-wrap:wrap;margin-top:15px}
@media(max-height:500px){#companion .training-dock.school-entry{gap:8px}#companion .school-entry-button{height:115px}#companion .school-mission-card{min-height:95px!important;padding:12px 20px!important}#companion .school-mission-card img{width:60px;height:60px}}

#companion #companionControlsDrawer:has(.school-missions){z-index:90!important;justify-content:flex-start!important}
#companion .training-dock .school-entry-button{height:180px!important;min-height:150px!important;padding:24px!important;gap:10px;font-size:20px!important;flex-shrink:0}
#companion .school-mission-card{background:linear-gradient(155deg,#254557,#142d3d) padding-box!important;border:1px solid #928263!important;border-radius:9px!important;box-shadow:inset 0 0 0 1px #192630,inset 0 0 0 2px #abb2b032!important;padding:14px 26px!important}
@media(max-height:500px){#companion .training-dock .school-entry-button{height:125px!important;min-height:125px!important;padding:15px!important;gap:4px;font-size:17px!important}}

#companion .building-art-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
#companion .building-art-actions button{width:76px;height:76px;min-height:0;padding:0;border:0;background:transparent;box-shadow:none}
#companion .building-art-actions img{display:block;width:100%;height:100%;pointer-events:none}
#companion :is(.building-art-actions,.building-rotation-toolbar,.placement-actions) button{
 transition:none!important;animation:none!important;transform:none!important;translate:none!important;scale:none!important;
 box-shadow:none!important;touch-action:manipulation;-webkit-tap-highlight-color:transparent;
}
#companion .building-art-actions button:is(:hover,:active,:focus){background:transparent;box-shadow:none}
#companion :is(.building-art-actions,.building-rotation-toolbar,.placement-actions) button:focus-visible{outline:2px solid var(--hud-gold-highlight)!important;outline-offset:2px}
#companion .building-rotation-toolbar button:is(:hover,:active,:focus){background-size:400% 100%!important;background-repeat:no-repeat!important}
#companion .building-rotation-toolbar button[data-art-cell="0"]{background-position:0 0!important}
#companion .building-rotation-toolbar button[data-art-cell="1"]{background-position:33.333% 0!important}
#companion .building-rotation-toolbar button[data-art-cell="2"]{background-position:66.667% 0!important}
#companion .building-rotation-toolbar button[data-art-cell="3"]{background-position:100% 0!important}

#companion #companionHabitat #companionPortrait{align-self:center;position:relative;top:auto}

#companion {
 --hud-gold-edge:#d6ae62;
 --hud-gold-highlight:#f4d793;
}
#companion button[data-gold-icon="back"]{
 --gold-icon:url('/vectors/approved-hd/runtime/hud-back-stone-v1.svg');
}
#companion button[data-gold-icon="close"]{
 --gold-icon:url('/vectors/approved-hd/runtime/hud-close-stone-v1.svg');
}
#companion button[data-gold-icon]:is(button,:hover,:active,:focus-visible){
 background:transparent var(--gold-icon) center / contain no-repeat!important;
 border:0!important;
 box-shadow:none!important;
 padding:0!important;
 width:40px;
 height:40px;
 min-width:32px;
 min-height:32px;
 transform:none!important;
}
#companion button[data-gold-icon]:focus-visible{
 outline:2px solid var(--hud-gold-highlight)!important;
 outline-offset:2px;
}

#companion .soldier-info-panel{font-size:12px;line-height:1.35}

#companion .activity-destinations.build-category-cards,
#companion #companionActivityHub>.activity-destinations.activity-category-cards{
 grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
#companion .activity-destinations>.illustrated-menu-tile{
 display:block;
 width:100%;
 min-width:0;
 min-height:0;
 padding:0;
 background:none;
 border:0;
 border-radius:12%;
 box-shadow:none;
 overflow:hidden;
}
#companion .illustrated-menu-tile img{display:block;width:100%;aspect-ratio:1;object-fit:fill}
#companion .activity-destinations>.illustrated-menu-tile:is(:hover,:active){
 background:none;
 box-shadow:none;
 filter:brightness(1.1);
}
#companion .illustrated-menu-tile:focus-visible{outline:2px solid var(--hud-gold-highlight);outline-offset:2px}

#companion .world-game-dock button,
#companion .quick-item-bar button {
 border:1px solid #c4ad7880!important;
 border-radius:7px!important;
 background:#182b3770!important;
 color:#fff0d5!important;
 box-shadow:none!important;
 text-shadow:0 1px 2px #06111b;
}
#companion .world-game-dock button:is(:hover,:focus-visible,.active,[aria-expanded="true"]),
#companion .quick-item-bar button:is(:hover,:focus-visible,[aria-expanded="true"]){
 background:#244454b8!important;
 border-color:#e2c789!important;
}
#companion .world-game-dock button{padding:2px 4px!important}

#companion .building-rotation-toolbar button.placement-cancel{
 background-size:200% 100%!important;
 background-position:100% 0!important;
 background-repeat:no-repeat!important;
}

/* Keep the animated portrait and its details in equal columns. */
#companion #companionGame[data-panel="Care"] #companionHabitat{
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr));
 grid-template-rows:auto;
 align-items:stretch;
 gap:0;
 padding:0;
 min-height:0;
}
#companion #companionGame[data-panel="Care"] #companionHabitat #companionPortrait{
 grid-area:1 / 1;
 align-self:stretch;
 width:100%;
 max-width:none;
 height:auto!important;
 min-height:clamp(140px,29vh,250px);
 margin:0!important;
 border-radius:inherit;
}
#companion #companionHabitat>.care-pet-info{
 grid-area:1 / 2;
 display:grid;
 align-content:center;
 gap:6px;
 padding:clamp(6px,2vw,16px);
 border-inline-start:1px solid #527180;
 min-width:0;
 box-sizing:border-box;
}
#companion .care-pet-info>.row{flex-wrap:wrap;gap:4px}
#companion #companionHabitat #companionPetName{font-size:18px}
#companion #companionHabitat .care-summary-actions{display:grid;justify-items:center}
#companion #companionHabitat .care-summary-button{
 display:block;width:min(100%,120px);min-width:0;min-height:0;padding:0;
 border:0;border-radius:7px;background:none;box-shadow:none;overflow:hidden;
}
#companion .care-summary-button img{display:block;width:100%;aspect-ratio:3;object-fit:contain}
#companion #companionHabitat .care-summary-button:hover:enabled{background:none;box-shadow:none;filter:brightness(1.1)}
#companion .care-summary-button:focus-visible{outline:2px solid var(--hud-gold-highlight);outline-offset:2px}
#companion .care-summary-button:disabled{opacity:.65;cursor:not-allowed}
#companion #companionPanelCare>.row h2{margin:0;font-size:16px}
#companion #companionNeeds{
 grid-template-columns:repeat(auto-fit,minmax(min(100%,90px),1fr));
 gap:4px 8px;margin:6px 0 9px;
}
#companion #companionNeeds progress{height:5px;margin:0;display:block}
#companion #companionActivities{
 grid-template-columns:repeat(auto-fill,minmax(min(100%,78px),1fr));
 gap:6px;
 width:100%;
 max-width:690px;
 margin-inline:auto;
}
#companion .care-action{position:relative;min-width:0}
#companion #companionActivities .illustrated-menu-tile{
 display:block;width:100%;min-width:0;min-height:0;padding:0;
 background:none;border:0;border-radius:10%;box-shadow:none;overflow:hidden;
}
#companion #companionActivities .illustrated-menu-tile:hover:enabled{filter:brightness(1.1)}
#companion #companionActivities .illustrated-menu-tile:disabled{opacity:.73;cursor:not-allowed}
#companion .care-action-status{
 position:absolute;top:5%;right:5%;padding:2px 5px;border-radius:6px;
 background:#14222af2;color:#fff0c5;font-size:clamp(9px,2vw,11px);pointer-events:none;
}

#companion #companionHabitat .care-summary-button{
 position:relative;height:40px;
 border:1px solid #78848c;background:linear-gradient(#142236,#071422);
}
#companion #companionHabitat .care-summary-button:hover:enabled{
 background:linear-gradient(#142236,#071422);
}
#companion #companionHabitat .care-summary-button img{width:120px;height:100%;object-fit:fill}
#companion .care-summary-label{
 position:absolute;inset:0 0 0 48px;display:grid;place-items:center;
 padding-inline:5px;background:linear-gradient(110deg,#101c2c,#071422);
 text-align:center;text-transform:uppercase;font:bold clamp(10px,2vw,19px)/1 Georgia,serif;
}
#companion .care-summary-label b{
 color:#ffe0a0;background:linear-gradient(#fff6ce 15%,#ffdc82 48%,#d99726 85%,#ffe0a0);
 background-clip:text;-webkit-text-fill-color:transparent;
 filter:drop-shadow(0 1px 0 #8d4d12) drop-shadow(0 2px 1px #000);
}

#companion #companionHabitat .care-pet-heading{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;
}
#companion .care-pet-heading>div{min-width:0}
#companion #companionHabitat #companionSkills{flex:0 0 min(25%,60px);height:20px}
#companion #companionHabitat #companionSkills img{width:60px}
#companion #companionSkills .care-summary-label{left:40%;padding-inline:1px;font-size:8px}
#companion #companionHabitat #companionDaily{width:min(80%,288px)}

#companion .soldier-info-dialog{
 width:min(460px, calc(100vw - 32px));max-height:min(620px, 85dvh);box-sizing:border-box;
 margin:auto;padding:16px;overflow:auto;color:#f2e9da;background:#152a38;
 border:1px solid #759097;border-radius:14px;box-shadow:0 16px 60px #0008;
}
#companion .soldier-info-dialog::backdrop{background:#071218a6}
#companion img.guardian-info-art{display:block;object-fit:contain;background:none!important}

/* v1.00.04 HUD layout: framed compact pet panel, clear bottom dock, stacked
   window controls under right-aligned resources. */
#companion .world-game-dock,#companion .companion-world-shell:fullscreen .world-game-dock{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important;border:0!important}
#companion .world-game-dock::before,#companion .world-game-dock::after{content:none!important;display:none!important}
#companion .world-topbar #companionHudPet.world-pet-badge,#companion .companion-world-shell:fullscreen .world-topbar #companionHudPet.world-pet-badge{background:rgba(24,43,55,.44)!important;border:1px solid rgba(196,173,120,.5)!important;border-radius:7px!important;box-shadow:none!important;width:auto!important;transform:scale(.7)!important;transform-origin:top left!important}
#companion .world-topbar .world-resources,#companion #companionResources{margin-left:auto!important;justify-content:flex-end!important;position:absolute!important;right:14px!important;top:6px!important;left:auto!important}
#companion .world-compact-actions,#companion .companion-world-shell:fullscreen .world-compact-actions{flex-direction:column!important;top:40px!important;right:14px!important;gap:8px!important}
#companion .world-compact-actions #companionFullscreen{order:-1}

/* v1.00.05 HUD: compact window controls, pet panel transparency matched to
   the dock buttons. */
#companion .world-compact-actions,#companion .companion-world-shell:fullscreen .world-compact-actions{top:40px!important;right:14px!important;gap:6px!important}
#companion .world-compact-actions button,#companion .world-compact-actions button:is(:hover,:focus,:active){
 width:28px!important;min-width:28px!important;max-width:28px!important;
 height:28px!important;min-height:28px!important;max-height:28px!important;flex:0 0 28px;
 margin:0;padding:0!important;border:0!important;box-shadow:none!important;box-sizing:border-box;
 background:transparent url('/vectors/approved-hd/runtime/toolbar-controls-v089.webp') var(--toolbar-frame,0 0) / 400% 100% no-repeat!important;
 opacity:.7!important;transform:none!important;transition:none!important;-webkit-tap-highlight-color:transparent;
}
#companion .world-compact-actions button:not(:focus-visible){outline:none}
#companion .world-compact-actions button:focus-visible{outline:2px solid var(--hud-gold-highlight);outline-offset:2px}
#companion .world-compact-actions .game-audio-toggle[data-sound="off"]{--toolbar-frame:33.333% -2.5px}
#companion .world-compact-actions #companionFullscreen{--toolbar-frame:66.667% 0}
#companion .world-compact-actions #companionFullscreen[aria-label="Exit full screen"]{--toolbar-frame:100% 0}
#companion .world-compact-actions #companionFullscreen svg{visibility:hidden}
#companion .world-topbar #companionHudPet.world-pet-badge{filter:none!important}
#companion .world-topbar #companionHudPet .pet-level-badge{background:rgba(24,43,55,.44)!important;border:1px solid rgba(196,173,120,.5)!important;box-shadow:none!important}

/* World map: one painted map with pan/zoom; plots are transparent frames tinted by land class. */
#companion .world-map-overlay{position:absolute;inset:0;z-index:60;display:flex;flex-direction:column;background:#0b1814;color:#f4f1e3}
#companion .world-map-overlay[hidden]{display:none}
#companion .world-map-head{position:relative;z-index:3;display:flex;align-items:center;gap:12px;padding:10px 14px;background:rgba(8,18,22,.82);border-bottom:1px solid rgba(196,173,120,.5)}
#companion .world-map-title h2{margin:0;font-size:17px;color:#ffe9b8}
#companion .world-map-hint{margin:2px 0 0;font-size:11px;color:#d6ddd2}
#companion .world-map-legend{display:flex;flex-wrap:wrap;gap:4px 12px;margin-left:auto;max-width:52%;font-size:10px}
#companion .world-map-legend-item{display:grid;grid-template-columns:12px auto;column-gap:5px;align-items:center}
#companion .world-map-legend-item i{grid-row:span 2;width:12px;height:12px;border-radius:3px;border:2px solid var(--land);background:transparent}
#companion .world-map-legend-item small{color:#cfd6cb}
#companion .world-map-zoom{display:flex;gap:6px}
#companion #worldMap .world-map-zoom button{width:32px;height:32px;min-height:0!important;padding:0!important;border-radius:7px!important;border:1px solid rgba(196,173,120,.5)!important;background:rgba(24,43,55,.44)!important;color:#ffe9b8!important;font-size:18px;font-weight:800;line-height:1}
#companion #worldMap button.world-map-close{flex:0 0 32px;width:32px;height:32px}
#companion .world-map-viewport{position:relative;flex:1;overflow:hidden;cursor:grab;touch-action:none;user-select:none;background:#0b1814}
#companion .world-map-viewport.dragging{cursor:grabbing}
#companion .world-map-stage{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform}
#companion .world-map-canvas{position:absolute;left:0;top:0;display:block;border-radius:18px;box-shadow:0 0 0 2px rgba(196,173,120,.35),0 20px 60px #000c}
#companion .world-map-markers{position:absolute;inset:0}
#companion #worldMap button.world-plot{position:absolute;box-sizing:border-box;margin:0;padding:0!important;min-height:0!important;border-radius:10px!important;border:2px solid var(--land)!important;background:rgba(255,255,255,.02)!important;box-shadow:inset 0 0 0 1px rgba(0,0,0,.25)!important;opacity:.82;cursor:pointer;transform:scale(.94);transition:background-color .15s,opacity .15s}
#companion #worldMap button.world-plot:hover,#companion #worldMap button.world-plot:focus-visible{opacity:1;background:rgba(255,255,255,.12)!important;outline:none}
#companion #worldMap button.world-plot.mine{border:4px solid #ffd477!important;opacity:1}
#companion #worldMap button.world-plot.wild{border-style:dashed!important}
#companion #worldMap button.world-plot:disabled{cursor:default;opacity:.35;background:rgba(0,0,0,.38)!important}
#companion #worldMap .plot-name{position:absolute;left:50%;bottom:8px;transform:translateX(-50%);max-width:92%;padding:2px 8px;border-radius:999px;background:rgba(8,18,22,.55);color:#fff3cf;font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none;text-shadow:0 1px 2px #000}
#companion .world-map-dialog-backdrop{position:absolute;inset:0;z-index:4;display:flex;align-items:center;justify-content:center;padding:16px;background:linear-gradient(90deg,rgba(0,0,0,.74),rgba(0,0,0,.3) 30%,rgba(0,0,0,.3) 70%,rgba(0,0,0,.74))}
#companion .world-map-dialog-backdrop[hidden]{display:none}
#companion .world-map-dialog{width:min(380px,100%);max-height:100%;overflow:auto;padding:14px 16px;border-radius:10px;background:rgba(14,28,34,.97);border:1px solid var(--land,rgba(196,173,120,.6));box-shadow:0 18px 50px #000a}
#companion #worldMap .world-map-dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;background:none!important;border:0!important;padding:0!important;box-shadow:none!important;min-height:0!important}
#companion .world-map-dialog h3{margin:0;font-size:17px;color:#ffe9b8}
#companion .world-map-dialog dl{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;margin:8px 0;font-size:12px}
#companion .world-map-dialog dt{color:#b9c6c0}#companion .world-map-dialog dd{margin:0;color:#f4f1e3}
#companion #worldMap canvas.world-map-bot{display:block;width:min(240px,70%);aspect-ratio:1;margin:-10px auto -22px}
#companion .world-map-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
#companion #worldMap .world-map-actions button{flex:1 1 140px;min-height:40px;border-radius:7px!important;border:1px solid rgba(196,173,120,.6)!important;background:rgba(24,43,55,.8)!important;color:#fff3cf!important;font-weight:700}
#companion #worldMap .world-map-actions button.primary{background:linear-gradient(180deg,#b8823c,#7d5320)!important}
#companion .world-map-actions button:disabled{opacity:.5}
@media(max-width:900px){#companion .world-map-legend{display:none}#companion .world-map-hint{display:none}#companion #worldMap .plot-name{font-size:12px}}

/* World map as its own scene: painted edge to edge, floating controls, half-size plot markers. */
#companion #worldMap .world-map-head{position:absolute;left:0;right:0;top:0;background:linear-gradient(rgba(8,18,22,.72),rgba(8,18,22,0))!important;border-bottom:0!important;pointer-events:none}
#companion #worldMap .world-map-head>*{pointer-events:auto}
#companion #worldMap .world-map-canvas{border-radius:0;box-shadow:none}
#companion #worldMap button.world-plot{border-width:1.5px!important;border-radius:7px!important;transform:scale(.9);opacity:.75}
#companion #worldMap button.world-plot.mine{border-width:3px!important}
#companion #worldMap .plot-name{bottom:4px;padding:1px 5px;font-size:10px;max-width:96%}
#companion #worldMap .world-map-legend-item{background:rgba(8,18,22,.55);padding:2px 6px;border-radius:6px}
@media(max-width:900px){#companion #worldMap .plot-name{font-size:9px}}
#companion #worldMap .plot-name{max-width:none;overflow:visible;z-index:1}

/* Scout (visiting another base) bar. */
#companion .scout-bar{position:absolute;left:50%;top:56px;transform:translateX(-50%);z-index:12;display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:9px;background:rgba(24,43,55,.82);border:1px solid rgba(196,173,120,.6);box-shadow:0 6px 18px #0008;color:#fff3cf}
#companion .scout-bar[hidden]{display:none}
/* On the clan's land (companion-clan.js): the same bar, its buttons on one line. */
#companion .clan-land-bar button.scout-action{white-space:nowrap}
/* Once the Clan Hall stands only the way home is left: a button with no panel round it. */
#companion .clan-land-bar.alone{padding:0;background:none;border:0;box-shadow:none}
#companion .clan-works .fx-shop-list{grid-column:1/-1}
#companion .fx-shop-row.fx-clan-store.clan-beast{grid-template-columns:46px minmax(0,1fr) auto}
#companion .clan-beast-art{width:46px;height:46px;object-fit:contain}
/* Names over the clan mates' pets on the clan's land. */
#companion .clan-names{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:6}
#companion .clan-name{position:absolute;left:0;top:0;padding:1px 7px;border-radius:8px;background:rgba(12,24,34,.72);border:1px solid rgba(196,173,120,.6);color:#ffe9a3;font-size:12px;font-weight:700;white-space:nowrap}
#companion .clan-store-here{display:grid;gap:6px;grid-column:1/-1}
#companion .clan-bed-note{display:block;grid-column:1/-1;color:#ffd98a}
#companion .scout-title{display:flex;flex-direction:column;margin-right:4px;line-height:1.15}#companion .scout-title small{font-size:10px;color:#d6ddd2}
#companion .scout-bar button.scout-action{min-height:34px;padding:4px 10px;border-radius:7px;border:1px solid rgba(196,173,120,.6);background:rgba(24,43,55,.9);color:#fff3cf;font-weight:700;font-size:12px;cursor:pointer}
#companion .scout-bar button.scout-action.primary{background:linear-gradient(180deg,#b8823c,#7d5320)}
#companion .scout-bar button.scout-action:disabled{opacity:.5;cursor:default}
@media(max-width:900px){#companion .scout-bar{top:44px;gap:5px;padding:4px 6px}#companion .scout-title small{display:none}#companion .scout-bar button.scout-action{font-size:10px;padding:3px 7px;min-height:30px}}
/* Round island plots; owned plots show the pet portrait and a level-coloured name frame (same tiers as the HUD LVL badge). */
#companion #worldMap button.world-plot{border-radius:50%!important;transform:none;opacity:.7;border-width:1.5px!important}
#companion #worldMap button.world-plot.owned{opacity:1;border-color:transparent!important;background:transparent!important;box-shadow:none!important}
#companion #worldMap .plot-pet{--level-light:#d5e8f4;--level-mid:#8098ab;--level-dark:#40546a;--level-surface:#344b5b;--level-ink:#e8f3fa;position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;pointer-events:none}
#companion #worldMap .plot-pet[data-level-tier="1"]{--level-light:#c2f1b3;--level-mid:#57ad6e;--level-dark:#285b49;--level-surface:#304f43;--level-ink:#caffc5}
#companion #worldMap .plot-pet[data-level-tier="2"]{--level-light:#c4ecff;--level-mid:#4d9fe1;--level-dark:#284985;--level-surface:#2a4565;--level-ink:#bfe8ff}
#companion #worldMap .plot-pet[data-level-tier="3"]{--level-light:#efd0ff;--level-mid:#ac75e5;--level-dark:#603d92;--level-surface:#45375d;--level-ink:#e9ccff}
#companion #worldMap .plot-pet[data-level-tier="4"]{--level-light:#ffd3a7;--level-mid:#e77b58;--level-dark:#963b4c;--level-surface:#593b3d;--level-ink:#ffd3b3}
#companion #worldMap .plot-pet[data-level-tier="5"]{--level-light:#fff2b1;--level-mid:#e9b747;--level-dark:#956327;--level-surface:#54482c;--level-ink:#ffe698}
#companion #worldMap .plot-pet img{width:78%;height:auto;margin-bottom:-6px;filter:drop-shadow(0 3px 3px #000a)}
#companion #worldMap .plot-pet-name{position:relative;z-index:1;max-width:none;padding:1px 6px;border:1.5px solid transparent;border-radius:6px;white-space:nowrap;font-size:10px;font-weight:800;line-height:1.3;color:var(--level-ink);
 background:linear-gradient(155deg,var(--level-surface),#142735) padding-box,linear-gradient(135deg,var(--level-light),var(--level-mid) 50%,var(--level-dark)) border-box;box-shadow:0 2px 5px #0009}
#companion #worldMap button.world-plot.mine .plot-pet-name{outline:2px solid #ffd477;outline-offset:1px}
@media(max-width:900px){#companion #worldMap .plot-pet-name{font-size:9px}}
#companion #worldMap .plot-bots{position:absolute;inset:0;pointer-events:none}
#companion #worldMap .plot-bot{position:absolute;width:74%;left:calc(14% - var(--i)*14%);bottom:calc(6% + var(--i)*16%);filter:drop-shadow(0 3px 3px #000a) brightness(calc(1 - var(--i)*.18));transform:scale(calc(1 - var(--i)*.12));transform-origin:50% 100%}
#companion #worldMap .plot-bot.front{left:22%;z-index:1}
/* Stronger land-class colours: bright ring plus a light tint of the class colour. */
#companion #worldMap button.world-plot{opacity:1;border-width:2.5px!important;background:color-mix(in srgb,var(--land) 16%,transparent)!important;box-shadow:0 0 0 1px rgba(0,0,0,.35),inset 0 0 10px color-mix(in srgb,var(--land) 45%,transparent)!important}
#companion #worldMap button.world-plot.wild{background:color-mix(in srgb,var(--land) 22%,transparent)!important}
#companion #worldMap button.world-plot:not(.wild):not(.owned)[aria-label^="Free Open"]{border-width:1.5px!important;background:transparent!important;box-shadow:inset 0 0 6px rgba(255,255,255,.18)!important;opacity:.6}
#companion #worldMap button.world-plot:disabled{opacity:.45}
#companion #worldMap .world-map-legend-item i{border-width:3px;background:color-mix(in srgb,var(--land) 30%,transparent)}

/* Edge-to-edge City travel artwork and pet-only arena. */
#companion #companionMapMenu{padding:0!important;gap:0;justify-content:center}
#companion #companionMapMenu .world-popup-header{display:none!important}
#companion #companionMapLocations{height:100dvh!important;width:calc(100dvh * 1672 / 941)!important;max-width:none!important;aspect-ratio:1672/941!important;margin:0!important;border-radius:0;position:relative;flex-shrink:0}
#companionMapLocations [data-place="arena"]{left:12%;top:37.5%}
#companion #companionMapMobile{display:none}
#companion #pvpArena[hidden],#companion #pvpQueueBadge[hidden]{display:none!important}
#companion #pvpArena{position:fixed;inset:0;z-index:135;display:grid;place-items:center;padding:16px;background:linear-gradient(#07131ba8,#07131bd9),url('/companions/modern/training-ground-v089.png') center/cover;backdrop-filter:blur(3px);color:#fff0d5}
#pvpArena .pvp-card{box-sizing:border-box;width:min(760px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;background:rgba(24,43,55,.94);border:1px solid rgba(196,173,120,.5);border-radius:7px;box-shadow:0 24px 70px #0009}
#pvpArena .pvp-header{display:flex;align-items:center;justify-content:space-between;gap:12px}
#pvpArena .pvp-eyebrow{font-size:11px;letter-spacing:.2em;color:#d9bd7d}
#pvpArena h2{font-size:30px;margin:10px 0}
#pvpArena .pvp-subtitle{color:#c4d8de}
#pvpArena .pvp-rules{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}
#pvpArena .pvp-rules>div{padding:12px;background:#0b202b80;border:1px solid #c4ad7840;border-radius:7px}
#pvpArena .pvp-rules strong,#pvpArena .pvp-rules span{display:block;margin:4px 0}
#pvpArena .pvp-rules span,#pvpArena .pvp-help{font-size:12px;line-height:1.6;color:#b9cbd0}
#pvpArena select{width:auto;margin-left:12px;padding:8px;background:#102c3a;color:#fff0d5;border:1px solid #c4ad7880;border-radius:5px}
#companion #pvpArena button,#companion #pvpQueueBadge{padding:9px 14px;min-height:38px;border:1px solid #c4ad7880;border-radius:7px;background:rgba(24,43,55,.85);color:#fff0d5;cursor:pointer}
#companion #pvpArena button:hover{background:#315567}
#companion #pvpArena button:disabled{opacity:.45;cursor:default}
#pvpArena .pvp-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
#companion #pvpQueueBadge{position:absolute;right:18px;bottom:90px;z-index:125}
#pvpArena .pvp-result{padding:12px;border-left:3px solid #d9bd7d;background:#d9bd7d10}
#pvpArena .pvp-field{position:relative;height:260px;overflow:hidden;background:url('/companions/modern/training-ground-v089.png') center/cover;border-radius:7px;border:1px solid #c4ad7880;cursor:crosshair}
#pvpArena .pvp-fighter{position:absolute;transform:translate(-50%,-70%);width:100px;text-align:center;pointer-events:none;transition:left .3s,top .3s}
#pvpArena .pvp-fighter img{display:block;width:85px;height:85px;object-fit:contain;margin:auto;filter:drop-shadow(0 6px 3px #0009)}
#pvpArena .pvp-fighter span{display:block;white-space:nowrap;font-size:10px;text-shadow:0 1px 3px #000;background:#102c3ac9;border-radius:4px;padding:3px}
#pvpArena meter{display:block;width:100%;height:10px;accent-color:#78cfa8}
#pvpArena .enemy meter{accent-color:#e7937e}
#pvpArena .pvp-combat-log{font-size:12px;min-height:18px}
@media(max-height:500px){#pvpArena .pvp-card{padding:14px;max-height:calc(100dvh - 16px)}#pvpArena .pvp-rules{margin:10px 0}#pvpArena .pvp-field{height:180px}#pvpArena h2{font-size:23px;margin:5px 0}}
/* Arena panel: waiting list with filters. */
#pvpArena .pvp-filters{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 8px}
#pvpArena .pvp-filters select,#pvpArena .pvp-filters input{flex:1 1 120px;min-height:32px;border-radius:7px;border:1px solid rgba(196,173,120,.6);background:rgba(14,28,34,.9);color:#fff3cf;padding:2px 8px}
#pvpArena .pvp-list{display:flex;flex-direction:column;gap:5px;max-height:220px;overflow:auto;margin-bottom:8px}
#pvpArena .pvp-row{display:grid;grid-template-columns:40px 1fr auto auto;align-items:center;gap:8px;padding:5px 8px;border-radius:8px;background:rgba(24,43,55,.6);border:1px solid rgba(196,173,120,.35)}
#pvpArena .pvp-row img{width:40px;height:40px;object-fit:contain}
#pvpArena .pvp-who{display:flex;flex-direction:column;min-width:0}#pvpArena .pvp-who small{font-size:10px;color:#cdd7d1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#pvpArena .pvp-odds{font-size:11px;color:#ffd98a;white-space:nowrap}
/* Diamond land tiles (a square turned 45°, like the home land) and sprite-based pet portraits. */
#companion #worldMap button.world-plot,#companion #worldMap button.world-plot.owned,#companion #worldMap button.world-plot.wild{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;opacity:1;overflow:visible}
#companion #worldMap button.world-plot::before{content:'';position:absolute;left:18%;top:18%;width:64%;height:64%;transform:rotate(45deg);border:2.5px solid var(--land);border-radius:4px;background:color-mix(in srgb,var(--land) 18%,transparent);box-shadow:0 0 0 1px rgba(0,0,0,.35),inset 0 0 10px color-mix(in srgb,var(--land) 45%,transparent);pointer-events:none}
#companion #worldMap button.world-plot::after{display:none}
#companion #worldMap button.world-plot.wild::before{border-style:dashed;background:color-mix(in srgb,var(--land) 24%,transparent)}
#companion #worldMap button.world-plot[aria-label^="Free Open"]::before{border-width:1.5px;background:transparent;box-shadow:inset 0 0 6px rgba(255,255,255,.18);opacity:.6}
#companion #worldMap button.world-plot.mine::before{border:3.5px solid #ffd477;box-shadow:0 0 12px rgba(255,212,119,.7)}
#companion #worldMap button.world-plot:hover::before,#companion #worldMap button.world-plot:focus-visible::before{background:color-mix(in srgb,var(--land) 38%,transparent)}
#companion #worldMap button.world-plot:disabled::before{opacity:.45}
#companion #worldMap .plot-pet,#companion #worldMap .plot-bots{z-index:1}
#companion #worldMap .plot-pet-art{display:block;width:78%;aspect-ratio:1;margin-bottom:-4px;background:url('/vectors/world-map/world-map-pets-v1.webp') 0 0/600% 600% no-repeat;filter:drop-shadow(0 3px 3px #000a)}
/* Territory conquered celebration. */
#companion .territory-celebration{position:absolute;inset:0;z-index:70;display:flex;align-items:center;justify-content:center;padding:16px;background:radial-gradient(circle at 50% 40%,rgba(255,214,120,.25),rgba(0,0,0,.72) 60%);animation:territory-in .35s ease-out}
#companion .territory-card{width:min(380px,100%);padding:18px 20px;border-radius:12px;text-align:center;background:rgba(14,28,34,.97);border:2px solid var(--land);box-shadow:0 0 40px color-mix(in srgb,var(--land) 45%,transparent),0 18px 50px #000b;color:#f4f1e3}
#companion .territory-eyebrow{font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#ffd477}
#companion .territory-card h2{margin:6px 0 4px;font-size:22px;color:var(--land)}
#companion .territory-card h3{margin:12px 0 4px;font-size:13px;color:#ffe9b8}
#companion .territory-desc,#companion .territory-note{margin:0;font-size:12px;color:#d6ddd2}
#companion .territory-income{list-style:none;margin:0 0 10px;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
#companion .territory-income li{padding:4px 10px;border-radius:999px;border:1px solid var(--land);background:color-mix(in srgb,var(--land) 18%,transparent);font-weight:800;font-size:13px}
#companion .territory-actions{display:flex;gap:8px;margin-top:14px}
#companion .territory-actions button{flex:1;min-height:40px;border-radius:7px;border:1px solid rgba(196,173,120,.6);background:rgba(24,43,55,.85);color:#fff3cf;font-weight:700;cursor:pointer}
#companion .territory-actions button.primary{background:linear-gradient(180deg,#b8823c,#7d5320)}
@keyframes territory-in{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}
#companion #worldMap .world-map-zoom{display:none}
/* World-map dialog portraits: half the old size; several holders stack like the map markers. */
#companion #worldMap .dialog-portrait{position:relative;width:120px;height:120px;margin:-4px auto 2px}
#companion #worldMap .dialog-portrait .plot-pet-art{width:100%}
#companion #worldMap canvas.world-map-bot{width:120px;margin:0}
#companion #worldMap .dialog-bots{width:150px}
#companion #worldMap .dialog-bot{position:absolute;bottom:0;width:120px;height:120px;object-fit:contain}
#companion #worldMap img.dialog-bot{left:calc(30px - var(--i)*26px);bottom:calc(var(--i)*14px);transform:scale(calc(1 - var(--i)*.14));transform-origin:50% 100%;filter:brightness(calc(1 - var(--i)*.2)) drop-shadow(0 3px 3px #000a)}
#companion #worldMap canvas.dialog-bot.front{left:30px;z-index:1}

/* World map keeps the same full-screen and sound buttons as every other scene:
   lifted above the map, stacked under its close button, hidden behind dialogs. */
#companion .world-map-overlay>.world-compact-actions{z-index:4!important;top:72px!important}
#companion .world-map-overlay:has(.world-map-dialog-backdrop:not([hidden]))>.world-compact-actions{visibility:hidden}

/* World map loading screen: the map stays hidden until its paint, pets and
   wild holders are ready, then fades in under the lifting veil. */
#companion #worldMap:not(.world-map-ready) :is(.world-map-viewport,.world-map-head,.world-map-dialog-backdrop){visibility:hidden}
#companion #worldMap .world-map-viewport{transition:opacity .45s ease}
#companion #worldMap:not(.world-map-ready) .world-map-viewport{opacity:0}
#companion .world-map-loading{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;padding:16px;
 background:radial-gradient(ellipse at 50% 42%,rgba(52,94,70,.6),rgba(6,14,12,.97) 64%),repeating-radial-gradient(circle at 30% 70%,rgba(214,174,98,.035) 0 2px,transparent 2px 22px),#081410;
 transition:opacity .45s ease}
#companion .world-map-ready>.world-map-loading{opacity:0;pointer-events:none}
#companion .world-map-loading-card{display:flex;flex-direction:column;align-items:center;gap:10px;width:min(340px,100%);padding:22px 22px 18px;border-radius:14px;text-align:center;
 background:linear-gradient(rgba(14,30,32,.9),rgba(8,18,20,.94));border:1px solid var(--hud-gold-edge,#c4ad78);
 box-shadow:0 0 0 3px rgba(8,18,20,.75),0 0 0 4px rgba(196,173,120,.35),0 22px 60px #000c;animation:wml-rise .5s cubic-bezier(.2,.8,.2,1) both}
#companion .world-map-loading-emblem{position:relative;width:110px;height:110px;display:grid;place-items:center}
#companion .world-map-loading-emblem img{width:84px;height:84px;object-fit:contain;animation:wml-breathe 2.4s ease-in-out infinite}
#companion .world-map-loading-ring{position:absolute;inset:0;border-radius:50%;border:2px solid rgba(196,173,120,.18);border-top-color:#f0d58e;border-right-color:rgba(240,213,142,.5);animation:wml-spin 1.6s linear infinite}
#companion .world-map-loading-title{color:#f3dfae;font-size:14px;font-weight:700;letter-spacing:.24em;text-transform:uppercase;text-shadow:0 1px 0 #000}
#companion .world-map-loading-bar{width:100%;height:8px;border-radius:5px;background:rgba(0,0,0,.55);border:1px solid rgba(196,173,120,.45);overflow:hidden}
#companion .world-map-loading-bar>i{display:block;width:4%;height:100%;border-radius:4px;background:linear-gradient(90deg,#8a6a2c,#f0d58e,#fff1c2);box-shadow:0 0 10px rgba(240,213,142,.6);transition:width .35s ease}
#companion .world-map-loading-step{margin:0;color:#cfe0d6;font-size:12px}
#companion .world-map-loading-tip{color:#8fa9a3;font-size:11px;line-height:1.5;max-width:280px}
@keyframes wml-spin{to{transform:rotate(360deg)}}
@keyframes wml-breathe{50%{transform:scale(1.06);filter:drop-shadow(0 0 10px rgba(240,213,142,.45))}}
@keyframes wml-rise{from{opacity:0;transform:translateY(10px) scale(.97)}}
@media(prefers-reduced-motion:reduce){#companion .world-map-loading :is(.world-map-loading-ring,img,.world-map-loading-card){animation:none}}

/* Land dialog: name centred on top, live idle animation under it, no close button. */
#companion #worldMap .world-map-dialog header{justify-content:center!important;text-align:center}
#companion #worldMap .world-map-dialog h3{font-size:19px;letter-spacing:.02em;text-shadow:0 1px 0 #000}
#companion #worldMap .world-map-dialog:focus{outline:none}
#companion #worldMap .dialog-pet{width:150px;height:150px}
#companion #worldMap .dialog-pet .plot-pet-art{position:absolute;inset:0;transition:opacity .3s}
#companion #worldMap .dialog-pet-live{position:absolute;inset:0;width:100%;height:100%;opacity:0;transition:opacity .3s}
#companion #worldMap .dialog-pet-live.playing{opacity:1}
#companion #worldMap .dialog-pet:has(.dialog-pet-live.playing) .plot-pet-art{opacity:0}

/* Travel (City) map destinations: HUD plaques with gold frames. Motion lives on
   the inner label so the button's centring transform is never disturbed. */
#companion #companionMapLocations button,#companion #companionMapLocations button:is(:hover,:focus-visible,.active){
 width:auto!important;min-width:0!important;height:auto!important;min-height:0!important;padding:0!important;
 border:0!important;background:none!important;box-shadow:none!important;outline:none;overflow:visible}
#companion #companionMapLocations button span{
 position:relative;display:block;min-width:0;padding:7px 16px 8px!important;border-radius:9px!important;overflow:hidden;
 background:linear-gradient(180deg,rgba(32,52,58,.96),rgba(12,24,28,.97))!important;
 border:1px solid var(--hud-gold-edge,#d6ae62);color:#f6e3b4!important;
 font-size:clamp(11px,1.35vw,14px)!important;font-weight:700;letter-spacing:.06em;text-transform:uppercase;text-shadow:0 1px 0 #000;
 box-shadow:inset 0 1px 0 rgba(255,236,190,.22),0 0 0 2px rgba(8,16,18,.7),0 6px 14px rgba(0,0,0,.55);
 transition:transform .22s cubic-bezier(.2,.9,.3,1.3),box-shadow .22s ease,color .22s ease,border-color .22s ease;
 animation:map-dest-in .5s cubic-bezier(.2,.8,.2,1) both}
#companion #companionMapLocations button span::after{content:'';position:absolute;inset:0 auto 0 -60%;width:45%;
 background:linear-gradient(100deg,transparent,rgba(255,240,200,.35),transparent);transform:skewX(-18deg);opacity:0;pointer-events:none}
#companion #companionMapLocations button:is(:hover,:focus-visible):not(:disabled) span{
 transform:translateY(-3px) scale(1.05);color:#fff4d2!important;border-color:var(--hud-gold-highlight,#f4d793);
 box-shadow:inset 0 1px 0 rgba(255,236,190,.35),0 0 0 2px rgba(8,16,18,.7),0 10px 20px rgba(0,0,0,.55),0 0 18px rgba(244,215,147,.45)}
#companion #companionMapLocations button:is(:hover,:focus-visible):not(:disabled) span::after{animation:map-dest-shine .7s ease-out}
#companion #companionMapLocations button:active:not(:disabled) span{transform:translateY(0) scale(.96);transition-duration:.08s}
#companion #companionMapLocations button:disabled span{filter:grayscale(.7) brightness(.7)}
/* Current location: gold pin bobbing above the plaque. */
#companion #companionMapLocations button.active span{border-color:var(--hud-gold-highlight,#f4d793);background:linear-gradient(180deg,rgba(74,60,30,.96),rgba(30,24,12,.97))!important}
#companion #companionMapLocations button.active::before{content:'';position:absolute;left:50%;bottom:calc(100% + 4px);width:14px;height:14px;margin-left:-7px;
 border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:radial-gradient(circle at 40% 40%,#fff3c6,#f0c766 45%,#9b7228);
 box-shadow:0 0 10px rgba(244,215,147,.8);animation:map-dest-pin 1.6s ease-in-out infinite}
#companion #companionMapLocations button:nth-child(2) span{animation-delay:.05s}#companion #companionMapLocations button:nth-child(3) span{animation-delay:.1s}
#companion #companionMapLocations button:nth-child(4) span{animation-delay:.15s}#companion #companionMapLocations button:nth-child(5) span{animation-delay:.2s}
#companion #companionMapLocations button:nth-child(6) span{animation-delay:.25s}#companion #companionMapLocations button:nth-child(n+7) span{animation-delay:.3s}
@keyframes map-dest-in{from{opacity:0;transform:translateY(8px) scale(.9)}}
@keyframes map-dest-shine{from{left:-60%;opacity:1}to{left:120%;opacity:0}}
@keyframes map-dest-pin{50%{transform:rotate(-45deg) translate(3px,-3px)}}
/* Phone list: same plaques. */
#companion .map-mobile-destinations button{border:1px solid var(--hud-gold-edge,#d6ae62)!important;border-radius:10px!important;
 background:linear-gradient(180deg,rgba(32,52,58,.96),rgba(12,24,28,.97))!important;color:#f6e3b4!important;
 box-shadow:inset 0 1px 0 rgba(255,236,190,.2),0 4px 10px rgba(0,0,0,.5)!important;transition:transform .15s ease,box-shadow .15s ease}
#companion .map-mobile-destinations button:active:not(:disabled){transform:scale(.97)}
#companion .map-mobile-destinations img{border:1px solid rgba(214,174,98,.6)}
@media(prefers-reduced-motion:reduce){#companion #companionMapLocations button span,#companion #companionMapLocations button.active::before{animation:none!important}}

/* Inventory: 5 x 4 slots per page, each half the former size (former slot = 1/4 width). */
#companion .inventory-window .inventory-slot-grid{grid-template-columns:repeat(5,calc(12.5% - 3px))!important;gap:6px!important;justify-content:start;align-content:start}
#companion .inventory-window .inventory-slot .inventory-quantity{font-size:9px}
#companion .inventory-window .inventory-slot .inventory-slot-number{font-size:7px}
#companion .inventory-window .inventory-locked-slot{opacity:.35;cursor:default;background:repeating-linear-gradient(135deg,#14262e 0 4px,#1a2f36 4px 8px)!important}
/* v2 land dialog portraits: one fixed 150 px box per dialog, nothing layered behind. */
#companion #worldMap .dialog-portrait.dialog-pet,#companion #worldMap .dialog-portrait.dialog-bots{width:150px!important;height:150px!important;margin:2px auto 4px!important}
#companion #worldMap .dialog-pet-live,#companion #worldMap .dialog-bots canvas.dialog-bot.front{position:absolute;left:0!important;top:0;bottom:auto;width:150px!important;height:150px!important;margin:0!important;transform:none}
#companion #worldMap .dialog-bots canvas.dialog-bot.front{opacity:0;transition:opacity .2s}
#companion #worldMap .dialog-bots canvas.dialog-bot.front.playing{opacity:1}

#companion .world-map-overlay>.world-compact-actions{top:40px!important}

/* Desktop: Raid and City portals 30% smaller (82x76 -> 57x53); phone sizes unchanged. */
@media (pointer:fine) and (min-width:901px){
 #companion .home-world-portal,#companion .world-map-button.market-city-entrance{width:57px!important;height:53px!important;padding:3px!important;border-radius:10px!important}
}

/* Inventory halves: items fill the left half in as many 40 px columns as fit
   (4 rows per page); the selected item's info fills the right half. */
#companion .inventory-window .inventory-layout{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:14px!important;align-items:start}
#companion .inventory-window .inventory-slot-grid{grid-template-columns:repeat(auto-fill,40px)!important;grid-auto-rows:40px;gap:6px!important;justify-content:start;min-width:0;flex:none!important}
#companion .inventory-window .inventory-slot{width:40px;height:40px}
#companion .inventory-window .inventory-item-detail{min-width:0;flex:none!important;padding-left:14px;border-left:1px solid rgba(214,174,98,.35)}
@media (max-width:600px){
 #companion .inventory-window .inventory-layout{grid-template-columns:minmax(0,1fr)!important}
 #companion .inventory-window .inventory-item-detail{padding-left:0;border-left:0;border-top:1px solid rgba(214,174,98,.35);padding-top:10px}
}

/* One Back for the whole game: the carved stone (except relocate/rotate controls). */
#companion button[data-gold-icon="back"],#companion button.stone-back{
 background:transparent url('/vectors/approved-hd/runtime/hud-back-stone-v1.svg') center / contain no-repeat!important;
 width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px;
 padding:0!important;border:0!important;box-shadow:none!important;font-size:0!important;color:transparent!important;
 filter:drop-shadow(0 2px 3px rgba(0,0,0,.45));transition:transform .18s cubic-bezier(.2,.9,.3,1.4),filter .18s}
#companion button:is([data-gold-icon="back"],.stone-back):is(:hover,:focus-visible):not(:disabled){transform:translateY(-2px) scale(1.06)!important;filter:drop-shadow(0 4px 6px rgba(0,0,0,.5)) drop-shadow(0 0 7px rgba(244,215,147,.45))}
#companion button:is([data-gold-icon="back"],.stone-back):active:not(:disabled){transform:scale(.94)!important}
#companion button:is([data-gold-icon="back"],.stone-back)::before,#companion button:is([data-gold-icon="back"],.stone-back)::after{content:none!important}

/* Relocate / rotate controls: one framed row, equal gaps, every icon's visible art
   48 px and centred (the sprites fill their cells by 93% / 87-89% / 63%). */
#companion :is(.placement-actions,.building-rotation-toolbar){display:flex!important;align-items:center!important;justify-content:center;gap:8px!important;padding:6px 8px!important;
 background:linear-gradient(180deg,rgba(24,44,52,.9),rgba(10,22,26,.92))!important;border:1px solid var(--hud-gold-edge,#d6ae62)!important;border-radius:12px!important;
 box-shadow:0 0 0 2px rgba(8,16,18,.6),0 8px 18px rgba(0,0,0,.45)!important}
#companion :is(.placement-actions,.building-rotation-toolbar) button{flex:0 0 auto;margin:0!important;align-self:center}
#companion .placement-actions .placement-turn,#companion .building-rotation-toolbar button{width:52px!important;height:52px!important;max-width:none!important;max-height:none!important}
#companion .placement-actions .placement-ok{width:55px!important;height:55px!important;max-width:none!important;max-height:none!important}
#companion .placement-actions .placement-cancel{width:54px!important;height:54px!important;max-width:none!important;max-height:none!important}
#companion .placement-actions .placement-connect{width:76px!important;height:76px!important;max-width:none!important;max-height:none!important;margin:-12px -12px!important}
@media(max-width:600px){
 #companion :is(.placement-actions,.building-rotation-toolbar){gap:5px!important;padding:4px 6px!important}
 #companion .placement-actions .placement-turn,#companion .building-rotation-toolbar button{width:44px!important;height:44px!important}
 #companion .placement-actions .placement-ok{width:46px!important;height:46px!important}
 #companion .placement-actions .placement-cancel{width:45px!important;height:45px!important}
 #companion .placement-actions .placement-connect{width:64px!important;height:64px!important;margin:-10px!important}
}

/* Close (X) is the chipped carved boulder that pairs with the stone Back. */
#companion button[data-gold-icon="close"]{
 background:transparent url('/vectors/approved-hd/runtime/hud-close-stone-v1.svg') center / contain no-repeat!important;
 width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;max-width:40px;
 padding:0!important;border:0!important;box-shadow:none!important;font-size:0!important;color:transparent!important;
 filter:drop-shadow(0 2px 3px rgba(0,0,0,.45));transition:transform .18s cubic-bezier(.2,.9,.3,1.4),filter .18s}
#companion button[data-gold-icon="close"]:is(:hover,:focus-visible):not(:disabled){transform:translateY(-2px) scale(1.06)!important;filter:drop-shadow(0 4px 6px rgba(0,0,0,.5)) drop-shadow(0 0 7px rgba(255,140,110,.45))}
#companion button[data-gold-icon="close"]:active:not(:disabled){transform:scale(.94)!important}
#companion button[data-gold-icon="close"]::before,#companion button[data-gold-icon="close"]::after{content:none!important}

/* World map v3 header: title centred on top, Back pinned top-left, land legend as a strip along the bottom. */
#companion #worldMap .world-map-head{justify-content:center!important}
#companion #worldMap .world-map-title{position:absolute;left:50%;top:10px;transform:translateX(-50%);text-align:center;white-space:nowrap}
#companion #worldMap .world-map-title h2{font-size:19px;letter-spacing:.04em;text-shadow:0 2px 3px #000}
#companion #worldMap .world-map-hint{text-shadow:0 1px 2px #000}
#companion #worldMap .world-map-legend{position:absolute;left:50%;bottom:12px;top:auto;transform:translateX(-50%);margin:0;max-width:calc(100% - 32px);
 justify-content:center;pointer-events:none;z-index:3}
#companion #worldMap .world-map-legend-item{pointer-events:auto}

/* Window headers: no frame or band around the title; the header (Back, title, X) sits at
   the top of the window content and scrolls away together with it. */
#companion .world-popup-header,#companion .world-controls-drawer .world-popup-header{position:static!important;top:auto!important;
 background:none!important;border:0!important;border-bottom:0!important;box-shadow:none!important;outline:0}
#companion .world-popup-header :is(strong,div){background:none!important;border:0!important;box-shadow:none!important}

/* Marker pets: live idle loop drawn over the still sprite cell, which hides once it plays. */
#companion #worldMap .plot-pet-art{position:relative}
#companion #worldMap .plot-pet-live{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
#companion #worldMap .plot-pet-art:has(.plot-pet-live.playing){background:none!important}
/* Land dialog v3: the animation is a normal block under the name and above the facts. */
#companion #worldMap .world-map-dialog{display:flex;flex-direction:column}
#companion #worldMap .dialog-portrait.dialog-pet,#companion #worldMap .dialog-portrait.dialog-bots{position:relative!important;flex:0 0 auto;width:150px!important;height:150px!important;margin:4px auto 8px!important;overflow:hidden}
#companion #worldMap .dialog-pet-live,#companion #worldMap .dialog-bots canvas.dialog-bot.front{position:static!important;display:block;width:150px!important;height:150px!important;margin:0!important;inset:auto!important;transform:none!important}

/* Pinned window controls: a zero-height sticky bar at the top of the scrolling window. */
#companion .window-pins{position:sticky;top:0;z-index:8;height:0;overflow:visible;pointer-events:none;flex:none;align-self:stretch}
#companion .window-pins>button{position:absolute;top:6px;pointer-events:auto;margin:0!important}
#companion .window-pins>.pinned-back{left:6px}
#companion .window-pins>.pinned-close{right:6px}
#companion .world-popup-header{min-height:52px}

/* Territory scenes (City, Lake, Forest, Meadow): no home HUD, only the stone Back
   (top-left) and the window controls. */
/* Away from home (the Forest, the Lake, the Meadow, the City) the bottom bar stays as it is at home, without Build:
   nothing is built there (owner, 2026-12-03). */
#companion .territory-scene :is(.world-topbar,.world-resources,.world-pet-badge,#companionWorldMapButton,.home-world-portal){display:none!important}
#companion .territory-scene .world-game-dock [data-hud-panel="Build"]{display:none!important}
#companion .territory-back{position:absolute!important;left:14px;top:14px;z-index:40}
#companion .territory-back[hidden]{display:none!important}
/* City shop buttons: translucent HUD glass with a gold edge, floating above each building. */
#companion .market-trade-marker{transform:translate(-50%,-100%)!important;background:linear-gradient(180deg,rgba(24,44,52,.62),rgba(10,22,26,.7))!important;
 border:1px solid var(--hud-gold-edge,#d6ae62)!important;border-radius:10px!important;color:#fbe7b5!important;font-weight:700;letter-spacing:.04em;
 text-shadow:0 1px 2px #000;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);box-shadow:0 0 0 2px rgba(8,16,18,.35),0 6px 14px rgba(0,0,0,.4)!important;
 transition:background .15s,box-shadow .15s}
#companion .market-trade-marker::after{content:'';position:absolute;left:50%;top:100%;width:0;height:0;margin-left:-6px;border:6px solid transparent;border-top-color:var(--hud-gold-edge,#d6ae62)}
#companion .market-trade-marker:is(:hover,:focus-visible){background:linear-gradient(180deg,rgba(40,70,80,.78),rgba(14,30,34,.82))!important;box-shadow:0 0 0 2px rgba(8,16,18,.35),0 0 12px rgba(244,215,147,.45)!important}

/* Dragged inventory item: a framed icon follows the pointer (also in full screen). */
.inventory-drag-ghost{position:fixed!important;z-index:2147483000!important;width:52px!important;height:52px!important;transform:translate(-50%,-55%) scale(1.08);pointer-events:none;
 display:grid;place-items:center;border-radius:9px;border:1px solid #d6ae62;background:linear-gradient(180deg,rgba(32,52,58,.9),rgba(12,24,28,.92))!important;
 box-shadow:0 10px 22px rgba(0,0,0,.55),0 0 12px rgba(244,215,147,.4)}
.inventory-drag-ghost-icon{width:84%;height:84%;object-fit:contain;pointer-events:none}
#companion .inventory-slot.drag-source{opacity:.35}
#companion :is(.inventory-slot,[data-quick-slot]).drag-over{outline:2px solid #f4d793!important;outline-offset:-2px;box-shadow:0 0 10px rgba(244,215,147,.55)!important}

/* Care window: growth (e.g. LEGENDARY · 100%) and LVL chips are square, framed in the
   level-tier colours of the Badge (top-left pet panel). */
#companion :is(#companionStage,#companionLevel){--level-light:#d5e8f4;--level-mid:#8098ab;--level-dark:#40546a;--level-surface:#344b5b;--level-ink:#e8f3fa;
 border-radius:3px!important;border:1px solid transparent!important;color:var(--level-ink)!important;
 background:linear-gradient(155deg,var(--level-surface),#142735) padding-box,linear-gradient(135deg,var(--level-light),var(--level-mid) 50%,var(--level-dark)) border-box!important;
 box-shadow:inset 0 1px 0 #ffffff18,0 2px 6px rgba(0,0,0,.35)!important}
#companion :is(#companionStage,#companionLevel)[data-level-tier="1"]{--level-light:#c2f1b3;--level-mid:#57ad6e;--level-dark:#285b49;--level-surface:#304f43;--level-ink:#caffc5}
#companion :is(#companionStage,#companionLevel)[data-level-tier="2"]{--level-light:#c4ecff;--level-mid:#4d9fe1;--level-dark:#284985;--level-surface:#2a4565;--level-ink:#bfe8ff}
#companion :is(#companionStage,#companionLevel)[data-level-tier="3"]{--level-light:#efd0ff;--level-mid:#ac75e5;--level-dark:#603d92;--level-surface:#45375d;--level-ink:#e9ccff}
#companion :is(#companionStage,#companionLevel)[data-level-tier="4"]{--level-light:#ffd3a7;--level-mid:#e77b58;--level-dark:#963b4c;--level-surface:#593b3d;--level-ink:#ffd3b3}
#companion :is(#companionStage,#companionLevel)[data-level-tier="5"]{--level-light:#fff2b1;--level-mid:#e9b747;--level-dark:#956327;--level-surface:#54482c;--level-ink:#ffe698}

/* School entry: illustrated choices, a small gap, Return home, another gap, then quick items in the same column. */
#companion .training-dock.school-entry{justify-content:safe center!important;overflow-y:auto;gap:14px!important}
#companion .training-dock.school-entry .school-return-home{flex-shrink:0;min-width:180px}
#companion .training-dock.school-entry .quick-item-bar.school-entry-quick{position:static!important;transform:none!important;inset:auto!important;flex-direction:row;flex-wrap:wrap;justify-content:center;max-width:100%;flex-shrink:0;margin-top:4px}
#companion .training-dock.school-entry .school-entry-choices{flex-wrap:wrap;gap:16px}
@media(max-width:520px){#companion .training-dock.school-entry .school-entry-button{width:clamp(120px,40vw,180px)}}
#companion button.quick-item-remove{width:13px!important;height:13px!important;min-height:13px!important;font-size:11px!important}

#companion .school-entry-button.school-art-button{background:none!important;border:0!important;box-shadow:none!important;padding:0!important;width:clamp(140px,26vw,260px)!important;height:auto!important;min-height:0!important;transition:transform .15s,filter .15s}
#companion .school-entry-button.school-art-button img{width:100%!important;height:auto!important;filter:drop-shadow(0 6px 10px #000a)}
#companion .school-entry-button.school-art-button:is(:hover,:focus-visible){transform:translateY(-2px) scale(1.03);filter:brightness(1.08)}
@media(max-height:500px){#companion .school-entry-button.school-art-button{width:clamp(110px,22vh,170px)!important}}
#companion .school-mission-card img,#companion .school-mission-hero img{object-fit:contain}
#companion .school-mission-hero img{width:120px;height:auto}

/* Barracks and Storage: inventory-style split (picker left, details right). */
#companion .building-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start;margin-top:10px}
#companion .building-split-list{display:flex;flex-direction:column;gap:8px;min-width:0}
#companion .building-split-info{display:flex;flex-direction:column;gap:8px;min-width:0;padding:12px;border:1px solid #c4ad7866;border-radius:10px;background:#0f202cb3}
#companion .building-split-info>img.guardian-info-art{width:110px;height:110px;object-fit:contain;align-self:center}
#companion .building-split-info h3,#companion .building-split-heading{margin:0;color:#ffe2a6;font-size:17px}
#companion .building-split-kicker{color:#cdbb92;margin-top:-4px}
#companion button.building-split-pick{display:flex!important;align-items:center;gap:10px;width:100%;min-height:62px;padding:6px 10px!important;text-align:left;border:1px solid #928263!important;border-radius:9px!important;background:linear-gradient(155deg,#254557,#142d3d)!important;color:#fff0d5}
#companion button.building-split-pick img{width:48px;height:48px;object-fit:contain;flex-shrink:0}
#companion button.building-split-pick.selected{border-color:#f4d793!important;box-shadow:0 0 0 2px #f4d79366,inset 0 0 12px #f4d79322!important}
#companion .building-split-label{display:flex;flex-direction:column;min-width:0;gap:2px}
#companion .building-split-label small{color:#cdbb92;font-size:12px}
#companion .building-split-stats{display:grid;grid-template-columns:auto 1fr;gap:3px 12px;margin:0;font-size:13px}
#companion .building-split-stats dt{color:#cdbb92}
#companion .building-split-stats dd{margin:0;color:#fff0d5;font-weight:700;text-align:right}
#companion .building-split-cost,#companion .building-split-note{margin:0;font-size:12px;color:#d9cba8}
#companion .building-split-actions{display:flex;flex-direction:column;gap:6px;margin-top:4px}
#companion .building-split-actions small{color:#ffb18a;text-align:center}
#companion .building-split-primary{min-height:46px!important;font-weight:800;font-size:16px}
#companion .storage-stock-row{display:grid;grid-template-columns:1fr auto;gap:4px 10px;align-items:center;padding:8px 10px;border:1px solid #92826399;border-radius:9px;background:#142d3dcc}
#companion .storage-stock-row b{color:#fff0d5;font-size:14px}
#companion .storage-stock-row.full b{color:#ffcf7a}
#companion .storage-stock-bar{grid-column:1/-1;height:6px;border-radius:3px;background:#0a161f;overflow:hidden}
#companion .storage-stock-bar i{display:block;height:100%;background:linear-gradient(90deg,#7fb46a,#e3c46b)}
#companion .storage-stock-row.full .storage-stock-bar i{background:linear-gradient(90deg,#e3a54b,#ffcf7a)}
@media(max-width:600px){#companion .building-split{grid-template-columns:1fr}}
#companion #companionBuildingClose:focus:not(:focus-visible){outline:none!important}
#companion #companionBuildingModal{box-sizing:border-box;padding-bottom:var(--hud-clear,0px)!important}
#companion #companionBuildingModal .world-building-card{max-height:calc(100% - 8px)!important}

/* Building windows close by tapping outside, so they need no X. */
#companion #companionBuildingClose{display:none!important}
/* Territory stock colours per resource. */
#companion .storage-stock-row.stock-food .storage-stock-bar i{background:linear-gradient(90deg,#6aa84f,#b5d86a)}
#companion .storage-stock-row.stock-wood .storage-stock-bar i{background:linear-gradient(90deg,#7a4a24,#b9824a)}
#companion .storage-stock-row.stock-stone .storage-stock-bar i{background:linear-gradient(90deg,#6f7780,#b8c0c8)}
#companion .storage-stock-row.stock-iron .storage-stock-bar i{background:linear-gradient(90deg,#4f6274,#9fb4c6)}
#companion .storage-stock-row.stock-coins .storage-stock-bar i{background:linear-gradient(90deg,#c8901e,#ffd35a)}
#companion .storage-stock-row.stock-crystal .storage-stock-bar i{background:linear-gradient(90deg,#3f7fd6,#8fe0ff)}
#companion .storage-stock-row.stock-food{border-left:3px solid #8cc35c}#companion .storage-stock-row.stock-wood{border-left:3px solid #a26a38}
#companion .storage-stock-row.stock-stone{border-left:3px solid #9aa3ac}#companion .storage-stock-row.stock-iron{border-left:3px solid #7c93a8}
#companion .storage-stock-row.stock-coins{border-left:3px solid #f0c040}#companion .storage-stock-row.stock-crystal{border-left:3px solid #5fb6f0}
#companion .storage-stock-row.full b{color:#ffcf7a}
/* Compact barracks details. */
#companion .barracks-split .building-split-info{gap:6px;padding:10px}
#companion .barracks-split .building-split-info>img.guardian-info-art{width:76px;height:76px}
#companion .barracks-split .building-split-info h3{text-align:center}
/* Compact alchemy lab. */
#companion .alchemy-panel.recipe-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px}
#companion .recipe-card.recipe-compact{display:flex;flex-direction:column;gap:5px;padding:8px!important;margin:0!important}
#companion .recipe-compact .recipe-head{display:flex;align-items:center;gap:8px}
#companion .recipe-compact .inventory-detail-icon{width:40px!important;height:40px!important;margin:0!important;flex-shrink:0}
#companion .recipe-compact .recipe-title{display:flex;flex-direction:column;min-width:0}
#companion .recipe-compact .recipe-title small,#companion .recipe-compact .recipe-needs{color:#cdbb92;font-size:12px}
#companion .recipe-compact .recipe-needs .missing{color:#ff9f86}
#companion .recipe-compact .recipe-row{display:flex;gap:6px}
#companion .recipe-compact .recipe-row select{flex:0 0 58px;min-height:36px}
#companion .recipe-compact .recipe-row button{flex:1;min-height:36px!important}
#companion .training-dock.school-entry .school-entry-choices{align-items:flex-end!important}

/* Developer 3-in-1 recovery button beside the RAID gate. */
#companion .dev-recover-portal{position:absolute;transform:translate(-50%,-50%);z-index:9;display:grid;place-items:center;gap:0;padding:0!important;border:2px solid #f4d793!important;background:radial-gradient(circle at 35% 30%,#4f8a5c,#1c3a28 75%)!important;box-shadow:0 4px 10px #0008!important;color:#fff3d2;font:800 12px/1 system-ui;cursor:pointer}
#companion .dev-recover-portal small{font-size:8px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#d8f0c8}
#companion .dev-recover-portal:hover{filter:brightness(1.12)}
#companion .dev-recover-portal[hidden]{display:none!important}
#companion .developer-action.developer-action-primary{border-color:#f4d793!important;background:linear-gradient(155deg,#3f7a50,#1f4430)!important}
/* Alchemy lab: ingredients in a column with their own colours, aligned batch/brew row. */
#companion .recipe-compact .recipe-needs{display:flex;flex-direction:column;gap:3px}
#companion .recipe-compact .recipe-needs .recipe-ingredient{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 7px;border-radius:6px;border-left:4px solid var(--ingredient,#cdbb92);background:#0c1a24b3;color:#efe3c5;font-size:12px}
#companion .recipe-compact .recipe-needs .recipe-ingredient b{font-weight:700;color:#fff3d2}
#companion .recipe-compact .recipe-needs .recipe-ingredient.missing b{color:#ff9f86}
#companion .recipe-compact{justify-content:space-between}
#companion .recipe-compact .recipe-row{display:grid!important;grid-template-columns:64px 1fr;gap:6px;margin-top:auto}
#companion .recipe-compact .recipe-row>*{height:38px!important;min-height:38px!important;margin:0!important;box-sizing:border-box}
#companion .recipe-compact .recipe-head{min-height:44px}

/* Quick slots: items are dragged out to clear them, so touches must not scroll. */
#companion .quick-item-slot{touch-action:none}

#companion .dev-recover-portal{pointer-events:auto}

/* Pet special: right edge, vertically centred, in raids, school practice and the PvP arena. */
#companion .companion-world-viewport>.quick-pet-special,.pvp-special-floating{position:absolute!important;right:12px;top:50%;transform:translateY(-50%);z-index:30;width:74px!important;max-width:74px!important;min-height:86px!important;display:grid;gap:3px;justify-items:center;align-content:center;padding:8px 4px!important;border:1px solid #c9a6e9!important;border-radius:12px!important;background:radial-gradient(circle,#514374,#1c2c43)!important;color:#fff0d5;box-shadow:0 6px 18px #0009!important;font-size:10px}
.pvp-special-floating{position:fixed!important;z-index:2147483000}
#companion .companion-world-viewport>.quick-pet-special>span{font-size:26px;color:#f5cf76}
#companion .companion-world-viewport>.quick-pet-special:disabled,.pvp-special-floating:disabled{filter:grayscale(.6) brightness(.75)}
@media(max-width:600px){#companion .companion-world-viewport>.quick-pet-special{right:6px;width:60px!important;max-width:60px!important;min-height:72px!important}}

/* Fence line length control under the placement buttons. */
#companion .placement-fence{position:absolute;left:50%;top:calc(100% + 6px);transform:translateX(-50%);display:flex;align-items:center;gap:6px;padding:4px 6px;border-radius:10px;background:#0f222be8;box-shadow:0 4px 12px #0008;white-space:nowrap;pointer-events:auto}
#companion .placement-fence[hidden]{display:none!important}
#companion .placement-fence button{min-width:40px!important;min-height:40px!important;padding:0!important;font:800 22px/1 system-ui!important}
#companion .placement-fence-info{color:#f3dfb1;font-size:12px;font-weight:700}
#companion .placement-fence.unaffordable .placement-fence-info{color:#ff9b8a}

/* Quick slots always sit in one row: they shrink instead of wrapping (raids, school, PvP, inventory). */
#companion .quick-item-bar,#companion .training-dock.school-entry .quick-item-bar.school-entry-quick,#companion .inventory-quick-assign{flex-wrap:nowrap!important}
#companion .quick-item-bar .quick-item-box{flex-shrink:1;min-width:0}
#companion .inventory-quick-assign>*{flex:1 1 0;min-width:0}

/* PvP live duel: the arena field fills the screen; only HP bars, log and actions float on top. */
#companion #pvpArena.pvp-live{background:none!important;pointer-events:none;place-items:stretch;padding:0}
#pvpArena.pvp-live .pvp-card{width:100%;max-height:none;height:100dvh;overflow:visible;padding:calc(8px + env(safe-area-inset-top,0px)) 10px calc(8px + env(safe-area-inset-bottom,0px));background:none;border:0;box-shadow:none;display:flex;flex-direction:column;pointer-events:none}
#pvpArena.pvp-live .pvp-header{pointer-events:auto}
#pvpArena.pvp-live :is(h2,.pvp-subtitle){display:none}
#pvpArena .pvp-hud{display:grid;grid-template-columns:1fr 1fr;gap:10px;pointer-events:none}
#pvpArena .pvp-hp{position:relative;overflow:hidden;display:flex;justify-content:space-between;align-items:center;gap:6px;min-height:34px;padding:4px 12px;border:2px solid #9b8055;border-radius:18px;background:#10212d;color:#fff3dc;font-size:13px;font-weight:700}
#pvpArena .pvp-hp>i{position:absolute;inset:4px auto 4px 4px;border-radius:14px;background:linear-gradient(#9ff0a6,#43b35a 45%,#1f6e35);z-index:0;transition:width .35s}
#pvpArena .pvp-hp.enemy>i{background:linear-gradient(#f19278,#cc574c 45%,#862f3a)}
#pvpArena .pvp-hp>:not(i){position:relative;z-index:1;text-shadow:0 1px 2px #000}
#pvpArena.pvp-live .pvp-combat-log{align-self:center;margin:6px 0 0;padding:3px 10px;border-radius:10px;background:#0f222bcc;color:#f3dfb1;font-size:12px}
#pvpArena.pvp-live .pvp-live-actions{margin-top:auto;justify-content:center;gap:8px;pointer-events:auto}
#pvpArena.pvp-live .pvp-live-actions button{min-width:96px;min-height:44px}

/* Build categories: full-width game-scene banners that overlap along diagonal seams. */
#companion .activity-destinations.build-category-cards{display:flex!important;flex-direction:column;gap:0!important;align-items:stretch}
#companion .build-category-cards>.illustrated-menu-tile{width:100%!important;max-width:none!important;aspect-ratio:1400/330;height:auto!important;padding:0!important;position:relative;border-radius:0!important;overflow:hidden;border:0!important;box-shadow:none!important;background:none!important}
#companion .build-category-cards>.illustrated-menu-tile:first-of-type{border-radius:14px 14px 0 0!important}
#companion .build-category-cards>.illustrated-menu-tile:last-of-type{border-radius:0 0 14px 14px!important}
#companion .build-category-cards>.illustrated-menu-tile img{width:100%;height:100%;object-fit:cover;display:block}
#companion .build-category-cards>.illustrated-menu-tile:is(:hover,:focus-visible) img{filter:brightness(1.1) saturate(1.05)}
#companion .build-seam{position:absolute;left:0;top:0;width:100%;height:44px;pointer-events:none}
#companion .build-seam svg{display:block;width:100%;height:100%;overflow:visible}
#companion .build-seam line{stroke:#e2c27a;stroke-width:4;vector-effect:non-scaling-stroke;filter:drop-shadow(0 1px 1px #000a)}

/* PvP: no blur over the live field; preparation list; result window. */
#companion #pvpArena.pvp-live{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#pvpArena .pvp-prep-title{margin:6px 0;color:#f3dfb1}
#pvpArena .pvp-prep-rules{margin:0 0 10px;padding-left:18px;display:grid;gap:4px;font-size:13px;color:#e8dcc4}
#pvpArena .pvp-prep-status{font-weight:700;color:#bfe7b4}
.pvp-result-window{position:fixed;inset:0;z-index:2147483100;display:grid;place-items:center;background:#05101699;padding:16px}
.pvp-result-panel{min-width:min(360px,92vw);max-width:460px;padding:22px 24px;border-radius:16px;background:linear-gradient(160deg,#1d3644,#0f2029);border:2px solid #c9a65c;box-shadow:0 18px 40px #000a;color:#fff0d5;text-align:center;display:grid;gap:8px}
.pvp-result-title{font:900 38px/1 Georgia,serif;letter-spacing:.06em;color:#f6d77b;text-shadow:0 3px 0 #5a3d12}
.pvp-result-window[data-outcome=lost] .pvp-result-title{color:#f2907a;text-shadow:0 3px 0 #561b14}
.pvp-result-window[data-outcome=draw] .pvp-result-title{color:#cfe0e8}
.pvp-result-reason{margin:0;color:#d8cbb0}
.pvp-result-list{list-style:none;margin:4px 0 8px;padding:0;display:grid;gap:4px;font-size:14px}
.pvp-result-panel button{justify-self:center;min-width:140px;min-height:44px}

/* PvP live controls: Attack / Guard at the left edge (middle), Surrender bottom-left. */
#pvpArena.pvp-live .pvp-live-actions{position:fixed;left:12px;top:50%;transform:translateY(-50%);margin:0!important;display:flex;flex-direction:column;gap:10px;pointer-events:auto;z-index:2}
#pvpArena.pvp-live .pvp-live-actions button{min-width:110px;min-height:52px;font-weight:800}
#pvpArena.pvp-live .pvp-surrender{pointer-events:auto;min-height:40px;padding:8px 16px!important;border:1px solid #d97a6a!important;background:linear-gradient(#7a2e26,#4a1712)!important;color:#ffe9e0!important;font-weight:800}
@media(max-width:600px){#pvpArena.pvp-live .pvp-live-actions{left:6px}#pvpArena.pvp-live .pvp-live-actions button{min-width:84px;min-height:48px}}

/* PvP preparation: Inventory pinned to the top, quick slots stay free below it. */
html.pvp-prep #companion #companionControlsDrawer{left:50%!important;right:auto!important;top:8px!important;transform:translateX(-50%)!important;max-height:calc(100% - var(--quick-height,68px) - 28px)!important}
.pvp-prep-banner{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px;margin:6px 10px 4px;padding:10px 12px;border-radius:12px;background:linear-gradient(135deg,#3a2a52e6,#1c2d40e6);border:1px solid #c9a6e9;color:#fff0d5}
.pvp-prep-info{display:grid;gap:2px;min-width:0}
.pvp-prep-info strong{color:#f3dfb1;font-size:15px}
.pvp-prep-info span{font-size:12px;color:#e3d7c3}
.pvp-prep-info small{font-size:12px;font-weight:700;color:#bfe7b4}
.pvp-prep-timer{font:900 28px/1 Georgia,serif;color:#f6d77b;min-width:56px;text-align:center}
.pvp-ready{min-width:110px;min-height:48px;border-radius:10px;border:2px solid #f4d793;background:linear-gradient(#5fbf63,#2b7a3a);color:#fff;font-weight:900;letter-spacing:.06em;cursor:pointer}
.pvp-ready:disabled{filter:grayscale(.4) brightness(.85);cursor:default}
@media(max-width:600px){.pvp-prep-banner{grid-template-columns:1fr auto;gap:8px}.pvp-prep-info span{display:none}.pvp-ready{grid-column:1/-1;min-height:44px}}
/* 3-2-1-FIGHT */
.pvp-countdown{position:fixed;left:50%;top:42%;transform:translate(-50%,-50%);z-index:2147483200;pointer-events:none;font:900 120px/1 Georgia,serif;color:#f6d77b;text-shadow:0 6px 0 #5a3d12,0 0 30px #ffcf6a99}
.pvp-countdown[data-text="FIGHT!"]{font-size:84px;color:#ffefb0}
.pvp-countdown.pop{animation:pvpPop .9s ease-out both}
@keyframes pvpPop{0%{opacity:0;transform:translate(-50%,-50%) scale(2.2)}25%{opacity:1;transform:translate(-50%,-50%) scale(1)}80%{opacity:1}100%{opacity:0;transform:translate(-50%,-50%) scale(.85)}}

/* PvP (preparation and duel): no resource bar and no pet card at the top. */
html:is(.pvp-prep,.pvp-fight) #companion :is(.world-topbar,.world-resources,.world-pet-badge,#companionResources){display:none!important}
#pvpArena .pvp-bars{display:grid;gap:4px}
#pvpArena .pvp-mana{position:relative;overflow:hidden;min-height:18px;padding:1px 12px;border:2px solid #6c7fa8;border-radius:12px;background:#0d1a2a;color:#e6f0ff;font-size:11px;font-weight:700;display:flex;align-items:center}
#pvpArena .pvp-mana>i{position:absolute;inset:3px auto 3px 3px;border-radius:9px;background:linear-gradient(#9cc8ff,#3f7ee0 55%,#24489a);z-index:0;transition:width .35s}
#pvpArena .pvp-mana>span{position:relative;z-index:1;text-shadow:0 1px 2px #000}

/* PvP: prep badge sits low (between the Inventory and the quick slots); duel clock on top. */
html.pvp-prep #companion #pvpQueueBadge{bottom:calc(var(--quick-height,68px) + 10px)!important;right:50%!important;transform:translateX(50%);z-index:70}
html.pvp-prep #companion #companionControlsDrawer{max-height:calc(100% - var(--quick-height,68px) - 76px)!important}
#pvpArena .pvp-timer{align-self:center;margin:0 0 3px;font:900 26px/1 Georgia,serif;color:#f6d77b;text-shadow:0 2px 0 #5a3d12,0 0 10px #ffcf6a55;pointer-events:none;font-variant-numeric:tabular-nums}
#pvpArena .pvp-timer.low{color:#ff9b7a;text-shadow:0 2px 0 #5a1d12,0 0 10px #ff6a4a77}
@media(max-width:600px){#pvpArena .pvp-timer{font-size:22px}}
#pvpArena.pvp-live .pvp-eyebrow{display:none}

/* PvP: HP + mana bars at the very top, the duel clock between them; Surrender below. */
#pvpArena.pvp-live .pvp-card{padding-top:calc(6px + env(safe-area-inset-top,0px))}
#pvpArena.pvp-live .pvp-hud{order:-1;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:start;gap:10px}
#pvpArena.pvp-live .pvp-hud>.pvp-timer{align-self:center;margin:0}
#pvpArena.pvp-live .pvp-header{position:fixed;left:10px;top:calc(76px + env(safe-area-inset-top,0px));pointer-events:auto;z-index:2}
@media(max-width:600px){#pvpArena.pvp-live .pvp-hud{gap:6px}#pvpArena.pvp-live .pvp-hp strong{font-size:11px}#pvpArena.pvp-live .pvp-header{top:calc(70px + env(safe-area-inset-top,0px))}}
/* Gold frames off the HP bars; their black background stays. */
#pvpArena .pvp-hp,#pvpArena .pvp-mana{border-color:transparent!important}
/* Prep: the Inventory reaches down to the quick slots with a small gap. */
html.pvp-prep #companion #companionControlsDrawer{top:8px!important;bottom:calc(var(--quick-height,68px) + 8px)!important;max-height:none!important;height:auto!important}
/* Duel bars at half height. */
#pvpArena .pvp-hp{min-height:17px!important;padding:0 10px!important;font-size:11px!important;line-height:1}
#pvpArena .pvp-hp>i{inset:2px auto 2px 2px!important}
#pvpArena .pvp-mana{min-height:9px!important;padding:0 10px!important;font-size:8px!important;line-height:1}
#pvpArena .pvp-mana>i{inset:1px auto 1px 1px!important}
#pvpArena .pvp-bars{gap:3px!important}
/* Build menu: the banner list scrolls down inside the window on desktop too. */
#companion #companionControlsDrawer:is([data-panel="Build"],[data-panel="Explore"]){overflow-y:auto!important;overscroll-behavior:contain}
#companion #companionControlsDrawer:is([data-panel="Build"],[data-panel="Explore"]) .world-controls-body{overflow:visible!important}
#companion #companionActivityHub>.activity-destinations.build-category-cards{display:flex!important}
/* Storage window: resources as inventory slots. */
#companion .storage-resource-grid{grid-template-columns:repeat(3,minmax(0,92px))!important;gap:7px;justify-content:start;align-content:start}
#companion .storage-resource-slot{cursor:default;touch-action:auto}
#companion .storage-resource-slot img{width:70%;height:70%;object-fit:contain;pointer-events:none}
#companion .storage-resource-slot .inventory-quantity{font-size:13px;font-weight:800;color:#fff0d5}
#companion .storage-resource-slot.full{border-color:#e3c984}
#companion .storage-resource-slot.full .inventory-quantity{color:#ffcf7a}
/* School missions: objectives with progress. */
#companion .school-mission-goals{list-style:none;margin:8px 0;padding:0;display:grid;gap:5px}
#companion .school-mission-goals li{display:flex;justify-content:space-between;gap:10px;padding:7px 10px;border:1px solid #92826399;border-radius:8px;background:#142d3dcc;color:#fff0d5}
#companion .school-mission-goals li.done{border-color:#8cc35c;color:#bfe7b4}
/* A pet that ran away: the search replaces the adoption screen. */
#companion #companionAdoption.pet-runaway>*:not(#companionRunaway){display:none!important}
/* ---- Recover your pet: the pet in a glowing ring, three mission cards with their place's picture, one action row ---- */
#companion #companionRunaway{display:grid;gap:12px;max-width:860px;margin:0 auto}
#companion .choosing-pet #companionAdoption.pet-runaway #companionRunaway h2{display:none}
#companion #companionRunaway .runaway-hero{display:grid;grid-template-columns:auto minmax(0,1fr);gap:18px;align-items:center;padding:12px 18px;border:1px solid #c9a65c88;border-radius:16px;background:linear-gradient(120deg,#1d3644ee,#12262fee)}
#companion #companionRunaway .runaway-ring{position:relative;width:200px;height:170px;display:grid;place-items:center}
#companion #companionRunaway .runaway-ring::before{content:"";position:absolute;inset:14px 4px 0;border-radius:50%;background:radial-gradient(closest-side,#ffe9a355,#ffd27a22 55%,transparent 72%);animation:runaway-glow 3.2s ease-in-out infinite}
#companion #companionRunaway .runaway-ring::after{content:"";position:absolute;left:18%;right:18%;bottom:6px;height:16px;border-radius:50%;background:radial-gradient(closest-side,#0009,transparent)}
#companion #companionRunaway .runaway-pet{position:relative;z-index:1;width:200px;height:170px}
#companion #companionRunaway .runaway-pet canvas.creature-stage,#companion #companionRunaway .runaway-pet img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 4px 4px #0008)}
#companion #companionRunaway .runaway-pet.loading canvas.creature-stage{position:absolute;inset:0;opacity:0}
#companion #companionRunaway .runaway-facts{display:grid;gap:6px;text-align:left}
#companion #companionRunaway .runaway-facts strong{font:900 clamp(20px,3.2vw,30px)/1.1 Georgia,serif;color:#f6d77b;text-shadow:0 2px 0 #5a3d12}
#companion #companionRunaway .runaway-facts p{margin:0;color:#e9dcc0;font-size:14px;line-height:1.35}
#companion #companionRunaway .runaway-chips{display:flex;flex-wrap:wrap;gap:6px}
#companion #companionRunaway .runaway-chips>span{padding:3px 10px;border-radius:999px;border:1px solid #c9a65c99;background:#0d1d26cc;color:#ffe9a3;font-size:12px;font-weight:800}
#companion #companionRunaway .runaway-chips>span.loss{border-color:#d9806e99;color:#ffb9a8}
#companion #companionRunaway .search-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
#companion #companionRunaway .search-card{box-sizing:border-box;position:relative;aspect-ratio:1;display:flex;flex-direction:column;justify-content:flex-end;gap:4px;padding:12px;border-radius:16px;border:2px solid #7d6a45;background:var(--picture) center/cover no-repeat #12262f;overflow:hidden;color:#fff6e0;text-align:left;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;box-shadow:0 8px 18px #0007;transition:transform .18s ease,filter .3s ease,border-color .3s ease,box-shadow .3s ease}
#companion #companionRunaway .search-card::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#0000 30%,#06121acc 68%,#06121af2);pointer-events:none}
#companion #companionRunaway .search-card>*{position:relative}
#companion #companionRunaway .search-card strong{font-size:clamp(13px,1.7vw,17px);line-height:1.2;text-shadow:0 1px 3px #000}
#companion #companionRunaway .search-card-place{font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:#ffe9a3}
#companion #companionRunaway .search-card-number{position:absolute!important;top:10px;left:10px;width:34px;height:34px;display:grid;place-items:center;border-radius:50%;border:2px solid #f6d77b;background:#0d1d26e6;color:#f6d77b;font:900 17px/1 Georgia,serif}
#companion #companionRunaway .search-card-meta{display:flex;flex-wrap:wrap;gap:5px}
#companion #companionRunaway .search-card-meta>span{padding:2px 8px;border-radius:999px;background:#0d1d26d9;border:1px solid #ffffff33;font-size:11px;font-weight:800}
#companion #companionRunaway .search-card-meta .cost{color:#ffd27a}
#companion #companionRunaway .search-card[data-state=locked]{filter:grayscale(.85) brightness(.5);cursor:default;box-shadow:none}
#companion #companionRunaway .search-card[data-state=locked] .search-card-number{background:#0d1d26e6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e9dcc0' d='M7 10V7a5 5 0 0 1 10 0v3h1.5A1.5 1.5 0 0 1 20 11.500v8A1.500 1.500 0 0 1 18.500 21h-13A1.500 1.500 0 0 1 4 19.500v-8A1.500 1.500 0 0 1 5.500 10Zm2.400 0h5.200V7a2.600 2.600 0 0 0-5.200 0Z'/%3E%3C/svg%3E") center/20px no-repeat;border-color:#e9dcc088}
#companion #companionRunaway .search-card[data-state=active]{border-color:#f6d77b;animation:search-card-call 2.4s ease-in-out infinite}
#companion #companionRunaway .search-card[data-state=active]:hover,#companion #companionRunaway .search-card[data-state=ready]:hover{transform:translateY(-3px) scale(1.02)}
#companion #companionRunaway .search-card[data-state=active][aria-pressed=true]{border-color:#fff3c4;box-shadow:0 0 0 3px #f6d77b,0 0 26px #f6d77b99;animation:none}
#companion #companionRunaway .search-card[data-state=running]{border-color:#8fd0ff;cursor:default}
#companion #companionRunaway .search-card[data-state=ready]{border-color:#9be37a;box-shadow:0 0 0 3px #9be37a,0 0 26px #9be37a99;animation:search-card-call 1.2s ease-in-out infinite}
#companion #companionRunaway .search-card[data-state=done]{border-color:#8cc35c;filter:saturate(.8) brightness(.8);cursor:default}
#companion #companionRunaway .search-card[data-state=done] .search-card-number{border-color:#9be37a;background:#2f6b2be6;color:#eaffd9}
#companion #companionRunaway .search-card-progress{display:block;height:8px;border-radius:999px;background:#0d1d26d9;border:1px solid #ffffff33;overflow:hidden}
#companion #companionRunaway .search-card-progress i{display:block;height:100%;width:0;border-radius:999px;background:linear-gradient(90deg,#4aa3e8,#9fe0ff,#4aa3e8);background-size:200% 100%;animation:search-shimmer 1.6s linear infinite;transition:width 1s linear}
#companion #companionRunaway .search-card-left{font-size:clamp(14px,2vw,20px);font-weight:900;color:#dff3ff;text-shadow:0 1px 3px #000}
#companion #companionRunaway .search-card[data-state=ready] .search-card-left{color:#d9ffc4}
#companion #companionRunaway .search-action{min-height:48px;display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:center}
#companion #companionRunaway .search-action small{color:#e9dcc0;font-size:14px}
#companion #companionRunaway .search-action .search-doing{animation:search-breathe 1.8s ease-in-out infinite}
#companion #companionRunaway .search-action button{min-width:220px;min-height:46px;animation:search-pop .28s ease-out}
@keyframes runaway-glow{0%,100%{transform:scale(.92);opacity:.65}50%{transform:scale(1.06);opacity:1}}
@keyframes search-card-call{0%,100%{box-shadow:0 8px 18px #0007,0 0 0 0 #f6d77b00}50%{box-shadow:0 8px 18px #0007,0 0 22px 3px #f6d77b99}}
@keyframes search-shimmer{to{background-position:-200% 0}}
@keyframes search-breathe{0%,100%{opacity:.6}50%{opacity:1}}
@keyframes search-pop{from{transform:scale(.85);opacity:0}to{transform:scale(1);opacity:1}}
/* A phone held sideways (375 px tall): the pet and the action stand on the left, the three cards on the right. */
@media (max-height:480px){
 #companion #companionRunaway{grid-template-columns:minmax(150px,24vw) minmax(0,1fr);grid-template-rows:auto 1fr auto;gap:6px 12px;max-width:none;align-items:start}
 #companion .choosing-pet #companionAdoption.pet-runaway #companionRunaway h2{display:block!important;grid-column:1/-1;margin:0;text-align:center;font-size:18px;line-height:22px;color:#ffe9a3}
 #companion #companionRunaway .runaway-hero{grid-column:1;grid-row:2;grid-template-columns:1fr;gap:4px;padding:6px 8px;justify-items:center}
 #companion #companionRunaway .runaway-ring,#companion #companionRunaway .runaway-pet{width:120px;height:92px}
 #companion #companionRunaway .runaway-facts{text-align:center;gap:3px}
 #companion #companionRunaway .runaway-facts strong{font-size:15px}
 #companion #companionRunaway .runaway-facts p{display:none}
 #companion #companionRunaway .runaway-chips{justify-content:center;gap:3px}
 #companion #companionRunaway .runaway-chips>span{font-size:10px;padding:1px 7px}
 #companion #companionRunaway .search-cards{grid-column:2;grid-row:2/4;gap:8px;align-self:center}
 #companion #companionRunaway .search-card{padding:8px;border-radius:12px;max-height:calc(100vh - 70px)}
 #companion #companionRunaway .search-card-number{width:26px;height:26px;font-size:13px;top:6px;left:6px}
 #companion #companionRunaway .search-action{grid-column:1;grid-row:3;min-height:0}
 #companion #companionRunaway .search-action button{min-width:0;width:100%;min-height:38px}
 #companion #companionRunaway .search-action small{font-size:11px;text-align:center}
}
/* Mission complete: the mission's picture with its own little scene. */
.search-complete .pvp-result-panel{width:min(440px,92vw);padding:0 0 18px;overflow:hidden;gap:6px;animation:search-pop .35s ease-out}
.search-complete .pvp-result-title{font-size:clamp(22px,5vh,34px);margin-top:6px}
.search-complete .search-complete-name{color:#ffe9a3;font-size:14px}
.search-complete .pvp-result-panel p{margin:0 18px;font-size:14px;line-height:1.4}
.search-complete .pvp-result-panel .world-map-ui{width:auto;min-width:180px;margin:8px auto 0}
.search-fx{position:relative;height:min(210px,38vh);background-size:cover;background-position:center;overflow:hidden}
.search-fx::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#0000 55%,#0f2029)}
.search-fx i{position:absolute;display:block}
.search-fx-seal{position:absolute;z-index:2;right:14px;top:12px;width:44px;height:44px;display:grid;place-items:center;border-radius:50%;background:#2f6b2b;border:3px solid #c9f5a8;color:#eaffd9;font:900 24px/1 Georgia,serif;box-shadow:0 4px 10px #0008;animation:search-seal .6s .5s cubic-bezier(.2,1.6,.4,1) both}
/* Forest: paw prints walk across the picture, one after another. */
.search-fx-paws i{width:30px;height:30px;left:calc(8% + var(--i)*12.500%);top:calc(64% - var(--i)*7% + var(--o)*12%);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%233a2a18'%3E%3Cellipse cx='12' cy='16' rx='5.500' ry='4.500'/%3E%3Cellipse cx='5.500' cy='10.500' rx='2.200' ry='2.800'/%3E%3Cellipse cx='9.700' cy='6.500' rx='2.200' ry='2.900'/%3E%3Cellipse cx='14.300' cy='6.500' rx='2.200' ry='2.900'/%3E%3Cellipse cx='18.500' cy='10.500' rx='2.200' ry='2.800'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;transform:rotate(58deg);opacity:0;animation:search-paw 3.6s calc(var(--i)*.28s) ease-out infinite}
/* Lake: rings spread from where the food lay. */
.search-fx-ripples i{left:50%;top:58%;width:44px;height:22px;margin:-11px 0 0 -22px;border:3px solid #ffffffd9;border-radius:50%;opacity:0;animation:search-ripple 2.8s calc(var(--i)*.7s) ease-out infinite}
/* Meadow: petals rise and drift across. */
.search-fx-petals i{width:12px;height:16px;left:calc(4% + var(--i)*6.800%);bottom:-18px;border-radius:70% 30% 70% 30%;background:hsl(calc(320 + var(--i)*23),85%,72%);opacity:0;animation:search-petal calc(3.2s + var(--m)*.7s) calc(var(--i)*.22s) ease-in infinite}
@keyframes search-paw{0%{opacity:0;transform:rotate(58deg) scale(.4)}8%{opacity:.95;transform:rotate(58deg) scale(1.15)}14%{transform:rotate(58deg) scale(1)}70%{opacity:.85}100%{opacity:0}}
@keyframes search-ripple{0%{opacity:.95;transform:scale(.2)}100%{opacity:0;transform:scale(5.5)}}
@keyframes search-petal{0%{opacity:0;transform:translate(0,0) rotate(0)}12%{opacity:1}100%{opacity:0;transform:translate(46px,-240px) rotate(300deg)}}
@keyframes search-seal{from{transform:scale(0) rotate(-40deg)}to{transform:scale(1) rotate(0)}}
@media (prefers-reduced-motion:reduce){#companion #companionRunaway *,.search-complete *{animation:none!important;transition:none!important}.search-fx i{opacity:.9}}
.pvp-result-panel .world-map-ui{display:block;width:100%;min-height:44px;margin-top:8px}

/* Fence card: one card cycles straight fence, corner, T and cross with arrows beside the picture. */
#companion #companionBlueprints .companion-blueprint-main:has(.fence-shape-picker){grid-template-columns:auto minmax(0,1fr)}
#companion .fence-shape-picker{display:flex;align-items:center;gap:3px;flex:0 0 auto}
#companion .companion-blueprint .fence-shape-arrow{flex:0 0 auto;width:18px;min-width:0;height:30px;padding:0;border-radius:7px;
 border:1px solid rgba(196,173,120,.5);background:rgba(24,43,55,.86);color:#f6e7c1;
 font:700 20px/1 system-ui,sans-serif;cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,.35)}
#companion .companion-blueprint .fence-shape-arrow:hover,#companion .companion-blueprint .fence-shape-arrow:focus-visible{background:rgba(52,84,98,.95);outline:none}

/* Placement toolbar (rotate, OK, Cancel) docked above the bottom dock instead of following the hologram. */
#companion .companion-world-viewport .placement-actions.docked{left:50%;top:auto;bottom:74px;transform:translateX(-50%)}

/* ---- 3D world map: the engine draws the island under a see-through overlay ----
   world-map.js adds .world-map-3d when the 3D engine is active. The overlay keeps its header, legend,
   Back, dialogs and loader; drags, pinches and taps on the island reach the 3D canvas underneath. */
#companion .world-map-overlay.world-map-3d{background:transparent;pointer-events:none}
#companion .world-map-overlay.world-map-3d .world-map-viewport{visibility:hidden}
#companion .world-map-overlay.world-map-3d>:not(.world-map-viewport){pointer-events:auto}
#companion .world-map-overlay.world-map-3d .world-map-head{background:linear-gradient(rgba(11,24,20,.72),rgba(11,24,20,0))}
/* Scene-anchored HUD buttons (City entrance, Raid portal) belong to the home view, not the 3D island. */
html.world-map-open #companionWorldMapButton,html.world-map-open #companion .home-world-portal{visibility:hidden}
/* 3D pet portrait (static/models/portraits, side view) in the Care window and the HUD badge, kept whole. */
#companion #companionImage.pet-3d-portrait{position:absolute;inset:0;width:100%;height:100%;box-sizing:border-box;padding:6%;object-fit:contain;filter:drop-shadow(0 6px 8px rgba(0,0,0,.35))}
/* The small HUD badge shows the 3D pet's head in profile (portraits face right). */
#companion #companionHudAvatar[src*="/models/portraits/"]{object-fit:cover;object-position:88% 18%;transform:scale(1.5);transform-origin:70% 35%}

/* Live 3D pet in the Care window: 70 % of the portrait frame, centred (game-client/engine3d/world/care-pet-view.ts). */
#companion #companionPet3d.care-pet-3d{position:absolute;left:15%;top:50%;width:70%;height:auto;aspect-ratio:1;transform:translateY(-50%);display:block;filter:drop-shadow(0 6px 8px rgba(0,0,0,.35));pointer-events:none}
#companion #companionPet3d.care-pet-3d[hidden]{display:none}
/* Narrow screens: the card is as tall as the text beside it and scrolls, so the pet keeps to the top of what is
   seen instead of the middle of the whole column. */
@media(max-width:899px){#companion #companionPet3d.care-pet-3d{position:sticky;left:auto;top:8px;transform:none;width:min(70%,56vh);margin:8px auto 0}}

/* World map legend sits above the bottom HUD dock instead of on top of its buttons. */
#companion #worldMap .world-map-legend{bottom:64px}

/* Pet status box (top left): a little larger, so the portrait sits inside the frame and HP, energy and mana read at a glance. */
#companion .world-topbar #companionHudPet.world-pet-badge,#companion .companion-world-shell:fullscreen .world-topbar #companionHudPet.world-pet-badge{transform:scale(.86)!important;grid-template-columns:60px minmax(140px,1fr) 30px!important;min-height:66px!important;height:66px!important;padding:3px 7px 3px 4px!important;overflow:hidden!important}
#companion .world-topbar #companionHudPet #companionHudAvatar{width:58px!important;height:58px!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;margin:0!important}
#companion .world-topbar #companionHudPet .pet-hud-track{height:8px}
#companion .world-topbar #companionHudPet .pet-hud-resource b{font-size:9px}
#companion .world-topbar #companionHudPet .pet-hud-resource strong{font-size:10px}

/* Warrior card: portrait and name, stat tiles, passive and special, upgrade price, army poses. */
#companion .soldier-info-dialog{width:min(400px,calc(100vw - 24px));padding:14px;border-radius:12px;background:linear-gradient(180deg,#1b3443,#13242f);border:1px solid rgba(196,173,120,.5)}
#companion .soldier-info-panel{display:grid;gap:10px;max-width:none;font-size:12px;line-height:1.35}
#companion .soldier-head{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;align-items:center}
#companion .soldier-head img.guardian-info-art{width:72px;height:72px;margin:0;object-fit:contain;border-radius:10px;background:radial-gradient(circle at 50% 40%,#35566a,#16293500 72%)}
#companion .soldier-identity{display:grid;gap:3px;min-width:0}
#companion .soldier-info-dialog h2{margin:0;font-size:17px;line-height:1.15;text-align:left;color:#f6e7c4}
#companion .soldier-role{color:#a9c2cc;font-size:11px;letter-spacing:.02em}
#companion .soldier-badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:2px}
#companion .soldier-badge{padding:2px 8px;border-radius:999px;font-size:10.5px;font-weight:700;color:#f4d793;background:#0d1b24;border:1px solid rgba(196,173,120,.45)}
#companion .soldier-badge.ready{color:#a8e6bd;border-color:#4f9a6c}
#companion .soldier-badge.recovering{color:#ffc48a;border-color:#b0763a}
#companion .soldier-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
#companion .soldier-stat{display:grid;justify-items:center;gap:1px;padding:6px 2px;border-radius:8px;background:#0e1d27;border:1px solid #37515e}
#companion .soldier-stat strong{font-size:15px;line-height:1.1;color:#f4d793;white-space:nowrap}
#companion .soldier-stat span{font-size:9.5px;text-transform:uppercase;letter-spacing:.06em;color:#93adb8}
#companion .soldier-skills{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 10px;margin:0;padding:8px 10px;border-radius:8px;background:#0e1d2788;border:1px solid #2f4855}
#companion .soldier-skills dt{font-weight:700;color:#f4d793;white-space:nowrap}
#companion .soldier-skills dd{margin:0;color:#d9e4e6}
/* The upgrade button stands in the middle, its price and what blocks it under it. */
#companion .soldier-upgrade{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
#companion .soldier-upgrade>button{min-height:32px!important;padding:6px 14px!important;font-size:12px}
#companion .soldier-upgrade .game-rewards{margin:0}
#companion .soldier-upgrade .soldier-blocked{color:#ffb38f}
#companion .soldier-upgrade .soldier-max{color:#a8e6bd}
@media(max-width:380px){#companion .soldier-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Build cards in the 3D game: a photograph of the real model, large enough to recognise. */
#companion #companionBlueprints .companion-blueprint-main:has(.model-card){grid-template-columns:auto minmax(0,1fr)}
#companion #companionBlueprints .companion-blueprint-art.model-card{width:72px!important;height:72px!important;flex-basis:72px;border:1px solid #3d5966;border-radius:10px;background:radial-gradient(circle at 50% 45%,#3b6072,#152a36)!important;box-shadow:inset 0 0 12px #0006}
#companion #companionBlueprints .companion-blueprint-art.model-card img{width:100%;height:100%;object-fit:contain}
@media(max-width:540px),(max-height:430px){#companion #companionBlueprints .companion-blueprint-art.model-card{width:52px!important;height:52px!important;flex-basis:52px}}

/* Dev window: temporary graphics mode switch. */
#companion .dev-graphics{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 10px;padding:8px 10px;border-radius:8px;background:#0e1d27;border:1px solid rgba(196,173,120,.5)}
#companion .dev-graphics strong{color:#f4d793}
#companion .dev-graphics small{margin-right:auto;color:#a9c2cc}
#companion .dev-graphics .dev-graphics-button{min-height:30px!important;padding:4px 12px!important;font-size:12px}
#companion .dev-graphics .dev-graphics-button[aria-pressed=true]{outline:2px solid #f4d793;outline-offset:1px;color:#fff3cf}

/* HUD pet badge: the whole pet inside its square (it used to be an enlarged crop that spilled over the frame). */
#companion .world-topbar #companionHudPet #companionHudAvatar,
#companion .world-topbar #companionHudPet #companionHudAvatar[src*="/models/portraits/"]{
 width:56px!important;height:56px!important;box-sizing:border-box;padding:3px;object-fit:contain!important;object-position:center bottom!important;
 transform:none!important;border-radius:8px;background:radial-gradient(circle at 50% 40%,#2f4d5e,#10202a);border:1px solid rgba(196,173,120,.5);overflow:hidden}
@media(max-width:900px),(max-height:430px){
 #companion .world-topbar #companionHudPet #companionHudAvatar,
 #companion .world-topbar #companionHudPet #companionHudAvatar[src*="/models/portraits/"]{width:44px!important;height:44px!important;padding:2px}}

/* World map Back: the round Back of every window, pinned to the map's top-left corner (the carved stone is gone). */
#companion #worldMap .world-map-back{position:absolute;z-index:3;left:16px;top:14px;margin:0}
#companion #worldMap .world-map-back[hidden]{display:none}
#companion #worldMap:not(.world-map-ready) .world-map-back{visibility:hidden}

/* Recipe cards: a "?" in the top-right corner opens a short note on what the item is for. */
#companion .recipe-card.recipe-compact{position:relative}
#companion .recipe-compact .recipe-head{padding-right:24px}
#companion .recipe-info{position:absolute;top:5px;right:5px;z-index:2;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;border:1px solid rgba(214,174,98,.8);
 background:linear-gradient(180deg,#2c4f6e,#17304a);color:#ffe9a8;font:800 12px/1 Georgia,serif;cursor:help;user-select:none}
#companion .recipe-info:is(:hover,:focus-visible,.open){border-color:#ffe29a;box-shadow:0 0 6px #ffd76a88;outline:none}
#companion .recipe-tip{display:none;position:absolute;top:24px;right:0;width:min(210px,62vw);padding:7px 9px;border-radius:8px;border:1px solid rgba(214,174,98,.8);
 background:#0f2030f2;color:#f1e6c8;font:500 12px/1.35 system-ui,sans-serif;text-align:left;box-shadow:0 6px 14px #000a;cursor:default}
#companion .recipe-info:is(:hover,:focus-visible,.open) .recipe-tip{display:block}
/* The question asked before every move to another land (askRelocation): it must fit a phone held sideways. */
#relocationAsk .pvp-result-panel{max-height:calc(100vh - 20px);overflow-y:auto;gap:4px}
#relocationAsk .pvp-result-title{font-size:clamp(18px,5.5vh,30px);line-height:1.1}
#relocationAsk .pvp-result-panel p{margin:2px 0;font-size:clamp(11px,3.4vh,14px)}
@media (max-height:480px){#relocationAsk .pvp-result-panel{max-width:min(640px,94vw);padding:10px 16px}#relocationAsk .pvp-result-panel .world-map-ui{min-height:36px;margin-top:4px}}
/* ---- Pet life: mood and character in Care, the runaway countdown, the growth scene (companion-pet-life.js) ---- */
#companion .pet-life{display:grid;gap:6px;margin-top:8px;padding:8px 10px;border-radius:9px;background:rgba(24,43,55,.44);border:1px solid rgba(196,173,120,.5)}
#companion .pet-life-row{display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:center}
#companion .pet-life-row strong{color:#ffe9a3;font-size:13px}
#companion .pet-life-row small{grid-column:1/-1;color:#d5e3e6;font-size:11.5px;line-height:1.35}
#companion .pet-life-mood{grid-template-columns:12px auto 1fr}
#companion .pet-life-mood i{width:10px;height:10px;border-radius:50%;background:#9fd27c;box-shadow:0 0 8px currentColor;color:#9fd27c}
#companion .pet-life-mood[data-mood=joyful] i{background:#ffd75e;color:#ffd75e;animation:pet-life-pulse 1.8s ease-in-out infinite}
#companion .pet-life-mood[data-mood=hungry] i,#companion .pet-life-mood[data-mood=tired] i,#companion .pet-life-mood[data-mood=sad] i,#companion .pet-life-mood[data-mood=scruffy] i{background:#e8a04c;color:#e8a04c}
#companion .pet-life-mood[data-mood=leaving] i{background:#f0624d;color:#f0624d;animation:pet-life-pulse .9s ease-in-out infinite}
#companion .pet-life-shares{display:grid;grid-template-columns:repeat(5,1fr);gap:5px}
#companion .pet-life-share small{display:block;font-size:10px;color:#b9c9cd;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#companion .pet-life-share span{display:block;height:5px;border-radius:3px;background:#0b1a2188;overflow:hidden}
#companion .pet-life-share span i{display:block;height:100%;border-radius:3px;background:#7fb7c9;transition:width .4s}
#companion .pet-life-share.on small{color:#ffe9a3}
#companion .pet-life-share.on span i{background:linear-gradient(90deg,#e0b450,#ffe9a3)}
#companion .pet-life-progress{grid-column:1/-1;color:#b9c9cd;font-size:10.5px;text-align:center}
@keyframes pet-life-pulse{50%{transform:scale(1.45);opacity:.6}}
.companion-runaway-warning{position:absolute;left:10px;top:70px;z-index:40;padding:7px 16px;border-radius:999px;background:linear-gradient(180deg,#7a2a1f,#4c1711);border:1px solid #f0a08c;color:#ffe6d8;font-weight:700;font-size:13px;white-space:nowrap;cursor:pointer;box-shadow:0 6px 18px #0009;animation:runaway-warning 2.2s ease-in-out infinite}
.companion-runaway-warning::before{content:'!';display:inline-grid;place-items:center;width:18px;height:18px;margin-right:8px;border-radius:50%;background:#ffd0bf;color:#5a1a12;font-weight:900}
.companion-runaway-warning.last-hours{animation-duration:1s}
.companion-runaway-warning:focus-visible{outline:2px solid #ffe9a3;outline-offset:2px}
@keyframes runaway-warning{50%{box-shadow:0 6px 18px #0009,0 0 0 6px #f0624d44}}
.pet-growth .pvp-result-panel{width:min(520px,94vw);max-width:none;animation:search-pop .35s ease-out}
.pet-growth .pvp-result-panel p{margin:0;font-size:14px}
.pet-growth-scene{position:relative;display:grid;grid-template-columns:2fr auto 3fr;align-items:end;gap:6px;margin:6px 0 2px;padding:8px;border-radius:12px;background:radial-gradient(ellipse at 70% 60%,#3a6a55 0,#1a3440 60%,#10222b 100%);overflow:hidden}
.pet-growth-rays{position:absolute;right:-12%;top:-30%;width:84%;aspect-ratio:1;background:repeating-conic-gradient(from 0deg,#ffe9a322 0 9deg,transparent 9deg 18deg);border-radius:50%;animation:pet-growth-spin 14s linear infinite;pointer-events:none}
.pet-growth-side{position:relative;display:grid;justify-items:center;gap:1px}
.pet-growth-side strong{color:#ffe9a3;font-size:14px}
.pet-growth-side small{color:#c8d7da;font-size:11px}
.pet-growth-model{position:relative;width:100%;aspect-ratio:1;display:grid;place-items:center}
.pet-growth-model canvas{position:absolute;inset:0;width:100%!important;height:100%!important}
.pet-growth-model img{max-width:86%;max-height:86%;object-fit:contain}
.pet-growth-side.before{opacity:.82;filter:saturate(.8)}
.pet-growth-side.before .pet-growth-model{width:78%}
.pet-growth-side.after .pet-growth-model{animation:pet-growth-rise .9s cubic-bezier(.2,1.4,.4,1) both}
.pet-growth-arrow{align-self:center;color:#ffe9a3;font-size:26px;animation:pet-growth-arrow 1.2s ease-in-out infinite}
@keyframes pet-growth-spin{to{transform:rotate(360deg)}}
@keyframes pet-growth-rise{from{transform:scale(.55);opacity:0}}
@keyframes pet-growth-arrow{50%{transform:translateX(5px)}}
@media (max-height:480px){.pet-growth .pvp-result-panel{width:min(470px,94vw);padding:10px 16px;gap:3px}.pet-growth-scene{grid-template-columns:1fr auto 1.4fr;max-height:52vh}.pet-growth-model{max-height:38vh;width:auto;height:38vh}.pet-growth-side.before .pet-growth-model{height:30vh;width:auto}.companion-runaway-warning{top:56px;font-size:11px;padding:4px 10px}}
@media (prefers-reduced-motion:reduce){.pet-growth *,.companion-runaway-warning,#companion .pet-life-mood i{animation:none!important}}
/* ---- While you were away, Collect all (companion-away.js) ---- */
.away-report .pvp-result-panel{width:min(500px,94vw);max-width:none;max-height:calc(100vh - 24px);overflow-y:auto;animation:search-pop .35s ease-out;text-align:left}
.away-report .pvp-result-title{text-align:center}
.away-report .away-gone{margin:0;text-align:center;color:#c8d7da;font-size:13px}
.away-list{display:grid;gap:6px;margin:6px 0 2px}
.away-row{display:grid;grid-template-columns:30px 1fr auto;align-items:center;gap:10px;padding:7px 10px;border-radius:10px;background:#0b1a2180;border:1px solid #ffffff1c;animation:away-in .4s ease-out both}
.away-row:nth-child(2){animation-delay:.06s}.away-row:nth-child(3){animation-delay:.12s}.away-row:nth-child(4){animation-delay:.18s}.away-row:nth-child(5){animation-delay:.24s}.away-row:nth-child(n+6){animation-delay:.3s}
.away-row>i{width:30px;height:30px;border-radius:50%;background:#2c5868;display:grid;place-items:center;font-style:normal;font-weight:900;color:#fff0d5;box-shadow:inset 0 -3px 6px #0005}
.away-row>i::before{content:'+'}
.away-row[data-kind=land]>i{background:#3f7d45}.away-row[data-kind=mine]>i{background:#6a6f7c}
.away-row[data-kind=built]>i{background:#a8752d}.away-row[data-kind=built]>i::before{content:'\2713'}
.away-row[data-kind=trained]>i{background:#7a4fa3}.away-row[data-kind=trained]>i::before{content:'\2713'}
.away-row[data-kind=raided]>i{background:#a3352b}.away-row[data-kind=raided]>i::before{content:'!'}
.away-row[data-kind=held]>i{background:#2f6fa3}.away-row[data-kind=held]>i::before{content:'\2713'}
.away-row[data-kind=hungry]>i{background:#c0562f}.away-row[data-kind=hungry]>i::before{content:'!'}
.away-row[data-kind=pet]>i{background:#c79a2c}.away-row[data-kind=pet]>i::before{content:'\2665'}
.away-row[data-kind=quiet]>i::before{content:'\2026'}
.away-row-text{display:grid;min-width:0}
.away-row-text strong{color:#fff0d5;font-size:14px}
.away-row-text small{color:#c8d7da;font-size:12px}
.away-row-buttons{display:flex;gap:6px}
.away-report .away-row-buttons .world-map-ui{width:auto;min-width:0;min-height:34px;margin:0;padding:0 12px;font-size:12px}
.away-buttons{display:flex;gap:8px;margin-top:6px}
.away-report .away-buttons .world-map-ui{flex:1;margin-top:0}
.away-report .away-buttons .world-map-ui.quiet{flex:0 0 96px;opacity:.85}
@keyframes away-in{from{opacity:0;transform:translateY(8px)}}
.companion-collect-all{position:absolute;right:12px;bottom:118px;z-index:40;padding:9px 16px;border-radius:999px;background:linear-gradient(180deg,#2f7a45,#1c5330);border:1px solid #bfe6a8;color:#f1ffe6;font-weight:800;font-size:13px;white-space:nowrap;cursor:pointer;box-shadow:0 6px 18px #0009;animation:collect-all 2.4s ease-in-out infinite}
.companion-collect-all::before{content:'';display:inline-block;width:9px;height:9px;margin-right:8px;border-radius:50%;background:#e8ffb0;box-shadow:0 0 8px #e8ffb0}
.companion-collect-all.busy{opacity:.6;pointer-events:none}
.companion-collect-all:focus-visible{outline:2px solid #ffe9a3;outline-offset:2px}
@keyframes collect-all{50%{transform:translateY(-3px);box-shadow:0 9px 20px #0009,0 0 0 5px #9fe07a33}}
@media (max-height:480px){.away-report .pvp-result-panel{padding:10px 16px;gap:4px}.away-row{padding:4px 8px}.away-row>i{width:24px;height:24px}.away-list{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.companion-collect-all{bottom:78px;right:8px;padding:6px 12px;font-size:12px}}
/* ---- Gains fly to their counter (companion-juice.js) ---- */
.resource-fly{position:fixed;left:0;top:0;z-index:2147483000;display:flex;align-items:center;gap:5px;padding:4px 10px;border-radius:999px;background:#102732e6;border:1px solid #e0b450;color:#ffe9a3;font-weight:800;font-size:14px;pointer-events:none;white-space:nowrap;box-shadow:0 4px 12px #0008;will-change:transform,opacity}
.resource-fly i{font-style:normal}
#companion .resource-chip.gained{animation:chip-gained .6s ease-out}
@keyframes chip-gained{0%{transform:scale(1)}35%{transform:scale(1.22);filter:brightness(1.6)}100%{transform:scale(1)}}
/* ---- Guardian paths (companion-looks.js) ---- */
#companion .guardian-paths{display:grid;gap:4px;margin-top:8px;padding-top:7px;border-top:1px solid rgba(196,173,120,.3);text-align:left}
#companion .guardian-paths>strong{color:#ffe9a3;font-size:13px}
#companion .guardian-paths>small{color:#b9c9cd;font-size:11px}
#companion .guardian-path-row{display:grid;gap:6px}
#companion .guardian-path{display:grid;gap:3px;padding:6px;border-radius:8px;background:#0b1a2166;border:1px solid #ffffff1c}
#companion .guardian-path.chosen{border-color:#e0b450;background:#3a2f1466}
#companion .guardian-path button{min-height:36px;font-size:13px;width:100%}
#companion .guardian-path small{font-size:11px;color:#ffe9a3;letter-spacing:0;line-height:1.3}
#companion .guardian-path small.guardian-path-text{color:#c8d7da}
/* ---- Clan (companion-clan.js) ---- */
#companion .fx-clan-found{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:8px;padding:10px;border-radius:10px;background:rgba(24,43,55,.44);border:1px solid rgba(196,173,120,.5)}
#companion .fx-clan-found h4{grid-column:1/-1;margin:0}
#companion .fx-clan-field{display:grid;gap:3px;font-size:11px;color:#c8d7da}
#companion .fx-clan-field input{min-height:36px;padding:0 10px;border-radius:7px;border:1px solid #c4ad78;background:#0b1a21;color:#fff0d5;font:inherit;font-size:14px;min-width:0}
#companion .fx-clan-tag{display:inline-grid;place-items:center;min-width:44px;height:28px;padding:0 6px;border-radius:6px;background:linear-gradient(180deg,#e0b450,#a8752d);color:#1b1206;font-weight:900;font-size:12px;letter-spacing:.06em}
#companion .fx-clan-tag.big{height:34px;min-width:54px;font-size:14px}
#companion .fx-clan-head strong{font-size:17px;color:#fff0d5}
#companion .fx-clan-head small{margin-left:auto;color:#c8d7da}
#companion .fx-shop-row.fx-clan-row{grid-template-columns:auto minmax(0,1fr) auto}
#companion .fx-shop-row.fx-clan-store{grid-template-columns:minmax(0,1fr) auto}
#companion .fx-clan-buttons{display:flex;gap:6px}
#companion .fx-clan-amounts{justify-content:flex-start;margin-bottom:4px}
#companion .fx-clan-foot{display:grid;justify-items:start;gap:4px;margin-top:10px}
#companion .fx-clan-foot small{color:#f2b6a6;font-size:12px}
@media(max-width:540px){#companion .fx-clan-found{grid-template-columns:1fr 1fr}#companion .fx-clan-found button{grid-column:1/-1}}
/* ---- Settings rows added by scripts (notifications, volume) ---- */
#companion .settings-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;margin-top:8px;padding:8px 10px;border-radius:9px;background:rgba(24,43,55,.44);border:1px solid rgba(196,173,120,.5)}
#companion .settings-row-text{display:grid;gap:2px}
#companion .settings-row-text strong{color:#ffe9a3;font-size:13px}
#companion .settings-row-text small{color:#c8d7da;font-size:11.5px;line-height:1.35}
#companion .settings-row input[type=range]{width:min(180px,36vw);accent-color:#e0b450;min-height:32px}
@media (prefers-reduced-motion:reduce){.away-row,.companion-collect-all,.resource-fly,#companion .resource-chip.gained{animation:none!important}}
/* ---- Profile: achievement badges, the Clan card, the scout's report ---- */
/* The clan's crest (owner's picture, 2026-12-02; scripts/cut_ui_ornaments.mjs makes the file). */
#companion .game-section-art[data-icon=clan]{background:url('/icons/profile/clan.webp?v=1') center/contain no-repeat}
#companion .clan-crest{width:44px;height:44px;object-fit:contain;flex:none;filter:drop-shadow(0 2px 3px #000a)}
#companion .clan-crest.small{width:30px;height:30px}
#companion .profile-badges{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 10px;padding:8px 12px;border-radius:10px;background:rgba(24,43,55,.44);border:1px solid rgba(196,173,120,.5)}
#companion .profile-badges>strong{color:#ffe9a3;font-size:14px;margin-right:4px}
#companion .profile-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;background:linear-gradient(180deg,#3a2f14,#231c0c);border:1px solid #e0b450;color:#fff0d5;font-size:12px;font-weight:700}
#companion .profile-badge i{font-style:normal;color:#ffd75e;letter-spacing:-1px}
#companion .profile-badges small{color:#bfe6a8;font-size:12px;margin-left:auto}
#companion .scout-title .scout-report{display:block;color:#ffe9a3;font-size:11px;max-width:46vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* ---- Touch screens: nothing pressable is smaller than a fingertip (scripts/check_touch_targets.cjs) ---- */
@media (pointer:coarse){
#companion .world-compact-actions button,#companion .world-compact-actions button.game-audio-toggle,#companion #companionFullscreen{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important}
#companion #companionControlsClose{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important}
#companion #companionSkills{min-height:40px!important;min-width:76px!important}
#companion .fx-tabs button.fx-tab,#companion .fx-tabs button{min-height:40px!important;height:auto!important}
#companion .inventory-toolbar .inventory-tabs button{min-height:40px!important;height:40px!important}
.companion-collect-all{min-height:40px;display:flex;align-items:center}
.companion-collect-all[hidden]{display:none}
.companion-runaway-warning{min-height:40px;display:flex;align-items:center}
.companion-runaway-warning[hidden]{display:none}
}
/* ---- Collars: the item's facts, the worn strip in the Inventory, the skill choice in Skills (companion-looks.js) ---- */
#companion .collar-facts{display:grid;gap:4px;margin:4px 0}
#companion .collar-fact{padding:4px 9px;border-radius:7px;background:#0b1a2180;border:1px solid #ffffff22;color:#fff0d5;font-size:12px;font-weight:700}
#companion .collar-fact[data-mode=attack]{border-left:3px solid #e07a4c}
#companion .collar-fact[data-mode=defense]{border-left:3px solid #5aa0e0}
#companion .collar-fact.chosen{border-color:#e0b450;background:#3a2f1480}
#companion .collar-fact.closed{opacity:.45;text-decoration:line-through}
#companion .collar-facts small{color:#c8d7da;font-size:11px;line-height:1.35}
#companion .collar-strip{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:10px;margin:6px 0;padding:6px 10px;border-radius:9px;background:rgba(24,43,55,.44);border:1px solid rgba(196,173,120,.5)}
#companion .collar-strip.empty{display:block;color:#b9c9cd;font-size:12px}
#companion .collar-strip-icon{width:44px;height:44px;object-fit:contain}
#companion .collar-strip-text{display:grid;min-width:0}
#companion .collar-strip-text strong{color:#ffe9a3;font-size:13px}
#companion .collar-strip-text small{color:#c8d7da;font-size:11.5px}
#companion .collar-skill{display:grid;gap:8px;padding:10px;border-radius:10px;background:rgba(24,43,55,.44);border:1px solid rgba(196,173,120,.5);text-align:left}
#companion .collar-skill-head{display:grid;grid-template-columns:48px 1fr;column-gap:10px;align-items:center}
#companion .collar-skill-icon{grid-row:1/3;width:48px;height:48px;object-fit:contain}
#companion .collar-skill-head strong{color:#ffe9a3;font-size:14px}
#companion .collar-skill-head small,#companion .collar-skill>small{color:#c8d7da;font-size:11.5px}
#companion .collar-skill-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#companion .collar-skill-card{display:grid;gap:4px;padding:8px;border-radius:8px;background:#0b1a2166;border:1px solid #ffffff1c}
#companion .collar-skill-card[data-mode=attack]{border-top:3px solid #e07a4c}
#companion .collar-skill-card[data-mode=defense]{border-top:3px solid #5aa0e0}
#companion .collar-skill-card strong{color:#fff0d5;font-size:13px}
#companion .collar-skill-card small{color:#c8d7da;font-size:11px;letter-spacing:0}
#companion .collar-skill-card.chosen{border-color:#e0b450;background:#3a2f1466}
#companion .collar-skill-card.closed{opacity:.45}
#companion .collar-skill-card button{min-height:36px;font-size:12px}
#companion .collar-skill-state{color:#ffe9a3;font-weight:800;font-size:12px}
/* ---- The news dot: a green dot on whatever leads to something new, from the HUD button down to the thing itself
   (companion-juice.js renderNews; windows add the class to their own tabs, rows and buttons) ---- */
#companion .news-dot,.news-dot{position:relative}
#companion .news-dot::after,.news-dot::after{content:'';position:absolute;right:-3px;top:-3px;width:11px;height:11px;border-radius:50%;background:#7fe07a;border:2px solid #0b1a21;box-shadow:0 0 8px #7fe07a;animation:pet-life-pulse 1.6s ease-in-out infinite;pointer-events:none;z-index:3}
/* On a HUD button the dot sits on the upper right corner of the round picture, not beside the button. */
#companion .world-game-dock .news-dot::after{right:auto;left:calc(50% + 13px);top:1px}
#companion .game-section-card.news-dot::after{right:8px;top:8px;width:13px;height:13px}
#companion .fx-shop-row.news-dot::after{right:6px;top:6px}
/* ---- Clan extras: notice, titles, level ---- */
#companion .fx-clan-notice{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;margin:8px 0;padding:8px 10px;border-radius:9px;background:rgba(24,43,55,.44);border:1px solid rgba(196,173,120,.5)}
#companion .fx-clan-notice strong{color:#ffe9a3;font-size:12px}
#companion .fx-clan-notice p{margin:0;color:#e6eef0;font-size:13px}
#companion .fx-clan-notice textarea{grid-column:1/-1;min-height:60px;padding:6px 8px;border-radius:7px;border:1px solid #c4ad78;background:#0b1a21;color:#fff0d5;font:inherit;font-size:13px;resize:vertical}
#companion .fx-clan-select,#companion .fx-clan-title{min-height:34px;padding:0 8px;border-radius:7px;border:1px solid #c4ad78;background:#0b1a21;color:#fff0d5;font:inherit;font-size:12px}
#companion .fx-clan-title{width:110px}
#companion .fx-shop-row.fx-clan-member{grid-template-columns:minmax(0,1fr) auto}
#companion .fx-shop-row.fx-clan-member.you{border-color:#e0b450}
#companion .fx-clan-buttons{flex-wrap:wrap;justify-content:flex-end}
#companion .fx-clan-level{display:grid;gap:4px;margin:10px 0;padding:8px 10px;border-radius:9px;background:rgba(24,43,55,.44);border:1px solid rgba(196,173,120,.5)}
#companion .fx-clan-level strong{color:#ffe9a3;font-size:13px}
#companion .fx-clan-level small{color:#c8d7da;font-size:11.5px}
/* ---- Chat (companion-chat.js): a HUD-framed button in the lower left corner of every screen (above the map,
   raids, the school and the market, hence fixed and high); above it a see-through block of
   lines with small tabs, after the chat block of Lineage 2 ---- */
.companion-chat-button{position:fixed;left:10px;bottom:10px;z-index:140;display:flex;align-items:center;gap:7px;min-height:38px;padding:0 12px 0 9px;border-radius:7px;cursor:pointer;background:rgba(24,43,55,.44);border:1px solid rgba(196,173,120,.5);color:#fff0d5;font-weight:800;font-size:12px;letter-spacing:.04em;text-transform:uppercase;backdrop-filter:blur(3px)}
.companion-chat-button[hidden]{display:none}
/* The dot of unread messages (.news-dot is position:relative) must not take the button out of its corner: it did,
   whenever something waited, and the button dropped below the screen. */
#companion .companion-chat-button.news-dot{position:fixed}
.companion-chat-button:hover{background:rgba(36,62,78,.7);border-color:#e0b450}
.companion-chat-button i{position:relative;width:20px;height:15px;border-radius:5px 5px 5px 1px;border:2px solid #ffe9a3;box-sizing:border-box}
.companion-chat-button i::after{content:'';position:absolute;left:3px;right:3px;top:3px;height:2px;background:#ffe9a3;box-shadow:0 4px 0 #ffe9a3;opacity:.8}
.companion-chat-button:focus-visible{outline:2px solid #ffe9a3;outline-offset:2px}
.companion-chat-button[data-unread]:not([data-unread=""])::after{content:attr(data-unread);width:auto;min-width:17px;height:17px;padding:0 4px;display:grid;place-items:center;font-size:10px;color:#07210a;animation:none;right:-7px;top:-8px;text-transform:none;letter-spacing:0}
.companion-chat{position:fixed;left:10px;bottom:92px;z-index:141;width:min(430px,calc(100% - 20px));height:min(250px,calc(100% - 250px));min-height:150px;display:flex;flex-direction:column;border-radius:7px;background:rgba(10,20,27,.62);border:1px solid rgba(196,173,120,.5);color:#fff0d5;overflow:hidden;backdrop-filter:blur(2px)}
.companion-chat[hidden]{display:none}
#companion .companion-chat button{font:inherit;cursor:pointer}
#companion .companion-chat .chat-head{display:flex;align-items:center;gap:2px;padding:2px 2px 0;background:rgba(8,16,22,.55)}
#companion .companion-chat .chat-tabs{display:flex;gap:1px;flex:1;min-width:0}
#companion .companion-chat .chat-tab{flex:0 1 auto;width:auto;margin:0;min-height:18px;padding:0 6px;border-radius:4px 4px 0 0;border:1px solid transparent;border-bottom:0;background:rgba(24,43,55,.5);color:#aebfc5;font-size:10px;font-weight:700;line-height:18px;white-space:nowrap}
#companion .companion-chat .chat-tab[aria-selected=true]{background:rgba(44,88,104,.85);color:#ffe9a3;border-color:rgba(196,173,120,.6)}
#companion .companion-chat .chat-tab.news-dot::after{right:-2px;top:-2px;width:7px;height:7px;border-width:1px}
#companion .companion-chat .chat-close{width:18px;height:18px;min-height:0;min-width:0;margin-left:auto;border-radius:4px;border:1px solid rgba(240,160,140,.6);background:rgba(122,42,31,.7);color:#fff;font-size:13px;line-height:1;padding:0}
#companion .companion-chat .chat-list{flex:1;overflow-y:auto;padding:4px 7px;display:flex;flex-direction:column;gap:1px;scrollbar-width:thin}
#companion .companion-chat .chat-list h4{margin:6px 0 2px;color:#ffe9a3;font-size:11.5px}
#companion .companion-chat .chat-empty{margin:4px 0;color:#9fb3b9;font-size:11.5px;line-height:1.35}
#companion .companion-chat .chat-line{display:block;font-size:12.5px;line-height:1.32;overflow-wrap:anywhere;text-shadow:0 1px 2px #000c;color:#e9eef0}
#companion .companion-chat .chat-line small{display:inline!important;color:#7f9299;font-size:10px;margin:0 4px 0 0;padding:0;border:0;background:none;letter-spacing:0;text-transform:none}
#companion .companion-chat .chat-line b{margin-right:4px;font-weight:800}
#companion .companion-chat .chat-name{display:inline;min-height:0;min-width:0;width:auto;padding:0;margin:0 4px 0 0;border:0;background:none;box-shadow:none;letter-spacing:0;color:inherit;font-size:inherit;font-weight:800;text-shadow:inherit}
#companion .companion-chat .chat-line.mine .chat-name{cursor:default}
#companion .companion-chat .chat-line[data-channel=world]{color:#eef2f3}
#companion .companion-chat .chat-line[data-channel=clan]{color:#8fa8ff}
#companion .companion-chat .chat-line[data-channel=ally]{color:#7ff0a0}
#companion .companion-chat .chat-line[data-channel=pm]{color:#ff8ee6}
#companion .companion-chat .chat-line.system{color:#ffd77a}
#companion .companion-chat .chat-line.system[data-kind=raid]{color:#ff9f8a}
#companion .companion-chat .chat-line.system[data-kind=clan]{color:#a9bcff}
#companion .companion-chat .chat-line.system[data-kind=friends]{color:#9fe8b4}
#companion .companion-chat .chat-input,#companion .companion-chat .chat-add{display:flex;align-items:stretch;gap:4px;margin:0;padding:3px;background:rgba(8,16,22,.6)}
#companion .companion-chat .chat-add{padding:0;background:none}
#companion .companion-chat .chat-input input,#companion .companion-chat .chat-add input{flex:1;min-width:0;box-sizing:border-box;height:28px;min-height:0;margin:0;padding:0 8px;border-radius:5px;border:1px solid rgba(196,173,120,.55);background:rgba(8,16,22,.75);color:#fff0d5;font:inherit;font-size:12.5px}
#companion .companion-chat .chat-send{box-sizing:border-box;min-height:0;height:28px;width:auto;margin:0;padding:0 12px;line-height:26px;border-radius:5px;border:1px solid rgba(191,230,168,.7);background:rgba(47,122,69,.85);color:#f1ffe6;font-weight:800;font-size:11px}
#companion .companion-chat .chat-small{width:auto;margin:0;min-height:22px;padding:0 8px;border-radius:5px;border:1px solid rgba(196,173,120,.6);background:rgba(23,48,61,.85);color:#fff0d5;font-size:10.5px;font-weight:700}
#companion .companion-chat .chat-small[aria-pressed=true]{background:rgba(47,122,69,.85);border-color:#bfe6a8}
#companion .companion-chat .chat-person,.chat-switch{display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:6px;padding:2px 5px;border-radius:5px;background:rgba(23,48,61,.5)}
#companion .companion-chat .chat-switch{grid-template-columns:minmax(0,1fr) auto}
#companion .companion-chat .chat-person-text{display:grid;min-width:0}
#companion .companion-chat .chat-person-text strong{font-size:11.5px;color:#fff0d5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#companion .companion-chat .chat-person-text small{font-size:10px;color:#a9bbc0}
#companion .companion-chat .chat-person-tools{display:flex;gap:3px}
#companion .companion-chat .chat-online{width:8px;height:8px;border-radius:50%;background:#52626a}
#companion .companion-chat .chat-online.on{background:#7fe07a;box-shadow:0 0 6px #7fe07a}
#companion .companion-chat .chat-with,.chat-kinds{display:flex;align-items:center;gap:4px;padding:2px 5px;flex-wrap:wrap;background:rgba(8,16,22,.4)}
#companion .companion-chat .chat-with strong{font-size:11.5px;color:#ff8ee6}
@media (max-height:480px){.companion-chat-button{min-height:34px;left:6px;bottom:6px}.companion-chat{left:6px;bottom:74px;height:calc(100% - 128px);min-height:110px;width:min(380px,calc(100% - 12px))}}
@media (pointer:coarse){#companion .companion-chat .chat-tab{min-height:30px;line-height:30px;padding:0 9px;font-size:11px}#companion .companion-chat .chat-close{width:30px;height:30px}#companion .companion-chat .chat-input input,#companion .companion-chat .chat-add input,#companion .companion-chat .chat-send{height:38px;line-height:36px;min-height:38px}#companion .companion-chat .chat-small{min-height:34px}.companion-chat-button{min-height:42px}}
/* The land's own buttons do not belong on the world map. */
html.world-map-open .companion-collect-all,html.world-map-open .companion-runaway-warning{display:none!important}
/* ---- World map legend: a compact column at the left that folds to its heading (world-map.js) ---- */
#companion #worldMap .world-map-legend{position:absolute;left:10px;right:auto;top:64px;bottom:auto;transform:none;margin:0;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:3px;width:176px;max-width:46vw;max-height:calc(100% - 140px);overflow-y:auto;padding:5px;border-radius:9px;background:rgba(8,18,22,.62);border:1px solid rgba(196,173,120,.5);font-size:10px;scrollbar-width:thin}
#companion #worldMap .world-map-legend-item{background:none;padding:1px 3px;grid-template-columns:11px minmax(0,1fr);column-gap:6px}
#companion #worldMap .world-map-legend-item strong{font-size:11px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#companion #worldMap .world-map-legend-item small{font-size:9.5px;line-height:1.15;letter-spacing:0;white-space:normal}
#companion #worldMap .world-map-legend-item i{width:11px;height:11px}
#companion #worldMap .world-map-legend.folded{width:auto;overflow:visible}
#companion #worldMap .world-map-legend.folded .world-map-legend-item{display:none}
#companion #worldMap button.world-map-legend-fold{display:flex!important;align-items:center;justify-content:space-between;gap:8px;min-height:28px!important;width:100%;padding:2px 8px!important;border-radius:7px!important;border:1px solid rgba(196,173,120,.6)!important;background:#17303d!important;color:#ffe9a3!important;font-size:11px!important;font-weight:800;box-shadow:none!important;pointer-events:auto;cursor:pointer}
#companion #worldMap .world-map-legend-fold i{width:0;height:0;border:5px solid transparent;border-top-color:#ffe9a3;border-bottom-width:0;transition:transform .15s}
#companion #worldMap .world-map-legend.folded .world-map-legend-fold i{transform:rotate(-90deg)}
@media(max-width:900px){#companion #worldMap .world-map-legend{display:flex;top:52px;width:150px}}
@media (pointer:coarse){#companion #worldMap button.world-map-legend-fold{min-height:40px!important}}
/* ---- A clan's raid on a boss (companion-boss.js) ---- */
.boss-raid{position:absolute;left:50%;top:54px;transform:translateX(-50%);z-index:45;width:min(520px,calc(100% - 24px));display:grid;gap:5px;padding:8px 12px;border-radius:9px;background:rgba(10,20,27,.78);border:1px solid rgba(196,173,120,.6);color:#fff0d5;box-shadow:0 8px 22px #0008}
.boss-raid[hidden]{display:none}
.boss-raid[data-status=won]{border-color:#bfe6a8}.boss-raid[data-status=lost]{border-color:#f0a08c}
.boss-head{display:grid;grid-template-columns:auto 1fr;align-items:baseline;column-gap:10px}
.boss-head strong{font-size:16px;color:#ffe9a3}
.boss-head small{justify-self:end;font-size:11.5px;color:#c8d7da}
.boss-hp{display:block;height:6px;border-radius:3px;background:#0b1a21;overflow:hidden}
.boss-hp.big{grid-column:1/-1;height:12px;border:1px solid #5a1a12}
.boss-hp i{display:block;height:100%;background:linear-gradient(90deg,#3fae5a,#8fe07a);transition:width .3s}
.boss-hp.big i{background:linear-gradient(90deg,#a3231a,#f0624d)}
.boss-text{margin:0;font-size:12.5px;line-height:1.35;color:#e6eef0}
.boss-members{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:4px}
.boss-member{display:grid;gap:1px;padding:3px 6px;border-radius:6px;background:rgba(23,48,61,.7);border:1px solid #ffffff1c}
.boss-member.you{border-color:#e0b450}
.boss-member.down{opacity:.45}
.boss-member strong{font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.boss-member small{font-size:10px;color:#b9c9cd}
.boss-buttons{display:flex;gap:8px;justify-content:center}
#companion .boss-raid .boss-button{width:auto;min-width:110px;min-height:38px;margin:0;padding:0 14px;border-radius:8px;border:1px solid #c4ad78;background:#17303d;color:#fff0d5;font-weight:800;font-size:13px;cursor:pointer}
#companion .boss-raid .boss-button.go{border-color:#bfe6a8;background:linear-gradient(180deg,#2f7a45,#1c5330);color:#f1ffe6}
#companion .boss-raid .boss-button:disabled{opacity:.5;cursor:default}
.boss-slam{position:absolute;z-index:8;border-radius:50%;pointer-events:none;border:3px solid #ff5a44;background:radial-gradient(circle,#ff5a4455,#ff5a4418);animation:boss-slam .45s ease-in-out infinite alternate}
.boss-slam[hidden]{display:none}
.boss-slam[data-kind=spot]{border-color:#ffe9a3;background:radial-gradient(circle,#ffe9a355,#ffe9a310);animation:none}
@keyframes boss-slam{to{background:radial-gradient(circle,#ff5a4499,#ff5a4433)}}
.boss-raid[data-enraged=true][data-status=fighting]{border-color:#ff5a44;box-shadow:0 8px 22px #0008,0 0 0 2px #ff5a4455}
.boss-shouts{display:flex;flex-wrap:wrap;gap:4px;justify-content:center}
#companion .boss-raid .boss-button.shout{min-width:0;min-height:26px;padding:0 8px;font-size:11px;font-weight:700;border-radius:6px;background:rgba(23,48,61,.85)}
.boss-said{display:grid;gap:1px;font-size:12px;color:#ffd77a;text-shadow:0 1px 2px #000c}
.boss-said .boss{color:#ff9f8a;font-weight:800}
.boss-report{display:grid;grid-template-columns:minmax(0,1.6fr) repeat(4,auto);gap:2px 10px;font-size:11.5px;align-items:baseline}
.boss-report b{color:#ffe9a3;font-size:10.5px;text-transform:uppercase;letter-spacing:.04em}
.boss-report span{color:#e6eef0;white-space:nowrap}
.boss-report span.name{overflow:hidden;text-overflow:ellipsis}
.boss-report span.you{color:#ffe9a3;font-weight:700}
.boss-report small{grid-column:1/-1;color:#b9c9cd;font-size:10.5px}
/* During the raid the land's own windows and buttons stand aside. */
#companion .boss-raid-mode .world-game-dock,#companion .boss-raid-mode .companion-collect-all,#companion .boss-raid-mode .companion-guide,#companion .boss-raid-mode .companion-land-event,#companion .boss-raid-mode .companion-runaway-warning{display:none!important}
@media (max-height:480px){.boss-raid{top:6px;padding:5px 9px;gap:3px;width:min(480px,calc(100% - 130px))}.boss-members,.boss-shouts{display:none}}
@media (pointer:coarse){#companion .boss-raid .boss-button.shout{min-height:38px}}
/* ---- Settings selects, the chat's text size, the player card (companion-settings.js, companion-chat.js) ---- */
#companion .settings-select{min-height:36px;padding:0 10px;border-radius:7px;border:1px solid #c4ad78;background:#0b1a21;color:#fff0d5;font:inherit;font-size:13px}
html[data-chat-size=small] #companion .companion-chat .chat-line{font-size:11px}
html[data-chat-size=large] #companion .companion-chat .chat-line{font-size:15px}
html[data-chat-size=large] #companion .companion-chat .chat-input input{font-size:14.5px}
#companion .companion-chat .chat-card{flex:1;display:grid;align-content:start;gap:8px;padding:8px;overflow-y:auto}
#companion .companion-chat .chat-card-head{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:8px;align-items:start}
#companion .companion-chat .chat-card-head img{width:56px;height:56px;object-fit:contain;border-radius:8px;background:rgba(23,48,61,.7);border:1px solid rgba(196,173,120,.5)}
#companion .companion-chat .chat-card-head strong{font-size:13.5px;color:#ffe9a3}
#companion .companion-chat .chat-card-tools{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
#companion .companion-chat .chat-card-tools small{color:#b9c9cd;font-size:11px}
#companion .companion-chat .chat-small[data-chat=report],#companion .companion-chat .chat-small[data-chat=block]{border-color:rgba(240,160,140,.7)}

/* The player's flag: thirty to choose from (the adoption form, Profile -> Settings). */
#companion .flag-field{display:grid;gap:6px;margin:10px 0}
#companion .flag-field[hidden]{display:none}
#companion .flag-field>span{font-size:13px;color:#ffe9a3}
#companion .flag-chooser{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:6px;max-height:204px;overflow:auto;padding:8px;border-radius:10px;background:#0a1224;border:1.5px solid #caa14d;box-shadow:0 0 0 1px #2a1a06}
#companion .flag-chooser .flag-choice{min-width:0;min-height:0;padding:3px;border-radius:8px;border:2px solid transparent;background:none;box-shadow:none;cursor:pointer}
#companion .flag-chooser .flag-choice img{display:block;width:100%;height:auto;pointer-events:none}
#companion .flag-chooser .flag-choice:is(:hover,:focus-visible){background:#ffffff14}
#companion .flag-chooser .flag-choice[aria-checked=true]{border-color:#ffe9a3;background:#ffffff1f;box-shadow:0 0 10px #ffd76a88}
#companion .profile-flag{margin-top:14px}
