.qwf-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 1rem;
}

.qwf-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    text-align: center;
}

.qwf-sub {
    margin: 0 0 1.25rem;
    color: #4b5563;
    line-height: 1.55;
    text-align: center;
}

.qwf-form {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.qwf-field { margin-bottom: 1rem; }

.qwf-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.qwf-field label {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
}

.qwf-opt { font-weight: 400; color: #6b7280; }

.qwf-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font: inherit;
    box-sizing: border-box;
    background: #fff;
}

.qwf-input:focus {
    outline: 2px solid #0891b2;
    outline-offset: 1px;
    border-color: #0891b2;
}

textarea.qwf-input { resize: vertical; }

.qwf-note {
    font-size: 0.83rem;
    color: #6b7280;
    margin: 0.4rem 0 0;
    line-height: 1.5;
}

.qwf-btn {
    padding: 0.65rem 1.5rem;
    border: 1px solid #888;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.qwf-btn-primary {
    background: #0891b2;
    border-color: #0891b2;
    color: #fff;
    width: 100%;
    font-size: 1.02rem;
}

.qwf-btn-primary:hover { background: #0e7490; }

.qwf-error {
    margin: 0.9rem 0 0;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    background: #fdecea;
    color: #b3261e;
    border: 1px solid #f5c6c2;
}

.qwf-error[hidden] { display: none; }

/* ------- results ------- */

.qwf-results { margin-top: 1.5rem; }

.qwf-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.qwf-h { font-size: 1.1rem; margin: 0; }

.qwf-sort { display: flex; gap: 0.4rem; }

.qwf-chip-btn {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.qwf-chip-btn.qwf-chip-on {
    background: #0891b2;
    border-color: #0891b2;
    color: #fff;
    font-weight: 600;
}

.qwf-week {
    border: 1px solid #e2e8f0;
    border-left-width: 5px;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.7rem;
    background: #fff;
}

.qwf-gem { border-left-color: #16a34a; }
.qwf-quiet { border-left-color: #65a30d; }
.qwf-okay { border-left-color: #eab308; }
.qwf-busy { border-left-color: #f97316; }
.qwf-peak { border-left-color: #dc2626; }

.qwf-week-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.qwf-dates { font-weight: 700; }

.qwf-best {
    color: #b45309;
    font-weight: 700;
    font-size: 0.85rem;
}

.qwf-badge {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    white-space: nowrap;
}

.qwf-gem .qwf-badge { background: #dcfce7; color: #166534; }
.qwf-peak .qwf-badge, .qwf-busy .qwf-badge { background: #fee2e2; color: #991b1b; }

.qwf-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    margin: 0.6rem 0 0.4rem;
    overflow: hidden;
}

.qwf-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #dc2626, #eab308 45%, #16a34a);
    background-size: 200px 100%;
}

.qwf-reasons {
    margin: 0.3rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.87rem;
    color: #475569;
}

.qwf-reasons li { margin: 0.15rem 0; }

.qwf-calm {
    margin: 0.3rem 0 0;
    font-size: 0.87rem;
    color: #166534;
}

@media (max-width: 560px) {
    .qwf-field-row { grid-template-columns: 1fr; }
}
