/* =====================================================================
   Тема «Охотничий домик»: тёмная кожа, бронзовые рамки, золотые заголовки.
   Грузится последней и перекрывает прежние стили. Каждая картинка из assets/ui/ имеет
   запасной градиент: если файла нет, остаётся цвет/градиент.
   ===================================================================== */
@font-face { font-family: 'Oswald'; font-weight: 500 700; font-display: swap; src: url(../assets/fonts/oswald-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Oswald'; font-weight: 500 700; font-display: swap; src: url(../assets/fonts/oswald-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --panel: rgba(38, 24, 15, .86); --panel-solid: #2a1a10; --panel-hi: rgba(78, 50, 30, .92);
  --line: rgba(201, 150, 80, .38); --text: #f6ecd6; --muted: #c4ae8e; --accent: #e0a33a;
  --bronze: #a9743a; --bronze-hi: #e2b06a; --gold1: #fff0b8; --gold2: #e6b24a; --gold3: #9a6620;
  --leather: linear-gradient(180deg, rgba(58, 38, 24, .55), rgba(22, 13, 8, .72)), url(../assets/ui/tex_panel.webp) center / 220px, #2a1a10;
  --bevel: inset 0 1px 0 rgba(255, 214, 150, .38), inset 0 0 0 1px rgba(0, 0, 0, .45), 0 4px 10px rgba(0, 0, 0, .55);
  /* старые токены base.css (синий/зелёный) -> палитра домика, чтобы всё на токенах совпадало с темой */
  --bg: #1c120b; --bg2: #26160d; --accent2: #e6b24a; --good: #e2b06a; --bad: #d9604a; --info: #e2b06a; --khaki: #c9a96a;
  --brass: linear-gradient(180deg, #f2cf7a 0%, #c8923a 55%, #8f5f22 100%);
  --font-lodge: "Oswald", "Arial Narrow", "Roboto Condensed", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
#ui { font-family: var(--font-lodge); letter-spacing: .01em; }
#ui button, #ui input { font-family: inherit; }

/* фон всех вкладочных экранов */
.screen.tabbed, .screen.tabbed:not(.t-menu) {
  background: linear-gradient(180deg, rgba(14, 8, 4, .62) 0%, rgba(14, 8, 4, .12) 30%, rgba(14, 8, 4, .12) 60%, rgba(14, 8, 4, .7) 100%),
    url(../assets/ui/bg_menu.webp) center / cover no-repeat, radial-gradient(ellipse at 50% 20%, #5d3b22 0%, #261910 52%, #0e0906 100%);
}
.screen.tabbed:not(.t-menu) { background-image: linear-gradient(180deg, rgba(14, 8, 4, .74), rgba(14, 8, 4, .62) 45%, rgba(14, 8, 4, .84)), url(../assets/ui/bg_menu.webp), radial-gradient(ellipse at 50% 20%, #5d3b22 0%, #261910 52%, #0e0906 100%); }
.screen:not(.tabbed):not(.clear):not(.solid) { background: linear-gradient(180deg, rgba(14, 8, 4, .74), rgba(14, 8, 4, .62) 45%, rgba(14, 8, 4, .84)), url(../assets/ui/bg_menu.webp) center / cover no-repeat, radial-gradient(ellipse at 50% 20%, #5d3b22 0%, #261910 52%, #0e0906 100%); }
html, body { background: radial-gradient(ellipse at 50% 30%, #4a2f1a 0%, #1c120b 55%, #0a0604 100%); }
.splash-bar i { background: linear-gradient(90deg, var(--bronze), var(--gold2)); }
.screen.solid { background: linear-gradient(180deg, #2a1a10, #0e0906); }

/* кожаные панели с бронзовой фаской */
.card, .modal, .modal.cmp-modal, .modal.mis-modal, .stat-tile, .pack, .starter, .hh-player, .gb-coins, .gb-gems, .gb-gear, .hm-mode, .mis-btn, .wcard, .pick, .reward, .shot-box,
.dd-panel, .tabs, .wp-item, .tc-reward, .reward-item, .tu-box, .mis-shoplink, .chest.full, .chest.empty, .sheet, .toast {
  background: var(--leather); border: 2px solid var(--bronze); border-radius: 12px; box-shadow: var(--bevel);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.modal, .modal.cmp-modal, .modal.mis-modal { border-radius: 14px; box-shadow: var(--bevel), 0 18px 44px rgba(0, 0, 0, .7); }
.modal-wrap { background: rgba(8, 4, 2, .72); }
.wcard.equipped { border-color: #ffd36a; box-shadow: var(--bevel), 0 0 18px rgba(255, 190, 60, .45); }
.chest.empty { border-style: dashed; border-color: rgba(201, 150, 80, .5); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4); color: var(--muted); }
.chest.full { border-color: var(--cc, var(--bronze)); }
.chest .ch-ico .ui-ico { width: 30px; height: 30px; opacity: .8; }
.chests { background: none; border-top: 0; gap: 8px; padding-top: 4px; padding-bottom: 6px; }
.chest { height: 74px; }

/* заголовки: золотой металл */
.tc-title, .modal h2, .sect, .topbar h1, .tp-title, .cmp-title, .wc-name, .tp-head, .mis-ribbon span {
  font-family: var(--font-lodge); font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: linear-gradient(180deg, var(--gold1) 0%, var(--gold2) 52%, var(--gold3) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  text-shadow: none; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .75));
}
.tc-title { font-size: 28px; line-height: 1.05; }
.modal h2 { font-size: 22px; }
.tp-head { clip-path: none; color: transparent; }
.mis-ribbon::before { background: var(--leather); border: 2px solid var(--bronze); box-shadow: var(--bevel); }
h3.sect { color: transparent; }

/* кнопки: главная — медная, прочие — тёмная кожа */
.btn { background: var(--leather); border: 2px solid var(--bronze); border-radius: 12px; color: var(--text); box-shadow: var(--bevel); font-weight: 600; letter-spacing: .04em; }
.btn.primary, .cta, .st-claim {
  background: linear-gradient(180deg, #ffb86a 0%, #e8741e 42%, #b4480f 100%); color: #fff1cf; border: 2px solid #8a5a26; border-radius: 12px;
  text-shadow: 0 2px 0 rgba(70, 26, 0, .85); font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  box-shadow: inset 0 2px 0 rgba(255, 233, 190, .6), inset 0 -3px 0 rgba(90, 30, 0, .35), 0 3px 0 #4a2a10, 0 7px 14px rgba(0, 0, 0, .5);
}
.btn.primary:active, .cta:active { box-shadow: inset 0 2px 0 rgba(255, 233, 190, .5), 0 1px 0 #4a2a10; }
.btn.danger { background: linear-gradient(180deg, #d9453a, #8f241c); border-color: #8a5a26; }
.cta.locked { background: linear-gradient(180deg, #6a5a4a, #3c3128); border-color: #7a6448; color: #d8c8ae; text-shadow: 0 2px 0 rgba(0, 0, 0, .7); box-shadow: inset 0 2px 0 rgba(255, 233, 190, .25), 0 3px 0 #1e150e; }
.cta { font-size: 24px; min-height: 54px; }
/* «одна медная на экране»: активные вкладки и переключатели — латунь, медь только у главного действия */
.tab.active, .seg button.active, .rtabs .tab.active, .stabs .tab.active { background: var(--brass); color: #2a1608; text-shadow: 0 1px 0 rgba(255, 233, 190, .5); }
.btn.small.primary { background: var(--brass); color: #2a1608; border-color: var(--bronze-hi); text-shadow: 0 1px 0 rgba(255, 233, 190, .5); text-transform: uppercase; box-shadow: inset 0 2px 0 rgba(255, 244, 200, .6), 0 3px 0 #4a2a10; }
.tab, .seg button { color: var(--muted); }
.seg { background: rgba(0, 0, 0, .35); }

/* верхняя панель */
.gbar { background: var(--leather); border-bottom: 2px solid var(--bronze); box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
.t-menu .gbar { background: none; border-bottom: 0; box-shadow: none; padding-bottom: 2px; }
.gb-logo { height: 54px; width: auto; max-width: 46%; object-fit: contain; flex: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); }
.gb-coins { margin-left: auto; height: 38px; color: #fff3cf; border-radius: 10px; }
.gb-gems { height: 38px; border-radius: 10px; color: #bfe6ff; gap: 6px; padding: 0 3px 0 10px; cursor: default; }
.gb-gems:active { transform: none; }
.gb-gear { border-radius: 10px; width: 40px; }
.gb-plus { background: linear-gradient(180deg, #ffb86a, #b4480f); border: 2px solid #8a5a26; box-shadow: inset 0 1px 0 rgba(255, 233, 190, .6); border-radius: 8px; width: 28px; height: 28px; font-size: 20px; }
.ui-ico { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; flex: none; }
.gb-coin-ico, .gb-gem-ico { display: inline-flex; }
.gb-troph { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; padding: 0; color: #ffe08a; font-size: 14px; }
.gb-troph .ui-ico { width: 20px; height: 20px; }
.gb-avatar { border: 2px solid var(--bronze-hi); background: linear-gradient(160deg, #5a3a22, #2a1a10); border-radius: 50%; }

/* главный экран: игрок, рейтинг/друзья, задания */
.home-head { align-items: stretch; gap: 6px; }
.hh-left { flex: 1; flex-direction: row; align-items: stretch; gap: 6px; }
.hh-left > .hh-modes { flex: none; gap: 6px; }
.hh-player { flex: 1; min-width: 0; padding: 3px 8px 3px 4px; }
.hh-player .gb-meta { min-width: 0; }
.hh-player .gb-name { font-size: 14px; }
.hh-player .gb-avatar { width: 36px; height: 36px; font-size: 22px; }
.hh-left, .hh-right { gap: 5px; }
.hm-mode { min-width: 48px; justify-content: center; padding: 3px 4px; border-radius: 10px; }
.hm-ico .ui-ico { width: 26px; height: 26px; }
.hm-lbl { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }
.hh-right { flex-direction: row; gap: 6px; align-items: stretch; }
.mis-btn { width: 48px; border-radius: 10px; justify-content: center; }
.hh-right .cal-chip { height: auto; }
.mis-ico .ui-ico { width: 30px; height: 30px; }
.mis-lbl { font-size: 10.5px; font-weight: 600; }
.starter { border-radius: 10px; padding: 4px 10px; }
.st-txt small { color: var(--muted); } .st-txt b { font-weight: 500; font-size: 12.5px; }
.st-prog { color: #ffe08a; }
.st-claim { border-radius: 8px; font-size: 12px; text-transform: none; }

/* карточки туров */
.tcard {
  border-radius: 16px; border: 3px solid var(--bronze); background-color: #1c120b;
  background-image: linear-gradient(180deg, rgba(12, 7, 3, .9) 0%, rgba(12, 7, 3, .25) 34%, rgba(12, 7, 3, 0) 52%, rgba(12, 7, 3, .6) 74%, rgba(12, 7, 3, .93) 100%), var(--tb, none);
  background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5), 0 8px 22px rgba(0, 0, 0, .55);
}
.tcard.on { border-color: var(--bronze-hi); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5), 0 8px 26px rgba(0, 0, 0, .6), 0 0 14px rgba(226, 176, 106, .35); }
.tcard[data-tour="t1"] { --tb: url(../assets/ui/tour_t1.webp); } .tcard[data-tour="t2"] { --tb: url(../assets/ui/tour_t2.webp); }
.tcard[data-tour="t3"] { --tb: url(../assets/ui/tour_t3.webp); } .tcard[data-tour="t4"] { --tb: url(../assets/ui/tour_t4.webp); }
.tcard[data-tour="t5"] { --tb: url(../assets/ui/tour_t5.webp); } .tcard[data-tour="t6"] { --tb: url(../assets/ui/tour_t6.webp); }
.tcard[data-tour="t7"] { --tb: url(../assets/ui/tour_t7.webp); } .tcard[data-tour="t8"] { --tb: url(../assets/ui/tour_t8.webp); }
.tc-head, .tc-foot { background: none; }
.tc-sub { color: #e6d3b0; font-size: 12.5px; text-shadow: 0 1px 2px #000; }
.tcard .ribbon { margin: 6px auto 4px; width: 46%; min-width: 96px; height: 28px; }
.ribbon::before { inset: 0; clip-path: none; border-radius: 14px; background: var(--leather); border: 2px solid var(--bronze); box-shadow: var(--bevel); }
.tcard .ribbon span { font-weight: 700; font-size: 17px; color: #ffe3a0; text-shadow: 0 2px 0 #000; }
.tcard.locked .ribbon::before { background: linear-gradient(180deg, #4a4038, #26201b); box-shadow: var(--bevel); }
.tc-rules { background: rgba(14, 8, 4, .72); border: 2px solid var(--bronze); border-radius: 8px; margin: 0 8px; padding: 5px 8px; }
.tr-side small { color: #e6d3b0; font-size: 10px; font-weight: 500; }
.tr-side b { font-size: 15px; }
.tr-bar { height: 20px; border-radius: 10px; background: rgba(0, 0, 0, .6); border: 1px solid var(--bronze); }
.tr-bar i { background: linear-gradient(180deg, #ffd27a, #c8761a); }
.tc-chip { background: rgba(14, 8, 4, .78); font-weight: 600; }
.tc-lock .ui-ico { width: 64px; height: 64px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .7)); }
.tc-reward { border-radius: 8px; background: none; border: 0; box-shadow: none; }
.tc-reward small { color: #e6d3b0; font-weight: 500; font-size: 13px; letter-spacing: .1em; }
.tc-reward b { font-size: 24px; font-weight: 700; color: #fff3cf; }
.tc-fee { color: #e6d3b0; font-weight: 500; font-size: 12px; text-shadow: 0 1px 2px #000; }
.tc-info { border-color: var(--bronze-hi); color: #ffe3a0; background: var(--leather); }
.car-arrow { border: 2px solid var(--bronze); background: var(--leather); color: #ffe3a0; border-radius: 12px; box-shadow: var(--bevel); }

/* режимы: фото-карточки с цветной рамкой */
.hh-cards { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 calc(var(--sar) + 12px) 0 calc(var(--sal) + 12px); }
.hm-card {
  --mc: #5bd04a; position: relative; height: 62px; padding: 0 4px 5px; display: flex; align-items: flex-end; justify-content: center; border-radius: 10px; border: 2px solid var(--mc); cursor: pointer; touch-action: manipulation;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, .78) 100%), var(--mb, none) center / cover no-repeat, #1f2b1c; box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 4px 10px rgba(0, 0, 0, .5); overflow: hidden;
}
.hm-card:active { transform: scale(.96); }
.hm-card.m-train { --mc: #5bd04a; --mb: url(../assets/ui/mode_training.webp); background-color: #1d3a1a; }
.hm-card.m-hunt { --mc: #ffb02e; --mb: url(../assets/ui/mode_hunt.webp); background-color: #4a3010; }
.hm-card.m-pvp { --mc: #3a8dff; --mb: url(../assets/ui/mode_pvp.webp); background-color: #14284a; }
.hm-clbl { font-size: 17px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .03em; text-shadow: 0 2px 3px #000, 0 0 6px rgba(0, 0, 0, .8); white-space: nowrap; }

/* нижняя панель */
.tabbar { background: linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .45)), url(../assets/ui/tex_panel.webp) center / 220px, linear-gradient(180deg, #4a2f1a, #20130a); border-top: 3px solid var(--bronze); box-shadow: 0 -6px 16px rgba(0, 0, 0, .55), inset 0 2px 0 rgba(255, 214, 150, .25); }
.tb { color: #cdb592; border-left: 2px solid rgba(169, 116, 58, .45); }
.tb:first-child { border-left: 0; }
.tb.center, .tb.center + .tb { border-left-color: transparent; }
.tb-img { width: 34px; height: 34px; object-fit: contain; display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); }
.tb:not(.active):not(.center) .tb-lbl, .tb-lbl { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.tb.active { color: #ffd88a; }
.tb.active:not(.center)::before { background: var(--bronze-hi); box-shadow: 0 0 10px rgba(226, 176, 106, .8); }
.tb.center .tb-ico { width: 66px; height: 66px; margin-top: -26px; background: radial-gradient(circle at 35% 25%, #6a4426, #26160b 75%); border: 4px solid var(--bronze-hi); box-shadow: 0 0 0 3px #1c110a, 0 5px 14px rgba(0, 0, 0, .6), inset 0 3px 0 rgba(255, 214, 150, .35); }
.tb.center .tb-img { width: 46px; height: 46px; }
.tb.center .tb-lbl { color: #ffd88a; }
.tb.center:not(.active) .tb-ico { filter: none; }
.tb-dot { box-shadow: 0 0 0 2px #26160b; }

/* арсенал */
.rtabs .tab.active, .rtabs .tab[class*="r-"].active, .rtabs .tab.tab-owned.active { background: var(--brass); color: #2a1608; box-shadow: inset 0 2px 0 rgba(255, 244, 200, .5), 0 0 10px rgba(224, 163, 58, .4); }
.wc-info { background: linear-gradient(180deg, #ffb86a, #b4480f); border: 2px solid #8a5a26; color: #fff1cf; text-shadow: 0 1px 0 rgba(70, 26, 0, .85); box-shadow: inset 0 2px 0 rgba(255, 233, 190, .55), 0 3px 0 #4a2a10; font-weight: 700; font-size: 13px; text-transform: uppercase; }
.wc-art { border-color: var(--bronze); }

/* прочее: поля, шкалы, меню */
.pf-name, .fr-input, input[type="text"] { background: rgba(0, 0, 0, .4); border-color: var(--bronze); color: var(--text); }
.bar i { background: linear-gradient(90deg, #c8761a, #ffd27a); }
.ws-bar i, .wc-cb.ready i { background: linear-gradient(180deg, #ffd27a, #c8761a); }
.dd-item:active { background: rgba(224, 163, 58, .22); }
.dd-item + .dd-item { border-top-color: rgba(201, 150, 80, .2); }
.toast, .toast.good, .toast.bad { border-color: var(--bronze-hi); }
.pack b, .reward-item b { color: #ffe08a; }

@media (max-height: 700px) and (orientation: portrait) {
  .gb-logo { height: 44px; } .hm-card { height: 52px; } .chest { height: 58px; } .tc-title { font-size: 24px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .gb-logo { height: 36px; } .hm-card { height: 44px; } .tb.center .tb-ico { width: 50px; height: 50px; margin-top: -16px; } .tb-img { width: 26px; height: 26px; } .tb.center .tb-img { width: 34px; height: 34px; }
}
.tp-band { background: linear-gradient(180deg, rgba(30, 18, 10, .9), rgba(14, 8, 4, .94)); border-color: var(--bronze); }
.tp-over { background: rgba(8, 4, 2, .82); }
.tp-pic { border-color: var(--bronze); }

/* Фото самого редкого зверя тура на карточке */
.tc-pet { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%) scaleX(-1); width: min(86%, 300px); max-height: 82%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .65)); pointer-events: none; z-index: 0; }
.tc-hero .tc-animals { z-index: 1; }

/* узкие телефоны: логотип, монеты (+), кристаллы (+) и меню в одну строку */
@media (max-width: 430px) {
  .gb-logo { flex: 0 1 auto; min-width: 0; height: 42px; max-width: 30%; }
  .gb-coins, .gb-gems { padding: 0 2px 0 6px; gap: 4px; font-size: 14px; height: 34px; }
  .gb-coins .ui-ico, .gb-gems .ui-ico { width: 20px; height: 20px; }
  .gb-plus { width: 24px; height: 24px; font-size: 17px; border-radius: 7px; }
  .gb-gear { width: 36px; height: 34px; }
}
