:root {
    --bg: #c5c8e8;
    --bg-2: #e1e3f5;
    --season-bg-a: #9ea0c3;
    --season-bg-b: #b3adcF;
    --season-bg-c: #8f94bb;
    --ink: #30375d;
    --ink-soft: #596187;
    --accent: #8b85d9;
    --accent-dark: #6259ae;
    --panel: rgba(239, 238, 255, 0.62);
    --shadow: rgba(55, 53, 112, 0.24);
    --sparkle-a: none;
    --sparkle-b: none;
    --game-a: #8f7cf7;
    --game-b: #c8d0dc;
    --game-c: #efc1c6;
    --game-d: #7da7ff;
    --game-e: #a6a1f2;
    --game-f: #6659d8;
    --game-g: #c4b5ff;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255,.45), transparent 18%),
        radial-gradient(circle at 80% 15%, rgba(255, 255, 255,.28), transparent 14%),
        linear-gradient(180deg, var(--season-bg-a) 0%, var(--season-bg-b) 55%, var(--season-bg-c) 100%);
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .28;
    background-image:
        radial-gradient(rgba(255, 255, 255,.22) 0.6px, transparent 0.6px),
        radial-gradient(rgba(70, 68, 130,.05) 0.7px, transparent 0.7px);
    background-size: 14px 14px, 18px 18px;
    background-position: 0 0, 7px 8px;
}
.sparkles {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 74px;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: .92;
}
.sparkles img {
    display: block;
    width: 70px;
    height: auto;
    flex: 0 0 auto;
}
.sparkles-left { left: 2px; }
.sparkles-right { right: 2px; transform: scaleX(-1); }
.page-shell {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: 18px 22px 48px;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}
.top-pill {
    border: 2px solid rgba(111, 103, 175, .28);
    border-radius: 999px;
    padding: 11px 16px;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(180deg, #f0edff, #c5c3e8);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255,.8), 0 7px 18px var(--shadow);
    color: var(--ink);
    font: 700 18px/1 'Courier New', monospace;
    letter-spacing: .04em;
}
.top-pill--visits {
    width: 174px;
    justify-content: flex-start;
}
.top-pill--music {
    width: 248px;
    justify-content: space-between;
    cursor: pointer;
}
.top-pill:active,
.portal-button:active,
.pixel-btn:active {
    transform: translateY(2px);
}
.pill-icon { display: inline-flex; min-width: 20px; justify-content: center; }
.logo-title {
    margin: 16px 0 18px;
    text-align: center;
    font-size: clamp(48px, 8vw, 96px);
    line-height: 1;
    letter-spacing: .03em;
    color: #f0edff;
    text-shadow:
        0 2px 0 #8279c6,
        0 4px 0 #625a9d,
        0 6px 16px rgba(49, 46, 105, .3);
    font-weight: 700;
}
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.coverflow-wrap {
    position: relative;
    width: min(100%, 920px);
    min-height: 420px;
    margin-top: 8px;
    margin-bottom: 20px;
    perspective: 1300px;
    isolation: isolate;
    contain: layout paint;
}
.coverflow {
    position: relative;
    height: 400px;
    transform: translateZ(0);
    backface-visibility: hidden;
}
.coverflow-reflection {
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 12px;
    height: 58px;
    background: linear-gradient(180deg, rgba(255, 255, 255,.35), rgba(255, 255, 255,0));
    filter: blur(10px);
    border-radius: 50%;
    opacity: .7;
}
.coverflow-card {
    position: absolute;
    top: 22px;
    left: 50%;
    width: min(46vw, 390px);
    aspect-ratio: 1 / 1;
    border-radius: 22px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255,.5);
    box-shadow: 0 18px 36px rgba(45, 45, 99, .20);
    transition: transform .52s cubic-bezier(.22,.61,.36,1), opacity .42s ease;
    will-change: transform, opacity;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: #c4c8e9;
}
.coverflow-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.coverflow-card.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--ink-soft);
    text-align: center;
    font-size: 1.05rem;
    background: linear-gradient(180deg, #e8e8fa, #c4c6e9);
}
.coverflow-card[data-pos="0"] { z-index: 6; transform: translate3d(-50%,0,0) scale(1); opacity: 1; }
.coverflow-card[data-pos="-1"] { z-index: 5; transform: translate3d(calc(-50% - 250px),18px,0) rotateY(52deg) scale(.82); opacity: .95; }
.coverflow-card[data-pos="1"] { z-index: 5; transform: translate3d(calc(-50% + 250px),18px,0) rotateY(-52deg) scale(.82); opacity: .95; }
.coverflow-card[data-pos="-2"] { z-index: 4; transform: translate3d(calc(-50% - 380px),36px,0) rotateY(64deg) scale(.62); opacity: .72; }
.coverflow-card[data-pos="2"] { z-index: 4; transform: translate3d(calc(-50% + 380px),36px,0) rotateY(-64deg) scale(.62); opacity: .72; }
.coverflow-card[data-pos="-3"] { z-index: 2; transform: translate3d(calc(-50% - 500px),52px,0) rotateY(72deg) scale(.44); opacity: 0; }
.coverflow-card[data-pos="3"] { z-index: 2; transform: translate3d(calc(-50% + 500px),52px,0) rotateY(-72deg) scale(.44); opacity: 0; }
.coverflow-card.is-hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) scale(.4); }
.cta-row {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 8px 0 24px;
}
.portal-button {
    min-width: 210px;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    padding: 15px 20px;
    border-radius: 999px;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
    border: 2px solid rgba(104, 96, 170, .28);
    background: linear-gradient(180deg, #f0edff 0%, #c5c3e8 100%);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255,.85), 0 10px 20px rgba(65, 59, 130, .18);
    font: 700 clamp(18px, 2.2vw, 28px)/1.1 Georgia, serif;
}
.game-panel {
    max-width: 940px;
    margin: 14px auto 0;
}
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: clamp(20px, 3vw, 28px);
    margin-bottom: 16px;
}
.section-title-row h2 { margin: 0; }
.game-layout {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px;
}
.game-card {
    background: rgba(232, 232, 250, .85);
    border: 2px dashed rgba(111, 103, 175, .35);
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(55, 53, 112, .12), inset 0 1px 0 rgba(255, 255, 255,.75);
    padding: 16px;
    position: relative;
}
.game-card--board {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 530px;
}
#tetris-canvas {
    width: min(100%, 300px);
    height: auto;
    image-rendering: pixelated;
    background: linear-gradient(180deg, #f2f0ff, #d5d5f0);
    border: 3px solid rgba(104, 96, 170, .35);
    border-radius: 14px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255,.4);
}
.game-card--sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.game-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
}
.stat-box {
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255,.72), rgba(207, 207, 239,.75));
    border: 2px solid rgba(111, 103, 175, .20);
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}
.stat-label {
    font: 700 13px/1.1 'Courier New', monospace;
    text-transform: uppercase;
    color: var(--ink-soft);
    letter-spacing: .07em;
}
.stat-value {
    font: 700 28px/1 'Courier New', monospace;
}
#next-canvas {
    width: 72px;
    height: 72px;
    image-rendering: pixelated;
    align-self: center;
}
.controls-title, .controls-help { margin: 0; text-align: center; }
.controls-title { font-weight: 700; }
.pixel-controls { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.control-row { display: flex; gap: 12px; }
.pixel-btn {
    min-width: 72px;
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    padding: 10px 14px;
    background: linear-gradient(180deg, #eeeaff 0%, #aaa3e1 100%);
    color: var(--ink);
    font: 700 18px/1 'Courier New', monospace;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255,.85), 0 8px 16px rgba(65, 59, 130, .18);
    cursor: pointer;
    position: relative;
}
.pixel-btn::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 2px dashed rgba(111, 103, 175, .15);
    border-radius: 10px;
}
.pixel-btn--alt { background: linear-gradient(180deg, #dedcf4 0%, #aaa3dc 100%); }
.control-btn { width: 78px; height: 60px; font-size: 22px; }
.control-rotate { width: 112px; }
.leaderboard h3 { margin: 0 0 10px; text-align: center; }
#leaderboard-list { margin: 0; padding-left: 22px; display: grid; gap: 9px; }
#leaderboard-list li {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255,.5);
    display: grid;
    gap: 4px;
}
.record-topline { display: flex; justify-content: space-between; gap: 10px; }
.record-name { font-weight: 700; }
.record-meta { font-size: .88rem; color: var(--ink-soft); }
.site-footer { text-align: center; margin-top: 22px; color: var(--ink-soft); }
.site-footer p { margin: 8px 0; }

.game-start-overlay {
    position: absolute;
    inset: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(226, 225, 248, .76);
    backdrop-filter: blur(2px);
}
.start-game-btn {
    width: 52%;
    max-width: 230px;
    aspect-ratio: 1 / 1;
    border: 3px solid rgba(104, 96, 170, .28);
    border-radius: 50%;
    background: linear-gradient(180deg, #f4f1ff 0%, #bcb5e9 100%);
    box-shadow: inset 0 3px 0 rgba(255, 255, 255,.9), 0 14px 28px rgba(72, 63, 150, .22);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}
.start-game-btn:active { transform: translateY(2px) scale(.99); }
.start-game-icon {
    font: 700 52px/1 'Courier New', monospace;
    transform: translateX(4px);
}
.start-game-text {
    font: 700 18px/1 'Courier New', monospace;
    letter-spacing: .12em;
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: rgba(55, 53, 112, .34);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}
.hidden { display: none !important; }
.overlay-card {
    width: min(92%, 320px);
    background: linear-gradient(180deg, #eef0ff 0%, #c7c8ef 100%);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 20px 30px rgba(45, 45, 99, .22);
    text-align: center;
}
.overlay-card h3 { margin-top: 0; }
.overlay-card input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid rgba(104, 96, 170, .30);
    background: rgba(255, 255, 255,.78);
    font: 16px/1.2 'Courier New', monospace;
    color: var(--ink);
    margin: 8px 0 12px;
}
.overlay-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.overlay-msg { min-height: 1.2em; color: var(--ink-soft); font-size: .92rem; }
@media (max-width: 920px) {
    .coverflow-wrap { min-height: 350px; }
    .coverflow { height: 330px; }
    .coverflow-card { width: min(60vw, 360px); }
    .coverflow-card[data-pos="-1"] { transform: translate3d(calc(-50% - 160px),16px,0) rotateY(54deg) scale(.76); }
    .coverflow-card[data-pos="1"] { transform: translate3d(calc(-50% + 160px),16px,0) rotateY(-54deg) scale(.76); }
    .coverflow-card[data-pos="-2"] { transform: translate3d(calc(-50% - 255px),30px,0) rotateY(64deg) scale(.52); }
    .coverflow-card[data-pos="2"] { transform: translate3d(calc(-50% + 255px),30px,0) rotateY(-64deg) scale(.52); }
    .coverflow-card[data-pos="-3"] { transform: translate3d(calc(-50% - 335px),44px,0) rotateY(72deg) scale(.38); opacity: 0; }
    .coverflow-card[data-pos="3"] { transform: translate3d(calc(-50% + 335px),44px,0) rotateY(-72deg) scale(.38); opacity: 0; }
    .game-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .page-shell {
        padding: 10px 8px 30px;
        max-width: 100%;
    }

    .sparkles {
        width: 24px;
        opacity: .62;
    }
    .sparkles img { width: 24px; }

    .topbar {
        gap: 8px;
        margin-bottom: 4px;
    }
    .top-pill {
        min-height: 40px;
        padding: 7px 9px;
        font-size: 11px;
        border-radius: 999px;
    }
    .top-pill--visits { width: 108px; }
    .top-pill--music { width: 154px; }

    .logo-title {
        margin: 10px 0 12px;
        font-size: clamp(44px, 13vw, 66px);
    }

    .coverflow-wrap {
        min-height: 342px;
        width: 100%;
        overflow: visible;
        margin-bottom: 4px;
        perspective: 1200px;
    }
    .coverflow {
        height: 332px;
        overflow: visible;
    }
    .coverflow-card {
        width: min(68vw, 320px);
        border-radius: 18px;
    }
    .coverflow-card[data-pos="0"] {
        transform: translateX(-50%) translateZ(70px) scale(1.04);
    }
    .coverflow-card[data-pos="-1"] {
        transform: translateX(calc(-50% - 118px)) translateY(18px) rotateY(62deg) scale(.76);
        opacity: .94;
    }
    .coverflow-card[data-pos="1"] {
        transform: translateX(calc(-50% + 118px)) translateY(18px) rotateY(-62deg) scale(.76);
        opacity: .94;
    }
    .coverflow-card[data-pos="-2"] {
        transform: translateX(calc(-50% - 182px)) translateY(32px) rotateY(72deg) scale(.53);
        opacity: .46;
    }
    .coverflow-card[data-pos="2"] {
        transform: translateX(calc(-50% + 182px)) translateY(32px) rotateY(-72deg) scale(.53);
        opacity: .46;
    }
    .coverflow-card[data-pos="-3"] {
        transform: translateX(calc(-50% - 238px)) translateY(44px) rotateY(78deg) scale(.40);
        opacity: 0;
    }
    .coverflow-card[data-pos="3"] {
        transform: translateX(calc(-50% + 238px)) translateY(44px) rotateY(-78deg) scale(.40);
        opacity: 0;
    }

    .cta-row {
        width: 100%;
        gap: 9px;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        margin: 0 0 14px;
    }
    .portal-button {
        min-width: 0;
        width: auto;
        flex: 0 1 43%;
        max-width: 180px;
        padding: 10px 10px;
        font-size: clamp(15px, 3.9vw, 20px);
        border-radius: 999px;
        white-space: nowrap;
    }

    .game-panel {
        width: 100%;
        max-width: none;
        margin-top: 2px;
    }
    .section-title-row {
        margin-bottom: 8px;
        gap: 8px;
        font-size: clamp(19px, 5.5vw, 25px);
    }

    .game-layout {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .game-card {
        padding: 8px;
        border-radius: 16px;
    }

    .game-card--board {
        min-height: auto;
        width: 100%;
        order: 1;
    }

    #tetris-canvas {
        width: min(78vw, 330px);
        max-height: 50vh;
        height: auto;
    }

    .game-start-overlay { inset: 8px; }
    .start-game-btn {
        width: 36%;
        max-width: 150px;
    }
    .start-game-icon { font-size: 38px; }
    .start-game-text { font-size: 14px; }

    .game-card--sidebar {
        order: 2;
        width: 100%;
        gap: 7px;
        padding-top: 7px;
    }

    .game-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 5px;
    }
    .stat-box {
        min-height: 54px;
        height: 54px;
        padding: 5px 4px;
        border-radius: 9px;
        text-align: center;
        align-items: center;
        justify-content: center;
        gap: 2px;
    }
    .stat-label {
        font-size: 7px;
        line-height: 1;
        letter-spacing: .02em;
        white-space: nowrap;
    }
    .stat-value {
        font-size: 17px;
        line-height: 1;
    }
    #next-canvas {
        width: 38px;
        height: 38px;
    }

    .game-controls {
        margin-top: 0;
    }
    .controls-title {
        font-size: 15px;
        margin-bottom: 4px;
    }
    .pixel-controls {
        gap: 5px;
    }
    .control-row {
        gap: 6px;
    }
    .pixel-btn {
        min-height: 42px;
        padding: 6px 8px;
        border-radius: 11px;
    }
    .control-btn {
        width: 58px;
        height: 42px;
        min-width: 58px;
        font-size: 18px;
    }
    .control-rotate {
        width: 82px;
    }
    .controls-help {
        font-size: 10px;
        margin-top: 4px;
    }

    .leaderboard {
        margin-top: 10px;
    }
    .leaderboard h3 {
        font-size: 21px;
        margin-bottom: 7px;
    }
    #leaderboard-list {
        gap: 6px;
    }

    .site-footer {
        margin-top: 14px;
        font-size: 11px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .coverflow-card, .top-pill, .portal-button, .pixel-btn { transition: none !important; }
}

.shake-temp { animation: shakeTemp .4s linear; }
@keyframes shakeTemp { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-2px); } 50% { transform: translateX(2px); } 75% { transform: translateX(-1px); } }


/* ===== TZATZY MOBILE GAME COMPACT OVERRIDE v2.0.20 ===== */
@media screen and (max-width: 680px) {
  .game-panel {
    width: 100% !important;
    margin-top: 0 !important;
  }

  .game-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }

  .game-card--board {
    width: 100% !important;
    min-height: 0 !important;
    padding: 6px !important;
  }

  #tetris-canvas {
    display: block !important;
    width: min(72vw, 23vh, 300px) !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 1 / 2 !important;
    margin: 0 auto !important;
  }

  .game-start-overlay {
    inset: 6px !important;
  }

  .start-game-btn {
    width: 34% !important;
    max-width: 135px !important;
  }

  .game-card--sidebar {
    width: 100% !important;
    padding: 6px !important;
    gap: 5px !important;
  }

  .game-stats {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
  }

  .stat-box {
    min-width: 0 !important;
    width: auto !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 3px 2px !important;
    border-radius: 8px !important;
    gap: 1px !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .stat-label {
    font-size: 6.5px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  .stat-value {
    font-size: 15px !important;
    line-height: 1 !important;
  }

  #next-canvas {
    width: 32px !important;
    height: 32px !important;
  }

  .game-controls {
    margin: 0 !important;
  }

  .controls-title {
    margin: 2px 0 3px !important;
    font-size: 13px !important;
    line-height: 1 !important;
  }

  .pixel-controls {
    gap: 4px !important;
  }

  .control-row {
    gap: 5px !important;
  }

  .pixel-btn.control-btn {
    width: 52px !important;
    min-width: 52px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 4px !important;
    font-size: 17px !important;
    border-radius: 10px !important;
  }

  .pixel-btn.control-rotate {
    width: 72px !important;
    min-width: 72px !important;
  }

  .controls-help {
    margin: 2px 0 0 !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
  }

  .leaderboard {
    margin-top: 12px !important;
  }

  .site-footer {
    margin: 12px 0 0 !important;
    font-size: 12px !important;
  }
}

/* Extra tightening for shorter phones */
@media screen and (max-width: 680px) and (max-height: 800px) {
  #tetris-canvas {
    width: min(66vw, 21vh, 270px) !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 1 / 2 !important;
  }

  .stat-box {
    height: 44px !important;
    min-height: 44px !important;
  }

  .pixel-btn.control-btn {
    height: 34px !important;
    min-height: 34px !important;
  }
}


/* Evita que la composición 3D del Cover Flow repinte/parpadee el contenido inferior en Android WebView. */
.cta-row,
.section-title-row,
.game-panel {
    position: relative;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}


/* ===== FIX v2.0.26: capa táctil del Mini Cat Game ===== */
.cta-row {
    position: relative;
    z-index: 2;
}
.game-panel {
    position: relative;
    z-index: 20;
    isolation: isolate;
}
.game-card--board {
    position: relative;
    z-index: 21;
}
.game-start-overlay {
    z-index: 50 !important;
    pointer-events: auto;
}
.start-game-btn {
    position: relative;
    z-index: 51;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}


/* ===== TZATZY v2.0.27 — Mini Cat Game azul/morado ===== */
.game-card {
    background: rgba(224, 226, 250, .90) !important;
    border-color: rgba(111, 103, 175, .40) !important;
    box-shadow:
        0 12px 28px rgba(55, 53, 112, .14),
        inset 0 1px 0 rgba(255,255,255,.82) !important;
}

#tetris-canvas {
    background: linear-gradient(180deg, #eef0ff 0%, #c9cef2 100%) !important;
    border-color: rgba(104,96,170,.42) !important;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.50) !important;
}

.game-start-overlay {
    background: rgba(218, 220, 247, .80) !important;
}

.start-game-btn {
    background: linear-gradient(180deg, #f2efff 0%, #aaa3e1 100%) !important;
    border-color: rgba(104,96,170,.35) !important;
    box-shadow:
        inset 0 3px 0 rgba(255,255,255,.90),
        0 14px 28px rgba(72,63,150,.22) !important;
}

.game-overlay {
    background: rgba(55,53,112,.38) !important;
}

.overlay-card {
    background: linear-gradient(180deg, #eef0ff 0%, #c7c8ef 100%) !important;
    box-shadow: 0 20px 30px rgba(45,45,99,.24) !important;
}

.overlay-card input {
    border-color: rgba(104,96,170,.30) !important;
    background: rgba(255,255,255,.84) !important;
}

.stat-box,
.game-controls,
.leaderboard {
    background: rgba(239,238,255,.76) !important;
    border-color: rgba(111,103,175,.28) !important;
}

.pixel-btn,
.control-btn {
    background: linear-gradient(180deg, #edeaff 0%, #b9b5eb 100%) !important;
    border-color: rgba(104,96,170,.36) !important;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,.82),
        0 5px 10px rgba(65,59,130,.15) !important;
    color: #30375d !important;
    position: relative;
    z-index: 60;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.pixel-btn:active,
.control-btn:active {
    background: linear-gradient(180deg, #dcd8fb 0%, #9d96dc 100%) !important;
}

.game-controls,
.pixel-controls,
.control-row {
    position: relative;
    z-index: 55;
    pointer-events: auto;
}

/* ===== TZATZY v2.0.32 — botones rediseñados, compactos y sin parches =====
   Partimos de la base estable 2.0.29. Solo cambia la estética de los botones.
   Sin sombras exteriores: evita la 'repisa' o borde plano que Android/WebView
   llegaba a dibujar en la parte inferior. */
.top-pill,
.portal-button,
.start-game-btn {
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    overflow: hidden;
    background-clip: padding-box;
    box-shadow: none !important;
    outline: none;
}

/* Contador / reproductor: cápsula baja, no 'gordita'. */
.top-pill {
    min-height: 46px;
    padding: 8px 15px;
    border: 1px solid rgba(104, 96, 170, .26);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248,246,255,.98) 0%, rgba(222,219,246,.98) 100%);
}
.top-pill:active {
    transform: translateY(1px);
    background: linear-gradient(180deg, #efecfb 0%, #d4d0ef 100%);
}

/* Alfonso / Jesús: misma familia, ligeramente más altos que la barra superior. */
.portal-button {
    border: 1px solid rgba(104, 96, 170, .26);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248,246,255,.98) 0%, rgba(222,219,246,.98) 100%);
    box-shadow: none !important;
}
.portal-button:active {
    transform: translateY(1px);
    background: linear-gradient(180deg, #efecfb 0%, #d4d0ef 100%);
}

/* JUGAR: círculo geométrico limpio, sin halo/sombra inferior. */
.start-game-btn {
    width: 176px;
    height: 176px;
    max-width: 176px;
    aspect-ratio: auto;
    flex: 0 0 auto;
    padding: 0;
    border: 2px solid rgba(104, 96, 170, .30);
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(247,244,255,.98) 0%, rgba(211,206,241,.98) 100%) !important;
    box-shadow: none !important;
}
.start-game-btn:active {
    transform: scale(.985);
    background: linear-gradient(180deg, #ece8fb 0%, #c8c2ea 100%) !important;
}

@media (max-width: 680px) {
    .top-pill {
        min-height: 40px;
        height: 40px;
        padding: 6px 10px;
        border-radius: 15px;
    }
    .top-pill--visits { width: 108px; }
    .top-pill--music { width: 154px; }

    .portal-button {
        min-height: 42px;
        padding: 9px 10px;
        border-radius: 16px;
    }

    .start-game-btn {
        width: 118px;
        height: 118px;
        max-width: 118px;
    }
    .start-game-icon {
        font-size: 36px;
    }
    .start-game-text {
        font-size: 13px;
    }
}
