/* ===== Монетка (страница #coinflip) ===== */
.cf { display: none; --ease-out: cubic-bezier(0.230, 1, 0.320, 1); }
body.is-cf .cf { display: block; animation: cview-in 0.400s var(--ease-out); }
body.is-cf .promo, body.is-cf .cases, body.is-cf .cview, body.is-cf .inv, body.is-cf .dep, body.is-cf .prof,
body.is-cf .upg, body.is-cf .crash, body.is-cf .mines, body.is-cf .ctr, body.is-cf .pk { display: none; }
.cf .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cf__wrap { max-width: 560px; margin: 0 auto; border-radius: 24px; overflow: hidden; background: #0b1030; box-shadow: inset 0 0 0 1px rgb(170 180 255 / 0.180), 0 22px 44px -22px #000; }
.cf__barico { width: 32px; height: 32px; transform: none; filter: drop-shadow(0 0 8px rgb(255 200 80 / 0.500)); }
#cf-sound .is-off { display: none; }
#cf-sound[aria-pressed="false"] .is-on { display: none; }
#cf-sound[aria-pressed="false"] .is-off { display: block; }
#cf-sound[aria-pressed="false"] { color: #8a93ad; }

/* сцена: монета в луче света */
.cf__scene { position: relative; padding-bottom: 18px;
  background: radial-gradient(60% 45% at 50% 52%, rgb(255 210 100 / 0.180), transparent 70%),
    radial-gradient(90% 60% at 50% 0%, rgb(47 140 255 / 0.180), transparent 70%),
    linear-gradient(180deg, #131a3a, #0b1030); }
.cf__scene::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.300;
  background: linear-gradient(rgb(255 255 255 / 0.040) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, rgb(255 255 255 / 0.040) 1px, transparent 1px) 0 0 / 22px 22px;
  mask-image: radial-gradient(60% 55% at 50% 55%, #000, transparent); }
.cf__head { position: relative; padding: 12px 12px 0; }
.cf__logo { height: 40px; min-width: 0; max-width: 44%; object-fit: contain; object-position: left center; }
@media (min-width: 560px) { .cf__logo { height: 48px; max-width: none; } }
.cf__stage { position: relative; display: grid; place-items: center; height: clamp(250px, 72vw, 340px); perspective: 900px; }
.cf__coin { position: relative; width: clamp(170px, 52vw, 240px); aspect-ratio: 1; transform-style: preserve-3d; transform: rotateY(0deg); }
.cf__face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 14px 22px rgb(0 0 0 / 0.550)); }
.cf__face--tails { transform: rotateY(180deg); }
.cf__shadow { position: absolute; left: 50%; bottom: 8%; width: 46%; height: 16px; border-radius: 50%; transform: translateX(-50%); background: radial-gradient(closest-side, rgb(0 0 0 / 0.550), transparent); }
.cf[data-state="flip"] .cf__shadow { animation: cf-shadow var(--dur, 1.600s) ease-in-out; }
@keyframes cf-shadow { 50% { transform: translateX(-50%) scale(0.500); opacity: 0.400; } }
.cf__res { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 9px 18px; border-radius: 14px; text-align: center; white-space: nowrap;
  font: 900 18px/1.150 var(--font-title); background: rgb(8 12 28 / 0.880); animation: cf-res 0.400s var(--ease-out); }
.cf__res:empty { display: none; }
.cf__res small { display: block; font: 800 12px/1.200 var(--font-title); color: #aab6d6; }
.cf__res.is-win { color: #6dffb0; box-shadow: inset 0 0 0 2px #3ddc8a, 0 0 24px -6px #13b36f; }
.cf__res.is-lose { color: #ff8a9a; box-shadow: inset 0 0 0 2px #ff5068; }
@keyframes cf-res { from { transform: translateX(-50%) scale(0.700); opacity: 0; } }

/* панель: ставка и две кнопки */
.cf__panel { display: grid; gap: 10px; padding: 14px; background: linear-gradient(180deg, #151b35, #0d1124); border-top: 1px solid rgb(255 255 255 / 0.080); }
.cf__amt { height: 56px; gap: 6px; }
.cf__amt .cbal__coin { flex: 0 0 auto; width: 22px; height: 24px; font-size: 11px; }
.cf__amt input { text-align: center; font-size: 20px; }
.cf__quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cf__sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cf__side { display: flex; align-items: center; justify-content: center; gap: 10px; height: 64px; border: 0; border-radius: 17px; cursor: pointer; transition: transform 0.150s, filter 0.200s; }
.cf__side img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 3px 4px #0007); }
.cf__side span { display: grid; gap: 3px; text-align: left; }
.cf__side b { font: 900 20px/1 var(--font-title); }
.cf__side small { font: 800 12px/1 var(--font-title); opacity: 0.800; }
.cf__side--heads { color: #3a2400; background: linear-gradient(180deg, #ffe08a, #e6a400); box-shadow: inset 0 1px 0 #ffffff99, inset 0 -5px 0 #0002, 0 10px 22px -10px #e6a400; }
.cf__side--tails { color: #0b1a44; background: linear-gradient(180deg, #d9f1ff, #7cb8f0); box-shadow: inset 0 1px 0 #ffffffb0, inset 0 -5px 0 #0002, 0 10px 22px -10px #5c9ee0; }
.cf__side:hover { filter: brightness(1.060); }
.cf__side:active { transform: scale(0.970); }
.cf__side:disabled { cursor: default; filter: saturate(0.400) brightness(0.700); }
.cf__side.is-picked { outline: 3px solid #fff; outline-offset: 2px; }
.cf__msg { margin: 0; font: 700 13px/1.300 var(--font-title); color: #ff8a8a; text-align: center; }
.cf__msg:empty { display: none; }
.cf__msg a { color: #8cc8ff; }

/* мои броски */
.cf__list { padding: 14px; background: #0b1030; border-top: 1px solid rgb(255 255 255 / 0.080); }
.cf__list h2 { margin: 2px 0 12px; font: 900 20px/1 var(--font-title); }
.cf__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.cf__tabs button { height: 42px; border: 0; border-radius: 13px; cursor: pointer; font: 800 15px/1 var(--font-title); color: #9aa6c6; background: rgb(255 255 255 / 0.060); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.100); }
.cf__tabs button.is-on { color: #fff; background: linear-gradient(180deg, #4aa3ff, #2f6dff); box-shadow: inset 0 1px 0 #ffffff59; }
.cf__thead, .cfrow { display: grid; grid-template-columns: minmax(0, 1.300fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 8px; }
.cf__thead { padding: 10px 12px; border-radius: 10px; font: 800 12px/1 var(--font-title); color: #8592b3; background: rgb(255 255 255 / 0.040); }
.cf__thead span:nth-child(2) { text-align: center; }
.cf__thead span:last-child { text-align: right; }
.cf__rows { display: grid; gap: 4px; margin-top: 6px; max-height: 420px; overflow-y: auto; }
.cfrow { padding: 10px 12px; border-radius: 12px; background: rgb(255 255 255 / 0.030); font: 800 14px/1.200 var(--font-title); color: #e6ecfa; }
.cfrow > span:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cfrow img { width: 24px; height: 24px; flex: 0 0 auto; }
.cfrow small { display: block; font: 700 11px/1 var(--font-title); color: #8592b3; }
.cfrow .x { text-align: center; color: #c9a8ff; }
.cfrow .w { text-align: right; color: #8592b3; }
.cfrow.is-win { box-shadow: inset 0 0 0 1px rgb(61 220 138 / 0.300); background: rgb(19 179 111 / 0.080); }
.cfrow.is-win .w { color: #6dffb0; }
.cf__empty { margin: 0; padding: 24px 10px; font: 700 14px/1.300 var(--font-title); color: #6f7a99; text-align: center; }
.cf:fullscreen { overflow-y: auto; padding: 12px; background: #090c1a; }
.cf:-webkit-full-screen { overflow-y: auto; padding: 12px; background: #090c1a; }
.fsheet.is-cf .fcard--crash { display: none; }
@media (prefers-reduced-motion: reduce) { body.is-cf .cf, .cf__res { animation: none; } }
