/* FORNWARD — the skill medallion's surface
   ---------------------------------------------------------------------------
   Everything here is namespaced under `.skill-medallion`, so it cannot collide
   with the older text-button styles the rest of the sheet still carries. The
   medallion is a control, not a panel: no card, no border box, no glow that
   runs on its own.
   ========================================================================== */

.skill-medallion {
  position: relative;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--medallion-accent, var(--gold));
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.skill-medallion__inner,
.skill-medallion__art {
  display: block;
  width: 100%;
  height: 100%;
}

/* ANCHORED, NOT LAID OUT. The button is a flex container, so a percentage
   height on the picture resolves to zero and the whole medallion disappears.
   Absolute positioning against the button's own box is the one thing that
   cannot be collapsed by a sibling's layout. */
.skill-medallion__inner {
  position: absolute;
  inset: 0;
}

/* The dark inner surface: the glyph sits on near-black stone, not on the art. */
.skill-medallion__disc {
  fill: rgba(8, 11, 15, .92);
  stroke: rgba(203, 179, 132, .22);
  stroke-width: 1;
}

/* The track is what a cooldown empties into — thin, and quiet enough that an
   idle ring never looks like an active state. */
.skill-medallion__track {
  stroke: rgba(232, 236, 242, .16);
  stroke-width: 2;
}

/* The cooldown arc: it closes as the skill comes back. */
.skill-medallion__cooldown {
  stroke: currentColor;
  stroke-width: 2.5;
  transition: stroke-dashoffset .1s linear;
  opacity: .85;
}

.skill-medallion__glyph {
  /* THE GLYPH IS THE THING YOU AIM AT. On a near-black disc a dimmed fill
     reads as a smudge, so it carries its own brightness rather than the ring's
     opacity. */
  fill: currentColor;
  opacity: .95;
}

/* READY IS BRIGHTER, NOT LOUDER: the glyph gains contrast and the arc closes.
   No pulse, no rotation — a control that animates on its own draws the eye
   away from the fight it is meant to serve. */
.skill-medallion[data-medallion-state="ready"] .skill-medallion__glyph { opacity: 1; }
.skill-medallion[data-medallion-state="ready"] .skill-medallion__cooldown { opacity: 1; }
.skill-medallion[data-medallion-state="ready"] .skill-medallion__disc {
  stroke: rgba(203, 179, 132, .38);
}

/* A skill with no charge is not merely cooling: it cannot be used at all, so
   its glyph steps back and the ring empties. */
.skill-medallion[data-medallion-state="charge"] .skill-medallion__glyph { opacity: .45; }

.skill-medallion:active .skill-medallion__inner { transform: scale(.96); }

@media (prefers-reduced-motion: reduce) {
  .skill-medallion__cooldown { transition: none; }
  .skill-medallion:active .skill-medallion__inner { transform: none; }
}


/* ============================================================================
   ANCIENT CINEMATIC MEDALLIONS — November 2026
   Styled OVER the existing SVG and radial cooldown; gameplay still owns state.
   ============================================================================ */
#skillbar .skill-medallion {
  isolation: isolate;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  min-height: 64px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #d1b385;
  background:
    radial-gradient(circle at 48% 40%, rgba(71, 52, 36, .18) 0%, rgba(9, 10, 13, .96) 65%),
    #0b0b0d;
  box-shadow:
    0 3px 10px rgba(0,0,0,.60),
    inset 0 0 0 1px #624628,
    inset 0 0 0 3px #171415,
    inset 0 0 0 4px #ab8757,
    inset 0 0 0 5px rgba(228,193,130,.5);
  -webkit-tap-highlight-color: transparent;
}
#skillbar .skill-medallion:focus-visible {
  outline: 2px solid #e9d3a5;
  outline-offset: 4px;
}
#skillbar .skill-medallion::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 0;
  border: 1px solid rgba(211, 169, 102, .4);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: inset 0 1px 5px #000;
}
#skillbar .skill-medallion__inner { z-index: 1; }
#skillbar .skill-medallion__art {
  width: 100%;
  height: 100%;
}
#skillbar .skill-medallion__disc {
  fill: rgba(7, 9, 13, .93);
  stroke: rgba(207, 171, 113, .28);
  stroke-width: 1.15;
}
#skillbar .skill-medallion__track {
  stroke: rgba(208, 186, 147, .15);
  stroke-width: 2.1;
}
#skillbar .skill-medallion__cooldown {
  stroke-width: 2.35;
  opacity: .78;
  filter: none;
}
#skillbar .skill-medallion__ornament {
  fill: #ad8857;
  stroke: #4d3521;
  stroke-width: .6;
  filter: drop-shadow(0 1px 1px #000);
}
#skillbar .skill-medallion__glyph {
  fill: currentColor;
  opacity: 1;
  /* Clear at 1x phone size without a fluorescent halo around the rune. */
  filter: drop-shadow(0 0 0.7px currentColor);
}
#skillbar .skill-medallion[data-medallion="nova"] {
  /* Tarnished amethyst rather than saturated violet. Preserve skill identity
     while keeping the authored gold rim visually dominant. */
  color: #c2a1cb;
  background: radial-gradient(circle, #18141b 0%, #100e14 54%, #080a0e 85%);
}
#skillbar .skill-medallion[data-medallion="blink"] {
  /* Weathered glacial silver rather than electric cyan. */
  color: #9bbec0;
  background: radial-gradient(circle, #131d20 0%, #0c1418 55%, #080a0e 85%);
}
#skillbar .skill-medallion[data-medallion-state="charge"] .skill-medallion__glyph {
  opacity: .45;
}
#skillbar .skill-medallion[data-medallion-state="cooldown"] .skill-medallion__glyph {
  opacity: .62;
}
#skillbar .skill-medallion[data-medallion-state="ready"] .skill-medallion__cooldown {
  opacity: .9;
}
#skillbar .skill-medallion[data-medallion-state="cooldown"] .skill-medallion__cooldown {
  opacity: .68;
}
#skillbar .skill-medallion[data-medallion-state="charge"] .skill-medallion__cooldown {
  /* The SVG owns a full-circumference dash and sets its offset to the
     empty-ring position. Never replace that dash with a decorative pattern:
     doing so can expose charge arcs that the state machine says are empty. */
  opacity: .24;
}
#skillbar .skill-medallion[data-medallion-state="charge"] .skill-medallion__disc {
  stroke: rgba(207, 171, 113, .15);
}
#skillbar .skill-medallion.refuse {
  box-shadow:
    0 0 0 2px #d45657, 0 0 10px rgba(204, 46, 59, .28),
    inset 0 0 0 4px #8d3434, inset 0 0 0 5px #d9a178;
}
/* The five saved layouts still use the SAME controls; the optional skill
   names appear only in the bottom-centre arrangement to avoid covering the
   arena in vertical/arc placements and to preserve left-thumb reach. */
#skillbar[data-layout="bottom"] {
  bottom: calc(env(safe-area-inset-bottom) + 31px);
  gap: 25px;
}
#skillbar[data-layout="bottom"] .skill-medallion::after {
  position: absolute;
  z-index: 2;
  top: calc(100% + 7px);
  left: -12px;
  right: -12px;
  font: 400 11px/1 Georgia, "Times New Roman", serif;
  letter-spacing: .18em;
  text-align: center;
  color: #e6c89a;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
}
#skillbar[data-layout="bottom"] #skill-nova::after { content: "NOVA"; }
#skillbar[data-layout="bottom"] #skill-blink::after { content: "BLINK"; }
@media (max-width: 350px) {
  #skillbar .skill-medallion {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
    min-height: 60px;
  }
  #skillbar[data-layout="bottom"] { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  #skillbar .skill-medallion__glyph,
  #skillbar .skill-medallion__cooldown { filter: none; }
}

