    body, html {
        margin: 0; padding: 0; height: 100vh;
        background: #fffceb;
    }
    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
    }
    #kana-bg {
        position: fixed;
        top: 0; left: 0; width: 100vw; height: 100vh;
        pointer-events: none;
        overflow: hidden; /* Hide overflowing kana */
    }
    #kana-bg span {
        position: absolute;
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
        color: rgba(83, 83, 83, 0.64);
        user-select: none;
        opacity: 0; /* Start hidden */
        animation-name: fadeInOut;
        animation-timing-function: ease-in-out;
        animation-iteration-count: infinite;
        animation-duration: 8s;
        animation-fill-mode: both; /* Keeps the animation styles applied before and after */
        will-change: opacity;
    }
    @keyframes fadeInOut {
        0% { opacity: 0; }
        50% { opacity: 1; }
        100% { opacity: 0; }
    }
    .jp-flag-bg-main {
        position: fixed;
        left: 50%;
        top: 39%;
        transform: translate(-50%, -50%);
        width: 28rem;
        height: 28rem;
        background: #e53e3e;
        border-radius: 50%;
        opacity: 0.8;
        z-index: 0;
        pointer-events: none;
    }
    #landing {
        background: transparent;
        position: relative;
        transform: translateY(25%);
        min-height: 60vh;
        border-radius: 2rem;
        box-shadow: none;
        overflow: visible;
    }
    #landing > * {
        position: relative;
        z-index: 1;
    }

    .font-japanese {
        font-family: 'Sawarabi Mincho', 'Kosugi Maru', 'Noto Sans JP', serif;
        letter-spacing: 0.05em;
    }
    .selected-char {
        font-size: 7rem;
        line-height: 1;
        height: 7rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: font-family 0.3s ease, transform 0.2s cubic-bezier(.4,2,.3,1), box-shadow 0.2s;
        cursor: pointer;
        color:#535353;
        position: relative;
    }
    .card {
        border-radius: 1.5rem;
        box-shadow: 0 8px 32px rgba(60, 60, 120, 0.08);
    }
    .card {
        position: relative;
        overflow: hidden;
    }
    .card::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 100%;
        transform: translate(-50%, -50%) scaleX(1.5);
        width: 80%;
        height: 2.5rem;
        background: radial-gradient(ellipse at center, #e0e7ff 60%, transparent 100%);
        opacity: 0.25;
        z-index: 0;
        pointer-events: none;
    }
    .card > * {
        position: relative;
        z-index: 1;
    }
    .step-circle {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 9999px;
        background: #f3f4f6;
        color: #6366f1;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        margin-right: 0.75rem;
        border: 2px solid #6366f1;
    }
    .step-label {
        font-size: 1.1rem;
        color: #5c5c5c;
        font-weight: 500;
    }
    /* Japanese flag style feedback */
    .jp-flag-feedback {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 30;
        width: 5.5rem;
        height: 5.5rem;
        background: #fff;
        border-radius: 50%;
        border: 2px solid #e5e7eb;
        box-shadow: 0 2px 24px rgba(120,80,80,0.10);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .jp-flag-circle {
        width: 3.5rem;
        height: 3.5rem;
        background: #e53e3e;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.2rem;
        color: #fff;
        font-weight: bold;
        font-family: inherit;
        box-shadow: 0 0 0 4px #fff;
    }

    /* Card flip animation for the site title */
    #jp-lab-container {
        perspective: 600px;
    }
    .jp-lab-front, .jp-lab-back {
        backface-visibility: hidden;
        font-size: inherit;
        font-weight: inherit;
    }
    .jp-lab-front {
        z-index: 2;
    }
    .jp-lab-back {
        z-index: 1;
    }
    .jp-lab-flip .jp-lab-front {
        transform: rotateX(90deg);
        opacity: 0;
        transition: transform 0.4s cubic-bezier(.4,2,.3,1), opacity 0.2s;
    }
    .jp-lab-flip .jp-lab-back {
        transform: rotateX(0deg);
        opacity: 1;
        transition: transform 0.4s cubic-bezier(.4,2,.3,1), opacity 0.2s;
    }

    /* Sand colored background for landing */
    #landing {
        position: relative;
        min-height: 60vh;
        overflow: hidden;
    }

    #landing > * {
        position: relative;
        z-index: 1;
    }
    /* New styles for the setup screen */
    .setup-container {
        width: 100%;
        max-width: 600px; /* Optional: Limit width for a more focused view */
        margin: auto;
    }
    .select-all-btn {
        background-color: #e0e7ff; /* Primary color */
        color: #4338ca;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
        transition: transform 0.2s, box-shadow 0.2s;
    }
    .select-all-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    }
    .clear-all-btn {
        background-color: #fce7f3; /* Red for clear */
        color: #be185d;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        box-shadow: 0 4px 12px rgba(229, 62, 62, 0.1);
        transition: transform 0.2s, box-shadow 0.2s;
    }
    .clear-all-btn:hover {
        transform: translateY(-2px);
        box-shadow: 6px 16px rgba(229, 62, 62, 0.2);
    }
    .intro-card {
        padding: 2rem;
        background-color: white;
        border-radius: 1rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.05);
        min-height: 25rem;
        display: none; /* Only one slide visible at a time */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        transition: opacity 0.5s ease-in-out;
    }
    .intro-card.active {
        display: flex;
    }
    .highlight {
        font-weight: bold;
        color: #4338ca; /* A deep purple/blue for emphasis */
    }
    .kana-example {
        font-family: 'Sawarabi Mincho', 'Kosugi Maru', 'Noto Sans JP', serif;
        font-size: 3rem; /* Make the example characters larger */
        line-height: 1.5;
        color: #4f46e5; /* A bright indigo for emphasis */
        margin: 1rem 0;
    }

    /* New styles for the choose groups page */
    .step-nav {
        display: flex;
        justify-content: center;
        margin-bottom: 2rem;
        gap: 2rem;
    }
    .step {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .step-circle-new {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 50%;
        background-color: #e2e8f0;
        color: #64748b;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s, color 0.3s;
    }
    .step-circle-new.active {
        background-color: #3b82f6;
        color: white;
    }
    .step-label-new {
        font-size: 1rem;
        font-weight: 500;
        color: #64748b;
        transition: color 0.3s;
    }
    .step-label-new.active {
        color: #3b82f6;
        font-weight: 600;
    }
    .group-card {
        padding: 1rem;
        background-color: #f3f4f6;
        border-radius: 0.75rem;
        border: 2px solid #e5e7eb;
        cursor: pointer;
        transition: all 0.2s ease-in-out;
    }
    .group-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }
    .group-card.selected {
        background-color: #e0e7ff;
        border-color: #6366f1;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
    .group-card input {
        display: none;
    }
    .kana-characters {
        font-size: 0.875rem;
        color: #6b7280;
    }
    .kana-characters.selected {
        color: #4338ca;
        font-weight: bold;
    }
    .start-button {
        background-color: #1f2937;
        color: white;
        padding: 1rem 2rem;
        border-radius: 0.75rem;
        font-weight: bold;
        font-size: 1.25rem;
        transition: background-color 0.3s, transform 0.2s;
        box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    }
    .start-button:hover {
        background-color: #374151;
        transform: translateY(-2px);
    }
    .start-button:disabled {
        background-color: #e5e7eb;
        color: #9ca3af;
        cursor: not-allowed;
    }
    #setup-back-btn svg {
    stroke: currentColor;
    }
