/* =========================================================
   CHROMA — panel content, cards, forms, dialogs
   ========================================================= */

/* ---------- shared panel typography ---------- */

.panel-section {
  position: relative;
  padding-top: 19px;
  margin-top: 19px;
}

.panel-section:first-child {
  padding-top: 0;
  margin-top: 0;
}

.panel-section + .panel-section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--sec-accent, var(--cyan));
}

.section-title {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.section-side {
  flex: none;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.section-lede {
  margin-top: -3px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.text-button {
  padding: 3px 0;
  border-bottom: 1px solid transparent;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 140ms ease, border-color 140ms ease;
}

.text-button:hover {
  color: var(--paper);
  border-bottom-color: var(--line-strong);
}

.text-button.is-danger {
  color: rgba(255, 113, 136, 0.7);
}

.text-button.is-danger:hover {
  color: var(--danger);
  border-bottom-color: rgba(255, 113, 136, 0.3);
}

.inline-note {
  margin-top: 9px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.55;
}

.info-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--sec-accent, var(--cyan));
  border-radius: 4px 10px 10px 4px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.55;
}

.info-note svg {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
  color: var(--sec-accent, var(--cyan));
}

.info-note strong {
  color: var(--muted);
  font-weight: 600;
}

/* ---------- import CTA ---------- */

.import-cta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  overflow: hidden;
  border: 1px dashed rgba(95, 245, 255, 0.32);
  border-radius: 14px;
  background:
    linear-gradient(100deg, rgba(95, 245, 255, 0.075), rgba(255, 79, 216, 0.055) 68%, rgba(255, 138, 95, 0.04));
  text-align: left;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.import-cta::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 45%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(95, 245, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.import-cta:hover {
  border-color: rgba(95, 245, 255, 0.58);
  background-color: rgba(95, 245, 255, 0.05);
  transform: translateY(-1px);
}

.import-cta-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid rgba(95, 245, 255, 0.3);
  border-radius: 50%;
  background: rgba(95, 245, 255, 0.08);
  color: var(--cyan);
  box-shadow: inset 0 0 18px rgba(95, 245, 255, 0.08);
}

.import-cta-icon svg {
  width: 18px;
  height: 18px;
}

.import-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.import-cta-copy strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--paper);
}

.import-cta-copy span {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.import-cta-arrow {
  margin-left: auto;
  color: var(--cyan);
  opacity: 0.7;
}

.import-cta-arrow svg {
  width: 15px;
  height: 15px;
}

/* ---------- avatar roster ---------- */

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.avatar-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(140deg, color-mix(in srgb, var(--card-accent, #a98bff) 9%, transparent), transparent 60%),
    rgba(255, 255, 255, 0.018);
  transition: border-color 170ms ease, background-color 170ms ease, transform 170ms ease;
}

.avatar-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.avatar-card.is-active {
  border-color: color-mix(in srgb, var(--card-accent, #a98bff) 48%, transparent);
  background:
    linear-gradient(140deg, color-mix(in srgb, var(--card-accent, #a98bff) 17%, transparent), transparent 68%),
    rgba(255, 255, 255, 0.02);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--card-accent, #a98bff) 12%, transparent) inset;
}

.avatar-card-main {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 9px;
  text-align: left;
  border-radius: inherit;
}

.avatar-glyph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--card-accent, #a98bff) 28%, transparent);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.16), transparent 55%),
    color-mix(in srgb, var(--card-accent, #a98bff) 10%, transparent);
  color: color-mix(in srgb, var(--card-accent, #a98bff) 80%, #fff);
}

.avatar-glyph svg {
  width: 25px;
  height: 25px;
}

.avatar-card-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.avatar-name {
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.avatar-kind {
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 6.6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.avatar-badge {
  position: absolute;
  top: 5px;
  right: 6px;
  padding: 2px 4px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--card-accent, #a98bff) 18%, transparent);
  color: color-mix(in srgb, var(--card-accent, #a98bff) 78%, #fff);
  font-family: var(--font-mono);
  font-size: 5.6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.avatar-tools {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 140ms ease;
}

.avatar-card:hover .avatar-tools,
.avatar-card:focus-within .avatar-tools {
  opacity: 1;
}

.avatar-tool {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(10, 5, 20, 0.82);
  color: var(--faint);
}

.avatar-tool svg {
  width: 11px;
  height: 11px;
}

.avatar-tool:hover {
  color: var(--paper);
  border-color: var(--line-strong);
}

.avatar-tool.is-danger:hover {
  color: var(--danger);
  border-color: rgba(255, 113, 136, 0.35);
}

.avatar-add {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--faint);
  font-size: 10.5px;
  text-align: left;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.avatar-add:hover {
  border-color: rgba(95, 245, 255, 0.4);
  background: rgba(95, 245, 255, 0.04);
  color: var(--paper);
}

.avatar-add-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border: 1px solid rgba(95, 245, 255, 0.24);
  border-radius: 50%;
  color: var(--cyan);
  font-size: 14px;
  line-height: 1;
}

/* ---------- rig strip ---------- */

.rig-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
}

.rig-cell {
  padding: 9px 10px;
  border-left: 1px solid var(--line);
}

.rig-cell:first-child {
  border-left: 0;
}

.rig-cell span {
  display: block;
  font-family: var(--font-mono);
  font-size: 6.4px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.rig-cell strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------- forms ---------- */

.field {
  display: block;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.field-label strong {
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.text-input {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(5, 2, 12, 0.34);
  color: var(--paper);
  font-size: 12.5px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.text-input:hover {
  border-color: var(--line-strong);
}

.text-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--sec-accent, var(--cyan)) 56%, transparent);
  background: rgba(5, 2, 12, 0.52);
}

.range {
  --fill: 50%;
  width: 100%;
  height: 22px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, var(--sec-accent, var(--cyan)), var(--sec-accent2, var(--magenta))) 0 / var(--fill) 100% no-repeat,
    rgba(255, 255, 255, 0.1);
}

.range::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  margin-top: -6px;
  appearance: none;
  border: 2px solid #130b24;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px var(--sec-accent, var(--cyan)), 0 0 14px color-mix(in srgb, var(--sec-accent, var(--cyan)) 45%, transparent);
}

.range::-moz-range-track {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.range::-moz-range-progress {
  height: 3px;
  border-radius: 3px;
  background: var(--sec-accent, var(--cyan));
}

.range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid #130b24;
  border-radius: 50%;
  background: #fff;
}

.range:focus-visible {
  outline: none;
}

.range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), 0 0 14px rgba(95, 245, 255, 0.45);
}

/* aura swatches */

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--swatch-bg, conic-gradient(#5ff5ff, #ff4fd8, #ffcd6e, #5ff5ff));
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.swatch::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 150ms ease, transform 150ms ease;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

.swatch:hover {
  transform: translateY(-1px) scale(1.04);
}

.swatch.is-active {
  box-shadow: 0 0 0 2px #130b24, 0 0 0 3px rgba(255, 255, 255, 0.55), 0 0 18px color-mix(in srgb, var(--swatch-color, #5ff5ff) 40%, transparent);
}

.swatch.is-active::after {
  opacity: 1;
  transform: scale(1);
}

.swatch-label {
  display: none;
}

/* motion */

.motion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.motion-pill {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.motion-pill:hover {
  color: var(--paper);
  border-color: var(--line-strong);
}

.motion-pill.is-active {
  border-color: color-mix(in srgb, var(--sec-accent, var(--cyan)) 45%, transparent);
  background: color-mix(in srgb, var(--sec-accent, var(--cyan)) 10%, transparent);
  color: color-mix(in srgb, var(--sec-accent, var(--cyan)) 68%, #fff);
}

/* ---------- outfit categories ---------- */

.category-tabs {
  display: flex;
  gap: 4px;
  margin: 0 -2px 11px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.category-tab span {
  font-family: var(--font-mono);
  font-size: 6.4px;
  color: rgba(179, 165, 201, 0.45);
}

.category-tab:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.035);
}

.category-tab.is-active {
  border-color: color-mix(in srgb, var(--cat-accent, var(--magenta)) 36%, transparent);
  background: color-mix(in srgb, var(--cat-accent, var(--magenta)) 11%, transparent);
  color: color-mix(in srgb, var(--cat-accent, var(--magenta)) 62%, #fff);
}

.category-tab.is-active span {
  color: inherit;
  opacity: 0.7;
}

.slot-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 6.8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.slot-note strong {
  font-weight: 500;
  color: var(--muted);
}

.outfit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
  text-align: left;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.item-card:hover {
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.item-card.is-equipped {
  border-color: color-mix(in srgb, var(--item-a, var(--cyan)) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--item-a, var(--cyan)) 14%, transparent) inset,
    0 10px 30px color-mix(in srgb, var(--item-a, var(--cyan)) 8%, transparent);
}

.item-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 86px;
  overflow: hidden;
  background:
    radial-gradient(58% 72% at 50% 26%, color-mix(in srgb, var(--item-a, #5ff5ff) 23%, transparent), transparent 72%),
    linear-gradient(150deg, color-mix(in srgb, var(--item-b, #a98bff) 13%, transparent), rgba(5, 2, 12, 0.3));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.item-art::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent 90%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent 90%);
}

.item-art svg {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  color: color-mix(in srgb, var(--item-a, #5ff5ff) 75%, #fff);
  filter: drop-shadow(0 4px 14px color-mix(in srgb, var(--item-a, #5ff5ff) 22%, transparent));
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.item-card:hover .item-art svg {
  transform: translateY(-2px) scale(1.04);
}

.item-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 8px 9px 9px;
}

.item-name {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.item-type {
  font-family: var(--font-mono);
  font-size: 6.2px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}

.item-equip {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: rgba(8, 4, 16, 0.72);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 5.6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.item-card.is-equipped .item-equip {
  opacity: 1;
  transform: none;
}

.item-card.is-none .item-art {
  background:
    repeating-linear-gradient(-45deg, transparent 0 8px, rgba(255, 255, 255, 0.028) 8px 9px),
    rgba(255, 255, 255, 0.015);
  color: var(--faint);
}

.item-card.is-none .item-art svg {
  color: var(--faint);
  filter: none;
}

.item-card.is-none.is-equipped {
  border-color: var(--line-strong);
}

.outfit-empty {
  padding: 22px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--faint);
  font-size: 10.5px;
  text-align: center;
}

/* ---------- abilities ---------- */

.ability-feature {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--ab-a, var(--coral)) 30%, var(--line));
  border-radius: 13px;
  background:
    radial-gradient(70% 110% at 96% 0%, color-mix(in srgb, var(--ab-a, var(--coral)) 15%, transparent), transparent 70%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.04), rgba(5, 2, 12, 0.24));
}

.ability-feature.is-empty {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.feature-label {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.feature-state {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ab-a, var(--coral)) 68%, #fff);
}

.feature-main {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 10px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--ab-a, var(--coral)) 34%, transparent);
  border-radius: 12px;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.24), transparent 55%),
    color-mix(in srgb, var(--ab-a, var(--coral)) 12%, transparent);
  color: color-mix(in srgb, var(--ab-a, var(--coral)) 76%, #fff);
}

.feature-icon svg {
  width: 27px;
  height: 27px;
}

.feature-copy {
  min-width: 0;
}

.feature-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
}

.feature-desc {
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--faint);
}

.feature-actions {
  display: flex;
  gap: 6px;
  margin-top: 11px;
}

.feature-actions .btn {
  min-height: 32px;
  padding: 8px 10px;
  font-size: 10.5px;
}

.ability-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ability-card {
  position: relative;
  display: flex;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--ab-a, var(--cyan)) 6%, transparent), transparent 55%),
    rgba(255, 255, 255, 0.015);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.ability-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.ability-card.is-equipped {
  border-color: color-mix(in srgb, var(--ab-a, var(--cyan)) 45%, transparent);
}

.ability-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--ab-a, var(--cyan)) 24%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ab-a, var(--cyan)) 8%, transparent);
  color: color-mix(in srgb, var(--ab-a, var(--cyan)) 72%, #fff);
}

.ability-icon svg {
  width: 22px;
  height: 22px;
}

.ability-copy {
  min-width: 0;
  flex: 1;
}

.ability-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
}

.ability-tag {
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 5.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
}

.ability-desc {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.45;
  color: var(--faint);
}

.ability-actions {
  display: flex;
  gap: 8px;
  margin-top: 7px;
}

.ability-link {
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  color: color-mix(in srgb, var(--ab-a, var(--cyan)) 68%, #fff);
  font-family: var(--font-mono);
  font-size: 6.8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ability-link:hover {
  border-bottom-color: currentColor;
}

.ability-link.is-muted {
  color: var(--faint);
}

/* ---------- profile ---------- */

.profile-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(75% 110% at 0% 0%, color-mix(in srgb, var(--ph, #a98bff) 21%, transparent), transparent 65%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(5, 2, 12, 0.28));
}

.profile-hero::after {
  content: "";
  position: absolute;
  top: -46px;
  right: -36px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
}

.profile-portrait {
  position: relative;
  width: 64px;
  height: 64px;
  flex: none;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 15px;
  background:
    radial-gradient(circle at 40% 26%, rgba(255, 255, 255, 0.2), transparent 45%),
    conic-gradient(from 220deg, #5ff5ff, #a98bff, #ff4fd8, #ffcd6e, #5ff5ff);
  background-position: center;
  background-size: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.profile-portrait span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(12, 6, 23, 0.72);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.profile-id {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.profile-kicker {
  font-family: var(--font-mono);
  font-size: 6.6px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.profile-name {
  margin-top: 2px;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-meta {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.profile-status-badge {
  position: absolute;
  top: 10px;
  right: 11px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(8, 4, 16, 0.44);
  font-family: var(--font-mono);
  font-size: 5.8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.profile-status-badge.is-published {
  border-color: rgba(125, 255, 196, 0.26);
  color: var(--success);
}

.loadout-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.loadout-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
}

.loadout-row:first-child {
  border-top: 0;
}

.loadout-row span:first-child {
  width: 68px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 6.4px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.loadout-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.loadout-row .mini-chip {
  margin-left: auto;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 5.6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.publish-state {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
}

.publish-state-dot {
  width: 7px;
  height: 7px;
  flex: none;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(255, 205, 110, 0.4);
}

.publish-state.is-published .publish-state-dot {
  background: var(--success);
  box-shadow: 0 0 10px rgba(125, 255, 196, 0.45);
}

.publish-state-copy {
  min-width: 0;
}

.publish-state-copy strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
}

.publish-state-copy span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.45;
}

.storage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.storage-row strong {
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.panel-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

/* ---------- empty stage ---------- */

.stage-empty {
  position: fixed;
  left: 50%;
  top: 48%;
  z-index: 20;
  width: min(340px, calc(100vw - 48px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(14, 8, 27, 0.82);
  box-shadow: var(--shadow-panel);
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(16px);
}

.stage-empty h2 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.1;
}

.stage-empty p {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

/* ---------- dialogs ---------- */

.dialog {
  width: min(620px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--paper);
  overflow: visible;
}

.dialog::backdrop {
  background: rgba(3, 1, 8, 0.76);
  backdrop-filter: blur(10px);
}

.dialog[open] {
  animation: dialog-in 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dialog.is-closing {
  animation: dialog-out 160ms ease both;
}

.dialog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    radial-gradient(60% 50% at 12% 0%, rgba(95, 245, 255, 0.07), transparent 65%),
    radial-gradient(50% 45% at 100% 0%, rgba(255, 79, 216, 0.09), transparent 65%),
    linear-gradient(155deg, #1c1034 0%, #100a20 55%, #0b0617 100%);
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dialog-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(95, 245, 255, 0.5), rgba(255, 79, 216, 0.5), transparent);
  opacity: 0.65;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 22px 13px;
  flex: none;
}

.dialog-kicker {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--cyan);
}

.dialog-title {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: clamp(21px, 3.2vw, 27px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.dialog-sub {
  max-width: 48ch;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.dialog-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--faint);
  transition: color 150ms ease, background-color 150ms ease;
}

.dialog-close svg {
  width: 15px;
  height: 15px;
}

.dialog-close:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
}

.dialog-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 3px 22px 18px;
}

.dialog-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
  flex: none;
}

.dialog-foot .btn {
  min-height: 40px;
}

.dialog-foot-left {
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

/* dropzone */

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 208px;
  padding: 26px;
  overflow: hidden;
  border: 1px dashed rgba(95, 245, 255, 0.3);
  border-radius: 15px;
  background:
    radial-gradient(55% 75% at 50% 0%, rgba(95, 245, 255, 0.08), transparent 70%),
    rgba(255, 255, 255, 0.015);
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: rgba(95, 245, 255, 0.7);
  background-color: rgba(95, 245, 255, 0.035);
}

.dropzone-rings {
  position: relative;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin-bottom: 3px;
  border: 1px solid rgba(95, 245, 255, 0.2);
  border-radius: 50%;
}

.dropzone-rings::before,
.dropzone-rings::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 79, 216, 0.16);
}

.dropzone-rings::before {
  inset: 8px;
  border-style: dashed;
}

.dropzone-rings::after {
  inset: -7px;
  border-color: rgba(255, 255, 255, 0.06);
}

.dropzone-rings svg {
  width: 26px;
  height: 26px;
  color: var(--cyan);
}

.dropzone strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.dropzone-sub {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dropzone-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--primary-gradient);
  color: #19051a;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(255, 79, 216, 0.22);
}

.dropzone-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.dropzone-note {
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
}

.dropzone-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 500;
}

.file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.file-chip {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.05em;
  color: var(--faint);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* import progress */

.import-progress {
  padding: 6px 0 4px;
}

.import-file-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 500;
}

.import-file-name svg {
  width: 15px;
  height: 15px;
  color: var(--cyan);
}

.import-bar {
  height: 3px;
  margin: 13px 0 6px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.import-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-gradient);
  transition: width 300ms ease;
}

.import-bar-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.load-steps {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.load-step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.012);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.load-step + .load-step {
  border-top: 1px solid var(--line);
}

.step-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
}

.load-step.is-active {
  color: var(--paper);
}

.load-step.is-active .step-dot {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(95, 245, 255, 0.6);
}

.load-step.is-done {
  color: var(--muted);
}

.load-step.is-done .step-dot {
  border-color: var(--success);
  background: var(--success);
}

.load-step.is-error {
  color: var(--danger);
}

.load-step.is-error .step-dot {
  border-color: var(--danger);
  background: var(--danger);
}

.load-step .step-state {
  margin-left: auto;
  font-size: 6.5px;
  color: var(--faint);
}

/* callouts */

.callout {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--faint);
}

.callout svg {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
}

.callout.is-error {
  border-color: rgba(255, 113, 136, 0.28);
  background: rgba(255, 113, 136, 0.06);
  color: #ffabb5;
}

.callout.is-error svg {
  color: var(--danger);
}

.callout.is-warn {
  border-color: rgba(255, 205, 110, 0.22);
  background: rgba(255, 205, 110, 0.045);
  color: #e9c98f;
}

.callout.is-warn svg {
  color: var(--gold);
}

.callout.is-info {
  border-color: rgba(95, 245, 255, 0.16);
  background: rgba(95, 245, 255, 0.04);
  color: var(--muted);
}

.callout.is-info svg {
  color: var(--cyan);
}

.callout strong {
  color: inherit;
  font-weight: 600;
}

/* publish dialog */

.publish-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(60% 100% at 0% 0%, color-mix(in srgb, var(--pub-accent, #ff4fd8) 13%, transparent), transparent 70%),
    rgba(255, 255, 255, 0.018);
}

.publish-avatar {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--pub-accent, #ff4fd8) 28%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--pub-accent, #ff4fd8) 9%, transparent);
  color: color-mix(in srgb, var(--pub-accent, #ff4fd8) 70%, #fff);
}

.publish-avatar svg {
  width: 32px;
  height: 32px;
}

.publish-avatar-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.publish-avatar-tag {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.publish-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.publish-cell {
  padding: 9px 10px;
  border-left: 1px solid var(--line);
}

.publish-cell:first-child {
  border-left: 0;
}

.publish-cell span {
  display: block;
  font-family: var(--font-mono);
  font-size: 6.2px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.publish-cell strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.publish-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.publish-chips span {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 6.3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
}

.publish-local-note {
  margin-top: 13px;
}

.publish-success {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 6px 6px;
  text-align: center;
}

.success-rings {
  position: relative;
  display: grid;
  place-items: center;
  width: 105px;
  height: 105px;
  margin-bottom: 15px;
}

.success-rings::before,
.success-rings::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(125, 255, 196, 0.22);
  border-radius: 50%;
  animation: success-ring 2.6s ease-out infinite;
}

.success-rings::after {
  animation-delay: 1.3s;
}

.success-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(125, 255, 196, 0.4);
  border-radius: 50%;
  background: rgba(125, 255, 196, 0.08);
  color: var(--success);
  box-shadow: 0 0 34px rgba(125, 255, 196, 0.14);
}

.success-core svg {
  width: 24px;
  height: 24px;
}

.publish-success h3 {
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.1;
}

.publish-success p {
  max-width: 40ch;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.publish-success .publish-stamp {
  margin-top: 12px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* settings */

.quality-auto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.quality-auto:hover {
  border-color: var(--line-strong);
}

.quality-auto.is-active {
  border-color: rgba(95, 245, 255, 0.32);
  background: rgba(95, 245, 255, 0.045);
}

.quality-auto-main {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 600;
}

.quality-auto-main span {
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.quality-auto b {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cyan);
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.quality-card {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.015);
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.quality-card:hover {
  border-color: var(--line-strong);
}

.quality-card.is-active {
  border-color: rgba(169, 139, 255, 0.4);
  background: rgba(169, 139, 255, 0.06);
}

.quality-card strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
}

.quality-card strong span {
  font-family: var(--font-mono);
  font-size: 5.8px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
}

.quality-card p {
  margin-top: 3px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.45;
}

.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.switch-row span:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  font-weight: 500;
}

.switch-row small {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.05em;
  font-weight: 400;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 34px;
  height: 19px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  transition: background-color 160ms ease, border-color 160ms ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--faint);
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1), background-color 160ms ease;
}

.switch-row input:checked + .switch-track {
  border-color: rgba(95, 245, 255, 0.4);
  background: rgba(95, 245, 255, 0.18);
}

.switch-row input:checked + .switch-track::after {
  transform: translateX(15px);
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(95, 245, 255, 0.5);
}

.switch-row input:focus-visible + .switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.diagnostics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.diagnostic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  background: #130b24;
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.diagnostic strong {
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.help-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 11px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10.5px;
}

.help-row:first-child {
  border-top: 0;
}

.help-row span:last-child {
  flex: none;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--muted);
}

kbd {
  display: inline-block;
  min-width: 18px;
  margin-left: 3px;
  padding: 2px 5px;
  border: 1px solid var(--line-strong);
  border-bottom-color: rgba(255, 255, 255, 0.26);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 7px;
  text-align: center;
  color: var(--muted);
}

/* confirm dialog */

.confirm-body {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.confirm-body strong {
  color: var(--paper);
  font-weight: 600;
}

/* keyframes */

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes dialog-out {
  to { opacity: 0; transform: translateY(6px) scale(0.99); }
}

@keyframes success-ring {
  0% { transform: scale(0.55); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* quality */

body[data-quality="potato"] .dialog-card {
  background: linear-gradient(155deg, #1c1034, #0c0718);
}

body[data-quality="potato"] .item-card,
body[data-quality="potato"] .ability-feature {
  box-shadow: none;
}


/* ---------- roster helpers ---------- */

.roster-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 7px;
  font-family: var(--font-mono);
  font-size: 6.8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.roster-label span {
  color: rgba(179, 165, 201, 0.42);
}

.roster-empty {
  margin: 5px 0 9px;
  padding: 11px 12px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.55;
}

.quality-auto-main svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--cyan);
}

.quality-auto-main span {
  overflow: hidden;
  max-width: 180px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stage-empty[hidden] {
  display: none;
}

body.is-reviewing .rail,
body.is-reviewing .panel,
body.is-reviewing .actionbar,
body.is-reviewing .view-bar {
  opacity: 0.3;
  filter: saturate(0.55);
  pointer-events: none;
}

body.is-reviewing .stage-plate {
  opacity: 0;
  pointer-events: none;
}

body.is-reviewing .panel {
  transition: opacity 180ms ease, filter 180ms ease;
}

body[data-quality="potato"] .dialog::backdrop {
  backdrop-filter: none;
  background: rgba(3, 1, 8, 0.86);
}
