/* root/style.css */
:root {
     --yellow: #FFD93D;
     --coral: #FF6B6B;
     --mint: #6BCFB5;
     --indigo: #5B5FED;
     --lavender: #C9B8FF;
     --cream: #FFFBF0;
     --dark: #1A1A2E;
     --card-shadow: 0 6px 0 rgba(0, 0, 0, 0.15);
     --radius: 20px;
 }

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

 body {
     font-family: 'Nunito', sans-serif;
     background: var(--cream);
     color: var(--dark);
     min-height: 100vh;
     overflow-x: hidden;
 }

 /* ── floating letters bg ── */
 .bg-letters {
     position: fixed;
     inset: 0;
     pointer-events: none;
     z-index: 0;
     overflow: hidden;
 }

 .bg-letters span {
     position: absolute;
     font-family: 'Fredoka One', cursive;
     font-size: clamp(1.2rem, 3vw, 2.5rem);
     opacity: 0.06;
     color: var(--dark);
     animation: floatLetter linear infinite;
     user-select: none;
 }

 @keyframes floatLetter {
     0% {
         transform: translateY(110vh) rotate(0deg);
         opacity: 0;
     }

     10% {
         opacity: 0.08;
     }

     90% {
         opacity: 0.08;
     }

     100% {
         transform: translateY(-10vh) rotate(360deg);
         opacity: 0;
     }
 }

 /* ── HERO BACKGROUND ANIMATIONS ── */

 /* G1 — floating word→rank chips */
 .hero-word-chip {
     position: absolute;
     display: flex;
     align-items: center;
     gap: 7px;
     background: rgba(255, 255, 255, 0.07);
     border: 1px solid rgba(255, 255, 255, 0.13);
     border-radius: 30px;
     padding: 5px 13px;
     font-family: 'Nunito', sans-serif;
     font-weight: 800;
     font-size: 0.78rem;
     color: rgba(255, 255, 255, 0.45);
     pointer-events: none;
     animation: heroChipFloat linear infinite;
     z-index: 0;
     white-space: nowrap;
 }

 .hero-word-chip .hw-rank {
     font-family: 'Fredoka One', cursive;
     color: rgba(255, 217, 61, 0.55);
     font-size: 0.82rem;
 }

 @keyframes heroChipFloat {
     0% {
         transform: translateY(40px);
         opacity: 0;
     }

     8% {
         opacity: 1;
     }

     88% {
         opacity: 0.7;
     }

     100% {
         transform: translateY(-220px);
         opacity: 0;
     }
 }

 /* G1 — subtle shimmer pulse orbs */
 .hero-orb {
     position: absolute;
     border-radius: 50%;
     background: radial-gradient(circle, rgba(201, 184, 255, 0.12) 0%, transparent 70%);
     pointer-events: none;
     animation: orbPulse ease-in-out infinite;
     z-index: 0;
 }

 @keyframes orbPulse {

     0%,
     100% {
         transform: scale(1);
         opacity: 0.5;
     }

     50% {
         transform: scale(1.15);
         opacity: 1;
     }
 }

 /* G2 — floating chain pair chips */
 .hero-chain-chip {
     position: absolute;
     display: flex;
     align-items: center;
     gap: 6px;
     background: rgba(255, 255, 255, 0.1);
     border: 1px solid rgba(255, 255, 255, 0.18);
     border-radius: 30px;
     padding: 5px 13px;
     font-family: 'Nunito', sans-serif;
     font-weight: 800;
     font-size: 0.75rem;
     color: rgba(255, 255, 255, 0.5);
     pointer-events: none;
     animation: heroChainFloat linear infinite;
     z-index: 0;
     white-space: nowrap;
 }

 .hero-chain-chip .hc-arrow {
     color: rgba(255, 217, 61, 0.6);
 }

 @keyframes heroChainFloat {
     0% {
         transform: translateY(30px) rotate(-1deg);
         opacity: 0;
     }

     8% {
         opacity: 1;
     }

     88% {
         opacity: 0.65;
     }

     100% {
         transform: translateY(-200px) rotate(1deg);
         opacity: 0;
     }
 }

 /* G2 — soft floating dots */
 .hero-dot {
     position: absolute;
     border-radius: 50%;
     border: 1.5px solid rgba(255, 255, 255, 0.18);
     background: rgba(255, 255, 255, 0.04);
     pointer-events: none;
     animation: heroDotFloat linear infinite;
     z-index: 0;
 }

 @keyframes heroDotFloat {
     0% {
         transform: translateY(0) scale(1);
         opacity: 0;
     }

     12% {
         opacity: 0.8;
     }

     88% {
         opacity: 0.4;
     }

     100% {
         transform: translateY(-160px) scale(0.7);
         opacity: 0;
     }
 }

 /* ── NAVBAR ── */
 nav {
     position: sticky;
     top: 0;
     z-index: 100;
     background: var(--dark);
     display: flex;
     align-items: center;
     padding: 0 24px;
     box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
 }

 .nav-logo {
     font-family: 'Fredoka One', cursive;
     font-size: 1.6rem;
     color: var(--yellow);
     letter-spacing: 1px;
     padding: 14px 0;
     text-decoration: none;
     display: flex;
     align-items: center;
     gap: 8px;
     flex: 1;
 }

 .nav-logo .logo-dot {
     width: 10px;
     height: 10px;
     border-radius: 50%;
     background: var(--coral);
     display: inline-block;
     animation: pulseDot 2s ease-in-out infinite;
 }

 @keyframes pulseDot {

     0%,
     100% {
         transform: scale(1)
     }

     50% {
         transform: scale(1.4)
     }
 }

 /* Tab switcher */
 .tab-switcher {
     display: flex;
     position: relative;
     background: rgba(255, 255, 255, 0.08);
     border-radius: 12px;
     padding: 5px;
     gap: 4px;
     flex-shrink: 0;
 }

 .tab-btn {
     font-family: 'Nunito', sans-serif;
     font-weight: 800;
     font-size: 0.85rem;
     padding: 8px 20px;
     border: none;
     background: transparent;
     color: rgba(255, 255, 255, 0.55);
     border-radius: 9px;
     cursor: pointer;
     position: relative;
     z-index: 2;
     transition: color 0.25s;
     letter-spacing: 0.3px;
     white-space: nowrap;
 }

 .tab-btn.active {
     color: var(--dark);
 }

 .tab-slider {
     position: absolute;
     top: 5px;
     left: 5px;
     height: calc(100% - 10px);
     background: var(--yellow);
     border-radius: 9px;
     transition: left 0.3s cubic-bezier(.45, 1.45, .55, 1), width 0.3s ease;
     z-index: 1;
 }

 .nav-auth {
     display: flex;
     gap: 10px;
     flex: 1;
     justify-content: flex-end;
 }

 .btn-ghost {
     font-family: 'Nunito', sans-serif;
     font-weight: 700;
     font-size: 0.85rem;
     padding: 8px 18px;
     background: transparent;
     border: 2px solid rgba(255, 255, 255, 0.25);
     color: white;
     border-radius: 10px;
     cursor: pointer;
     transition: border-color 0.2s, color 0.2s;
 }

 .btn-ghost:hover {
     border-color: var(--yellow);
     color: var(--yellow);
 }

 .btn-solid {
     font-family: 'Nunito', sans-serif;
     font-weight: 800;
     font-size: 0.85rem;
     padding: 8px 18px;
     background: var(--coral);
     border: none;
     color: white;
     border-radius: 10px;
     cursor: pointer;
     box-shadow: 0 3px 0 #c94b4b;
     transition: transform 0.15s, box-shadow 0.15s;
 }

 .btn-solid:hover {
     transform: translateY(-2px);
     box-shadow: 0 5px 0 #c94b4b;
 }

 .btn-solid:active {
     transform: translateY(1px);
     box-shadow: 0 2px 0 #c94b4b;
 }

 /* ── SCREENS ── */
 .screens {
     position: relative;
     z-index: 1;
 }

 .screen {
     display: none;
     animation: fadeIn 0.3s ease;
 }

 .screen.active {
     display: block;
 }

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

     to {
         opacity: 1;
         transform: none
     }
 }

 /* ── GAME 1 ── */
 #screen-contexto {
     min-height: calc(100vh - 60px);
     padding: 0 0 80px;
 }

 .g1-hero {
     background: linear-gradient(135deg, var(--indigo) 0%, #3a3eb8 100%);
     padding: 56px 40px 60px;
     position: relative;
     overflow: hidden;
     display: flex;
     flex-direction: column;
     align-items: center;
     text-align: center;
 }

 .g1-hero::before {
     content: '';
     position: absolute;
     inset: 0;
     background: radial-gradient(ellipse at 70% 30%, rgba(201, 184, 255, 0.25) 0%, transparent 60%);
     pointer-events: none;
 }

 .g1-hero-badge {
     background: var(--lavender);
     color: var(--indigo);
     font-weight: 800;
     font-size: 0.75rem;
     padding: 5px 14px;
     border-radius: 20px;
     letter-spacing: 1px;
     text-transform: uppercase;
     margin-bottom: 16px;
     position: relative;
     z-index: 1;
 }

 .g1-hero h1 {
     font-family: 'Fredoka One', cursive;
     font-size: clamp(2rem, 5vw, 3.8rem);
     color: white;
     line-height: 1.1;
     position: relative;
     z-index: 1;
     margin-bottom: 14px;
 }

 .g1-hero h1 em {
     font-style: normal;
     color: var(--yellow);
 }

 .g1-hero p {
     color: rgba(255, 255, 255, 0.75);
     font-size: 1.05rem;
     font-weight: 600;
     max-width: 480px;
     line-height: 1.6;
     position: relative;
     z-index: 1;
 }

 /* Decorative word pills in hero */
 .word-pills {
     display: flex;
     gap: 10px;
     flex-wrap: wrap;
     justify-content: center;
     margin-top: 28px;
     position: relative;
     z-index: 1;
 }

 .pill {
     padding: 6px 18px;
     border-radius: 40px;
     font-weight: 800;
     font-size: 0.9rem;
     border: 2px solid;
     letter-spacing: 0.5px;
     animation: pillBob 3s ease-in-out infinite;
 }

 .pill:nth-child(1) {
     background: rgba(255, 107, 107, 0.15);
     border-color: var(--coral);
     color: var(--coral);
     animation-delay: 0s;
 }

 .pill:nth-child(2) {
     background: rgba(255, 217, 61, 0.15);
     border-color: var(--yellow);
     color: var(--yellow);
     animation-delay: 0.4s;
 }

 .pill:nth-child(3) {
     background: rgba(107, 207, 181, 0.15);
     border-color: var(--mint);
     color: var(--mint);
     animation-delay: 0.8s;
 }

 .pill:nth-child(4) {
     background: rgba(201, 184, 255, 0.15);
     border-color: var(--lavender);
     color: var(--lavender);
     animation-delay: 1.2s;
 }

 @keyframes pillBob {

     0%,
     100% {
         transform: translateY(0)
     }

     50% {
         transform: translateY(-5px)
     }
 }

 /* Profile icon */
 .profile-btn {
     position: absolute;
     top: 20px;
     right: 24px;
     z-index: 10;
     width: 42px;
     height: 42px;
     border-radius: 50%;
     background: rgba(255, 255, 255, 0.15);
     border: 2px solid rgba(255, 255, 255, 0.3);
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     color: white;
     font-size: 1.2rem;
     transition: background 0.2s, transform 0.2s;
     backdrop-filter: blur(6px);
 }

 .profile-btn:hover {
     background: rgba(255, 255, 255, 0.25);
     transform: scale(1.08);
 }

 /* Dropdown */
 .profile-dropdown {
     position: absolute;
     top: 70px;
     right: 24px;
     z-index: 200;
     background: white;
     border-radius: 16px;
     box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
     padding: 10px 0;
     min-width: 180px;
     display: none;
     animation: dropIn 0.2s ease;
 }

 .profile-dropdown.open {
     display: block;
 }

 @keyframes dropIn {
     from {
         opacity: 0;
         transform: translateY(-8px)
     }

     to {
         opacity: 1;
         transform: none
     }
 }

 .profile-dropdown a {
     display: flex;
     align-items: center;
     gap: 10px;
     padding: 10px 18px;
     font-weight: 700;
     font-size: 0.9rem;
     color: var(--dark);
     text-decoration: none;
     transition: background 0.15s;
 }

 .profile-dropdown a:hover {
     background: #f5f5ff;
 }

 .profile-dropdown .dd-icon {
     font-size: 1rem;
     width: 20px;
     text-align: center;
 }

 .profile-dropdown hr {
     border: none;
     border-top: 1px solid #f0f0f0;
     margin: 5px 0;
 }

 /* cards section */
 .g1-cards-section {
     padding: 48px 40px 0;
     max-width: 860px;
     margin: 0 auto;
 }

 .g1-cards-section h2 {
     font-family: 'Fredoka One', cursive;
     font-size: 1.5rem;
     margin-bottom: 24px;
     color: var(--dark);
     display: flex;
     align-items: center;
     gap: 10px;
 }

 .section-dot {
     width: 12px;
     height: 12px;
     border-radius: 50%;
     display: inline-block;
 }

 .g1-cards {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
     gap: 20px;
 }

 .g1-card {
     border-radius: var(--radius);
     padding: 28px 24px;
     cursor: pointer;
     position: relative;
     overflow: hidden;
     border: 3px solid transparent;
     box-shadow: var(--card-shadow);
     transition: transform 0.2s, box-shadow 0.2s;
     text-decoration: none;
     color: inherit;
     display: block;
 }

 .g1-card:hover {
     transform: translateY(-4px);
     box-shadow: 0 10px 0 rgba(0, 0, 0, 0.15);
 }

 .g1-card:active {
     transform: translateY(1px);
     box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
 }

 .g1-card.today {
     background: #FFF5CC;
     border-color: var(--yellow);
 }

 .g1-card.random {
     background: #FFE8E8;
     border-color: var(--coral);
 }

 .g1-card.archive {
     background: #E8F8F4;
     border-color: var(--mint);
 }

 .card-icon {
     font-size: 2.4rem;
     margin-bottom: 14px;
     display: block;
     animation: iconWiggle 4s ease-in-out infinite;
 }

 .g1-card:nth-child(2) .card-icon {
     animation-delay: 0.6s;
 }

 .g1-card:nth-child(3) .card-icon {
     animation-delay: 1.2s;
 }

 @keyframes iconWiggle {

     0%,
     100% {
         transform: rotate(0deg)
     }

     20% {
         transform: rotate(-8deg)
     }

     40% {
         transform: rotate(8deg)
     }

     60% {
         transform: rotate(-4deg)
     }

     80% {
         transform: rotate(4deg)
     }
 }

 .card-title {
     font-family: 'Fredoka One', cursive;
     font-size: 1.3rem;
     margin-bottom: 6px;
 }

 .card-desc {
     font-size: 0.85rem;
     font-weight: 600;
     color: rgba(26, 26, 46, 0.6);
     line-height: 1.5;
 }

 .card-badge {
     position: absolute;
     top: 16px;
     right: 16px;
     font-size: 0.7rem;
     font-weight: 800;
     padding: 3px 10px;
     border-radius: 20px;
     letter-spacing: 0.5px;
 }

 .today .card-badge {
     background: var(--yellow);
     color: #8B6200;
 }

 .today .card-title {
     color: #8B6200;
 }

 .random .card-badge {
     background: var(--coral);
     color: white;
 }

 .random .card-title {
     color: #b03a3a;
 }

 .archive .card-badge {
     background: var(--mint);
     color: #1a5c4d;
 }

 .archive .card-title {
     color: #1a5c4d;
 }

 .players-today {
     display: flex;
     align-items: center;
     gap: 6px;
     margin-top: 14px;
     font-size: 0.8rem;
     font-weight: 700;
     color: #8B6200;
 }

 .players-today .dot {
     width: 7px;
     height: 7px;
     border-radius: 50%;
     background: var(--yellow);
     animation: pulseDot 1.5s infinite;
 }

 /* about section */
 .g1-about {
     max-width: 860px;
     margin: 40px auto 0;
     padding: 0 40px;
 }

 .about-strip {
     background: var(--dark);
     border-radius: var(--radius);
     padding: 22px 28px;
     display: flex;
     align-items: center;
     gap: 18px;
     cursor: pointer;
     transition: transform 0.2s;
 }

 .about-strip:hover {
     transform: translateY(-2px);
 }

 .about-strip-icon {
     font-size: 1.8rem;
     flex-shrink: 0;
 }

 .about-strip h3 {
     font-family: 'Fredoka One', cursive;
     color: white;
     font-size: 1.1rem;
     margin-bottom: 3px;
 }

 .about-strip p {
     color: rgba(255, 255, 255, 0.55);
     font-size: 0.82rem;
     font-weight: 600;
 }

 .about-strip-arrow {
     margin-left: auto;
     color: var(--yellow);
     font-size: 1.4rem;
     flex-shrink: 0;
 }



 /* ── GAME 2 ── */
 #screen-chain {
     min-height: calc(100vh - 60px);
     padding: 0 0 80px;
 }

 .g2-hero {
     background: linear-gradient(135deg, #FF6B6B 0%, #FF8C42 100%);
     padding: 56px 40px 60px;
     position: relative;
     overflow: hidden;
     display: flex;
     flex-direction: column;
     align-items: center;
     text-align: center;
 }

 .g2-hero::before {
     content: '';
     position: absolute;
     inset: 0;
     background: radial-gradient(ellipse at 30% 70%, rgba(255, 217, 61, 0.3) 0%, transparent 60%);
     pointer-events: none;
 }

 .g2-hero-badge {
     background: rgba(255, 255, 255, 0.25);
     color: white;
     font-weight: 800;
     font-size: 0.75rem;
     padding: 5px 14px;
     border-radius: 20px;
     letter-spacing: 1px;
     text-transform: uppercase;
     margin-bottom: 16px;
     position: relative;
     z-index: 1;
 }

 .g2-hero h1 {
     font-family: 'Fredoka One', cursive;
     font-size: clamp(2rem, 5vw, 3.8rem);
     color: white;
     line-height: 1.1;
     position: relative;
     z-index: 1;
     margin-bottom: 14px;
 }

 .g2-hero h1 em {
     font-style: normal;
     color: var(--yellow);
 }

 .g2-hero p {
     color: rgba(255, 255, 255, 0.85);
     font-size: 1.05rem;
     font-weight: 600;
     max-width: 480px;
     line-height: 1.6;
     position: relative;
     z-index: 1;
 }

 /* chain preview */
 .chain-preview {
     display: flex;
     align-items: center;
     gap: 8px;
     margin-top: 30px;
     position: relative;
     z-index: 1;
     flex-wrap: wrap;
     justify-content: center;
 }

 .chain-word {
     background: rgba(255, 255, 255, 0.2);
     border: 2px solid rgba(255, 255, 255, 0.4);
     color: white;
     font-weight: 800;
     font-size: 0.85rem;
     padding: 7px 16px;
     border-radius: 30px;
     animation: chainPop 0.5s ease backwards;
 }

 .chain-word:nth-child(1) {
     animation-delay: 0.1s;
 }

 .chain-word:nth-child(3) {
     animation-delay: 0.3s;
 }

 .chain-word:nth-child(5) {
     animation-delay: 0.5s;
 }

 .chain-word:nth-child(7) {
     animation-delay: 0.7s;
 }

 @keyframes chainPop {
     from {
         opacity: 0;
         transform: scale(0.6)
     }

     to {
         opacity: 1;
         transform: scale(1)
     }
 }

 .chain-arrow {
     color: rgba(255, 255, 255, 0.5);
     font-size: 1.1rem;
     animation: chainPop 0.3s ease backwards;
 }

 .chain-arrow:nth-child(2) {
     animation-delay: 0.2s;
 }

 .chain-arrow:nth-child(4) {
     animation-delay: 0.4s;
 }

 .chain-arrow:nth-child(6) {
     animation-delay: 0.6s;
 }

 /* lobby */
 .g2-lobby {
     max-width: 860px;
     margin: 0 auto;
     padding: 48px 40px 0;
 }

 .g2-lobby>h2 {
     font-family: 'Fredoka One', cursive;
     font-size: 1.5rem;
     margin-bottom: 8px;
 }

 .g2-lobby>p {
     color: rgba(26, 26, 46, 0.5);
     font-size: 0.9rem;
     font-weight: 600;
     margin-bottom: 32px;
 }

 .lobby-group {
     margin-bottom: 32px;
 }

 .lobby-group-label {
     font-weight: 800;
     font-size: 0.75rem;
     text-transform: uppercase;
     letter-spacing: 1.5px;
     color: rgba(26, 26, 46, 0.4);
     margin-bottom: 12px;
     display: flex;
     align-items: center;
     gap: 8px;
 }

 .lobby-group-label::after {
     content: '';
     flex: 1;
     height: 1px;
     background: rgba(26, 26, 46, 0.1);
 }

 .lobby-tiles {
     display: flex;
     gap: 12px;
     flex-wrap: wrap;
 }

 .lobby-tile {
     flex: 1;
     min-width: 80px;
     padding: 18px 14px;
     border-radius: 16px;
     border: 3px solid #E8E8F0;
     background: white;
     text-align: center;
     cursor: pointer;
     transition: all 0.2s;
     position: relative;
     box-shadow: 0 4px 0 #E8E8F0;
 }

 .lobby-tile:hover {
     border-color: var(--indigo);
     transform: translateY(-3px);
     box-shadow: 0 7px 0 rgba(91, 95, 237, 0.2);
 }

 .lobby-tile.selected {
     border-color: var(--indigo);
     background: #F0F0FF;
     box-shadow: 0 4px 0 rgba(91, 95, 237, 0.3);
 }

 .lobby-tile.selected::after {
     content: '✓';
     position: absolute;
     top: -10px;
     right: -10px;
     width: 22px;
     height: 22px;
     border-radius: 50%;
     background: var(--indigo);
     color: white;
     font-size: 0.65rem;
     font-weight: 900;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .tile-icon {
     font-size: 1.6rem;
     display: block;
     margin-bottom: 8px;
 }

 .tile-value {
     font-family: 'Fredoka One', cursive;
     font-size: 1.3rem;
     color: var(--dark);
     display: block;
     margin-bottom: 3px;
 }

 .tile-label {
     font-size: 0.72rem;
     font-weight: 700;
     color: rgba(26, 26, 46, 0.45);
 }

 .tile-easy.selected {
     background: #E8FBF4;
     border-color: var(--mint);
     box-shadow: 0 4px 0 rgba(107, 207, 181, 0.3);
 }

 .tile-easy.selected::after {
     background: var(--mint);
 }

 .tile-easy:hover {
     border-color: var(--mint);
     box-shadow: 0 7px 0 rgba(107, 207, 181, 0.2);
 }

 .tile-medium.selected {
     background: #FFF5CC;
     border-color: var(--yellow);
     box-shadow: 0 4px 0 rgba(255, 217, 61, 0.4);
 }

 .tile-medium.selected::after {
     background: #e6b800;
 }

 .tile-medium:hover {
     border-color: var(--yellow);
     box-shadow: 0 7px 0 rgba(255, 217, 61, 0.3);
 }

 .tile-hard.selected {
     background: #FFE8E8;
     border-color: var(--coral);
     box-shadow: 0 4px 0 rgba(255, 107, 107, 0.3);
 }

 .tile-hard.selected::after {
     background: var(--coral);
 }

 .tile-hard:hover {
     border-color: var(--coral);
     box-shadow: 0 7px 0 rgba(255, 107, 107, 0.2);
 }

 .tile-premium-badge {
     position: absolute;
     top: -8px;
     left: 50%;
     transform: translateX(-50%);
     background: linear-gradient(90deg, #f59e0b, #fbbf24);
     color: white;
     font-size: 0.6rem;
     font-weight: 800;
     padding: 2px 8px;
     border-radius: 10px;
     white-space: nowrap;
     letter-spacing: 0.5px;
 }

 /* Start button */
 .g2-start-wrap {
     max-width: 860px;
     margin: 32px auto 0;
     padding: 0 40px;
 }

 .g2-start-btn {
     width: 100%;
     padding: 20px;
     background: linear-gradient(135deg, #FF6B6B, #FF8C42);
     border: none;
     border-radius: 18px;
     font-family: 'Fredoka One', cursive;
     font-size: 1.4rem;
     color: white;
     cursor: pointer;
     box-shadow: 0 6px 0 #c94b4b;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 12px;
     transition: transform 0.15s, box-shadow 0.15s;
     letter-spacing: 0.5px;
 }

 .g2-start-btn:hover {
     transform: translateY(-3px);
     box-shadow: 0 9px 0 #c94b4b;
 }

 .g2-start-btn:active {
     transform: translateY(2px);
     box-shadow: 0 3px 0 #c94b4b;
 }

 .g2-start-btn .start-arrow {
     background: rgba(255, 255, 255, 0.25);
     border-radius: 50%;
     width: 32px;
     height: 32px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1rem;
 }

 /* score preview */
 .g2-score-preview {
     max-width: 860px;
     margin: 20px auto 0;
     padding: 0 40px;
     display: flex;
     gap: 14px;
     flex-wrap: wrap;
 }

 .score-chip {
     flex: 1;
     min-width: 100px;
     background: white;
     border-radius: 14px;
     padding: 16px;
     border: 2px solid #eee;
     text-align: center;
     box-shadow: 0 3px 0 #eee;
 }

 .score-chip-val {
     font-family: 'Fredoka One', cursive;
     font-size: 1.5rem;
     color: var(--dark);
     display: block;
     margin-bottom: 3px;
 }

 .score-chip-label {
     font-size: 0.72rem;
     font-weight: 700;
     color: rgba(26, 26, 46, 0.4);
 }

 /* ── ARCHIVE MODAL ── */
.archive-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.archive-modal-overlay.show {
  display: flex;
}

.archive-modal {
  background: white;
  border-radius: 24px;
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.archive-modal-header {
  padding: 24px 28px;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.archive-modal-header h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  color: var(--dark);
  margin: 0;
}

.archive-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f5f5f5;
  border: none;
  font-size: 1.3rem;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  font-weight: 400;
  line-height: 1;
}

.archive-close-btn:hover {
  background: #eaeaea;
  transform: scale(1.1);
}

.archive-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px 28px;
}

.archive-loading {
  text-align: center;
  padding: 40px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(26, 26, 46, 0.4);
}

.archive-list {
  display: grid;
  gap: 12px;
}

.archive-date-item {
  background: white;
  border: 2px solid #e8e8e8;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 0 #e8e8e8;
}

.archive-date-item:hover {
  border-color: var(--indigo);
  transform: translateY(-2px);
  box-shadow: 0 4px 0 rgba(91, 95, 237, 0.2);
}

.archive-date-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--mint), #4fb89f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.archive-date-info {
  flex: 1;
}

.archive-date-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 3px;
}

.archive-date-id {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(26, 26, 46, 0.4);
}

.archive-date-arrow {
  font-size: 1.2rem;
  color: rgba(26, 26, 46, 0.3);
  transition: transform 0.2s;
}

.archive-date-item:hover .archive-date-arrow {
  transform: translateX(4px);
  color: var(--indigo);
}

 /* ── RESPONSIVE – tablet ── */
 @media(max-width: 700px) {
     .g1-cards {
         grid-template-columns: 1fr;
     }

     .g2-score-preview {
         gap: 10px;
     }

     .score-chip {
         min-width: calc(50% - 5px);
         padding: 12px;
     }
 }

 /* ── RESPONSIVE – mobile ── */
 @media(max-width: 540px) {

     /* Navbar: wrap tabs to second row */
     nav {
         flex-wrap: wrap;
         padding: 0 14px 10px;
     }

     .nav-logo {
         font-size: 1.35rem;
         padding: 12px 0;
         flex: 1;
     }

     .nav-auth {
         flex: 0 0 auto;
         gap: 8px;
     }

     .nav-auth .btn-ghost {
         padding: 6px 12px;
         font-size: 0.78rem;
     }


     .btn-solid {
         padding: 7px 14px;
         font-size: 0.8rem;
     }

     /* Tab switcher — full width on second row */
     .tab-switcher {
         order: 3;
         width: 100%;
         margin-top: 0;
         padding: 4px;
     }

     .tab-btn {
         flex: 1;
         text-align: center;
         padding: 9px 8px;
         font-size: 0.78rem;
     }

     /* Hero padding */
     .g1-hero,
     .g2-hero {
         padding: 44px 20px 44px;
     }

     .g1-hero h1,
     .g2-hero h1 {
         font-size: clamp(1.75rem, 8vw, 2.4rem);
     }

     .g1-hero p,
     .g2-hero p {
         font-size: 0.95rem;
     }

     .profile-btn {
         top: 14px;
         right: 14px;
         width: 38px;
         height: 38px;
         font-size: 1rem;
     }

     .profile-dropdown {
         right: 14px;
         top: 62px;
     }

     /* Content sections */
     .g1-cards-section,
     .g1-about,
     .streak-banner,
     .g2-lobby,
     .g2-start-wrap,
     .g2-score-preview {
         padding-left: 16px;
         padding-right: 16px;
     }

     .g1-cards-section {
         padding-top: 32px;
     }

     .g2-lobby {
         padding-top: 32px;
     }

     /* Streak */
     .streak-banner {
         margin-top: 20px;
     }

     .streak-inner {
         padding: 14px 18px;
         gap: 10px;
     }

     .streak-count {
         font-size: 1.8rem;
     }

     /* Lobby tiles: 2-per-row layout */
     .lobby-tiles {
         display: grid;
         grid-template-columns: 1fr 1fr;
         gap: 10px;
     }

     .lobby-tile {
         min-width: unset;
         padding: 16px 10px;
     }

     .tile-icon {
         font-size: 1.3rem;
         margin-bottom: 6px;
     }

     .tile-value {
         font-size: 1.1rem;
     }

     .tile-label {
         font-size: 0.67rem;
     }

     /* Score chips 2x2 */
     .score-chip {
         min-width: calc(50% - 5px);
         padding: 12px 10px;
     }

     .score-chip-val {
         font-size: 1.25rem;
     }

     /* Start button */
     .g2-start-btn {
         font-size: 1.2rem;
         padding: 16px;
     }

     .g2-start-wrap {
         margin-top: 20px;
     }

     /* About strip */
     .about-strip {
         padding: 16px 18px;
         gap: 12px;
     }

     .about-strip-icon {
         font-size: 1.4rem;
     }

     .about-strip h3 {
         font-size: 0.95rem;
     }

     .about-strip p {
         font-size: 0.75rem;
     }

     /* Cards */
     .g1-card {
         padding: 22px 18px;
     }

     /* Word pills */
     .word-pills {
         gap: 8px;
         margin-top: 20px;
     }

     .pill {
         padding: 5px 14px;
         font-size: 0.82rem;
     }
 }

 /* ── Very small phones ── */
 @media(max-width: 360px) {
     .tab-btn {
         font-size: 0.72rem;
         padding: 8px 6px;
     }

     .nav-logo {
         font-size: 1.2rem;
     }
 }

 /* ── HOW TO PLAY MODAL ── */
.htp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 30, 0.55);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.htp-overlay.show { display: flex; }

.htp-modal {
  background: var(--surface, #fff);
  border-radius: 24px;
  padding: 36px 32px 28px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 64px rgba(10,10,30,0.22);
  animation: htpIn .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes htpIn {
  from { opacity: 0; transform: scale(.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.htp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.htp-badge {
  background: var(--indigo, #4f46e5);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 4px 12px;
  border-radius: 99px;
}
.htp-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: rgba(26,26,46,.4);
  line-height: 1;
  padding: 4px;
  transition: color .15s;
}
.htp-close:hover { color: rgba(26,26,46,.9); }

.htp-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.9rem;
  margin: 0 0 4px;
  color: var(--ink, #1a1a2e);
}
.htp-subtitle {
  font-size: .92rem;
  color: rgba(26,26,46,.5);
  margin: 0 0 24px;
}

.htp-steps { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.htp-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.htp-step-num {
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--indigo, #4f46e5);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.htp-step-body strong { font-size: .97rem; color: var(--ink, #1a1a2e); }
.htp-step-body p { font-size: .86rem; color: rgba(26,26,46,.55); margin: 3px 0 0; }

.htp-example {
  background: rgba(79,70,229,.06);
  border: 1.5px solid rgba(79,70,229,.15);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 22px;
}
.htp-example-label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--indigo, #4f46e5);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.htp-example-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.htp-pill {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  gap: 7px;
  align-items: center;
}
.htp-pill span { opacity: .7; font-weight: 600; }
.htp-pill.far    { background: #f1f0ff; color: #4f46e5; }
.htp-pill.mid    { background: #fff4e0; color: #b07800; }
.htp-pill.close  { background: #ffeaea; color: #c0392b; }
.htp-pill.win    { background: #e6fff5; color: #1a7a5a; }

.htp-cta {
  width: 100%;
  padding: 14px;
  background: var(--indigo, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}
.htp-cta:hover { opacity: .88; transform: translateY(-1px); }