/* ==========================================================================
   CALENDRIER PICATRAD — FEUILLE DE STYLE PRINCIPALE
   Thème : Professeur Layton (Carnet parchemin, or vieilli & bois d'acajou)
   ========================================================================== */

/* --------------------------------------------------------------------------
   SOMMAIRE / TABLE DES MATIÈRES
   --------------------------------------------------------------------------
   01. DESIGN TOKENS & TYPOGRAPHIE
       - Import Google Fonts
       - Variables globales (:root)
   02. RESET & STYLES DE BASE
       - Normalisation box-sizing
       - Body, html & fond texturé
   03. STRUCTURE GLOBALE & LAYOUT
       - Conteneur de page (.site-shell)
   04. BARRE SUPÉRIEURE DE NAVIGATION (TOPBAR)
       - Barre générale (.topbar)
       - Logo & identité du site (.brand)
       - Profil utilisateur (.user-area, .avatar, menu déroulant)
       - Lecteur radio Layton (.radio-wrapper, #radio-player-container)
   05. PAGE D'ACCUEIL & CALENDRIER
       - Titre d'introduction (.intro)
       - Cadre & carte du calendrier (.calendar-section, .calendar-frame, etc.)
       - Statistiques du joueur (.player-stats-bar)
       - Message mystère / Phrase secrète (.secret-sentence)
   06. PAGE D'ÉNIGME (LE LIVRE LAYTON)
       - Enveloppe & texture du livre (.enigma-book, .enigma-page-wrapper)
       - Reliure en cuir & zone intérieure (.enigma-inner)
       - En-tête à deux colonnes (.enigma-top-row, .enigma-header)
       - Titre imposant (.enigma-title-main)
       - Filet décoratif diamanté (.enigma-rule)
       - Bloc de valeur Picarats (.picarats-block)
       - Énoncé & citation de l'énigme (.puzzle-statement, .puzzle-statement--quote)
       - Illustrations de l'énigme (.enigma-image-wrapper, .enigma-image)
   07. FORMULAIRES, BOUTONS & FEEDBACK
       - Formulaire standard (.enigma-form, .form-group)
       - Formulaire simple (.enigma-simple-form)
       - Groupe de saisie avec unité (.simple-input-group)
       - Boutons Layton & Discord (.btn-submit, .btn-primary)
       - Badges de résolution & Liens de retour (.resolved-badge, .back-link)
       - Messages d'alerte (.alert, .alert-success, .alert-error)
   08. TYPES D'ÉNIGMES SPÉCIFIQUES
       - Séquences horizontales (.sequence-puzzle, .sequence-input-group)
       - Séquences verticales (.sequence-puzzle--vertical)
       - Énigme Look-and-Say (.look-say-list, .look-say-answer)
   09. OVERLAY CINÉMATIQUE (RÉSOLUTIONS LAYTON)
       - Écran noir & citations (#cinematic-overlay, #cin-text, #cin-img)
   10. RESPONSIVE DESIGN (MEDIA QUERIES)
       - Écrans intermédiaires & tablettes (max-width: 650px)
       - Écrans mobiles (max-width: 600px)
       - Petits mobiles (max-width: 480px)
   ========================================================================== */


/* ==========================================================================
   01. DESIGN TOKENS & TYPOGRAPHIE
   ========================================================================== */

/* Polices Google Fonts : Cinzel (titres solennels) & Lora (textes littéraires) */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Lora:ital,wght@0,400..700;1,400..700&display=swap');

:root {
    /* Palette parchemin */
    --parchment-light: #f5e9c8;
    --parchment-mid: #e8d49a;
    --parchment-dark: #c9a84c;
    --parchment-border: #a07830;

    /* Bois & cuir */
    --wood-dark: #5a3a1a;
    --wood-mid: #7a5230;
    --leather-brown: #8b5e3c;

    /* Texte & encres */
    --ink-dark: #2c1a0e;
    --ink-mid: #5a3a1a;
    --ink-light: #7a5230;

    /* Picarats (orange & or Layton) */
    --picarat-orange: #c8541a;
    --picarat-gold: #e8a020;

    /* Messages & retours utilisateurs */
    --success-green: #4a7c3f;
    --error-red: #8b2020;
    --success-bg: #e8f0d8;
    --error-bg: #f0d8d8;

    /* Géométrie & ombrages */
    --border-radius: 6px;
    --shadow: 2px 4px 12px rgba(90, 58, 26, 0.25);
    --shadow-strong: 3px 6px 20px rgba(90, 58, 26, 0.40);
    --transition: all 0.2s ease;
}


/* ==========================================================================
   02. RESET & STYLES DE BASE
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: #2e1f0e;
    background-image:
        radial-gradient(ellipse at top left, #3d2a10 0%, transparent 60%),
        radial-gradient(ellipse at bottom right, #1a0e05 0%, transparent 60%);
    min-height: 100vh;
    color: var(--ink-dark);
    font-family: "Lora", serif;
    line-height: 1.7;
}


/* ==========================================================================
   03. STRUCTURE GLOBALE & LAYOUT
   ========================================================================== */

.site-shell {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

main.site-shell {
    padding-top: 28px;
    padding-bottom: 40px;
}


/* ==========================================================================
   04. BARRE SUPÉRIEURE DE NAVIGATION (TOPBAR)
   ========================================================================== */

.topbar {
    background: linear-gradient(135deg, var(--wood-dark) 0%, var(--wood-mid) 60%, var(--wood-dark) 100%);
    border-bottom: 3px solid var(--parchment-border);
    padding: 6px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    gap: 12px;
}

/* Identité / Logo */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--parchment-light);
    transition: opacity .2s;
}

.brand:hover {
    opacity: .8;
}

.brand-mark {
    font-size: 1.8rem;
    color: var(--parchment-gold, #e8c060);
    text-shadow: 0 0 8px rgba(232, 192, 96, 0.5);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-copy strong {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    letter-spacing: .08em;
    color: var(--parchment-light);
}

.brand-copy span {
    font-family: "Lora", serif;
    font-style: italic;
    font-size: .8rem;
    color: var(--parchment-mid);
}

/* Lecteur Radio */
.radio-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    overflow: hidden;
}

#radio-player-container {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    padding: 4px 12px 4px 4px;
    gap: 8px;
    border: 1px solid rgba(212, 110, 48, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 100%;
}

/* Espace utilisateur & profil */
.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "Lora", serif;
    font-style: italic;
    color: var(--parchment-light);
    font-size: .9rem;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--parchment-border);
    object-fit: cover;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.user-name {
    white-space: nowrap;
}

.user-dropdown-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout {
    font-family: 'Libre Baskerville', serif;
    font-style: normal;
    font-size: .78rem;
    color: var(--parchment-mid);
    text-decoration: none;
    border: 1px solid var(--parchment-border);
    border-radius: var(--border-radius);
    padding: 4px 10px;
    transition: background .2s, color .2s;
    white-space: nowrap;
}

.logout:hover {
    background: var(--parchment-border);
    color: var(--ink-dark);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==========================================================================
   05. PAGE D'ACCUEIL & CALENDRIER
   ========================================================================== */

/* En-tête d'accueil */
.intro {
    text-align: center;
    margin-bottom: 20px;
}

.intro h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--parchment-light);
    letter-spacing: .1em;
    text-shadow: 1px 2px 6px rgba(0, 0, 0, 0.6);
}

/* Section calendrier & carte interactive */
.calendar-section {
    display: flex;
    justify-content: center;
}

.calendar-frame {
    display: inline-block;
    border: 3px solid var(--parchment-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    background: var(--wood-dark);
    max-width: 100%;
}

.calendar-image {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Zones verrouillées du calendrier — curseur sens interdit */
area.area-locked {
    cursor: not-allowed;
}

/* Barre de statistiques du joueur */
.player-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin: 18px auto 22px;
    max-width: 560px;
    background: rgba(200, 168, 70, 0.10);
    border: 3px solid var(--parchment-border);
    border-radius: var(--border-radius);
    padding: 16px 32px;
}

.player-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.player-stat-label {
    font-family: 'Libre Baskerville', serif;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--parchment-mid);
    border-bottom: 1px solid var(--parchment-border);
    padding-bottom: 4px;
    width: 100%;
    text-align: center;
}

.player-stat-value {
    display: flex;
    align-items: baseline;
    gap: 3px;
    line-height: 1;
}

.player-stat-current {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--picarat-orange);
}

.player-stat-sep {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--parchment-mid);
    padding: 0 1px;
}

.player-stat-total {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--parchment-mid);
}

.player-stat-unit {
    font-family: 'Libre Baskerville', serif;
    font-size: .72rem;
    color: var(--parchment-mid);
    margin-left: 5px;
    align-self: center;
}

.player-stats-divider {
    font-size: .7rem;
    color: var(--parchment-border);
    flex-shrink: 0;
}

/* Secret Sentence / Message Mystère */
.secret-sentence {
    max-width: 900px;
    margin: 30px auto;
    background: linear-gradient(135deg, var(--parchment-light) 0%, var(--parchment-mid) 100%);
    border: 3px solid var(--parchment-border);
    border-radius: var(--border-radius);
    padding: 24px 32px;
    box-shadow: var(--shadow-strong);
    text-align: center;
    position: relative;
}

.secret-sentence-title {
    font-family: "Cinzel", serif;
    font-size: 1.6rem;
    color: var(--wood-dark);
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.secret-sentence-content {
    font-family: "Lora", serif;
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--ink-dark);
}

.secret-word {
    display: inline-block;
    margin: 0 4px;
    font-weight: 600;
}

.secret-word.hidden {
    color: var(--ink-light);
    letter-spacing: 3px;
    opacity: 0.5;
}

.secret-word.resolved {
    color: var(--picarat-orange);
    text-shadow: 0 0 8px rgba(200, 84, 26, 0.2);
}


/* ==========================================================================
   06. PAGE D'ÉNIGME (LE LIVRE LAYTON)
   ========================================================================== */

/* Conteneur extérieur */
.enigma-page-wrapper {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 36px 20px 60px;
}

/* Le livre en parchemin */
.enigma-book {
    background: var(--parchment-light);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    border: 3px solid var(--parchment-border);
    border-radius: 4px;
    box-shadow: var(--shadow-strong), inset 0 0 40px rgba(200, 160, 70, 0.12);
    max-width: 780px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* Bande de reliure en cuir sur la gauche */
.enigma-book::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 18px;
    background: linear-gradient(to right, var(--leather-brown), #a87040);
    border-right: 2px solid var(--parchment-border);
}

/* Contenu intérieur du livre */
.enigma-inner {
    padding: 36px 44px 40px 56px;
    position: relative;
}

/* Ligne supérieure (En-tête 2 colonnes : Numéro à gauche | Picarats à droite) */
.enigma-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 0;
}

.enigma-header {
    text-align: left;
    flex: 0 0 50%;
}

.enigma-puzzle-label {
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--ink-light);
    margin-bottom: 2px;
}

.enigma-number {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--ink-dark);
    line-height: 1;
    letter-spacing: .04em;
}

.enigma-top-row .picarats-block {
    margin-bottom: 0;
    flex: 0 0 calc(50% - 12px);
    min-width: 0;
}

/* Titre principal imposant */
.enigma-title-main {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.5rem, 4.5vw, 2.4rem);
    font-weight: 700;
    color: var(--parchment-light);
    text-align: center;
    letter-spacing: .06em;
    margin-top: 20px;
    background: var(--wood-mid);
    padding: 10px 28px;
    border-radius: 3px;
    box-shadow: var(--shadow);
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.4);
}

/* Filet décoratif avec losanges */
.enigma-rule {
    border: none;
    border-top: 2px solid var(--parchment-dark);
    margin: 24px 0;
    position: relative;
}

.enigma-rule::before,
.enigma-rule::after {
    content: '◆';
    position: absolute;
    top: -9px;
    font-size: .6rem;
    color: var(--parchment-dark);
}

.enigma-rule::before {
    left: 12px;
}

.enigma-rule::after {
    right: 12px;
}

/* Bloc des Picarats */
.picarats-block {
    background: rgba(200, 168, 70, 0.12);
    border: 1.5px solid var(--parchment-dark);
    border-radius: var(--border-radius);
    padding: 20px 28px 18px;
    margin-bottom: 28px;
    text-align: center;
}

.picarats-label {
    font-family: 'Libre Baskerville', serif;
    font-size: .72rem;
    letter-spacing: .12em;
    color: var(--ink-light);
    border-bottom: 1px solid var(--parchment-dark);
    padding-bottom: 8px;
    margin-bottom: 14px;
}

.picarats-score-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    line-height: 1;
}

.picarats-current {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 700;
    color: var(--picarat-orange);
    min-width: 3ch;
    display: inline-block;
    text-align: right;
    transition: color .3s;
}

/* Animation flash rouge en cas de pénalité */
.picarats-current.picarats-penalty {
    animation: penalty-flash .5s ease-out;
}

@keyframes penalty-flash {
    0% {
        color: var(--error-red);
        transform: scale(1.08);
    }

    60% {
        color: var(--error-red);
    }

    100% {
        color: var(--picarat-orange);
        transform: scale(1);
    }
}

.picarats-separator {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--ink-light);
    padding: 0 2px;
}

.picarats-base {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 500;
    color: var(--ink-mid);
}

.picarats-unit {
    font-family: 'Libre Baskerville', serif;
    font-size: 1rem;
    color: black !important;
    margin-left: 8px;
    align-self: center;
}

.picarats-penalty-note {
    font-family: "Lora", serif;
    font-style: italic;
    font-size: .82rem;
    color: var(--error-red);
    margin-top: 10px;
    opacity: .85;
}

/* Énoncé & contenu textuel */
.enigma-content {
    font-family: "Lora", serif;
    font-size: 1.12rem;
    line-height: 1.85;
    color: var(--ink-dark);
    margin-bottom: 28px;
}

.enigma-content p {
    margin: 0;
}

.puzzle-statement {
    background: rgba(200, 168, 70, 0.08);
    border-left: 4px solid var(--parchment-dark);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 24px 32px;
    margin-bottom: 32px;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--ink-dark);
}

.puzzle-statement p {
    margin: 0 0 10px;
}

.puzzle-statement p:last-child {
    margin: 0;
}

/* Variante avec guillemets décoratifs (ex: Cas 8) */
.puzzle-statement--quote {
    position: relative;
    padding-left: 36px;
    text-align: center;
}

.puzzle-statement--quote::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    left: 14px;
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    line-height: 1;
    color: var(--parchment-dark);
    opacity: .5;
}

.puzzle-statement--quote .riddle-line {
    font-family: "Lora", serif;
    font-style: italic;
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    line-height: 1.8;
}

.puzzle-statement--quote .riddle-line strong {
    font-style: normal;
    color: var(--picarat-orange);
    font-weight: 700;
}

/* Illustrations des énigmes */
.enigma-image-wrapper {
    text-align: center;
    margin: 20px 0 30px;
}

.enigma-image {
    max-width: 100%;
    border-radius: 8px;
}


/* ==========================================================================
   07. FORMULAIRES, BOUTONS & FEEDBACK
   ========================================================================== */

/* Formulaire standard */
.enigma-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 240px;
}

.enigma-form label {
    font-family: 'Libre Baskerville', serif;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ink-mid);
}

.enigma-form input[type="text"] {
    font-family: "Lora", serif;
    font-size: 1.05rem;
    color: var(--ink-dark);
    background: #fdf7e4;
    border: 2px solid var(--parchment-border);
    border-radius: var(--border-radius);
    padding: 10px 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}

.enigma-form input[type="text"]:focus {
    border-color: var(--picarat-orange);
    box-shadow: 0 0 0 3px rgba(200, 84, 26, .15);
}

/* Formulaire simple centré */
.enigma-simple-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Groupe de saisie simple avec unités côte-à-côte */
.simple-input-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.simple-input-group input,
.enigma-form .simple-input-group input[type="text"],
.enigma-form .simple-input-group input[type="number"] {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ink-dark);
    background: transparent;
    border: none;
    border-bottom: 2px dashed var(--picarat-orange);
    border-radius: 0;
    text-align: center;
    width: 150px;
    max-width: 100%;
    outline: none;
    padding: 4px 8px;
    transition: var(--transition);
}

.simple-input-group input:focus,
.enigma-form .simple-input-group input[type="text"]:focus,
.enigma-form .simple-input-group input[type="number"]:focus {
    border-bottom-style: solid;
    border-color: var(--picarat-orange);
    background: rgba(212, 110, 48, 0.05);
    box-shadow: none;
}

.simple-input-group span {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--ink-mid);
    white-space: nowrap;
}

/* Bouton Soumettre — Style Layton */
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Cinzel', serif;
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--parchment-light);
    background: linear-gradient(145deg, var(--picarat-orange) 0%, #a03a0a 100%);
    border: 2px solid #8b3010;
    border-radius: 8px;
    padding: 14px 32px;
    box-shadow: 0 4px 16px rgba(140, 50, 10, .45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform .15s, box-shadow .2s, filter .2s;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-submit:hover {
    filter: brightness(1.12);
    box-shadow: 0 6px 24px rgba(140, 50, 10, .65);
    transform: translateY(-2px);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(140, 50, 10, .4);
}

/* Bouton Primaire (Style Discord / Landing) */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Cinzel', serif;
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(145deg, #5865F2 0%, #404EED 100%);
    border: 2px solid #3b47d4;
    border-radius: 8px;
    padding: 14px 32px;
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform .15s, box-shadow .2s, filter .2s;
    cursor: pointer;
    width: 100%;
}

.btn-primary:hover {
    filter: brightness(1.12);
    box-shadow: 0 6px 24px rgba(88, 101, 242, 0.65);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.4);
}

.btn-topbar {
    width: auto;
    padding: 8px 20px;
    font-size: .78rem;
}

.discord-logo {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.landing-hint {
    margin-top: 20px;
    font-family: "Lora", serif;
    font-style: italic;
    font-size: .8rem;
    color: var(--parchment-mid);
    opacity: .7;
}

/* Lien de retour au menu */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    font-family: 'Libre Baskerville', serif;
    font-size: .85rem;
    color: var(--ink-mid);
    text-decoration: none;
    border-bottom: 1px dashed var(--parchment-border);
    transition: color .2s, border-color .2s;
}

.back-link::before {
    content: '←';
}

.back-link:hover {
    color: var(--picarat-orange);
    border-color: var(--picarat-orange);
}

/* Badge énigme résolue */
.resolved-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cinzel', serif;
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--success-green);
    background: var(--success-bg);
    border: 1.5px solid var(--success-green);
    border-radius: 999px;
    padding: 4px 14px;
    margin-bottom: 18px;
}

.resolved-badge::before {
    content: '✔';
}

/* Alertes & Retours de validation */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: var(--border-radius);
    padding: 14px 18px;
    margin-bottom: 22px;
    font-family: "Lora", serif;
    font-size: 1rem;
    line-height: 1.5;
    border-left: 5px solid;
}

.alert::before {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-success {
    background: var(--success-bg);
    border-color: var(--success-green);
    color: #2a4a20;
}

.alert-success::before {
    content: '✔';
    color: var(--success-green);
}

.alert-error {
    background: var(--error-bg);
    border-color: var(--error-red);
    color: #5a1010;
}

.alert-error::before {
    content: '✖';
    color: var(--error-red);
}


/* ==========================================================================
   08. TYPES D'ÉNIGMES SPÉCIFIQUES
   ========================================================================== */

/* ----- Séquences horizontales ----- */
.enigma-sequence-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.sequence-puzzle {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
    justify-content: center;
    align-items: center;
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink-dark);
    background: var(--wood-light);
    padding: 20px 30px;
    border: 2px solid var(--parchment-dark);
    border-radius: var(--border-radius);
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.1), var(--shadow);
}

.sequence-puzzle span {
    background: var(--parchment-light);
    padding: 8px 15px;
    border-radius: 4px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--parchment-mid);
}

.sequence-input-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sequence-input-group input {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--picarat-orange);
    width: 3.5rem;
    text-align: center;
    background: transparent;
    border: none;
    border-bottom: 3px dashed var(--picarat-orange);
    padding: 0;
    text-transform: uppercase;
}

.sequence-input-group input:focus {
    outline: none;
    border-bottom-style: solid;
}

.sequence-input-group input::placeholder {
    color: rgba(200, 84, 26, 0.3);
}

/* ----- Séquences verticales (ex: Cas 7) ----- */
.sequence-puzzle--vertical {
    flex-direction: column;
    align-items: center;
    gap: 10px 0;
    width: 100%;
    max-width: 360px;
}

.sequence-puzzle--vertical span {
    width: 100%;
    text-align: center;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    letter-spacing: .08em;
}

.sequence-puzzle--vertical .sequence-input-group {
    width: 100%;
    justify-content: center;
    background: var(--parchment-light);
    padding: 8px 15px;
    border-radius: 4px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--parchment-mid);
}

.sequence-puzzle--vertical .sequence-input-group input {
    width: 100%;
    max-width: 12rem;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
}

/* ----- Liste Look-and-Say (ex: Cas 7) ----- */
.look-say-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: 'Cinzel', serif;
    font-size: clamp(1.3rem, 3.5vw, 1.9rem);
    font-weight: 600;
    color: var(--ink-dark);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    background: var(--parchment-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    border: 2px solid var(--parchment-dark);
    border-radius: var(--border-radius);
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.08), var(--shadow);
    padding: 28px 48px 24px;
    width: 100%;
    max-width: 420px;
    letter-spacing: .06em;
}

.look-say-list li {
    width: 100%;
    text-align: center;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(160, 120, 48, 0.25);
    line-height: 1.3;
}

.look-say-list li:last-child {
    border-bottom: none;
}

.look-say-answer {
    padding-top: 10px !important;
}

.look-say-answer input {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.3rem, 3.5vw, 1.9rem);
    font-weight: 700;
    color: var(--picarat-orange);
    width: 100%;
    text-align: center;
    background: transparent;
    border: none;
    border-bottom: 3px dashed var(--picarat-orange);
    padding: 0 4px;
    outline: none;
    transition: border-bottom-style .15s;
}

.look-say-answer input:focus {
    border-bottom-style: solid;
}

.look-say-answer input::placeholder {
    color: rgba(200, 84, 26, 0.35);
}


/* ==========================================================================
   09. OVERLAY CINÉMATIQUE (RÉSOLUTIONS LAYTON)
   ========================================================================== */

#cinematic-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: none;
    /* Actif dynamiquement via cinematic.js */
    opacity: 0;
    /* Fondu progressif via JS */
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 350ms ease;
}

#cin-text {
    display: none;
    opacity: 0;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    text-shadow: 2px 2px 4px #000;
    text-align: center;
    margin-top: 20px;
}

#cin-img {
    display: none;
    opacity: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


/* ==========================================================================
   10. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* ---------- Tablettes & Écrans intermédiaires (max-width: 650px) ---------- */
@media (max-width: 650px) {
    .user-area {
        position: relative;
    }

    .user-dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: 10px;
        background: var(--wood-dark);
        border: 2px solid var(--parchment-border);
        border-radius: var(--border-radius);
        padding: 12px;
        flex-direction: column;
        align-items: flex-end;
        box-shadow: var(--shadow-strong);
        z-index: 100;
        gap: 8px;
    }

    .user-dropdown-menu.show {
        display: flex;
        animation: fadeIn 0.2s ease-out;
    }

    .brand-copy strong {
        font-size: 0.9rem;
    }

    .brand-copy span {
        font-size: 0.7rem;
    }
}

/* ---------- Mobiles (max-width: 600px) ---------- */
@media (max-width: 600px) {
    .topbar {
        padding: 8px 14px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .radio-wrapper {
        order: 3;
        flex-basis: 100%;
        margin-top: 4px;
        justify-content: center;
    }

    .user-name {
        display: none;
    }

    .enigma-inner {
        padding: 24px 20px 28px 32px;
    }

    /* En-tête de l'énigme empilé verticalement sur mobile */
    .enigma-top-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .enigma-header {
        text-align: center;
    }

    .enigma-form {
        flex-direction: column;
    }

    .btn-submit {
        width: 100%;
    }
}

/* ---------- Petits mobiles (max-width: 480px) ---------- */
@media (max-width: 480px) {
    .player-stats-bar {
        flex-direction: column;
        gap: 14px;
        padding: 14px 20px;
    }

    .player-stats-divider {
        display: none;
    }
}


/* ==========================================================================
   11. ADMINISTRATION, STATISTIQUES & BANNIÈRE SPOOF
   ========================================================================== */

.admin-nav-link {
    border-color: var(--picarat-gold);
    color: var(--picarat-gold);
}

.admin-nav-link:hover {
    background: var(--picarat-gold);
    color: var(--ink-dark);
}

.spoof-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 24px;
    background: linear-gradient(90deg, #3c1e0c 0%, #5c280e 50%, #3c1e0c 100%);
    border-bottom: 2px solid var(--picarat-gold);
    color: var(--parchment-light);
    font-family: 'Lora', serif;
    font-size: 0.92rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.spoof-banner-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.spoof-banner-info code {
    font-size: 0.82rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--parchment-mid);
}

.spoof-banner-badge {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: var(--picarat-orange);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
}

.spoof-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spoof-banner-form {
    margin: 0;
}

.spoof-banner-btn {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    border: 1.5px solid var(--picarat-gold);
    background: var(--picarat-gold);
    color: var(--ink-dark);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.spoof-banner-btn:hover {
    background: var(--parchment-light);
    border-color: var(--parchment-light);
}

.spoof-banner-btn--secondary {
    background: transparent;
    color: var(--parchment-light);
}

.spoof-banner-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

main.site-shell.site-shell--wide,
main.site-shell:has(.gf-dashboard) {
    max-width: 100%;
    width: 100%;
    padding: 20px 24px 48px;
}

.gf-dashboard {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: #e5e7eb;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

.gf-topbar-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 18px;
    background: #181b20;
    border: 1px solid #2b313c;
    border-radius: 6px;
}

.gf-hero-title {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #f9fafb;
    letter-spacing: -0.01em;
    margin: 0 0 2px;
}

.gf-hero-subtitle {
    color: #9ca3af;
    margin: 0;
    font-size: 0.875rem;
}

.gf-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.sonner-toaster {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 356px;
    max-width: calc(100vw - 32px);
    list-style: none;
    margin: 0;
    padding: 0;
    pointer-events: none;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.sonner-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    background: #17191e;
    border: 1px solid #2b303a;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    color: #f3f4f6;
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(14px) scale(0.96);
    transition: transform 0.24s cubic-bezier(0.21, 1.02, 0.73, 1), opacity 0.2s ease;
}

.sonner-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.sonner-toast.is-leaving {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
}

.sonner-icon {
    display: inline-flex;
    flex-shrink: 0;
}

.sonner-toast--success .sonner-icon {
    color: #4ade80;
}

.sonner-toast--error .sonner-icon {
    color: #f87171;
}

.sonner-toast--info .sonner-icon {
    color: #60a5fa;
}

.sonner-toast--warning .sonner-icon {
    color: #fbbf24;
}

.sonner-content {
    flex: 1;
    min-width: 0;
}

.sonner-title {
    font-weight: 500;
    color: #f9fafb;
}

.sonner-description {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 2px;
}

.sonner-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.sonner-close:hover {
    color: #f3f4f6;
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
    .sonner-toaster {
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }
}

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

.gf-col-2 {
    grid-column: span 2;
}

.gf-col-3 {
    grid-column: span 3;
}

.gf-col-4 {
    grid-column: span 4;
}

.gf-col-6 {
    grid-column: span 6;
}

.gf-col-8 {
    grid-column: span 8;
}

.gf-col-12 {
    grid-column: span 12;
}

.gf-panel {
    background: #181b20;
    border: 1px solid #2b313c;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: border-color 0.15s ease;
}

.gf-panel:hover {
    border-color: #3d4554;
}

.gf-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #262c35;
}

.gf-panel-title {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #d1d5db;
    margin: 0;
}

.gf-panel-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.gf-stat-big {
    font-size: 1.95rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: #f9fafb;
}

.gf-stat-big--green {
    color: #4ade80;
}

.gf-stat-big--gold {
    color: #fbbf24;
}

.gf-stat-big--orange {
    color: #fb923c;
}

.gf-stat-big--cyan {
    color: #f3f4f6;
}

.gf-stat-big--red {
    color: #f87171;
}

.gf-stat-sub {
    font-size: 0.82rem;
    color: #9ca3af;
    line-height: 1.45;
}

.gf-stat-sub strong {
    color: #e5e7eb;
    font-weight: 600;
}

.gf-spark-bar {
    height: 5px;
    background: #252a33;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    margin-top: auto;
}

.gf-spark-seg--green {
    background: #34d399;
}

.gf-spark-seg--gold {
    background: #fbbf24;
}

.gf-spark-seg--orange {
    background: #fb923c;
}

.gf-spark-seg--red {
    background: #f87171;
}

.gf-spark-seg--cyan {
    background: #60a5fa;
}

.gf-gauges-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
    flex: 1;
}

.gf-gauge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.gf-gauge-svg {
    width: 88px;
    height: 88px;
}

.gf-gauge-label {
    font-size: 0.78rem;
    color: #9ca3af;
    line-height: 1.3;
}

.gf-kv-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.gf-kv-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    background: #13161b;
    border: 1px solid #242933;
    border-radius: 5px;
    font-size: 0.84rem;
}

.gf-kv-key {
    color: #9ca3af;
}

.gf-kv-val {
    font-weight: 600;
    color: #f3f4f6;
    text-align: right;
}

.gf-spotlight-title {
    font-size: 0.94rem;
    font-weight: 600;
    color: #e5e7eb;
    line-height: 1.35;
}

.gf-bar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gf-bar-row {
    display: grid;
    grid-template-columns: 115px 1fr 90px;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
}

.gf-bar-row--enigma {
    grid-template-columns: 200px 1fr 145px;
}

.gf-bar-label {
    color: #d1d5db;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gf-bar-track {
    height: 10px;
    background: #252a33;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
}

.gf-bar-val {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #9ca3af;
    font-size: 0.8rem;
}

.gf-svg-chart {
    width: 100%;
    height: auto;
    display: block;
}

.gf-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.8rem;
    color: #9ca3af;
}

.gf-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gf-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.gf-table-wrap {
    overflow-x: auto;
    border: 1px solid #2b313c;
    border-radius: 5px;
    background: #14171c;
}

.gf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    text-align: left;
    color: #e5e7eb;
}

.gf-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    background: #1d2128;
    padding: 10px 12px;
    border-bottom: 1px solid #2b313c;
    white-space: nowrap;
}

.gf-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #232832;
    vertical-align: middle;
}

.gf-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.gf-table tbody tr.gf-details-row {
    background: #111318;
}

.gf-table tbody tr.gf-details-row:hover {
    background: #111318;
}

.gf-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}

.gf-badge--ok {
    background: rgba(52, 211, 153, 0.14);
    color: #6ee7b7;
    border-color: rgba(52, 211, 153, 0.3);
}

.gf-badge--gold {
    background: rgba(251, 191, 36, 0.14);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.3);
}

.gf-badge--warn {
    background: rgba(251, 146, 60, 0.15);
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.35);
}

.gf-badge--danger {
    background: rgba(248, 113, 113, 0.15);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.35);
}

.gf-badge--muted {
    background: rgba(156, 163, 175, 0.12);
    color: #9ca3af;
    border-color: rgba(156, 163, 175, 0.2);
}

.gf-badge--admin {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.35);
}

.gf-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.gf-input,
.gf-select {
    padding: 8px 12px;
    border: 1px solid #323946;
    border-radius: 5px;
    background: #111318;
    color: #f3f4f6;
    font-family: inherit;
    font-size: 0.875rem;
}

.gf-input {
    flex: 1 1 240px;
    min-width: 200px;
}

.gf-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gf-pill {
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid #323946;
    background: #1f242c;
    color: #d1d5db;
    font-size: 0.78rem;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.gf-pill.active,
.gf-pill:hover {
    background: #e5e7eb;
    color: #111827;
    border-color: #e5e7eb;
    font-weight: 600;
}

.gf-player-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
}

.gf-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #374151;
    flex-shrink: 0;
}

.gf-avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #262c36;
    color: #e5e7eb;
    font-weight: 600;
    font-size: 0.88rem;
}

.gf-player-id {
    font-size: 0.75rem;
    color: #9ca3af;
}

.gf-mini-grid {
    display: grid;
    grid-template-columns: repeat(13, 12px);
    gap: 3px;
}

.gf-mini-cell {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gf-cell--perfect {
    background: #22c55e;
}

.gf-cell--solved {
    background: #eab308;
}

.gf-cell--stuck {
    background: #ef4444;
}

.gf-cell--untried {
    background: #2b313c;
}

.gf-cell--locked {
    background: #1a1e24;
    opacity: 0.6;
}

.gf-btn-row {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.gf-btn {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #374151;
    background: #232832;
    color: #e5e7eb;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: var(--transition);
}

.gf-btn:hover:not(:disabled) {
    background: #374151;
    border-color: #4b5563;
    color: #fff;
}

.gf-btn--primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.gf-btn--primary:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.gf-btn--danger {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(248, 113, 113, 0.4);
    color: #fca5a5;
}

.gf-btn--danger:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.gf-btn--xs {
    padding: 3px 7px;
    font-size: 0.7rem;
}

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

.gf-inspector {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gf-sentence-box {
    padding: 10px 14px;
    border-radius: 5px;
    background: #181b20;
    border: 1px solid #2b313c;
    font-size: 0.88rem;
    line-height: 1.6;
}

.gf-inspector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.gf-inspector-item {
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #262c35;
    background: #181b20;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.gf-inspector-item--perfect {
    border-left: 3px solid #22c55e;
}

.gf-inspector-item--solved {
    border-left: 3px solid #eab308;
}

.gf-inspector-item--stuck {
    border-left: 3px solid #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.gf-inspector-item--locked {
    opacity: 0.55;
}

.gf-inspector-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gf-inspector-info strong {
    color: #f3f4f6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gf-inspector-info span {
    color: #9ca3af;
}

@media (max-width: 1360px) {
    .gf-col-2 {
        grid-column: span 4;
    }

    .gf-col-3 {
        grid-column: span 6;
    }
}

@media (max-width: 1024px) {

    .gf-col-4,
    .gf-col-6,
    .gf-col-8 {
        grid-column: span 12;
    }

    .gf-col-2 {
        grid-column: span 6;
    }
}

@media (max-width: 640px) {

    main.site-shell.site-shell--wide,
    main.site-shell:has(.gf-dashboard) {
        padding: 12px 12px 32px;
    }

    .gf-col-2,
    .gf-col-3,
    .gf-col-4,
    .gf-col-6,
    .gf-col-8 {
        grid-column: span 12;
    }

    .gf-gauges-row {
        grid-template-columns: 1fr;
    }

    .gf-bar-row,
    .gf-bar-row--enigma {
        grid-template-columns: 95px 1fr 78px;
    }

    .spoof-banner {
        padding: 10px 14px;
    }
}