/* ENOT FLAP — общая часть как в Enot Road/BanFB (шапка, HUD, панели, оверлеи, честность) + поле Flap. */
.brand-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.all-games { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; border: 3px solid var(--ink); background: var(--yellow);
  font-weight: 700; text-decoration: none; box-shadow: 4px 4px 0 var(--ink); white-space: nowrap; }
.all-games:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.small { font-size: 12px; margin: 10px 0 0; }
.bf-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; margin-bottom: 18px; }
.bf-title h1 { font-family: var(--font-head); margin: 0; font-size: clamp(38px, 4.6vw, 64px); line-height: .9; letter-spacing: -.04em; }
.bf-title .slogan { font-size: clamp(18px, 2vw, 28px); }
.bf-title .slogan { margin: 0; }
.bf-hud { grid-area: hud; }
.bf-ctrl { grid-area: ctrl; }
.bf-hud { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; border: 5px solid var(--ink); background: var(--ink); gap: 5px; box-shadow: 8px 8px 0 var(--ink); }
.hud-box { background: var(--paper); padding: 8px 12px; display: flex; flex-direction: column; min-width: 0; }
.hud-main { background: var(--yellow); grid-column: 1 / -1; }
.hud-k { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.hud-v { font-family: var(--font-num); font-weight: 700; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-main .hud-v { font-family: var(--font-head); font-size: clamp(22px, 2.4vw, 34px); }
.hud-v.bump { animation: bump .35s ease-out; }
@keyframes bump { 0% { transform: scale(1.25); color: var(--green); } 100% { transform: scale(1); } }
.bf-phrase { min-height: 48px; display: flex; align-items: center; justify-content: center; text-align: center; margin-bottom: 12px;
  border: 3px solid var(--ink); background: var(--paper); padding: 6px 12px; font-weight: 700; font-size: 17px; }
.bf-phrase.is-win { background: #E7F6EE; border-color: var(--green); color: var(--green); }
.bf-phrase.is-ban { background: var(--red); color: var(--paper); }
.bf-phrase span { animation: phrase-in .3s ease-out; }
@keyframes phrase-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* эффекты поверх поля */
.fx { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 12px; }
.fx-ban { background: rgba(180, 35, 24, .38); animation: fx-in .2s ease-out; }
@keyframes fx-in { from { opacity: 0; } to { opacity: 1; } }
.fx-ban-card, .fx-win-card { background: var(--paper); border: 5px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); width: min(400px, 100%); padding: 14px 16px 16px; text-align: center; display: grid; gap: 6px; justify-items: center; }
.ban-sub { margin: 4px 0 0; font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
.ban-reason { margin: 0; font-weight: 700; color: var(--red); }
.ban-loss { margin: 0; font-family: var(--font-head); font-size: 26px; }
.ban-sub, .ban-reason, .ban-loss, .fx-ban-card > button { opacity: 0; animation: fade .3s 1.1s forwards; }
@keyframes fade { to { opacity: 1; } }
.fx-ban-card > button, .fx-win-card > button { width: 100%; margin-top: 6px; }
.fx-win { background: rgba(255, 212, 0, .35); animation: fx-in .2s ease-out; }
.fx-win-card { background: var(--yellow); animation: pop .4s cubic-bezier(.2,1.6,.5,1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.fx-win-card .win-racc { width: 86px; height: 88px; display: block; overflow: visible; animation: hop .6s .2s ease-out; }
@keyframes hop { 30% { transform: translateY(-18px) rotate(-8deg); } 60% { transform: translateY(0) rotate(4deg); } }
.win-k { margin: 0; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.win-v { margin: 0; font-family: var(--font-head); font-size: clamp(34px, 4vw, 48px); line-height: 1; color: var(--green); background: var(--paper); border: 3px solid var(--ink); padding: 4px 12px; }
.win-x { margin: 0; font-family: var(--font-num); font-weight: 700; font-size: 18px; }
/* управление */
.panel-head .snd { min-height: 34px; padding: 2px 8px; background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: none; font-size: 16px; }
.panel-head .snd[aria-pressed="false"] { opacity: .55; }
.ctrl-body { display: grid; gap: 12px; }
.fld { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.step { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; align-items: center; }
.step button { min-height: 44px; padding: 0; box-shadow: 3px 3px 0 var(--ink); font-size: 20px; }
.step input[type=number] { text-align: center; font-weight: 700; font-size: 18px; -moz-appearance: textfield; }
.step input::-webkit-outer-spin-button, .step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=range] { width: 100%; height: 44px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; background: var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 30px; margin-top: -10px; background: var(--yellow); border: 3px solid var(--ink); }
input[type=range]::-moz-range-track { height: 10px; background: var(--ink); }
input[type=range]::-moz-range-thumb { width: 20px; height: 26px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 0; }
input:disabled { opacity: .5; cursor: not-allowed; }
.chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.chips button { min-height: 38px; padding: 2px 0; font-size: 13px; box-shadow: 3px 3px 0 var(--ink); background: var(--paper); color: var(--ink); }
.presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.presets button { flex-direction: column; gap: 0; min-height: 54px; padding: 4px 2px; font-size: 10px; line-height: 1.1; letter-spacing: 0; box-shadow: 3px 3px 0 var(--ink);
  background: var(--paper); color: var(--ink); text-transform: none; font-weight: 600; }
.presets button b { font-family: var(--font-head); font-size: 18px; line-height: 1.05; }
.presets button.is-on { background: var(--yellow); }
.hint { margin: 0; font-family: var(--font-mono); font-size: 13px; border: 3px dashed var(--ink); padding: 8px 10px; background: var(--bg); }
.big { min-height: 60px; font-size: 20px; font-family: var(--font-head); letter-spacing: .02em; }
#btn-main.is-cash { background: var(--green); color: var(--paper); }
.credit { display: grid; gap: 6px; }
.credit .mono { font-size: 12px; }
/* ниже игры */
.bf-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; margin-bottom: 30px; }
.hist td, .hist th { font-size: 14px; }
.hist .vbtn { min-height: 30px; padding: 2px 8px; font-size: 11px; box-shadow: 2px 2px 0 var(--ink); background: var(--paper); color: var(--ink); }
.tag-ban { background: var(--red); color: var(--paper); padding: 1px 6px; font-weight: 700; }
.tag-win { color: var(--green); font-weight: 700; }
.fair { margin-bottom: 10px; }
.fair-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; }
.kv { display: grid; gap: 4px; margin-bottom: 12px; font-weight: 700; font-size: 14px; }
.kv small { font-weight: 400; font-family: var(--font-mono); font-size: 11px; color: #444; }
.kv code, .verify code { font-family: var(--font-num); font-size: 13px; background: var(--bg); border: 2px solid var(--ink); padding: 6px 8px; overflow-wrap: anywhere; word-break: break-all; font-weight: 400; }
.seed-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.seed-row button { min-height: 44px; box-shadow: 3px 3px 0 var(--ink); font-size: 13px; }
.fair-how h3 { margin: 0 0 6px; font-family: var(--font-head); font-size: 20px; }
.fair-how ol { margin: 0; padding-left: 20px; font-size: 14px; display: grid; gap: 6px; }
.fair-how code { font-family: var(--font-num); background: var(--bg); padding: 0 4px; }
.verify code { display: block; margin-top: 2px; }
.verify { margin-top: 12px; border: 3px solid var(--ink); padding: 10px 12px; display: grid; gap: 6px; font-size: 14px; }
.verify.is-ok { border-color: var(--green); background: #E7F6EE; }
.verify.is-bad { border-color: var(--red); background: #FDECEA; }
@media (max-width: 720px) {
  .brand-row { width: 100%; justify-content: space-between; }
  .all-games { min-height: 40px; padding: 4px 10px; font-size: 14px; }
  .bf-title { margin-bottom: 14px; }
  .bf-title .slogan { font-size: 18px; line-height: 1.45; }
  .bf-hud { grid-template-columns: repeat(4, minmax(0, 1fr)); box-shadow: 5px 5px 0 var(--ink); border-width: 4px; gap: 4px; }
  .hud-box { padding: 5px 6px; }
  .hud-k { font-size: 9px; letter-spacing: .02em; }
  .hud-v, .hud-main .hud-v { font-size: 16px; }
  .hud-main { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .hud-main .hud-v { font-size: 22px; }
  .hud-v { font-size: 14px; }
  .bf-ctrl .ctrl-body > .hint { order: -3; }
  .bf-ctrl .ctrl-body > #gmsg { order: -4; }
  .fx { padding: 8px; align-items: flex-end; }
  .fx-ban-card, .fx-win-card { padding: 10px; gap: 4px; box-shadow: 6px 6px 0 var(--ink); }
  .ban-sub { font-size: 12px; }
  .ban-loss { font-size: 20px; }
  .fx-ban-card > button, .fx-win-card > button { min-height: 40px; margin-top: 2px; }
  .fx-win-card .win-racc { width: 60px; height: 62px; }
  .win-x { font-size: 14px; }
  .bf-phrase { min-height: 42px; font-size: 15px; margin-bottom: 10px; }
  .bf-row { grid-template-columns: 1fr; gap: 22px; }
  .fair-grid { grid-template-columns: 1fr; }
  .top .hide-m { display: none; }
  .hist td, .hist th { font-size: 13px; padding: 7px 4px; }
}


/* ================= ENOT FLAP ================= */
.fl-game { display: grid; gap: 22px; margin-bottom: 30px; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); grid-template-areas: "ctrl main"; align-items: start; }
.fl-main { grid-area: main; min-width: 0; }
.fl-hud { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; }
.fl-wrap { position: relative; height: clamp(420px, 62vh, 600px); border: 5px solid var(--ink); background: #F0F0F0; overflow: hidden;
  box-shadow: 8px 8px 0 var(--yellow), 8px 8px 0 5px var(--ink); user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.fl-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.fl-wrap.is-flying canvas { touch-action: none; }
.fl-wrap.shake { animation: flshake .38s ease-out; }
@keyframes flshake { 20% { transform: translate(-7px, 4px); } 40% { transform: translate(6px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(2px, -1px); } }
.fl-cash { position: absolute; right: 12px; bottom: 60px; z-index: 6; flex-direction: column; gap: 0; min-height: 58px; padding: 6px 16px; background: var(--green); color: var(--paper);
  font-family: var(--font-head); font-size: 20px; letter-spacing: .02em; box-shadow: 5px 5px 0 var(--ink); line-height: 1.05; }
.fl-cash small { display: block; font-family: var(--font-num); font-size: 14px; font-weight: 700; }
.fl-cash:disabled { background: #5C5C5C; opacity: 1; }
.fl-pause { position: absolute; inset: 0; z-index: 7; display: flex; align-items: center; justify-content: center; background: rgba(10, 10, 10, .45); cursor: pointer; }
.fl-pause > div { background: var(--yellow); border: 5px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 14px 22px; display: grid; gap: 4px; text-align: center; }
.fl-pause b { font-family: var(--font-head); font-size: 34px; line-height: 1; }
.fl-pause span { font-weight: 700; }
.fl-pause small { font-family: var(--font-mono); font-size: 12px; }
/* рука Цукерберга со штампом */
.zhand { position: absolute; z-index: 8; width: 120px; height: 203px; margin-left: -60px; pointer-events: none; transform-origin: 50% 100%; }
.zhand svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(6px 6px 0 rgba(10,10,10,.55)); }
.zhand.is-on { animation: slam 1.25s cubic-bezier(.5,0,.6,1) forwards; }
@keyframes slam { 0% { transform: translateY(-140%); } 34% { transform: translateY(-100%); } 40% { transform: translateY(-96%) scaleY(.94); } 64% { transform: translateY(-100%); } 100% { transform: translateY(-190%); } }
.imprint { position: absolute; z-index: 7; display: grid; justify-items: center; gap: 2px; padding: 6px 12px 7px; border: 5px solid var(--red); color: var(--red); background: rgba(255,255,255,.88);
  transform: translate(-50%, -50%) rotate(-11deg) scale(2.4); opacity: 0; pointer-events: none; white-space: nowrap; }
.imprint b { font-family: "Archivo Black", "Onest", sans-serif; font-weight: 900; font-size: 32px; line-height: 1; letter-spacing: .02em; }
.imprint span { font-family: var(--font-mono); font-weight: 700; font-size: 14px; letter-spacing: .06em; border-top: 3px solid var(--red); padding-top: 2px; }
.imprint.is-on { animation: imprint .16s .42s cubic-bezier(.6,0,.9,.6) forwards; }
@keyframes imprint { to { opacity: 1; transform: translate(-50%, -50%) rotate(-11deg) scale(1); } }
.fl-wrap .fx { z-index: 10; }
.fl-loss > * { animation-delay: .15s !important; }
.fl-loss .loss-k { margin: 0; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 14px; }
.fl-loss .loss-lane { margin: 0; font-family: var(--font-head); font-weight: 900; font-synthesis: none; font-size: 30px; line-height: 1; background: var(--red); color: var(--paper); padding: 4px 12px; }
.loss-reveal { margin: 0; font-family: var(--font-mono); font-size: 12px; line-height: 1.35; }
.fx-win-card .loss-reveal { background: var(--paper); border: 2px solid var(--ink); padding: 4px 8px; }
.fx-win-card .win-racc { width: 96px; height: 86px; }
.fl-tap { margin: 14px 0 0; font-size: 13px; }
/* управление */
.acts { display: grid; gap: 10px; grid-template-columns: 1fr; }
.acts.two { grid-template-columns: 1fr 1fr; }
.acts .big { min-height: 64px; padding: 6px 8px; line-height: 1.1; }
.acts .big small { display: block; font-family: var(--font-num); font-size: 13px; font-weight: 700; }
#btn-cash { background: var(--green); color: var(--paper); flex-direction: column; gap: 2px; }
#btn-main { flex-direction: column; gap: 2px; }
.keys { color: #444; }
.ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.ladder span { border: 2px solid var(--ink); background: var(--paper); padding: 3px 2px; text-align: center; font-family: var(--font-num); font-size: 12px; font-weight: 700; line-height: 1.15; }
.ladder span i { display: block; font-style: normal; font-family: var(--font-mono); font-size: 9px; font-weight: 400; color: #555; }
.ladder span.is-on { background: var(--yellow); }
.ladder span.is-done { background: var(--ink); color: var(--paper); }
.ladder span.is-done i { color: #BBB; }
.verify .cols-mini { display: flex; flex-wrap: wrap; gap: 3px; }
.verify .cols-mini i { width: 18px; height: 18px; border: 2px solid var(--ink); background: var(--paper); font-style: normal; font-size: 9px; line-height: 14px; text-align: center; font-family: var(--font-mono); }
.verify .cols-mini i.p { background: var(--green); color: var(--paper); }
.verify .cols-mini i.b { background: var(--red); color: var(--paper); }
@media (max-width: 1180px) {
  .fl-game { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "ctrl"; }
  .fl-ctrl .ctrl-body { grid-template-columns: 1fr 1fr; align-items: start; }
  .fl-ctrl .ctrl-body > .acts, .fl-ctrl .ctrl-body > .hint, .fl-ctrl .ctrl-body > #gmsg, .fl-ctrl .ctrl-body > .keys, .fl-ctrl .ctrl-body > .ladder { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .fl-hud { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 10px; }
  .fl-wrap { height: clamp(380px, 58vh, 480px); border-width: 4px; box-shadow: 6px 6px 0 var(--yellow), 6px 6px 0 4px var(--ink); }
  .fl-cash { right: 8px; bottom: 50px; min-height: 52px; font-size: 17px; padding: 4px 12px; }
  .fl-cash small { font-size: 13px; }
  .zhand { width: 84px; height: 142px; margin-left: -42px; }
  .imprint b { font-size: 22px; }
  .imprint span { font-size: 11px; }
  .imprint { border-width: 4px; padding: 4px 8px 5px; }
  .fl-ctrl .ctrl-body { grid-template-columns: 1fr; }
  .acts .big { min-height: 58px; font-size: 18px; }
  .fl-loss .loss-lane { font-size: 22px; }
  .keys { display: none; }
  .fl-tap { margin-top: 12px; font-size: 12px; text-align: center; }
  .fl-tap-x { display: none; }
}

/* ================= игровой режим (Stage L) ================= */
/* без двойного тапа-зума, выделения, подсветки и меню долгого тапа на поле и кнопках игры */
html { scrollbar-gutter: stable; }
.fl-game { -webkit-tap-highlight-color: transparent; }
.fl-wrap, .fl-hud, .fl-ctrl .acts, .fl-cash, .fl-fs { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.fl-game button, .fl-wrap, .fl-wrap canvas { touch-action: manipulation; }
.fl-wrap.is-flying canvas, html.fl-gm .fl-game, html.fl-gm .fl-game * { touch-action: none; }
html.fl-gm .fl-game input { touch-action: manipulation; }
html.fl-gm, html.fl-gm body { overflow: hidden; overscroll-behavior: none; }
.fl-fs { position: absolute; left: 10px; top: 10px; z-index: 6; min-height: 0; width: 40px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-size: 20px; line-height: 1; }
.fl-fs[hidden] { display: none; }
.fl-fs[aria-pressed="true"] { background: var(--yellow); }
/* телефон/планшет: компактная «полноэкранная» раскладка на время полёта */
@media (max-width: 1180px) {
  html.fl-gm .fl-game { position: fixed; inset: 0; z-index: 60; margin: 0; box-sizing: border-box; height: 100vh; height: 100dvh;
    display: flex; flex-direction: column; align-items: stretch; gap: 8px; background: var(--bg, #F0F0F0); overflow: hidden;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) calc(env(safe-area-inset-right, 0px) + 10px) calc(env(safe-area-inset-bottom, 0px) + 10px) calc(env(safe-area-inset-left, 0px) + 10px); }
  html.fl-gm .fl-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  html.fl-gm .fl-hud { flex: none; margin-bottom: 8px; box-shadow: 4px 4px 0 var(--ink); }
  html.fl-gm #phrase, html.fl-gm .fl-tap, html.fl-gm #fl-cash { display: none; }
  /* поле: сколько влезает, но не выше 1.3 × ширины — иначе в кадре меньше колонн впереди */
  html.fl-gm .fl-wrap { flex: 0 1 auto; margin: auto 0; height: calc((100vw - 20px) * 1.3); max-height: 100%; min-height: 0; box-shadow: 5px 5px 0 var(--yellow), 5px 5px 0 4px var(--ink); }
  html.fl-gm .fl-ctrl { flex: none; margin-top: auto; border: 0; box-shadow: none; background: transparent; }
  html.fl-gm .fl-ctrl .panel-head, html.fl-gm .fl-ctrl .ctrl-body > :not(.acts):not(#gmsg) { display: none; }
  html.fl-gm .fl-ctrl .ctrl-body { display: block; padding: 0; }
  html.fl-gm .fl-ctrl #gmsg { margin-bottom: 8px; }
  html.fl-gm .acts .big { min-height: 68px; font-size: 20px; }
}
@media (max-width: 720px) {
  .fl-fs { width: 36px; height: 36px; left: 8px; top: 8px; font-size: 18px; }
}
/* bump множителя: масштаб от левого края (раньше текст на 0.35с уезжал влево за пределы плашки) */
.hud-v { transform-origin: 0 60%; }
