/* Kıyafet yükseltme — KO Item Upgrade tarzı */
.ug {
  --navy: #0a0e14;
  --panel: #151b24;
  --slot: #0c1018;
  --gold: #d4b56a;
  --gold-hi: #f0d48a;
  --cream: #e8e0d0;
  --steel: #2a3340;
  --rim: #6a5a3a;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(80, 60, 30, 0.22), transparent 55%),
    linear-gradient(180deg, #121820 0%, #080c12 100%);
  color: var(--cream);
  font-family: var(--font);
  user-select: none;
}
.ug button { -webkit-tap-highlight-color: transparent; }
.ug svg { display: block; flex-shrink: 0; }

.ug-top {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 6px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px;
  background:
    linear-gradient(180deg, #1c2430 0%, #121820 100%);
  border-bottom: 1px solid rgba(212, 181, 106, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.ug-title { text-align: center; min-width: 0; }
.ug-title h1 {
  margin: 0;
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 900;
  color: var(--gold-hi);
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}
.ug-title p {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 800;
  color: rgba(232, 224, 208, 0.5);
}
.ug-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: linear-gradient(180deg, #2a3340, #161c26);
  border: 1px solid rgba(212, 181, 106, 0.35);
  padding: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.ug-icon-btn svg { width: 22px; height: 22px; }
.ug-icon-btn:active { transform: scale(0.95); }
.ug-gear-btn { overflow: hidden; }
.ug-gear-ico {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.ug-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 10px 0;
}
.ug-tab {
  min-height: 36px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 900;
  color: rgba(232, 224, 208, 0.7);
  background: linear-gradient(180deg, #2a3340, #161c26);
  border: 1px solid rgba(212, 181, 106, 0.28);
}
.ug-tab.on {
  color: #fff8e0;
  background: linear-gradient(180deg, #7a3220 0%, #5a1c10 55%, #3e120a 100%);
  border-color: #b08a45;
  box-shadow: inset 0 1px 0 rgba(255, 200, 160, 0.2);
}
.ug-tab:active { transform: scale(0.98); }

.ug-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 10px calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 3’lü birleştirme tahtası */
.ug-combine-board {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.ug-combine-row {
  display: grid;
  grid-template-columns: repeat(3, 54px);
  gap: 6px;
}
.ug-combine-row .ug-slot {
  width: 54px;
  height: 54px;
}
.ug-combine-mat {
  margin: 0 2px;
}
.ug-combine-mat .ug-slot {
  width: 48px;
  height: 48px;
}
.ug-combine-arrow {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  padding: 0 2px 18px;
}
.ug-combine-out {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ug-combine-out .ug-slot {
  width: 58px;
  height: 58px;
}
.ug-combine-hint {
  margin: 0 0 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: rgba(232, 224, 208, 0.55);
}
.ug-inv-ord {
  position: absolute;
  top: 2px;
  left: 2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
  color: #1a1208;
  background: var(--gold-hi);
}

/* —— Oran sheet (ayarlar) —— */
.ug-rates-sheet {
  position: relative;
  padding: 4px 2px 2px;
  color: #f7f1e4;
  font-family: var(--font);
}
.ug-rates-x {
  position: absolute;
  top: -2px;
  right: 0;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  color: rgba(247, 241, 228, 0.7);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ug-rates-x:active { transform: scale(0.95); }
.ug-rates-hero {
  text-align: center;
  padding: 6px 40px 14px;
  background: radial-gradient(ellipse 80% 90% at 50% 0%, rgba(255, 150, 40, 0.16), transparent 65%);
}
.ug-rates-kicker {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: rgba(246, 196, 69, 0.85);
}
.ug-rates-hero h2 {
  margin: 6px 0 4px;
  font-size: clamp(20px, 5.4vw, 24px);
  font-weight: 900;
  color: #fff;
}
.ug-rates-hero em {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: rgba(247, 241, 228, 0.55);
}
.ug-rates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 0 2px;
}
.ug-rate-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 1px 6px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), transparent 50%), #122036;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ug-rate-row.is-active {
  background: linear-gradient(165deg, rgba(255, 170, 50, 0.18), transparent 55%), #1a2a44;
  border-color: rgba(255, 180, 80, 0.6);
  box-shadow: 0 0 14px rgba(255, 140, 40, 0.28);
}
.ug-rate-lv {
  grid-column: 1;
  font-size: 13px;
  font-weight: 900;
  color: rgba(247, 241, 228, 0.92);
}
.ug-rate-lv i {
  font-style: normal;
  margin: 0 3px;
  color: rgba(246, 196, 69, 0.75);
}
.ug-rate-pct {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 17px;
  font-weight: 900;
  color: #fff;
}
.ug-rate-tag {
  grid-column: 1;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}
.ug-rate-row.tier-easy .ug-rate-tag,
.ug-rate-row.tier-easy .ug-rate-pct { color: #7CFF9A; }
.ug-rate-row.tier-good .ug-rate-tag,
.ug-rate-row.tier-good .ug-rate-pct { color: #9ad0ff; }
.ug-rate-row.tier-hard .ug-rate-tag,
.ug-rate-row.tier-hard .ug-rate-pct { color: #ffc86a; }
.ug-rate-row.tier-vhard .ug-rate-tag,
.ug-rate-row.tier-vhard .ug-rate-pct { color: #ff9a6a; }
.ug-rate-row.tier-legend .ug-rate-tag,
.ug-rate-row.tier-legend .ug-rate-pct { color: #ff6ad5; }
.ug-rates-note {
  margin: 12px 4px 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(247, 241, 228, 0.45);
}
.ug-rates-ok { width: 100%; margin-top: 2px; }

/* —— KO workspace paneli —— */
.ug-work {
  flex: 0 0 auto;
}
.ug-work-frame {
  position: relative;
  border-radius: 10px;
  padding: 10px 10px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
    linear-gradient(180deg, #1e2632 0%, #121820 55%, #0e141c 100%);
  border: 2px solid #5a4a2e;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(212, 181, 106, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.45);
}
.ug-work-frame::before,
.ug-work-frame::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c9b06a, #6a5428 60%, #3a2e14);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.ug-work-frame::before { top: 7px; left: 7px; }
.ug-work-frame::after { top: 7px; right: 7px; }

.ug-work-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 2px 18px 10px;
  padding: 6px 12px;
  border-radius: 4px;
  background: linear-gradient(180deg, #2a3340, #171e28);
  border: 1px solid rgba(212, 181, 106, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.ug-work-title span {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--gold-hi);
  text-shadow: 0 1px 0 #000;
}
.ug-work-title i {
  width: 18px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ug-work-meta {
  text-align: center;
  margin: 0 0 10px;
  min-width: 0;
}
.ug-work-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ug-work-meta em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: rgba(232, 224, 208, 0.5);
}
.ug-work-meta.is-empty-meta strong { color: rgba(232, 224, 208, 0.7); }

.ug-rarity {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(232, 224, 208, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ug-rarity.rarity-uncommon { color: #7CFF9A; border-color: rgba(90, 200, 120, 0.4); }
.ug-rarity.rarity-rare { color: #f6c445; border-color: rgba(246, 196, 69, 0.5); }
.ug-rarity.rarity-legendary { color: #ff8a8a; border-color: rgba(220, 48, 48, 0.55); }

/* Board: item | 3x3 | result */
.ug-board {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  gap: 8px;
  align-items: start;
  justify-items: center;
  margin: 0 2px 12px;
}
.ug-board-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 22px;
}
.ug-board-cap {
  font-size: 10px;
  font-weight: 800;
  color: rgba(212, 181, 106, 0.65);
  letter-spacing: 0.03em;
}

.ug-mid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: min(100%, 148px);
  padding: 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(90, 74, 46, 0.55);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.45);
  align-self: center;
}
.ug-mid-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.ug-mid-hit {
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 10px;
  line-height: 0;
}
.ug-mid-hit:active { transform: scale(0.96); }
.ug-mid-hit .ug-slot { pointer-events: none; }
.ug-mid-pair .ug-slot {
  width: 54px;
  height: 54px;
}
.ug-mid-cap {
  font-size: 9px;
  font-weight: 800;
  color: rgba(212, 181, 106, 0.7);
  letter-spacing: 0.02em;
}

.ug-slot {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), transparent 45%),
    var(--slot);
  border: 1px solid #4a3e2a;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.ug-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ug-slot.is-empty {
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 3px,
      rgba(255, 255, 255, 0.015) 3px,
      rgba(255, 255, 255, 0.015) 6px
    ),
    #0a0e14;
  border-color: #3a3224;
}
.ug-slot.is-item,
.ug-slot.is-result {
  width: 58px;
  height: 58px;
  border-color: #6a5a3a;
}
.ug-slot.is-item.rarity-rare,
.ug-slot.is-result.rarity-rare,
.ug-slot.is-combine.rarity-rare { border-color: #f6c445; }
.ug-slot.is-item.rarity-uncommon,
.ug-slot.is-result.rarity-uncommon,
.ug-slot.is-combine.rarity-uncommon { border-color: rgba(90, 200, 120, 0.55); }
.ug-slot.is-item.rarity-legendary,
.ug-slot.is-result.rarity-legendary,
.ug-slot.is-combine.rarity-legendary { border-color: #e04040; }
.ug-slot.is-bg-frame {
  border-width: 2px;
  background: #05080e;
}
.ug-slot.is-bg-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}
.ug-slot.is-bg-frame.rarity-common {
  border-color: #d8dee8;
  box-shadow:
    0 0 0 1px rgba(40, 48, 64, 0.45),
    0 0 10px rgba(220, 228, 240, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.ug-slot.is-bg-frame.rarity-rare {
  border-color: #f6c445;
  box-shadow:
    0 0 0 1px rgba(80, 50, 0, 0.55),
    0 0 12px rgba(246, 196, 69, 0.45),
    inset 0 0 0 1px rgba(255, 230, 150, 0.2);
}
.ug-slot.is-bg-frame.rarity-legendary {
  border-color: #e04040;
  box-shadow:
    0 0 0 1px rgba(60, 10, 10, 0.55),
    0 0 12px rgba(220, 48, 48, 0.5),
    inset 0 0 0 1px rgba(255, 160, 140, 0.2);
}
.ug-slot.is-result:not(.is-empty) {
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(212, 181, 106, 0.25);
}
.ug-slot.is-scroll {
  border-color: rgba(255, 140, 60, 0.55);
  background: linear-gradient(160deg, rgba(255, 140, 40, 0.12), transparent 50%), var(--slot);
}
.ug-slot.is-scroll.is-short {
  border-color: rgba(228, 84, 74, 0.7);
  box-shadow: inset 0 0 0 1px rgba(228, 84, 74, 0.25);
}
.ug-slot.is-trina {
  border-color: rgba(255, 120, 40, 0.55);
  background: linear-gradient(160deg, rgba(255, 100, 40, 0.14), transparent 50%), var(--slot);
}
.ug-slot.is-trina .ug-slot-badge {
  color: #ffc070;
  font-size: 9px;
}
.ug-slot-badge {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  min-width: 1.2em;
  padding: 1px 4px;
  border-radius: 4px 0 0 0;
  font-style: normal;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: #fff8dc;
  background: linear-gradient(180deg, rgba(60, 48, 18, 0.94), rgba(18, 14, 8, 0.96));
  border: 1px solid rgba(246, 196, 69, 0.55);
  border-right: none;
  border-bottom: none;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
}

/* Rate / cost fields */
.ug-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.ug-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 4px;
  background: #05070c;
  border: 1px solid #3a3224;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.55);
  min-height: 54px;
}
.ug-field > span {
  font-size: 10px;
  font-weight: 800;
  color: rgba(212, 181, 106, 0.7);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ug-field > strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}
.ug-field > strong.rate-hi { color: #7CFF9A; }
.ug-field > strong.rate-mid { color: #9ad0ff; }
.ug-field > strong.rate-lo { color: #ffc86a; }
.ug-field > strong.rate-xlo { color: #ff7ab8; }
.ug-field > strong.is-short { color: #ff8a7a; }
.ug-field-gem {
  margin-top: 2px;
  font-size: 13px !important;
}
.ug-field-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.ug-field-tag {
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 99px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ug-field-tag.is-vip {
  color: #1a1208;
  background: linear-gradient(180deg, #ffe08a, #e0a01a);
  border-color: rgba(255, 236, 170, 0.85);
}
.ug-field-tag.is-bless {
  color: #d7f7ff;
  background: rgba(80, 170, 220, 0.18);
  border-color: rgba(140, 210, 255, 0.45);
}
.ug-field-tag.tier-easy { color: #7CFF9A; }
.ug-field-tag.tier-good { color: #9ad0ff; }
.ug-field-tag.tier-hard { color: #ffc86a; }
.ug-field-tag.tier-vhard { color: #ff9a6a; }
.ug-field-tag.tier-legend { color: #ff6ad5; }

.ug-pay {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Confirm / Cancel — KO kırmızı paneller */
.ug-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ug-act {
  min-height: 42px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #f5e6c8;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
  background: linear-gradient(180deg, #6a2a2a 0%, #4a1616 55%, #3a1010 100%);
  border: 1px solid #8a6a3a;
  box-shadow:
    inset 0 1px 0 rgba(255, 200, 160, 0.18),
    0 3px 8px rgba(0, 0, 0, 0.35);
}
.ug-act-ok {
  background: linear-gradient(180deg, #7a3220 0%, #5a1c10 50%, #3e120a 100%);
  border-color: #b08a45;
}
.ug-act:active:not(:disabled) { transform: scale(0.98); }
.ug-act.is-disabled,
.ug-act:disabled {
  opacity: 0.42;
  filter: grayscale(0.35);
  box-shadow: none;
}

.ug-max {
  text-align: center;
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 900;
  color: var(--gold);
  background: rgba(212, 181, 106, 0.08);
  border: 1px dashed rgba(212, 181, 106, 0.35);
}

/* +N → +N+1 özellik paneli */
.ug-stats {
  margin: 0 0 10px;
  padding: 8px 8px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(90, 74, 46, 0.55);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
}
.ug-stats-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding: 0 2px;
}
.ug-stats-head h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  color: var(--gold-hi);
  letter-spacing: 0.02em;
}
.ug-stats-head em {
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  color: #7CFF9A;
}
.ug-stats-head em i {
  font-style: normal;
  margin: 0 3px;
  color: rgba(212, 181, 106, 0.8);
}
.ug-stats-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ug-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
  font-weight: 800;
  color: rgba(232, 224, 208, 0.7);
}
.ug-stat > strong { color: #fff; font-weight: 900; }
.ug-stat.is-up {
  background: rgba(124, 255, 154, 0.05);
  border-color: rgba(124, 255, 154, 0.14);
}
.ug-stat-power {
  background: rgba(212, 181, 106, 0.08) !important;
  border-color: rgba(212, 181, 106, 0.22) !important;
}
.ug-stat-vals {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ug-stat-vals strong { color: rgba(232, 224, 208, 0.9); font-weight: 900; }
.ug-stat-vals i {
  font-style: normal;
  color: rgba(212, 181, 106, 0.75);
  font-weight: 900;
}
.ug-stat-vals em {
  font-style: normal;
  color: #7CFF9A;
  font-weight: 900;
}
.ug-stat-vals b {
  font-size: 10px;
  font-weight: 900;
  color: #9ad0ff;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(100, 160, 255, 0.12);
}
.ug-stat-power .ug-stat-vals em,
.ug-stat-power .ug-stat-vals b { color: var(--gold-hi); }
.ug-stat-power .ug-stat-vals b {
  background: rgba(212, 181, 106, 0.15);
}

/* —— Envanter ızgarası —— */
.ug-inv-wrap {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    #151b24;
  border: 2px solid #5a4a2e;
  box-shadow:
    inset 0 0 0 1px rgba(212, 181, 106, 0.12),
    0 6px 18px rgba(0, 0, 0, 0.35);
}
.ug-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px;
}
.ug-list-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  color: var(--gold-hi);
}
.ug-list-head em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: rgba(232, 224, 208, 0.45);
}
.ug-empty-list {
  margin: 0;
  padding: 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: rgba(232, 224, 208, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.ug-inv-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}
.ug-inv {
  position: relative;
  aspect-ratio: 1;
  border-radius: 4px;
  display: grid;
  place-items: center;
  padding: 0;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), transparent 45%),
    var(--slot);
  border: 1px solid #4a3e2a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
}
.ug-inv img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
/* +N / ×N → ortak .iq-lv / .iq-qty (home.css) */
.ug-inv.on {
  border-color: #d4b56a;
  box-shadow:
    0 0 0 1px rgba(212, 181, 106, 0.45),
    0 0 12px rgba(212, 181, 106, 0.28),
    inset 0 0 0 1px rgba(0, 0, 0, 0.45);
}
.ug-inv.rarity-uncommon { border-color: rgba(90, 200, 120, 0.45); }
.ug-inv.rarity-rare { border-color: #f6c445; }
.ug-inv.rarity-legendary { border-color: #e04040; }
.ug-inv.on.rarity-rare { border-color: #ffe56a; }
.ug-inv.on.rarity-legendary { border-color: #ff6a6a; }
.ug-inv.is-bg-frame {
  border-width: 2px;
  background: #05080e;
}
.ug-inv.is-bg-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}
.ug-inv.is-bg-frame.rarity-common {
  border-color: #d8dee8;
  box-shadow:
    0 0 0 1px rgba(40, 48, 64, 0.45),
    0 0 10px rgba(220, 228, 240, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.ug-inv.is-bg-frame.rarity-rare {
  border-color: #f6c445;
  box-shadow:
    0 0 0 1px rgba(80, 50, 0, 0.55),
    0 0 10px rgba(246, 196, 69, 0.4),
    inset 0 0 0 1px rgba(255, 230, 150, 0.18);
}
.ug-inv.is-bg-frame.rarity-legendary {
  border-color: #e04040;
  box-shadow:
    0 0 0 1px rgba(60, 10, 10, 0.55),
    0 0 10px rgba(220, 48, 48, 0.45),
    inset 0 0 0 1px rgba(255, 160, 140, 0.18);
}
.ug-inv.is-bg-frame.on.rarity-rare {
  border-color: #ffe56a;
  box-shadow:
    0 0 0 1px rgba(255, 230, 120, 0.45),
    0 0 14px rgba(246, 196, 69, 0.5),
    inset 0 0 0 1px rgba(0, 0, 0, 0.45);
}
.ug-inv.is-bg-frame.on.rarity-legendary {
  border-color: #ff6a6a;
  box-shadow:
    0 0 0 1px rgba(255, 120, 100, 0.45),
    0 0 14px rgba(220, 48, 48, 0.5),
    inset 0 0 0 1px rgba(0, 0, 0, 0.45);
}
.ug-inv:active { transform: scale(0.96); }
.ug-inv.is-max { opacity: 0.55; }
.ug-inv.is-mat {
  cursor: pointer;
}
.ug-inv.is-mat.is-empty-mat {
  opacity: 0.4;
}
/* mat ×N → ortak .iq-qty (home.css) */
.ug-inv.is-blank {
  background: #0a0e14;
  border-color: #2e281c;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.ug-wallet {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
  padding: 7px 10px;
  border-radius: 4px;
  background: #05070c;
  border: 1px solid #3a3224;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
}
.ug-wallet b {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  margin-right: 8px;
}
.ug-wallet b:last-child { margin-right: 0; }

@media (max-width: 360px) {
  .ug-board { grid-template-columns: 54px 1fr 54px; gap: 6px; }
  .ug-slot.is-item,
  .ug-slot.is-result { width: 50px; height: 50px; }
  .ug-mid { width: min(100%, 132px); gap: 6px; padding: 5px; }
  .ug-mid-pair .ug-slot { width: 48px; height: 48px; }
}
@media (max-height: 640px) {
  .ug-work-meta { margin-bottom: 6px; }
  .ug-board { margin-bottom: 8px; }
  .ug-fields { margin-bottom: 8px; }
  .ug-act { min-height: 38px; }
}
