/* ---------- Оружейная ---------- */
.tabs { display: flex; gap: 6px; background: var(--panel); padding: 4px; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 10px; }
.tab { flex: 1; min-height: 44px; border-radius: 10px; border: none; background: transparent; color: var(--muted); font-weight: 800; font-size: 15px; cursor: pointer; transition: background .2s, color .2s; }
.tab.active { background: linear-gradient(180deg, #ffa13a, #ff7a0a); color: #2b1600; }
.weapon-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.gun-ico { width: 74px; height: 34px; flex: none; }
.gun-ico .gun-img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.weapon-head .t { flex: 1; min-width: 0; }
.weapon-head h3 { margin: 0; font-size: 17px; } .weapon-head .lvl { font-size: 12px; color: var(--accent2); font-weight: 700; }
.tier { font-size: 12px; color: var(--khaki); }
.stat { display: grid; grid-template-columns: 122px 1fr 50px; align-items: center; gap: 8px; margin: 5px 0; font-size: 13px; }
.stat .nm { color: var(--muted); }
.bar { height: 8px; background: rgba(255,255,255,.08); border-radius: 5px; overflow: hidden; position: relative; }
.bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--khaki), var(--accent2)); transition: width .4s ease; }
.bar b { position: absolute; top: 0; bottom: 0; background: rgba(126, 217, 87, .9); border-radius: 0 5px 5px 0; }
.stat .val { text-align: right; font-weight: 700; font-size: 12px; }
.ammo-card { display: flex; align-items: center; gap: 12px; }
.ammo-card .ai { font-size: 28px; width: 40px; text-align: center; }
.ammo-card .t { flex: 1; min-width: 0; } .ammo-card .t b { display: block; font-size: 15px; } .ammo-card .t span { font-size: 12px; color: var(--muted); }
.ammo-card.sel { border-color: var(--accent); }
.ammo-card .btns { display: flex; flex-direction: column; gap: 6px; }

/* ---------- Настройки ---------- */
.row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; min-height: 52px; }
.row + .row { border-top: 1px solid var(--line); }
.row .lbl { flex: 1; font-weight: 700; font-size: 16px; } .row .lbl small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.switch { position: relative; width: 56px; height: 32px; flex: none; border-radius: 16px; background: rgba(255,255,255,.14); border: none; cursor: pointer; transition: background .2s; padding: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--accent); } .switch.on::after { transform: translateX(24px); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 48%; height: 36px; background: transparent; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--accent); border: 3px solid #fff3dc; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); }
input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); border: 3px solid #fff3dc; }
.seg { display: flex; background: rgba(255,255,255,.08); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { border: none; background: transparent; color: var(--muted); font-weight: 800; min-height: 40px; padding: 0 14px; border-radius: 9px; font-size: 14px; cursor: pointer; }
.seg button.active { background: var(--accent); color: #2b1600; }

/* ---------- Статистика / справка ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.stat-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; }
.stat-tile b { display: block; font-size: 22px; color: var(--accent2); } .stat-tile span { font-size: 11px; color: var(--muted); }
.zone-row { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; font-size: 14px; }
.zone-row .dot { width: 12px; height: 12px; border-radius: 50%; }
.zone-row .pts { font-weight: 800; color: var(--accent2); }
.zone-row .cnt { color: var(--muted); min-width: 28px; text-align: right; }

/* ---------- Поток матча ---------- */
.search { align-items: center; justify-content: center; text-align: center; }
.radar { position: relative; width: 190px; height: 190px; margin: 10px auto 22px; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ping 2s ease-out infinite; }
.radar i:nth-child(2) { animation-delay: .65s; } .radar i:nth-child(3) { animation-delay: 1.3s; }
.radar .core { position: absolute; inset: 62px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffb347, #d96000); display: flex; align-items: center; justify-content: center; font-size: 36px; box-shadow: 0 0 30px rgba(255,138,31,.6); }
@keyframes ping { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1.1); opacity: 0; } }
.search h2 { margin: 0 0 6px; font-size: 22px; } .search .flick { height: 28px; color: var(--accent2); font-weight: 700; }
.vs { align-items: center; justify-content: center; }
.vs .vs-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; }
.vs .player { flex: 1; text-align: center; animation: slideL .5s cubic-bezier(.2,.9,.3,1.2) both; min-width: 0; }
.vs .player.r { animation-name: slideR; }
.vs .big-av { width: clamp(84px, 24vw, 110px); height: clamp(84px, 24vw, 110px); font-size: clamp(42px, 12vw, 56px); margin: 0 auto 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, #6a7b45, #2c3519); border: 3px solid var(--khaki); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.vs .player.r .big-av { border-color: var(--accent); background: radial-gradient(circle at 35% 30%, #8a5a3a, #3b2012); }
.vs .nm { font-weight: 900; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs .tr { color: var(--accent2); font-weight: 700; font-size: 14px; margin-top: 2px; }
.vs-badge { font-size: 46px; font-weight: 900; font-style: italic; color: var(--accent); text-shadow: 0 3px 0 #6b3300, 0 0 24px rgba(255,138,31,.6); animation: pop .5s .35s cubic-bezier(.2,2,.4,1) both; }
@keyframes slideL { from { transform: translateX(-80px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideR { from { transform: translateX(80px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.stake { margin-top: 26px; display: flex; gap: 10px; justify-content: center; }

/* Нижняя «шторка» с результатом раунда поверх 3D */
.sheet {
  width: 100%; max-width: 540px; margin: 0 auto; background: linear-gradient(180deg, rgba(20,17,11,.9), rgba(12,10,6,.96)); border: 1px solid var(--line); border-radius: 22px 22px 14px 14px;
  padding: 14px 14px 12px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: sheetIn .35s cubic-bezier(.2,.9,.3,1.1) both; max-height: 86%; overflow-y: auto; touch-action: pan-y;
}
@keyframes sheetIn { from { transform: translateY(60%); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h2 { margin: 0 0 8px; font-size: 18px; text-align: center; letter-spacing: .03em; }
.score-head { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
.score-head .side { text-align: center; flex: 1; min-width: 0; }
.score-head .side .who { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-head .side .pts { font-size: 40px; font-weight: 900; line-height: 1; transition: transform .3s; }
.score-head .side.lead .pts { color: var(--good); }
.score-head .sep { font-size: 22px; color: var(--muted); }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shot-box { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-width: 0; }
.shot-box.single { grid-column: 1 / -1; }
.shot-box .who { font-size: 12px; color: var(--muted); font-weight: 700; }
.shot-box .zone { font-size: 18px; font-weight: 900; margin: 2px 0; display: flex; align-items: center; gap: 6px; }
.shot-box .zone .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.shot-box .tot { font-size: 26px; font-weight: 900; color: var(--accent2); }
.shot-box .parts { font-size: 12px; color: var(--muted); line-height: 1.5; }
.shot-box .parts div { display: flex; justify-content: space-between; gap: 6px; }
.shot-box.reveal { animation: pop .4s cubic-bezier(.2,1.6,.4,1) both; }
.shot-box.hidden-score { text-align: center; padding: 18px 10px; }
.round-pips { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; }
.round-pips i { width: 26px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); }
.round-pips i.done { background: var(--accent); } .round-pips i.cur { background: var(--accent2); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.species-tag { text-align: center; color: var(--khaki); font-size: 13px; margin-bottom: 6px; }

.hand { align-items: center; justify-content: center; text-align: center; background: linear-gradient(180deg, var(--panel-solid), #070d18); }
.hand .big { font-size: 64px; margin-bottom: 8px; animation: sway 2s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(10deg) translateY(-6px); } }
.hand h2 { font-size: 26px; margin: 6px 0; } .hand p { color: var(--muted); margin: 6px 0 26px; }
.hand .pname { color: var(--accent2); font-size: 34px; font-weight: 900; margin: 0 0 6px; }

/* Итоговый экран */
.result-banner { text-align: center; padding: 6px 0 4px; animation: pop .5s cubic-bezier(.2,1.5,.4,1) both; }
.result-banner h1 { margin: 0; font-size: 44px; font-weight: 900; font-style: italic; letter-spacing: .03em; }
.result-banner.win h1 { color: var(--good); text-shadow: 0 3px 0 #2b5a14, 0 0 28px rgba(126,217,87,.5); }
.result-banner.lose h1 { color: var(--bad); text-shadow: 0 3px 0 #5a1a14; }
.result-banner.draw h1 { color: var(--accent2); text-shadow: 0 3px 0 #6b3300; }
.rewards { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
.reward { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 18px; text-align: center; min-width: 110px; }
.reward b { display: block; font-size: 24px; } .reward span { font-size: 12px; color: var(--muted); }
.reward.plus b { color: var(--good); } .reward.minus b { color: var(--bad); }
table.rt { width: 100%; border-collapse: collapse; font-size: 13px; }
table.rt th { color: var(--muted); font-weight: 600; text-align: left; padding: 4px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
table.rt td { padding: 7px 4px; border-top: 1px solid var(--line); }
table.rt td.n { font-weight: 800; text-align: right; color: var(--accent2); white-space: nowrap; }
table.rt td.w { color: var(--good); }
.best { display: flex; align-items: center; gap: 12px; }
.best .ico { font-size: 32px; } .best b { font-size: 17px; display: block; } .best span { font-size: 13px; color: var(--muted); }

/* PvP настройка */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.field input[type="text"] { height: 52px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.07); color: var(--text); font-size: 18px; font-weight: 700; padding: 0 14px; outline: none; }
.field input[type="text"]:focus { border-color: var(--accent); }
.map-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.map-chip { min-height: 54px; border-radius: 12px; border: 2px solid transparent; color: #fff; font-weight: 800; font-size: 14px; cursor: pointer; text-shadow: 0 1px 4px rgba(0,0,0,.8); padding: 6px; position: relative; }
.map-chip.active { border-color: var(--accent2); box-shadow: 0 0 16px rgba(255,138,31,.4); }
.map-chip small { display: block; font-weight: 500; opacity: .85; font-size: 11px; }
.map-chip.rand { background: linear-gradient(135deg, #3a3a3a, #6a6a6a); grid-column: 1 / -1; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick { text-align: left; background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 10px; color: var(--text); cursor: pointer; min-height: 48px; }
.pick.active { border-color: var(--accent); box-shadow: 0 0 14px rgba(255,138,31,.25); }
.pick b { display: block; font-size: 15px; } .pick span { font-size: 11px; color: var(--muted); }
.step-dots { display: flex; justify-content: center; gap: 8px; margin: 4px 0 10px; }
.step-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.2); } .step-dots i.on { background: var(--accent); }

/* ---------- Пауза во время раунда ---------- */
#pause-btn {
  position: fixed; z-index: 30; top: calc(env(safe-area-inset-top, 0px) + 44px); left: calc(env(safe-area-inset-left, 0px) + 12px); width: 44px; height: 44px; border-radius: 50%; padding: 0;
  background: rgba(10, 8, 4, .55); border: 1px solid rgba(255,255,255,.25); color: #fff; font-size: 18px; display: none; align-items: center; justify-content: center; cursor: pointer; touch-action: manipulation;
}
#pause-btn.show { display: flex; pointer-events: auto; }

/* ---------- Модалка / тосты ---------- */
.modal-wrap { position: absolute; inset: 0; z-index: 50; pointer-events: auto; background: rgba(0,0,0,.62); display: flex; align-items: center; justify-content: center; padding: 20px; animation: screenIn .2s ease both; }
.modal { width: 100%; max-width: 400px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.modal h2 { margin: 0 0 8px; font-size: 20px; } .modal p { margin: 0 0 16px; color: var(--muted); line-height: 1.45; font-size: 15px; }
#toasts { position: fixed; z-index: 60; left: 0; right: 0; top: calc(var(--sat) + 12px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: rgba(30, 24, 14, .95); border: 1px solid var(--accent); color: var(--text); padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: 15px; max-width: 90vw; animation: toastIn .25s ease both; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.toast.bad { border-color: var(--bad); } .toast.good { border-color: var(--good); }
.toast.out { animation: screenOut .3s ease both; }
@keyframes toastIn { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Адаптивность ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  .screen { padding-top: calc(var(--sat) + 6px); padding-bottom: calc(var(--sab) + 6px); }
  .logo-wild, .logo-shot, .logo-big .logo-wild, .logo-big .logo-shot { font-size: 40px; }
  .col { max-width: 760px; }
  .radar { width: 120px; height: 120px; margin: 0 auto 10px; } .radar .core { inset: 38px; font-size: 24px; }
  .result-banner h1 { font-size: 32px; }
  .sheet { max-height: 92%; } .shot-box .parts { display: none; }
  .hand .big { font-size: 40px; } .hand p { margin-bottom: 14px; }
  .topbar { min-height: 46px; margin-bottom: 4px; }
}
@media (min-width: 700px) and (min-height: 600px) {
  .screen { padding-top: 24px; }
}
@media (max-height: 640px) and (orientation: portrait) {
  .logo-wild, .logo-shot { font-size: 46px !important; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* ---- Редкость оружия ---- */
.r-common { --rc: #9bb59a; --rc2: #5f7a5e; }
.r-rare { --rc: #4da3ff; --rc2: #1f63b8; }
.r-epic { --rc: #b672ff; --rc2: #7a35c4; }
.r-legendary { --rc: #ffb02e; --rc2: #d97a00; }
.rtabs { gap: 4px; padding: 4px; }
.rtabs .tab { padding: 0 2px; font-size: 11.5px; min-height: 46px; line-height: 1.15; display: flex; flex-direction: column; align-items: center; justify-content: center; letter-spacing: -.1px; min-width: 0; }
.rtabs .tab small { display: block; font-size: 10px; font-weight: 700; opacity: .75; }
.rtabs .tab[class*="r-"] { color: var(--rc); box-shadow: inset 0 -2px 0 var(--rc2); }
.rtabs .tab[class*="r-"].active { background: linear-gradient(180deg, var(--rc), var(--rc2)); color: #101418; box-shadow: 0 0 12px color-mix(in srgb, var(--rc) 45%, transparent); }
.rbadge { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; color: #101418; background: var(--rc); }
.rbadge.r-common { --rc: #9bb59a; } .rbadge.r-rare { --rc: #4da3ff; } .rbadge.r-epic { --rc: #b672ff; } .rbadge.r-legendary { --rc: #ffb02e; }
.wdesc { font-size: 12px; color: var(--muted); margin: -4px 0 8px; }
.stat.focus .nm { color: var(--rc, var(--accent2)); font-weight: 800; }
.stat.focus .val { color: var(--rc, var(--accent2)); }
.stat.focus .bar i { background: linear-gradient(90deg, var(--rc2, var(--khaki)), var(--rc, var(--accent2))); }
.pick.r-common, .pick.r-rare, .pick.r-epic, .pick.r-legendary { border-color: color-mix(in srgb, var(--rc) 45%, var(--line)); }
.pick[class*="r-"].active { border-color: var(--rc); box-shadow: 0 0 14px color-mix(in srgb, var(--rc) 40%, transparent); }

.stat .nm { white-space: nowrap; font-size: 12.5px; }

