.modern-calc-shell {
    max-width: 1240px;
    margin: 28px auto 0;
    padding: 22px 0 10px;
}

@media (max-width: 560px) {
    .modern-calc-shell {
        padding-inline: 12px;
    }
}

.modern-calc-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(20, 48, 80, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(239,246,255,0.92)),
        repeating-linear-gradient(90deg, rgba(0,113,227,0.05) 0 1px, transparent 1px 32px);
    box-shadow: 0 18px 45px rgba(15, 35, 70, 0.10);
    padding: clamp(24px, 4vw, 42px);
}

.modern-calc-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #0b5cad;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.modern-calc-hero h1 {
    max-width: 820px;
    margin: 0;
    color: #12233a;
    font-size: clamp(1.8rem, 3.5vw, 3.36rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.modern-calc-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #43546c;
    font-size: clamp(1rem, 1.7vw, 1.18rem);
    line-height: 1.6;
}

.modern-calc-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.modern-calc-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid rgba(18, 35, 58, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    color: #20314a;
    font-weight: 700;
    font-size: 0.9rem;
}

.modern-calc-layout {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 22px;
}

.modern-calc-panel,
.modern-context-panel {
    border: 1px solid rgba(20, 48, 80, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 38px rgba(15, 35, 70, 0.08);
}

.modern-calc-panel {
    padding: 22px;
}

/* ============================================================
   Paramètres form — refactor du 2026-04-22 (namespace .pf-*).
   Remplace .modern-form-grid / .modern-field / .modern-toggle-row /
   .modern-presets / .modern-actions / .modern-error dans les 3 calcs
   (jours-ouvrables, jours-francs, calculateur-age).
   ============================================================ */
.pf-card {
    border: 1px solid rgba(20, 48, 80, 0.12);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 35, 70, 0.06);
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pf-title {
    margin: 0;
    color: #17263d;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0;
}

.pf-grid {
    display: grid;
    gap: 12px 14px;
}

.pf-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    margin: 0;
    cursor: text;
}

.pf-label {
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.pf-input {
    width: 100%;
    height: 40px;
    border: 1px solid #cfd8e3;
    border-radius: 7px;
    background: #fff;
    color: #12233a;
    font: inherit;
    font-size: 0.95rem;
    padding: 0 12px;
    box-sizing: border-box;
    transition: border-color 120ms, box-shadow 120ms;
}

.pf-input:focus {
    outline: none;
    border-color: #0b5cad;
    box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.18);
}

/* Chrome/Safari : retire l'icône spinner disgracieuse pour number inputs */
.pf-input[type="number"]::-webkit-outer-spin-button,
.pf-input[type="number"]::-webkit-inner-spin-button {
    opacity: 0.6;
}

.pf-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dfe7f1;
    border-radius: 7px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.9rem;
    color: #233146;
    margin: 0;
}

.pf-check input {
    margin-top: 3px;
    accent-color: #0b5cad;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.pf-check-text {
    display: block;
    font-weight: 700;
    line-height: 1.35;
}

.pf-check-text small {
    display: block;
    margin-top: 2px;
    color: #5b6a7f;
    font-size: 0.8rem;
    font-weight: 500;
}

.pf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pf-chip {
    height: 30px;
    padding: 0 11px;
    border: 1px solid #cfd8e3;
    border-radius: 999px;
    background: #fff;
    color: #2a3d58;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 120ms, color 120ms, background 120ms;
}

.pf-chip:hover {
    border-color: #0b5cad;
    color: #0b5cad;
    background: #eff5fc;
}

.pf-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: stretch;
}

.pf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 120ms, border-color 120ms, box-shadow 120ms;
}

.pf-btn--primary {
    flex: 1 1 220px;
    background: #0b5cad;
    color: #fff;
}

.pf-btn--primary:hover {
    background: #094e93;
    box-shadow: 0 6px 14px rgba(11, 92, 173, 0.22);
}

.pf-btn--ghost {
    background: #fff;
    color: #334155;
    border-color: #cfd8e3;
}

.pf-btn--ghost:hover {
    background: #f1f5f9;
    border-color: #9aabc3;
}

.pf-error {
    display: none;
    padding: 9px 12px;
    border: 1px solid #fecaca;
    border-radius: 7px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 0.88rem;
    font-weight: 600;
}

.pf-error.is-visible {
    display: block;
}

@media (max-width: 520px) {
    .pf-grid--2 {
        grid-template-columns: 1fr;
    }
    .pf-btn--primary {
        width: 100%;
        flex: 1 1 100%;
    }
}

body.dark-mode .pf-card {
    border-color: rgba(148, 163, 184, 0.24);
    background: #111827;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.30);
}

body.dark-mode .pf-title {
    color: #f1f5f9;
}

body.dark-mode .pf-label {
    color: #cbd5e1;
}

body.dark-mode .pf-input {
    background: #0b1220;
    border-color: #334155;
    color: #f8fafc;
}

body.dark-mode .pf-check {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.24);
    color: #e2e8f0;
}

body.dark-mode .pf-check-text small {
    color: #94a3b8;
}

body.dark-mode .pf-chip {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark-mode .pf-chip:hover {
    background: #172033;
    border-color: #7dd3fc;
    color: #bae6fd;
}

body.dark-mode .pf-btn--ghost {
    background: #0f172a;
    border-color: #334155;
    color: #dbeafe;
}

body.dark-mode .pf-btn--ghost:hover {
    background: #172033;
    border-color: #9aabc3;
}

.modern-context-panel {
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.97), rgba(248,250,252,0.97));
}

.modern-context-panel h2,
.modern-calc-panel h2,
.modern-result-panel h2 {
    margin: 0 0 14px;
    color: #17263d;
    font-size: 1.16rem;
    letter-spacing: 0;
}

.modern-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 22px;
}

.modern-field {
    min-width: 0;
}

/* Form panel is cramped when main layout is in 2-col mode on narrow viewports:
   stack the inner form 1-col so inputs never touch. */
@media (min-width: 861px) and (max-width: 1160px) {
    .modern-form-grid {
        grid-template-columns: 1fr;
    }
}

.modern-form-grid.single {
    grid-template-columns: 1fr;
}

.modern-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.modern-field label,
.modern-toggle-row span:first-child {
    color: #213149;
    font-size: 0.93rem;
    font-weight: 800;
}

.modern-field input,
.modern-field select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #c8d3df;
    border-radius: 8px;
    background: #fff;
    color: #182336;
    font: inherit;
    font-size: 1rem;
    padding: 10px 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.modern-field input:focus,
.modern-field select:focus {
    outline: 3px solid rgba(0, 113, 227, 0.18);
    border-color: #0071e3;
}

.modern-field-help {
    color: #617084;
    font-size: 0.85rem;
    line-height: 1.45;
}

.modern-toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #d7e1ec;
    border-radius: 8px;
    background: #f8fbff;
    cursor: pointer;
}

.modern-toggle-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #0071e3;
}

.modern-toggle-row small {
    display: block;
    margin-top: 3px;
    color: #627286;
    line-height: 1.4;
}

.modern-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.modern-actions .btn-calc-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 8px;
}

.btn-modern-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-weight: 800;
    cursor: pointer;
}

.btn-modern-clear:hover {
    background: #eef2f7;
}

.modern-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.modern-preset-btn {
    min-height: 34px;
    border: 1px solid #cbd8e6;
    border-radius: 8px;
    background: #fff;
    color: #23415f;
    font-weight: 800;
    padding: 0 10px;
    cursor: pointer;
}

.modern-preset-btn:hover {
    border-color: #0071e3;
    color: #005bb5;
}

.modern-context-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.modern-context-list li {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    background: #fff;
    color: #46576e;
    line-height: 1.42;
}

.modern-context-list i {
    color: #0071e3;
    margin-top: 2px;
}

.modern-result-panel {
    display: none;
    margin-top: 32px;
    margin-bottom: 32px;
}

.modern-result-panel.is-visible {
    display: block;
}

.modern-result-title {
    margin: 0 0 14px;
    color: #17263d;
    font-size: 1.2rem;
    font-weight: 800;
}

.modern-result-panel.is-pulsing {
    animation: resultPulse 650ms ease-out;
}

@keyframes resultPulse {
    0% { box-shadow: 0 0 0 0 rgba(0,113,227,0.36), 0 16px 38px rgba(15,35,70,0.08); }
    100% { box-shadow: 0 0 0 16px rgba(0,113,227,0), 0 16px 38px rgba(15,35,70,0.08); }
}

.modern-result-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: clamp(20px, 3vw, 30px);
    border-radius: 8px;
    margin-bottom: 18px;
    background:
        linear-gradient(135deg, #0b315f, #0d6a83 58%, #0d7a55);
    color: #fff;
    box-shadow: 0 16px 38px rgba(15, 35, 70, 0.10);
}

.modern-result-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.78);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.modern-result-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    font-weight: 900;
    line-height: 1;
}

.modern-result-value {
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: 0;
}

.modern-result-unit {
    font-size: clamp(1rem, 1.6vw, 1.35rem);
}

.modern-result-subtitle {
    margin: 10px 0 0;
    color: rgba(255,255,255,0.86);
    line-height: 1.45;
}

.modern-result-side {
    min-width: 168px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 8px;
    background: rgba(255,255,255,0.13);
}

.modern-result-side strong {
    display: block;
    color: #fff;
    font-size: 1.05rem;
}

.modern-result-side span {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,0.80);
    font-size: 0.88rem;
}

.modern-result-details {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid rgba(20, 48, 80, 0.12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 35, 70, 0.06);
}

.modern-detail-card {
    min-height: 96px;
    border: 1px solid #dce5ef;
    border-radius: 8px;
    background: #f8fafc;
    padding: 14px;
}

.modern-detail-card span {
    display: block;
    color: #607086;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.modern-detail-card strong {
    display: block;
    margin-top: 8px;
    color: #16263c;
    font-size: 1.24rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.modern-detail-card small {
    display: block;
    margin-top: 6px;
    color: #65758a;
    line-height: 1.35;
}

.modern-result-note {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #dce8f5;
    border-radius: 8px;
    background: #f7fbff;
    color: #526377;
    line-height: 1.48;
}

.modern-result-note.is-warning {
    border-color: #ffd08a;
    background: #fff8eb;
    color: #794f00;
}

.modern-calendar-zone {
    padding: 22px 20px 24px;
    margin-bottom: 18px;
    border: 1px solid rgba(20, 48, 80, 0.12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 35, 70, 0.06);
}

.modern-calendar-grid-wrap + .modern-calendar-legend {
    margin-top: 16px;
}

.modern-calendar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 12px;
    color: #17263d;
    font-size: 1.05rem;
    font-weight: 900;
}

.modern-calendar-grid-wrap {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: start;
    gap: 16px;
}

@media (max-width: 860px) {
    .modern-calendar-grid-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .modern-calendar-grid-wrap {
        grid-template-columns: 1fr;
    }
}

.modern-interval-summary {
    border: 1px solid #dce5ef;
    border-radius: 8px;
    background: linear-gradient(180deg, #f7fbff, #f2f7fd);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modern-interval-summary-title {
    margin: 0;
    color: #17263d;
    font-size: 0.98rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modern-interval-summary-title i {
    color: #0b5cad;
}

.modern-interval-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #e4ecf5;
    font-size: 0.88rem;
}

.modern-interval-row:last-child {
    border-bottom: 0;
}

.modern-interval-row .label {
    color: #5b6a7f;
}

.modern-interval-row .value {
    color: #17263d;
    font-weight: 800;
    text-align: right;
    overflow-wrap: anywhere;
}

.modern-month {
    position: relative;
    max-width: 320px;
    border: 1px solid #dce5ef;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.modern-month-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 8px;
    background: #0b5cad;
    color: #fff;
    font-size: 0.67rem;
    font-weight: 900;
    padding: 4px 7px;
}

.modern-month-badge.is-end {
    background: #0d7a55;
}

.modern-month-title {
    padding-right: 86px;
    color: #17263d;
    font-size: 1rem;
    font-weight: 900;
    text-transform: capitalize;
}

.modern-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    margin-top: 12px;
}

.modern-weekday,
.modern-day,
.modern-empty {
    min-height: 36px;
    height: 36px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.86rem;
}

.modern-weekday {
    min-height: 22px;
    color: #66768b;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.modern-weekday.is-weekend {
    color: #8a5a00;
}

.modern-empty {
    background: transparent;
}

.modern-day {
    border: 1px solid #e5edf5;
    background: #fff;
    color: #26364c;
    font-weight: 800;
}

.modern-day.is-outside {
    opacity: 0.32;
}

.modern-day.is-weekend {
    background: #e8eaed;
    border-color: #d6d9de;
    color: #30343b;
}

.modern-day.is-holiday {
    background: #ffe9e9;
    border-color: #ffc6c6;
    color: #b42318;
}

.modern-day.is-counted {
    background: #dff4e6;
    border-color: #6fc28b;
    color: #075a31;
}

.modern-day.is-counted.is-weekend {
    background: #dff4e6;
    border-color: #48a868;
    color: #075a31;
}

.modern-day.is-counted.is-holiday {
    background: #dff4e6;
    border-color: #d94a4a;
    color: #b42318;
}

.modern-day.is-start,
.modern-day.is-end {
    background: #0b5cad;
    border-color: #0b5cad;
    color: #fff;
}

.modern-day.is-end {
    background: #0d7a55;
    border-color: #0d7a55;
}

.modern-day.is-start.is-counted,
.modern-day.is-end.is-counted {
    background: #dff4e6;
    color: #075a31;
    box-shadow: inset 0 0 0 2px #0b5cad;
}

.modern-day.is-end.is-counted {
    box-shadow: inset 0 0 0 2px #0d7a55;
}

.modern-day.is-today {
    outline: 2px solid #ffb020;
    outline-offset: 1px;
}

.modern-month-events {
    margin: 12px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid #e5edf5;
    color: #5b6a7f;
    font-size: 0.82rem;
    line-height: 1.4;
}

.modern-month-events strong {
    color: #b42318;
}

.modern-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.modern-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #56667a;
    font-size: 0.82rem;
    font-weight: 700;
}

.modern-legend-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #d5dde7;
    background: #fff;
}

.modern-legend-swatch.counted { background: #dff4e6; border-color: #6fc28b; }
.modern-legend-swatch.weekend { background: #e8eaed; border-color: #d6d9de; }
.modern-legend-swatch.holiday { background: #ffe9e9; border-color: #ffc6c6; }
.modern-legend-swatch.boundary { background: #0b5cad; border-color: #0b5cad; }

.modern-error {
    display: none;
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f2;
    color: #9f1239;
    font-weight: 700;
}

.modern-error.is-visible {
    display: block;
}

body.dark-mode .modern-calc-hero {
    border-color: rgba(148, 163, 184, 0.22);
    background:
        linear-gradient(135deg, rgba(13,23,38,0.98), rgba(15,40,60,0.95)),
        repeating-linear-gradient(90deg, rgba(125,211,252,0.08) 0 1px, transparent 1px 32px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

body.dark-mode .modern-calc-hero h1,
body.dark-mode .modern-context-panel h2,
body.dark-mode .modern-calc-panel h2,
body.dark-mode .modern-result-panel h2,
body.dark-mode .modern-calendar-title,
body.dark-mode .modern-month-title {
    color: #f8fafc;
}

body.dark-mode .modern-calc-hero p,
body.dark-mode .modern-field-help,
body.dark-mode .modern-toggle-row small,
body.dark-mode .modern-context-list li,
body.dark-mode .modern-result-note,
body.dark-mode .modern-month-events,
body.dark-mode .modern-legend-item {
    color: #c5d2e3;
}

body.dark-mode .modern-calc-kicker {
    color: #7dd3fc;
}

body.dark-mode .modern-calc-chip,
body.dark-mode .modern-calc-panel,
body.dark-mode .modern-result-panel,
body.dark-mode .modern-context-panel,
body.dark-mode .modern-detail-card,
body.dark-mode .modern-month {
    border-color: rgba(148, 163, 184, 0.24);
    background: #111827;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.30);
}

body.dark-mode .modern-calc-chip,
body.dark-mode .modern-field label,
body.dark-mode .modern-toggle-row span:first-child,
body.dark-mode .modern-detail-card strong {
    color: #e5edf7;
}

body.dark-mode .modern-field input,
body.dark-mode .modern-field select {
    border-color: #334155;
    background: #0b1220;
    color: #f8fafc;
}

body.dark-mode .modern-toggle-row,
body.dark-mode .modern-context-list li,
body.dark-mode .modern-result-details,
body.dark-mode .modern-result-note {
    border-color: rgba(148, 163, 184, 0.22);
    background: #0f172a;
}

body.dark-mode .btn-modern-clear,
body.dark-mode .modern-preset-btn {
    border-color: #334155;
    background: #0f172a;
    color: #dbeafe;
}

body.dark-mode .btn-modern-clear:hover,
body.dark-mode .modern-preset-btn:hover {
    background: #172033;
}

body.dark-mode .modern-detail-card span,
body.dark-mode .modern-detail-card small,
body.dark-mode .modern-weekday {
    color: #a8b6c9;
}

body.dark-mode .modern-day {
    border-color: #2f3d51;
    background: #111827;
    color: #e5edf7;
}

body.dark-mode .modern-day.is-weekend {
    background: #29313f;
    border-color: #3b4454;
    color: #f1f5f9;
}

body.dark-mode .modern-day.is-holiday {
    background: #4a1f25;
    border-color: #7f2d35;
    color: #fecaca;
}

body.dark-mode .modern-day.is-counted {
    background: #123d2a;
    border-color: #26734c;
    color: #bbf7d0;
}

body.dark-mode .modern-day.is-counted.is-holiday {
    background: #123d2a;
    border-color: #b54545;
    color: #fecaca;
}

body.dark-mode .modern-day.is-start.is-counted,
body.dark-mode .modern-day.is-end.is-counted {
    background: #123d2a;
    color: #bbf7d0;
}

body.dark-mode .modern-error {
    border-color: #7f1d1d;
    background: #3a1218;
    color: #fecdd3;
}

@media (max-width: 860px) {
    .modern-calc-layout {
        grid-template-columns: 1fr;
    }

    .modern-result-hero {
        grid-template-columns: 1fr;
    }

    .modern-result-side {
        min-width: 0;
    }

    .modern-result-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .modern-calc-shell {
        padding-inline: 12px;
    }

    .modern-calc-hero,
    .modern-calc-panel {
        padding: 18px;
    }

    .modern-form-grid {
        grid-template-columns: 1fr;
    }

    .modern-actions .btn-calc-main {
        width: 100%;
    }

    .btn-modern-clear {
        width: auto;
    }

    .modern-result-details {
        grid-template-columns: 1fr;
    }

    .modern-weekday,
    .modern-day,
    .modern-empty {
        min-height: 30px;
        font-size: 0.78rem;
    }
}

@media print {
    .modern-calc-hero,
    .modern-calc-panel,
    .modern-context-panel,
    .modern-actions,
    .modern-presets {
        display: none !important;
    }

    .modern-result-panel {
        display: block !important;
        box-shadow: none !important;
        border: 1px solid #999 !important;
    }

    .modern-result-hero {
        background: #fff !important;
        color: #111 !important;
        border-bottom: 2px solid #111;
    }

    .modern-result-eyebrow,
    .modern-result-subtitle,
    .modern-result-side span {
        color: #333 !important;
    }

    .modern-result-side {
        border-color: #555 !important;
        background: #f2f2f2 !important;
    }

    .modern-day.is-weekend {
        background: #d9d9d9 !important;
    }

    .modern-day.is-holiday {
        background: #efefef !important;
        color: #111 !important;
        border: 2px solid #111 !important;
    }

    .modern-day.is-counted {
        background: #cfcfcf !important;
        color: #111 !important;
        border: 2px solid #333 !important;
    }
}
