:root {
    --bg-primary: #f8fafc;
    --bg-surface: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --btn-secondary-bg: #f1f5f9;
    --btn-secondary-hover: #e2e8f0;
    --btn-secondary-text: #334155;

    --edge-empty: #e2e8f0;
    --edge-filled: #1e293b;
    --edge-fixed: #10b981;
    --edge-cross: #64748b;
    --edge-cross-marked: #10b981;
    --vertex-dot: #475569;
    --clue-default: #1e293b;
    --clue-satisfied: #94a3b8;
    --cell-yellow: #fef3c7;
    --cell-gray: #e2e8f0;
    --overlay-bg: rgba(255, 255, 255, 0.88);
}

[data-theme="dark"] {
    --bg-primary: #0b0f19;
    --bg-surface: #111827;
    --border-color: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --success: #10b981;
    --success-hover: #34d399;

    --btn-secondary-bg: #1f2937;
    --btn-secondary-hover: #374151;
    --btn-secondary-text: #e5e7eb;

    --edge-empty: #1e293b;
    --edge-filled: #38bdf8;
    --edge-fixed: #34d399;
    --edge-cross: #64748b;
    --edge-cross-marked: #34d399;
    --vertex-dot: #64748b;
    --clue-default: #f9fafb;
    --clue-satisfied: #6b7280;
    --cell-yellow: #713f12;
    --cell-gray: #1f2937;
    --overlay-bg: rgba(17, 24, 39, 0.88);
}

* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    height: 100%;
    height: 100dvh;
    width: 100%;
    width: 100dvw;
    overflow: hidden;
    overscroll-behavior: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    width: 100dvw;
    overflow: hidden;
    padding-top: env(safe-area-inset-top, 0px);
}

/* Header & Controls Toolbar */
.game-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
    z-index: 10;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.action-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
}

.action-buttons-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.action-buttons-group .btn {
    min-height: 42px;
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.undo-btn, .redo-btn {
    min-width: 44px;
}

.undo-btn .btn-icon, .redo-btn .btn-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.action-meta-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.action-meta-group .timer-box {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    font-size: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.desktop-utility-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.mobile-utility-group {
    display: none;
}

.mobile-close-btn {
    display: none;
}

.menu-toggle-btn {
    display: none !important;
}

.header-collapsible {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.025em;
}

.controls-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.select-input, .text-input {
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--bg-surface);
    font-size: 0.875rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s ease, background-color 0.2s ease, color 0.2s ease;
}

.select-input:focus, .text-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.text-input {
    width: 5.5rem;
    text-align: center;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.checkbox-label:hover {
    background-color: var(--btn-secondary-hover);
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--primary);
    width: 1rem;
    height: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

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

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--btn-secondary-hover);
}

.btn-success {
    background-color: var(--success);
    color: #ffffff;
}

.btn-success:hover:not(:disabled) {
    background-color: var(--success-hover);
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
    filter: brightness(0.9);
}

.btn-danger-outline {
    background-color: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger-outline:hover:not(:disabled) {
    background-color: var(--danger);
    color: #ffffff;
}

.timer-box {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.15rem;
    font-weight: 700;
    background-color: var(--btn-secondary-bg);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    min-width: 4.5rem;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Board Area */
.board-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    padding-left: calc(0.5rem + env(safe-area-inset-left, 0px));
    padding-right: calc(0.5rem + env(safe-area-inset-right, 0px));
    overflow: hidden;
    touch-action: none;
    background-color: var(--bg-primary);
}

.svg-board {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    user-select: none;
    touch-action: none;
    cursor: crosshair;
}

.cell-poly {
    transition: fill 0.15s ease;
    cursor: pointer;
}

.cell-text {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    fill: var(--clue-default);
    user-select: none;
    pointer-events: none;
}

.cell-text-satisfied {
    fill: var(--clue-satisfied);
}

.cell-text-error {
    fill: var(--danger);
}

.edge-empty {
    stroke: var(--edge-empty);
    stroke-width: 1.5;
    stroke-linecap: round;
}

.edge-filled {
    stroke: var(--edge-filled);
    stroke-width: 4.5;
    stroke-linecap: round;
}

.edge-filled-marked {
    stroke: var(--edge-fixed);
    stroke-width: 4.5;
    stroke-linecap: round;
}

.edge-cross {
    stroke: var(--edge-cross);
    stroke-width: 2.2;
    stroke-linecap: round;
}

.edge-cross-marked {
    stroke: var(--edge-cross-marked);
    stroke-width: 2.2;
    stroke-linecap: round;
}

.edge-hit {
    stroke: transparent;
    stroke-width: 16;
    stroke-linecap: round;
    cursor: pointer;
}

.edge-invalid-highlight {
    stroke: #ef4444;
    stroke-width: 6.5;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.9));
    animation: edge-invalid-anim 0.6s ease-out forwards;
}

@keyframes edge-invalid-anim {
    0% { stroke-opacity: 1; stroke-width: 7.5; }
    50% { stroke-opacity: 0.8; stroke-width: 6; }
    100% { stroke-opacity: 0.2; stroke-width: 4.5; }
}

.edge-hint-highlight {
    stroke: #f59e0b;
    stroke-width: 6.5;
    stroke-linecap: round;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.9));
    animation: edge-hint-anim 0.8s ease-in-out infinite alternate;
}

@keyframes edge-hint-anim {
    0% { stroke-opacity: 0.6; stroke-width: 5; }
    100% { stroke-opacity: 1; stroke-width: 8; filter: drop-shadow(0 0 12px rgba(245, 158, 11, 1)); }
}

.edge-hint-cross {
    stroke: #f59e0b;
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.9));
    animation: edge-hint-cross-anim 0.8s ease-in-out infinite alternate;
}

@keyframes edge-hint-cross-anim {
    0% { stroke-opacity: 0.6; stroke-width: 2.5; }
    100% { stroke-opacity: 1; stroke-width: 4; }
}

.edge-hint-neutral {
    stroke: #f59e0b;
    stroke-width: 16;
    stroke-linecap: round;
    stroke-opacity: 0.25;
    animation: edge-hint-neutral-anim 0.8s ease-in-out infinite alternate;
}

@keyframes edge-hint-neutral-anim {
    0% { stroke-opacity: 0.15; }
    100% { stroke-opacity: 0.45; }
}

.vertex-dot {
    fill: var(--vertex-dot);
}

/* Progress / Overlay */
.overlay-spinner {
    position: absolute;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    z-index: 50;
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 320px;
    max-width: 85vw;
}

.spinner-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: var(--border-color);
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, var(--primary));
    border-radius: 9999px;
    transition: width 0.1s ease-out;
}

.generation-timeout-hint {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.25rem;
    animation: toast-in 0.25s ease-out;
}

.cancel-gen-btn {
    padding: 0.45rem 1.15rem;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: var(--bg-surface);
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.15s ease;
    animation: toast-in 0.25s ease-out;
}

.cancel-gen-btn:hover {
    background-color: var(--danger);
    color: #ffffff;
}

/* Floating Zoom HUD */
.zoom-hud {
    position: absolute;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    right: calc(1rem + env(safe-area-inset-right, 0px));
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.35rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 20;
    user-select: none;
}

.zoom-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.zoom-btn:hover {
    background: var(--btn-secondary-hover);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    padding: 0.65rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: toast-in 0.25s ease-out;
    pointer-events: none;
}

[data-theme="dark"] .toast-notification {
    background: #2563eb;
    color: #ffffff;
}

@keyframes toast-in {
    from { transform: translate(-50%, 1rem); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.hint-toast-notification {
    position: fixed;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--primary);
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    font-size: 0.88rem;
    font-weight: 500;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    max-width: 90vw;
    animation: toast-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hint-toast-content {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hint-toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.hint-toast-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 50%;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
}

.hint-toast-close:hover {
    color: var(--text-primary);
    background: var(--btn-secondary-hover);
}

.modal-subtext {
    font-size: 0.875rem;
    color: var(--text-muted, #94a3b8);
    margin-top: -0.25rem;
    margin-bottom: 0.75rem;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.modal-body {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: left;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.victory-badge {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Keyboard hint footer */
.game-footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 0.4rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.shortcut-badge {
    background: var(--btn-secondary-bg);
    color: var(--text-primary);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.7rem;
}

/* Wide Layout (> 860px): Options are always visible inline; HIDE gear button */
@media (min-width: 861px) {
    .menu-toggle-btn {
        display: none !important;
    }
    .header-collapsible {
        display: flex !important;
    }
    .desktop-utility-group {
        display: flex !important;
    }
    .mobile-utility-group {
        display: none !important;
    }
}

/* Compact / Phone Layout (<= 860px): Options collapsed; SHOW gear button */
@media (max-width: 860px) {
    .game-header {
        padding: 0.45rem 0.65rem;
        gap: 0.45rem;
        flex-direction: column;
        align-items: stretch;
    }

    .action-bar {
        width: 100%;
        justify-content: space-between;
        gap: 0.35rem;
    }

    .action-buttons-group {
        gap: 0.3rem;
        flex-shrink: 1;
        min-width: 0;
    }

    .action-buttons-group .btn {
        min-height: 42px;
        padding: 0.4rem 0.65rem;
        font-size: 0.9rem;
    }

    .action-meta-group {
        gap: 0.3rem;
        flex-shrink: 0;
    }

    .action-meta-group .timer-box {
        min-height: 42px;
        padding: 0.4rem 0.55rem;
        font-size: 0.95rem;
        min-width: 3.6rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .desktop-utility-group {
        display: none !important;
    }

    .menu-toggle-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-width: 42px;
        min-height: 42px;
        padding: 0.4rem 0.65rem;
        font-size: 1.15rem;
        border-radius: var(--radius);
        flex-shrink: 0;
    }

    .menu-toggle-btn.active {
        background-color: var(--primary);
        color: #ffffff;
        border-color: var(--primary);
    }

    /* Collapsible Options Panel on mobile */
    .header-collapsible {
        display: none;
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 0.25rem 0.5rem;
        border-top: 1px solid var(--border-color);
        width: 100%;
        max-height: 65vh;
        overflow-y: auto;
    }

    .header-collapsible.open {
        display: flex;
        animation: menu-slide-down 0.15s ease-out;
    }

    .header-collapsible .brand {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding-bottom: 0.25rem;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-close-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--btn-secondary-bg);
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        font-size: 0.95rem;
        width: 2rem;
        height: 2rem;
        border-radius: var(--radius);
        cursor: pointer;
    }

    .header-collapsible .controls-group {
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .mobile-utility-group {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
        padding-top: 0.5rem;
        border-top: 1px dashed var(--border-color);
        width: 100%;
    }

    .game-footer {
        display: none !important;
    }
}

/* Mobile & Phablet screens (<= 640px): Contract Undo/Redo to icon-only early so timer and gear icon never clip */
@media (max-width: 640px) {
    .undo-btn .btn-text,
    .redo-btn .btn-text {
        display: none;
    }

    .undo-btn, .redo-btn {
        min-width: 42px;
        padding: 0.4rem 0.5rem;
    }

    .action-buttons-group .btn {
        min-height: 42px;
        padding: 0.4rem 0.55rem;
        font-size: 0.88rem;
    }
}

/* Standard phone screens (<= 440px): Compact spacing and padding to fit comfortably on 360-440px */
@media (max-width: 440px) {
    .game-header {
        padding: 0.35rem 0.45rem;
    }

    .action-bar {
        gap: 0.22rem;
    }

    .action-buttons-group {
        gap: 0.2rem;
    }

    .action-buttons-group .btn {
        min-height: 40px;
        padding: 0.35rem 0.42rem;
        font-size: 0.85rem;
    }

    .undo-btn, .redo-btn {
        min-width: 38px;
    }

    .undo-btn .btn-icon, .redo-btn .btn-icon {
        font-size: 1.2rem;
    }

    .action-meta-group {
        gap: 0.2rem;
    }

    .action-meta-group .timer-box {
        min-height: 40px;
        padding: 0.35rem 0.42rem;
        font-size: 0.875rem;
        min-width: 3.2rem;
    }

    .menu-toggle-btn {
        min-width: 38px;
        min-height: 40px;
        padding: 0.35rem 0.45rem;
        font-size: 1.05rem;
    }
}

/* Ultra-narrow phone screens (<= 360px) */
@media (max-width: 360px) {
    .game-header {
        padding: 0.25rem 0.25rem;
    }

    .action-buttons-group {
        gap: 0.15rem;
    }

    .action-buttons-group .btn {
        min-height: 38px;
        padding: 0.3rem 0.32rem;
        font-size: 0.8rem;
    }

    .undo-btn, .redo-btn {
        min-width: 34px;
    }

    .action-meta-group {
        gap: 0.15rem;
    }

    .action-meta-group .timer-box {
        min-height: 38px;
        padding: 0.3rem 0.3rem;
        font-size: 0.8rem;
        min-width: 2.8rem;
    }

    .menu-toggle-btn {
        min-width: 34px;
        min-height: 38px;
        padding: 0.3rem 0.3rem;
        font-size: 1rem;
    }
}

@keyframes menu-slide-down {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* PWA Update Banner */
.update-banner {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #ffffff;
    padding: 0.45rem 1rem;
    border-radius: 0 0 10px 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 1000;
    animation: toast-in 0.25s ease-out;
}

.update-banner .btn {
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
    background: #ffffff;
    color: var(--primary);
    border: none;
    font-weight: 700;
}

.update-banner .btn:hover {
    background: #f1f5f9;
}