/* Wild Shot — интерфейс. Портретная ориентация в приоритете, системные шрифты, без внешних ресурсов. */
:root {
  --bg: #0b1626;
  --bg2: #10213a;
  --panel: rgba(13, 27, 52, 0.8);
  --panel-solid: #14264a;
  --panel-hi: rgba(34, 60, 104, 0.88);
  --line: rgba(150, 195, 255, 0.2);
  --text: #f3f7ff;
  --muted: #9fb2d0;
  --accent: #7ed321;
  --accent2: #ffd54a;
  --khaki: #c9b676;
  --good: #7ed957;
  --bad: #ff5a4d;
  --info: #5fb7ff;
  --radius: 16px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #27456e 0%, #12233f 55%, #08101d 100%);
  color: var(--text); font-family: var(--font); font-size: 16px;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  overscroll-behavior: none; touch-action: none;
}
input, button { font-family: inherit; }
input[type="text"] { -webkit-user-select: text; user-select: text; }

#game-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; z-index: 0;
}
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; touch-action: none; }
#hud > * { touch-action: none; }
#ui { position: fixed; inset: 0; z-index: 20; pointer-events: none; }

/* ---------- Сплэш ---------- */
#splash {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(ellipse at 50% 35%, #34421f 0%, #181d10 60%, #0a0b07 100%);
  transition: opacity .5s ease, visibility .5s;
}
#splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-bar { width: min(260px, 60vw); height: 6px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 8%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 4px; transition: width .35s ease; }
.splash-text { color: var(--muted); font-size: 14px; letter-spacing: .06em; }

/* ---------- Логотип ---------- */
.logo { display: flex; flex-direction: column; align-items: center; line-height: .92; text-transform: uppercase; font-weight: 900; font-style: italic; letter-spacing: .04em; }
.logo-wild {
  font-size: clamp(54px, 17vw, 92px);
  color: #f6ecd2;
  text-shadow: 0 3px 0 #8a5a1a, 0 6px 0 #5a3a10, 0 12px 24px rgba(0,0,0,.55);
  -webkit-text-stroke: 1px rgba(80, 50, 10, .6);
}
.logo-shot {
  font-size: clamp(54px, 17vw, 92px);
  background: linear-gradient(180deg, #ffc060 0%, #ff8a1f 55%, #d95f00 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 0 #6b3300) drop-shadow(0 8px 14px rgba(0,0,0,.55));
  display: inline-flex; align-items: center;
}
.logo-o {
  display: inline-block; position: relative; width: .62em; height: .62em; margin: 0 .03em; border-radius: 50%;
  border: .09em solid #ff9a2e; -webkit-text-fill-color: initial; background: transparent; flex: none;
}
.logo-o::before, .logo-o::after { content: ''; position: absolute; background: #ffd9a0; }
.logo-o::before { left: 50%; top: -.16em; bottom: -.16em; width: .05em; transform: translateX(-50%); }
.logo-o::after { top: 50%; left: -.16em; right: -.16em; height: .05em; transform: translateY(-50%); }
.logo-big .logo-wild, .logo-big .logo-shot { font-size: clamp(48px, 15vw, 88px); }

/* ---------- Экраны ---------- */
.screen {
  position: absolute; inset: 0; pointer-events: auto; display: flex; justify-content: center;
  padding: calc(var(--sat) + 10px) calc(var(--sar) + 14px) calc(var(--sab) + 12px) calc(var(--sal) + 14px);
  background: linear-gradient(180deg, rgba(6, 14, 30, .72) 0%, rgba(6, 14, 30, .6) 45%, rgba(6, 14, 30, .86) 100%);
  animation: screenIn .28s ease both; touch-action: pan-y; overflow: hidden;
}
.screen.solid { background: linear-gradient(180deg, var(--panel-solid), #09111f); }
.screen.clear { background: none; pointer-events: none; align-items: flex-end; }
.screen.clear > * { pointer-events: auto; }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes screenOut { to { opacity: 0; } }
.col { width: 100%; max-width: 540px; display: flex; flex-direction: column; min-height: 0; height: 100%; }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; touch-action: pan-y; min-height: 0; padding: 4px 2px 10px; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.grow { flex: 1; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---------- Шапка ---------- */
.topbar { display: flex; align-items: center; gap: 10px; min-height: 52px; margin-bottom: 8px; }
.topbar h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: .02em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font-size: 22px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; transition: transform .1s, background .15s;
}
.icon-btn:active { transform: scale(.93); background: var(--panel-hi); }
.chips { display: flex; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; height: 38px; border-radius: 19px; background: var(--panel);
  border: 1px solid var(--line); font-weight: 700; font-size: 15px; white-space: nowrap;
}
.chip .ico { font-size: 17px; }
.chip.coin { color: #ffd76a; } .chip.troph { color: #ffb347; }

/* ---------- Кнопки ---------- */
.btn {
  appearance: none; -webkit-appearance: none; border: 1px solid var(--line); border-radius: 14px; min-height: 52px; padding: 0 20px;
  background: var(--panel-hi); color: var(--text); font-size: 17px; font-weight: 700; letter-spacing: .02em; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  transition: transform .1s ease, filter .15s, background .15s; touch-action: manipulation; white-space: nowrap;
}
.btn:active { transform: scale(.97); filter: brightness(1.15); }
.btn.primary { background: linear-gradient(180deg, #ffa13a 0%, #ff7a0a 100%); color: #2b1600; border-color: #ffc27a; box-shadow: 0 4px 0 #a14700, 0 8px 18px rgba(255, 122, 10, .3); text-shadow: 0 1px 0 rgba(255,255,255,.3); }
.btn.primary:active { transform: translateY(3px) scale(.99); box-shadow: 0 1px 0 #a14700; }
.btn.ghost { background: transparent; }
.btn.danger { background: linear-gradient(180deg, #d9453a, #a62b22); border-color: #ff8a80; }
.btn.small { min-height: 44px; font-size: 15px; padding: 0 14px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: auto; filter: grayscale(.6); }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; min-width: 0; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Карточки ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card + .card { margin-top: 10px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 4px 0; color: var(--muted); font-size: 14px; line-height: 1.4; }

.b-forest { background: linear-gradient(135deg, #3e6b2d, #1d3a1a 60%, #6b8a3a); }
.b-savanna { background: linear-gradient(135deg, #d9a441, #8c6a2a 60%, #e6c36a); }
.b-taiga { background: linear-gradient(135deg, #7a4a3a, #2b3a2a 60%, #e08a5a); }
.b-arctic { background: linear-gradient(135deg, #9ec8e8, #4a6a8a 60%, #e6f2fa); }

