/* ==========================================================================
   Gilza — режимы
   ========================================================================== */

/* ---------- Шапка режима ---------- */
.ghead { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding-block: 26px 18px; }
.ghead__icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, color-mix(in oklab, var(--ga) 55%, #fff 0%), color-mix(in oklab, var(--ga) 35%, var(--bg-2)));
  box-shadow: 0 10px 30px -10px var(--ga), inset 0 0 0 1px color-mix(in oklab, var(--ga) 60%, transparent); }
.ghead__icon svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ghead h1 { margin: 0 0 4px; font-size: clamp(26px, 3vw, 38px); }
.ghead p { margin: 0; color: var(--muted); max-width: 70ch; }
.ghead__fair { font-size: 14px; white-space: nowrap; }
.gate { padding: 12px 16px; border-radius: 10px; background: rgba(227,164,71,.08); border: 1px solid rgba(227,164,71,.3); margin-bottom: 16px; }

/* ---------- Поле ставки ---------- */
.betin { display: grid; gap: 8px; }
.betin__field { display: grid; gap: 6px; }
.betin__field span { font-size: 13.5px; color: var(--muted); }
.betin__field input { height: 50px; font: 700 20px var(--f-display); }
.betin__quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.betin__quick button { height: 32px; border-radius: 6px; border: 1px solid var(--line-2); background: rgba(255,255,255,.02); color: var(--text); font: 600 13px var(--f-body); cursor: pointer; }
.betin__quick button:hover { border-color: var(--brass); color: var(--brass-2); }

/* ---------- Выбор предметов ---------- */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; max-height: 470px; overflow: auto; padding-right: 4px; }
.pick { position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px 8px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; text-align: center; color: var(--text);
  background: linear-gradient(0deg, color-mix(in oklab, var(--c) 18%, transparent), transparent 70%), var(--bg-3); border-bottom: 2px solid var(--c); font: inherit; transition: transform .15s, border-color .15s; }
.pick:hover { transform: translateY(-2px); }
.pick.is-on { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass), 0 8px 24px -10px var(--brass); }
.pick.is-on::after { content: "✓"; position: absolute; top: 6px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--brass); color: var(--brass-ink); font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.pick .art { width: 100%; height: 64px; object-fit: contain; }
.pick svg.art { height: 40px; margin: 12px 0; }
.pick__n { font-size: 12.5px; line-height: 1.25; display: grid; }
.pick__n small { color: var(--muted); }
.pick b { color: var(--brass-2); font-size: 13.5px; }
.mini { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px; background: var(--bg-3); border-left: 3px solid var(--c); font-size: 13px; cursor: default; }
.mini[data-rm] { cursor: pointer; }
.mini[data-rm]:hover { background: var(--bg-4); }
.mini .art { width: 64px; height: 34px; object-fit: contain; }
.mini small { color: var(--muted); }
.mini b { color: var(--brass-2); }

/* ---------- Апгрейд ---------- */
.up { display: grid; grid-template-columns: 1fr minmax(280px, 340px) 1fr; gap: 16px; align-items: stretch; }
.up__side { background: var(--bg-2); border-radius: 14px; padding: 18px; display: grid; gap: 12px; align-content: start; }
.up__side h2 { font-size: 16px; margin: 0; }
.up__picked { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.up__sum { margin: 0; color: var(--muted); }
.up__sum b { color: var(--text); font-family: var(--f-display); }
.up__core { display: grid; gap: 14px; justify-items: center; align-content: center; padding: 10px; }
.gauge { position: relative; width: min(300px, 80vw); aspect-ratio: 1; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge__track { fill: none; stroke: var(--bg-3); stroke-width: 16; }
.gauge__arc { fill: none; stroke: #3ddc97; stroke-width: 16; stroke-linecap: round; filter: drop-shadow(0 0 10px rgba(61,220,151,.5)); transition: stroke-dasharray .35s ease; }
.gauge__needle { transform-origin: 100px 100px; transform: rotate(0deg); }
.gauge__needle path { fill: var(--brass-2); filter: drop-shadow(0 0 6px var(--brass)); transform: rotate(90deg); transform-origin: 100px 100px; }
.gauge__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge__label b { font: 800 clamp(30px, 4vw, 44px) var(--f-display); }
.gauge__label span { color: var(--muted); font-size: 13px; }
.up.is-win .gauge__arc { stroke: #3ddc97; animation: winpulse 1.2s 2; }
.up.is-lose .gauge__arc { stroke: var(--bad); filter: drop-shadow(0 0 10px rgba(229,83,75,.6)); }
.up__mults { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.up__mults button { padding: 6px 12px; border-radius: 16px; border: 1px solid var(--line-2); background: none; color: var(--text); font: 700 13px var(--f-display); cursor: pointer; }
.up__mults button:hover { border-color: #3ddc97; color: #3ddc97; }
.up__note { margin: 0; text-align: center; min-height: 1.5em; }
.up__big { display: grid; justify-items: center; gap: 2px; text-align: center; padding: 14px; border-radius: 10px; background: radial-gradient(circle at 50% 40%, color-mix(in oklab, var(--c) 30%, transparent), transparent 70%); }
.up__big .art { width: 100%; height: 150px; object-fit: contain; filter: drop-shadow(0 12px 24px color-mix(in oklab, var(--c) 60%, transparent)); }
.up__big span { color: var(--muted); }
.up__big em { font: 800 22px var(--f-display); font-style: normal; color: var(--brass-2); }
.up-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 1000px) { .up { grid-template-columns: 1fr; } .up__core { order: -1; } .up-lists { grid-template-columns: 1fr; } }

/* ---------- Контракты ---------- */
.ct__paper { position: relative; padding: 24px; border-radius: 14px; display: grid; gap: 16px; justify-items: center;
  background: linear-gradient(135deg, rgba(255,181,71,.08), transparent 40%), repeating-linear-gradient(0deg, transparent 0 27px, rgba(255,255,255,.025) 27px 28px), var(--bg-2);
  border: 1px solid rgba(255,181,71,.18); }
.ct__slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: 100%; max-width: 900px; }
.ct__slot { aspect-ratio: 4 / 3; border-radius: 10px; border: 1px dashed var(--line-2); display: grid; place-items: center; position: relative; transition: transform .2s, border-color .2s;
  background: linear-gradient(0deg, color-mix(in oklab, var(--c) 22%, transparent), transparent 70%); }
.ct__slot span { color: var(--muted); font: 700 18px var(--f-display); opacity: .5; }
.ct__slot.is-on { border-style: solid; border-color: var(--c); animation: pop .25s ease; }
.ct__slot .art { width: 86%; height: 62%; object-fit: contain; }
.ct__slot b { position: absolute; bottom: 4px; font-size: 11.5px; color: var(--brass-2); }
@keyframes pop { 50% { transform: scale(1.06); } }
.ct__stats { display: flex; gap: clamp(16px, 4vw, 48px); margin: 0; text-align: center; flex-wrap: wrap; justify-content: center; }
.ct__stats dt { font-size: 13px; color: var(--muted); }
.ct__stats dd { margin: 2px 0 0; font: 800 20px var(--f-display); }
.ct__top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.ct__top .mini { grid-template-columns: 56px auto auto; }
.ct.is-signing .ct__slot.is-on { animation: suck .9s cubic-bezier(.6,0,.8,.4) forwards; }
@keyframes suck { to { transform: scale(.2) translateY(60px); opacity: 0; } }
.ct__result { display: grid; place-items: center; margin-top: 16px; }
.ct__result .won { width: min(320px, 100%); }
@media (max-width: 700px) { .ct__slots { grid-template-columns: repeat(5, 1fr); gap: 5px; } .ct__slot b { display: none; } }

/* ---------- Краш ---------- */
.crash { display: grid; grid-template-columns: 1fr 340px; gap: 16px; }
.crash__board { background: var(--bg-2); border-radius: 14px; padding: 14px; display: grid; gap: 10px; min-width: 0; }
.crash__hist { display: flex; gap: 6px; overflow: hidden; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.hx { flex: none; padding: 4px 9px; border-radius: 6px; font: 700 12.5px var(--f-display); background: var(--bg-3); cursor: help; }
.hx--bad { color: #ff8f88; } .hx--good { color: #3ddc97; } .hx--top { color: var(--brass-2); background: rgba(227,164,71,.12); }
.crash__stage { position: relative; height: clamp(300px, 48vh, 460px); border-radius: 10px; overflow: hidden;
  background: radial-gradient(80% 70% at 70% 30%, rgba(227,164,71,.08), transparent 60%), repeating-linear-gradient(90deg, transparent 0 59px, rgba(255,255,255,.025) 59px 60px), #0f1319; }
.crash__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.crash__x { position: absolute; left: 50%; top: 38%; translate: -50% -50%; font: 800 clamp(48px, 9vw, 96px) var(--f-display); letter-spacing: -.02em; text-shadow: 0 0 40px rgba(244,196,124,.35); pointer-events: none; transition: color .2s; }
.crash__status { position: absolute; left: 50%; top: 58%; translate: -50% 0; color: var(--muted); font-weight: 600; }
.crash[data-phase="crashed"] .crash__x { color: #ff5d5d; text-shadow: 0 0 40px rgba(255,93,93,.5); animation: shake .35s 1; }
.crash[data-phase="bet"] .crash__x { color: var(--muted); }
.crash__panel { display: grid; gap: 14px; align-content: start; margin: 0; }
.crash__panel form { display: grid; gap: 12px; }
[data-crash-btn][data-mode="cash"] { background: linear-gradient(180deg, #6bf0b3, #2fbf7a); color: #062014; animation: breathe 1s infinite; }
.crash__mine { margin: 0; min-height: 1.4em; font-size: 14px; }
.players { border-top: 1px solid var(--line); padding-top: 10px; }
.players__head { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.players__head b { color: var(--text); } .players__head span:last-child { margin-left: auto; color: var(--brass-2); font-weight: 700; }
.players ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 340px; overflow: auto; }
.players li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 7px 10px; border-radius: 6px; background: var(--bg-3); font-size: 13.5px; }
.players li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.players li em { font-style: normal; color: var(--muted); min-width: 70px; text-align: right; }
.players li.won { background: rgba(61,220,151,.1); } .players li.won em { color: #3ddc97; font-weight: 700; }
.players li.lost { opacity: .55; }
@media (max-width: 1000px) { .crash { grid-template-columns: 1fr; } }

/* ---------- Дабл ---------- */
.dbl { display: grid; gap: 14px; }
.dbl__top { display: grid; grid-template-columns: 1fr minmax(200px, 320px); gap: 16px; align-items: center; }
.dbl__hist { display: flex; gap: 5px; overflow: hidden; }
.dot { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font: 700 12px var(--f-display); font-style: normal; cursor: help; }
.dot--red, .cell--red { background: linear-gradient(180deg, #ff5a52, #c62d26); }
.dot--black, .cell--black { background: linear-gradient(180deg, #3a4452, #1e242d); }
.dot--green, .cell--green { background: linear-gradient(180deg, #3ddc97, #1a9c62); }
.dbl__timer { display: grid; gap: 6px; font-weight: 600; text-align: right; }
.dbl__bar { height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.dbl__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brass), var(--brass-2)); border-radius: 3px; }
.dbl__wheel { position: relative; height: 104px; overflow: hidden; border-radius: 12px; background: #0f1319;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.dbl__strip { position: absolute; top: 10px; left: 0; display: flex; will-change: transform; }
.cell { flex: none; width: 80px; height: 84px; margin-right: 4px; border-radius: 10px; display: grid; place-items: center; font: 800 24px var(--f-display); font-style: normal; color: #fff; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
.dbl__pointer { position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--brass-2); box-shadow: 0 0 16px var(--brass); border-radius: 2px; z-index: 2; }
.dbl__bet { margin: 0; }
.dbl__bet .betin { grid-template-columns: minmax(180px, 280px) 1fr; align-items: end; }
.dbl__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dbl__col { background: var(--bg-2); border-radius: 12px; padding: 12px; display: grid; gap: 8px; align-content: start; transition: box-shadow .3s; }
.dbl__btn { position: relative; height: 64px; border: 0; border-radius: 10px; color: #fff; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 0 18px; font: 800 17px var(--f-display); transition: transform .1s, filter .15s; }
.dbl__btn:hover:not(:disabled) { filter: brightness(1.12); } .dbl__btn:active { transform: scale(.98); }
.dbl__btn b { font-size: 22px; }
.dbl__btn[data-mine]:not([data-mine=""])::after { content: "Ваша ставка: " attr(data-mine); position: absolute; left: 18px; bottom: 5px; font: 600 11px var(--f-body); opacity: .9; }
.dbl__col--red .dbl__btn { background: linear-gradient(180deg, #ff5a52, #c62d26); }
.dbl__col--black .dbl__btn { background: linear-gradient(180deg, #3a4452, #1e242d); border: 1px solid #4a5566; }
.dbl__col--green .dbl__btn { background: linear-gradient(180deg, #3ddc97, #1a9c62); }
.dbl__btn.is-pulse { animation: pop .4s ease; }
.dbl__sum { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }
.dbl__sum b { color: var(--text); }
.dbl__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.dbl__list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; background: var(--bg-3); border-radius: 6px; font-size: 13px; }
.dbl__list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbl[data-phase="spin"] .dbl__btn, .dbl[data-phase="result"] .dbl__btn { opacity: .55; }
.dbl__col.is-win { box-shadow: 0 0 0 2px var(--brass), 0 0 40px -6px var(--brass); }
@media (max-width: 760px) { .dbl__top { grid-template-columns: 1fr; } .dbl__timer { text-align: left; } .dbl__cols { grid-template-columns: 1fr; } .dbl__bet .betin { grid-template-columns: 1fr; } }

/* ---------- Дефьюз и Клатч ---------- */
.solo { display: grid; grid-template-columns: 320px 1fr auto; gap: 16px; align-items: start; }
.solo__panel { display: grid; gap: 14px; margin: 0; }
.solo__panel form { display: grid; gap: 12px; }
.solo__panel input[type=range] { accent-color: var(--brass); height: auto; padding: 0; border: 0; background: none; }
.solo__nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.solo__nums dt { font-size: 12.5px; color: var(--muted); }
.solo__nums dd { margin: 2px 0 0; font: 800 24px var(--f-display); color: #3ddc97; }
.solo__nums div:last-child dd { color: var(--text); font-size: 18px; }
.solo .modes { grid-template-columns: repeat(3, 1fr); }
.modes { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.modes legend { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.modes .method span { display: grid; gap: 1px; padding: 9px 4px; }
.modes .method small { color: var(--muted); font-size: 11.5px; font-weight: 400; }
.solo.is-shake { animation: shake .3s 2; }

.mines { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 16px; background: var(--bg-2); border-radius: 14px; max-width: 560px; width: 100%; justify-self: center; }
.mine { aspect-ratio: 1; border: 0; border-radius: 12px; cursor: pointer; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #2c3542, #1d242e); box-shadow: inset 0 -5px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06); transition: transform .12s, filter .15s; }
.mine:not(:disabled):hover { transform: translateY(-3px); filter: brightness(1.2); }
.mine:disabled { cursor: default; }
.mine span { position: absolute; inset: 22%; border-radius: 50%; }
.mine:not(.is-safe):not(.is-boom):not(.is-bomb) span { inset: 40%; background: rgba(255,255,255,.06); }
.mine.is-safe { background: linear-gradient(180deg, #2a5c48, #1a3a2e); animation: flipin .35s ease; }
.mine.is-safe span { inset: 24%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 2h6l-1 4 4 2-2 6 3 6H5l3-6-2-6 4-2z' fill='none' stroke='%233ddc97' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M9 13l2 2 4-4' fill='none' stroke='%233ddc97' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; border-radius: 0; }
.mine.is-boom { background: radial-gradient(circle, #ff9a3d, #c62d26 60%, #4a0d0a); animation: boom .5s ease; }
.mine.is-boom span, .mine.is-bomb span { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='8' width='16' height='10' rx='2' fill='%23222'/%3E%3Crect x='4' y='8' width='16' height='10' rx='2' fill='none' stroke='%23f0c83c' stroke-width='1.4'/%3E%3Cpath d='M7 11h4M7 14h3' stroke='%23ff5d5d' stroke-width='1.4'/%3E%3Ccircle cx='16' cy='13' r='2' fill='%23ff5d5d'/%3E%3Cpath d='M12 8V5l3-2' fill='none' stroke='%23f0c83c' stroke-width='1.4'/%3E%3C/svg%3E") center/contain no-repeat; border-radius: 0; inset: 18%; }
.mine.is-bomb { opacity: .75; }
.mine.is-dim { opacity: .35; }
@keyframes boom { 0% { transform: scale(1); } 40% { transform: scale(1.25); box-shadow: 0 0 60px #ff9a3d; } 100% { transform: scale(1); } }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 560px; overflow: auto; min-width: 120px; }
.ladder li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 6px; background: var(--bg-2); font-size: 13px; color: var(--muted); }
.ladder li b { color: var(--text); font-family: var(--f-display); }
.ladder li.is-done { background: rgba(61,220,151,.1); } .ladder li.is-done b { color: #3ddc97; }
.ladder li.is-next { outline: 1px solid var(--brass); } .ladder li.is-next b { color: var(--brass-2); }

.tower { display: grid; gap: 10px; padding: 16px; background: var(--bg-2); border-radius: 14px; grid-column: 2 / 4; }
.tw { display: grid; grid-template-columns: 80px 1fr 80px; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; opacity: .55; transition: opacity .2s, background .2s; }
.tw.is-cur { opacity: 1; background: rgba(164,92,255,.1); box-shadow: inset 0 0 0 1px rgba(164,92,255,.5); }
.tw.is-done { opacity: .9; }
.tw__lvl { font-size: 13px; color: var(--muted); }
.tw__x { text-align: right; font: 700 15px var(--f-display); color: var(--brass-2); }
.tw__cells { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.tw__c { height: 64px; border: 0; border-radius: 10px; cursor: pointer; position: relative; background: linear-gradient(180deg, #2c3542, #1d242e); box-shadow: inset 0 -4px 0 rgba(0,0,0,.35); transition: transform .12s, filter .15s; }
.tw__c:not(:disabled):hover { transform: translateY(-3px); filter: brightness(1.25); }
.tw__c:disabled { cursor: default; }
.tw__c span { position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20V8l8-5 8 5v12' fill='none' stroke='%237a8696' stroke-width='1.5'/%3E%3Cpath d='M9 20v-6h6v6' fill='none' stroke='%237a8696' stroke-width='1.5'/%3E%3C/svg%3E") center/30px no-repeat; }
.tw__c.is-safe { background: linear-gradient(180deg, #2a5c48, #1a3a2e); }
.tw__c.is-safe span { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5 9-10' fill='none' stroke='%233ddc97' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.tw__c.is-boom { background: radial-gradient(circle, #ff6b5d, #8a1e18); animation: boom .5s; }
.tw__c.is-boom span, .tw__c.is-enemy span { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4' fill='%23ff5d5d'/%3E%3Cpath d='M4 21c1-5 4-7 8-7s7 2 8 7' fill='%23ff5d5d'/%3E%3C/svg%3E"); }
.tw__c.is-enemy { opacity: .6; }
@media (max-width: 1000px) {
  .solo { grid-template-columns: 1fr; } .tower { grid-column: auto; }
  .ladder { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; max-height: none; }
  .mines { gap: 6px; padding: 10px; }
  .tw { grid-template-columns: 56px 1fr 60px; gap: 8px; }
}

/* ---------- Батлы ---------- */
.bt { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.bt__list { display: grid; gap: 8px; }
.bcard { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--bg-2); text-decoration: none; color: var(--text); border: 1px solid transparent; transition: border-color .15s, transform .15s; }
.bcard:hover { border-color: var(--line-2); transform: translateY(-1px); color: var(--text); }
.bcard.done { opacity: .6; }
.bcard__cases { display: flex; gap: 4px; align-items: center; min-width: 0; overflow: hidden; }
.bcard__cases span { flex: none; width: 54px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in oklab, var(--accent) 40%, transparent), var(--bg-3) 70%); }
.bcard__cases img { width: 92%; height: 80%; object-fit: contain; }
.bcard__cases em { font-style: normal; color: var(--muted); font-size: 13px; padding-left: 4px; }
.bcard__slots { display: flex; align-items: center; gap: 6px; }
.bcard__slots i { font-style: normal; font-size: 11px; color: var(--muted); }
.bslot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--f-display); background: var(--bg-4); border: 2px solid var(--line-2); }
.bslot.is-free { border-style: dashed; color: var(--muted); background: none; }
.bslot.is-bot { background: #2a2f3a; color: #8fa3b8; }
.bslot.is-win { border-color: var(--brass); box-shadow: 0 0 12px var(--brass); }
.bcard__meta { display: grid; text-align: right; }
.bcard__meta b { font: 800 17px var(--f-display); color: var(--brass-2); }
.bcard__meta span { font-size: 12.5px; color: var(--muted); }
.bt__create { margin: 0; display: grid; gap: 12px; position: sticky; top: 80px; }
.bt__create h2 { margin: 0; font-size: 18px; }
.bt__chosen { display: grid; gap: 4px; max-height: 280px; overflow: auto; }
.bpick { display: grid; grid-template-columns: 44px 1fr auto 28px; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 8px; background: var(--bg-3); font-size: 13.5px; border-left: 3px solid var(--accent); }
.bpick img { width: 44px; height: 32px; object-fit: contain; }
.bpick b { color: var(--brass-2); }
.bpick button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line-2); background: none; color: var(--text); cursor: pointer; font-size: 16px; }
.bt__cost { margin: 0; } .bt__cost b { font: 800 20px var(--f-display); color: var(--brass-2); }
.bt__cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 40px; }
.bcase { display: grid; justify-items: center; gap: 2px; padding: 10px 8px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; color: var(--text); font: inherit; text-align: center;
  background: radial-gradient(circle at 50% 30%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%), var(--bg-2); transition: transform .15s, border-color .15s; }
.bcase:hover { transform: translateY(-2px); border-color: var(--accent); }
.bcase.is-pulse { animation: pop .3s; }
.bcase img { width: 100%; height: 70px; object-fit: contain; }
.bcase span { font-weight: 700; font-size: 13.5px; }
.bcase b { color: var(--brass-2); font-size: 13px; }
@media (max-width: 1000px) { .bt { grid-template-columns: 1fr; } .bt__create { position: static; order: -1; } .bcard { grid-template-columns: 1fr; } .bcard__meta { text-align: left; } }

/* Страница батла */
.battle { padding-top: 20px; }
.battle__head { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; margin-bottom: 14px; }
.battle__head h1 { margin: 4px 0; }
.battle__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.battle__cases { display: flex; gap: 6px; overflow-x: auto; padding: 8px; background: var(--bg-2); border-radius: 12px; margin-bottom: 14px; }
.bc { flex: none; width: 70px; height: 54px; border-radius: 8px; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in oklab, var(--accent) 35%, transparent), var(--bg-3) 70%); opacity: .45; transition: opacity .2s, transform .2s; }
.bc img { width: 90%; height: 80%; object-fit: contain; }
.bc.is-cur { opacity: 1; transform: scale(1.1); box-shadow: 0 0 0 2px var(--brass); }
.bc.is-done { opacity: .8; }
.battle__grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.bp__col { background: var(--bg-2); border-radius: 12px; padding: 10px; display: grid; gap: 10px; align-content: start; transition: box-shadow .3s, opacity .3s; }
.bp__col.is-winner { box-shadow: 0 0 0 2px var(--brass), 0 0 50px -10px var(--brass); }
.bp__col.is-loser { opacity: .55; }
.bp__who { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.bp__who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp__reel { height: 116px; background: #0f1319; border-radius: 8px; position: relative; }
.bp__reel::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--brass-2); box-shadow: 0 0 10px var(--brass); }
.bp__reel .ri { width: 120px; }
.bp__drops { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 360px; overflow: auto; }
.bp__drops li { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 6px; background: var(--bg-3); border-left: 3px solid var(--c); font-size: 12.5px; animation: rise .3s; }
.bp__drops .art { width: 56px; height: 30px; object-fit: contain; }
.bp__drops small { color: var(--muted); }
.bp__drops b { color: var(--brass-2); }
.bp__total { text-align: center; font: 800 22px var(--f-display); color: var(--brass-2); min-height: 30px; }
.battle__fair { margin-top: 14px; font-size: 12.5px; word-break: break-all; }
@media (max-width: 760px) { .battle__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bp__reel .ri { width: 96px; } }

/* ---------- Плитки режимов на главной ---------- */
.modes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.mode { position: relative; display: grid; gap: 6px; padding: 18px; min-height: 150px; border-radius: 14px; text-decoration: none; color: var(--text); overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--ga) 35%, transparent), transparent 60%), var(--bg-2); border: 1px solid color-mix(in oklab, var(--ga) 25%, transparent); transition: transform .2s, border-color .2s; }
.mode:hover { transform: translateY(-3px); border-color: var(--ga); color: var(--text); }
.mode svg { width: 40px; height: 40px; fill: none; stroke: var(--ga); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mode b { font: 800 19px var(--f-display); }
.mode span { color: var(--muted); font-size: 13.5px; }
.mode::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px; border-radius: 50%; background: var(--ga); opacity: .12; filter: blur(20px); z-index: -1; }

/* правки после проверки */
.gauge__arc[stroke-dasharray^="0 "] { opacity: 0; }
.solo, .up, .crash, .bt, .dbl { min-width: 0; }
.solo > *, .up > *, .crash > *, .bt > * { min-width: 0; }
.mines { box-sizing: border-box; }
.dbl__sum i { font-style: normal; color: var(--text); font-weight: 600; }
@media (max-width: 760px) {
  .ghead { grid-template-columns: auto 1fr; }
  .ghead__fair { grid-column: 1 / -1; }
  .ghead__icon { width: 52px; height: 52px; }
  .gauge { width: min(260px, 72vw); }
  .ladder { max-width: 100%; }
  .betin__quick button { font-size: 12px; }
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
