@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #090012;
    --panel: #12051f;
    --panel-2: #211033;
    --text: #f8f0ff;
    --muted: #b8a7c9;
    --accent: #c084fc;
    --accent-2: #e9d5ff;
    --danger: #fb7185;
    --success: #a78bfa;
    --line: #4c1d95;
    --cell-empty: #f3e8ff;
    --cell-filled: #6d28d9;
    --cell-mark: #7e22ce;
}

* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inconsolata, Arial, Helvetica, sans-serif;
    background: radial-gradient(circle at 18% 14%, rgba(192, 132, 252, 0.28), transparent 24%),
    radial-gradient(circle at 82% 74%, rgba(126, 34, 206, 0.3), transparent 30%),
    linear-gradient(rgba(5, 0, 15, 0.78), rgba(7, 0, 17, 0.96)),
    repeating-linear-gradient(
            90deg,
            rgba(192, 132, 252, 0.15) 0px,
            rgba(192, 132, 252, 0.15) 1px,
            transparent 1px,
            transparent 42px
    ),
    repeating-linear-gradient(
            0deg,
            rgba(168, 85, 247, 0.11) 0px,
            rgba(168, 85, 247, 0.11) 1px,
            transparent 1px,
            transparent 42px
    ),
    linear-gradient(135deg, #05000d, #160326 48%, #020008);
    color: var(--text);
    position: relative;
    overflow-x: hidden;
}

button, input {
    font: inherit;
}

.app {
    width: min(1040px, 100%);
    margin: 0 auto;
    padding: 28px 16px;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.card {
    width: min(680px, 100%);
    margin: 60px auto;
    padding: 34px;
    border: none;
    /*border-radius: 24px;*/
    background: transparent;
    /*box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);*/
}

body.page-register .app,
body.page-test .app {
    padding: clamp(10px, 2.5vh, 28px) 16px;
}

#registerScreen .card {
    margin: clamp(16px, 3.5vh, 60px) auto;
    padding: clamp(16px, 3vh, 34px) 34px;
}

#registerScreen .card > img {
    display: block;
    width: auto;
    max-width: min(760px, calc(100vw - 32px));
    height: auto;
    max-height: clamp(110px, 20vh, 386px);
    margin-left: 50%;
    transform: translateX(-50%);
}

#registerScreen .form {
    margin-top: clamp(10px, 2vh, 26px);
    gap: clamp(8px, 1.2vh, 12px);
}

/*┃#registerScreen .card > img {*/
/*   display: block;*/
/*   width: 100%;*/
/*   height: auto;*/
/*   margin-inline: auto;*/
/* }*/

#registerForm input,
#registerForm input:focus {
    border-color: #fff;
    border-radius: 0;
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text);
    cursor: pointer;
}

.consent-check a {
    color: var(--accent);
    text-decoration: underline;
}

.consent-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    padding: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.register-actions {
    display: grid;
    gap: 12px;
}

.register-actions .btn {
    width: 100%;
}

.register-secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.register-secondary-actions #lookupResultBtn {
    margin-top: 0;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 800;
}

.game-over-title {
    display: block;
    width: 100%;
    margin: 18px 0 14px;
    font-family: "Press Start 2P", monospace;
    text-align: center;
    text-transform: uppercase;
    color: var(--danger);
    letter-spacing: 0.04em;
    font-size: clamp(1.5rem, 8vw, 3.4rem);
    line-height: 1.15;
    text-shadow: 0 0 18px rgba(251, 113, 133, 0.55), 0 4px 0 rgba(0, 0, 0, 0.4);
}

h1, h2 {
    margin: 0 0 14px;
}

h1 {
    font-size: clamp(2.4rem, 7vw, 4.3rem);
}

h2 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.intro, .muted {
    color: var(--muted);
    line-height: 1.6;
}

.puzzle-name {
    margin: -6px 0 0;
    color: var(--muted);
}

.form {
    margin-top: 26px;
    display: grid;
    gap: 12px;
}

label {
    font-weight: 800;
}

input {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #020617;
    color: var(--text);
    outline: none;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.error {
    min-height: 18px;
    color: var(--danger);
}

.btn, .tool {
    border: 0;
    border-radius: 14px;
    padding: clamp(8px, 1.6vh, 12px) clamp(12px, 2.4vw, 17px);
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
    transition: 0.18s ease;
}

.btn:hover:not(:disabled), .tool:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.primary {
    background: var(--accent);
    color: white;
}

.secondary {
    background: #334155;
    color: white;
}

.ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

.danger {
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.second {
    background: transparent;
    color: #FFFFFF;
    border: 1px solid #FFFFFF;
    border-radius: 0;
    font-family: "Press Start 2P", monospace;
    font-size: clamp(0.85rem, min(4vw, 3vh), 24px);
}

#gameScreen .second {
    background: #000000;
}

.rules {
    --rules-size: clamp(1.5rem, 4vw, 2.125rem);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "Press Start 2P", monospace;
    font-size: clamp(0.85rem, min(4vw, 3vh), 25px);
    line-height: 1;
    background-color: #EE58DB;
    padding: 5px;
    color: white;
    text-transform: uppercase;
}

.rules img {
    width: auto;
    height: var(--rules-size);
}

.toolbar-rules {
    display: flex;
    justify-content: end;
    width: 100%;
    margin-top: clamp(2px, 1vh, 3px);
    margin-bottom: clamp(2px, 1vh, 3px);
}

.menu-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
}


.hidden {
    display: none;
}

.game-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    margin: 0 auto clamp(4px, 1.8vh, 8px);
    text-align: center;
}

.game-title #modeLabel {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: clamp(1.1rem, 4vw, 2rem);
    line-height: 1.2;
}

.game-header {
    padding: 0;
}

.game-info-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
}

.game-player-column {
    width: 60%;
}

.game-time-column {
    width: 20%;
}

.game-errors-column {
    width: 20%;
}

.game-info-table th,
.game-info-table td {
    padding: clamp(3px, 1.5vh, 7px) 8px;
    border: 0;
    background: #000000;
    text-align: center;
}

.game-info-label {
    font-size: clamp(0.58rem, 1.8vw, 0.78rem);
    font-weight: 700;
    color: #FFFFFF;
}

/* tbody td {*/
/*  border: 1px solid #FFFFFF;*/

/*}*/

.game-info-table tbody tr:first-child td {
    border-top: 1px solid #FFFFFF;
}

.game-info-table tbody tr:last-child td {
    border-bottom: 1px solid #FFFFFF;
}

.game-info-table tbody td:first-child {
    border-left: 1px solid #FFFFFF;
}

.game-info-table tbody td:last-child {
    border-right: 1px solid #FFFFFF;
}

.game-info-table th:first-child,
.game-info-table td:first-child {
    text-align: left;
    padding-left: 4px;
}

.game-player-value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-width: 0;
}

.game-info-value-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

.game-info-value-wrap img {
    width: clamp(18px, 3vw, 24px);
    height: clamp(18px, 3vw, 24px);
    flex-shrink: 0;
}

.game-info-name {
    min-width: 0;
    font-size: clamp(0.9rem, 2.5vw, 1.35rem);
    overflow-wrap: anywhere;
    font-family: "Press Start 2P", monospace;
}

.game-info-value {
    min-width: 0;
    font-size: clamp(0.62rem, 2.5vw, 1.35rem);
    white-space: nowrap;
    font-family: "Press Start 2P", monospace;
}

@media (max-width: 420px) {
    .game-info-value-wrap img {
        display: none;
    }
}

.game-header .puzzle-name {
    margin: 14px 0 0;
    text-align: center;
}

#timer.warning {
    color: #facc15;
    animation: pulse 0.8s infinite alternate;
}

#timer.danger-time {
    color: #f87171;
    animation: pulse 0.45s infinite alternate;
}

@keyframes pulse {
    from {
        opacity: 0.65;
    }
    to {
        opacity: 1;
    }
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: clamp(6px, 1.8vh, 8px) 0;
}

#gameScreen .toolbar > .btn {
    flex: 1 1 0;
    min-width: 0;
}

#gameScreen .btn,
#gameScreen .rules {
    padding-top: clamp(4px, 1.6vh, 8px);
    padding-bottom: clamp(4px, 1.6vh, 8px);
}

#finishTestBtn {
    display: block;
    width: 100%;
}

.tool {
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
}

.tool.active {
    background: var(--accent);
    border-color: var(--accent);
}

.message {
    min-height: 44px;
    margin: 10px 0 16px;
    padding: 12px 16px;
    border-radius: 16px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.message.success {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.35);
}

.message.error {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.35);
}

.board-wrap {
    overflow: auto;
    /*padding: 20px;*/
    /*border-radius: 24px;*/
    /*background: rgba(2, 6, 23, 0.72);*/
    border: 1px solid #FFFFFF;
}

.nonogram {
    display: grid;
    width: max-content;
    margin: 0 auto;
    user-select: none;
}

.corner, .clue-top, .clue-left, .cell {
    border: 1px solid var(--line);
}

.corner {
    background: #0f172a;
}

.clue-top, .clue-left {
    background: #111827;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px;
    font-size: 0.82rem;
    line-height: 1.1;
}

.clue-top {
    flex-direction: column;
}

.clue-left {
    justify-content: flex-end;
    gap: 4px;
    padding-right: 8px;
}

/* Puzzle cells are plain <button>/<input> elements; reset native OS form-control
   rounding so they stay square instead of looking like circles at small sizes. */
.cell,
.corner,
.clue-top,
.clue-left,
.number-cell,
.number-cell-wrap,
.puzzle-toggle-cell,
.sudoku-cell,
.number-puzzle-cell,
.skyscraper-cell,
.mine-cell,
.mine-clue-cell,
.mine-clue,
.kakuro-block,
.kakuro-clue,
.hitori-cell,
.akari-block,
.akari-cell,
.numberlink-cell,
.endograma-clue,
.endograma-corner,
.sky-clue,
.sudoku-preview-cell,
.test-cell,
.test-input,
.test-clue,
.answer-cell,
.kenken-wrap,
.kenken-wrap input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-radius: 0;
}

.cell {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    background: var(--cell-empty);
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--cell-mark);
    font-size: clamp(10px, min(4.9vw, 2.35vh), 34px);
    font-weight: 900;
}

.cell.filled {
    background: var(--cell-filled);
}

.cell.marked::after {
    content: "×";
}

.cell.error-cell {
    outline: 3px solid var(--danger);
    outline-offset: -3px;
}

.game-footer {
    color: var(--muted);
    text-align: center;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    align-items: safe center;
    justify-content: center;
    padding: 18px;
    background: rgba(2, 6, 23, 0.78);
    z-index: 10;
    overflow-y: auto;
}

.modal.show {
    display: flex;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: min(900px, 100%);
    max-height: 88vh;
    overflow: auto;
    box-sizing: border-box;
    padding: clamp(16px, 4vw, 30px) clamp(16px, 8vw, 70px);
    /*border-radius: 24px;*/
    /*background: #111827;*/
    border: 1px solid #FFFFFF;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.modal-content-warning {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: min(700px, 100%);
    max-height: 88vh;
    overflow: auto;
    box-sizing: border-box;
    padding: clamp(16px, 4vw, 30px) clamp(16px, 8vw, 70px);
    /*border-radius: 24px;*/
    /*background: #111827;*/
    /*border: 1px solid #FFFFFF;*/
    /*box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);*/
}

#scoreScreen {
    text-align: center;
    padding: clamp(14px, 3vh, 40px) 16px;
    min-height: calc(100vh - 2 * clamp(10px, 2.5vh, 28px));
    box-sizing: border-box;
}

#scoreScreen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.menu-result-card {
    width: min(860px, 100%);
    background: #000000;
    color: #FFFFFF;
    font-family: "Press Start 2P", monospace;
    gap: 22px;
}

.menu-result-card .register-actions p {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.7;
    text-align: center;
}

.score-result-card {
    width: min(960px, 100%);
    max-height: none;
    overflow: visible;
    margin: 0 auto;
    text-align: left;
    background: #000000;
    color: #FFFFFF;
    font-family: "Press Start 2P", monospace;
    gap: clamp(12px, 3vh, 28px);
}

a {
    text-decoration: none;
}

.highscore-card {
    width: min(820px, 100%);
    max-height: none;
    overflow: visible;
    margin: 0 auto;
    text-align: left;
    background: #000000;
    color: #FFFFFF;
    font-family: "Press Start 2P", monospace;
    gap: clamp(10px, 2.5vh, 22px);
}

.highscore-logo {
    display: block;
    width: min(360px, 80%);
    height: auto;
    margin: 0 auto;
}

.highscore-title {
    width: 100%;
    margin: 0;
    text-align: center;
    color: #EE58DB;
    font-size: clamp(2rem, 6vw, 3rem);
}

.highscore-top5 {
    width: 100%;
}

.highscore-top5-label {
    margin: 0 0 14px;
    color: #FFFFFF;
    font-size: 0.95rem;
}

.highscore-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 3ch minmax(0, 1fr) auto auto;
    column-gap: 16px;
    row-gap: clamp(6px, 1.6vh, 16px);
}

.highscore-list li {
    display: contents;
}

.highscore-list li > span {
    color: #FFFFFF;
    font-size: clamp(0.85rem, 2.4vw, 1.1rem);
    align-self: baseline;
}

.highscore-list li.is-player > span {
    color: #22c55e;
    font-weight: 700;
}

.highscore-list li.highscore-header > span {
    color: #a1a1aa;
    font-size: 0.7em;
    letter-spacing: 0.05em;
    text-align: center;
}

.highscore-rank {
    flex-shrink: 0;
}

.highscore-name {
    overflow-wrap: anywhere;
    min-width: 0;
}

.highscore-points {
    flex-shrink: 0;
    text-align: right;
}

.highscore-time {
    flex-shrink: 0;
    color: #a1a1aa;
    font-size: 0.85em;
    text-align: right;
}

.highscore-yourank {
    width: 100%;
}

.highscore-yourank-label {
    margin: 0 0 14px;
    color: #FFFFFF;
    font-size: 0.95rem;
}

#info {
    font-family: "Press Start 2P", monospace;
}

.highscore-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: clamp(8px, 1.6vh, 14px);
}

.solution-play-again-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    flex: 0 0 auto;
}

#solutionPlayAgainBtn,
#playAgainBtn,
#registerNowBtn,
#registerNowBtnScore {
    flex: 0 0 auto;
    width: 100%;
}

.highscore-actions .btn {
    flex: 0 0 auto;
    text-align: center;
}

.highscore-lives {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    color: #FFFFFF;
    font-size: clamp(0.85rem, 2.4vw, 1.05rem);
}

.highscore-heart {
    color: #FFFFFF;
    font-family: Inconsolata, Arial, "Segoe UI Symbol", sans-serif;
    font-size: 1.3em;
    line-height: 1;
}

.highscore-heart-img {
    height: 1.2em;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.solution-badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 8px;
    font-family: "Press Start 2P", monospace;
}

.solution-badge-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

.solution-badge-text {
    font-size: 20px;
    line-height: 1;
    color: #FFFFFF;
}

.solution-outcome-title {
    width: 100%;
    margin: 0 0 8px;
    text-align: center;
    font-size: clamp(1.4rem, 5vh, 40px);
}

#solutionResultCard {
    width: min(1300px, 96vw);
}

.score-result-card.is-win .solution-outcome-title {
    color: #22c55e;
}

.score-result-card.is-over .solution-outcome-title {
    color: #ef4444;
}

.solution-result-text {
    width: 100%;
    text-align: center;
}

.solution-result-text p {
    margin: clamp(4px, 1.2vh, 12px) 0;
    color: #FFFFFF;
    line-height: 1.4;
}

#solutionResultLine1 {
    font-size: clamp(1.1rem, 3.8vh, 30px);
}

#solutionResultLine2 {
    font-size: clamp(0.85rem, 2.5vh, 20px);
    font-family: Inconsolata, Arial, Helvetica, sans-serif;
}

.exit-warning-notice {
    width: 100%;
    margin: clamp(8px, 1.5vh, 16px) 0 0;
    padding: clamp(8px, 1.2vh, 12px) 14px;
    border: 1px solid #fc54e4;
    border-radius: 8px;
    font-family: Inconsolata, Arial, Helvetica, sans-serif;
    font-size: clamp(0.75rem, 1.8vh, 14px);
    line-height: 1.4;
    text-align: center;
}

.exit-warning-notice strong {
    color: #fc54e4;
}

#scoreExitWarning,
#solutionExitWarning {
    text-align: justify;
}

#scoreExitWarning strong,
#solutionExitWarning strong {
    display: block;
    text-align: center;
    font-family: "Press Start 2P", monospace;
    font-size: clamp(0.85rem, min(4vw, 3vh), 24px);
}

.info {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Press Start 2P", monospace;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
}

.modal-content p, .modal-content li {
    color: white;
    line-height: 1.6;
    font-weight: bold;
}

#helpModal .modal-content {
    background: #000000;
    color: #FFFFFF;
    align-items: stretch;
}

#helpModal .modal-content p,
#helpModal .modal-content li,
#helpModal #helpRulesContent,
#helpModal #helpRulesContent * {
    color: #FFFFFF;
}

#helpModal #helpRulesContent {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
}

#closeHelp img {
    width: 22px;
    height: 22px;
}

.help-title-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0;
}

.help-title-row img {
    width: clamp(24px, 4vw, 32px);
    height: clamp(24px, 4vw, 32px);
    flex-shrink: 0;
}

#helpTitle {
    margin: 0;
    text-align: left;
    color: #FFFFFF;
}

.example, .result-details {
    margin-top: 18px;
    padding: 14px;
    border-radius: 16px;
    background: #020617;
    border: 1px solid var(--line);
}

.table-wrap {
    overflow-x: auto;
    margin-top: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 0.9rem;
}

th {
    color: var(--accent-2);
    background: #020617;
}

td {
    color: #e2e8f0;
}

@media (max-width: 760px) {
    .card {
        margin: 35px auto;
        padding: 24px;
    }

    .game-header {
        padding: 0;
    }

    .cell {
        width: 34px;
        height: 34px;
    }

    .clue-left, .clue-top {
        font-size: 0.72rem;
    }
}

body::before {
    content: "01010101  AI  TALENT  HACKATHON  2026  ACCESS  NODE  DATA  CYPHER  10101010  SYSTEM  LOGIC  CODE  0110";
    position: fixed;
    inset: -20%;
    z-index: -2;
    color: rgba(216, 180, 254, 0.12);
    font-family: Inconsolata, monospace;
    font-size: 20px;
    line-height: 2;
    letter-spacing: 0.24em;
    word-spacing: 1.8em;
    transform: rotate(-10deg) scale(1.2);
    pointer-events: none;
    white-space: pre-wrap;
    text-shadow: 0 0 12px rgba(192, 132, 252, 0.45);
}

.card,
.board-wrap,
.modal-content {
    backdrop-filter: blur(10px);
}

.cell.filled {
    background: #16a34a;
    box-shadow: inset 0 0 0 1px rgba(187, 247, 208, 0.35), 0 0 10px rgba(34, 197, 94, 0.28);
}

.tool.active,
.primary {
    background: linear-gradient(135deg, #16a34a, #0ea5e9);
}

.eyebrow {
    color: #86efac;
}

th {
    color: #86efac;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 0 48%, rgba(192, 132, 252, 0.26) 49%, transparent 50% 100%),
    linear-gradient(0deg, transparent 0 48%, rgba(168, 85, 247, 0.18) 49%, transparent 50% 100%),
    repeating-linear-gradient(
            180deg,
            rgba(216, 180, 254, 0.05) 0px,
            rgba(216, 180, 254, 0.05) 2px,
            transparent 2px,
            transparent 8px
    );
    opacity: 0.58;
    mix-blend-mode: screen;
}

/*.board-wrap,*/
/*.modal-content {*/
/*  border-color: rgba(34, 197, 94, 0.28);*/
/*  box-shadow:*/
/*    0 24px 70px rgba(0, 0, 0, 0.34),*/
/*    0 0 28px rgba(34, 197, 94, 0.08),*/
/*    inset 0 0 0 1px rgba(14, 165, 233, 0.08);*/
/*}*/

.board-wrap {
    box-shadow: 0 0 34px rgba(14, 165, 233, 0.12),
    inset 0 0 28px rgba(34, 197, 94, 0.06);
}

.cell {
    border-color: rgba(14, 165, 233, 0.35);
}

.solution-comparison {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 70px;
    margin-top: clamp(6px, 2vh, 20px);
}

.solution-comparison > div:first-child {
    padding-right: 35px;
    border-right: 2px solid rgba(255, 255, 255, 0.18);
}

.solution-comparison h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 12px;
    color: #FFFFFF;
    font-size: 1rem;
}

.solution-score-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 70px;
    margin-top: clamp(6px, 2vh, 20px);
    font-family: "Press Start 2P", monospace;
    color: #FFFFFF;
}

.solution-score-label,
.solution-score-value {
    font-size: clamp(1.1rem, 3.8vh, 30px);
    text-align: center;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(7, clamp(10px, 9vw, 20px));
    grid-template-rows: repeat(7, clamp(10px, 9vw, 20px));
    gap: 3px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(34, 197, 94, 0.28);
    max-width: 100%;
    width: max-content;
}

.preview-cell {
    box-sizing: border-box;
    border-radius: 0;
    background: rgba(226, 232, 240, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.preview-cell.active-cell {
    background: #16a34a;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
}

.preview-cell.wrong-cell {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

.preview-cell.missed-cell {
    background: #facc15;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
}

.preview-cell.marked-cell {
    background: rgba(14, 165, 233, 0.35);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    color: var(--muted);
}

.legend-box {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 4px;
    vertical-align: middle;
}

@media (max-width: 760px) {
    .solution-comparison {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .solution-comparison > div:first-child {
        padding-right: 0;
        padding-bottom: 20px;
        border-right: none;
        border-bottom: 2px solid rgba(255, 255, 255, 0.18);
    }

    .solution-score-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    #solutionResultLine1 {
        font-size: clamp(1rem, 8vw, 30px);
    }

    #solutionResultLine2 {
        font-size: clamp(0.6rem, 5vw, 10px);
    }

    .solution-badge-img,
    .solution-badge-text {
        width: auto;
        font-size: clamp(1rem, 8vw, 30px);
    }

    .solution-badge-img {
        width: clamp(1rem, 8vw, 30px);
        height: clamp(1rem, 8vw, 30px);
    }

    .solution-outcome-title {
        font-size: clamp(1.8rem, 12vw, 80px);
    }
}

/*.game-header,*/
/*.board-wrap,*/
/*.modal-content {*/
/*  border-color: rgba(192, 132, 252, 0.34);*/
/*  box-shadow:*/
/*    0 24px 70px rgba(0, 0, 0, 0.42),*/
/*    0 0 34px rgba(168, 85, 247, 0.12),*/
/*    inset 0 0 0 1px rgba(216, 180, 254, 0.08);*/
/*}*/

.board-wrap {
    border: 1px solid #fff;
    box-shadow: none;
}

.cell {
    border-color: rgba(192, 132, 252, 0.38);
    transition: transform 0.12s ease,
    filter 0.12s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.cell:hover {
    transform: scale(0.94);
    filter: saturate(0.72) brightness(0.88);
    opacity: 0.78;
    box-shadow: inset 0 0 16px rgba(76, 29, 149, 0.35),
    0 0 16px rgba(192, 132, 252, 0.34);
}

.cell.hover-decay {
    background: linear-gradient(135deg, rgba(216, 180, 254, 0.72), rgba(88, 28, 135, 0.55));
}

.cell.filled {
    background: #8b5cf6;
    box-shadow: inset 0 0 0 1px rgba(237, 233, 254, 0.42), 0 0 12px rgba(192, 132, 252, 0.42);
}

.tool.active,
.primary {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.regist {
    background-color: #fc54e4;
    color: #FFFFFF;
    border-radius: 0;
    font-family: "Press Start 2P", monospace;
    font-size: clamp(0.85rem, min(4vw, 3vh), 24px);
}

.warn {
    background-color: #FFFFFF;
    color: #000000;
    border-radius: 0;
    font-family: "Press Start 2P", monospace;
    font-size: clamp(0.85rem, min(4vw, 3vh), 24px);
}

.eyebrow,
th {
    color: #EE58DB;
    font-family: "Press Start 2P", monospace;
}

.preview-cell.active-cell {
    background: #8b5cf6;
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.45);
}


/* Animated hacker/hackathon layer */
#particlesCanvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.hero-title {
    position: relative;
    display: inline-block;
    animation: titleFadeIn 1.25s ease both,
    gradientShift 7s ease-in-out infinite;
    background: linear-gradient(90deg, #f5d0fe, #c084fc, #7c3aed, #f5d0fe);
    background-size: 280% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 24px rgba(192, 132, 252, 0.22);
}

.fade-gradient {
    filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.28));
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    50% {
        background-position: 100% 50%;
        filter: hue-rotate(34deg);
    }
    100% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
}

.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    opacity: 0.7;
    pointer-events: none;
    color: #e9d5ff;
    background: transparent;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.glitch-title::before {
    transform: translate(2px, 0);
    color: #22d3ee;
    clip-path: inset(0 0 58% 0);
    animation: glitchTop 2.8s infinite linear alternate-reverse;
}

.glitch-title::after {
    transform: translate(-2px, 0);
    color: #fb7185;
    clip-path: inset(48% 0 0 0);
    animation: glitchBottom 2.4s infinite linear alternate-reverse;
}

@keyframes glitchTop {
    0%, 92% {
        transform: translate(2px, 0);
        opacity: 0.18;
    }
    93% {
        transform: translate(6px, -2px);
        opacity: 0.75;
    }
    95% {
        transform: translate(-5px, 1px);
        opacity: 0.42;
    }
    97% {
        transform: translate(3px, -1px);
        opacity: 0.7;
    }
    100% {
        transform: translate(2px, 0);
        opacity: 0.18;
    }
}

@keyframes glitchBottom {
    0%, 89% {
        transform: translate(-2px, 0);
        opacity: 0.16;
    }
    90% {
        transform: translate(-7px, 2px);
        opacity: 0.7;
    }
    94% {
        transform: translate(4px, -1px);
        opacity: 0.4;
    }
    98% {
        transform: translate(-3px, 1px);
        opacity: 0.7;
    }
    100% {
        transform: translate(-2px, 0);
        opacity: 0.16;
    }
}

.typewriter-name {
    min-height: 1.2em;
    font-family: Inconsolata, Arial, Helvetica, sans-serif;
}

.typewriter-name::after {
    content: "";
    display: inline-block;
    width: 0.55em;
    height: 0.9em;
    margin-left: 4px;
    transform: translateY(2px);
    background: #e9d5ff;
    animation: cursorBlink 0.75s steps(1) infinite;
    box-shadow: 0 0 12px rgba(216, 180, 254, 0.6);
}

@keyframes cursorBlink {
    50% {
        opacity: 0;
    }
}

.card,
.game-header,
.board-wrap {
    animation: panelBoot 0.75s ease both;
}

@keyframes panelBoot {
    from {
        opacity: 0;
        transform: translateY(14px);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.compact-status:empty {
    display: none;
}

.form {
    margin-top: 18px;
}

.card {
    margin-top: 46px;
}

.screen.active {
    animation: screenFade 0.5s ease both;
}

@keyframes screenFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.message:empty {
    display: none;
}

.warning-btn {
    background: rgba(250, 204, 21, 0.12);
    color: #fde68a;
    border: 1px solid rgba(250, 204, 21, 0.38);
}

.warning-btn:hover:not(:disabled) {
    box-shadow: 0 0 18px rgba(250, 204, 21, 0.18);
}

/* Stronger, visible glitch */
.glitch-title {
    position: relative;
    isolation: isolate;
}

.glitch-title span {
    position: relative;
    z-index: 3;
    animation: microGlitch 3.6s infinite steps(1);
}

.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    mix-blend-mode: screen;
}

.glitch-title::before {
    color: #22d3ee;
    text-shadow: -2px 0 #22d3ee;
    animation: strongGlitchTop 1.75s infinite steps(1);
}

.glitch-title::after {
    color: #fb7185;
    text-shadow: 2px 0 #fb7185;
    animation: strongGlitchBottom 2.1s infinite steps(1);
}

@keyframes strongGlitchTop {
    0%, 72%, 100% {
        opacity: 0;
        transform: translate(0, 0);
        clip-path: inset(0 0 0 0);
    }
    73% {
        opacity: 0.95;
        transform: translate(-8px, -3px);
        clip-path: inset(0 0 72% 0);
    }
    75% {
        opacity: 0.6;
        transform: translate(6px, 2px);
        clip-path: inset(18% 0 46% 0);
    }
    77% {
        opacity: 0.9;
        transform: translate(-4px, 1px);
        clip-path: inset(42% 0 32% 0);
    }
    79% {
        opacity: 0;
        transform: translate(0, 0);
    }
}

@keyframes strongGlitchBottom {
    0%, 58%, 100% {
        opacity: 0;
        transform: translate(0, 0);
        clip-path: inset(0 0 0 0);
    }
    59% {
        opacity: 0.85;
        transform: translate(9px, 3px);
        clip-path: inset(62% 0 0 0);
    }
    62% {
        opacity: 0.6;
        transform: translate(-7px, -2px);
        clip-path: inset(28% 0 52% 0);
    }
    64% {
        opacity: 0.95;
        transform: translate(5px, 1px);
        clip-path: inset(72% 0 8% 0);
    }
    66% {
        opacity: 0;
        transform: translate(0, 0);
    }
}

@keyframes microGlitch {
    0%, 91%, 100% {
        transform: none;
        filter: none;
    }
    92% {
        transform: skewX(8deg) translateX(-2px);
        filter: contrast(1.35) brightness(1.15);
    }
    93% {
        transform: skewX(-6deg) translateX(3px);
    }
    94% {
        transform: none;
    }
}

.particle-trail-note {
    display: none;
}

/* Results table status styling */
.result-row {
    position: relative;
}

.result-row td {
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.result-row.good td {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.16), rgba(192, 132, 252, 0.06));
    border-bottom-color: rgba(192, 132, 252, 0.26);
}

.result-row.completed td {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.18), rgba(168, 85, 247, 0.08));
    border-bottom-color: rgba(34, 197, 94, 0.32);
}

.result-row.zero td {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.22), rgba(127, 29, 29, 0.07));
    border-bottom-color: rgba(248, 113, 113, 0.35);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-pill.completed {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.13);
    border: 1px solid rgba(34, 197, 94, 0.32);
}

.status-pill.incomplete {
    color: #ddd6fe;
    background: rgba(168, 85, 247, 0.13);
    border: 1px solid rgba(168, 85, 247, 0.32);
}

.status-pill.zero {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.score-chip {
    display: inline-flex;
    min-width: 58px;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 12px;
    font-weight: 900;
    background: rgba(216, 180, 254, 0.12);
    border: 1px solid rgba(216, 180, 254, 0.26);
}

.score-chip.zero {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.35);
}

.mode-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.mode-pill.practice {
    color: #e9d5ff;
    background: rgba(168, 85, 247, .14);
    border: 1px solid rgba(168, 85, 247, .34);
}

.mode-pill.test {
    color: #bfdbfe;
    background: rgba(59, 130, 246, .14);
    border: 1px solid rgba(59, 130, 246, .34);
}

table {
    min-width: 980px;
}

/* Final results table styles */
.mode-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap
}

.mode-pill.practice {
    color: #e9d5ff;
    background: rgba(168, 85, 247, .14);
    border: 1px solid rgba(168, 85, 247, .34)
}

.mode-pill.test {
    color: #bfdbfe;
    background: rgba(59, 130, 246, .14);
    border: 1px solid rgba(59, 130, 246, .34)
}

table {
    min-width: 980px
}

.result-row.good td {
    background: linear-gradient(90deg, rgba(168, 85, 247, .16), rgba(192, 132, 252, .06));
    border-bottom-color: rgba(192, 132, 252, .26)
}

.result-row.completed td {
    background: linear-gradient(90deg, rgba(34, 197, 94, .18), rgba(168, 85, 247, .08));
    border-bottom-color: rgba(34, 197, 94, .32)
}

.result-row.zero td {
    background: linear-gradient(90deg, rgba(239, 68, 68, .22), rgba(127, 29, 29, .07));
    border-bottom-color: rgba(248, 113, 113, .35)
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap
}

.status-pill.completed {
    color: #bbf7d0;
    background: rgba(34, 197, 94, .13);
    border: 1px solid rgba(34, 197, 94, .32)
}

.status-pill.incomplete {
    color: #ddd6fe;
    background: rgba(168, 85, 247, .13);
    border: 1px solid rgba(168, 85, 247, .32)
}

.status-pill.zero {
    color: #fecaca;
    background: rgba(239, 68, 68, .14);
    border: 1px solid rgba(239, 68, 68, .35)
}

.score-chip {
    display: inline-flex;
    min-width: 58px;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 12px;
    font-weight: 900;
    background: rgba(216, 180, 254, .12);
    border: 1px solid rgba(216, 180, 254, .26)
}

.score-chip.zero {
    color: #fecaca;
    background: rgba(239, 68, 68, .14);
    border-color: rgba(239, 68, 68, .35)
}


/* Final results aesthetic redesign */
.result-row.approved td {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.22), rgba(132, 204, 22, 0.08), rgba(16, 185, 129, 0.05));
    border-bottom-color: rgba(134, 239, 172, 0.36);
    box-shadow: inset 4px 0 0 rgba(34, 197, 94, 0.75);
}

.result-row.approved td:first-child::before {
    content: "🌿";
    margin-right: 6px;
}

.result-row.failed td {
    background: linear-gradient(90deg, rgba(88, 28, 135, 0.22), rgba(76, 29, 149, 0.09), rgba(15, 23, 42, 0.04));
    border-bottom-color: rgba(216, 180, 254, 0.18);
    box-shadow: inset 4px 0 0 rgba(168, 85, 247, 0.55);
}

.result-row.zero td {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.28), rgba(88, 28, 135, 0.08), rgba(15, 23, 42, 0.04));
    border-bottom-color: rgba(248, 113, 113, 0.38);
    box-shadow: inset 4px 0 0 rgba(239, 68, 68, 0.86);
}

.status-pill.approved {
    color: #dcfce7;
    background: radial-gradient(circle at 10% 20%, rgba(187, 247, 208, 0.26), transparent 35%),
    linear-gradient(135deg, rgba(34, 197, 94, 0.24), rgba(132, 204, 22, 0.12));
    border: 1px solid rgba(134, 239, 172, 0.45);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.14);
}

.status-pill.failed {
    color: #f5d0fe;
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.28), rgba(15, 23, 42, 0.18));
    border: 1px solid rgba(216, 180, 254, 0.24);
}

.status-pill.zero {
    color: #fecaca;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(127, 29, 29, 0.12));
    border: 1px solid rgba(248, 113, 113, 0.42);
}

.score-chip.approved {
    color: #dcfce7;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.24), rgba(132, 204, 22, 0.12));
    border-color: rgba(134, 239, 172, 0.45);
}

.score-chip.failed {
    color: #f5d0fe;
    background: rgba(168, 85, 247, 0.13);
    border-color: rgba(216, 180, 254, 0.24);
}

.broken-text {
    display: inline-block;
    position: relative;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #f5d0fe;
    text-shadow: 1px 0 rgba(251, 113, 133, 0.55),
    -1px 0 rgba(34, 211, 238, 0.32);
    animation: brokenJitter 2.2s infinite steps(1);
}

.broken-text::after {
    content: attr(data-crack);
}

.broken-text::before {
    content: "";
    position: absolute;
    left: 8%;
    right: 6%;
    top: 52%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(248, 113, 113, 0.85), transparent);
    transform: rotate(-4deg);
    opacity: 0.75;
}

@keyframes brokenJitter {
    0%, 88%, 100% {
        transform: translate(0, 0) skewX(0deg);
    }
    89% {
        transform: translate(-1px, 1px) skewX(-5deg);
    }
    91% {
        transform: translate(2px, -1px) skewX(4deg);
    }
    93% {
        transform: translate(-1px, 0) skewX(0deg);
    }
}


/* Clean, high-contrast results design without gradients */
.result-row.approved td,
.result-row.failed td,
.result-row.zero td,
.result-row.good td,
.result-row.completed td {
    background: transparent !important;
}

.result-row.approved {
    background: rgba(20, 83, 45, 0.38);
    box-shadow: inset 5px 0 0 #22c55e,
    0 0 22px rgba(34, 197, 94, 0.14);
}

.result-row.approved td {
    border-bottom-color: rgba(134, 239, 172, 0.34) !important;
}

.result-row.failed {
    background: rgba(46, 16, 101, 0.42);
    box-shadow: inset 5px 0 0 #a855f7,
    0 0 18px rgba(168, 85, 247, 0.11);
}

.result-row.failed td {
    border-bottom-color: rgba(216, 180, 254, 0.22) !important;
}

.result-row.zero {
    background: rgba(127, 29, 29, 0.42);
    box-shadow: inset 5px 0 0 #ef4444,
    0 0 22px rgba(239, 68, 68, 0.12);
}

.result-row.zero td {
    border-bottom-color: rgba(248, 113, 113, 0.36) !important;
}

.happy-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #dcfce7;
    font-weight: 900;
    text-shadow: 0 0 12px rgba(34, 197, 94, 0.24);
}

.status-pill.approved,
.score-chip.approved {
    color: #dcfce7 !important;
    background: rgba(22, 101, 52, 0.72) !important;
    border: 1px solid rgba(134, 239, 172, 0.55) !important;
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.16),
    inset 0 0 14px rgba(187, 247, 208, 0.05);
}

.status-pill.failed,
.score-chip.failed {
    color: #f5d0fe !important;
    background: rgba(88, 28, 135, 0.72) !important;
    border: 1px solid rgba(216, 180, 254, 0.34) !important;
}

.status-pill.zero,
.score-chip.zero {
    color: #fecaca !important;
    background: rgba(127, 29, 29, 0.78) !important;
    border: 1px solid rgba(248, 113, 113, 0.52) !important;
}

.broken-text {
    display: inline-block;
    position: relative;
    font-weight: 950;
    letter-spacing: 0.03em;
    color: #f5d0fe;
    text-shadow: 2px 0 rgba(251, 113, 133, 0.72),
    -2px 0 rgba(34, 211, 238, 0.42);
    animation: brokenJitter 1.8s infinite steps(1);
}

.broken-text::before,
.broken-text::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #fb7185;
    opacity: 0.75;
    transform-origin: center;
}

.broken-text::before {
    top: 42%;
    transform: rotate(-5deg);
}

.broken-text::after {
    top: 64%;
    transform: rotate(4deg);
    opacity: 0.45;
}

@keyframes brokenJitter {
    0%, 84%, 100% {
        transform: translate(0, 0) skewX(0deg);
        filter: none;
    }
    85% {
        transform: translate(-2px, 1px) skewX(-8deg);
        filter: contrast(1.25);
    }
    87% {
        transform: translate(2px, -1px) skewX(6deg);
    }
    89% {
        transform: translate(-1px, 0) skewX(-3deg);
    }
    91% {
        transform: translate(0, 0) skewX(0deg);
    }
}


.modal.show .modal-content {
    transform-origin: top center;
    animation: sheetUnfoldDown 0.58s cubic-bezier(0.2, 0.82, 0.25, 1) both, sheetGlow 1.6s ease-in-out 0.2s both;
}

@keyframes sheetUnfoldDown {
    0% {
        opacity: 0;
        transform: translateY(-32px) rotateX(-76deg) scaleY(0.18);
        filter: blur(8px);
    }
    48% {
        opacity: 1;
        transform: translateY(8px) rotateX(8deg) scaleY(1.04);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg) scaleY(1);
        filter: blur(0);
    }
}

@keyframes sheetGlow {
    0% {
        box-shadow: 0 0 0 rgba(216, 180, 254, 0);
    }
    45% {
        box-shadow: 0 22px 80px rgba(168, 85, 247, 0.3);
    }
    100% {
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    }
}

.btn, .tool {
    position: relative;
    overflow: hidden;
}

.btn::after, .tool::after {
    content: "";
    position: absolute;
    inset: 50%;
    width: 0;
    height: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    transform: translate(-50%, -50%);
    opacity: 0;
}

.btn.button-action, .tool.button-action {
    animation: buttonPunch 0.34s ease both;
}

.btn.button-action::after, .tool.button-action::after {
    animation: buttonRipple 0.42s ease-out both;
}

@keyframes buttonPunch {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    35% {
        transform: scale(0.94) rotate(-0.6deg);
        filter: brightness(1.3);
    }
    70% {
        transform: scale(1.04) rotate(0.4deg);
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes buttonRipple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.5;
    }
    100% {
        width: 260px;
        height: 260px;
        opacity: 0;
    }
}

.result-mood-face {
    display: grid;
    place-items: center;
    min-height: 0;
    font-size: 0;
    opacity: 0;
    transform: scale(0.5);
}

.result-mood-face.show {
    min-height: 96px;
    margin: 12px 0 4px;
    font-size: 76px;
    opacity: 1;
    animation: facePop 0.62s cubic-bezier(0.2, 0.9, 0.25, 1.2) both;
}

.result-mood-face.happy {
    text-shadow: 0 0 26px rgba(34, 197, 94, 0.38);
}

.result-mood-face.sad {
    text-shadow: 0 0 26px rgba(248, 113, 113, 0.34);
}

@keyframes facePop {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-8deg);
        filter: blur(8px);
    }
    65% {
        opacity: 1;
        transform: scale(1.12) rotate(4deg);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.runner-chase {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 22px;
    height: 74px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.82;
    overflow: hidden;
}

.runner-track {
    position: absolute;
    left: -180px;
    bottom: 14px;
    width: 160px;
    height: 52px;
    animation: chaseAcross 9.5s linear infinite;
}

@keyframes chaseAcross {
    0% {
        transform: translateX(-220px);
    }
    100% {
        transform: translateX(calc(100vw + 260px));
    }
}

.pixel-dino {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 54px;
    height: 42px;
    filter: drop-shadow(0 0 10px rgba(216, 180, 254, 0.45));
    animation: dinoBounce 0.34s steps(2) infinite;
}

.dino-body, .dino-head, .dino-tail, .dino-leg {
    position: absolute;
    background: #e9d5ff;
    box-shadow: inset 0 0 0 2px rgba(76, 29, 149, 0.38);
}

.dino-body {
    left: 12px;
    bottom: 12px;
    width: 28px;
    height: 20px;
    border-radius: 3px;
}

.dino-head {
    left: 34px;
    bottom: 27px;
    width: 18px;
    height: 14px;
    border-radius: 2px;
}

.dino-tail {
    left: 2px;
    bottom: 21px;
    width: 14px;
    height: 7px;
    transform: skewY(-24deg);
}

.dino-leg {
    bottom: 0;
    width: 7px;
    height: 14px;
}

.leg-a {
    left: 18px;
    animation: legRunA 0.34s steps(2) infinite;
}

.leg-b {
    left: 33px;
    animation: legRunB 0.34s steps(2) infinite;
}

@keyframes dinoBounce {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-3px);
    }
}

@keyframes legRunA {
    0% {
        height: 14px;
    }
    100% {
        height: 8px;
    }
}

@keyframes legRunB {
    0% {
        height: 8px;
    }
    100% {
        height: 14px;
    }
}

.pixel-chomper {
    position: absolute;
    left: -62px;
    bottom: 4px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fde047;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.45), inset 0 0 0 2px rgba(113, 63, 18, 0.35);
    animation: chomperBounce 0.24s steps(2) infinite;
}

.chomper-mouth {
    position: absolute;
    right: -1px;
    top: 8px;
    width: 0;
    height: 0;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 18px solid #090012;
    transform-origin: left center;
    animation: chomperMouth 0.24s steps(2) infinite;
}

@keyframes chomperBounce {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-4px);
    }
}

@keyframes chomperMouth {
    0% {
        transform: scaleY(0.35);
    }
    100% {
        transform: scaleY(1);
    }
}


/* Particle-pixel chase canvas */
.runner-chase {
    display: none !important;
}

.pixel-chase-canvas {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 14px;
    width: 100vw;
    height: 120px;
    z-index: 2;
    pointer-events: none;
    image-rendering: pixelated;
    opacity: 0.95;
    filter: drop-shadow(0 0 10px rgba(216, 180, 254, 0.45)) drop-shadow(0 0 18px rgba(168, 85, 247, 0.22));
}


/* Final-only clean mode: decorative animations removed */
#particlesCanvas,
#pixelChaseCanvas,
.runner-chase,
.runner-track,
.pixel-dino,
.pixel-chomper,
.result-mood-face {
    display: none !important;
}

.hero-title,
.glitch-title,
.fade-gradient,
.card,
.game-header,
.board-wrap,
.screen.active,
.modal.show .modal-content,
.btn,
.tool {
    animation: none !important;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease !important;
}

.glitch-title::before,
.glitch-title::after,
.btn::after,
.tool::after,
body::before,
body::after {
    display: none !important;
    content: none !important;
}

h1 {
    color: #f8f0ff !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    filter: none !important;
}

.btn:hover:not(:disabled),
.tool:hover:not(:disabled) {
    transform: translateY(-1px);
}


/* Registro reconstruido */
.form input {
    width: 100%;
}

.error {
    display: block;
    min-height: 20px;
    color: #fecaca;
    font-weight: 700;
    margin-top: 4px;
}

/* Limpieza final sin animaciones decorativas */
#particlesCanvas,
#pixelChaseCanvas,
.runner-chase,
.result-mood-face {
    display: none !important;
}

.glitch-title::before,
.glitch-title::after,
body::before,
body::after {
    display: none !important;
    content: none !important;
}

h1 {
    color: #f8f0ff !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    filter: none !important;
}

.message:empty {
    display: none;
}


/* Corrección visual de la ventana de solución */
.preview-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 32px);
    grid-template-rows: repeat(7, 32px);
    gap: 5px;
    justify-content: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(9, 0, 18, 0.42);
    border: 1px solid rgba(216, 180, 254, 0.16);
}

.preview-cell {
    box-sizing: border-box;
    display: grid;
    place-items: center;
    border-radius: 0;
    font-weight: 900;
    font-size: 0.85rem;
    background: rgba(243, 232, 255, 0.12);
    border: 1px solid rgba(216, 180, 254, 0.18);
    color: #f8f0ff;
}

.preview-cell.solution-filled {
    background: #7c3aed !important;
    border-color: #c084fc !important;
    box-shadow: inset 0 0 0 2px rgba(233, 213, 255, 0.2), 0 0 14px rgba(124, 58, 237, 0.42);
}

.preview-cell.solution-empty {
    background: rgba(243, 232, 255, 0.08) !important;
    border-color: rgba(216, 180, 254, 0.16) !important;
}

.preview-cell.attempt-correct {
    background: #22c55e !important;
    border-color: #86efac !important;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.34);
}

.preview-cell.attempt-wrong {
    background: #ef4444 !important;
    border-color: #fecaca !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.34);
}

.preview-cell.attempt-missed {
    background: #facc15 !important;
    border-color: #fef08a !important;
    color: #2e1065;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.34);
}

.preview-cell.attempt-marked {
    background: rgba(168, 85, 247, 0.18) !important;
    border-color: rgba(216, 180, 254, 0.32) !important;
    color: #e9d5ff;
}

.legend-box.active-cell {
    background: #22c55e !important;
}

.legend-box.wrong-cell {
    background: #ef4444 !important;
}

.legend-box.missed-cell {
    background: #facc15 !important;
}


/* Game Over result lookup modal */
.game-over-card {
    text-align: center;
    max-width: 460px;
}

.game-over-kicker {
    margin: 0 0 4px;
    font-size: 0.95rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #fb7185;
    font-weight: 950;
    text-shadow: 0 0 16px rgba(251, 113, 133, 0.35);
}

.score-ring {
    --score: 0;
    --ring-color: #ef4444;

    width: 168px;
    height: 168px;
    margin: 24px auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--ring-color) calc(var(--score) * 1%), rgba(216, 180, 254, 0.13) 0);
    box-shadow: 0 0 26px color-mix(in srgb, var(--ring-color), transparent 62%),
    inset 0 0 18px rgba(0, 0, 0, 0.48);
    position: relative;
}

.score-ring::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: #12051f;
    border: 1px solid rgba(216, 180, 254, 0.18);
    box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.42);
}

.score-ring-inner {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    line-height: 1;
}

.score-ring-inner strong {
    font-size: 3.1rem;
    color: #f8f0ff;
    font-weight: 950;
}

.score-ring-inner span {
    margin-top: 4px;
    color: #b8a7c9;
    font-size: 0.9rem;
    font-weight: 800;
}

.lookup-status {
    margin-top: 12px;
    font-weight: 800;
    color: #e9d5ff;
}

#lookupResultBtn {
    margin-top: 4px;
}

.auto-return-notice {
    margin-top: 14px;
    font-size: 0.9rem;
}


/* Correcciones de permisos y registro */
.error {
    display: block;
    min-height: 20px;
    color: #fecaca;
    font-weight: 700;
    margin-top: 4px;
}

.warning-btn {
    background: rgba(250, 204, 21, 0.12);
    color: #fde68a;
    border: 1px solid rgba(250, 204, 21, 0.38);
}

.hidden {
    display: none !important;
}

.form input {
    width: 100%;
}

.message:empty {
    display: none;
}

/* Game Over result lookup modal */
.game-over-card {
    text-align: center;
    max-width: 460px;
}

.game-over-kicker {
    margin: 0 0 4px;
    font-size: 0.95rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #fb7185;
    font-weight: 950;
    text-shadow: 0 0 16px rgba(251, 113, 133, 0.35);
}

.score-ring {
    --score: 0;
    --ring-color: #ef4444;
    width: 168px;
    height: 168px;
    margin: 24px auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--ring-color) calc(var(--score) * 1%), rgba(216, 180, 254, 0.13) 0);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.48);
    position: relative;
}

.score-ring::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: #12051f;
    border: 1px solid rgba(216, 180, 254, 0.18);
}

.score-ring-inner {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    line-height: 1;
}

.score-ring-inner strong {
    font-size: 3.1rem;
    color: #f8f0ff;
    font-weight: 950;
}

.score-ring-inner span {
    margin-top: 4px;
    color: #b8a7c9;
    font-size: 0.9rem;
    font-weight: 800;
}

/* Corrección visual de la ventana de solución */
.preview-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 32px);
    grid-template-rows: repeat(7, 32px);
    gap: 5px;
    justify-content: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(9, 0, 18, 0.42);
    border: 1px solid rgba(216, 180, 254, 0.16);
}

.preview-cell {
    box-sizing: border-box;
    display: grid;
    place-items: center;
    border-radius: 0;
    font-weight: 900;
    font-size: 0.85rem;
    background: rgba(243, 232, 255, 0.12);
    border: 1px solid rgba(216, 180, 254, 0.18);
    color: #f8f0ff;
}

.preview-cell.solution-filled {
    background: #7c3aed !important;
    border-color: #c084fc !important;
    box-shadow: inset 0 0 0 2px rgba(233, 213, 255, 0.2), 0 0 14px rgba(124, 58, 237, 0.42);
}

.preview-cell.solution-empty {
    background: rgba(243, 232, 255, 0.08) !important;
    border-color: rgba(216, 180, 254, 0.16) !important;
}

.preview-cell.attempt-correct {
    background: #22c55e !important;
    border-color: #86efac !important;
}

.preview-cell.attempt-wrong {
    background: #ef4444 !important;
    border-color: #fecaca !important;
}

.preview-cell.attempt-missed {
    background: #facc15 !important;
    border-color: #fef08a !important;
    color: #2e1065;
}

.preview-cell.attempt-marked {
    background: rgba(168, 85, 247, 0.18) !important;
    border-color: rgba(216, 180, 254, 0.32) !important;
    color: #e9d5ff;
}

.legend-box.active-cell {
    background: #22c55e !important;
}

.legend-box.wrong-cell {
    background: #ef4444 !important;
}

.legend-box.missed-cell {
    background: #facc15 !important;
}


/* Login modal and logout flow */
#logoutBtn {
    margin-top: 4px;
}

#loginScreen .card {
    max-width: 640px;
}

#loginScreen h2 {
    font-family: "Press Start 2P", monospace;
}

.login-back-btn {
    margin-bottom: 18px;
}

#loginForm {
    margin-top: 18px;
    width: 100%;
    align-self: stretch;
}

#loginForm input,
#loginForm input:focus {
    border-color: #FFFFFF;
    border-radius: 0;
}


/* Ventana separada para consultar resultado solo con email */
#lookupEmailModal .modal-content {
    max-width: 460px;
}

#approvedSavedModal .modal-content {
    width: min(640px, 100%);
    padding: 48px 56px;
    background: #000000;
    color: #FFFFFF;
    border: none;
    text-align: center;
}

#approvedSavedModal #info {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
}

#lookupEmailForm {
    margin-top: 18px;
}


.lookup-status {
    margin-top: 12px;
    font-weight: 800;
    color: #e9d5ff;
}


.type-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 900;
    font-size: 0.8rem;
    border: 1px solid rgba(216, 180, 254, 0.22);
}

.type-pill.real {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.28);
}

.type-pill.test {
    color: #fde68a;
    background: rgba(250, 204, 21, 0.14);
    border-color: rgba(250, 204, 21, 0.28);
}


/* Sudoku randomized test */
.sudoku-grid {
    display: grid;
    gap: 0;
    padding: 12px;
    border-radius: 20px;
    background: rgba(9, 0, 18, 0.82);
    border: 2px solid rgba(216, 180, 254, 0.28);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.sudoku-cell {
    width: clamp(13px, 9.8vw, 44px);
    height: clamp(13px, 9.8vw, 44px);
    border: 1px solid rgba(216, 180, 254, 0.24);
    background: rgba(16, 5, 30, 0.94);
    color: #f8f0ff;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 900;
    outline: none;
}

.sudoku-cell:focus {
    background: rgba(88, 28, 135, 0.56);
    border-color: #c084fc;
    box-shadow: inset 0 0 0 2px rgba(192, 132, 252, 0.32);
}

.sudoku-cell.fixed {
    background: rgba(216, 180, 254, 0.16);
    color: #e9d5ff;
    cursor: not-allowed;
}

.sudoku-cell.box-right,
.sudoku-preview-cell.box-right {
    border-right: 3px solid rgba(216, 180, 254, 0.74);
}

.sudoku-cell.box-bottom,
.sudoku-preview-cell.box-bottom {
    border-bottom: 3px solid rgba(216, 180, 254, 0.74);
}

.sudoku-preview-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.86rem;
    font-weight: 900;
}


/* Multi puzzle randomized tests */
.number-puzzle-grid,
.skyscrapers-grid,
.kenken-grid,
.minesweeper-grid {
    display: grid;
    gap: 0;
    padding: 14px;
    border-radius: 20px;
    background: rgba(9, 0, 18, 0.82);
    border: 2px solid rgba(216, 180, 254, 0.28);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.number-cell-wrap {
    position: relative;
    width: clamp(14px, 9.8vw, 48px);
    height: clamp(14px, 9.8vw, 48px);
    background: rgba(16, 5, 30, 0.94);
    border: 1px solid rgba(216, 180, 254, 0.24);
}

.number-puzzle-cell {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    color: #f8f0ff;
    text-align: center;
    font-size: 1.22rem;
    font-weight: 900;
    outline: none;
}

.number-puzzle-cell:focus {
    background: rgba(88, 28, 135, 0.56);
    box-shadow: inset 0 0 0 2px rgba(192, 132, 252, 0.32);
}

.kenken-cage-label {
    position: absolute;
    top: 3px;
    left: 4px;
    z-index: 2;
    color: #f0abfc;
    font-size: 0.64rem;
    font-weight: 1000;
    pointer-events: none;
}

.cage-0 {
    border-top: 3px solid #a855f7;
    border-left: 3px solid #a855f7;
}

.cage-1 {
    border-top: 3px solid #22c55e;
    border-left: 3px solid #22c55e;
}

.cage-2 {
    border-top: 3px solid #f97316;
    border-left: 3px solid #f97316;
}

.cage-3 {
    border-top: 3px solid #38bdf8;
    border-left: 3px solid #38bdf8;
}

.cage-4 {
    border-top: 3px solid #facc15;
    border-left: 3px solid #facc15;
}

.cage-5 {
    border-top: 3px solid #fb7185;
    border-left: 3px solid #fb7185;
}

.cage-6 {
    border-top: 3px solid #2dd4bf;
    border-left: 3px solid #2dd4bf;
}

.cage-7 {
    border-top: 3px solid #c084fc;
    border-left: 3px solid #c084fc;
}

.sky-clue {
    display: grid;
    place-items: center;
    color: #f0abfc;
    font-weight: 1000;
    font-size: 1rem;
    background: rgba(88, 28, 135, 0.28);
    border: 1px solid rgba(216, 180, 254, 0.16);
}

.skyscraper-cell {
    border: 1px solid rgba(216, 180, 254, 0.24);
    background: rgba(16, 5, 30, 0.94);
}

.mine-clue-cell,
.mine-cell {
    width: clamp(14px, 9.8vw, 48px);
    height: clamp(14px, 9.8vw, 48px);
    border: 1px solid rgba(216, 180, 254, 0.24);
    display: grid;
    place-items: center;
    background: rgba(16, 5, 30, 0.94);
    color: #f8f0ff;
    font-size: 1.08rem;
    font-weight: 1000;
}

.mine-clue-cell {
    background: rgba(216, 180, 254, 0.16);
    color: #e9d5ff;
}

.mine-cell {
    cursor: pointer;
}

.mine-cell.selected {
    background: rgba(168, 85, 247, 0.42);
}


/* Multi-puzzle boards */
.sudoku-board,
.skyscrapers-board,
.kenken-board,
.minesweeper-board {
    display: grid;
    gap: 0;
    justify-content: center;
    align-content: start;
    padding: 14px;
    border-radius: 18px;
    background: rgba(8, 0, 15, 0.88);
    border: 1px solid rgba(216, 180, 254, 0.22);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.sudoku-cell,
.number-cell,
.mine-cell,
.mine-clue,
.sky-clue {
    box-sizing: border-box;
}

.sudoku-cell,
.number-cell {
    border: 1px solid rgba(216, 180, 254, 0.26);
    background: rgba(20, 7, 32, 0.95);
    color: #f8f0ff;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 900;
    outline: none;
}

.sudoku-cell.fixed {
    background: rgba(216, 180, 254, 0.18);
    color: #e9d5ff;
    cursor: not-allowed;
}

.sudoku-cell:focus,
.number-cell:focus {
    border-color: #c084fc;
    box-shadow: inset 0 0 0 2px rgba(192, 132, 252, 0.34);
    background: rgba(70, 25, 110, 0.55);
}

.thick-right {
    border-right: 3px solid rgba(216, 180, 254, 0.72);
}

.thick-bottom {
    border-bottom: 3px solid rgba(216, 180, 254, 0.72);
}

.sky-clue {
    display: grid;
    place-items: center;
    background: rgba(120, 60, 180, 0.18);
    color: #f0abfc;
    font-weight: 1000;
    border: 1px solid rgba(216, 180, 254, 0.16);
}

.kenken-wrap {
    position: relative;
    border: 1px solid rgba(216, 180, 254, 0.22);
    background: rgba(20, 7, 32, 0.95);
}

.kenken-wrap .number-cell {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

.kenken-label {
    position: absolute;
    left: 4px;
    top: 3px;
    color: #f0abfc;
    font-size: 0.62rem;
    font-weight: 1000;
    pointer-events: none;
}

.cage-0 {
    border-top: 3px solid #a855f7;
    border-left: 3px solid #a855f7;
}

.cage-1 {
    border-top: 3px solid #22c55e;
    border-left: 3px solid #22c55e;
}

.cage-2 {
    border-top: 3px solid #f97316;
    border-left: 3px solid #f97316;
}

.cage-3 {
    border-top: 3px solid #38bdf8;
    border-left: 3px solid #38bdf8;
}

.cage-4 {
    border-top: 3px solid #facc15;
    border-left: 3px solid #facc15;
}

.cage-5 {
    border-top: 3px solid #fb7185;
    border-left: 3px solid #fb7185;
}

.cage-6 {
    border-top: 3px solid #2dd4bf;
    border-left: 3px solid #2dd4bf;
}

.cage-7 {
    border-top: 3px solid #c084fc;
    border-left: 3px solid #c084fc;
}

.mine-clue {
    display: grid;
    place-items: center;
    border: 1px solid rgba(216, 180, 254, 0.22);
    background: rgba(216, 180, 254, 0.16);
    color: #e9d5ff;
    font-size: 1rem;
    font-weight: 1000;
}

.mine-cell {
    border: 1px solid rgba(216, 180, 254, 0.22);
    background: rgba(20, 7, 32, 0.95);
    color: #f8f0ff;
    font-size: 1rem;
    font-weight: 1000;
    cursor: pointer;
}

.mine-cell.selected {
    background: rgba(168, 85, 247, 0.42);
}


/* Assigned multi-test UI */
.kakuro-board,
.hitori-board,
.akari-board,
.numberlink-board,
.latin-board {
    display: grid;
    gap: 0;
    justify-content: center;
    align-content: start;
    padding: 14px;
    border-radius: 18px;
    background: rgba(8, 0, 15, 0.88);
    border: 1px solid rgba(216, 180, 254, 0.22);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.kakuro-block,
.kakuro-clue,
.hitori-cell,
.akari-block,
.akari-cell,
.numberlink-cell {
    width: clamp(14px, 9.8vw, 48px);
    height: clamp(14px, 9.8vw, 48px);
    box-sizing: border-box;
    border: 1px solid rgba(216, 180, 254, 0.25);
    display: grid;
    place-items: center;
    background: rgba(20, 7, 32, 0.95);
    color: #f8f0ff;
    font-weight: 900;
    font-size: 1rem;
}

.kakuro-block,
.kakuro-clue,
.akari-block,
.numberlink-cell.fixed {
    background: rgba(216, 180, 254, 0.16);
    color: #e9d5ff;
}

.hitori-cell,
.akari-cell,
.numberlink-cell {
    cursor: pointer;
}

.hitori-cell.selected,
.akari-cell.selected,
.numberlink-cell.selected {
    background: rgba(168, 85, 247, 0.42);
}

.number-cell.fixed {
    background: rgba(216, 180, 254, 0.16);
    color: #e9d5ff;
}


/* 9x9 puzzle boards */
.endograma-board,
.sudoku-board,
.skyscrapers-board,
.kenken-board,
.minesweeper-board,
.kakuro-board,
.hitori-board,
.akari-board,
.numberlink-board,
.latinSquare-board,
.latin-board {
    display: grid;
    justify-content: center;
    gap: 0;
    padding: 14px;
    border-radius: 18px;
    background: rgba(8, 0, 15, 0.88);
    border: 1px solid rgba(216, 180, 254, 0.22);
    overflow: auto;
    max-width: 100%;
}

.endograma-clue,
.endograma-corner {
    box-sizing: border-box;
    border: 1px solid rgba(216, 180, 254, 0.25);
    background: rgba(216, 180, 254, 0.13);
    color: #e9d5ff;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 900;
    font-size: clamp(6.5px, min(2.6vw, 1.25vh), 23px);
    line-height: 1.05;
    overflow: hidden;
    padding: 4px;
}

.endograma-corner {
    background: rgba(168, 85, 247, 0.18);
}

.endograma-row-clue {
    justify-content: end;
    text-align: right;
    padding-right: 8px;
}

.endograma-col-clue {
    align-content: end;
    padding-bottom: 8px;
}

.number-cell,
.puzzle-toggle-cell {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(216, 180, 254, 0.25);
    background: rgba(20, 7, 32, 0.95);
    color: #f8f0ff;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 900;
    font-size: clamp(10px, min(4.9vw, 2.35vh), 34px);
    outline: none;
}

.number-cell:focus {
    border-color: #c084fc;
    box-shadow: inset 0 0 0 2px rgba(192, 132, 252, 0.34);
}

.sky-clue,
.fixed {
    background: rgba(216, 180, 254, 0.16);
    color: #e9d5ff;
}

.kenken-wrap {
    position: relative;
    border: 1px solid rgba(216, 180, 254, 0.22);
    background: rgba(20, 7, 32, 0.95);
}

.kenken-wrap .number-cell {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

.kenken-label {
    position: absolute;
    left: 3px;
    top: 2px;
    color: #f0abfc;
    font-size: 0.56rem;
    font-weight: 1000;
    pointer-events: none;
}

.puzzle-toggle-cell {
    cursor: pointer;
}

.puzzle-toggle-cell.selected {
    background: rgba(168, 85, 247, 0.42);
}

/* Final 9x9 real/admin styles */
.endograma-board, .logic-board, .sudoku-board, .skyscrapers-board, .kenken-board, .minesweeper-board, .kakuro-board, .hitori-board, .akari-board, .numberlink-board, .latinSquare-board {
    display: grid;
    justify-content: center;
    gap: 0;
    padding: 14px;
    border-radius: 18px;
    background: rgba(8, 0, 15, .88);
    border: 1px solid rgba(216, 180, 254, .22);
    overflow: auto;
    max-width: 100%
}

.endograma-clue, .endograma-corner, .sky-clue {
    box-sizing: border-box;
    border: 1px solid rgba(216, 180, 254, .25);
    background: rgba(216, 180, 254, .16);
    color: #e9d5ff;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 900;
    font-size: clamp(6.5px, min(2.6vw, 1.25vh), 23px);
    line-height: 1.05;
    overflow: hidden;
    padding: 3px
}

.endograma-corner {
    background: rgba(168, 85, 247, .18)
}

.endograma-row-clue {
    justify-content: end;
    text-align: right;
    padding-right: 6px
}

.endograma-col-clue {
    align-content: end;
    padding-bottom: 6px
}

.number-cell, .puzzle-toggle-cell {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(216, 180, 254, .25);
    background: rgba(20, 7, 32, .95);
    color: #f8f0ff;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 900;
    font-size: clamp(10px, min(4.9vw, 2.35vh), 34px);
    outline: none
}

.number-cell:focus {
    border-color: #c084fc;
    box-shadow: inset 0 0 0 2px rgba(192, 132, 252, .34)
}

.kenken-wrap {
    position: relative;
    border: 1px solid rgba(216, 180, 254, .22);
    background: rgba(20, 7, 32, .95)
}

.kenken-wrap .number-cell {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent
}

.kenken-label {
    position: absolute;
    left: 3px;
    top: 2px;
    color: #f0abfc;
    font-size: .56rem;
    font-weight: 1000;
    pointer-events: none
}

.puzzle-toggle-cell {
    cursor: pointer
}

.puzzle-toggle-cell.selected {
    background: rgba(168, 85, 247, .42)
}


/* Dashboard scroll/gauge fix */
.admin-summary .admin-kpi canvas {
    width: 86px !important;
    height: 86px !important;
    max-width: 86px !important;
    max-height: 86px !important;
    flex: 0 0 86px !important;
    display: block !important;
    position: static !important;
}

.admin-summary #totalSparkChart {
    width: 130px !important;
    height: 56px !important;
    max-width: 130px !important;
    max-height: 56px !important;
    flex-basis: 130px !important;
}

.admin-summary {
    align-items: stretch !important;
}

.admin-kpi.metric-card {
    min-height: 116px !important;
    max-height: 140px !important;
    overflow: hidden !important;
}

.chart-panel canvas {
    max-width: 100% !important;
    height: 190px !important;
    max-height: 240px !important;
}

#statusPieChart, #gaussChart {
    height: 210px !important;
    max-height: 260px !important;
}

/* Final 9x9 board styles */
.logic-board, .endograma-board, .sudoku-board, .skyscrapers-board, .kenken-board, .minesweeper-board, .kakuro-board, .hitori-board, .akari-board, .numberlink-board, .latinSquare-board {
    display: grid;
    justify-content: center;
    gap: 0;
    padding: 14px;
    border-radius: 18px;
    background: rgba(8, 0, 15, .88);
    border: 1px solid rgba(216, 180, 254, .22);
    overflow: auto;
    max-width: 100%;
}

.endograma-clue, .endograma-corner, .sky-clue {
    box-sizing: border-box;
    border: 1px solid rgba(216, 180, 254, .25);
    background: rgba(216, 180, 254, .16);
    color: #e9d5ff;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 900;
    font-size: clamp(6.5px, min(2.6vw, 1.25vh), 23px);
    line-height: 1.05;
    overflow: hidden;
    padding: 3px;
}

.endograma-corner {
    background: rgba(168, 85, 247, .18)
}

.endograma-row-clue {
    justify-content: end;
    text-align: right;
    padding-right: 6px
}

.endograma-col-clue {
    align-content: end;
    padding-bottom: 6px
}

.number-cell, .puzzle-toggle-cell {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(216, 180, 254, .25);
    background: rgba(20, 7, 32, .95);
    color: #f8f0ff;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 900;
    font-size: clamp(10px, min(4.9vw, 2.35vh), 34px);
    outline: none
}

.number-cell:focus {
    border-color: #c084fc;
    box-shadow: inset 0 0 0 2px rgba(192, 132, 252, .34)
}

.kenken-wrap {
    position: relative;
    border: 1px solid rgba(216, 180, 254, .22);
    background: rgba(20, 7, 32, .95)
}

.kenken-wrap .number-cell {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent
}

.kenken-label {
    position: absolute;
    left: 4px;
    top: 3px;
    color: #f0abfc;
    font-size: .8rem;
    font-weight: 1000;
    pointer-events: none
}

.puzzle-toggle-cell {
    cursor: pointer
}

.puzzle-toggle-cell.selected, .cell.filled {
    background: rgba(168, 85, 247, .42) !important
}

.cell.marked {
    color: #e9d5ff;
    background: rgba(126, 34, 206, .2) !important
}


.abandon-warning-content {
    width: min(920px, 92vw);
    max-width: 920px;
}

.abandon-warning-content p {
    color: #e9d5ff;
    font-weight: 700;
    line-height: 1.45;
}


/* Warning sticker modal */
.warning-modal {
    z-index: 99999 !important;
    backdrop-filter: blur(10px);
    /*background: #FF0000;*/
    color: white;
}

.abandon-warning-content {
    width: min(700px, 92vw) !important;
    max-width: 700px !important;
    text-align: center;
    overflow: auto;
    /*background: #FF0000;*/
    /*border: 1px solid #FFFFFF;*/
    /*color: #fff;*/
    /*box-shadow: 0 24px 90px rgba(0, 0, 0, 0.48), 0 0 36px rgba(250, 204, 21, 0.08);*/
}

.abandon-warning-outer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background: #ED5553;
    padding: clamp(16px, 5vw, 50px);
    max-height: 88vh;
    overflow: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.abandon-warning-img {
    max-width: min(160px, 30vw);
    height: auto;
    flex-shrink: 0;
}

.abandon-warning-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 14px;
}

.abandon-warning-title-row img {
    width: clamp(56px, 10vw, 76px);
    height: clamp(56px, 10vw, 76px);
    object-fit: contain;
    flex-shrink: 0;
}

.abandon-warning-title {
    margin: 0;
    font-family: "Press Start 2P", monospace;
    font-size: clamp(56px, 10vw, 76px);
    line-height: 1;
    color: #000000;
}

.warning-sticker-wrap {
    display: flex;
    justify-content: center;
    margin: 8px 0 14px;
}

.warning-sticker {
    width: min(260px, 70vw);
    max-height: 220px;
    object-fit: contain;
    border-radius: 18px;
    border: 1px solid rgba(250, 204, 21, 0.35);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.35);
}

#abandonWarningText {
    text-align: left;
    color: #f5ebff;
    font-weight: 400;
    font-size: calc(0.82rem + 5px);
    line-height: 1.5;
    margin: 12px 0 36px;
}

#abandonWarningText strong {
    font-weight: 800;
}

#acceptAbandonWarningBtn {
    width: fit-content;
}


:root {
    --screen-bg-overlay: linear-gradient(135deg, rgba(8, 3, 17, 0.78), rgba(29, 8, 48, 0.67));
}

body.page-register,
body.page-admin {
    min-height: 100vh;
}

.page-bg-video {
    display: none;
    position: fixed;
    inset: 0;
    z-index: -3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

body.page-test .test-bg-video {
    display: block;
}

body.page-register .register-bg-video {
    display: block;
}

body.page-admin .admin-bg-video {
    display: block;
}

.admin-bg-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: var(--screen-bg-overlay);
}

body.page-admin .admin-bg-overlay {
    display: block;
}

#backBtn {
    display: none !important;
}

.post-register-notice-modal {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(7, 2, 14, 0.88);
    backdrop-filter: blur(10px);
}

.post-register-notice-modal .notice-card {
    width: min(1000px, 92vw);
    max-height: 85vh;
    overflow-y: auto;
    font-size: clamp(0.85rem, 2.2vw, 18px);
}

.post-register-notice-modal .info {
    gap: 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.post-register-notice-modal .info img {
    width: clamp(40px, 10vw, 64px);
    height: clamp(40px, 10vw, 64px);
    flex-shrink: 0;
}

.post-register-notice-modal .info h2 {
    font-size: clamp(1.05rem, 4vw, 25px);
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.post-register-notice-modal .info .btn.regist {
    margin-left: auto;
    font-size: clamp(0.7rem, 3vh, 14px);
    padding: clamp(6px, 1.4vh, 10px) clamp(10px, 2vw, 18px);
}

.notice-intro {
    color: #dbcbea;
    line-height: 1.5;
    font-weight: 700;
}

.notice-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 18px 0;
}

.notice-item {
    display: grid;
    width: 100%;
    box-sizing: border-box;
    gap: 6px;
    padding-top: 10px;
    padding-bottom: 10px;
    /*padding: 14px 16px;*/
    border-top: 1px solid #FFFFFF;
    /*border-radius: 16px;*/
    /*background: rgba(255,255,255,0.06);*/
}

.notice-item strong {
    color: #fff;
    font-size: 18px;
}

.notice-item span {
    color: white;
    line-height: 1.45;
    font-size: 18px;
}

#createPlayerScreen {
    padding: clamp(10px, 2.5vh, 40px) 16px;
    min-height: calc(100vh - 2 * clamp(10px, 2.5vh, 28px));
    box-sizing: border-box;
}

#createPlayerScreen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-player-card {
    position: relative;
    width: min(1000px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 340px) 1fr;
    gap: 32px;
    align-items: start;
    color: #FFFFFF;
}

.create-player-backdrop {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 0;
}

.create-player-left {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2.5vh, 24px);
    padding: clamp(12px, 2.5vh, 32px) 0 clamp(12px, 2.5vh, 32px) 24px;
}

.create-player-stats-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.create-player-avatar {
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #000000;
    border: 1px solid #FFFFFF;
    flex-shrink: 0;
}

.create-player-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
    font-family: "Press Start 2P", monospace;
}

.create-player-level-label {
    font-size: 0.7rem;
}

.create-player-level-number {
    font-size: 2rem;
}

.create-player-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 180px;
    min-width: 160px;
}

.create-player-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.create-player-bar-label {
    font-family: "Press Start 2P", monospace;
    font-size: 0.7rem;
    width: 2.5ch;
    flex-shrink: 0;
}

.create-player-bar-track {
    position: relative;
    flex: 1;
    height: 20px;
    background: #FFFFFF;
    overflow: hidden;
}

.create-player-bar-fill {
    height: 100%;
    width: 0%;
    background: #EE58DB;
}

.create-player-bar-pct {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    font-family: "Press Start 2P", monospace;
    font-size: 0.65rem;
    color: #000000;
}

.create-player-mage {
    width: 100%;
    max-width: 320px;
    height: auto;
}

.create-player-right {
    position: relative;
    z-index: 1;
    min-width: 0;
    padding: clamp(12px, 2.5vh, 32px) 24px clamp(12px, 2.5vh, 32px) 0;
}

.create-player-title {
    font-family: "Press Start 2P", monospace;
    color: #EE58DB;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    margin: 0 0 clamp(8px, 2vh, 20px);
    line-height: 1.3;
}

.create-player-form {
    width: 100%;
}

.create-player-form input {
    border-color: #FFFFFF;
    border-radius: 0;
    padding: clamp(6px, 1.3vh, 15px) 16px;
}

.create-player-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 1.6vh, 16px);
}

.create-player-field {
    display: flex;
    flex-direction: column;
    gap: clamp(3px, 0.8vh, 6px);
    min-width: 0;
}

.create-player-field label {
    margin: 0;
}

#createPlayerScreen .form {
    margin-top: clamp(6px, 1.3vh, 26px);
    gap: clamp(4px, 1vh, 12px);
}

@media (max-width: 480px) {
    .create-player-row {
        grid-template-columns: 1fr;
    }
}

.create-player-legal {
    font-size: 0.7rem;
    color: #a1a1aa;
    line-height: 1.3;
    margin: clamp(2px, 0.5vh, 4px) 0 0;
}

@media (max-width: 720px) {
    .create-player-card {
        grid-template-columns: 1fr;
    }

    .create-player-left {
        padding: 24px 16px 0;
    }

    .create-player-right {
        padding: 16px 16px 24px;
    }
}

@media (max-width: 480px) {
    .create-player-stats-row {
        flex-direction: column;
    }

    .create-player-bars {
        width: 100%;
    }

    .create-player-mage {
        max-width: 220px;
    }
}

/* ===== Final scores screen ===== */
body.page-scores::before,
body.page-scores::after {
    display: none;
}

body.page-scores {
    background: #000;
    min-height: 100vh;
    overflow: hidden;
    font-family: "Press Start 2P", monospace;
}

.scores-grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    perspective: 320px;
    perspective-origin: 50% 50%;
    overflow: hidden;
    pointer-events: none;
}

.scores-grid {
    position: absolute;
    left: -100%;
    width: 300%;
    height: 60%;
    background-image:
        linear-gradient(90deg, var(--grid-color) 3px, transparent 3px),
        linear-gradient(0deg, var(--grid-color) 3px, transparent 3px);
    background-size: 120px 60px;
}

.scores-grid-top {
    --grid-color: rgba(150, 150, 150, 0.7);
    top: -10%;
    transform-origin: 50% 100%;
    transform: rotateX(-75deg);
    mask-image: linear-gradient(to top, transparent 0%, #000 60%);
    -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 60%);
}

.scores-grid-bottom {
    --grid-color: rgba(190, 60, 170, 0.75);
    bottom: -10%;
    transform-origin: 50% 0%;
    transform: rotateX(75deg);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 60%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 60%);
}

.scores-app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.scores-card {
    width: min(960px, 100%);
    background: #000;
    border: 2px solid #8a8a8a;
    padding: clamp(24px, 4vw, 44px) clamp(14px, 4vw, 44px) clamp(32px, 6vw, 80px);
    text-align: center;
}

.scores-header {
    display: block;
    width: min(300px, 60%);
    margin: 0 auto;
}

.scores-title {
    margin: clamp(10px, 2vw, 20px) 0 clamp(28px, 5vw, 56px);
    font-family: "Press Start 2P", monospace;
    font-size: clamp(1.1rem, 4vw, 2.4rem);
    font-weight: 400;
    line-height: 1.2;
    color: #f052e6 !important;
    text-shadow: none;
    letter-spacing: 0.06em;
}

.scores-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 0;
    font-family: "Press Start 2P", monospace;
    font-size: clamp(0.55rem, 1.8vw, 1.05rem);
    color: #fff;
}

.scores-table th,
.scores-table td {
    padding: clamp(6px, 1.1vw, 11px) clamp(4px, 1.4vw, 20px);
    text-align: left;
    white-space: nowrap;
    border-bottom: 0;
    background: none;
    color: inherit;
    font-size: inherit;
}

.scores-table th:nth-child(3),
.scores-table td:nth-child(3) {
    text-align: center;
}

.scores-table th:last-child,
.scores-table td:last-child {
    text-align: right;
}

.scores-table th {
    font-weight: 400;
    padding-bottom: clamp(10px, 1.6vw, 18px);
}

.scores-table tbody tr {
    opacity: var(--fade, 1);
}

.scores-table tr.rank-1 td {
    color: #4ade5a;
    font-size: 1.6em;
    padding-top: clamp(8px, 1.3vw, 14px);
    padding-bottom: clamp(8px, 1.3vw, 14px);
    border-top: 1px solid #3fbf4c;
    border-bottom: 1px solid #3fbf4c;
}

.scores-table tr.rank-1 td:first-child {
    border-left: 1px solid #3fbf4c;
    padding-left: 6px;
}

.scores-table tr.rank-1 td:last-child {
    border-right: 1px solid #3fbf4c;
    padding-right: 6px;
}

.scores-table tr.rank-1 + tr td {
    padding-top: clamp(14px, 2vw, 22px);
}

.scores-table tr.rank-top td {
    color: #4ade5a;
}

@media (max-width: 520px) {
    .scores-card {
        padding-left: 8px;
        padding-right: 8px;
    }

    .scores-table {
        font-size: 0.5rem;
    }

    .scores-table th,
    .scores-table td {
        padding-left: 3px;
        padding-right: 3px;
    }

    .scores-table tr.rank-1 td {
        font-size: 1.35em;
    }
}
