/* ============================================================
   styles.css  --  YMT Platform shared / base styles
   Extracted from index.html inline JS style injection
   ============================================================ */

/* ---------------------------------------------------------
   Modern CSS Reset
   --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  line-height: 1.15;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

/* ---------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   --------------------------------------------------------- */
:root {
  --ink: #2c2c2c;
  --muted: #6b7280;
  --good: #16a34a;
  --bad: #dc2626;
  --line: rgba(0, 0, 0, 0.12);
  --btn: #ffffff;
  --btn2: #f3f4f6;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
  --radius: 18px;
}

/* ---------------------------------------------------------
   Page Background
   --------------------------------------------------------- */
html,
body {
  background: #e9eef5;
}

/* ---------------------------------------------------------
   Tap / Selection Behavior
   --------------------------------------------------------- */
* {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ---------------------------------------------------------
   Loading / Splash Screen
   --------------------------------------------------------- */
#hg-root {
  visibility: hidden;
}

#hg-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 22px system-ui, Arial;
  background: #0b1220;
  color: #fff;
  z-index: 999999;
}

/* ---------------------------------------------------------
   Main Wrap / Container
   --------------------------------------------------------- */
.wrap {
  max-width: 1100px;
  margin: 40px auto;
  padding: 40px 32px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
  color: #111;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.15);
}

.wrapFlat {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 24px 32px !important;
  margin: 0 auto !important;
  max-width: 1100px !important;
}

/* ---------------------------------------------------------
   Typography
   --------------------------------------------------------- */
h1 {
  font-size: 22px;
  margin: 0;
  text-align: center;
  font-weight: 1000;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 14px;
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
}

h3 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink);
  text-align: center;
}

.psub {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

.footnote {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.rulesText {
  font-weight: 950;
}

/* ---------------------------------------------------------
   Labels & Form Elements
   --------------------------------------------------------- */
label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin: 0 0 6px;
}

input,
select {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  outline: none;
  min-width: 170px;
}

select {
  width: 100%;
  box-sizing: border-box;
}

.inputError {
  border-color: rgba(251, 113, 133, 0.95) !important;
  box-shadow: 0 0 0 2px rgba(251, 113, 133, 0.35) !important;
}

.nameInput {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* ---------------------------------------------------------
   Flex / Layout Helpers
   --------------------------------------------------------- */
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.row > div {
  flex: 1 1 240px;
  min-width: 240px;
}

.hidden {
  display: none !important;
}

/* ---------------------------------------------------------
   Card / Panel Base
   --------------------------------------------------------- */
.card {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  filter: none !important;
}

/* ---------------------------------------------------------
   Title Stack
   --------------------------------------------------------- */
.titleStack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  margin: 0 0 12px;
  background: transparent;
}

/* ---------------------------------------------------------
   Buttons -- Base
   --------------------------------------------------------- */
.btn:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
}

.btn:active {
  transform: translateY(1px) !important;
  box-shadow: 0 9px 16px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}

.btnPrimary {
  padding: 14px 18px !important;
  min-height: 54px !important;
  border-radius: 14px !important;
  font-weight: 950 !important;
}

.btnStart {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.65), rgba(6, 95, 70, 0.55)) !important;
  border: 1px solid rgba(16, 185, 129, 0.65) !important;
  color: #fff !important;
}

.btnDanger {
  background: linear-gradient(180deg, rgba(251, 113, 133, 0.35), rgba(251, 113, 133, 0.18)) !important;
  border: 1px solid rgba(251, 113, 133, 0.45) !important;
}

.btnGame {
  min-height: 54px !important;
  font-weight: 950 !important;
  font-size: 14px !important;
}

.btnClassic {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.55), rgba(37, 99, 235, 0.28)) !important;
  border-color: rgba(59, 130, 246, 0.55) !important;
}

.btnLightning {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.55), rgba(5, 150, 105, 0.28)) !important;
  border-color: rgba(16, 185, 129, 0.55) !important;
}

.btnRelaxed {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.55), rgba(126, 34, 206, 0.28)) !important;
  border-color: rgba(168, 85, 247, 0.55) !important;
}

.btnEndless {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.55), rgba(217, 119, 6, 0.28)) !important;
  border-color: rgba(245, 158, 11, 0.55) !important;
}

/* ---------------------------------------------------------
   Sound / Toggle Row
   --------------------------------------------------------- */
.soundRow {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
}

.toggle input {
  min-width: auto;
  margin: 0;
}

.range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
}

.range input[type="range"] {
  min-width: 160px;
  background: transparent;
  border: none;
  padding: 0;
}

/* ---------------------------------------------------------
   Status Messages
   --------------------------------------------------------- */
.msg {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}

.msgError {
  color: rgba(251, 113, 133, 0.95) !important;
  font-weight: 900;
}

/* ---------------------------------------------------------
   High-Score Button
   --------------------------------------------------------- */
.hsBtn {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 14px 18px;
  min-height: 54px;
  background: rgba(255, 255, 255, 0.08);
  cursor: default;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  font-size: 14px;
  font-weight: 900;
  color: #000;
}

.hsBtn b {
  color: #000;
}

.hsFlash {
  animation: hgHSFlash 1.2s linear infinite;
}

@keyframes hgHSFlash {
  0%   { background: rgba(34, 197, 94, 0.95); }
  25%  { background: rgba(59, 130, 246, 0.95); }
  50%  { background: rgba(245, 158, 11, 0.95); }
  75%  { background: rgba(168, 85, 247, 0.95); }
  100% { background: rgba(34, 197, 94, 0.95); }
}

/* ---------------------------------------------------------
   Flow Shell
   --------------------------------------------------------- */
#flowShell {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

#flowShell .card {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  filter: none !important;
}

#flowShell .hidden {
  display: none !important;
}

/* ---------------------------------------------------------
   Flow Steps (Login, Type, Level, Players, Category, Begin)
   --------------------------------------------------------- */
#flowLogin,
#flowType,
#flowLevel,
#flowPlayers,
#flowCategory,
#flowBegin {
  min-height: calc(100vh - 24px);
  padding: 18px 16px 28px;
  box-sizing: border-box;
  background: transparent;
  color: #111;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

#flowLogin > *,
#flowType > *,
#flowLevel > *,
#flowPlayers > *,
#flowCategory > *,
#flowBegin > * {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

#flowLogin h1,
#flowType h1,
#flowLevel h1,
#flowPlayers h1,
#flowCategory h1,
#flowBegin h1 {
  margin: 10px 0 14px;
  color: #111 !important;
  text-align: center;
}

/* Flow step buttons base */
#flowLogin button,
#flowType button,
#flowLevel button,
#flowPlayers button,
#flowCategory button,
#flowBegin button,
#flowLogin .btn,
#flowType .btn,
#flowLevel .btn,
#flowPlayers .btn,
#flowCategory .btn,
#flowBegin .btn {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  border-radius: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
  touch-action: manipulation;
}

#flowLogin button:hover,
#flowType button:hover,
#flowLevel button:hover,
#flowPlayers button:hover,
#flowCategory button:hover,
#flowBegin button:hover,
#flowLogin .btn:hover,
#flowType .btn:hover,
#flowLevel .btn:hover,
#flowPlayers .btn:hover,
#flowCategory .btn:hover,
#flowBegin .btn:hover {
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(0, 0, 0, 0.22);
}

/* Flow step buttons -- sizing */
#flowType button,
#flowType .btn,
#flowLevel button,
#flowLevel .btn,
#flowCategory button,
#flowCategory .btn,
#flowBegin button,
#flowBegin .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  min-height: 48px;
  height: auto;
  padding: 12px 16px;
  margin: 6px auto;
  font-size: 15px;
}

/* Flow step inputs */
#flowPlayers input,
#flowCategory input,
#flowBegin input,
#flowPlayers select,
#flowCategory select,
#flowBegin select,
#setupView input {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.14);
  color: #111;
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
}

#flowLogin input::placeholder,
#flowPlayers input::placeholder,
#setupView input::placeholder {
  color: rgba(0, 0, 0, 0.55) !important;
}

#flowPlayers input:focus,
#flowCategory input:focus,
#flowBegin input:focus,
#flowPlayers select:focus,
#flowCategory select:focus,
#flowBegin select:focus,
#setupView input:focus {
  border-color: rgba(0, 153, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.12);
}

/* Flow login / players input overrides */
#flowPlayers input,
#flowLogin input {
  display: block !important;
  width: 100% !important;
  max-width: 420px !important;
  margin: 10px auto 18px !important;
  box-sizing: border-box !important;
  padding: 12px 14px !important;
}

#flowPlayers input::placeholder,
#flowLogin input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

/* Flow Players text colors */
#flowPlayers,
#flowPlayers h1,
#flowPlayers .psub,
#flowPlayers label {
  color: #111 !important;
}

#flowPlayers h1,
#flowPlayers .psub,
#flowPlayers label,
#flowCategory h1,
#flowCategory .psub,
#flowCategory label,
#flowBegin h1,
#flowBegin .psub,
#flowBegin label {
  color: #111 !important;
}

/* Flow Players button base */
#flowPlayers button.btn,
#flowPlayers .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  min-width: 240px;
  padding: 14px 18px;
  border-radius: 18px;
  background: #fff;
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.10);
  font-weight: 900;
}

#flowPlayers .btn {
  width: 180px !important;
}

/* ---------------------------------------------------------
   Flow "3D" Buttons (shared across flow steps)
   --------------------------------------------------------- */
#flowType .btn,
#flowType button.btn,
#flowCategory .btn,
#flowCategory button.btn,
#flowBegin .btn,
#flowBegin button.btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  position: relative !important;
  background: linear-gradient(180deg, #f5f5f5, #e0e0e0) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-right: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-bottom: 3px solid rgba(0, 0, 0, 0.25) !important;
  color: #2c2c2c !important;
  padding: 12px 16px !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  font-weight: 850 !important;
  letter-spacing: 0.01em !important;
  text-decoration: none !important;
  white-space: normal !important;
  line-height: 1.1 !important;
  min-height: auto !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

/* Flow "3D" active state */
#flowType .btn:active,
#flowType button.btn:active,
#flowCategory .btn:active,
#flowCategory button.btn:active,
#flowBegin .btn:active,
#flowBegin button.btn:active {
  transform: translateY(2px) !important;
  border-bottom-width: 1px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12),
    inset 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

/* ---------------------------------------------------------
   Back Button (Red) -- All Flow Steps
   --------------------------------------------------------- */
#flowType button.btn.btnBack,
#flowLevel button.btn.btnBack,
#flowPlayers button.btn.btnBack,
#flowCategory button.btn.btnBack,
#flowBegin button.btn.btnBack {
  background: linear-gradient(180deg, #f87171, #dc2626) !important;
  color: #fff !important;
  border-top: 1px solid rgba(254, 202, 202, 0.6) !important;
  border-left: 1px solid rgba(251, 113, 113, 0.4) !important;
  border-right: 1px solid rgba(153, 27, 27, 0.3) !important;
  border-bottom: 3px solid rgba(153, 27, 27, 0.5) !important;
  width: 240px !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: auto !important;
  padding: 14px 18px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  margin: 10px auto !important;
  border-radius: 18px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 8px rgba(198, 40, 40, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  position: static !important;
  letter-spacing: 0.01em !important;
}

/* ---------------------------------------------------------
   Next / Start Button (Green) -- All Flow Steps
   --------------------------------------------------------- */
#flowLogin button.btn#flowLoginNext,
#flowPlayers button.btn#flowPlayersNext,
#flowBegin button.btn#flowStartGame {
  background: linear-gradient(180deg, #4ade80, #16a34a) !important;
  color: #fff !important;
  border-top: 1px solid rgba(134, 239, 172, 0.6) !important;
  border-left: 1px solid rgba(74, 222, 128, 0.4) !important;
  border-right: 1px solid rgba(21, 128, 61, 0.3) !important;
  border-bottom: 3px solid rgba(21, 128, 61, 0.5) !important;
  width: 240px !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: auto !important;
  padding: 14px 18px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  margin: 10px auto !important;
  border-radius: 18px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 8px rgba(21, 128, 61, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  position: static !important;
  letter-spacing: 0.01em !important;
}

/* ---------------------------------------------------------
   Flow Title (Marquee-Style Header)
   --------------------------------------------------------- */
.flowTitle {
  display: inline-block;
  padding: 14px 34px;
  background: linear-gradient(180deg, #1e3a5f, #0f1f3d);
  border: 5px solid #8cadd4;
  border-radius: 14px;
  box-shadow: 0 0 0 3px #5a7fa8,
    0 0 18px rgba(140, 173, 212, 0.4),
    inset 0 2px 6px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.flowTitleWrap {
  text-align: center;
  margin: 0 0 10px;
}

/* ---------------------------------------------------------
   Flow Progress Bar (Bottom Stepper)
   --------------------------------------------------------- */
.flowProg {
  position: fixed !important;
  bottom: 26px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  align-items: center !important;
  padding: 14px 24px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 22px !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12) !important;
  backdrop-filter: blur(8px) !important;
  z-index: 999999 !important;
  gap: 0 !important;
}

.flowStep {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  position: relative !important;
  z-index: 2 !important;
  min-width: 60px !important;
}

.flowStep::before {
  content: "" !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: #ccd1d9 !important;
  border: 3px solid #ccd1d9 !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.flowStep::after {
  content: attr(data-label) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #aaa !important;
  transition: color 0.2s ease !important;
}

.flowStep.stepDone::before {
  background: #34d399 !important;
  border-color: #34d399 !important;
}

.flowStep.stepDone::after {
  color: #22c55e !important;
}

.flowStep.stepActive::before {
  background: #22c55e !important;
  border-color: #22c55e !important;
  width: 28px !important;
  height: 28px !important;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5) !important;
}

.flowStep.stepActive::after {
  color: #111 !important;
  font-weight: 900 !important;
}

.flowStepLine {
  flex: 1 !important;
  height: 4px !important;
  background: #ccd1d9 !important;
  border-radius: 2px !important;
  min-width: 20px !important;
  transition: background 0.2s ease !important;
  z-index: 1 !important;
}

.flowStepLine.lineDone {
  background: #34d399 !important;
}

/* ---------------------------------------------------------
   Setup Players Grid
   --------------------------------------------------------- */
.setupPlayersGrid {
  display: grid;
  grid-template-columns: 1fr 360px 1fr;
  gap: 12px;
  align-items: end;
}

.setupMid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.setupMid > div {
  width: 100%;
}

.setupStartRow {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.setupStartRow .startWrap {
  width: 360px;
  max-width: 100%;
}

/* ---------------------------------------------------------
   Game View Transparent Override
   --------------------------------------------------------- */
#gameView {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  user-select: none;
  -webkit-user-select: none;
}

/* ---------------------------------------------------------
   Responsive -- 980px
   --------------------------------------------------------- */
@media (max-width: 980px) {
  .setupPlayersGrid {
    grid-template-columns: 1fr;
  }

  .setupMid {
    align-items: stretch;
  }
}

/* ---------------------------------------------------------
   Responsive -- 768px
   --------------------------------------------------------- */
@media (max-width: 768px) {
  * {
    box-sizing: border-box;
  }

  .wrap {
    padding: 20px 16px;
    margin: 20px auto;
    overflow-x: hidden;
  }

  .flowProg {
    max-width: calc(100vw - 16px) !important;
    padding: 12px 14px !important;
  }

  .flowTitle {
    font-size: 18px;
    padding: 10px 24px;
  }

  #flowProgress {
    gap: 2px !important;
    padding: 10px 8px !important;
  }

  .flowStep {
    min-width: 46px !important;
  }

  .flowStep::before {
    width: 18px !important;
    height: 18px !important;
  }

  .flowStep.stepActive::before {
    width: 22px !important;
    height: 22px !important;
  }

  .flowStep::after {
    font-size: 9px !important;
  }

  #flowType button.btn.btnBack,
  #flowPlayers button.btn.btnBack,
  #flowCategory button.btn.btnBack,
  #flowBegin button.btn.btnBack {
    width: 100% !important;
    max-width: 400px !important;
  }

  #flowLogin button.btn#flowLoginNext,
  #flowPlayers button.btn#flowPlayersNext,
  #flowBegin button.btn#flowStartGame {
    width: 100% !important;
    max-width: 400px !important;
  }

  .hsBtn {
    padding: 10px 14px;
    min-height: 42px;
    font-size: 12px;
  }
}

/* ---------------------------------------------------------
   Responsive -- 480px
   --------------------------------------------------------- */
@media (max-width: 480px) {
  .wrap {
    padding: 12px 10px;
    margin: 4px;
    border-radius: 16px;
    overflow-x: hidden;
  }

  .flowProg {
    max-width: calc(100vw - 8px) !important;
    padding: 8px 8px !important;
  }

  #flowPlayers button.btn,
  #flowPlayers .btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 320px !important;
  }

  #flowType button.btn.btnBack,
  #flowPlayers button.btn.btnBack,
  #flowCategory button.btn.btnBack,
  #flowBegin button.btn.btnBack {
    min-width: 0 !important;
  }

  #flowLogin button.btn#flowLoginNext,
  #flowPlayers button.btn#flowPlayersNext,
  #flowBegin button.btn#flowStartGame {
    min-width: 0 !important;
  }

  #flowCategory button.btn#flowCatShorashim,
  #flowCategory button.btn#flowCatBrachos {
    min-width: 0 !important;
  }

  #flowLogin,
  #flowType,
  #flowPlayers,
  #flowCategory,
  #flowBegin {
    padding-bottom: 80px !important;
  }

  #flowProgress {
    gap: 1px !important;
    padding: 8px 4px !important;
  }

  .flowStep {
    min-width: 36px !important;
  }

  .flowStep::before {
    width: 14px !important;
    height: 14px !important;
    border-width: 2px !important;
  }

  .flowStep.stepActive::before {
    width: 18px !important;
    height: 18px !important;
  }

  .flowStep::after {
    font-size: 8px !important;
  }

  .flowStepLine {
    min-width: 10px !important;
    height: 3px !important;
  }

  .flowTitle {
    font-size: 16px;
    padding: 8px 18px;
    border-width: 3px;
  }

  .hsBtn {
    padding: 8px 10px;
    min-height: 36px;
    font-size: 11px;
    gap: 6px;
  }
}

/* ---------------------------------------------------------
   Responsive -- 600px  (flow type grid)
   --------------------------------------------------------- */
@media (max-width: 600px) {
  #flowType {
    grid-template-columns: 1fr !important;
  }

  #flowTypeBack {
    width: 100% !important;
  }
}
