/* ==========================================================================
   BIRO CLASH: School Desk Physics
   Classroom Notebook Aesthetic: Cream (#FAF6EE), Black (#111111), White (#FFFFFF)
   Strictly Zero Rainbow Colors. Pure Hand-Drawn Ink on Paper.
   ========================================================================== */

:root {
    --bg-dark:       #0e1410;
    --paper-ivory:   #FAF6EE;
    --paper-line:    rgba(0, 0, 0, 0.07);
    --ink-black:     #111111;
    --ink-muted:     #555555;
    --ink-light:     #888888;
    --card-white:    #FFFFFF;
    --shadow:        0 12px 36px rgba(0, 0, 0, 0.65);
}

/* Global utility */
.hidden { display: none !important; }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

html, body {
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    background-image: radial-gradient(ellipse at 50% 20%, #17241b 0%, #0a100c 90%);
    font-family: 'Patrick Hand', 'Comic Sans MS', cursive, sans-serif;
    color: #F0F4F0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* ============================================================
   PRE-GAME NOTEBOOK MENU
   ============================================================ */
.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: radial-gradient(ellipse at 50% 30%, rgba(20, 32, 24, 0.95) 0%, rgba(8, 12, 10, 0.98) 100%);
    backdrop-filter: blur(4px);
}

/* The notebook card */
.notebook-card {
    background: var(--paper-ivory);
    color: var(--ink-black);
    width: 100%;
    max-width: 680px;
    min-width: 0;
    border-radius: 6px;
    box-shadow: var(--shadow), 0 0 0 3px #111111;
    position: relative;
    overflow: hidden;
    margin: 16px auto;
}

/* Spiral holes row */
.spiral-row {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 10px 24px 6px;
    background: #EFE9DB;
    border-bottom: 2px solid #111111;
    position: relative;
    z-index: 1;
}
.spiral-hole {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid #555555;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
}

/* Title Block */
.menu-title-block {
    text-align: center;
    padding: 18px 24px 10px;
    position: relative;
    z-index: 1;
}
.menu-title {
    font-family: 'Kalam', cursive;
    font-size: clamp(30px, 6.5vw, 50px);
    font-weight: 700;
    color: var(--ink-black);
    letter-spacing: 3px;
    line-height: 1.1;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}
.menu-subtitle {
    font-size: 13px;
    color: var(--ink-muted);
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.menu-divider {
    height: 1.5px;
    background: #111111;
    margin: 4px 24px 10px;
    opacity: 0.8;
}

/* Menu Sections */
.menu-section {
    padding: 8px 24px 10px;
    position: relative;
    z-index: 1;
}

.menu-label {
    font-family: 'Kalam', cursive;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-black);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

/* ============================================================
   VISUAL CARD SELECTOR GRID
   ============================================================ */
.visual-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.visual-card {
    background: var(--card-white);
    border: 2px solid var(--ink-black);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.15s ease;
    text-align: left;
    position: relative;
    user-select: none;
    min-width: 0;
}

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

.visual-card img {
    width: 100%;
    height: 74px;
    object-fit: cover;
    display: block;
    background: #F4EFE6;
    border-bottom: 1.5px solid var(--ink-black);
}

.visual-card-body {
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.visual-card-title {
    font-family: 'Kalam', cursive;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-black);
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}

.visual-card-desc {
    font-size: 11px;
    color: var(--ink-muted);
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}

.card-check {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 1.5px solid var(--ink-black);
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: transparent;
    transition: all 0.15s ease;
    z-index: 2;
}

/* Active Visual Card State: Invert to Black on Cream/White */
.visual-card.active {
    background: var(--ink-black);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    border-color: var(--ink-black);
}

.visual-card.active .visual-card-title {
    color: var(--paper-ivory);
}

.visual-card.active .visual-card-desc {
    color: #D6D6D6;
}

.visual-card.active .card-check {
    background: #FFFFFF;
    color: var(--ink-black);
    border-color: #FFFFFF;
}

/* ============================================================
   INK PILLS (Clean Cream & Black Buttons)
   ============================================================ */
.ink-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ink-pill {
    padding: 7px 16px;
    border-radius: 4px;
    font-family: 'Patrick Hand', cursive;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--ink-black);
    background: var(--card-white);
    color: var(--ink-black);
    transition: all 0.15s ease;
    min-height: 38px;
    letter-spacing: 0.3px;
    user-select: none;
}

.ink-pill:hover {
    background: #F4EFE6;
    transform: translateY(-1px);
}

.ink-pill.active {
    background: var(--ink-black);
    color: var(--paper-ivory);
    border-color: var(--ink-black);
}

/* ============================================================
   ONLINE LOBBY & PAIRING TUTORIAL GIF
   ============================================================ */
.pairing-tutorial-box {
    border: 2px solid var(--ink-black);
    border-radius: 6px;
    background: var(--card-white);
    padding: 8px 12px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pairing-gif {
    max-width: 100%;
    width: 300px;
    height: auto;
    border: 1.5px solid var(--ink-black);
    border-radius: 4px;
    margin-bottom: 6px;
    display: block;
}

.pairing-tutorial-caption {
    font-size: 12px;
    color: var(--ink-black);
    line-height: 1.3;
}

.online-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--ink-black);
}

.online-tab {
    padding: 7px 18px;
    font-family: 'Patrick Hand', cursive;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--ink-light);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    min-height: 38px;
}

.online-tab.active {
    color: var(--ink-black);
    border-bottom-color: var(--ink-black);
}

.online-panel { padding-top: 4px; }

.room-code-display { margin-bottom: 10px; text-align: center; }
.room-code-label { font-size: 12px; color: var(--ink-muted); margin-bottom: 2px; font-weight: 600; }
.room-code {
    font-family: 'Consolas', 'Courier New', Monaco, ui-monospace, monospace;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--ink-black);
    background: var(--card-white);
    border: 2px dashed var(--ink-black);
    border-radius: 6px;
    padding: 5px 16px;
    display: inline-block;
}

.room-link-display {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.room-link-label {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    color: var(--ink-muted);
    font-weight: 600;
}

.room-link-text {
    font-family: 'Consolas', 'Courier New', Monaco, ui-monospace, monospace;
    font-size: 11px;
    color: var(--ink-black);
    background: #F0ECE1;
    border: 1px solid #D0C8B8;
    border-radius: 4px;
    padding: 3px 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: all;
}

.host-row { display: flex; gap: 14px; align-items: flex-start; }

.qr-box {
    width: 130px;
    min-height: 130px;
    border: 2px solid var(--ink-black);
    border-radius: 6px;
    padding: 4px;
    background: var(--card-white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.qr-placeholder { font-size: 11px; color: var(--ink-light); text-align: center; }

.host-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    width: 100%;
}

.btn-ink-action {
    padding: 9px 14px;
    border-radius: 4px;
    font-family: 'Patrick Hand', cursive;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid var(--ink-black);
    background: var(--card-white);
    color: var(--ink-black);
    min-height: 40px;
    transition: all 0.15s;
    width: 100%;
    text-align: center;
}

.btn-ink-action:hover {
    background: var(--ink-black);
    color: var(--paper-ivory);
}

.conn-badge {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    border: 1.5px solid var(--ink-black);
    background: var(--card-white);
    color: var(--ink-black);
}

/* Join form */
.join-form { display: flex; flex-direction: column; gap: 6px; }
.join-label { font-size: 12px; color: var(--ink-muted); font-weight: 600; }
.join-input {
    font-family: 'Consolas', 'Courier New', Monaco, ui-monospace, monospace;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
    text-align: center;
    padding: 6px 12px;
    border: 2px solid var(--ink-black);
    border-radius: 6px;
    background: var(--card-white);
    color: var(--ink-black);
    width: 100%;
    outline: none;
    transition: all 0.15s;
    text-transform: uppercase;
}

/* ============================================================
   START / RESUME BUTTON ROW
   ============================================================ */
.menu-start-row {
    padding: 12px 24px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.wasm-status {
    font-size: 12px;
    color: var(--ink-muted);
    letter-spacing: 0.3px;
}

.start-btn {
    font-family: 'Kalam', cursive;
    font-size: 20px;
    font-weight: 700;
    color: var(--paper-ivory);
    background: var(--ink-black);
    border: 2px solid var(--ink-black);
    border-radius: 6px;
    padding: 10px 36px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.15s ease;
    min-width: 200px;
    min-height: 48px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.start-btn:hover:not(:disabled) {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.start-btn:disabled {
    background: #CCCCCC;
    border-color: #AAAAAA;
    color: #666666;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.8;
}

.reset-link {
    font-size: 13px;
    color: var(--ink-muted);
    cursor: pointer;
    text-decoration: underline;
    user-select: none;
}
.reset-link:hover {
    color: var(--ink-black);
}

.menu-bug-link {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
    text-decoration: underline;
    transition: color 0.15s ease;
    margin-top: 2px;
    display: inline-block;
}
.menu-bug-link:hover {
    color: var(--ink-black);
}

.menu-footer {
    text-align: center;
    font-size: 11px;
    color: var(--ink-muted);
    padding: 6px 24px 14px;
    position: relative;
    z-index: 1;
}
.menu-footer a { color: var(--ink-black); font-weight: 700; text-decoration: underline; }

/* ============================================================
   GAME AREA (Uncluttered: ONLY ONE MENU BUTTON)
   ============================================================ */
.game-area {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.classroom-header {
    width: 100%;
    max-width: 1280px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-section { display: flex; align-items: baseline; gap: 8px; }
.brand-title {
    font-family: 'Kalam', cursive;
    font-size: 24px;
    font-weight: 700;
    color: var(--paper-ivory);
    letter-spacing: 1.5px;
}
.brand-subtitle { font-size: 12px; color: #8F9E8F; }

/* THE SINGLE IN-GAME MENU BUTTON */
.header-menu-btn {
    padding: 7px 18px;
    border-radius: 4px;
    font-family: 'Patrick Hand', cursive;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: var(--paper-ivory);
    color: var(--ink-black);
    border: 2px solid var(--ink-black);
    transition: all 0.15s ease;
    user-select: none;
}

.header-menu-btn:hover {
    background: #111111;
    color: #FFFFFF;
    transform: translateY(-1px);
}

/* Canvas Container */
.game-container {
    width: 100%;
    max-width: 1280px;
    padding: 0 12px;
    display: flex;
    justify-content: center;
}

.canvas-frame {
    position: relative;
    width: 100%;
    max-width: 1280px;
    aspect-ratio: 16 / 10;
    border: 2px solid #111111;
    border-radius: 4px;
    overflow: hidden;
    background: #000000;
    box-shadow: var(--shadow);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Loading paper overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 20, 16, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.3s;
}
.loading-paper {
    background: var(--paper-ivory);
    color: var(--ink-black);
    border: 2px solid var(--ink-black);
    border-radius: 6px;
    padding: 24px 36px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.loading-pen-icon { font-size: 32px; margin-bottom: 8px; }
.loading-title {
    font-family: 'Kalam', cursive;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}
.loading-subtitle { font-size: 12px; color: var(--ink-muted); margin: 4px 0 12px; }
.progress-track {
    width: 100%;
    height: 8px;
    background: #D9D2C2;
    border: 1px solid var(--ink-black);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--ink-black);
    transition: width 0.2s;
}
.loading-status-text { font-size: 11px; color: var(--ink-muted); }

/* Quiet Classroom Footer (No noisy buttons) */
.classroom-footer {
    width: 100%;
    max-width: 1280px;
    padding: 6px 16px 12px;
    text-align: center;
}
.footer-hint {
    font-size: 12px;
    color: #7E8E7E;
}
.footer-bug-link {
    color: #A4BCA4;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.15s;
}
.footer-bug-link:hover {
    color: #FFFFFF;
}

/* Toast */
.toast-notice {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--ink-black);
    color: var(--paper-ivory);
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    border: 1px solid var(--paper-ivory);
}
.toast-notice.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================================
   CLASSROOM NOTE PASSING (CHAT UI)
   ============================================================ */
.desk-note-tab {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 15;
    background: var(--paper-ivory);
    color: var(--ink-black);
    border: 1.5px solid var(--ink-black);
    border-radius: 4px;
    padding: 4px 10px;
    font-family: 'Patrick Hand', cursive;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: all 0.15s ease;
    user-select: none;
}
.desk-note-tab:hover {
    background: var(--ink-black);
    color: var(--paper-ivory);
    transform: translateY(-1px);
}

.desk-note-notification {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    background: #FFFDF0;
    border: 1.5px dashed var(--ink-black);
    border-radius: 6px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    max-width: 90%;
    animation: popNoteIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes popNoteIn {
    0% { opacity: 0; transform: translate(-50%, -15px) scale(0.9); }
    100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.desk-note-notification.anim-fadeout {
    opacity: 0;
    transform: translate(-50%, -10px) scale(0.95);
    transition: all 0.35s ease;
}
.desk-note-pin { font-size: 14px; }
.desk-note-body { display: flex; align-items: baseline; gap: 6px; }
.desk-note-sender {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-muted);
}
.desk-note-text {
    font-family: 'Kalam', cursive;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-black);
    letter-spacing: 0.3px;
}

.desk-note-drawer {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 30;
    background: var(--paper-ivory);
    border: 2px solid var(--ink-black);
    border-radius: 6px;
    padding: 10px 12px;
    width: 290px;
    max-width: calc(100% - 16px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: slideNoteDrawer 0.2s ease-out;
}
@keyframes slideNoteDrawer {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}
.desk-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Patrick Hand', cursive;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-black);
    border-bottom: 1px dashed var(--ink-muted);
    padding-bottom: 4px;
}
.desk-note-close {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: var(--ink-black);
    padding: 0 4px;
    line-height: 1;
}
.desk-note-close:hover {
    color: #CC0000;
}
.desk-quick-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.quick-note-btn {
    background: var(--card-white);
    border: 1px solid var(--ink-black);
    border-radius: 4px;
    padding: 3px 6px;
    font-family: 'Patrick Hand', cursive;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink-black);
    transition: all 0.12s;
    user-select: none;
}
.quick-note-btn:hover {
    background: var(--ink-black);
    color: var(--paper-ivory);
}
.desk-note-form {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}
.desk-note-input {
    flex: 1;
    background: var(--card-white);
    border: 1.5px solid var(--ink-black);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 12px;
    color: var(--ink-black);
    outline: none;
}
.desk-note-input:focus {
    border-color: #000000;
    box-shadow: 0 0 0 1px #000000;
}
.desk-note-send-btn {
    background: var(--ink-black);
    color: var(--paper-ivory);
    border: 1.5px solid var(--ink-black);
    border-radius: 4px;
    padding: 4px 10px;
    font-family: 'Patrick Hand', cursive;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.desk-note-send-btn:hover {
    background: #333333;
}

/* ============================================================
   MOBILE RESPONSIVENESS (< 680px)
   ============================================================ */
@media (max-width: 680px) {
    .menu-backdrop {
        padding: 4px 3px;
        align-items: flex-start;
    }
    .notebook-card {
        width: 100%;
        max-width: 100%;
        margin: 4px auto 14px;
        border-radius: 4px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    }
    .spiral-row {
        padding: 5px 8px 3px;
        justify-content: space-evenly;
    }
    .spiral-hole {
        width: 10px;
        height: 10px;
    }
    .menu-title-block {
        padding: 8px 10px 4px;
    }
    .menu-title {
        font-size: 24px;
        letter-spacing: 1.5px;
    }
    .menu-subtitle {
        font-size: 10px;
    }
    .menu-divider {
        margin: 3px 10px 6px;
    }
    .menu-section {
        padding: 5px 8px 6px;
    }
    .menu-label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    .visual-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
        width: 100%;
    }
    .visual-card {
        min-width: 0;
        border-width: 1.5px;
        border-radius: 4px;
    }
    .visual-card img {
        height: 44px;
    }
    .visual-card-body {
        padding: 3px 3px 4px;
    }
    .visual-card-title {
        font-size: 10px;
        line-height: 1.15;
        white-space: normal;
        word-break: break-word;
    }
    .visual-card-desc {
        font-size: 8px;
        line-height: 1.15;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: break-word;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .card-check {
        width: 12px;
        height: 12px;
        font-size: 7.5px;
        top: 2px;
        right: 2px;
    }
    .ink-pill-grid, .ink-pill-row {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .ink-pill {
        flex: 1 1 calc(50% - 4px);
        padding: 4px 6px;
        font-size: 11px;
        min-height: 28px;
        text-align: center;
        border-radius: 4px;
    }
    .host-row {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .pairing-tutorial-box {
        padding: 6px;
    }
    .pairing-gif {
        width: 100%;
        max-width: 220px;
    }
    .pairing-tutorial-caption {
        font-size: 10px;
    }
    .room-code {
        font-size: 20px;
        letter-spacing: 3px;
        padding: 2px 8px;
    }
    .join-input {
        font-size: 18px;
        letter-spacing: 3px;
    }
    .room-link-text {
        font-size: 10px;
        max-width: 220px;
    }
    .qr-box {
        width: 95px;
        min-height: 95px;
    }
    .start-btn {
        font-size: 15px;
        padding: 7px 22px;
        min-height: 38px;
        min-width: 150px;
    }
    .classroom-header {
        padding: 5px 8px;
    }
    .brand-title {
        font-size: 17px;
    }
    .brand-subtitle {
        font-size: 10px;
    }
    .header-menu-btn {
        padding: 4px 12px;
        font-size: 12px;
    }
    .game-container {
        padding: 0 2px;
    }
    .footer-hint {
        font-size: 10px;
    }
    .desk-note-tab {
        top: 6px;
        left: 6px;
        font-size: 11px;
        padding: 3px 7px;
    }
    .desk-note-drawer {
        width: calc(100% - 16px);
        bottom: 6px;
        left: 8px;
        padding: 8px;
    }
    .desk-note-notification {
        top: 6px;
        padding: 4px 10px;
    }
    .desk-note-text {
        font-size: 13px;
    }
}
