@font-face {
  font-family: 'LuckiestGuyRU';
  src: url('/assets/fonts/main-screen-font.otf') format('opentype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root { --bg:#1f1a14; --panel:#2a241d; --accent:#d3a868; --muted:#8a7a63; --text:#efe9dd; --panel2:#211b14; --btn-disabled-image:url('/assets/images/shared/btn_disabled.webp'); }
*{box-sizing:border-box}
body{margin:0; font-family: 'Unna', serif; background:var(--bg); color:var(--text);}
.container{max-width:980px;margin:0 auto;padding:24px}
.site-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.site-header__title{margin:0}
.site-header__nav{display:flex;align-items:center;gap:8px}

#main-gold,
#inv-top-gold,
#shop-top-gold,
#runes-top-gold {
  font-variant-numeric: tabular-nums;
}

body.app-booting .auth-screen-stage {
  display: none;
}

.card{background:linear-gradient(180deg, #2d261e, #231e18); border:1px solid #3e372f; border-radius:12px; padding:16px; box-shadow:0 10px 30px rgba(0,0,0,.35)}
input,select,button{background:#1e1914;border:1px solid #3e372f;color:var(--text);padding:10px 12px;border-radius:10px}
button{background:var(--accent); color:#2a1d0f; font-weight:700; border:none; cursor:pointer}
button:disabled{cursor:not-allowed;opacity:1}
button:not(.icon-btn):disabled{
  color:#d5d7da !important;
  text-shadow:0 2px 0 rgba(0,0,0,.62);
  filter:grayscale(1) saturate(.2) brightness(.82);
}

button:not(.icon-btn):disabled:is(
  .auth-login__submit,
  .auth-login__social-btn,
  .auth-register__gender-btn,
  .auth-register__submit,
  .main-profile-btn,
  .main-menu-btn,
  .main-nav-btn--shop,
  .main-nav-btn--inventory,
  .main-nav-btn--quests,
  .main-nav-btn--runes,
  .main-nav-btn--friends,
  .main-fight-btn,
  .battle-home-btn
){
  border:none;
  filter:none;
  background-color:transparent !important;
  background-image:var(--btn-disabled-image) !important;
  background-position:center;
  background-repeat:no-repeat;
  background-size:100% 100%;
}
.row{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.row + .row{margin-top:12px}
.hidden{display:none}
.accent{color:var(--accent)}
.pill{display:inline-block;padding:6px 10px;border-radius:999px;background:var(--panel2);border:1px solid #3e372f}
.divider{height:1px;background:#3e372f;margin:12px 0}
.main-grid{display:grid;grid-template-columns:140px 1fr;gap:16px;align-items:start}
.avatar{width:120px;height:160px;border-radius:12px;border:1px solid #3e372f;object-fit:cover;background:#000}
.avatar-sm{width:100px;height:140px;border-radius:10px;border:1px solid #3e372f;object-fit:cover;background:#000}
.gear-icons{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}

.item-icon {
  --item-icon-size: 52px;
  position: relative;
  width: var(--item-icon-size);
  height: var(--item-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 222, 179, 0.45);
  background: #080504;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.38);
  overflow: hidden;
  isolation: isolate;
}

.item-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-image: var(--item-quality-bg, none);
  z-index: 0;
}

.item-icon--quality-green { --item-quality-bg: url('/assets/images/items/backgrounds/bg_item_green.webp'); }
.item-icon--quality-blue { --item-quality-bg: url('/assets/images/items/backgrounds/bg_item_blue.webp'); }
.item-icon--quality-violet { --item-quality-bg: url('/assets/images/items/backgrounds/bg_item_violet.webp'); }

.item-icon__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  border-radius: inherit;
  background: transparent;
  mix-blend-mode: screen;
}

.gear-icon-wrap {
  --item-icon-size: 28px;
  border-radius: 6px;
}

.gear-icon {
  width: 100%;
  height: 100%;
}
.hp{width:200px;height:10px;background:#3e2a1a;border:1px solid #5b4a33;border-radius:6px;overflow:hidden}
.hp>i{display:block;height:100%;background:#dba66a}
.energy{width:200px;height:10px;background:#203223;border:1px solid #35543b;border-radius:6px;overflow:hidden;margin-top:6px}
.energy>i{display:block;height:100%;background:#3fd67c}
.muted{color:#b6a791}
.stats-list{display:flex;flex-direction:column;gap:8px}
.stat-row{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(180deg,#2e281f,#272119);border:1px solid #3e372f;border-radius:10px;padding:8px 10px}
.stat-row span.label{opacity:.9}
.stat-row .value{font-weight:700;margin-right:8px}
.icon-btn{width:34px;height:34px;border-radius:8px;background:var(--accent);color:#2a1d0f;border:none;cursor:pointer;font-weight:900;font-size:18px;display:flex;align-items:center;justify-content:center}
.icon-btn:disabled{filter:grayscale(1);opacity:.6;cursor:not-allowed}
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);display:none;align-items:center;justify-content:center;z-index:50}
.overlay .box{background:#2a241d;border:1px solid #3e372f;border-radius:12px;padding:16px;min-width:280px;text-align:center}
/* Shop mode tabs (Buy/Sell) */
.shop-mode{background:#4a3c28 !important;border:1px solid #6b5b47 !important;color:var(--text) !important}
.shop-mode.active{background:var(--accent) !important;color:#2a1d0f !important}

/* Shop secondary and tertiary tabs */
.shop-tab,.wsubtab,.isubtab,.subtab{background:#4a3c28;border:1px solid #6b5b47;color:var(--text)}
.shop-tab.active,.wsubtab.active,.isubtab.active,.subtab.active{background:var(--accent);color:#2a1d0f}
.tab-group{display:flex;gap:8px;align-items:center}

/* Item Tooltip Styles */
.item-tooltip {
  position: absolute;
  z-index: 1000;
  /* background removed - will be set by quality class */
  border: 2px solid #3e372f;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 15px 35px rgba(0,0,0,.65);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  max-width: 320px;
  min-width: 280px;
  color: var(--text);
  font-family: 'Unna', serif;
}

.item-tooltip.show {
  opacity: 1;
}

/* Quality-based borders - database uses color names */
.item-tooltip.green {
  border-color: #2e6b2e;
  background: linear-gradient(180deg, #253225, #1f2a1f);
}

.item-tooltip.blue {
  border-color: #4a9eff;
  background: linear-gradient(180deg, #232c3a, #1e2531);
}

.item-tooltip.violet {
  border-color: #a855f7;
  background: linear-gradient(180deg, #2e2336, #251d2c);
}

.item-tooltip.gold {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #3a2f1a, #2d241a);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3), 0 15px 35px rgba(0,0,0,.65);
}

/* Legacy fallbacks for old system */
.item-tooltip.common { border-color: #2e6b2e; background: linear-gradient(180deg, #253225, #1f2a1f); }
.item-tooltip.uncommon { border-color: #4db33d; background: linear-gradient(180deg, #2d301e, #232618); }
.item-tooltip.rare { border-color: #4a9eff; background: linear-gradient(180deg, #232c3a, #1e2531); }
.item-tooltip.epic { border-color: #a855f7; background: linear-gradient(180deg, #2e2336, #251d2c); }
.item-tooltip.legendary { border-color: #f59e0b; background: linear-gradient(180deg, #3a2f1a, #2d241a); }

.tooltip-header {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  align-items: center;
}

.tooltip-image-wrap {
  --item-icon-size: 56px;
  flex-shrink: 0;
  border-radius: 8px;
}

.tooltip-image {
  width: 100%;
  height: 100%;
}

.tooltip-title {
  flex: 1;
}

.tooltip-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.2;
}

.tooltip-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}

.tooltip-price {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #f4d591;
}

.tooltip-price__icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.tooltip-price__text {
  font-variant-numeric: tabular-nums;
}

.tooltip-quality {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tooltip-quality.common { color: #8a7a63; }
.tooltip-quality.uncommon { color: #4db33d; }
.tooltip-quality.rare { color: #4a9eff; }
.tooltip-quality.epic { color: #a855f7; }
.tooltip-quality.legendary { color: #f59e0b; }
.tooltip-quality.green { color: #62d679; }
.tooltip-quality.blue { color: #76bcff; }
.tooltip-quality.violet { color: #b78dff; }
.tooltip-quality.gold { color: #f7c45a; }

.tooltip-stats {
  margin: 10px 0;
  padding: 8px 0;
  border-top: 1px solid #3e372f;
}

.tooltip-stat {
  font-size: 13px;
  margin-bottom: 3px;
  color: var(--text);
}

.tooltip-stat.positive {
  color: #4db33d;
}

.tooltip-description {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #3e372f;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.3;
}

.tooltip-requirements {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.tooltip-set {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.tooltip-set__title {
  font-size: 14px;
  font-weight: 700;
  color: #b7d5ff;
}

.tooltip-set__piece,
.tooltip-set__count {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(240, 224, 197, 0.92);
}

.tooltip-set__bonus {
  margin-top: 5px;
  font-size: 12px;
  color: rgba(238, 225, 197, 0.72);
}

.tooltip-set__bonus.is-active {
  color: #8ee1ff;
  font-weight: 700;
}

.tooltip-req-ok {
  color: #4ade80 !important;
  font-weight: 600;
}

.tooltip-req-fail {
  color: #ff6b6b !important;
  font-weight: 600;
}

.tooltip-equipped {
  background: rgba(211, 168, 104, 0.2);
  color: #d3a868;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 6px;
  text-align: center;
  font-weight: 700;
}

/* Main stats tooltip */
.stat-tooltip {
  position: fixed;
  z-index: 1002;
  border: 2px solid #7f6337;
  border-radius: 10px;
  background: linear-gradient(180deg, #2f2418, #251d14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  min-width: 220px;
  max-width: 300px;
  padding: 10px 12px;
  color: var(--text);
  font-family: 'Unna', serif;
  opacity: 0;
  transition: opacity 0.12s ease-in-out;
}

.stat-tooltip.show {
  opacity: 1;
}

.stat-tooltip__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #e4c183;
}

.stat-tooltip__text {
  font-size: 13px;
  line-height: 1.3;
}

/* Runes screen */
body.runes-screen-active {
  background: #100a06;
}

body.runes-screen-active .container {
  max-width: none;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #000;
}

body.runes-screen-active header {
  display: none;
}

.runes-screen.card {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
  background: #000;
  z-index: 110;
  font-family: 'Unna', serif;
}

.runes-screen .runes-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.runes-screen .runes-stage {
  --runes-stage-base-width: 1890px;
  --runes-stage-base-height: 1071.25px;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--runes-stage-base-width);
  height: var(--runes-stage-base-height);
  padding: 18px 20px 14px;
  transform: translate(0, 0) scale(1);
  transform-origin: top left;
  overflow: hidden;
  background-image:
    radial-gradient(125% 84% at 50% 48%, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.5)),
    linear-gradient(180deg, rgba(18, 8, 6, 0.2), rgba(8, 4, 3, 0.45)),
    url('/assets/images/runes-screen/bg_runes.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.runes-screen .runes-stage > * {
  position: relative;
  z-index: 2;
}

.runes-screen .runes-screen__top {
  padding: 0;
}

.runes-screen .main-screen__resources {
  margin-top: 10px;
}

.runes-screen #runes-profile-btn {
  cursor: default;
}

.runes-screen #runes-menu-btn {
  cursor: pointer;
}

.runes-screen .runes-board {
  position: absolute;
  left: 50%;
  top: 86px;
  width: 980px;
  transform: translateX(-50%);
  padding: 0;
  background: none;
  filter: none;
}

.runes-screen .runes-board__title {
  position: relative;
  left: 50%;
  top: 0;
  width: 618px;
  aspect-ratio: 1257 / 314;
  transform: translateX(-50%);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('/assets/images/battle/bg_battle_name_hp.webp') center / 100% 100% no-repeat;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 52px;
  line-height: 0.9;
  color: #f9efda;
  text-shadow: 0 2px 0 rgba(19, 10, 6, 0.72);
}

.runes-screen .runes-board__close {
  position: absolute;
  right: -56px;
  top: 182px;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(96, 24, 26, 0.85);
  border-radius: 10px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 34px;
  line-height: 1;
  color: #fff5ef;
  text-shadow: 0 2px 0 rgba(60, 11, 12, 0.88);
  background: linear-gradient(180deg, #ea7874, #c23f48);
  box-shadow: inset 0 1px 0 rgba(255, 206, 197, 0.72);
}

.runes-screen .runes-board__content {
  margin-top: 22px;
  display: block;
  padding: 0;
}

.runes-screen .runes-wrap {
  width: 980px;
  max-width: 100%;
  border-radius: 12px;
  background: radial-gradient(ellipse at center, rgba(24, 32, 44, 0.7), rgba(18, 20, 24, 0.7));
  padding: 12px;
}

.runes-screen .runes-grid {
  display: block;
}

.runes-screen .runes-header {
  display: grid;
  grid-template-columns: 1fr 220px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.runes-screen .runes-branch-title {
  font-family: 'Unna', serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: center;
}

.runes-screen .runes-branch-title.thor {
  color: #a5c4ff;
}

.runes-screen .runes-branch-title.loki {
  color: #d4e58b;
}

.runes-screen .runes-points {
  background: #4b3322;
  border: 1px solid #735234;
  border-radius: 999px;
  text-align: center;
  padding: 8px 12px;
  font-weight: 700;
  color: #f2eadb;
  text-shadow: 0 1px 0 rgba(19, 10, 7, 0.82);
}

.runes-screen .runes-points::before,
.runes-screen .runes-points::after {
  content: none;
}

.runes-screen .runes-grid-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.runes-screen .runes-col {
  position: relative;
  padding: 18px;
  border: 1px solid #34404e;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(28, 36, 48, 0.6), rgba(22, 26, 30, 0.6));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.runes-screen .runes-col.loki {
  border-color: #3f4e34;
  background:
    linear-gradient(180deg, rgba(28, 48, 28, 0.6), rgba(22, 30, 22, 0.6));
}

.runes-screen .tier {
  display: flex;
  gap: 24px;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.runes-screen .rune-tile {
  width: 160px;
  max-width: 100%;
  min-height: 120px;
  padding: 8px;
  border: 1px solid #3e372f;
  border-radius: 10px;
  background:
    rgba(33, 27, 20, 0.8);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.35);
  text-align: center;
  position: relative;
  z-index: 1;
}

.runes-screen .rune-tile .icon {
  width: 64px;
  height: 64px;
  margin: 4px auto 8px;
  border-radius: 10px;
  border: 2px solid #3e372f;
  background: linear-gradient(180deg, #2b2b2b, #1d1d1d);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.runes-screen .rune-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(var(--scale, 1));
  transform-origin: center;
  image-rendering: -webkit-optimize-contrast;
}

.runes-screen .rune-tile .name {
  font-weight: 700;
}

.runes-screen .rune-tile .desc {
  font-size: 12px;
  color: #b6a791;
}

.runes-screen .rune-tile.locked {
  filter: grayscale(1);
  opacity: 0.6;
}

.runes-screen .rune-tile.taken {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

.runes-screen .rune-tile.taken .icon {
  border-color: rgba(230, 191, 124, 0.85);
  box-shadow: 0 0 10px rgba(225, 188, 120, 0.38);
}

.runes-screen .rune-tile.clickable .icon {
  border-color: #3e372f;
  box-shadow: none;
}

.runes-screen .rune-tile.clickable {
  cursor: pointer;
  transition: transform 0.1s ease;
}

.runes-screen .rune-tile.clickable:hover {
  transform: translateY(-2px);
}

.runes-screen .runes-links {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

.runes-screen .runes-links path {
  fill: none;
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.runes-screen .runes-links.thor path {
  stroke: #2e5b9a;
}

.runes-screen .runes-links.loki path {
  stroke: #5a8a3e;
}

@keyframes runeGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(211, 168, 104, 0);
    transform: scale(1);
  }

  30% {
    box-shadow: 0 0 24px 8px rgba(211, 168, 104, 0.65);
    transform: scale(1.03);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(211, 168, 104, 0);
    transform: scale(1);
  }
}

.runes-screen .rune-tile.flash {
  animation: runeGlow 700ms ease-out;
}

body.auth-screen-active {
  background: #130a07;
}

body.auth-screen-active .container {
  max-width: none;
  min-height: 100vh;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: #000;
}

body.auth-screen-login .auth-screen-stage {
  background-image:
    linear-gradient(180deg, rgba(18, 9, 8, 0.42), rgba(14, 8, 8, 0.34)),
    url('/assets/images/auth-screen/bg_login.webp');
}

body.auth-screen-register .auth-screen-stage {
  background-image:
    linear-gradient(180deg, rgba(18, 11, 8, 0.28), rgba(15, 11, 10, 0.34)),
    url('/assets/images/auth-screen/bg_signup.webp');
}

body.auth-screen-active .auth-screen-stage {
  --auth-stage-base-width: 2100px;
  --auth-stage-base-height: 1190.278px;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--auth-stage-base-width);
  height: var(--auth-stage-base-height);
  overflow-x: hidden;
  overflow-y: auto;
  transform: translate(0, 0) scale(1);
  transform-origin: top left;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

body.auth-screen-active .auth-screen-stage > * {
  position: relative;
  z-index: 2;
}

body.auth-screen-active .site-header {
  position: relative;
  z-index: 5;
  margin: 0;
  min-height: 98px;
  padding: 14px clamp(18px, 4vw, 56px);
  background:
    linear-gradient(180deg, rgba(110, 62, 38, 0.84), rgba(52, 24, 16, 0.84)),
    repeating-linear-gradient(0deg, rgba(255, 210, 143, 0.1) 0 2px, rgba(70, 38, 27, 0.08) 2px 9px);
  border-bottom: 1px solid rgba(32, 14, 8, 0.76);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.42);
}

body.auth-screen-active .site-header::before {
  content: '';
  position: absolute;
  inset: 10px 12px;
  border: 1px solid rgba(255, 227, 177, 0.12);
  pointer-events: none;
}

body.auth-screen-active .site-header__title {
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: clamp(46px, 4vw, 68px);
  line-height: 1;
  letter-spacing: 1.2px;
  color: #f4ede0;
  text-shadow: 0 3px 0 rgba(34, 18, 12, 0.72), 0 10px 16px rgba(0, 0, 0, 0.36);
  -webkit-text-stroke: 1px rgba(30, 14, 10, 0.44);
}

body.auth-screen-active .site-header__nav {
  gap: 12px;
}

body.auth-screen-active .site-header__btn {
  min-width: 152px;
  height: 56px;
  padding: 0 18px;
  border: 1px solid rgba(109, 75, 39, 0.86);
  border-radius: 14px;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 31px;
  line-height: 1;
  color: #3a2617;
  background: linear-gradient(180deg, #f2deae, #d7b170);
  box-shadow: 0 4px 0 rgba(101, 66, 31, 0.78), inset 0 1px 0 rgba(255, 243, 213, 0.64);
}

body.auth-screen-active .site-header__btn.is-active {
  color: #2a1a0c;
  background: linear-gradient(180deg, #e9cc8f, #bd8e4a);
  box-shadow: 0 2px 0 rgba(93, 58, 26, 0.86), inset 0 1px 0 rgba(255, 238, 198, 0.52);
  transform: translateY(2px);
}

body.auth-screen-active #screen-login.card:not(.hidden) {
  position: relative;
  z-index: 2;
  min-height: calc(var(--auth-stage-base-height, 1190.278px) - 98px);
  margin: 0;
  padding: 18px 20px 32px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-login {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-login__panel {
  width: 604px;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  transform: translateY(-132px);
}

.auth-login__field {
  width: 96%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-login__label {
  margin: 0;
  padding-left: 12px;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: clamp(34px, 2.2vw, 40px);
  line-height: 1;
  text-transform: uppercase;
  color: #f3ede4;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.78), 0 0 8px rgba(0, 0, 0, 0.24);
  -webkit-text-stroke: 1px rgba(24, 10, 8, 0.66);
}

.auth-login__field input {
  width: 100%;
  height: 84px;
  border: none;
  border-radius: 0;
  padding: 0 26px;
  font-family: 'Unna', serif;
  font-size: clamp(28px, 2vw, 32px);
  font-weight: 700;
  line-height: 1;
  color: #2f1713;
  background-color: transparent;
  background-image: url('/assets/images/auth-screen/bg_txt_input.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: none;
}

.auth-login__field input::placeholder {
  color: rgba(75, 45, 37, 0.48);
}

.auth-login__field input:focus {
  outline: none;
  filter: brightness(1.05);
}

.auth-login__forgot {
  width: 96%;
  align-self: center;
  margin: -2px 0 2px;
  text-align: right;
  border: none;
  border-radius: 0;
  padding: 0;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: clamp(27px, 1.8vw, 32px);
  line-height: 1;
  color: #f2cb58;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.68);
  background: transparent;
}

.auth-login__submit {
  width: 96%;
  height: 114px;
  margin: 4px auto 0;
  border: none;
  border-radius: 0;
  padding: 0;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: clamp(60px, 4vw, 74px);
  line-height: 0.92;
  color: #f7f8ef;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.56);
  -webkit-text-stroke: 1px rgba(31, 18, 11, 0.62);
  background: url('/assets/images/auth-screen/btn_enter.webp') center/100% 100% no-repeat;
}

.auth-login__social-title {
  margin: 0;
  text-align: center;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: clamp(27px, 1.5vw, 32px);
  line-height: 1;
  color: #f3ece2;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.72);
}

.auth-login__social {
  width: 96%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-login__social-btn {
  flex: 0 0 calc((100% - 16px) / 2);
  width: calc((100% - 16px) / 2);
  aspect-ratio: 604 / 204;
  height: auto;
  border: none;
  border-radius: 0;
  padding: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.auth-login__social-btn--apple {
  background-image: url('/assets/images/auth-screen/btn_apple.webp');
}

.auth-login__social-btn--google {
  background-image: url('/assets/images/auth-screen/btn_google.webp');
}

.auth-login__signup {
  margin: 0;
  text-align: center;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: clamp(27px, 1.5vw, 31px);
  line-height: 1;
  color: #f0ece4;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.72);
}

.auth-login__signup-btn {
  border: none;
  border-radius: 0;
  padding: 0;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: inherit;
  line-height: 1;
  color: #f2cb58;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.68);
  background: transparent;
}

.auth-login__out {
  margin: 0;
  min-height: 0;
  max-width: 100%;
  overflow: auto;
  white-space: pre-wrap;
  text-align: center;
  font-size: 13px;
  line-height: 1.25;
  color: #ffccbe;
  text-shadow: none;
}

.auth-login__out:empty {
  display: none;
}

body.auth-screen-active #screen-register.card {
  position: relative;
  z-index: 2;
  min-height: calc(var(--auth-stage-base-height, 1190.278px) - 98px);
  margin: 0;
  padding: 16px 20px 24px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.auth-register {
  width: 100%;
  min-height: calc(var(--auth-stage-base-height, 1190.278px) - 148px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(20px, 4vw, 86px);
  padding: 0 clamp(38px, 5vw, 112px) 8px;
}

.auth-register__preview {
  flex: 0 0 470px;
  width: 470px;
  height: 790px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform: translateX(420px);
}

.auth-register__avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.48));
}

.auth-register__panel {
  --auth-register-content-width: 84%;
  flex: 0 0 520px;
  width: 520px;
  margin-right: clamp(140px, 10vw, 260px);
  display: flex;
  flex-direction: column;
  gap: 9px;
  transform: translate(-68px, -90px);
}

.auth-register__field {
  width: var(--auth-register-content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auth-register__label {
  margin: 0;
  padding-left: 10px;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: clamp(30px, 1.9vw, 35px);
  line-height: 1;
  text-transform: uppercase;
  color: #f3ede4;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.78), 0 0 8px rgba(0, 0, 0, 0.24);
  -webkit-text-stroke: 1px rgba(24, 10, 8, 0.66);
}

.auth-register__label--compact {
  padding-left: 10px;
  font-size: clamp(30px, 1.9vw, 35px);
}

.auth-register__field input {
  width: 100%;
  height: 72px;
  border: none;
  border-radius: 0;
  padding: 0 24px;
  font-family: 'Unna', serif;
  font-size: clamp(27px, 1.8vw, 31px);
  font-weight: 700;
  line-height: 1;
  color: #2f1713;
  background-color: transparent;
  background-image: url('/assets/images/auth-screen/bg_txt_input.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: none;
}

.auth-register__field input::placeholder {
  color: rgba(75, 45, 37, 0.48);
}

.auth-register__field input:focus {
  outline: none;
  filter: brightness(1.05);
}

.auth-register__gender {
  width: var(--auth-register-content-width);
  margin: 2px auto 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-register__gender-row {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-register__gender-btn {
  height: 76px;
  border: none;
  border-radius: 0;
  padding: 0 12px;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: clamp(33px, 1.8vw, 38px);
  line-height: 1;
  color: #d8dce2;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
  -webkit-text-stroke: 1px rgba(15, 8, 8, 0.62);
  background: var(--btn-disabled-image) center/100% 100% no-repeat;
}

.auth-register__gender-btn.is-active {
  color: #f7f8ef;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.56);
  -webkit-text-stroke: 1px rgba(31, 18, 11, 0.62);
  background-image: url('/assets/images/auth-screen/btn_enter.webp');
}

.auth-register__avatars {
  width: var(--auth-register-content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-register__avatar-grid {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.auth-register__avatar-option {
  border: 2px solid rgba(55, 30, 20, 0.64);
  border-radius: 11px;
  padding: 0;
  overflow: hidden;
  background: rgba(26, 14, 10, 0.68);
  aspect-ratio: 1 / 1;
}

.auth-register__avatar-option.is-active {
  border-color: #f0ca61;
  box-shadow: 0 0 0 2px rgba(40, 20, 12, 0.78);
}

.auth-register__avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-register__submit {
  width: var(--auth-register-content-width);
  height: 104px;
  margin: 6px auto 0;
  border: none;
  border-radius: 0;
  padding: 0;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: clamp(54px, 3.5vw, 66px);
  line-height: 0.92;
  color: #f7f8ef;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.56);
  -webkit-text-stroke: 1px rgba(31, 18, 11, 0.62);
  background: url('/assets/images/auth-screen/btn_enter.webp') center/100% 100% no-repeat;
}

.auth-register__signin {
  margin: 0;
  text-align: center;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: clamp(25px, 1.4vw, 30px);
  line-height: 1;
  color: #f0ece4;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.72);
}

.auth-register__signin-btn {
  border: none;
  border-radius: 0;
  padding: 0;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: inherit;
  line-height: 1;
  color: #f2cb58;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.68);
  background: transparent;
}

.auth-register__out {
  margin: 0;
  min-height: 0;
  max-width: 100%;
  overflow: auto;
  white-space: pre-wrap;
  text-align: center;
  font-size: 14px;
  line-height: 1.3;
  color: #ffdbd2;
  text-shadow: none;
}

.auth-register__out:empty {
  display: none;
}

body.main-screen-active {
  background: #100a06;
}

body.main-screen-active .container {
  max-width: none;
  padding: 0;
}

body.main-screen-active header {
  display: none;
}

.main-screen.card {
  --main-stage-base-width: 1890px;
  --main-stage-base-height: 1071.25px;
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  background: #000;
  font-family: 'Unna', serif;
  color: #f6eddf;
}

.main-screen__stage {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--main-stage-base-width);
  height: var(--main-stage-base-height);
  padding: 18px 20px 14px;
  transform: translate(0, 0) scale(1);
  transform-origin: top left;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(22, 12, 6, 0.08), rgba(20, 11, 6, 0.26)),
    url('/assets/images/main-screen/bg_main.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.main-screen__stage > * {
  position: relative;
  z-index: 2;
}

.main-screen__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.main-profile-btn {
  position: relative;
  width: 244px;
  height: 136px;
  border: none;
  border-radius: 0;
  padding: 0 14px 4px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background-color: transparent;
  background: url('/assets/images/main-screen/btn_profile.webp') center/100% 100% no-repeat;
  color: #f7f0e1;
}

.main-profile-btn__name {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0;
  transform: translateY(-2px);
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 19px;
  line-height: 1;
  color: #f8f2e5;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.78);
  -webkit-text-stroke: 0.6px rgba(0, 0, 0, 0.52);
}

.main-screen__resources {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 10px;
}

.main-resource {
  border: none;
  color: #f7f1e5;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.62);
}

.main-resource--gold {
  position: relative;
  width: 188px;
  height: 56px;
  padding: 6px 36px 8px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 21px;
  background-color: transparent;
  background: url('/assets/images/main-screen/btn_gold.webp') center/100% 100% no-repeat;
}

.main-resource--gold .accent {
  display: inline-block;
  transform: translate(8px, 3px);
  color: #f9f3e6;
}

.main-resource--gold .icon-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 5px;
  padding: 0;
  border: 1px solid rgba(87, 62, 28, 0.62);
  background: linear-gradient(180deg, #efcd90, #d6aa68);
  color: #2b1c0e;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.main-resource--energy {
  width: 214px;
  height: 62px;
  padding: 8px 12px 8px 28px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  background-color: transparent;
  background: url('/assets/images/main-screen/btn_energy.webp') center/100% 100% no-repeat;
  transform: translateY(-4px);
}

.main-resource--energy .energy {
  width: 100%;
  height: 6px;
  margin-top: 0;
  border-radius: 999px;
  border: 1px solid rgba(13, 79, 114, 0.74);
  background: rgba(12, 65, 96, 0.48);
}

.main-resource--energy .energy > i {
  background: linear-gradient(90deg, #8ef3ff, #40d3ff);
}

.main-resource__energy-text {
  width: 100%;
  font-size: 21px;
  line-height: 1;
  white-space: nowrap;
  color: #ebf8ff;
  text-align: center;
}

.main-resource__energy-text .accent {
  color: #ffffff;
}

.main-resource__energy-text .muted {
  color: #def4ff;
  margin-left: 4px;
  font-family: 'Unna', serif;
  font-size: 14px;
}

.main-menu-btn {
  width: 108px;
  height: 50px;
  border: none;
  border-radius: 0;
  padding: 0;
  background-color: transparent;
  background: url('/assets/images/main-screen/btn_burger.webp') center/100% 100% no-repeat;
  transform: translateY(2px);
}

.main-screen__left-nav,
.main-screen__right-nav {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3;
}

.main-screen__left-nav {
  left: max(0px, env(safe-area-inset-left));
  bottom: max(0px, env(safe-area-inset-bottom));
  top: auto;
  width: 240px;
  height: auto;
  aspect-ratio: 444 / 1288;
  min-height: 0;
  padding: 18px 14px 24px;
  align-items: center;
  justify-content: flex-start;
  background: url('/assets/images/main-screen/bg_button_wood_panel.webp') center bottom/100% 100% no-repeat;
}

.main-screen__right-nav {
  right: 16px;
  top: 314px;
  width: 172px;
  align-items: flex-end;
}

.main-screen__right-nav .main-nav-btn--wood {
  width: 170px;
  height: 60px;
}

.main-nav-btn {
  width: 160px;
  height: 58px;
  border: none;
  border-radius: 0;
  padding: 0 10px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 17px;
  line-height: 1;
  color: #f8f0e2;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.72);
  -webkit-text-stroke: 0.6px rgba(0, 0, 0, 0.46);
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.main-screen__left-nav .main-nav-btn {
  width: 170px;
}

.main-nav-btn--shop {
  aspect-ratio: 288 / 183;
  height: auto;
  background-image: url('/assets/images/main-screen/btn_shop.webp');
}

.main-nav-btn--inventory {
  aspect-ratio: 288 / 173;
  height: auto;
  background-image: url('/assets/images/main-screen/btn_inventory.webp');
}

.main-nav-btn--quests {
  aspect-ratio: 288 / 215;
  height: auto;
  background-image: url('/assets/images/main-screen/btn_quests.webp');
}

.main-nav-btn--runes {
  aspect-ratio: 288 / 173;
  height: auto;
  background-image: url('/assets/images/main-screen/btn_runes.webp');
}

.main-nav-btn--friends {
  width: 170px;
  aspect-ratio: 288 / 173;
  height: auto;
  padding-bottom: 8px;
  background-image: url('/assets/images/main-screen/btn_friends.webp');
}

.main-nav-btn--shop,
.main-nav-btn--inventory,
.main-nav-btn--quests,
.main-nav-btn--runes,
.main-nav-btn--friends {
  padding-bottom: 18px;
}

.main-nav-btn--wood,
.main-nav-btn--danger-lite,
.main-nav-btn--danger {
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.main-nav-btn--wood {
  border: 1px solid rgba(150, 112, 72, 0.58);
  border-radius: 10px;
  background-image: linear-gradient(180deg, #7a5633, #5d3f24);
  background-size: 100% 100%;
  background-position: center;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  text-align: center;
}

.main-nav-btn--danger-lite,
.main-nav-btn--danger {
  width: 170px;
  height: 60px;
  border: 2px solid #7c2326;
  border-radius: 12px;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(180deg, #ef5f62, #c92f3a);
  color: #fff3f3;
  font-size: 18px;
  text-transform: none;
}

.main-screen__hero {
  position: absolute;
  left: 50%;
  top: 126px;
  transform: translateX(-50%);
  width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  pointer-events: none;
}

.main-screen__level {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: url('/assets/images/main-screen/bg_lvl.webp') center/100% 100% no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 34px;
  line-height: 1;
  color: #f4f8fa;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.73);
}

.main-screen__level .accent {
  color: #f4f8fa;
}

.main-screen__hp {
  width: 257px;
  aspect-ratio: 1302 / 244;
  height: auto;
  margin-top: 6px;
  padding: 1px 10px 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('/assets/images/main-screen/bg_hp_bar.webp') center/100% 100% no-repeat;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 17px;
  line-height: 1;
  color: #fff5f3;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.72);
  -webkit-text-stroke: 0.6px rgba(0, 0, 0, 0.45);
}

.main-screen__hp .accent {
  color: #fff5f3;
}

.main-screen__avatar {
  width: 284px;
  height: 368px;
  margin-top: 2px;
  object-fit: contain;
  background: transparent;
  border: none;
  border-radius: 0;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.42));
}

.main-screen__panel {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: 402px;
  min-height: 0;
  padding: 12px 8px 6px;
  border: 2px solid rgba(121, 140, 163, 0.86);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(23, 16, 11, 0.93), rgba(20, 14, 10, 0.89));
  box-shadow:
    inset 0 0 0 2px rgba(197, 213, 230, 0.15),
    0 18px 34px rgba(0, 0, 0, 0.42);
}

.main-screen__panel p {
  margin: 0;
  font-size: 18px;
  line-height: 1;
}

.main-screen__panel .accent {
  color: #e4bc7f;
}

.main-screen__panel-header {
  display: grid;
  justify-items: center;
  grid-template-rows: auto auto auto;
  row-gap: 6px;
  margin-bottom: 6px;
}

.main-screen__panel-header > div {
  width: 100%;
}

.main-screen__panel-header > div:first-child {
  display: contents;
}

.main-screen__panel-header > div:first-child p:first-child {
  grid-row: 1;
}

.main-screen__panel-header > div:first-child p:last-child {
  grid-row: 3;
}

.main-screen__record-pills {
  grid-row: 2;
  position: static;
  display: flex;
  justify-content: center;
  flex-direction: row;
  gap: 6px;
}

.main-screen__record-pills .pill {
  min-width: 114px;
  padding: 6px 9px 7px;
  border: 1px solid rgba(206, 166, 112, 0.42);
  border-radius: 999px;
  background: rgba(29, 20, 12, 0.76);
  text-align: center;
  font-size: 16px;
  line-height: 1;
}

.main-screen__panel-main {
  display: block;
}

.main-screen__panel-left {
  padding-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.main-screen__panel-avatar {
  width: 92px;
  height: 118px;
  border-radius: 10px;
  border: 1px solid rgba(197, 168, 129, 0.55);
  object-fit: cover;
  background: rgba(21, 15, 10, 0.9);
}

.main-screen__panel-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main-screen .gear-icons {
  min-height: 28px;
}

.main-screen__panel-right #main-gear-icons {
  display: none;
}

.main-screen__panel-right #main-gear-icons:empty {
  display: none;
}

.main-screen .gear-icon-wrap {
  --item-icon-size: 24px;
  border-color: rgba(228, 191, 135, 0.5);
}

.main-screen__avatar-change {
  border: 1px solid rgba(221, 189, 147, 0.44);
  border-radius: 10px;
  padding: 5px 8px;
  font-size: 13px;
  background: linear-gradient(180deg, rgba(96, 64, 34, 0.95), rgba(64, 43, 24, 0.95));
  color: #f4eadb;
  width: 100%;
}

.main-screen .stats-list {
  margin-top: 2px;
  gap: 7px;
}

.main-screen .stat-row {
  min-height: 54px;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1px solid rgba(220, 181, 128, 0.28);
  background: linear-gradient(180deg, rgba(40, 27, 16, 0.78), rgba(32, 22, 14, 0.78));
}

.main-screen .stat-row .label,
.main-screen .stat-row .value {
  font-size: 17px;
  line-height: 1;
}

.main-screen .stat-row > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.main-screen .stat-row button[id^='sub-'] {
  display: none;
}

.main-screen .stat-row .value {
  display: inline-block;
  min-width: 18px;
  text-align: center;
  margin: 0;
}

.main-screen .icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(225, 184, 122, 0.34);
  background: linear-gradient(180deg, #f1cd93, #d6aa68);
  color: #2b1d0f;
  font-size: 22px;
}

.main-screen .main-resource--gold .icon-btn {
  width: 16px;
  height: 16px;
  right: 12px;
  border-radius: 4px;
  font-size: 11px;
  padding: 0;
}

.main-screen__panel-actions {
  margin-top: 2px;
  display: flex;
  justify-content: flex-end;
}

#save-stats {
  border: 1px solid rgba(223, 188, 133, 0.44);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 15px;
  background: linear-gradient(180deg, #5a391f, #3f2714);
  color: #f5ebdb;
}

.main-screen__battle-row {
  position: absolute;
  right: 20px;
  bottom: 18px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.main-fight-btn {
  width: 344px;
  height: 124px;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 50px;
  line-height: 0.9;
  color: #fff9ed;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.58);
  -webkit-text-stroke: 1px rgba(21, 13, 8, 0.56);
  background-color: transparent;
  background: url('/assets/images/main-screen/btn_fight.webp') center/100% 100% no-repeat;
}

.main-screen .battle-modes-popover {
  position: absolute;
  right: 0;
  bottom: 124px;
  width: fit-content;
  max-width: min(1320px, calc(var(--main-stage-base-width, 1890px) - 70px));
  padding: 14px 16px;
  border: 1px solid rgba(151, 118, 81, 0.72);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(35, 26, 17, 0.97), rgba(24, 19, 14, 0.97));
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.52);
  display: none;
  align-items: center;
  gap: 14px;
}

.main-screen .battle-modes-popover.is-open {
  display: flex;
}

.main-screen .battle-modes-popover.hidden {
  display: none;
}

.main-screen .battle-mode-btn,
.main-screen #more-modes .battle-mode-btn {
  min-width: 96px;
  height: 72px;
  border: 2px solid #4d7d47;
  border-radius: 18px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 31px;
  line-height: 1;
  background: #2d6237;
  color: #1b1209;
}

.main-screen .battle-mode-btn--primary {
  min-width: 150px;
  border-color: #d5ae72;
  background: #d5ae72;
  color: #211608;
}

#to-admin {
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  line-height: 1;
}

.main-screen .main-nav-btn.hidden {
  display: none !important;
}

.main-screen .battle-mode-btn.hidden,
.main-screen #more-modes .battle-mode-btn.hidden {
  display: none !important;
}

.main-screen .battle-mode-btn:disabled,
.main-screen #more-modes .battle-mode-btn:disabled,
.main-screen .main-fight-btn:disabled {
  opacity: 1;
  filter: none;
  cursor: not-allowed;
}

.main-screen #more-modes {
  display: flex;
  align-items: center;
  gap: 12px;
}

.main-screen #more-modes.hidden {
  display: none;
}

#main-out {
  display: none;
}

body.inventory-screen-active {
  background: #100a06;
}

body.inventory-screen-active .container {
  max-width: none;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #000;
}

body.inventory-screen-active header {
  display: none;
}

.inventory-screen.card {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
  background: #000;
  z-index: 110;
  font-family: 'Unna', serif;
}

.inventory-screen .inventory-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.inventory-screen .inventory-stage {
  --inventory-stage-base-width: 1890px;
  --inventory-stage-base-height: 1071.25px;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--inventory-stage-base-width);
  height: var(--inventory-stage-base-height);
  padding: 18px 20px 14px;
  transform: translate(0, 0) scale(1);
  transform-origin: top left;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(18, 8, 6, 0.22), rgba(8, 4, 3, 0.48)),
    url('/assets/images/inventory-screen/bg_inventory_v2.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.inventory-screen .inventory-stage > * {
  position: relative;
  z-index: 2;
}

.inventory-screen .inventory-screen__top {
  padding: 0;
}

.inventory-screen .main-screen__resources {
  margin-top: 10px;
}

.inventory-screen #inv-profile-btn {
  cursor: default;
}

.inventory-screen #inv-menu-btn {
  cursor: pointer;
}

.inventory-screen .inventory-board {
  position: absolute;
  left: 50%;
  top: 148px;
  width: 1240px;
  aspect-ratio: 999 / 604;
  transform: translateX(-50%);
  padding: 64px 24px 24px;
  background: url('/assets/images/battle/bg_battle_result.webp') center / 100% 100% no-repeat;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.42));
}

.inventory-screen .inventory-board__title {
  position: absolute;
  left: 50%;
  top: -58px;
  width: 618px;
  aspect-ratio: 1257 / 314;
  transform: translateX(-50%);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('/assets/images/battle/bg_battle_name_hp.webp') center / 100% 100% no-repeat;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 52px;
  line-height: 0.9;
  color: #f9efda;
  text-shadow: 0 2px 0 rgba(19, 10, 6, 0.72);
}

.inventory-screen .inventory-board__close {
  position: absolute;
  right: 14px;
  top: 16px;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(96, 24, 26, 0.85);
  border-radius: 10px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 34px;
  line-height: 1;
  color: #fff5ef;
  text-shadow: 0 2px 0 rgba(60, 11, 12, 0.88);
  background: linear-gradient(180deg, #ea7874, #c23f48);
  box-shadow: inset 0 1px 0 rgba(255, 206, 197, 0.72);
}

.inventory-screen .inventory-board__content {
  height: 100%;
  display: grid;
  grid-template-columns: 1.06fr 0.9fr 0.84fr;
  gap: 10px;
  padding: 22px 62px 56px;
}

.inventory-screen .inventory-board__content > * {
  min-width: 0;
  min-height: 0;
}

.inventory-screen .inventory-paper,
.inventory-screen .inventory-bag-panel,
.inventory-screen .inventory-stats-panel {
  position: relative;
  border: 2px solid rgba(184, 144, 92, 0.48);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(52, 29, 17, 0.86), rgba(31, 17, 11, 0.86));
  box-shadow: inset 0 0 0 1px rgba(255, 220, 171, 0.14);
}

.inventory-screen .inventory-paper {
  padding: 12px;
  overflow: hidden;
}

.inventory-screen .inventory-paper::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 10px;
  border: 1px solid rgba(112, 69, 38, 0.42);
  background: linear-gradient(180deg, rgba(236, 208, 164, 0.9), rgba(208, 164, 110, 0.9));
  opacity: 0.98;
}

.inventory-screen .inventory-paper__hero-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 53%;
  height: 80%;
  transform: translate(-50%, -45%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.inventory-screen .inventory-paper__hero {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.34));
}

.inventory-screen .inventory-equip-layer {
  position: absolute;
  inset: 14px;
}

.inventory-screen .inventory-equip-slot {
  --slot-size: 84px;
  position: absolute;
  width: var(--slot-size);
  height: var(--slot-size);
  border: none;
  border-radius: 10px;
  padding: 0;
  background-color: transparent;
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.inventory-screen .inventory-equip-slot::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.inventory-screen .inventory-equip-slot:hover::after {
  border-color: rgba(255, 225, 181, 0.5);
}

.inventory-screen .inventory-equip-slot.is-selected::after {
  border-color: rgba(96, 184, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(96, 184, 255, 0.7);
}

.inventory-screen .inventory-equip-slot.is-blocked {
  filter: grayscale(0.42);
}

.inventory-screen .inventory-equip-slot__icon {
  --item-icon-size: 60px;
}

.inventory-screen .inventory-equip-slot__item {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  box-shadow: none;
}

.inventory-screen .inventory-equip-slot__name {
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1;
  color: #fff0d8;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.82);
  background: rgba(19, 11, 8, 0.78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.inventory-screen .inventory-equip-slot.is-empty:hover .inventory-equip-slot__name,
.inventory-screen .inventory-equip-slot.is-empty.is-selected .inventory-equip-slot__name {
  opacity: 1;
}

.inventory-screen .inventory-equip-slot__badge {
  position: absolute;
  right: 4px;
  top: 5px;
  min-width: 20px;
  height: 16px;
  border-radius: 5px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(20, 114, 170, 0.85);
}

.inventory-screen .inventory-equip-slot--rightHand { background-image: url('/assets/images/inventory-slots/01_weapon.webp'); right: 2px; top: 98px; }
.inventory-screen .inventory-equip-slot--leftHand { background-image: url('/assets/images/inventory-slots/02_shield.webp'); right: 2px; top: 192px; }
.inventory-screen .inventory-equip-slot--head { background-image: url('/assets/images/inventory-slots/03_helmet.webp'); left: calc(50% - 42px); top: 2px; }
.inventory-screen .inventory-equip-slot--chest { background-image: url('/assets/images/inventory-slots/04_chest.webp'); left: 2px; top: 132px; }
.inventory-screen .inventory-equip-slot--hands { background-image: url('/assets/images/inventory-slots/05_gloves.webp'); left: 2px; top: 226px; }
.inventory-screen .inventory-equip-slot--belt { background-image: url('/assets/images/inventory-slots/06_belt.webp'); left: 2px; top: 320px; }
.inventory-screen .inventory-equip-slot--legs { background-image: url('/assets/images/inventory-slots/07_legs.webp'); left: 2px; top: 414px; }
.inventory-screen .inventory-equip-slot--boots { background-image: url('/assets/images/inventory-slots/08_boots.webp'); left: calc(50% - 42px); bottom: 4px; }
.inventory-screen .inventory-equip-slot--ring { background-image: url('/assets/images/inventory-slots/09_ring.webp'); right: 2px; top: 286px; }
.inventory-screen .inventory-equip-slot--ear { background-image: url('/assets/images/inventory-slots/10_amulet.webp'); right: 2px; top: 380px; }

.inventory-screen .inventory-bag-panel {
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.inventory-screen .inventory-bag-panel__target {
  margin-top: 0;
  min-height: 16px;
  padding: 0 10px;
  font-size: 12px;
  color: #ebddb9;
}

.inventory-screen .inventory-grid {
  --inventory-grid-columns: 5;
  margin-top: 4px;
  padding: 0 6px 8px;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--inventory-grid-columns), minmax(0, 1fr));
  gap: 6px;
  justify-content: stretch;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
}

.inventory-screen .inventory-grid::-webkit-scrollbar {
  width: 8px;
}

.inventory-screen .inventory-grid::-webkit-scrollbar-thumb {
  background: rgba(201, 145, 84, 0.45);
  border-radius: 999px;
}

.inventory-screen .inventory-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(120, 74, 43, 0.74);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(48, 29, 18, 0.92), rgba(31, 17, 11, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 203, 151, 0.08);
}

.inventory-screen .inventory-cell--item {
  cursor: pointer;
}

.inventory-screen .inventory-cell--item:hover {
  border-color: rgba(245, 212, 162, 0.84);
}

.inventory-screen .inventory-cell--equipped {
  box-shadow: inset 0 0 0 2px rgba(69, 154, 255, 0.68);
}

.inventory-screen .inventory-cell__icon {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
}

.inventory-screen .inventory-cell__img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

.inventory-screen .inventory-cell__qty {
  position: absolute;
  right: 3px;
  bottom: 3px;
  min-width: 18px;
  height: 16px;
  border-radius: 6px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
}

.inventory-screen .inventory-cell__mark {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #46a5ff;
  box-shadow: 0 0 7px rgba(70, 165, 255, 0.9);
}

.inventory-screen .inventory-cell--quality-green { border-color: rgba(92, 164, 94, 0.76); }
.inventory-screen .inventory-cell--quality-blue { border-color: rgba(78, 143, 226, 0.8); }
.inventory-screen .inventory-cell--quality-violet { border-color: rgba(150, 94, 200, 0.8); }

.inventory-screen .inventory-stats-panel {
  padding: 10px 10px 8px;
  min-height: 0;
  overflow-y: auto;
}

.inventory-screen .inventory-stats-panel__title {
  margin: 0;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 24px;
  line-height: 1;
  color: #f5dfb5;
  text-shadow: 0 2px 0 rgba(18, 8, 5, 0.78);
}

.inventory-screen .inventory-stats-group {
  margin-top: 10px;
}

.inventory-screen .inventory-stats-group h4 {
  margin: 0 0 5px;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 16px;
  line-height: 1;
  color: #edd5a8;
  text-shadow: 0 1px 0 rgba(17, 8, 5, 0.78);
}

.inventory-screen .inventory-stat-row {
  min-height: 22px;
  padding: 2px 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(207, 162, 107, 0.14);
}

.inventory-screen .inventory-stat-row__label {
  font-size: 17px;
  color: #f2e6cc;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
}

.inventory-screen .inventory-stat-row__value {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-size: 17px;
  color: #f8edd8;
}

.inventory-screen .inventory-stat-row__delta {
  color: #77d879;
  font-size: 16px;
}

body.shop-screen-active {
  background: #100a06;
}

body.shop-screen-active .container {
  max-width: none;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #000;
}

body.shop-screen-active header {
  display: none;
}

.shop-screen.card {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
  background: #000;
  z-index: 110;
  font-family: 'Unna', serif;
}

.shop-screen .shop-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.shop-screen .shop-stage {
  --shop-stage-base-width: 1890px;
  --shop-stage-base-height: 1071.25px;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--shop-stage-base-width);
  height: var(--shop-stage-base-height);
  padding: 18px 20px 14px;
  transform: translate(0, 0) scale(1);
  transform-origin: top left;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(22, 10, 6, 0.2), rgba(10, 5, 3, 0.45)),
    url('/assets/images/shop-screen/bg_shop.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.shop-screen .shop-stage > * {
  position: relative;
  z-index: 2;
}

.shop-screen .shop-screen__top {
  padding: 0;
}

.shop-screen .main-screen__resources {
  margin-top: 10px;
}

.shop-screen #shop-profile-btn {
  cursor: default;
}

.shop-screen #shop-menu-btn {
  cursor: pointer;
}

.shop-screen .shop-board {
  position: absolute;
  left: 50%;
  top: 148px;
  width: 1240px;
  aspect-ratio: 999 / 604;
  transform: translateX(-50%);
  padding: 64px 24px 24px;
  background: url('/assets/images/battle/bg_battle_result.webp') center / 100% 100% no-repeat;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.42));
}

.shop-screen .shop-board__title {
  position: absolute;
  left: 50%;
  top: -58px;
  width: 618px;
  aspect-ratio: 1257 / 314;
  transform: translateX(-50%);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('/assets/images/battle/bg_battle_name_hp.webp') center / 100% 100% no-repeat;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 52px;
  line-height: 0.9;
  color: #f9efda;
  text-shadow: 0 2px 0 rgba(19, 10, 6, 0.72);
}

.shop-screen .shop-board__close {
  position: absolute;
  right: 14px;
  top: 16px;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(96, 24, 26, 0.85);
  border-radius: 10px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 34px;
  line-height: 1;
  color: #fff5ef;
  text-shadow: 0 2px 0 rgba(60, 11, 12, 0.88);
  background: linear-gradient(180deg, #ea7874, #c23f48);
  box-shadow: inset 0 1px 0 rgba(255, 206, 197, 0.72);
}

.shop-screen .shop-board__content {
  height: 100%;
  display: grid;
  grid-template-columns: 312px 1fr;
  gap: 10px;
  padding: 22px 62px 56px;
}

.shop-screen .shop-board__content > * {
  min-width: 0;
  min-height: 0;
}

.shop-screen .shop-nav-panel,
.shop-screen .shop-items-panel {
  position: relative;
  border: 2px solid rgba(184, 144, 92, 0.48);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(52, 29, 17, 0.86), rgba(31, 17, 11, 0.86));
  box-shadow: inset 0 0 0 1px rgba(255, 220, 171, 0.14);
}

.shop-screen .shop-nav-panel {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-screen .shop-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
}

.shop-screen .shop-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.shop-screen .shop-mode-btn,
.shop-screen .shop-nav__category,
.shop-screen .shop-nav__sub {
  border: 1px solid #6a4f35;
  border-radius: 10px;
  color: #f5e8d2;
  background: linear-gradient(180deg, #4a3321, #352416);
}

.shop-screen .shop-mode-btn {
  min-height: 44px;
  padding: 0 8px;
  font-size: 17px;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  line-height: 1;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-screen .shop-mode-btn.is-active,
.shop-screen .shop-nav__category.is-active,
.shop-screen .shop-nav__sub.is-active {
  color: #2a1d0f;
  text-shadow: none;
  background: linear-gradient(180deg, #ddb776, #bf8f45);
  box-shadow: inset 0 1px 0 rgba(255, 226, 171, 0.72);
}

.shop-screen .shop-nav-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-screen .shop-nav__category {
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-size: 17px;
  line-height: 1;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
}

.shop-screen .shop-nav__category.is-collapsible::after {
  content: '>';
  display: inline-block;
  margin-left: auto;
  font-size: 18px;
  color: rgba(250, 239, 219, 0.82);
  transition: transform 0.14s ease;
}

.shop-screen .shop-nav__category.is-collapsible.is-active::after {
  color: rgba(42, 29, 15, 0.9);
}

.shop-screen .shop-nav__category.is-collapsible.is-expanded::after {
  transform: rotate(90deg);
}

.shop-screen .shop-nav__category-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 219, 164, 0.4);
  object-fit: cover;
  background: rgba(17, 10, 6, 0.78);
}

.shop-screen .shop-nav__category-label {
  flex: 1;
}

.shop-screen .shop-nav__sublist {
  margin-top: 6px;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shop-screen .shop-nav__sublist.hidden {
  display: none;
}

.shop-screen .shop-nav__sub {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  text-align: left;
  font-size: 16px;
  line-height: 1;
}

.shop-screen .shop-items-panel {
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.shop-screen .shop-list-meta {
  margin-bottom: 10px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(178, 141, 91, 0.44);
  background: rgba(24, 13, 8, 0.58);
  color: #f0dfbf;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 17px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
}

.shop-screen #shop-list-meta-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.shop-screen .shop-list-controls {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
}

.shop-screen .shop-quality-filter,
.shop-screen .shop-level-filter {
  position: relative;
  flex-shrink: 0;
}

.shop-screen .shop-quality-filter__btn,
.shop-screen .shop-level-filter__btn {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #6a4f35;
  border-radius: 8px;
  color: #f5e8d2;
  font-size: 15px;
  line-height: 1;
  background: linear-gradient(180deg, #4a3321, #352416);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
}

.shop-screen .shop-quality-filter__btn[aria-expanded='true'],
.shop-screen .shop-level-filter__btn[aria-expanded='true'] {
  color: #2a1d0f;
  text-shadow: none;
  background: linear-gradient(180deg, #ddb776, #bf8f45);
  box-shadow: inset 0 1px 0 rgba(255, 226, 171, 0.72);
}

.shop-screen .shop-quality-filter-pop,
.shop-screen .shop-level-filter-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  padding: 10px;
  border: 1px solid rgba(151, 118, 81, 0.72);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(35, 26, 17, 0.98), rgba(24, 19, 14, 0.98));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.52);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 12;
}

.shop-screen .shop-quality-filter-pop {
  width: 248px;
}

.shop-screen .shop-quality-filter-pop.hidden,
.shop-screen .shop-level-filter-pop.hidden {
  display: none;
}

.shop-screen .shop-quality-filter-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shop-screen .shop-quality-filter__option {
  position: relative;
  display: block;
}

.shop-screen .shop-quality-filter__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shop-screen .shop-quality-filter__option span {
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(197, 156, 104, 0.58);
  background: linear-gradient(180deg, rgba(74, 51, 33, 0.95), rgba(53, 36, 22, 0.95));
  color: #f5e8d2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.shop-screen .shop-quality-filter__option span::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(234, 207, 167, 0.65);
  background: #8f7a56;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.28) inset;
  flex-shrink: 0;
}

.shop-screen .shop-quality-filter__option[data-shop-quality='green'] span::before {
  background: #5fa668;
}

.shop-screen .shop-quality-filter__option[data-shop-quality='blue'] span::before {
  background: #4f7fb8;
}

.shop-screen .shop-quality-filter__option[data-shop-quality='violet'] span::before {
  background: #8a63b2;
}

.shop-screen .shop-quality-filter__option input:checked + span {
  color: #2a1d0f;
  background: linear-gradient(180deg, #ddb776, #bf8f45);
  border-color: rgba(234, 200, 149, 0.94);
}

.shop-screen .shop-quality-filter__option input:disabled + span {
  opacity: 0.55;
  cursor: not-allowed;
}

.shop-screen .shop-level-filter-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.shop-screen .shop-level-filter__option {
  position: relative;
  display: block;
}

.shop-screen .shop-level-filter__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shop-screen .shop-level-filter__option span {
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(197, 156, 104, 0.58);
  background: linear-gradient(180deg, rgba(74, 51, 33, 0.95), rgba(53, 36, 22, 0.95));
  color: #f5e8d2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.shop-screen .shop-level-filter__option input:checked + span {
  color: #2a1d0f;
  background: linear-gradient(180deg, #ddb776, #bf8f45);
  border-color: rgba(234, 200, 149, 0.94);
}

.shop-screen .shop-level-filter__option input:disabled + span {
  opacity: 0.55;
  cursor: not-allowed;
}

.shop-screen .shop-quality-filter-reset,
.shop-screen .shop-level-filter-reset {
  min-height: 30px;
  border: 1px solid #6a4f35;
  border-radius: 8px;
  color: #f5e8d2;
  font-size: 15px;
  line-height: 1;
  background: linear-gradient(180deg, #4a3321, #352416);
}

.shop-screen .shop-quality-filter-reset:disabled,
.shop-screen .shop-level-filter-reset:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.shop-screen .shop-quality-filter.is-disabled,
.shop-screen .shop-level-filter.is-disabled {
  opacity: 0.52;
}

.shop-screen .shop-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  gap: 8px;
  align-content: start;
  padding-right: 4px;
}

.shop-screen .shop-empty {
  grid-column: 1 / -1;
  min-height: 76px;
  border: 1px dashed rgba(205, 159, 98, 0.4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(20, 11, 7, 0.35);
}

.shop-screen .shop-item-card {
  border: 1px solid #3e372f;
  border-radius: 12px;
  padding: 8px;
  min-height: 124px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  min-width: 0;
}

.shop-screen .shop-item-card:hover {
  transform: translateY(-1px);
}

.shop-screen .shop-item-card:focus-visible {
  outline: 2px solid rgba(109, 190, 255, 0.9);
  outline-offset: 1px;
}

.shop-screen .shop-item-card--cant-afford {
  filter: saturate(0.78);
}

.shop-screen .shop-item-card__top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.shop-screen .shop-item-card__icon {
  --item-icon-size: 52px;
  flex-shrink: 0;
  border-radius: 9px;
}

.shop-screen .shop-item-card__img {
  width: 100%;
  height: 100%;
}

.shop-screen .shop-item-card__info {
  min-width: 0;
  flex: 1;
}

.shop-screen .shop-item-card__name {
  margin: 0;
  font-size: 22px;
  line-height: 1;
  color: #f7efe1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
  overflow-wrap: anywhere;
}

.shop-screen .shop-item-card__meta,
.shop-screen .shop-item-card__stats {
  font-size: 16px;
  line-height: 1.05;
  color: rgba(245, 227, 194, 0.95);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
}

.shop-screen .shop-item-card__meta {
  margin-top: 4px;
  color: rgba(255, 232, 196, 0.9);
}

.shop-screen .shop-item-card__stats {
  margin-top: 4px;
  color: rgba(240, 223, 191, 0.96);
}

.shop-screen .shop-item-card__requirements {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 1;
}

.shop-screen .shop-item-card__req {
  font-weight: 700;
}

.shop-screen .shop-item-card__req.is-ok {
  color: #7ce99f;
}

.shop-screen .shop-item-card__req.is-fail {
  color: #ff7b7b;
}

.shop-screen .shop-item-card__req-sep {
  color: rgba(231, 211, 179, 0.48);
}

.shop-screen .shop-item-card__set {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1;
  color: #9fcdff;
}

.shop-screen .shop-item-card__bottom {
  margin-top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.shop-screen .shop-item-card__bottom-left {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.shop-screen .shop-item-card__price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(241, 194, 118, 0.64);
  background: linear-gradient(180deg, rgba(92, 66, 30, 0.56), rgba(66, 43, 17, 0.56));
  color: #f5dcaa;
  justify-self: end;
  white-space: nowrap;
  flex-shrink: 0;
}

.shop-screen .shop-item-card__price-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.shop-screen .shop-item-card__price-value {
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.shop-screen .shop-item-card--cant-afford .shop-item-card__price-value {
  color: #ffb1b1;
}

.shop-screen .shop-item-card__qty {
  font-size: 15px;
  line-height: 1;
}

.shop-screen .shop-item-card__equipped {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  color: #d7ecff;
  border: 1px solid rgba(111, 188, 255, 0.72);
  background: rgba(23, 69, 104, 0.55);
}

.shop-screen .shop-fit-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.shop-screen .shop-fit-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shop-screen .shop-fit-toggle span {
  position: relative;
  padding-left: 26px;
  font-size: 16px;
  color: #f0dfbf;
  line-height: 1;
}

.shop-screen .shop-fit-toggle span::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(196, 155, 103, 0.9);
  background: linear-gradient(180deg, rgba(73, 48, 29, 0.92), rgba(48, 31, 19, 0.92));
  transform: translateY(-50%);
  box-shadow: inset 0 0 0 1px rgba(255, 223, 168, 0.08);
}

.shop-screen .shop-fit-toggle span::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  width: 5px;
  height: 9px;
  border-right: 2px solid #2a1d0f;
  border-bottom: 2px solid #2a1d0f;
  transform: translateY(-56%) rotate(45deg);
  opacity: 0;
}

.shop-screen .shop-fit-toggle input:checked + span::before {
  background: linear-gradient(180deg, #ddb776, #bf8f45);
  border-color: rgba(234, 200, 149, 0.94);
}

.shop-screen .shop-fit-toggle input:checked + span::after {
  opacity: 1;
}

.shop-screen .shop-fit-toggle.is-disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.shop-screen .shop-action-overlay {
  position: absolute;
  inset: 0;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 5, 10, 0.72);
  backdrop-filter: blur(2px);
}

.shop-screen .shop-action-overlay.hidden {
  display: none;
}

.shop-screen .shop-action-modal {
  position: relative;
  width: 760px;
  min-height: 286px;
  padding: 52px 68px 46px;
  border-style: solid;
  border-width: 48px 62px 52px;
  border-image: url('/assets/images/battle/bg_battle_result.webp') 116 128 116 128 fill stretch;
  color: #f5e9cc;
  text-shadow: 0 2px 0 rgba(23, 11, 7, 0.84);
}

.shop-screen .shop-action-modal__title {
  margin: 0;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 46px;
  line-height: 0.9;
}

.shop-screen .shop-action-modal__item {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-screen .shop-action-modal__item-icon-host {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
}

.shop-screen .shop-action-modal__item-icon {
  --item-icon-size: 62px;
  border-radius: 10px;
}

.shop-screen .shop-action-modal__item-img {
  width: 100%;
  height: 100%;
}

.shop-screen .shop-action-modal__item-name {
  font-size: 29px;
  line-height: 1;
  color: #fff4dc;
}

.shop-screen .shop-action-modal__item-meta {
  margin-top: 4px;
  font-size: 17px;
  line-height: 1;
  color: #ebd3aa;
}

.shop-screen .shop-action-modal__text {
  margin: 14px 0 0;
  font-size: 22px;
  line-height: 1.05;
  color: #f7e8c5;
}

.shop-screen .shop-action-modal__text:empty {
  display: none;
}

.shop-screen .shop-action-modal__text:empty + .shop-action-modal__actions {
  margin-top: 14px;
}

.shop-screen .shop-action-modal__actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.shop-screen .shop-action-btn {
  min-width: 156px;
  min-height: 42px;
  padding: 7px 14px;
  border-radius: 11px;
  font-family: 'LuckiestGuyRU', 'Unna', serif;
  font-size: 22px;
  line-height: 1;
}

.shop-screen .shop-action-btn--cancel {
  background: linear-gradient(180deg, #63442b, #432d1c);
  color: #f8e9cf;
  border: 1px solid rgba(181, 136, 82, 0.66);
}

.shop-screen .shop-action-btn--buy {
  background: linear-gradient(180deg, #ddb776, #bf8f45);
  color: #2a1d0f;
}

.shop-screen .shop-action-btn--sell {
  background: linear-gradient(180deg, #d79a65, #b36f39);
  color: #2a1609;
}

.shop-screen .shop-toast {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  min-width: 300px;
  max-width: 680px;
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid rgba(212, 166, 108, 0.6);
  text-align: center;
  font-size: 18px;
  line-height: 1.05;
  color: #f6ecd7;
  background: rgba(24, 13, 8, 0.94);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.72);
  z-index: 21;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
}

.shop-screen .shop-toast.is-success {
  border-color: rgba(102, 181, 112, 0.78);
  color: #dff5dc;
}

.shop-screen .shop-toast.is-error {
  border-color: rgba(220, 113, 102, 0.82);
  color: #ffe1da;
}

.shop-screen .shop-nav::-webkit-scrollbar,
.shop-screen .shop-list::-webkit-scrollbar {
  width: 10px;
}

.shop-screen .shop-nav::-webkit-scrollbar-track,
.shop-screen .shop-list::-webkit-scrollbar-track {
  background: rgba(16, 9, 6, 0.55);
  border-radius: 999px;
}

.shop-screen .shop-nav::-webkit-scrollbar-thumb,
.shop-screen .shop-list::-webkit-scrollbar-thumb {
  background: rgba(205, 159, 98, 0.65);
  border-radius: 999px;
}
