.sw-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    min-height: calc(100vh - 120px);
    gap: 1rem;
    width: 100%;
}

.sw-card {
    background: #fafaf3;
    border-radius: 16px;
    padding: 2rem 2rem 1.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Header */
.card-header {
    text-align: center;
    line-height: 1;
}

.brand-name {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #7a1c3e;
    letter-spacing: 1px;
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
}

.month-name {
    font-family: 'Dancing Script', cursive;
    font-size: 4.5rem;
    font-weight: 700;
    color: #c8860a;
    line-height: 1;
}

/* Day grid */
.days-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.day-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #2a2a2a;
    background: white;
    color: #2a2a2a;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    flex-shrink: 0;
}

.day-circle:active {
    transform: scale(0.92);
}

.day-circle.state-red {
    background: #d32f2f;
    border-color: #b71c1c;
    color: white;
}

.day-circle.state-orange {
    background: #f57c00;
    border-color: #e65100;
    color: white;
}

.day-circle.state-green {
    background: #388e3c;
    border-color: #1b5e20;
    color: white;
}

/* Legend */
.legend {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid #ddd;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #2a2a2a;
    font-family: 'Georgia', serif;
}

.legend-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot.green  { background: #388e3c; }
.legend-dot.orange { background: #f57c00; }
.legend-dot.red    { background: #d32f2f; }

/* Reset button */
.reset-btn {
    background: none;
    border: 1px solid #bbb;
    color: #888;
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.reset-btn:hover {
    color: #555;
    border-color: #888;
}

/* PWA install prompt */
.install-hint {
    text-align: center;
    margin-top: 0.5rem;
}

.install-btn {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.install-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.ios-instructions {
    font-size: 0.82rem;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 1rem;
}

/* Focus ring — must be very visible for TV remote navigation */
.day-circle:focus-visible {
    outline: 4px solid #c8860a;
    outline-offset: 3px;
    box-shadow: 0 0 0 7px rgba(200, 134, 10, 0.35);
}

.reset-btn:focus-visible {
    outline: 4px solid #c8860a;
    outline-offset: 3px;
}

/* TV / large screen layout */
@media (min-width: 1200px) {
    .sw-wrapper {
        align-items: center;
        min-height: calc(100vh - 80px);
    }

    .sw-card {
        max-width: 820px;
        padding: 3rem 3.5rem 2.5rem;
        gap: 2.5rem;
    }

    .brand-name {
        font-size: 2rem;
    }

    .month-name {
        font-size: 8rem;
    }

    .days-grid {
        gap: 18px;
    }

    .day-circle {
        width: 90px;
        height: 90px;
        font-size: 1.7rem;
        border-width: 3px;
    }

    .legend {
        gap: 1rem;
    }

    .legend-item {
        font-size: 1.5rem;
        gap: 1.2rem;
    }

    .legend-dot {
        width: 44px;
        height: 44px;
    }

    .reset-btn {
        font-size: 1rem;
        padding: 0.6rem 1.8rem;
    }
}

/* Responsive: smaller circles on very small screens */
@media (max-width: 380px) {
    .day-circle {
        width: 46px;
        height: 46px;
        font-size: 0.85rem;
    }

    .days-grid {
        gap: 7px;
    }

    .month-name {
        font-size: 3.5rem;
    }
}
