.rt-page {
    --rt-primary: #3d837e;
    --rt-secondary: #8499aa;
    --rt-paper: #fffdf8;
    --rt-paper-alt: #f3f5f1;
    --rt-ink: #39413f;
    --rt-muted: #85908c;
    --rt-line: #dfe6e1;
    --rt-holiday: #72ad65;
    --rt-workday: #d95d45;
    --rt-weekend: #e2b543;
}

.rt-page {
    --print-paper-width: 210mm;
    --print-paper-height: 297mm;
    --print-content-width: 196mm;
    --print-content-height: 283mm;
    --print-month-day-height: 35mm;
}

.rt-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 22px auto 14px;
}

.rt-nav a {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 16px;
    font-size: 13.5px;
    color: var(--rl-text-2, #555);
    text-decoration: none;
    background: var(--rl-card, #fff);
    border: 1px solid var(--rl-line, #e3e3e3);
    border-radius: 999px;
    transition: color .18s, background .18s, border-color .18s;
}

.rt-nav a:hover {
    color: var(--rl-red-d, #9b382f);
    border-color: var(--rl-red-b, #d9a6a2);
    background: var(--rl-red-l, #fdf1f0);
}

.rt-nav a.is-active {
    color: #fff;
    background: var(--rl-red, #c0392b);
    border-color: var(--rl-red, #c0392b);
    font-weight: 700;
}

.rt-toolbar {
    padding: 20px 22px 16px;
    background: var(--rl-card, #fff);
    border: 1px solid var(--rl-line, #e3e3e3);
    border-radius: 8px;
    box-shadow: 0 6px 22px -18px rgba(16, 24, 40, .45);
}

.rt-intro { text-align: center; }

.rt-intro > span {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 700;
    color: var(--rt-secondary);
}

.rt-intro h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.25;
    color: var(--rt-primary);
    font-weight: 800;
}

.rt-intro p {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--rl-text-3, #888);
}

.rt-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.rt-period,
.rt-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rt-period select,
.rt-edge,
.rt-btn {
    height: 34px;
    box-sizing: border-box;
    font-size: 13px;
    line-height: 1;
    border-radius: 6px;
    border: 1px solid var(--rt-line);
    color: var(--rt-ink);
    background: var(--rt-paper);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: filter .18s, background .18s, border-color .18s, color .18s;
}

.rt-period select { padding: 0 8px; min-width: 92px; }
.rt-period select[data-month-select] { min-width: 78px; }
.rt-period select[data-day-select] { min-width: 72px; }

.rt-edge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 0 10px;
    color: var(--rt-muted);
}

.rt-edge:hover { color: var(--rt-primary); border-color: var(--rt-primary); }

.rt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    color: #fff;
    border-color: transparent;
    font-weight: 700;
}

.rt-btn-warm { background: #d95d45; }
.rt-btn-green { background: #4a9d5b; }
.rt-btn-blue { background: #3d7fbe; }

.rt-btn-dark { background: var(--rt-secondary); }
.rt-btn-outline {
    color: var(--rt-primary);
    border-color: var(--rt-primary);
    background: var(--rt-paper);
}
.rt-btn-outline.is-active { color: #fff; background: var(--rt-primary); }
.rt-btn-ghost {
    color: var(--rt-muted);
    border-color: var(--rt-line);
    background: transparent;
}
.rt-btn:hover { filter: brightness(1.08); }

.rt-week-print-settings[hidden] { display: none !important; }
.rt-week-print-settings {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid var(--rt-line);
    border-radius: 7px;
    background: var(--rt-paper-alt, #f7f3ec);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}
.rt-week-print-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.rt-week-print-head b { display: block; color: var(--rt-primary); font-size: 15px; }
.rt-week-print-head span { display: block; margin-top: 3px; color: var(--rt-muted); font-size: 12px; }
.rt-week-print-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px 16px;
}
.rt-week-print-grid label {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--rt-muted);
    font-size: 12px;
    font-weight: 700;

    white-space: nowrap;
}
.rt-week-print-grid label.rt-week-print-wide { white-space: normal; }
.rt-week-print-grid input,
.rt-week-print-grid textarea {
    width: 100%;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid #dce5e0;
    border-radius: 4px;
    color: var(--rt-ink);
    background: var(--rt-paper);
}
.rt-week-print-grid textarea { resize: vertical; line-height: 1.5; }
.rt-week-print-wide { grid-column: 1 / -1; align-items: flex-start !important; }
.rt-week-print-wide textarea { min-height: 86px; }

.rt-template-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--rt-paper-alt);
    border: 1px solid var(--rt-line);
    border-radius: 8px;
}

.rt-template-strip label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    cursor: pointer;
}

.rt-template-strip label > span { display: block; line-height: 1.35; }
.rt-template-strip b { display: block; font-size: 13.5px; color: var(--rt-primary); }
.rt-template-strip small { display: block; font-size: 11.5px; color: var(--rt-muted); }

.rt-template-strip select {
    height: 34px;
    min-width: 190px;
    padding: 0 8px;
    font-size: 13px;
    color: var(--rt-ink);
    background: var(--rt-paper);
    border: 1px solid var(--rt-line);
    border-radius: 6px;
    cursor: pointer;
}

.rt-swatches { display: flex; gap: 6px; }

.rt-swatches i {
    display: block;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .9);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

.rt-swatches i:nth-child(1) { background: var(--rt-primary); }
.rt-swatches i:nth-child(2) { background: var(--rt-secondary); }
.rt-swatches i:nth-child(3) { background: var(--rt-holiday); }
.rt-swatches i:nth-child(4) { background: var(--rt-workday); }
.rt-swatches i:nth-child(5) { background: var(--rt-weekend); }

.rt-strip-plans {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.rt-strip-plans label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12.5px;
    color: var(--rt-muted);
}

.rt-strip-plans select {
    height: 32px;
    min-width: 156px;
    padding: 0 8px;
    font-size: 12.5px;
    color: var(--rt-ink);
    background: var(--rt-paper);
    border: 1px solid var(--rt-line);
    border-radius: 6px;
    cursor: pointer;
}

.rt-settings { margin-top: 14px; }

.rt-settings fieldset {
    margin: 0 0 10px;
    padding: 12px 14px 13px;
    border: 1px solid var(--rt-line);
    border-radius: 8px;
    background: var(--rt-paper);
}

.rt-settings legend {
    padding: 0 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--rt-primary);
}

.rt-settings fieldset {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.rt-settings legend { float: none; width: auto; margin-bottom: -4px; }

.rt-settings label,
.rt-checks label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--rt-ink);
    cursor: pointer;
    white-space: nowrap;
}

.rt-settings input[type="radio"],
.rt-settings input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--rt-primary);
    cursor: pointer;
}

.rt-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 16px;
    padding: 12px 14px 13px;
    background: var(--rt-paper);
    border: 1px solid var(--rt-line);
    border-radius: 8px;
}

.rt-form-grid > label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12.5px;
    color: var(--rt-muted);
    white-space: nowrap;
}

.rt-form-grid input,
.rt-form-grid select {
    flex: 1 1 auto;
    min-width: 0;
    height: 30px;
    padding: 0 8px;
    font-size: 12.5px;
    color: var(--rt-ink);
    background: #fff;
    border: 1px solid var(--rt-line);
    border-radius: 5px;
    box-sizing: border-box;
}

.rt-form-grid input[type="color"] {
    flex: 0 0 46px;
    width: 46px;
    min-width: 46px;
    height: 26px;
    padding: 1px 2px;
    cursor: pointer;
}

.rt-form-grid input[type="file"] {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 30px;
    font-size: 11.5px;
    cursor: pointer;
}

.rt-checks { margin-bottom: 0 !important; }

.rt-preview { margin-top: 20px; }

.rt-sheet {
    position: relative;
    padding: 22px 24px;
    background: var(--rt-paper);
    border: 1px solid var(--rt-line);
    border-radius: 8px;
    box-shadow: 0 10px 30px -22px rgba(16, 24, 40, .5);
    overflow: hidden;

    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.rt-sheet-title { margin-bottom: 16px; text-align: center; }

.rt-sheet-title h1 {
    margin: 0;

    font-size: 28px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--rt-primary);
}

.rt-sheet-title p {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--rt-muted);
}

.rt-sheet-footer {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 14px;
    padding-top: 8px;
    font-size: 11px;
    color: var(--rt-muted);
    border-top: 1px solid var(--rt-line);
}
.rt-sheet-footer strong { color: var(--rt-muted); font-weight: 700; }

.rt-cover { position: relative; overflow: hidden; border-radius: 6px; }
.rt-cover img { display: block; width: 100%; height: auto; }
.rt-cover-title { position: absolute; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); cursor: move; }
.rt-cover-subtitle { position: absolute; color: rgba(255, 255, 255, .92); text-shadow: 0 2px 8px rgba(0, 0, 0, .5); cursor: move; }
.layout-none .rt-cover { display: none; }
.has-cover.layout-top .rt-cover,
.has-cover.layout-bottom .rt-cover { margin: 16px 0; height: 260px; }
.has-cover.layout-top .rt-cover { margin-bottom: 16px; }
.has-cover.layout-bottom .rt-cover { margin-top: 16px; }
.has-cover.layout-left,
.has-cover.layout-right { display: flex; align-items: flex-start; gap: 18px; }
.has-cover.layout-left .rt-cover,
.has-cover.layout-right .rt-cover { flex: 0 0 320px; }

.rt-month-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.rt-month-card {
    padding: 13px 12px;
    background: var(--rt-paper);
    border: 1px solid var(--rt-line);
    border-radius: 7px;
    break-inside: avoid;
}

.rt-month-card h2 {
    margin: 0 0 7px;
    font-size: 19px;
    text-align: center;
    color: var(--rt-primary);
    font-weight: 700;
}

.rt-weekday-row,
.rt-day-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.rt-weekday-row span {
    padding: 3px 0;
    font-size: 12px;
    text-align: center;
    color: var(--rt-secondary);

    border-bottom: 2px solid var(--rt-primary);

    min-width: 0;
}

.rt-day-cell {
    min-height: 50px;
    min-width: 0;
    padding: 5px 3px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
}

.rt-day-cell strong { display: block; font-size: 14px; line-height: 18px; color: var(--rt-ink); }
.rt-day-cell small {
    display: block;

    font-size: 10px;
    line-height: 14px;
    color: var(--rt-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rt-day-cell.adjacent { opacity: .32; }
.rt-day-cell.weekend strong { color: var(--rt-weekend); }
.rt-day-cell.holiday strong,
.rt-day-cell.holiday small { color: var(--rt-holiday); }
.rt-day-cell.workday strong,
.rt-day-cell.workday small { color: var(--rt-workday); }
.rt-day-cell.today { border-color: var(--rt-primary); background: rgba(61, 131, 126, .07); }
.rt-day-cell.has-festival small { color: var(--rt-workday); font-weight: 700; }
.rt-day-cell i { display: block; width: 5px; height: 5px; margin: 2px auto 0; border-radius: 50%; }
.rt-day-cell i.rest { background: var(--rt-holiday); }
.rt-day-cell i.work { background: var(--rt-workday); }

.style-border .rt-month-card { border: 2px solid var(--rt-primary); }
.style-double .rt-month-card h2 { border-bottom: 3px double var(--rt-primary); padding-bottom: 5px; }
.style-bold .rt-day-cell strong { font-size: 16px; font-weight: 800; }
.style-thin .rt-month-card { border-color: transparent; background: transparent; }
.style-thin .rt-day-cell { min-height: 46px; border: 0; }
.style-thin .rt-weekday-row span { border-bottom-color: var(--rt-secondary); }

.rt-month-sheet .rt-day-cell { min-height: 82px; padding: 6px 4px; }
.rt-month-sheet .rt-day-cell strong { font-size: 18px; }
.rt-month-sheet .rt-day-cell small { font-size: 12px; }
.rt-month-sheet .rt-month-card { padding: 14px 14px 15px; }
.rt-month-sheet .rt-month-card h2 { font-size: 19px; margin-bottom: 10px; }

.rt-planner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.rt-planner-period { line-height: 1.35; }
.rt-planner-period small { display: block; font-size: 12px; color: var(--rt-muted); }
.rt-planner-period strong { display: block; font-size: 21px; color: var(--rt-primary); font-weight: 800; }
.rt-planner-period b { display: block; margin-top: 2px; font-size: 15px; color: var(--rt-ink); font-weight: 700; }
.rt-planner-period span { display: block; font-size: 12.5px; color: var(--rt-muted); }

.rt-planner-focus { text-align: right; line-height: 1.4; }
.rt-planner-focus small { display: block; font-size: 11.5px; color: var(--rt-muted); }
.rt-planner-focus strong { display: block; font-size: 15px; color: var(--rt-workday); }

.rt-mini-month { flex: 0 0 168px; }
.rt-mini-month > b { display: block; margin-bottom: 4px; font-size: 12.5px; color: var(--rt-primary); text-align: center; }
.rt-mini-weekdays,
.rt-mini-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.rt-mini-weekdays span { padding: 2px 0; font-size: 10px; text-align: center; color: var(--rt-muted); }
.rt-mini-days span {
    padding: 2px 0;
    font-size: 10.5px;
    text-align: center;
    color: var(--rt-ink);
    border-radius: 50%;
}
.rt-mini-days .is-adjacent { color: #c8c8c8; }
.rt-mini-days .is-weekend { color: var(--rt-weekend); }
.rt-mini-days .is-selected { background: var(--rt-primary); color: #fff; font-weight: 700; }

.rt-writing-lines { padding: 4px 0 0; }
.rt-writing-lines i {
    display: block;
    height: 22px;
    border-bottom: 1px dashed var(--rt-line);
}
.rt-writing-lines i:last-child { border-bottom: 0; }

.rt-panel {
    padding: 10px 12px 11px;
    background: var(--rt-paper);
    border: 1px solid var(--rt-line);
    border-radius: 7px;
    break-inside: avoid;
}
.rt-panel h2 { margin: 0 0 6px; font-size: 13px; color: var(--rt-primary); font-weight: 700; }
.rt-panel.is-wide { grid-column: 1 / -1; }
.rt-panel.is-focus { border-color: var(--rt-primary); background: rgba(61, 131, 126, .05); }
.rt-panel.is-focus h2 { color: var(--rt-workday); }
.rt-panel.is-large .rt-writing-lines i { height: 30px; }

.rt-check { padding: 10px 12px 11px; border: 1px solid var(--rt-line); border-radius: 7px; background: var(--rt-paper); }
.rt-check h2 { margin: 0 0 7px; font-size: 13px; color: var(--rt-primary); font-weight: 700; }
.rt-check-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; }
.rt-check-grid div { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--rt-ink); }
.rt-check-grid i { display: block; width: 11px; height: 11px; border: 1px solid var(--rt-muted); border-radius: 2px; flex: 0 0 auto; }
.rt-check-grid em { font-style: normal; color: var(--rt-muted); }

.rt-week-rows { border: 1px solid var(--rt-line); border-radius: 7px; overflow: hidden; background: var(--rt-paper); }
.rt-week-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--rt-line); }
.rt-week-row:last-child { border-bottom: 0; }
.rt-week-day {
    flex: 0 0 108px;
    padding: 9px 10px;
    text-align: center;
    background: var(--rt-paper-alt);
    border-right: 1px solid var(--rt-line);
    line-height: 1.3;
}
.rt-week-day small { display: block; font-size: 11px; color: var(--rt-muted); }
.rt-week-day strong { display: block; font-size: 22px; color: var(--rt-ink); font-weight: 800; }
.rt-week-day span { display: block; margin-top: 1px; font-size: 11px; color: var(--rt-muted); }
.rt-week-row.is-weekend .rt-week-day { background: rgba(226, 181, 67, .12); }
.rt-week-row.is-weekend .rt-week-day strong { color: var(--rt-weekend); }
.rt-week-row.is-holiday .rt-week-day { background: rgba(114, 173, 101, .14); }
.rt-week-row.is-holiday .rt-week-day strong { color: var(--rt-holiday); }
.rt-week-row.is-workday .rt-week-day strong { color: var(--rt-workday); }
.rt-week-row > .rt-writing-lines { flex: 1 1 auto; padding: 0 10px; }
.rt-week-row > .rt-writing-lines i { height: 34px; }

.rt-week-memo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 9px 12px;
    background: var(--rt-paper);
    border: 1px solid var(--rt-line);
    border-radius: 7px;
}
.rt-week-memo b { font-size: 13px; color: var(--rt-primary); flex: 0 0 auto; }
.rt-week-memo span { flex: 1 1 0; height: 22px; border-bottom: 1px dashed var(--rt-line); }

.rt-week-agenda,
.rt-week-family,
.rt-week-study,
.rt-week-fitness,
.rt-week-work,
.rt-week-budget,
.rt-week-pet,
.rt-week-health,
.rt-week-store,
.rt-week-move,
.rt-week-finance,
.rt-week-care,
.rt-week-meal,
.rt-week-selfcare,
.rt-week-teaching,
.rt-week-parenting,
.rt-week-focus,
.rt-week-sprint,
.rt-week-content,
.rt-week-sales,
.rt-week-travel,
.rt-week-event,
.rt-week-retro,
.rt-week-exam,
.rt-week-job,
.rt-week-practice,
.rt-week-habit,
.rt-week-kanban,
.rt-week-compact {
    display: grid;
    gap: 10px;
}

.rt-week-agenda .rt-agenda-row,
.rt-week-fitness .rt-fitness-row,
.rt-week-family .rt-family-card,
.rt-week-care .rt-care-row {
    display: grid;
    grid-template-columns: 108px 1fr 1fr 1fr;
    gap: 10px;
    align-items: stretch;
}
.rt-agenda-row:last-child,
.rt-fitness-row:last-child,
.rt-care-row:last-child { border-bottom: 0; }

.rt-week-family .rt-family-card { grid-template-columns: 108px 1fr 1fr; }

.rt-study-day,
.rt-work-day,
.rt-compact-day,
.rt-meal-day,
.rt-focus-day,
.rt-selfcare-day,
.rt-pet-day,
.rt-health-day,
.rt-job-day,
.rt-teaching-day,
.rt-store-day,
.rt-practice-day,
.rt-parenting-day,
.rt-sprint-day,
.rt-content-day,
.rt-sales-day,
.rt-retro-day,
.rt-exam-day {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px 9px;
    border: 1px solid var(--rt-line);
    border-radius: 7px;
    background: var(--rt-paper);
}
.rt-study-day .rt-week-day,
.rt-work-day .rt-week-day,
.rt-compact-day .rt-week-day { background: transparent; border: 0; padding: 0 0 4px; border-bottom: 1px solid var(--rt-line); }
.rt-study-day .rt-week-day strong,
.rt-work-day .rt-week-day strong,
.rt-compact-day .rt-week-day strong { font-size: 17px; }

.rt-week-family,
.rt-week-parenting,
.rt-week-pet,
.rt-week-health,
.rt-week-store,
.rt-week-move,
.rt-week-finance,
.rt-week-care,
.rt-week-meal,
.rt-week-selfcare,
.rt-week-teaching,
.rt-week-focus,
.rt-week-sprint,
.rt-week-content,
.rt-week-sales,
.rt-week-travel,
.rt-week-event,
.rt-week-retro,
.rt-week-exam,
.rt-week-job,
.rt-week-practice,
.rt-week-habit,
.rt-work-days,
.rt-meal-days,
.rt-selfcare-days,
.rt-teaching-days,
.rt-pet-days,
.rt-health-days,
.rt-store-days,
.rt-sprint-days,
.rt-content-days,
.rt-sales-timeline,
.rt-retro-days,
.rt-exam-days,
.rt-job-days,
.rt-practice-days {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.rt-week-kanban { grid-template-columns: repeat(3, 1fr); }

.rt-habit-table {
    display: grid;
    grid-template-columns: 92px repeat(7, 1fr);
    gap: 0;
    border: 1px solid var(--rt-line);
    border-radius: 7px;
    overflow: hidden;
    background: var(--rt-paper);
}
.rt-habit-table > * { padding: 7px 4px; font-size: 12px; text-align: center; border-bottom: 1px solid var(--rt-line); border-right: 1px solid var(--rt-line); }
.rt-habit-table b { color: var(--rt-primary); text-align: left; padding-left: 10px; }
.rt-habit-table strong { color: var(--rt-ink); }
.rt-habit-table strong.is-weekend { color: var(--rt-weekend); }
.rt-habit-table span { display: block; width: 13px; height: 13px; margin: 2px auto 0; border: 1px solid var(--rt-muted); border-radius: 3px; }

.rt-week-budget,
.rt-week-compact { grid-template-columns: repeat(2, 1fr); }

.rt-month-plan-body,
.rt-month-plan-overview { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.rt-month-plan-body section.is-focus { border-color: var(--rt-primary); }

.rt-month-plan-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.rt-month-plan-day {
    position: relative;
    min-height: 62px;
    padding: 4px 5px 14px;
    background: var(--rt-paper);
    border: 1px solid var(--rt-line);
    border-radius: 5px;
    box-sizing: border-box;
}
.rt-month-plan-day strong { display: block; font-size: 14px; color: var(--rt-ink); line-height: 1.2; }
.rt-month-plan-day span { display: block; font-size: 10.5px; color: var(--rt-muted); line-height: 1.35; }
.rt-month-plan-day.is-adjacent { opacity: .34; }
.rt-month-plan-day.is-weekend strong { color: var(--rt-weekend); }
.rt-month-plan-day i { position: absolute; left: 5px; right: 5px; bottom: 4px; height: 8px; border-top: 1px dashed var(--rt-line); }

.rt-month-plan-tracker { grid-column: 1 / -1; display: grid; gap: 5px; }
.rt-month-plan-tracker div { display: flex; align-items: center; gap: 8px; }
.rt-month-plan-tracker b { flex: 0 0 76px; font-size: 12px; color: var(--rt-ink); }
.rt-month-plan-tracker i { flex: 1 1 auto; height: 16px; border: 1px solid var(--rt-line); border-radius: 3px; }

.rt-month-plan-weeks { display: grid; gap: 10px; }
.rt-month-plan-weeks h2 { margin: 0 0 6px; font-size: 14px; color: var(--rt-primary); }
.rt-month-plan-weeks > div { border: 1px solid var(--rt-line); border-radius: 7px; background: var(--rt-paper); padding: 9px 11px; }
.rt-month-plan-weeks header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.rt-month-plan-weeks header b { font-size: 14px; color: var(--rt-primary); }
.rt-month-plan-weeks header small { font-size: 12px; color: var(--rt-muted); }
.rt-month-plan-weeks header span { font-size: 12px; color: var(--rt-ink); }
.rt-month-plan-weeks > div > span { display: block; height: 22px; border-bottom: 1px dashed var(--rt-line); }

.rt-month-plan-daily { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.rt-month-plan-daily .rt-month-plan-day { min-height: 118px; }
.rt-month-plan-daily em { display: block; margin-top: 5px; font-style: normal; font-size: 11px; color: var(--rt-muted); }
.rt-month-plan-daily em b { display: inline-block; margin-right: 4px; color: var(--rt-ink); }

.rt-plan-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.rt-plan-tabs .rt-btn { font-weight: 400; }
.rt-plan-tabs .rt-btn-warm { color: #fff; }

.rt-month-plan-weeks > div > span { display: flex; align-items: center; gap: 8px; }
.rt-month-plan-weeks > div > span b { flex: 0 0 68px; font-size: 12px; color: var(--rt-muted); font-weight: 400; }
.rt-month-plan-weeks > div > span i { flex: 1 1 auto; height: 1px; border-bottom: 1px dashed var(--rt-line); }
.rt-month-plan-weeks > div > span.is-kanban { margin-top: 4px; }
.rt-month-plan-weeks > div > span.is-kanban b { color: var(--rt-primary); font-weight: 700; }
.rt-month-plan-weeks .rt-writing-lines { padding: 0; }
.rt-month-plan-weeks h2 { margin: 0 0 10px; font-size: 15px; color: var(--rt-primary); }

.rt-month-plan-daily em { display: flex; align-items: center; gap: 4px; }
.rt-month-plan-daily em b { flex: 0 0 auto; font-size: 10.5px; color: var(--rt-muted); font-weight: 400; }
.rt-month-plan-daily em i { flex: 1 1 auto; height: 1px; border-bottom: 1px dashed var(--rt-line); }
.rt-month-plan-daily .rt-month-plan-day > i { display: none; }
.rt-month-plan-calendar .rt-month-plan-days { grid-template-columns: repeat(7, 1fr); }
.rt-month-plan-month .rt-planner-header { margin-bottom: 12px; }
.rt-month-plan-holiday strong { color: var(--rt-holiday); }
.rt-month-plan-workday strong { color: var(--rt-workday); }

.rt-month-week-track-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid var(--rt-line);
    border-radius: 7px;
    background: var(--rt-paper);
}
.rt-month-week-track-row > b { flex: 0 0 78px; font-size: 12.5px; color: var(--rt-primary); align-self: center; }
.rt-month-week-track-row > span {
    flex: 1 1 0;
    min-width: 0;
    padding: 3px 5px;
    border: 1px solid var(--rt-line);
    border-radius: 4px;
    text-align: center;
}
.rt-month-week-track-row > span strong { display: block; font-size: 12px; color: var(--rt-ink); }
.rt-month-week-track-row > span small { display: block; font-size: 10.5px; color: var(--rt-muted); }
.rt-month-week-track-row > span i { display: block; height: 12px; margin-top: 2px; border-top: 1px dashed var(--rt-line); }

.rt-day-writing { display: grid; gap: 10px; }
.rt-day-plan { display: grid; gap: 10px; }
.rt-day-plan-classic { grid-template-columns: repeat(2, 1fr); }

.rt-day-plan-classic > .is-large { grid-column: 1 / -1; }
.rt-day-plan-grid,
.rt-day-plan-focus { grid-template-columns: repeat(3, 1fr); }
.rt-day-plan-timeline { grid-template-columns: 1fr; }
.rt-day-plan-timeline section { display: flex; align-items: center; gap: 12px; }
.rt-day-plan-timeline h2 { flex: 0 0 62px; }
.rt-day-plan-timeline .rt-writing-lines { flex: 1 1 auto; }
.rt-day-plan-split,
.rt-day-plan-check { grid-template-columns: 1fr 1fr; }
.rt-day-plan .is-focus { border-color: var(--rt-primary); background: rgba(61, 131, 126, .05); }
.rt-day-plan-focus .is-large { grid-column: 1 / -1; }
.rt-day-plan-focus .is-large .rt-writing-lines i { height: 30px; }

.rt-related {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px auto 0;
    padding: 12px 14px;
    background: var(--rl-card, #fff);
    border: 1px solid var(--rl-line, #e3e3e3);
    border-radius: 8px;
}

.rt-rel-years,
.rt-rel-months,
.rt-rel-planners {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;

    min-width: 0;
}

.rt-related > * { min-width: 0; }

.rt-related a {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 11px;
    font-size: 12.5px;
    text-decoration: none;
    color: var(--rl-text-2, #555);
    background: var(--rl-red-l, #fdf1f0);
    border-radius: 999px;
    transition: color .18s, background .18s;
}

.rt-related a:hover,
.rt-related a.is-current {
    color: #fff;
    background: var(--rl-red, #c0392b);
}

@media only screen and (max-width: 1200px) {
    .rt-shell.max-width { max-width: 100%; }
}

@media only screen and (max-width: 980px) {
    .rt-month-grid { grid-template-columns: repeat(2, 1fr); }
    .rt-form-grid { grid-template-columns: repeat(2, 1fr); }
    .rt-week-agenda .rt-agenda-row,
    .rt-week-fitness .rt-fitness-row,
    .rt-week-care .rt-care-row { grid-template-columns: 92px 1fr; }
    .rt-day-plan-grid,
    .rt-day-plan-focus { grid-template-columns: repeat(2, 1fr); }
    .rt-week-kanban { grid-template-columns: 1fr; }
    .has-cover.layout-left,
    .has-cover.layout-right { flex-direction: column; }
    .has-cover.layout-left .rt-cover,
    .has-cover.layout-right .rt-cover { flex: 1 1 auto; width: 100%; }
}

@media only screen and (max-width: 760px) {
    .rt-month-grid { grid-template-columns: 1fr; }
    .rt-form-grid { grid-template-columns: 1fr; }
    .rt-month-plan-body,
    .rt-month-plan-overview { grid-template-columns: 1fr; }
    .rt-day-plan-classic,
    .rt-day-plan-split,
    .rt-day-plan-check { grid-template-columns: 1fr; }
    .rt-day-plan-grid,
    .rt-day-plan-focus { grid-template-columns: 1fr; }
    .rt-week-family .rt-family-card { grid-template-columns: 1fr; }
    .rt-week-budget,
    .rt-week-compact { grid-template-columns: 1fr; }
    .rt-check-grid { grid-template-columns: repeat(2, 1fr); }
    .rt-intro h1 { font-size: 24px; }
    .rt-sheet-title h1 { font-size: 24px; }
    .rt-toolbar { padding: 15px 14px 13px; }
    .rt-day-cell { min-height: 44px; }
    .rt-month-sheet .rt-day-cell { min-height: 56px; }
    .rt-month-sheet .rt-day-cell strong { font-size: 15px; }
    .rt-month-sheet .rt-day-cell small { font-size: 10.5px; }
    .rt-week-day { flex: 0 0 84px; }
    .rt-week-day strong { font-size: 18px; }

    .rt-work-days,
    .rt-meal-days,
    .rt-selfcare-days,
    .rt-teaching-days,
    .rt-pet-days,
    .rt-health-days,
    .rt-store-days,
    .rt-sprint-days,
    .rt-content-days,
    .rt-sales-timeline,
    .rt-retro-days,
    .rt-exam-days,
    .rt-job-days,
    .rt-practice-days,
    .rt-month-plan-daily { grid-template-columns: repeat(2, 1fr); }
}

@media only screen and (max-width: 420px) {
    .rt-top { flex-direction: column; align-items: stretch; }
    .rt-actions { justify-content: space-between; }
    .rt-actions .rt-btn { flex: 1 1 0; padding: 0 8px; font-size: 12px; }
    .rt-period { justify-content: center; }
    .rt-template-strip { flex-direction: column; align-items: flex-start; }
    .rt-template-strip select { min-width: 0; width: 100%; }
    .rt-day-cell { min-height: 40px; padding: 2px; }
    .rt-day-cell strong { font-size: 12.5px; }
    .rt-day-cell small { font-size: 9.5px; }
    .rt-habit-table { grid-template-columns: 62px repeat(7, 1fr); }
    .rt-habit-table > * { padding: 5px 2px; font-size: 10.5px; }
}

@media print {

    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    .header,
    .footer,
    .main,
    .rt-nav,
    .rt-toolbar,
    .rt-related,
    .rld-bar,
    .rld-rel,
    .rld-years,
    .rl-kf,
    .rl-ding-wrap,
    .rl-ding,
    .rl-ding-pop,
    .rl-quick-btn,
    .rl-theme-btn,
    .rl-theme-mask,
    .rl-theme-pop,
    .rl-on,
    .rl-notify,
    .rl-notify-mask,

    #rlToast,
    .dh-box,
    .layui-layer,
    .layui-move,
    [class*="float"],
    [class*="Float"] {
        display: none !important;
    }

    html, body {
        background: #fff !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        overflow: visible !important;
    }

    .rt-shell.max-width,
    .rt-shell,
    .rt-preview,
    .rt-sheet {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
        border-radius: 0 !important;
    }

    .rt-sheet {
        width: 100% !important;
        min-height: var(--print-content-height, auto);
        display: flex;
        flex-direction: column;
    }

    .rt-sheet-body {
        gap: 6mm;
        flex: 1 1 auto;
        align-content: start;
    }

    .rt-mode-month .rt-sheet-body {
        display: flex;
        flex-direction: column;
    }

    .rt-mode-month .rt-month-card {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    .rt-mode-month .rt-month-card .rt-day-grid {
        flex: 1 1 auto;
        grid-auto-rows: 1fr;
    }

    .rt-mode-year .rt-month-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: minmax(0, 1fr);
        gap: 4mm;
        flex: 1 1 auto;
        min-height: 0;

        align-content: stretch;
    }

    .rt-sheet.rt-mode-year {
        height: var(--print-content-height, 281mm);
        min-height: 0;
        overflow: hidden;
    }

    .rt-mode-year .rt-sheet-body {
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-height: 0;
    }

    .rt-sheet-footer {
        flex: 0 0 auto;
        margin-top: 0;
    }

    .rt-mode-year .rt-month-card {
        padding: 6px 5px;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .rt-mode-year .rt-month-card h2 {
        font-size: 13px;
        margin: 0 0 3px;
    }

    .rt-mode-year .rt-weekday-row span {
        padding: 1px 0;
        font-size: 9px;
    }

    .rt-mode-year .rt-day-grid {
        flex: 1 1 auto;
        grid-auto-rows: minmax(0, 1fr);
    }

    .rt-mode-year .rt-day-cell {
        min-height: 0;
        padding: 1px 1px;
    }

    .rt-mode-year .rt-day-cell strong { font-size: 11px; line-height: 13px; }
    .rt-mode-year .rt-day-cell small { font-size: 7.5px; line-height: 10px; }

    .rt-mode-year.style-bold .rt-day-cell strong { font-size: 12px; }

    .rt-month-card,
    .rt-week-row,
    .rt-panel,
    .rt-day-writing section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    a[href]::after { content: ""; }
}
