/* G95 Ultimate + Chorus, K2 Rekindle, K1 skill picker. Loaded after g92.css. */
/* Big Ultimate button: left of the diamond, level with Attack, a clear gap from Skill and the small Target button. */
#touchControls{--u:calc(var(--a) * 1.22);--ugap:30px}
#touchControls #ultimate,#touchControls #ultRing{position:absolute;margin:0;border-radius:50%}
#touchControls #ultimate{width:var(--u);height:var(--u);
  right:calc(var(--cx) + var(--o) + var(--b) / 2 + var(--ugap));bottom:calc(var(--cy) - var(--o) - var(--a) / 2 + 10px);
  display:grid;place-content:center;justify-items:center;gap:1px;padding:0;
  border:3px solid #ffe08a;color:#2a1a02;
  background:radial-gradient(circle at 35% 28%,#fff3c4,#ffc93d 45%,#c98a12);
  box-shadow:0 0 0 4px rgba(255,214,90,.25),0 0 26px rgba(255,200,60,.75),0 8px 18px rgba(0,0,0,.55);touch-action:none}
#touchControls #ultimate span{font-size:24px;line-height:1;font-weight:900}
#touchControls #ultimate b{font-size:11px;letter-spacing:.05em;font-weight:900}
#touchControls #ultimate small{font-size:8px;font-weight:800;max-width:calc(var(--u) - 14px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.85}
#touchControls #ultimate.pop{animation:g95pop .38s cubic-bezier(.2,1.6,.4,1)}
#touchControls #ultimate:not([hidden]){animation:g95pop .38s cubic-bezier(.2,1.6,.4,1)}
/* glow pulses on a separate layer with opacity only, so it costs no repaint per frame */
#touchControls #ultimate::after{content:'';position:absolute;inset:-8px;border-radius:50%;pointer-events:none;
  box-shadow:0 0 0 4px rgba(255,214,90,.2),0 0 22px rgba(255,200,60,.9);opacity:0;will-change:opacity;animation:g95glow 1.4s ease-in-out .4s infinite}
@keyframes g95pop{0%{transform:scale(.3);opacity:0}100%{transform:scale(1);opacity:1}}
@keyframes g95glow{50%{opacity:1}}
/* G108 meter: the Ultimate button itself while it charges. Same size and spot as the ready button, a gold ring fills
   clockwise from hits dealt, heals and damage taken. Not tappable until full (then the real button pops in). */
#touchControls #ultRing{--r:var(--u);width:var(--r);height:var(--r);pointer-events:none;
  right:calc(var(--cx) + var(--o) + var(--b) / 2 + var(--ugap));bottom:calc(var(--cy) - var(--o) - var(--a) / 2 + 10px);
  background:conic-gradient(#ffcf4a calc(var(--pct,0) * 1%),rgba(60,48,22,.85) 0);display:grid;place-content:center;justify-items:center;
  box-shadow:0 0 0 2px rgba(255,224,138,.35),0 4px 12px rgba(0,0,0,.55)}
#touchControls #ultRing i{position:absolute;inset:6px;border-radius:50%;background:radial-gradient(circle at 35% 28%,#3a2d12,#16120a 70%)}
#touchControls #ultRing b{position:relative;font-size:20px;line-height:1;color:#c9a64a;opacity:.75}
#touchControls #ultRing small{position:relative;font-size:10px;font-weight:900;color:#ffe9a8;letter-spacing:.04em}
#touchControls #ultRing.firing{box-shadow:0 0 0 3px rgba(255,214,90,.5),0 0 18px rgba(255,200,60,.85)}
/* K2 Rekindle sits in the top slot (healers have no Roar) */
#touchControls #rekindle{position:absolute;margin:0;width:var(--b);height:var(--b);right:calc(var(--cx) - var(--b) / 2);bottom:calc(var(--cy) + var(--o) - var(--b) / 2);
  border-radius:50%;border:2px solid #ffe9a8;background:radial-gradient(circle at 35% 28%,#5a4a1c,#221a08);color:#fff3cf;display:grid;place-content:center;justify-items:center;padding:0}
#touchControls #rekindle span{font-size:18px;line-height:1}
#touchControls #rekindle b{font-size:9px;letter-spacing:.04em}
#touchControls #rekindle small{font-size:7px}
#touchControls #rekindle.wanted{box-shadow:0 0 0 3px rgba(255,233,168,.35),0 0 18px rgba(255,220,120,.8)}
#touchControls #rekindle.cooling{filter:saturate(.5) brightness(.8)}
/* Chorus: one gold flash over the screen, then a label at the top while the bonus lasts */
#chorusFlash{position:fixed;inset:0;pointer-events:none;z-index:40;
  background:radial-gradient(ellipse at 50% 55%,rgba(255,226,120,0) 30%,rgba(255,210,80,.42) 75%,rgba(255,190,40,.6));opacity:0}
#chorusFlash.go{animation:g95flash 1.1s ease-out}
@keyframes g95flash{0%{opacity:0}12%{opacity:1}100%{opacity:0}}
#chorusLabel{position:fixed;left:50%;top:max(10px,env(safe-area-inset-top));transform:translateX(-50%);z-index:41;pointer-events:none;
  padding:5px 16px 6px;border-radius:999px;border:2px solid #ffe08a;background:rgba(40,26,4,.88);color:#ffe9a8;text-align:center;
  box-shadow:0 0 22px rgba(255,200,60,.6);display:grid;line-height:1.1}
#chorusLabel b{font-size:18px;letter-spacing:.18em;font-weight:900;color:#fff1c0}
#chorusLabel small{font-size:10px;font-weight:700}
body.chorus-on #partyVitals .pf{box-shadow:0 0 0 2px rgba(255,214,90,.75),0 0 12px rgba(255,200,60,.5)}
#partyVitals .buff.chorus{background:#ffd25a;color:#2a1a02}
@media (prefers-reduced-motion:reduce){#chorusFlash.go,#touchControls #ultimate:not([hidden]),#touchControls #ultimate.pop,#touchControls #ultimate::after{animation:none}#chorusFlash.go{opacity:.6}}
@media (orientation:portrait){
  /* portrait: the Ultimate sits above the diamond, still clear of Target */
  #touchControls #ultimate{right:calc(var(--cx) - var(--u) / 2);bottom:calc(var(--cy) + var(--o) + var(--b) / 2 + var(--ugap))}
  #touchControls #ultRing{right:calc(var(--cx) - var(--u) / 2);bottom:calc(var(--cy) + var(--o) + var(--b) / 2 + var(--ugap))}
}
/* K1 skill picker (job station sheet) */
.k1-line{margin:8px 0;font-size:13px;line-height:1.4;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.k1-muted{color:#b8b2a0}
.k1-open{min-height:36px;padding:4px 12px;font-size:13px}
.k1-note{margin:0 0 10px;font-size:13px;line-height:1.4;color:#e8e4d8}
.k1-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.k1-pick{position:relative;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:2px;min-height:96px;padding:8px 10px 8px 38px;
  background:#1b1e1c;border:1px solid #3d3a30;border-radius:10px;color:#e8e4d8;font-size:13px}
.k1-pick b{font-family:'Cormorant Garamond',Georgia,serif;font-size:17px;line-height:1.1;color:#f7f2e6}
.k1-pick small{font-size:11px;color:#b8b2a0}
.k1-pick p{margin:2px 0 0;font-size:12px;line-height:1.3;color:#d8d2c0}
.k1-pick .k1-slot{position:absolute;left:8px;top:9px;width:22px;height:22px;border-radius:50%;border:2px solid #5a5545;display:grid;place-content:center;font-weight:800;font-size:12px}
.k1-pick.on{background:#2a2620;border:2px solid #d9b25c;box-shadow:0 0 14px rgba(217,178,92,.25)}
.k1-pick.on .k1-slot{background:#d9b25c;border-color:#d9b25c;color:#1b1608}
.k1-bar{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:10px 0 0;font-size:12px;color:#b8b2a0}
.k1-bar i{font-style:normal;padding:3px 9px;border-radius:999px;background:#2a2620;color:#ffe7b4;border:1px solid #6b5a30}
.k1-bar i.k1-fixed{background:#1b1e1c;color:#b8b2a0;border-color:#3d3a30}
.k1-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
.k1-actions button{flex:0 0 auto;width:auto;min-width:140px;white-space:nowrap;min-height:44px;padding:4px 16px}
@media (orientation:landscape) and (max-height:540px){
  .k1-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .k1-pick{min-height:0;padding:6px 8px 6px 34px}
  .k1-pick p{font-size:11px}
  .k1-note{margin-bottom:6px;font-size:12px}
  .k1-actions{margin-top:6px}
  .k1-actions button{min-height:40px}
}

/* K1 live phone bar: slots 2 and 3 in the free spots of the diamond (slot 1 keeps the Skill spot on the left).
   Damage: top + right. Healers (Ally on the right): top + upper-right corner. Tanks (Guard right, Roar top): upper-right corner. */
#touchControls .barskill{position:absolute;margin:0;width:var(--b);height:var(--b);border-radius:50%;padding:0;pointer-events:auto;touch-action:none;
  display:grid;place-content:center;justify-items:center;gap:1px;border:2px solid #8fc7d8;color:#f7f2e6;
  background:radial-gradient(circle at 32% 28%,#24404d,#111a1e);box-shadow:0 10px 26px rgba(0,0,0,.55)}
#touchControls #skill3{border-color:#c9a3e0;background:radial-gradient(circle at 32% 28%,#3e2a4a,#17111c)}
#touchControls .barskill span{font-size:18px;line-height:1}
#touchControls .barskill b{font-size:10.5px;letter-spacing:.06em}
#touchControls .barskill small{font-size:8.5px;color:var(--ink-mid);text-align:center;line-height:1.05;max-width:calc(var(--b) - 10px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums}
#touchControls .barskill.cooling{background:#151816;border-color:var(--stone-edge);color:var(--ink-soft)}
#touchControls .barskill.wanted,#touchControls #skill.wanted{box-shadow:0 0 0 3px rgba(255,233,168,.35),0 0 18px rgba(255,220,120,.8)}
#touchControls{--kc:calc(var(--o) * 1.12)}
/* spots */
#touchControls[data-bar="dps"] #skill2,#touchControls[data-bar="healer"] #skill2{right:calc(var(--cx) - var(--b) / 2);bottom:calc(var(--cy) + var(--o) - var(--b) / 2)}
#touchControls[data-bar="dps"] #skill3{right:calc(var(--cx) - var(--o) - var(--b) / 2);bottom:calc(var(--cy) - var(--b) / 2)}
#touchControls[data-bar="healer"] #skill3,#touchControls[data-bar="tank"] #skill2{right:calc(var(--cx) - var(--kc) - var(--b) / 2);bottom:calc(var(--cy) + var(--kc) - var(--b) / 2)}
#touchControls[data-bar="tank"] #skill3{display:none}
@media (orientation:landscape) and (max-height:540px){
  body.run16 #touchControls .barskill small{font-size:8px}
}
/* K1: key labels on the extra slots only while a keyboard is in use */
#touchControls .barskill small.keyonly{display:none}
html.kb-input #touchControls .barskill small.keyonly{display:block}
