.helper-canvas{position:relative;display:block;width:100%;height:100%;isolation:isolate;overflow:hidden;background:#192b29;border-radius:5px;container-type:size}
.helper-inset{position:absolute;z-index:2;right:4%;bottom:4%;width:min(45%,170px);height:auto;aspect-ratio:140/72;overflow:hidden;border:2px solid #c5a168;border-radius:6px;box-shadow:0 2px 8px #17170dc9;pointer-events:none}
.turn-art .helper-canvas img,.client-reaction .helper-canvas img{box-shadow:none;max-width:100%}
.helper-plate{width:100%;height:100%;display:grid;place-items:center;position:absolute;inset:0;background:radial-gradient(ellipse,#516146,#222f27 72%);z-index:2}
.helper-plate .helper-canvas{width:min(94%,380px);height:auto;aspect-ratio:140/72;max-height:98%;border:2px solid #bc9b61;box-sizing:border-box}
.client-reaction{position:relative}
.helper-activation{position:absolute;inset:-1px;z-index:5;display:flex;align-items:center;gap:clamp(4px,1vw,10px);isolation:isolate;overflow:hidden;padding:3px 6px 3px 3px;background:linear-gradient(115deg,#1b302a,#364338);border:1px solid #b8995c;border-radius:6px;color:#fff0cc;pointer-events:none}
.helper-activation-art{flex:none;width:min(42%,155px);height:100%;max-height:84px;display:block}
.helper-activation>span:last-child{min-width:0}.helper-activation b,.helper-activation small{display:block;line-height:1.1}
.helper-activation b{font:600 clamp(11px,2vmin,20px)/1.05 Crimson,Georgia}.helper-activation small{font:normal clamp(9px,1.7vmin,15px)/1.12 Inter,Arial;margin-top:3px}
.helper-activation[data-pace=full]{animation:helper-arrives .23s ease-out}
@keyframes helper-arrives{from{opacity:.3;transform:translateY(3px)}}
.tally-cell.helper-target .tally-stamp{outline:2px solid #ecc580;outline-offset:2px}
.ability-inspect{position:absolute;inset:0;background:transparent;border:0;border-radius:4px;cursor:pointer}.ability-inspect:focus-visible{outline:2px solid #f3d192}
.tally-cell:has(.ability-inspect) .tally-label::after{content:' ↗';color:#efd794}
.impact-skills{display:grid;gap:6px;padding:7px}.impact-skills>div{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:5px;font-size:12px}.impact-skills .draft-pips{display:inline-flex}
@media(max-width:620px) and (orientation:portrait){.helper-inset{width:min(34%,116px);max-height:46%}}
@media(max-height:400px){.helper-inset{bottom:2%;width:min(48%,130px);max-height:52%}.helper-activation{gap:4px;padding:2px}.helper-activation-art{width:40%}}
@media(prefers-reduced-motion:reduce){.helper-activation{animation:none!important}}
.helper-plate>[data-ability-plate]{display:block;width:min(96%,360px);aspect-ratio:140/72;max-height:96%;position:relative}
.helper-plate>[data-ability-plate]>.helper-canvas{width:100%;height:100%;max-height:none}
.helper-design{position:absolute;display:block;width:140px;height:72px;left:50%;top:50%;transform:translate(-50%,-50%) scale(var(--scene-scale,1));overflow:hidden}
.helper-design:has(.guild-operation){background:radial-gradient(ellipse at 45% 30%,#fff0c9,#ceb483)}
.all-draft-pips,.recruit-skill-meter{display:inline-flex;align-items:center;gap:2px;vertical-align:middle}.all-draft-pips{gap:4px;margin-left:3px}.recruit-skill-meter .draft-pips{margin:0;gap:1px}.recruit-skill-meter .draft-pips i{width:4px;height:6px}
.helper-flight-seal{position:fixed;z-index:22;width:clamp(22px,5vmin,37px);aspect-ratio:1;border:2px solid #d7ae67;border-radius:50%;object-fit:cover;pointer-events:none;box-shadow:0 2px 7px #1c160d80}.chapter-map.helper-target{outline:2px solid #bb9958}.helper-design .guild-operation{background:radial-gradient(ellipse at 45% 30%,#fff0c9,#ceb483)}
.helper-plate{display:flex;align-items:center;justify-content:center;overflow:hidden}
.helper-plate>[data-ability-plate]{flex:0 1 360px;min-width:0;max-width:94%;max-height:94%}

.chaska-card .turn-copy { gap:clamp(3px,1vmin,10px); }
.chaska-card .potion-passive {
  display:flex;
  align-items:center;
  gap:6px;
  color:#244e41;
  line-height:1.15;
  background:#e8ebd5;
  border-inline-start:2px solid #619675;
  border-radius:3px;
  padding:4px 5px;
}
.potion-passive > span { display:flex; flex:none; }
.potion-passive .portrait {
  width:clamp(18px,3.5vmin,30px);
  height:auto;
  aspect-ratio:1;
  object-fit:cover;
  border-radius:50%;
  border:1px solid #438269;
}
.potion-passive .portrait + .portrait { margin-inline-start:-4px; }
.potion-passive small { font-size:clamp(9px,1.6vmin,13px); }
.potion-skill { min-width:0; }
.potion-skill select {
  min-inline-size:0;
  max-inline-size:100%;
  font:inherit;
  color:#163d32;
  background:#f8f3db;
}
.chaska-card .turn-art > .potion-beast-portrait { object-position:50% 35%; }
@media(max-width:620px) {
  .chaska-card .turn-art > .potion-beast-portrait { object-position:50% 19%; }
}
.chaska-card.potion-changing .turn-art[data-potion-pace=full] > .potion-beast-portrait {
  animation:potion-portrait-change .72s both ease-out;
}
@keyframes potion-portrait-change {
  0% { opacity:0; transform:scale(.98); filter:brightness(1.9) saturate(1.6); }
  32% { opacity:.85; transform:scale(1.05); filter:brightness(1.55) saturate(1.4); }
  100% { opacity:1; transform:scale(1); filter:none; }
}
.potion-scene {
  position:absolute;
  inset:0;
  isolation:isolate;
  background:radial-gradient(ellipse at 50% 76%,#4d8b66,#153832 58%,#14261e);
}
.potion-scene img { display:block; position:absolute; object-fit:cover; }
.potion-scene .potion-emblem {
  inset:5px auto auto 37px;
  width:65px;
  height:62px;
  border:1px solid #c6dc91;
  border-radius:49%;
  box-shadow:0 0 10px #bafa8d80;
}
.potion-scene .potion-ally {
  inset:20px auto auto 4px;
  width:33px;
  height:33px;
  border-radius:50%;
  border:1px solid #d3e086;
  box-shadow:0 0 9px #bafa8da6;
}
.potion-scene .potion-ally + .potion-ally { left:auto; right:4px; }
.potion-scene[data-beast=true] .potion-emblem {
  z-index:2;
  inset:auto auto 4px 58px;
  width:24px;
  height:24px;
}
.potion-scene :is(.potion-transform,.potion-transform-base) {
  inset:0 40px;
  width:60px;
  height:72px;
  object-position:50% 27%;
  border-inline:1px solid #95d68b;
}
.guild-motion[data-pace=full] .potion-scene .potion-ally { animation:elixir-infuse .78s both ease-out; }
.guild-motion[data-pace=full] .potion-scene .potion-ally + .potion-ally { animation-delay:.14s; }
.guild-motion[data-pace=full] .potion-scene .potion-transform { animation:potion-portrait-change .8s both ease-out; }
@keyframes elixir-infuse {
  0% { opacity:.35; filter:brightness(.6); transform:scale(.77); }
  58% { opacity:1; filter:brightness(1.42); transform:scale(1.05); }
  100% { opacity:1; filter:none; transform:scale(1); }
}
.potion-recruit {
  color:#244e41;
  font-size:clamp(10px,1.55vmin,13px);
  line-height:1.12;
}

.potion-vials {
  position:absolute;
  z-index:3;
  display:flex;
  gap:clamp(3px,1.2vmin,10px);
  align-items:center;
  inset:auto auto 7% 7%;
  pointer-events:none;
}
.potion-vial {
  --vial-color:#d45d67;
  position:relative;
  width:clamp(14px,3vmin,28px);
  height:clamp(18px,4vmin,36px);
  border:1px solid #fff5cf;
  border-radius:35% 35% 40% 40%;
  background:radial-gradient(ellipse at 32% 67%,#fffbdf 0 7%,transparent 18%),
    linear-gradient(155deg,#352a32 32%,var(--vial-color) 36%,#28202e);
  box-shadow:0 0 6px var(--vial-color);
}
.potion-vial::before {
  content:"";
  position:absolute;
  width:45%;
  height:30%;
  inset:-25% 0 auto;
  margin-inline:auto;
  background:#c6a371;
  border:1px solid #f6dec0;
  border-radius:2px;
}
.potion-vial[data-elixir=amber] { --vial-color:#f7b64b; }
.potion-vial[data-elixir=jade] { --vial-color:#4ee2a6; }
.potion-scene > .potion-vials {
  inset:auto 21px 4px;
  gap:5px;
  justify-content:center;
}
.potion-scene > .potion-vials > .potion-vial { width:8px; height:11px; }
.potion-scene[data-beast=true] > .potion-vials { bottom:7px; justify-content:space-between; }
.chaska-card.potion-changing .turn-art[data-potion-pace=full] > .potion-vials > .potion-vial,
.guild-motion[data-pace=full] .potion-scene[data-beast=true] .potion-vial {
  animation:potion-vial-charge 1.2s ease-out both;
  animation-delay:calc(100ms * var(--potion-index));
}
.chaska-card.potion-changing .turn-art[data-potion-pace=full] > .potion-vials > .potion-vial {
  --charge-x:clamp(50px,12vw,185px);
  --charge-y:clamp(-180px,-13vh,-50px);
}
.chaska-card.potion-changing .turn-art[data-potion-pace=full] > .potion-beast-portrait,
.guild-motion[data-pace=full] .potion-scene[data-beast=true] .potion-transform {
  animation-duration:.4s;
  animation-delay:1.05s;
}
.guild-motion[data-pace=full] .potion-scene[data-beast=true] .potion-vial { --charge-x:19px; --charge-y:-30px; }
.guild-motion[data-pace=full] .potion-scene[data-beast=true] .potion-vial[data-elixir=amber] { --charge-x:0px; }
.guild-motion[data-pace=full] .potion-scene[data-beast=true] .potion-vial[data-elixir=jade] { --charge-x:-19px; }
@keyframes potion-vial-charge {
  0% { filter:brightness(.28); }
  21%, 57% { filter:brightness(1.6); transform:translateY(-2px) scale(1.17); }
  76% { opacity:0; transform:translate(var(--charge-x,45px),var(--charge-y,-45px)) scale(.25); }
  82% { opacity:0; transform:none; }
  100% { opacity:1; filter:none; transform:none; }
}
