:root {
    color-scheme: dark;
    --bg: #080c17;
    --bg-deep: #050812;
    --surface: #101725;
    --surface-raised: #151e2f;
    --surface-soft: #0e1422;
    --text: #f4f6fb;
    --text-soft: #aeb8ca;
    --text-faint: #78849a;
    --line: rgba(178, 194, 220, 0.15);
    --line-strong: rgba(191, 207, 232, 0.27);
    --blue: #67a8ef;
    --blue-rgb: 103, 168, 239;
    --violet: #a58ae8;
    --violet-rgb: 165, 138, 232;
    --orange: #e8a36e;
    --orange-rgb: 232, 163, 110;
    --yellow: #e8c96c;
    --yellow-rgb: 232, 201, 108;
    --success: #62d49b;
    --success-rgb: 98, 212, 155;
    --danger: #ef6f7a;
    --danger-rgb: 239, 111, 122;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 23px;
    --shadow: 0 22px 65px rgba(0, 0, 0, 0.31);
    --motion-fast: 170ms;
    --motion: 220ms;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 300px;
    min-height: 100%;
    background: var(--bg-deep);
    scroll-behavior: smooth;
}

body {
    min-width: 300px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 12%, rgba(var(--blue-rgb), 0.08), transparent 30rem),
        radial-gradient(circle at 90% 18%, rgba(var(--violet-rgb), 0.065), transparent 32rem),
        linear-gradient(145deg, var(--bg-deep), var(--bg) 48%, #090e1a);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
    background-size: 42px 42px;
    content: "";
    mask-image: linear-gradient(to bottom, black, transparent 80%);
    pointer-events: none;
}

body.modal-open {
    overflow: hidden;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
}

a {
    color: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(var(--blue-rgb), 0.75);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    background: var(--text);
    color: var(--bg);
    font-weight: 800;
    transform: translateY(-160%);
    transition: transform var(--motion-fast) ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.skip-link[data-focus-managed="true"]:focus-visible {
    transform: translateY(-160%);
}

.skip-link[data-focus-managed="true"]:focus-visible[data-keyboard-focus="true"] {
    transform: translateY(0);
}

.page-layout {
    display: grid;
    width: min(100%, 1080px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 27px 28px 18px;
}

.masthead,
.site-main,
.site-footer {
    grid-column: 1;
}

.site-main {
    min-width: 0;
}

.ad-rail {
    display: none;
}

.masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #f7f8fc;
    font-size: 0.96rem;
    font-weight: 780;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand--link {
    transition: color var(--motion-fast) ease;
}

.brand--link:hover {
    color: var(--blue);
}

.brand-mark {
    display: grid;
    width: 26px;
    height: 26px;
    padding: 4px;
    border: 1px solid rgba(var(--blue-rgb), 0.48);
    border-radius: 8px;
    background: rgba(var(--blue-rgb), 0.08);
    box-shadow: 0 0 18px rgba(var(--blue-rgb), 0.13);
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
}

.brand-mark i {
    display: block;
    border-radius: 2px;
    background: var(--blue);
}

.brand-mark i:nth-child(2) {
    border-radius: 50%;
    background: var(--violet);
}

.brand-mark i:nth-child(3) {
    background: var(--orange);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.brand-mark i:nth-child(4) {
    background: var(--yellow);
    transform: rotate(45deg) scale(0.74);
}

.edition-meta {
    display: flex;
    min-height: 26px;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 690;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.meta-separator {
    color: var(--text-faint);
}

.meta-skeleton,
.skeleton-line,
.skeleton-preview {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(193, 209, 234, 0.085);
}

.meta-skeleton::after,
.skeleton-line::after,
.skeleton-preview::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
    content: "";
    transform: translateX(-100%);
    animation: skeleton-shine 1.55s infinite ease-in-out;
}

.meta-skeleton {
    width: 128px;
    height: 12px;
}

.meta-skeleton--short {
    width: 55px;
}

.daily-summary {
    display: flex;
    min-height: 96px;
    padding: 22px 2px 19px;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--blue);
    font-size: 0.67rem;
    font-weight: 820;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.daily-summary h1 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(1.28rem, 2.2vw, 1.75rem);
    font-weight: 720;
    letter-spacing: -0.04em;
    line-height: 1.13;
}

.daily-intro {
    max-width: 650px;
    margin: 8px 0 0;
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.45;
}

.progress-wrap {
    display: flex;
    min-width: 130px;
    padding-bottom: 2px;
    align-items: flex-end;
    flex-direction: column;
}

.progress-wrap p {
    margin: 0 0 8px;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 730;
    white-space: nowrap;
}

.progress-wrap.is-complete p {
    color: var(--success);
}

.completion-totals {
    margin-top: 4px;
    color: var(--text-faint);
    font-size: 0.62rem;
    white-space: nowrap;
}

.progress-dots {
    display: flex;
    gap: 7px;
}

.progress-dots i {
    width: 23px;
    height: 5px;
    border-radius: 999px;
    background: rgba(185, 200, 224, 0.13);
    transition: background var(--motion) ease, box-shadow var(--motion) ease;
}

.progress-dots i:nth-child(1).is-complete {
    background: var(--blue);
    box-shadow: 0 0 11px rgba(var(--blue-rgb), 0.4);
}

.progress-dots i:nth-child(2).is-complete {
    background: var(--violet);
    box-shadow: 0 0 11px rgba(var(--violet-rgb), 0.4);
}

.progress-dots i:nth-child(3).is-complete {
    background: var(--orange);
    box-shadow: 0 0 11px rgba(var(--orange-rgb), 0.4);
}

.progress-dots i:nth-child(4).is-complete {
    background: var(--yellow);
    box-shadow: 0 0 11px rgba(var(--yellow-rgb), 0.4);
}

.load-state {
    margin: 0 0 17px;
    padding: 15px 17px;
    border: 1px solid rgba(var(--danger-rgb), 0.27);
    border-radius: var(--radius);
    background: rgba(var(--danger-rgb), 0.065);
}

.load-state p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.88rem;
}

.load-state strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text);
}

.load-state .primary-button {
    width: auto;
    margin-top: 11px;
}

.load-state.is-expired {
    border-color: rgba(var(--blue-rgb), 0.28);
    background: rgba(var(--blue-rgb), 0.06);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.game-card {
    --accent: var(--blue);
    --accent-rgb: var(--blue-rgb);
    position: relative;
    min-width: 0;
    min-height: 244px;
    overflow: hidden;
    border: 1px solid rgba(var(--accent-rgb), 0.32);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 88% 8%, rgba(var(--accent-rgb), 0.115), transparent 48%),
        linear-gradient(145deg, rgba(var(--accent-rgb), 0.035), rgba(15, 22, 36, 0.94) 48%);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 12px 34px rgba(0, 0, 0, 0.17);
    transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.game-card[data-game="menteur"] {
    --accent: var(--violet);
    --accent-rgb: var(--violet-rgb);
}

.game-card[data-game="convergence"] {
    --accent: var(--orange);
    --accent-rgb: var(--orange-rgb);
}

.game-card[data-game="un-seul-changement"] {
    --accent: var(--yellow);
    --accent-rgb: var(--yellow-rgb);
}

.game-card:not(.is-completed):not(.skeleton-card):not(.server-game-card):hover {
    border-color: rgba(var(--accent-rgb), 0.56);
    box-shadow: 0 16px 41px rgba(0, 0, 0, 0.22), 0 0 24px rgba(var(--accent-rgb), 0.1);
    transform: translateY(-2px);
}

.server-game-card .game-card-button {
    cursor: progress;
}

.difficulty-badge--loading {
    min-width: 42px;
    justify-content: center;
    color: var(--text-faint);
}

.game-card.is-completed {
    border-color: rgba(var(--success-rgb), 0.27);
    background:
        radial-gradient(circle at 88% 8%, rgba(var(--success-rgb), 0.07), transparent 43%),
        linear-gradient(145deg, rgba(var(--accent-rgb), 0.025), rgba(15, 22, 36, 0.94) 48%);
}

.game-card-button {
    display: flex;
    width: 100%;
    min-height: 242px;
    padding: 20px 21px 18px;
    border-radius: inherit;
    align-items: stretch;
    flex-direction: column;
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.game-card-button:disabled {
    color: inherit;
    cursor: default;
    opacity: 1;
}

.game-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.game-card-number {
    margin: 0 0 3px;
    color: var(--accent);
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.game-card h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.17rem;
    font-weight: 760;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.difficulty-badge {
    display: inline-flex;
    min-height: 24px;
    padding: 4px 8px;
    border: 1px solid rgba(var(--accent-rgb, var(--blue-rgb)), 0.25);
    border-radius: 999px;
    align-items: center;
    color: var(--accent, var(--blue));
    background: rgba(var(--accent-rgb, var(--blue-rgb)), 0.07);
    font-size: 0.59rem;
    font-weight: 850;
    letter-spacing: 0.1em;
}

.game-preview {
    display: flex;
    height: 90px;
    margin: 13px 0 11px;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.game-card-description {
    min-height: 36px;
    margin: 0;
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.4;
}

.game-card-footer {
    display: flex;
    min-height: 26px;
    margin-top: auto;
    padding-top: 11px;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}

.card-cta {
    color: var(--accent);
    font-size: 0.67rem;
    font-weight: 850;
    letter-spacing: 0.115em;
}

.card-cta::after {
    margin-left: 7px;
    content: "→";
}

.card-result {
    color: var(--text-faint);
    font-size: 0.67rem;
    white-space: nowrap;
}

.game-card.is-completed .card-cta {
    color: var(--success);
}

.game-card.is-completed .card-cta::after {
    content: "";
}

.preview-number {
    display: flex;
    align-items: center;
    gap: 9px;
}

.preview-number strong {
    display: grid;
    width: 55px;
    height: 55px;
    border: 1px solid rgba(var(--blue-rgb), 0.42);
    border-radius: 17px;
    place-items: center;
    background: rgba(var(--blue-rgb), 0.075);
    font-size: 1.55rem;
    box-shadow: 0 0 25px rgba(var(--blue-rgb), 0.09);
}

.preview-number span {
    display: grid;
    grid-template-columns: repeat(2, 22px);
    gap: 4px;
    color: var(--text-soft);
    font-size: 0.8rem;
    text-align: center;
}

.preview-liar {
    display: flex;
    align-items: flex-end;
    gap: 7px;
}

.preview-liar i {
    display: block;
    width: 36px;
    height: 48px;
    border: 1px solid rgba(var(--violet-rgb), 0.38);
    border-radius: 9px;
    background: rgba(var(--violet-rgb), 0.06);
    transform: rotate(-7deg);
}

.preview-liar i:nth-child(2) {
    height: 58px;
    transform: translateY(-5px);
}

.preview-liar i:nth-child(3) {
    transform: rotate(7deg);
}

.preview-convergence {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-convergence span {
    display: grid;
    width: 65px;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.preview-convergence i,
.preview-change i {
    aspect-ratio: 1;
    border-radius: 4px;
    background: rgba(var(--orange-rgb), 0.2);
}

.preview-convergence span:nth-child(2) i:nth-child(odd),
.preview-convergence span:nth-child(1) i:nth-child(even) {
    background: rgba(var(--orange-rgb), 0.58);
}

.preview-convergence b {
    color: var(--orange);
    font-size: 1.1rem;
}

.preview-change {
    display: grid;
    width: 76px;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.preview-change i {
    background: rgba(var(--yellow-rgb), 0.18);
}

.preview-change i:nth-child(5) {
    border: 1px solid var(--yellow);
    background: rgba(var(--yellow-rgb), 0.52);
    box-shadow: 0 0 13px rgba(var(--yellow-rgb), 0.25);
}

.skeleton-card {
    display: flex;
    padding: 22px;
    border-color: var(--line);
    flex-direction: column;
    background: rgba(18, 26, 42, 0.72);
}

.skeleton-line {
    width: 70%;
    height: 13px;
    margin-bottom: 11px;
}

.skeleton-line--small {
    width: 36%;
    height: 10px;
}

.skeleton-preview {
    width: 47%;
    height: 74px;
    margin: 12px auto 18px;
    border-radius: 17px;
}

.skeleton-line--button {
    width: 25%;
    height: 11px;
    margin-top: auto;
}

.stats-panel {
    display: grid;
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(13, 20, 33, 0.68);
    grid-template-columns: repeat(3, 1fr);
}

.stats-panel > div {
    display: flex;
    min-height: 57px;
    padding: 9px 18px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.stats-panel > div + div {
    border-left: 1px solid var(--line);
}

.home-presentation {
    margin-top: 20px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(13, 20, 33, 0.48);
}

.home-presentation h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.08rem;
    letter-spacing: -0.025em;
}

.home-presentation p:not(.eyebrow) {
    max-width: 850px;
    margin: 9px 0 0;
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.6;
}

.home-presentation .text-link {
    margin-top: 11px;
    font-size: 0.75rem;
}

.stat-value {
    color: var(--text);
    font-size: 1rem;
    font-weight: 780;
    line-height: 1.15;
}

.stat-label {
    margin-top: 2px;
    color: var(--text-faint);
    font-size: 0.63rem;
    font-weight: 650;
    letter-spacing: 0.035em;
}

.site-footer {
    display: flex;
    min-height: 43px;
    padding: 16px 2px 0;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--text-faint);
    font-size: 0.65rem;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.site-footer a {
    text-decoration: none;
    transition: color var(--motion-fast) ease;
}

.site-footer a:hover {
    color: var(--text);
}

.site-footer p {
    margin: 0;
    text-align: right;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    padding: 20px;
    place-items: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 5, 11, 0.82);
    backdrop-filter: blur(9px);
    animation: fade-in var(--motion) ease both;
}

.modal-panel {
    --accent: var(--blue);
    --accent-rgb: var(--blue-rgb);
    position: relative;
    display: flex;
    width: min(960px, 100%);
    max-height: calc(100vh - 40px);
    min-height: min(665px, calc(100vh - 40px));
    overflow: hidden;
    border: 1px solid rgba(var(--accent-rgb), 0.45);
    border-radius: 26px;
    flex-direction: column;
    background:
        radial-gradient(circle at 50% -20%, rgba(var(--accent-rgb), 0.105), transparent 48%),
        #0b111e;
    box-shadow: var(--shadow), 0 0 36px rgba(var(--accent-rgb), 0.095), inset 0 1px rgba(255, 255, 255, 0.03);
    animation: modal-enter var(--motion) cubic-bezier(0.2, 0.75, 0.25, 1) both;
    transition: border-color 420ms cubic-bezier(0.22, 0.7, 0.25, 1), box-shadow 420ms cubic-bezier(0.22, 0.7, 0.25, 1);
}

.modal-panel::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 50% -20%, rgba(var(--danger-rgb), 0.2), transparent 50%),
        rgba(44, 13, 23, 0.62);
    content: "";
    opacity: 0;
    pointer-events: none;
    transition: opacity 420ms cubic-bezier(0.22, 0.7, 0.25, 1);
}

.modal-panel > * {
    position: relative;
    z-index: 1;
}

.modal[data-game="menteur"] .modal-panel {
    --accent: var(--violet);
    --accent-rgb: var(--violet-rgb);
}

.modal[data-game="convergence"] .modal-panel {
    --accent: var(--orange);
    --accent-rgb: var(--orange-rgb);
}

.modal[data-game="un-seul-changement"] .modal-panel {
    --accent: var(--yellow);
    --accent-rgb: var(--yellow-rgb);
}

.modal-panel.is-failure {
    border-color: rgba(var(--danger-rgb), 0.82);
    box-shadow: var(--shadow), 0 0 48px rgba(var(--danger-rgb), 0.22), inset 0 0 42px rgba(var(--danger-rgb), 0.045);
    transition-duration: 130ms;
}

.modal-panel.is-failure::before {
    opacity: 1;
    transition-duration: 130ms;
}

.modal-header {
    display: flex;
    min-height: 78px;
    padding: 18px 20px 12px 24px;
    border-bottom: 1px solid var(--line);
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.modal-title-row {
    display: flex;
    align-items: center;
    gap: 11px;
}

.modal-title-row h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 770;
    letter-spacing: -0.03em;
}

.modal-instruction {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 0.79rem;
}

.modal-instruction-row {
    display: flex;
    min-width: 0;
    margin-top: 4px;
    align-items: center;
    gap: 8px;
}

.modal-instruction-row .modal-instruction {
    min-width: 0;
    margin-top: 0;
}

.modal-info-button {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    border: 1px solid rgba(var(--accent-rgb), 0.38);
    border-radius: 50%;
    place-items: center;
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.07);
    cursor: pointer;
    transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.modal-info-button:hover,
.modal-info-button[aria-expanded="true"] {
    border-color: rgba(var(--accent-rgb), 0.72);
    background: rgba(var(--accent-rgb), 0.14);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.12);
}

.modal-info-button span {
    font-family: Georgia, serif;
    font-size: 0.82rem;
    font-style: italic;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-0.5px);
}

.icon-button {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    place-items: center;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    transition: border-color var(--motion-fast) ease, color var(--motion-fast) ease, background var(--motion-fast) ease;
}

.icon-button:hover {
    border-color: var(--line-strong);
    color: var(--text);
    background: rgba(255, 255, 255, 0.055);
}

.icon-button span {
    font-size: 1.55rem;
    font-weight: 300;
    line-height: 1;
    transform: translateY(-1px);
}

.modal-statusbar {
    display: flex;
    min-height: 33px;
    padding: 7px 24px;
    border-bottom: 1px solid rgba(178, 194, 220, 0.08);
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--text-faint);
    font-size: 0.68rem;
    font-weight: 690;
}

#modal-message {
    min-height: 1em;
    color: var(--text-soft);
    text-align: right;
}

#modal-message.is-error {
    color: var(--danger);
}

#modal-message.is-success {
    color: var(--success);
}

.modal-game-root {
    display: flex;
    min-height: 0;
    padding: 21px 25px 25px;
    flex: 1;
    overflow: auto;
    scrollbar-color: rgba(var(--accent-rgb), 0.3) transparent;
}

.modal-help-panel {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    min-width: 0;
    min-height: 0;
    padding: clamp(24px, 4vw, 42px);
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 0, rgba(var(--accent-rgb), 0.12), transparent 35rem),
        linear-gradient(145deg, #0c1321, #090f1b 62%, #0b111e);
    animation: help-enter 190ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.modal-help-header {
    display: flex;
    padding-bottom: 17px;
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.2);
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.modal-help-header h3 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 760;
    letter-spacing: -0.035em;
}

.modal-help-close {
    display: inline-flex;
    min-height: 39px;
    padding: 8px 13px;
    border: 1px solid rgba(var(--accent-rgb), 0.34);
    border-radius: 11px;
    align-items: center;
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.06);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 780;
    letter-spacing: 0.045em;
    transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}

.modal-help-close::before {
    margin-right: 7px;
    content: "←";
}

.modal-help-close:hover {
    border-color: rgba(var(--accent-rgb), 0.68);
    background: rgba(var(--accent-rgb), 0.12);
}

.modal-help-content {
    width: min(100%, 720px);
    min-height: 0;
    margin: 0 auto;
    padding: clamp(25px, 5vh, 46px) 8px 24px 30px;
    flex: 1;
    overflow: auto;
    color: var(--text-soft);
    font-size: clamp(0.83rem, 1.6vw, 0.94rem);
    line-height: 1.65;
    scrollbar-color: rgba(var(--accent-rgb), 0.32) transparent;
}

.modal-help-content li {
    position: relative;
    padding-left: 5px;
}

.modal-help-content li + li {
    margin-top: 14px;
}

.modal-help-content li::marker {
    color: var(--accent);
}

.modal.is-closing {
    pointer-events: none;
}

.modal.is-closing .modal-backdrop {
    opacity: 0;
    animation: none;
    transition: opacity 220ms ease;
}

.game-stage {
    width: 100%;
    margin: auto;
}

.primary-button,
.secondary-button,
.game-submit {
    display: inline-flex;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid rgba(var(--accent-rgb, var(--blue-rgb)), 0.45);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    color: #08101b;
    background: var(--accent, var(--blue));
    font-size: 0.7rem;
    font-weight: 860;
    letter-spacing: 0.095em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(var(--accent-rgb, var(--blue-rgb)), 0.16);
    transition: filter var(--motion-fast) ease, transform 90ms ease, opacity var(--motion-fast) ease;
}

.primary-button:hover,
.game-submit:hover {
    filter: brightness(1.08);
}

.primary-button:active,
.secondary-button:active,
.game-submit:active {
    transform: translateY(1px) scale(0.99);
}

.primary-button:disabled,
.secondary-button:disabled,
.game-submit:disabled {
    cursor: not-allowed;
    filter: none;
    opacity: 0.38;
    box-shadow: none;
}

.primary-button--inline {
    width: auto;
    margin-top: 16px;
}

.secondary-button {
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.025);
    box-shadow: none;
}

.secondary-button:hover:not(:disabled) {
    border-color: rgba(var(--accent-rgb, var(--blue-rgb)), 0.68);
    color: var(--text);
    background: rgba(var(--accent-rgb, var(--blue-rgb)), 0.07);
}

.game-submit {
    min-width: 160px;
}

.symbol-cluster {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.puzzle-symbol {
    display: block;
    width: var(--symbol-size, 42px);
    height: var(--symbol-size, 42px);
    flex: 0 0 auto;
    overflow: visible;
    filter: drop-shadow(0 0 7px color-mix(in srgb, currentColor 24%, transparent));
}

.puzzle-symbol [data-fill="outline"] {
    fill: rgba(8, 12, 23, 0.54);
    stroke: currentColor;
    stroke-width: 3.2;
}

.puzzle-symbol [data-fill="solid"] {
    fill: currentColor;
    stroke: color-mix(in srgb, currentColor 72%, white);
    stroke-width: 1;
}

.symbol-blue { color: var(--blue); }
.symbol-violet { color: var(--violet); }
.symbol-orange { color: var(--orange); }
.symbol-yellow { color: var(--yellow); }

.nombre-game {
    max-width: 610px;
}

.number-brief {
    display: grid;
    margin: 0 auto 23px;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.number-metric {
    display: flex;
    min-width: 112px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    flex-direction: column;
    background: rgba(255, 255, 255, 0.018);
    text-align: center;
}

.number-metric span {
    color: var(--text-faint);
    font-size: 0.62rem;
    font-weight: 770;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.number-metric strong {
    margin-top: 2px;
    font-size: 1.42rem;
}

.number-arrow {
    color: var(--text-faint);
    font-size: 1.2rem;
}

.current-value-wrap {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.current-label {
    margin: 0 0 8px;
    color: var(--text-faint);
    font-size: 0.64rem;
    font-weight: 780;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.current-value {
    display: grid;
    width: 132px;
    height: 132px;
    border: 1px solid rgba(var(--blue-rgb), 0.52);
    border-radius: 38px;
    place-items: center;
    background: radial-gradient(circle, rgba(var(--blue-rgb), 0.125), rgba(var(--blue-rgb), 0.035));
    color: var(--text);
    font-size: 3.2rem;
    font-variant-numeric: tabular-nums;
    font-weight: 760;
    box-shadow: 0 0 36px rgba(var(--blue-rgb), 0.12), inset 0 0 30px rgba(var(--blue-rgb), 0.045);
}

.current-value.is-updated {
    animation: value-pop 230ms ease;
}

.operation-progress {
    margin: 11px 0 20px;
    color: var(--text-faint);
    font-size: 0.74rem;
    text-align: center;
}

.operations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 11px;
}

.nombre-actions {
    display: flex;
    margin-top: 16px;
    justify-content: center;
}

.nombre-restart-button {
    min-width: 158px;
}

.operation-button {
    min-height: 62px;
    border: 1px solid rgba(var(--blue-rgb), 0.37);
    border-radius: 17px;
    color: var(--blue);
    background: rgba(var(--blue-rgb), 0.06);
    font-size: 1.65rem;
    cursor: pointer;
    transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease, opacity var(--motion-fast) ease, transform 90ms ease;
}

.operation-button:hover:not(:disabled) {
    border-color: rgba(var(--blue-rgb), 0.73);
    background: rgba(var(--blue-rgb), 0.11);
}

.operation-button:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
}

.operation-button.is-impossible {
    animation: operation-nudge 260ms ease;
}

.operation-button:disabled,
.operation-button.is-used {
    border-color: var(--line);
    color: var(--text-faint);
    background: rgba(255, 255, 255, 0.018);
    cursor: not-allowed;
    opacity: 0.42;
}

.liar-game {
    max-width: 820px;
}

.liar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.liar-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 156px;
    padding: 13px 9px 11px;
    border: 1px solid rgba(var(--violet-rgb), 0.25);
    border-radius: 15px;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    color: var(--text);
    background: rgba(var(--violet-rgb), 0.038);
    cursor: pointer;
    transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.liar-card:hover:not(:disabled) {
    border-color: rgba(var(--violet-rgb), 0.55);
    background: rgba(var(--violet-rgb), 0.075);
    transform: translateY(-1px);
}

.liar-card.is-selected {
    border-color: var(--violet);
    background: rgba(var(--violet-rgb), 0.12);
    box-shadow: 0 0 23px rgba(var(--violet-rgb), 0.16), inset 0 0 0 1px rgba(var(--violet-rgb), 0.25);
}

.liar-card.is-selected::before {
    position: absolute;
    top: 7px;
    right: 8px;
    display: grid;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    place-items: center;
    color: #0b111e;
    background: var(--violet);
    content: "✓";
    font-size: 0.62rem;
    font-weight: 900;
}

.liar-card .symbol-cluster {
    min-height: 78px;
}

.liar-card .puzzle-symbol {
    --symbol-size: 37px;
}

.liar-card[data-quantity="3"] .puzzle-symbol {
    --symbol-size: 31px;
}

.liar-label {
    display: inline-flex;
    width: 100%;
    min-height: 27px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.59rem;
    font-weight: 850;
    letter-spacing: 0.075em;
}

.liar-label::before {
    content: "○";
    font-size: 0.76rem;
}

.liar-label.is-accepted::before {
    content: "✓";
}

.liar-actions,
.change-actions {
    display: flex;
    min-height: 56px;
    margin-top: 15px;
    align-items: end;
    justify-content: center;
}

.convergence-game {
    max-width: 860px;
}

.convergence-grids {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 34px;
}

.convergence-grid-wrap {
    min-width: 0;
}

.grid-heading {
    display: flex;
    margin-bottom: 8px;
    align-items: center;
    justify-content: space-between;
    color: var(--text-faint);
    font-size: 0.63rem;
    font-weight: 790;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.grid-heading b {
    display: grid;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(var(--orange-rgb), 0.32);
    border-radius: 7px;
    place-items: center;
    color: var(--orange);
    background: rgba(var(--orange-rgb), 0.07);
}

.puzzle-grid {
    display: grid;
    width: min(100%, 294px);
    margin: 0 auto;
    padding: 8px;
    border: 1px solid rgba(var(--orange-rgb), 0.26);
    border-radius: 17px;
    background: rgba(var(--orange-rgb), 0.035);
    gap: 6px;
}

.puzzle-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cell {
    position: relative;
    display: grid;
    min-width: 0;
    aspect-ratio: 1;
    border: 1px solid rgba(190, 202, 222, 0.11);
    border-radius: 11px;
    place-items: center;
    background: rgba(255, 255, 255, 0.025);
    transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.grid-cell .puzzle-symbol {
    --symbol-size: min(48px, 60%);
}

.grid-cell.shift-left .puzzle-symbol { animation: shift-left 200ms ease; }
.grid-cell.shift-right .puzzle-symbol { animation: shift-right 200ms ease; }
.grid-cell.shift-up .puzzle-symbol { animation: shift-up 200ms ease; }
.grid-cell.shift-down .puzzle-symbol { animation: shift-down 200ms ease; }

.convergence-controls {
    display: grid;
    margin-top: 15px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.016);
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.axis-controls > span {
    display: block;
    margin-bottom: 7px;
    color: var(--text-faint);
    font-size: 0.59rem;
    font-weight: 780;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.axis-button-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.axis-button {
    min-height: 39px;
    padding: 6px;
    border: 1px solid rgba(var(--orange-rgb), 0.31);
    border-radius: 9px;
    color: var(--orange);
    background: rgba(var(--orange-rgb), 0.05);
    font-size: 0.67rem;
    font-weight: 760;
    cursor: pointer;
    transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}

.axis-button:hover:not(:disabled) {
    border-color: rgba(var(--orange-rgb), 0.68);
    background: rgba(var(--orange-rgb), 0.1);
}

.axis-button:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.movement-footer {
    display: flex;
    min-height: 45px;
    margin-top: 10px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.move-count {
    color: var(--text-soft);
    font-size: 0.73rem;
    font-variant-numeric: tabular-nums;
    font-weight: 730;
}

.retry-panel {
    display: flex;
    align-items: center;
    gap: 12px;
}

.retry-panel span {
    color: var(--danger);
    font-size: 0.72rem;
    font-weight: 720;
}

.change-game {
    max-width: 690px;
}

.change-grid {
    width: min(100%, 390px);
    border-color: rgba(var(--yellow-rgb), 0.29);
    background: rgba(var(--yellow-rgb), 0.025);
}

.change-grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.change-cell {
    padding: 0;
    cursor: pointer;
}

.change-cell:hover:not(:disabled) {
    border-color: rgba(var(--yellow-rgb), 0.48);
    background: rgba(var(--yellow-rgb), 0.06);
}

.change-cell.is-selected {
    border-color: var(--yellow);
    background: rgba(var(--yellow-rgb), 0.12);
    box-shadow: 0 0 17px rgba(var(--yellow-rgb), 0.16), inset 0 0 0 1px rgba(var(--yellow-rgb), 0.2);
}

.change-cell.is-correct {
    border-color: var(--success);
    background: rgba(var(--success-rgb), 0.13);
    box-shadow: 0 0 23px rgba(var(--success-rgb), 0.2);
}

.change-choices {
    min-height: 95px;
    margin-top: 16px;
    text-align: center;
}

.change-choices > p {
    margin: 0 0 9px;
    color: var(--text-soft);
    font-size: 0.73rem;
    font-weight: 720;
}

.symbol-choice-list {
    display: flex;
    min-height: 57px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
}

.symbol-choice {
    display: grid;
    width: 57px;
    height: 57px;
    border: 1px solid rgba(var(--yellow-rgb), 0.27);
    border-radius: 13px;
    place-items: center;
    background: rgba(var(--yellow-rgb), 0.035);
    cursor: pointer;
    transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.symbol-choice:hover {
    border-color: rgba(var(--yellow-rgb), 0.58);
    transform: translateY(-1px);
}

.symbol-choice.is-selected {
    border-color: var(--yellow);
    background: rgba(var(--yellow-rgb), 0.12);
    box-shadow: 0 0 16px rgba(var(--yellow-rgb), 0.14);
}

.symbol-choice .puzzle-symbol {
    --symbol-size: 35px;
}

.success-view,
.expired-view {
    display: flex;
    width: min(100%, 540px);
    min-height: 400px;
    margin: auto;
    padding: 30px 20px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.success-check {
    display: grid;
    width: 76px;
    height: 76px;
    margin-bottom: 17px;
    border: 1px solid rgba(var(--success-rgb), 0.55);
    border-radius: 24px;
    place-items: center;
    color: var(--success);
    background: rgba(var(--success-rgb), 0.09);
    box-shadow: 0 0 32px rgba(var(--success-rgb), 0.15);
    font-size: 2rem;
    animation: success-enter 440ms ease both;
}

.success-view h3,
.expired-view h3 {
    margin: 0;
    color: var(--success);
    font-size: 1.55rem;
    letter-spacing: 0.055em;
}

.expired-view h3 {
    color: var(--text);
    letter-spacing: -0.025em;
}

.success-view > p,
.expired-view > p {
    max-width: 460px;
    margin: 9px 0 0;
    color: var(--text-soft);
    font-size: 0.86rem;
}

.success-details {
    display: flex;
    margin: 22px 0;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.02);
}

.success-details span {
    min-width: 125px;
    padding: 11px 15px;
    color: var(--text-soft);
    font-size: 0.72rem;
}

.success-details span + span {
    border-left: 1px solid var(--line);
}

.success-explanation {
    width: 100%;
    margin: 0 0 20px !important;
    padding: 13px 15px;
    border-left: 2px solid var(--success);
    border-radius: 0 10px 10px 0;
    background: rgba(var(--success-rgb), 0.055);
    color: var(--text) !important;
    text-align: left;
}

.noscript-message {
    position: fixed;
    right: 14px;
    bottom: 14px;
    left: 14px;
    z-index: 90;
    padding: 14px;
    border: 1px solid rgba(var(--danger-rgb), 0.45);
    border-radius: var(--radius);
    background: #25151d;
    text-align: center;
}

.local-notice {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 80;
    max-width: min(360px, calc(100vw - 32px));
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--text-soft);
    background: rgba(12, 18, 30, 0.96);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    font-size: 0.7rem;
}

.static-page {
    display: flex;
    min-height: 100vh;
    padding: 0 24px;
    flex-direction: column;
}

.static-header {
    width: min(100%, 820px);
    margin: 0 auto;
    padding: 28px 0 22px;
}

.legal-card {
    width: min(100%, 820px);
    margin: 16px auto auto;
    padding: clamp(28px, 5vw, 55px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 90% 0, rgba(var(--blue-rgb), 0.07), transparent 33rem),
        rgba(14, 21, 35, 0.78);
    box-shadow: var(--shadow);
}

.legal-card h1 {
    margin: 0 0 20px;
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: -0.055em;
    line-height: 1.03;
}

.legal-card h2 {
    margin: 29px 0 8px;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.legal-card p {
    color: var(--text-soft);
}

.legal-card .lead {
    max-width: 650px;
    margin: 0 0 27px;
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.65;
}

.text-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--blue);
    font-weight: 760;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.legal-list {
    margin: 24px 0;
}

.legal-list > div {
    display: grid;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    grid-template-columns: minmax(150px, 0.45fr) 1fr;
    gap: 20px;
}

.legal-list dt {
    color: var(--text);
    font-weight: 750;
}

.legal-list dd {
    margin: 0;
    color: var(--text-soft);
}

.contact-placeholder {
    display: flex;
    margin: 28px 0;
    padding: 18px;
    border: 1px dashed rgba(var(--blue-rgb), 0.38);
    border-radius: var(--radius);
    align-items: center;
    gap: 16px;
    background: rgba(var(--blue-rgb), 0.04);
}

.contact-placeholder > span {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 14px;
    place-items: center;
    color: var(--blue);
    background: rgba(var(--blue-rgb), 0.1);
}

.contact-placeholder h2,
.contact-placeholder p {
    margin: 0;
}

.error-code {
    margin: -12px 0 2px;
    color: rgba(var(--blue-rgb), 0.2);
    font-size: clamp(5rem, 18vw, 9rem);
    font-weight: 900;
    letter-spacing: -0.09em;
    line-height: 1;
}

.static-footer {
    width: min(100%, 820px);
    margin: 30px auto 22px;
}

@keyframes skeleton-shine {
    to { transform: translateX(100%); }
}

@keyframes fade-in {
    from { opacity: 0; }
}

@keyframes modal-enter {
    from { opacity: 0; transform: translateY(10px) scale(0.992); }
}

@keyframes help-enter {
    from { opacity: 0; transform: translateY(7px); }
}

@keyframes success-enter {
    from { opacity: 0; transform: scale(0.82) rotate(-5deg); }
}

@keyframes value-pop {
    45% { transform: scale(1.04); color: var(--blue); }
}

@keyframes operation-nudge {
    35% { transform: translateX(-2px); }
    70% { transform: translateX(2px); }
}

@keyframes shift-left {
    45% { opacity: 0.52; transform: translateX(-20%); }
}

@keyframes shift-right {
    45% { opacity: 0.52; transform: translateX(20%); }
}

@keyframes shift-up {
    45% { opacity: 0.52; transform: translateY(-20%); }
}

@keyframes shift-down {
    45% { opacity: 0.52; transform: translateY(20%); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}
