/* =========================================================
   A17
   LUDO PUCARÁ
   STYLES
========================================================= */


/* =========================================================
   A17.1
   RESET
========================================================= */

* {
  box-sizing: border-box;
}


html,
body {
  width: 100%;
  height: 100%;

  margin: 0;
  padding: 0;

  overflow: hidden;

  background:
    #07110d;
}


html {
  -webkit-text-size-adjust: 100%;
}


body {
  position: relative;

  min-width: 100%;
  min-height: 100%;

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  color:
    #ffffff;

  user-select: none;

  -webkit-user-select: none;

  touch-action: manipulation;

  overscroll-behavior: none;
}


button,
input,
a {
  font: inherit;
}


button {
  -webkit-tap-highlight-color:
    transparent;
}


img {
  display: block;

  max-width: 100%;

  -webkit-user-drag: none;

  user-select: none;

  pointer-events: none;
}


/* =========================================================
   A17.2
   APP
========================================================= */

.app {
  position: fixed;

  inset: 0;

  width: 100%;
  height: 100%;

  overflow: hidden;

  background:
    #07110d;
}


/* =========================================================
   A17.3
   ROOTS
========================================================= */

.screen-root {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  overflow: hidden;
}


.screen-root[hidden] {
  display: none !important;
}


/* =========================================================
   A17.4
   INTRO
========================================================= */

.ludo-intro-screen {
  position: absolute;

  inset: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  background:
    radial-gradient(
      circle at center,
      rgba(255, 219, 103, 0.12),
      rgba(7, 17, 13, 0.96) 42%,
      #020705 100%
    );

  opacity: 0;

  transition:
    opacity 300ms ease;
}


.ludo-intro-screen.is-active {
  opacity: 1;
}


.ludo-intro-screen.is-leaving {
  opacity: 0;
}


.ludo-intro-orb {
  position: relative;

  z-index: 2;

  width:
    clamp(
      148px,
      21vw,
      260px
    );

  aspect-ratio:
    1 / 1;

  display:
    grid;

  place-items:
    center;

  border:
    2px solid
    rgba(255, 226, 116, 0.92);

  border-radius:
    50%;

  background:
    radial-gradient(
      circle at 35% 28%,
      rgba(255, 245, 186, 0.38),
      rgba(197, 135, 25, 0.22) 30%,
      rgba(8, 28, 18, 0.92) 64%,
      rgba(2, 8, 5, 0.98) 100%
    );

  box-shadow:
    0 0 0 1px rgba(255, 246, 177, 0.28),
    0 0 34px rgba(231, 176, 55, 0.34),
    0 18px 42px rgba(0, 0, 0, 0.62),
    inset 0 0 26px rgba(255, 220, 102, 0.18),
    inset 0 0 58px rgba(0, 0, 0, 0.38);

  transform:
    scale(1);

  animation:
    ludoIntroOrb 1400ms ease-out forwards;
}


.ludo-intro-orb::before {
  content:
    "";

  position:
    absolute;

  inset:
    9%;

  border:
    1px solid
    rgba(255, 229, 124, 0.55);

  border-radius:
    50%;

  box-shadow:
    inset 0 0 18px rgba(255, 222, 103, 0.16);
}


.ludo-intro-icon {
  position: relative;

  z-index: 2;

  width:
    68%;

  height:
    68%;

  object-fit: contain;

  filter:
    drop-shadow(0 8px 14px rgba(0, 0, 0, 0.58));
}


.ludo-intro-continue {
  position: absolute;

  inset: 0;

  z-index: 5;

  width: 100%;
  height: 100%;

  padding: 0;

  border: 0;

  background:
    transparent;

  cursor: pointer;
}


@keyframes ludoIntroOrb {

  0% {
    opacity: 0;

    transform:
      scale(0.82);
  }

  45% {
    opacity: 1;
  }

  100% {
    opacity: 1;

    transform:
      scale(1);
  }

}


/* =========================================================
   START SCREEN
   PREMIUM CENTERED
========================================================= */

.ludo-start-screen {
  position: absolute;

  inset: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  padding:
    max(14px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));

  overflow: hidden;

  background:
    #040b08;
}


/* =========================================================
   FONDO
========================================================= */

.ludo-start-background {
  position: absolute;

  inset: -3%;

  width: 106%;
  height: 106%;

  object-fit: cover;
  object-position: center;

  z-index: 1;

  filter:
    brightness(0.46)
    saturate(0.88)
    blur(1px);

  transform:
    scale(1.025);
}


/* =========================================================
   OSCURECIMIENTO
========================================================= */

.ludo-start-overlay {
  position: absolute;

  inset: 0;

  z-index: 2;

  pointer-events: none;

  background:
    radial-gradient(
      circle at center,
      rgba(31, 21, 7, 0.05) 0%,
      rgba(6, 12, 9, 0.28) 43%,
      rgba(1, 5, 3, 0.72) 100%
    );
}


/* =========================================================
   PANEL
========================================================= */

.ludo-start-panel {
  position: relative;

  z-index: 5;

  width:
    min(
      430px,
      92vw
    );

  max-height:
    calc(100vh - 26px);

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 8px;

  padding:
    24px 28px 18px;

  overflow-y: auto;
  overflow-x: hidden;

  border:
    1px solid
    rgba(207, 158, 51, 0.82);

  border-radius:
    22px;

  background:
    linear-gradient(
      180deg,
      rgba(48, 25, 9, 0.94) 0%,
      rgba(26, 14, 7, 0.96) 45%,
      rgba(10, 10, 7, 0.97) 100%
    );

  box-shadow:
    0 24px 70px
    rgba(0, 0, 0, 0.64),
    inset 0 1px 0
    rgba(255, 225, 135, 0.14);
}


.ludo-start-panel::before {
  content: "";

  position: absolute;

  inset: 8px;

  border:
    1px solid
    rgba(230, 188, 82, 0.15);

  border-radius:
    16px;

  pointer-events: none;
}


/* =========================================================
   ICONO
========================================================= */

.ludo-start-panel-icon {
  position: relative;

  z-index: 2;

  width:
    88px;

  height:
    88px;

  object-fit: contain;

  margin-bottom:
    2px;

  filter:
    drop-shadow(
      0 7px 12px
      rgba(0, 0, 0, 0.4)
    );
}


/* =========================================================
   PRESENTA
========================================================= */

.ludo-start-presents {
  position: relative;

  z-index: 2;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    0.66rem;

  font-weight: 700;

  letter-spacing:
    0.28em;

  color:
    #d8b55c;
}


/* =========================================================
   TITULO
========================================================= */

.ludo-start-title {
  position: relative;

  z-index: 2;

  margin:
    0;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    clamp(
      2.35rem,
      5vw,
      3.5rem
    );

  line-height:
    0.95;

  font-weight:
    700;

  letter-spacing:
    0.05em;

  color:
    #f4d77d;

  text-shadow:
    0 2px 0
    rgba(70, 39, 5, 0.9),
    0 4px 12px
    rgba(0, 0, 0, 0.6);
}


/* =========================================================
   SUBTITULO
========================================================= */

.ludo-start-subtitle {
  position: relative;

  z-index: 2;

  margin-top:
    1px;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    0.68rem;

  font-weight:
    700;

  letter-spacing:
    0.13em;

  color:
    #d8bd70;
}


/* =========================================================
   SEPARADOR
========================================================= */

.ludo-start-separator {
  position: relative;

  z-index: 2;

  width:
    74%;

  height:
    1px;

  margin:
    7px 0 4px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(213, 170, 69, 0.78),
      transparent
    );
}


/* =========================================================
   TITULOS SECCION
========================================================= */

.ludo-start-section-title {
  position: relative;

  z-index: 2;

  margin-top:
    3px;

  text-align: center;

  font-size:
    0.69rem;

  font-weight:
    800;

  letter-spacing:
    0.18em;

  color:
    #d8bb67;
}


/* =========================================================
   BOTONES DE SELECCION
========================================================= */

.ludo-player-count-buttons,
.ludo-difficulty-buttons {
  position: relative;

  z-index: 2;

  display: flex;

  align-items: center;
  justify-content: center;

  gap:
    7px;

  width:
    100%;
}


.ludo-select-button {
  flex:
    1;

  min-width:
    0;

  min-height:
    38px;

  padding:
    7px 8px;

  border:
    1px solid
    rgba(188, 139, 42, 0.58);

  border-radius:
    10px;

  background:
    linear-gradient(
      180deg,
      rgba(25, 20, 11, 0.94),
      rgba(11, 12, 8, 0.98)
    );

  color:
    #e4ca7d;

  font-size:
    0.76rem;

  font-weight:
    800;

  letter-spacing:
    0.05em;

  cursor: pointer;

  box-shadow:
    inset 0 1px 0
    rgba(255, 232, 163, 0.04);

  transition:
    transform 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}


.ludo-select-button:hover {
  border-color:
    rgba(226, 184, 80, 0.86);
}


.ludo-select-button:active {
  transform:
    scale(0.97);
}


.ludo-select-button.is-selected {
  color:
    #2c1a05;

  border-color:
    #f0cf70;

  background:
    linear-gradient(
      180deg,
      #f7da7b 0%,
      #c9922e 100%
    );

  box-shadow:
    0 0 16px
    rgba(226, 181, 66, 0.24),
    inset 0 1px 0
    rgba(255, 248, 199, 0.65);
}


/* =========================================================
   RESUMEN
========================================================= */

.ludo-player-summary {
  position: relative;

  z-index: 2;

  min-height:
    17px;

  text-align:
    center;

  font-size:
    0.63rem;

  font-weight:
    600;

  letter-spacing:
    0.05em;

  color:
    rgba(232, 212, 158, 0.72);
}


/* =========================================================
   BOTON PRINCIPAL
========================================================= */

.ludo-main-button {
  position: relative;

  z-index: 2;

  width:
    100%;

  min-height:
    50px;

  margin-top:
    8px;

  border:
    1px solid
    #f0cd6a;

  border-radius:
    11px;

  background:
    linear-gradient(
      180deg,
      #f6d877 0%,
      #d19b38 55%,
      #b77b1e 100%
    );

  color:
    #2b1704;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    1rem;

  font-weight:
    800;

  letter-spacing:
    0.08em;

  cursor:
    pointer;

  box-shadow:
    inset 0 1px 0
    rgba(255, 250, 211, 0.72),
    0 8px 20px
    rgba(0, 0, 0, 0.32);

  transition:
    transform 120ms ease,
    filter 120ms ease;
}


.ludo-main-button:hover {
  filter:
    brightness(1.06);
}


.ludo-main-button:active {
  transform:
    scale(0.98);
}


/* =========================================================
   BOTONES SECUNDARIOS
========================================================= */

.ludo-secondary-button {
  position: relative;

  z-index: 2;

  width:
    100%;

  min-height:
    43px;

  border:
    1px solid
    rgba(188, 139, 42, 0.62);

  border-radius:
    10px;

  background:
    linear-gradient(
      180deg,
      rgba(22, 17, 10, 0.94),
      rgba(10, 9, 7, 0.98)
    );

  color:
    #e3c778;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    0.82rem;

  font-weight:
    700;

  letter-spacing:
    0.06em;

  cursor:
    pointer;

  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}


.ludo-secondary-button:hover {
  border-color:
    rgba(228, 187, 82, 0.92);

  background:
    linear-gradient(
      180deg,
      rgba(39, 28, 13, 0.97),
      rgba(14, 12, 8, 0.99)
    );
}


.ludo-secondary-button:active {
  transform:
    scale(0.98);
}


/* =========================================================
   FOOTER
========================================================= */

.ludo-start-footer {
  position: relative;

  z-index: 2;

  margin-top:
    4px;

  text-align:
    center;

  font-size:
    0.53rem;

  letter-spacing:
    0.05em;

  color:
    rgba(194, 150, 66, 0.58);
}


/* =========================================================
   START - LANDSCAPE BAJO
========================================================= */

@media
  (orientation: landscape)
  and
  (max-height: 650px) {

  .ludo-start-panel {
    width:
      min(
        400px,
        47vw
      );

    max-height:
      calc(100vh - 12px);

    gap:
      4px;

    padding:
      10px 18px 9px;

    border-radius:
      17px;
  }


  .ludo-start-panel::before {
    inset:
      6px;

    border-radius:
      12px;
  }


  .ludo-start-panel-icon {
    width:
      58px;

    height:
      58px;

    margin-bottom:
      0;
  }


  .ludo-start-presents {
    font-size:
      0.54rem;
  }


  .ludo-start-title {
    font-size:
      2rem;
  }


  .ludo-start-subtitle {
    font-size:
      0.54rem;
  }


  .ludo-start-separator {
    margin:
      3px 0 2px;
  }


  .ludo-start-section-title {
    margin-top:
      1px;

    font-size:
      0.56rem;
  }


  .ludo-select-button {
    min-height:
      30px;

    padding:
      4px 6px;

    font-size:
      0.65rem;
  }


  .ludo-player-summary {
    min-height:
      13px;

    font-size:
      0.52rem;
  }


  .ludo-main-button {
    min-height:
      38px;

    margin-top:
      4px;

    font-size:
      0.82rem;
  }


  .ludo-secondary-button {
    min-height:
      32px;

    font-size:
      0.68rem;
  }


  .ludo-start-footer {
    font-size:
      0.46rem;
  }

}

/* =========================================================
   A17.7
   GAME
========================================================= */

.ludo-game {
  position: absolute;

  inset: 0;

  display: grid;

  grid-template-columns:
    minmax(
      100px,
      1fr
    )
    minmax(
      300px,
      min(
        82vh,
        76vw
      )
    )
    minmax(
      100px,
      1fr
    );

  grid-template-rows:
    1fr;

  align-items: center;
  justify-items: center;

  gap: 12px;

  width: 100%;
  height: 100%;

  padding:
    max(
      10px,
      env(safe-area-inset-top)
    )
    max(
      12px,
      env(safe-area-inset-right)
    )
    max(
      10px,
      env(safe-area-inset-bottom)
    )
    max(
      12px,
      env(safe-area-inset-left)
    );

  overflow: hidden;

  background:
    #07110d;
}


/* =========================================================
   A17.8
   HUD
========================================================= */

.ludo-hud {
  grid-column: 1;
  grid-row: 1;

  align-self: start;
  justify-self: stretch;

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 8px;

  width: 100%;

  max-width:
    220px;

  padding:
    12px 8px;
}


.ludo-turn-label {
  width: 100%;

  text-align: center;

  font-size:
    clamp(
      0.78rem,
      1.45vw,
      1.05rem
    );

  font-weight: 800;

  letter-spacing:
    0.06em;

  color:
    #e8d583;
}


.ludo-status-label {
  width: 100%;

  min-height:
    34px;

  text-align: center;

  font-size:
    clamp(
      0.72rem,
      1.15vw,
      0.92rem
    );

  color:
    rgba(
      255,
      255,
      255,
      0.82
    );
}


/* =========================================================
   A17.9
   TABLERO
========================================================= */

.ludo-board-stage {
  position: relative;

  grid-column: 2;
  grid-row: 1;

width:
  min(
    94vh,
    88vw
  );

  aspect-ratio:
    1 / 1;

  max-width:
    120%;

  max-height:
  120vh;

  overflow: visible;
}


.ludo-board-image {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;

  object-position: center;

  z-index: 1;

  pointer-events: none;
}


.ludo-piece-layer {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  z-index: 5;

  pointer-events: none;
}


/* =========================================================
   A17.10
   FICHAS
========================================================= */

.ludo-piece {
  position: absolute;

  width:
    4.8%;

  height:
    4.8%;

  object-fit: contain;

  transform:
    translate(
      calc(
        -50% +
        var(
          --piece-offset-x,
          0%
        )
      ),
      calc(
        -50% +
        var(
          --piece-offset-y,
          0%
        )
      )
    );

  transform-origin:
    center;

  z-index: 10;

  pointer-events: none;

  transition:
    left 170ms ease,
    top 170ms ease,
    transform 170ms ease,
    opacity 170ms ease;
}


.ludo-piece.is-selectable {
  pointer-events: auto;

  cursor: pointer;

  z-index:
    32;

  filter:
    drop-shadow(0 0 5px rgba(255, 232, 104, 0.95))
    drop-shadow(0 0 12px rgba(255, 203, 46, 0.82))
    brightness(1.16)
    saturate(1.12);

  animation:
    ludoSelectablePiece 680ms ease-in-out infinite alternate;
}


@keyframes ludoSelectablePiece {

  from {
    transform:
      translate(
        calc(
          -50% +
          var(
            --piece-offset-x,
            0%
          )
        ),
        calc(
          -50% +
          var(
            --piece-offset-y,
            0%
          )
        )
      )
      scale(1);
  }

  to {
    filter:
      drop-shadow(0 0 7px rgba(255, 245, 150, 1))
      drop-shadow(0 0 18px rgba(255, 203, 46, 0.95))
      brightness(1.24)
      saturate(1.18);

    transform:
      translate(
        calc(
          -50% +
          var(
            --piece-offset-x,
            0%
          )
        ),
        calc(
          -50% +
          var(
            --piece-offset-y,
            0%
          )
        )
      )
      scale(1.16);
  }

}


/* =========================================================
   A17.11
   DADO
========================================================= */

.ludo-dice-area {
  position: absolute;

  left:
    max(
      10px,
      calc(
        50% -
        min(
          47vh,
          44vw
        ) -
        136px
      )
    );

  top:
    calc(
      50% -
      214px
    );

  transform:
    translateY(-50%);

  z-index:
    42;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap:
    8px;

  width: auto;

  max-width:
    180px;

  margin:
    0;
}

.ludo-dice-result-anchor {
  position: absolute;

  left:
    calc(
      50% +
      min(
        21vh,
        19vw
      )
    );

  top:
    50%;

  transform:
    translate(
      -50%,
      -50%
    );

  z-index:
    38;

  width: 1px;
  height: 1px;

  pointer-events: none;
}


.ludo-dice-button {
  width:
    clamp(
      118px,
      9vw,
      136px
    );

  min-height:
    clamp(
      42px,
      6vh,
      58px
    );

  padding:
    0 12px;

  border:
    1px solid
    rgba(255, 226, 116, 0.92);

  border-radius:
    10px;

  background:
    linear-gradient(
      180deg,
      #ffe582,
      #c99726
    );

  color:
    #261804;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    clamp(
      0.76rem,
      1.1vw,
      0.95rem
    );

  font-weight:
    900;

  letter-spacing:
    1px;

  text-transform:
    uppercase;

  cursor: pointer;

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);

  transition:
    transform 120ms ease,
    opacity 120ms ease;
}


.ludo-dice-button:disabled {
  cursor: default;

  opacity:
    0.68;
}


.ludo-dice-button.is-enabled {
  opacity:
    1;
}


.ludo-dice-button.is-enabled:active {
  transform:
    scale(0.91);
}

/* =========================================================
   SETTINGS
   PREMIUM CENTERED
========================================================= */

.ludo-settings-screen {
  position: absolute;

  inset: 0;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 14px;

  width: 100%;
  height: 100%;

  padding:
    max(14px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));

  overflow: auto;

  background:
    radial-gradient(
      circle at center,
      rgba(52, 32, 10, 0.28) 0%,
      rgba(12, 18, 12, 0.82) 50%,
      rgba(3, 8, 6, 0.98) 100%
    );
}


/* =========================================================
   TITULO
========================================================= */

.ludo-settings-title {
  margin-bottom: 6px;

  text-align: center;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    clamp(
      1.8rem,
      4vw,
      2.7rem
    );

  font-weight: 800;

  letter-spacing: 0.12em;

  color: #f1d376;

  text-shadow:
    0 2px 0 rgba(79, 44, 5, 0.9),
    0 6px 18px rgba(0, 0, 0, 0.55);
}


/* =========================================================
   SECCIONES
========================================================= */

.ludo-settings-section {
  position: relative;

  width:
    min(
      92vw,
      580px
    );

  display: flex;

  flex-wrap: wrap;

  align-items: center;
  justify-content: center;

  gap: 12px;

  padding:
    18px 20px;

  border:
    1px solid
    rgba(207, 158, 51, 0.78);

  border-radius:
    18px;

  background:
    linear-gradient(
      180deg,
      rgba(43, 25, 10, 0.95) 0%,
      rgba(19, 14, 8, 0.97) 100%
    );

  box-shadow:
    0 18px 45px
    rgba(0, 0, 0, 0.46),
    inset 0 1px 0
    rgba(255, 226, 145, 0.08);
}


.ludo-settings-section::before {
  content: "";

  position: absolute;

  inset: 7px;

  border:
    1px solid
    rgba(235, 195, 96, 0.12);

  border-radius:
    13px;

  pointer-events: none;
}


/* =========================================================
   TITULO DE SECCION
========================================================= */

.ludo-settings-section-title {
  position: relative;

  z-index: 2;

  flex: 0 0 100%;

  text-align: center;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 0.82rem;

  font-weight: 800;

  letter-spacing: 0.18em;

  color: #d9b95f;
}


/* =========================================================
   BOTONES SETTINGS
========================================================= */

.ludo-settings-button {
  position: relative;

  z-index: 2;

  min-height: 42px;

  padding:
    8px 16px;

  border:
    1px solid
    rgba(191, 142, 44, 0.68);

  border-radius:
    10px;

  background:
    linear-gradient(
      180deg,
      rgba(30, 22, 11, 0.96),
      rgba(12, 11, 8, 0.98)
    );

  color: #e6cc7c;

  font-weight: 800;

  letter-spacing: 0.04em;

  cursor: pointer;

  box-shadow:
    inset 0 1px 0
    rgba(255, 236, 171, 0.05);

  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease,
    box-shadow 120ms ease;
}


.ludo-settings-button:hover {
  border-color:
    rgba(230, 187, 80, 0.92);
}


.ludo-settings-button:active {
  transform:
    scale(0.97);
}


.ludo-settings-button.is-selected {
  color:
    #2d1804;

  border-color:
    #f1d172;

  background:
    linear-gradient(
      180deg,
      #f4d678,
      #c8922d
    );

  box-shadow:
    0 0 16px
    rgba(230, 182, 64, 0.18);
}


/* =========================================================
   CONTROL DE VOLUMEN
========================================================= */

.ludo-settings-control {
  position: relative;

  z-index: 2;

  flex:
    1 1 220px;

  display: flex;

  flex-direction: column;

  gap: 8px;

  padding:
    4px 8px;
}


.ludo-settings-label {
  text-align: center;

  font-size: 0.7rem;

  font-weight: 700;

  letter-spacing: 0.08em;

  color:
    rgba(
      236,
      215,
      159,
      0.82
    );
}


.ludo-settings-range {
  width: 100%;

  cursor: pointer;

  accent-color:
    #d3a33f;
}




.ludo-settings-back {
  min-width:
    150px;
}


/* =========================================================
   A17.14
   LEGAL
========================================================= */

.ludo-legal-screen {
  position: absolute;

  inset: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  padding:
    20px;

  overflow: auto;

  background:
    #07110d;
}


.ludo-legal-panel {
  width:
    min(
      90vw,
      430px
    );

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 20px;

  padding:
    24px;

  border:
    1px solid
    rgba(
      212,
      175,
      55,
      0.6
    );

  border-radius:
    16px;

  background:
    rgba(
      0,
      0,
      0,
      0.28
    );
}


.ludo-legal-title {
  margin: 0;

  text-align: center;

  color:
    #e5ce74;

  letter-spacing:
    0.1em;
}


.ludo-legal-actions {
  width: 100%;

  display: flex;

  flex-direction: column;

  gap: 10px;
}


.ludo-legal-link,
.ludo-legal-back {
  display: flex;

  align-items: center;
  justify-content: center;

  min-height:
    44px;

  width: 100%;

  padding:
    8px 14px;

  border:
    1px solid
    rgba(
      212,
      175,
      55,
      0.5
    );

  border-radius:
    9px;

  background:
    rgba(
      0,
      0,
      0,
      0.3
    );

  color:
    #f3e09a;

  text-align: center;

  text-decoration: none;

  font-weight: 700;

  cursor: pointer;
}
:root {
  color-scheme: dark;
}


* {
  box-sizing: border-box;
}


html,
body {
  min-height: 100%;
}


body {
  margin: 0;

  padding:
    42px
    24px
    90px;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  color:
    #ead9aa;

  background:
    radial-gradient(
      circle at center top,
      #2a1809 0%,
      #140d07 38%,
      #080604 100%
    );

  line-height:
    1.6;

  text-align:
    center;
}


main {
  position: relative;

  width:
    min(
      92vw,
      820px
    );

  margin:
    0 auto;

  padding:
    34px
    42px
    38px;

  border:
    1px solid
    rgba(
      211,
      164,
      57,
      0.72
    );

  border-radius:
    22px;

  background:
    linear-gradient(
      180deg,
      rgba(43, 25, 10, 0.94) 0%,
      rgba(21, 14, 7, 0.97) 100%
    );

  box-shadow:
    0 24px 60px
    rgba(
      0,
      0,
      0,
      0.5
    ),
    inset 0 1px 0
    rgba(
      255,
      230,
      150,
      0.08
    );
}


main::before {
  content: "";

  position: absolute;

  inset: 8px;

  border:
    1px solid
    rgba(
      231,
      194,
      98,
      0.12
    );

  border-radius:
    15px;

  pointer-events:
    none;
}


h1 {
  position:
    relative;

  z-index:
    2;

  margin:
    0;

  color:
    #f3d574;

  font-size:
    clamp(
      2rem,
      5vw,
      3rem
    );

  letter-spacing:
    0.1em;

  text-shadow:
    0 2px 0
    rgba(
      75,
      40,
      5,
      0.9
    ),
    0 6px 16px
    rgba(
      0,
      0,
      0,
      0.5
    );
}


.game {
  position:
    relative;

  z-index:
    2;

  margin:
    8px 0 30px;

  color:
    #d7b85e;

  font-size:
    0.9rem;

  font-weight:
    800;

  letter-spacing:
    0.18em;
}


h2 {
  position:
    relative;

  z-index:
    2;

  margin:
    28px 0 8px;

  color:
    #d8b65d;

  font-size:
    0.78rem;

  letter-spacing:
    0.12em;
}


p {
  position:
    relative;

  z-index:
    2;

  margin:
    7px 0;

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  font-size:
    0.95rem;

  color:
    #efe0b7;
}


.pucara {
  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    1.55rem;

  font-weight:
    900;

  letter-spacing:
    0.06em;

  color:
    #fff0ad;
}


a {
  color:
    #f3d574;

  text-decoration:
    none;
}


a:hover {
  text-decoration:
    underline;
}


.copyright {
  margin-top:
    34px;

  color:
    #a9986e;

  font-size:
    0.74rem;
}


.legal-back-button {
  position:
    fixed;

  right:
    24px;

  bottom:
    24px;

  z-index:
    100;

  display:
    inline-flex;

  align-items:
    center;

  justify-content:
    center;

  min-width:
    170px;

  min-height:
    46px;

  padding:
    8px 20px;

  border:
    1px solid
    #e2bf58;

  border-radius:
    11px;

  background:
    linear-gradient(
      180deg,
      #efd06b 0%,
      #b97d1f 100%
    );

  color:
    #281604;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    0.88rem;

  font-weight:
    800;

  letter-spacing:
    0.06em;

  cursor:
    pointer;

  box-shadow:
    inset 0 1px 0
    rgba(
      255,
      246,
      200,
      0.65
    ),
    0 10px 24px
    rgba(
      0,
      0,
      0,
      0.42
    );

  transition:
    transform 120ms ease,
    filter 120ms ease;
}


.legal-back-button:hover {
  filter:
    brightness(1.08);
}


.legal-back-button:active {
  transform:
    scale(0.97);
}


@media
  (max-width: 700px) {

  body {
    padding:
      18px
      12px
      82px;
  }


  main {
    width:
      100%;

    padding:
      24px
      18px
      30px;

    border-radius:
      16px;
  }


  h1 {
    font-size:
      1.8rem;
  }


  .legal-back-button {
    right:
      14px;

    bottom:
      14px;

    min-width:
      135px;

    min-height:
      42px;
  }

}

/* =========================================================
   A17.15
   RESULTADO
========================================================= */

.ludo-result-screen {
  position: absolute;

  inset: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  padding:
    18px;

  overflow: auto;

  background:
    #07110d;
}


.ludo-result-panel {
  width:
    min(
      90vw,
      450px
    );

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 14px;

  padding:
    22px;

  border:
    1px solid
    rgba(
      212,
      175,
      55,
      0.68
    );

  border-radius:
    18px;

  background:
    rgba(
      0,
      0,
      0,
      0.32
    );
}


.ludo-result-crown {
  width:
    min(
      26vw,
      125px
    );

  max-height:
    120px;

  object-fit: contain;
}


.ludo-result-title {
  margin: 0;

  text-align: center;

  font-size:
    clamp(
      1.1rem,
      2.6vw,
      1.7rem
    );

  color:
    #ead277;
}


.ludo-ranking {
  width: 100%;

  display: flex;

  flex-direction: column;

  gap: 7px;
}


.ludo-ranking-row {
  display: flex;

  align-items: center;
  justify-content: space-between;

  width: 100%;

  min-height:
    38px;

  padding:
    6px 12px;

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.12
    );

  border-radius:
    8px;
}


.ludo-ranking-position {
  font-weight: 800;

  color:
    #e5cc6b;
}


.ludo-ranking-color {
  font-weight: 700;

  letter-spacing:
    0.06em;
}


.ludo-result-actions {
  width: 100%;

  display: flex;

  gap: 10px;
}


.ludo-result-button {
  flex: 1;

  min-height:
    44px;

  padding:
    8px;

  border:
    1px solid
    rgba(
      212,
      175,
      55,
      0.55
    );

  border-radius:
    9px;

  background:
    rgba(
      0,
      0,
      0,
      0.3
    );

  color:
    #f3df99;

  font-weight: 700;

  cursor: pointer;
}


/* =========================================================
   A17.16
   LANDSCAPE BAJO
   ANDROID / TELÉFONO
========================================================= */

@media
  (orientation: landscape)
  and
  (max-height: 650px) {

 .ludo-start-screen {
  gap: 18px;
  padding: 8px 12px;
}




  .ludo-player-summary {
    min-height:
      15px;

    font-size:
      0.65rem;
  }


  .ludo-game {
    grid-template-columns:
      minmax(
        78px,
        1fr
      )
      minmax(
        260px,
        calc(
          100vh -
          12px
        )
      )
      minmax(
        78px,
        1fr
      );

    gap:
      4px;

    padding:
      6px 8px;
  }


  .ludo-board-stage {
    width:
      calc(
        100vh -
        12px
      );

    max-height:
      calc(
        100vh -
        12px
      );
  }


  .ludo-hud {
    padding:
      6px 2px;

    gap:
      4px;
  }


  .ludo-turn-label {
    font-size:
      0.72rem;
  }


  .ludo-status-label {
    min-height:
      25px;

    font-size:
      0.65rem;
  }


  .ludo-dice-button {
    width:
      clamp(
        104px,
        13vw,
        132px
      );

    min-height:
      42px;
  }


  .ludo-dice-area {
    margin:
      0;
  }


  .ludo-settings-screen {
    justify-content:
      flex-start;

    gap:
      7px;

    padding:
      7px 12px;
  }


  .ludo-settings-title {
    font-size:
      1rem;
  }


  .ludo-settings-section {
    width:
      min(
        94vw,
        620px
      );

    gap:
      7px;

    padding:
      8px 10px;
  }


  .ludo-settings-button {
    min-height:
      32px;

    padding:
      5px 10px;

    font-size:
      0.72rem;
  }


  .ludo-settings-control {
    flex-basis:
      180px;
  }


  }


  .ludo-result-panel {
    max-height:
      calc(
        100vh -
        12px
      );

    gap:
      8px;

    padding:
      10px 16px;
  }


  .ludo-result-crown {
    width:
      70px;

    max-height:
      60px;
  }


  .ludo-ranking-row {
    min-height:
      29px;

    padding:
      3px 10px;

    font-size:
      0.72rem;
  }


  .ludo-result-button {
    min-height:
      34px;

    font-size:
      0.72rem;
  }




/* =========================================================
   A17.17
   PANTALLAS PEQUEÑAS EN LANDSCAPE
========================================================= */

@media
  (orientation: landscape)
  and
  (max-width: 850px) {

  .ludo-game {
    grid-template-columns:
      82px
      minmax(
        260px,
        1fr
      )
      82px;

    gap:
      2px;
  }


  .ludo-piece {
    width:
      5.7%;

    height:
      5.7%;
  }


  .ludo-dice-button {
    width:
      104px;

    min-height:
      40px;

    font-size:
      0.7rem;
  }


  .ludo-dice-area {
    margin:
      0;
  }


  .ludo-turn-label {
    font-size:
      0.68rem;
  }


  .ludo-status-label {
    font-size:
      0.6rem;
  }

}


/* =========================================================
   A17.18
   PORTRAIT
   ANDROID VERTICAL
========================================================= */

@media
  (orientation: portrait) {

  .ludo-game {
    grid-template-columns:
      1fr;

    grid-template-rows:
      minmax(
        260px,
        1fr
      )
      auto
      auto;

    gap:
      10px;

    align-items:
      center;

    justify-items:
      center;

    overflow:
      hidden;

    padding:
      max(
        10px,
        env(safe-area-inset-top)
      )
      max(
        10px,
        env(safe-area-inset-right)
      )
      max(
        12px,
        env(safe-area-inset-bottom)
      )
      max(
        10px,
        env(safe-area-inset-left)
      );
  }


  .ludo-board-stage {
    grid-column:
      1;

    grid-row:
      1;

    align-self:
      end;

    width:
      min(
        96vw,
        69vh
      );

    max-height:
      69vh;
  }


  .ludo-dice-area {
    position:
      static;

    grid-column:
      1;

    grid-row:
      2;

    justify-self:
      center;

    margin:
      0;

    transform:
      none;
  }


  .ludo-dice-result-anchor {
    position:
      static;

    grid-column:
      1;

    grid-row:
      2;

    justify-self:
      center;

    margin:
      8px 0 0;

    transform:
      none;
  }


  .ludo-game-controls {
    position:
      static;

    grid-column:
      1;

    grid-row:
      3;

    justify-self:
      center;

    flex-direction:
      row;

    align-self:
      start;

    margin:
      0 0 4px;

    transform:
      none;

    gap:
      8px;
  }


  .ludo-game-control-button {
    width:
      52px;

    height:
      52px;
  }


  .ludo-start-screen {
    flex-direction:
      column;

    justify-content:
      flex-start;

    overflow:
      auto;
  }


  .ludo-start-header {
    flex:
      0 0 auto;

    width:
      min(
        94vw,
        520px
      );

    height:
      32vh;
  }


  .ludo-start-panel {
    flex:
      0 0 auto;

    width:
      min(
        92vw,
        430px
      );
  }

}


/* =========================================================
   A17.19
   ACCESIBILIDAD DE MOVIMIENTO
========================================================= */

@media
  (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration:
      0.01ms !important;

    animation-iteration-count:
      1 !important;

    transition-duration:
      0.01ms !important;
  }

}
/* =========================================================
   CONTROLES DE PARTIDA — PC / DIAGNÓSTICO
========================================================= */

.ludo-game-controls {

  position:
    absolute;

  left:
    max(
      10px,
      calc(
        50% -
        min(
          47vh,
          44vw
        ) -
        70px
      )
    );

  top:
    50%;

  transform:
    translateY(-50%);

  z-index:
    40;

  display:
    flex;

  flex-direction:
    column;

  align-items:
    center;

  gap:
    10px;

  margin:
    0;

}


.ludo-dice-turn-indicator {
  width:
    clamp(
      76px,
      7vw,
      92px
    );

  min-height:
    28px;

  display:
    grid;

  place-items:
    center;

  border:
    1px solid
    rgba(255, 226, 116, 0.75);

  border-radius:
    9px;

  background:
    rgba(5, 18, 12, 0.92);

  color:
    #ffe886;

  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.38),
    inset 0 0 12px rgba(255, 226, 116, 0.08);

  font-family:
    "Georgia",
    serif;

  font-size:
    0.58rem;

  font-weight:
    900;

  line-height:
    1;

  letter-spacing:
    0;

  text-align:
    center;

  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.72);
}


.ludo-dice-turn-indicator[data-color="red"] {
  background:
    linear-gradient(
      180deg,
      #8f1512,
      #3c0605
    );
}


.ludo-dice-turn-indicator[data-color="blue"] {
  background:
    linear-gradient(
      180deg,
      #0d4e9d,
      #061f48
    );
}


.ludo-dice-turn-indicator[data-color="green"] {
  background:
    linear-gradient(
      180deg,
      #136d34,
      #062d17
    );
}


.ludo-dice-turn-indicator[data-color="yellow"] {
  background:
    linear-gradient(
      180deg,
      #e0aa19,
      #805006
    );

  color:
    #1b1204;

  text-shadow:
    0 1px 1px rgba(255, 238, 170, 0.35);
}


.ludo-game-control-button {

  width:
    58px;

  height:
    58px;

  padding:
    0;

  border:
    0;

  border-radius:
    12px;

  background:
    transparent;

  cursor:
    pointer;

  overflow:
    visible;

  transition:
    transform 120ms ease,
    filter 120ms ease;

}


.ludo-game-control-button img {

  display:
    block;

  width:
    100%;

  height:
    100%;

  object-fit:
    contain;

  pointer-events:
    none;

}


.ludo-game-control-button:hover {

  transform:
    scale(1.06);

  filter:
    brightness(1.1);

}


.ludo-game-control-button:active {

  transform:
    scale(0.94);

}


.ludo-game-control-button.is-paused {

  filter:
    brightness(1.25);

  transform:
    scale(1.08);

}


/* =========================================================
   ANDROID PORTRAIT FINAL
========================================================= */

@media (orientation: portrait) {
  .ludo-game {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto 1fr;
    align-content: start;
    justify-content: center;
    justify-items: center;
    gap: 7px;
    overflow: hidden;
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  .ludo-board-stage {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    justify-self: center;
    width: min(99vw, 64vh);
    max-height: 64vh;
    margin-top: 12px;
  }

  .ludo-game-controls {
    position: static;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    justify-self: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    margin: 0;
    transform: none;
    z-index: 44;
  }

  .ludo-game-control-button {
    width: clamp(46px, 12.4vw, 54px);
    height: clamp(46px, 12.4vw, 54px);
  }

  .ludo-dice-area {
    position: static;
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    justify-self: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    transform: none;
    z-index: 42;
  }

  .ludo-dice-button {
    width: clamp(126px, 34vw, 148px);
    min-height: clamp(38px, 6vh, 46px);
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .ludo-dice-turn-indicator {
    width: clamp(82px, 23vw, 100px);
    min-height: 24px;
    font-size: 0.52rem;
  }

  .ludo-dice-result-anchor {
    position: absolute;
    left: 50%;
    top: min(48vh, 50vw);
    margin: 0;
    transform: translate(-50%, -50%);
  }
}


