/* Layout for the Sky Fighter script. Shared pieces also used by the event calculator live in the parent skyfighter.css. */
.zr-sf-page { max-width: 72rem; margin: 0 auto; padding: 0 1rem 5rem; }
.zr-sf-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  position: sticky;
  top: var(--zr-header-h, 4rem);
  z-index: 30;
  margin: 0 -1rem;
  padding: 0.45rem 1rem;
  background: var(--zr-bg, #0c1418);
  overflow-x: auto;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28);
}
.zr-sf-bar .zr-hbar__btn {
  flex: 1 1 auto;
  text-align: center;
}

@media (max-width: 720px) {
  .zr-sf { grid-template-columns: minmax(0, 1fr); }

  .zr-sf-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    width: 100%;
    margin: 0;
    justify-self: stretch;
    overflow: visible;
    padding: 0.55rem 0 0.7rem;
  }

  .zr-sf-bar .zr-hbar__btn {
    border-radius: 12px;
    padding: 0.9rem 0.4rem;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.2;
    background: #241c14;
    color: #e8e2d8;
    border: 1px solid #8a7344;
  }

  .zr-sf-bar .zr-hbar__btn.is-active {
    background: #3d2c16;
    color: #f0a424;
    border-color: #f0a424;
  }
}
.zr-hbar__btn {
  border: 1px solid var(--zr-border, #333);
  background: var(--zr-surface, #1b1b1b);
  color: inherit;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  cursor: pointer;
}
.zr-hbar__btn.is-active {
  border-color: var(--zr-accent, #d4a017);
  color: var(--zr-accent, #d4a017);
}
.zr-sf-card {
  border: 1px solid var(--zr-border, #333);
  border-radius: 14px;
  background: var(--zr-surface, #1b1b1b);
  padding: 0.9rem;
  min-width: 0;
}
.zr-sf-card__title { margin: 0 0 0.6rem; font-size: 1rem; }
.zr-sf-grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.7rem;
}
.zr-sf-step__label { display: block; font-size: 0.78rem; margin-bottom: 0.25rem; }
.zr-sf-step__row { display: flex; gap: 0.35rem; align-items: center; }
.zr-sf-step__btn, .zr-sf-step__in {
  border: 1px solid var(--zr-border, #333);
  background: transparent;
  color: inherit;
  border-radius: 8px;
  min-height: 2.2rem;
}
.zr-sf-step__btn { width: 2.2rem; cursor: pointer; }
.zr-sf-step__in { width: 4.5rem; text-align: center; }
.zr-sf-costs, .zr-sf-list, .zr-sf-skins, .zr-sf-evo { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.zr-sf-cost, .zr-sf-cmp__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.28rem 0;
  border-bottom: 1px solid var(--zr-border, #333);
  min-width: 0;
}
.zr-sf-cost__label, .zr-sf-cmp__row span { min-width: 0; overflow-wrap: anywhere; }
.zr-sf-val { color: var(--zr-accent, #d4a017); }
.zr-sf-note, .zr-sf-small { color: var(--zr-muted, #aaa); font-size: 0.82rem; }
.zr-sf-comps, .zr-sf-skins { display: grid; gap: 0.75rem; }
.zr-sf-skin, .zr-sf-bld, .zr-sf-comp { min-width: 0; }
.zr-sf img { max-width: 100%; height: auto; }

.zr-sf-switch { display: flex; gap: 0.4rem; margin: 0 0 0.8rem; }
.zr-sf-switch button {
  border: 1px solid var(--zr-border, #333);
  background: var(--zr-surface, #fff);
  color: var(--zr-text, #0b1a21);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  cursor: pointer;
}
.zr-sf-switch button.is-on { background: #c9842a; color: #1a1208; border-color: #c9842a; }
.zr-sf-board {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: stretch;
}
.zr-sf-need {
  background: #1c2430;
  border: 1px solid #3a4654;
  border-radius: 12px;
  padding: 0.9rem;
  color: #f4f7f8;
}
.zr-sf-need .zr-sf-small,
.zr-sf-need .zr-sf-feedline {
  color: #c5d0d6;
}
.zr-sf-need h3 { margin: 0.2rem 0; font-size: 1rem; }
.zr-sf-need__kicker { margin: 0; color: #e0a15a; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.zr-sf-need__exp { margin: 0.2rem 0; font-size: 1.7rem; font-weight: 700; color: #ffb15a; }
.zr-sf-feed { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.zr-sf-feed li, .zr-sf-feedone { display: flex; align-items: center; gap: 0.45rem; }
.zr-sf-feedone { margin: 0.35rem 0 0; }
.zr-sf-feedline { margin: 0.7rem 0 0; font-size: 0.82rem; }
.zr-sf-stage {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr) 4.6rem;
  grid-template-rows: repeat(3, 4.6rem);
  grid-template-areas: "s0 core s3" "s1 core s4" "s2 core s5";
  gap: 0.55rem 0.4rem;
  align-items: center;
  justify-items: center;
  background: radial-gradient(circle at 50% 45%, #24365c, #152033 70%);
  border-radius: 16px;
  padding: 0.8rem;
}
.zr-sf-core { text-align: center; }
.zr-sf-core__img { width: min(9rem, 100%); height: auto; }
.zr-sf-core__name { margin: 0.15rem 0 0; color: #f4f7f8; font-weight: 700; }
.zr-sf-stage--wing {
  grid-template-columns: 5.2rem minmax(0, 1fr) 5.2rem;
  grid-template-rows: auto 5rem 5.4rem 5rem;
  grid-template-areas: "pills pills pills" ". top ." "left core right" ". bot .";
}
.zr-sf-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; grid-area: pills; }
.zr-sf-pill {
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  border: 1px solid #3a4654;
  background: #121820;
  color: #f4f7f8;
  cursor: pointer;
  font: inherit;
}
.zr-sf-pill.is-on { background: #c9842a; color: #1a1208; border-color: #e2b657; }
.zr-sf-stage--wing .zr-sf-core .zr-sf-small { color: #c5d0d6; }
.zr-sf-need .zr-sf-switch { margin-bottom: 0.7rem; }
.zr-sf-need .zr-sf-switch button { background: #121820; color: #f4f7f8; border-color: #3a4654; }
.zr-sf-need .zr-sf-switch button.is-on { background: #c9842a; color: #1a1208; border-color: #c9842a; }
.zr-sf-feed li b { margin-left: auto; }
.zr-sf-slot { position: relative; }
.zr-sf-slot__star {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.12rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  color: #f4e2c4;
  text-shadow: 0 1px 2px #000;
}
.zr-sf-wgold {
  margin-top: 0.8rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: linear-gradient(#e0a04a, #c9842a 42%, #a86a1c);
  color: #1a1208;
}
.zr-sf-wgold .zr-sf-val { color: #1a1208; }
.zr-sf-wgold__top { display: flex; gap: 0.7rem; align-items: flex-start; }
.zr-sf-wgold__top > div { flex: 1 1 auto; min-width: 0; }
.zr-sf-wgold__pow { margin-left: auto; font-size: 1.15rem; white-space: nowrap; }
.zr-sf-wgold__skill { margin: 0.35rem 0 0; font-size: 0.86rem; }
.zr-sf-wgold__ctl { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.75rem; align-items: center; }
.zr-sf-line__cap { margin: 0.2rem 0 0; font-weight: 700; font-size: 0.84rem; }
.zr-sf-line {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
  padding: 0.35rem 0.15rem;
  background: #3a2a14;
  border-radius: 8px;
}
.zr-sf-line::before {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #2ec4bc var(--zr-fill, 0%), rgba(244, 226, 196, 0.28) var(--zr-fill, 0%));
}
.zr-sf-line__star {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  line-height: 1;
  color: rgba(244, 226, 196, 0.35);
}
.zr-sf-line__star.is-on { color: #2ec4bc; }
.zr-sf-line__star.is-goal { color: #ffe14a; }
.zr-sf-stats { list-style: none; margin: 0.55rem 0 0; padding: 0; }
.zr-sf-stats li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.22rem 0;
  border-bottom: 1px solid rgba(26, 18, 8, 0.22);
  font-size: 0.88rem;
}
.zr-sf-stage--up {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  grid-template: none;
}
.zr-sf-stage--up .zr-sf-core .zr-sf-small { color: #c5d0d6; }
.zr-sf-stage--up .zr-sf-line {
  width: 100%;
  align-items: flex-start;
  background: #1a1208;
  padding: 0.7rem 0.2rem 0.45rem;
}
.zr-sf-stage--up .zr-sf-line::before {
  top: 1.05rem;
  background: linear-gradient(90deg, #2ec4bc var(--zr-fill, 0%), rgba(246, 231, 207, 0.55) var(--zr-fill, 0%));
}
.zr-sf-stage--up .zr-sf-line__star {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  color: #f6e7cf;
  font-size: 1rem;
  line-height: 1;
}
.zr-sf-stage--up .zr-sf-line__star small { font-size: 0.62rem; font-weight: 600; color: #e7d3b0; }
.zr-sf-stage--up .zr-sf-line__star.is-on,
.zr-sf-stage--up .zr-sf-line__star.is-on small { color: #2ec4bc; }
.zr-sf-stage--up .zr-sf-line__star.is-goal,
.zr-sf-stage--up .zr-sf-line__star.is-goal small { color: #ffe14a; }
button.zr-sf-line__star {
  border: 0;
  background: transparent;
  padding: 0.15rem 0.2rem;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.zr-sf-inv { display: grid; gap: 0.55rem; }
.zr-sf-inv__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 5.5rem;
  gap: 0.55rem;
  align-items: center;
}
.zr-sf-inv__name small { display: block; color: var(--zr-muted, #8aa); font-size: 0.78rem; }
.zr-sf-inv__more { margin-top: 0.15rem; }
.zr-sf-inv__row input {
  width: 100%;
  min-height: 2.2rem;
  text-align: center;
  border: 1px solid var(--zr-border, #333);
  border-radius: 8px;
  background: var(--zr-surface, #fff);
  color: var(--zr-text, #0b1a21);
  font: inherit;
}
.zr-sf-have { margin: 0.65rem 0 0; }
.zr-sf-stages { list-style: none; margin: 0.35rem 0 0; padding: 0; }
.zr-sf-stages li {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--zr-border, #333);
}
.zr-sf-stages__lv { font-weight: 700; }
.zr-sf-stages .is-now .zr-sf-stages__lv { color: #c9842a; }
.zr-sf-stages .is-have { opacity: 0.72; }
.zr-sf-wgold .zr-sf-grid3 { margin-top: 0.7rem; }
.zr-sf-wgold .zr-sf-step__btn,
.zr-sf-wgold .zr-sf-step__in {
  background: #1a1208;
  color: #f4e2c4;
  border-color: #1a1208;
}
.zr-sf-nudge { display: flex; align-items: center; gap: 0.15rem; background: #1a1208; border-radius: 10px; padding: 0.15rem; }
.zr-sf-nudge .zr-sf-pick { background: transparent; color: #f4e2c4; min-width: 4.4rem; border: 0; }
.zr-sf-nudge__btn {
  width: 1.8rem;
  height: 1.8rem;
  border: 0;
  border-radius: 8px;
  background: #3a2a14;
  color: #f4e2c4;
  cursor: pointer;
}
.zr-sf-slot, .zr-sf-lv, .zr-sf-pick {
  border: 2px solid transparent;
  background: #121820;
  color: #f4f7f8;
  cursor: pointer;
  font: inherit;
}
.zr-sf-slot {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 2px var(--q, #3a4654);
}
.zr-sf-slot.is-on { box-shadow: inset 0 0 0 2px #e2b657, 0 0 0 2px #e2b657; }
.zr-sf-slot.is-empty .zr-sf-slot__img { opacity: 0.45; }
.zr-sf-slot__img, .zr-sf-lv__img { width: 3.2rem; height: 3.2rem; object-fit: contain; }
.zr-sf-slot.q1, .zr-sf-lv.q1 { --q: #8e99a4; }
.zr-sf-slot.q2, .zr-sf-lv.q2 { --q: #3cba6c; }
.zr-sf-slot.q3, .zr-sf-lv.q3 { --q: #3b93e6; }
.zr-sf-slot.q4, .zr-sf-lv.q4 { --q: #9a62e0; }
.zr-sf-slot.q5, .zr-sf-lv.q5 { --q: #d7a441; }
.zr-sf-slot.q6, .zr-sf-lv.q6 { --q: #d24b45; }
.zr-sf-dock {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.8rem;
  padding: 0.7rem;
  border-radius: 12px;
  background: linear-gradient(#c9842a, #a86a1c);
  color: #1a1208;
}
.zr-sf-dock__id { display: flex; gap: 0.55rem; align-items: center; flex: 1; min-width: 0; }
.zr-sf-dock__id strong, .zr-sf-dock__id span { display: block; }
.zr-sf-dock__id span { font-size: 0.8rem; min-height: 1em; }
.zr-sf-pick {
  min-width: 5.5rem;
  border-radius: 10px;
  background: #1a1208;
  color: #f4e2c4;
  padding: 0.35rem 0.7rem;
}
.zr-sf-pick span, .zr-sf-pick b { display: block; }
.zr-sf-pick span { font-size: 0.72rem; opacity: 0.8; }
.zr-sf-sheet { position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center; }
.zr-sf-sheet__backdrop { position: absolute; inset: 0; border: 0; background: rgba(0, 0, 0, 0.55); }
.zr-sf-sheet__panel {
  position: relative;
  width: min(40rem, 100%);
  max-height: min(80vh, 40rem);
  overflow: auto;
  background: #1a1e24;
  color: #f4f7f8;
  border-radius: 16px 16px 0 0;
  padding: 0.9rem 0.9rem 1.2rem;
}
.zr-sf-sheet__head { display: flex; justify-content: space-between; gap: 0.6rem; align-items: start; }
.zr-sf-sheet__head h3 { margin: 0; }
.zr-sf-sheet__head p { margin: 0.15rem 0 0; color: #c5d0d6; }
.zr-sf-sheet__x { border: 0; background: transparent; color: #f4f7f8; font-size: 1.6rem; cursor: pointer; }
.zr-sf-lvgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem; margin-top: 0.8rem; }
.zr-sf-lv {
  border-radius: 12px;
  padding: 0.45rem 0.25rem 0.55rem;
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  box-shadow: inset 0 0 0 2px var(--q, #3a4654);
  background: #14181e;
}
.zr-sf-lv.is-on { box-shadow: inset 0 0 0 2px #e2b657, 0 0 0 2px #e2b657; }
.zr-sf-lv__empty { width: 3.2rem; height: 3.2rem; border-radius: 8px; background: #2a3038; }
.zr-sf-lv__name { font-weight: 700; }
.zr-sf-lv__num { color: #d7deE6; font-size: 0.82rem; }
@media (max-width: 800px) {
  .zr-sf-board { grid-template-columns: 1fr; }
  .zr-sf-lvgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .zr-sf-cost, .zr-sf-cmp__row { grid-template-columns: 1fr auto; }
  .zr-sf-cost img, .zr-sf-cmp__row img { grid-row: span 2; }
}
