.planner-main {
    padding-block: clamp(37px, 5.5vw, 72px) clamp(58px, 8vw, 98px);
}

.planner-main [hidden] { display: none !important; }
.planner-heading { margin-bottom: clamp(26px, 4vw, 43px); }
.planner-heading > p { max-width: 51ch; }
.planner-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.58fr); align-items: start; gap: clamp(15px, 2.4vw, 28px); }
.planner-sidebar { min-width: 0; display: grid; gap: 15px; }
.planner-panel { padding: clamp(19px, 2.8vw, 32px); }
.planner-panel h2 { font-size: clamp(21px, 2.7vw, 28px); }
.planner-notice { padding: 12px 16px; margin-bottom: 15px; border: 1px solid #e2c994; border-radius: 12px; color: #684b18; background: #fff7e5; font-size: 14px; line-height: 1.5; }

.task-form { display: grid; gap: 13px; margin-top: 17px; }
.task-form-row { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 10px; }
.task-form .button { width: 100%; }
.planner-setting { display: grid; gap: 6px; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.planner-setting label { color: #313e57; font-size: 14px; font-weight: 640; }
.planner-setting select {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 7px 11px;
    border: 1px solid #aeb9d0;
    border-radius: 11px;
    background: #f8faff;
    color: var(--ink);
    font: inherit;
}
.planner-panel-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 15px; }
.planner-panel-heading > span, .planner-panel-heading > p, #task-empty { color: var(--muted); font-size: 14px; }
#task-empty { margin: 12px 0 0; }
.example-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.example-button:disabled { opacity: .6; cursor: default; }
.task-list, .week-list, .day-slots, .unplanned ul { list-style: none; margin: 0; padding: 0; }
.task-list:not(:empty) { margin-top: 9px; }
.task-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; padding-block: 4px; border-bottom: 1px solid var(--line); }
.task-item:last-child { border: 0; }
.task-check { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 9px; min-height: 52px; cursor: pointer; }
.task-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.task-description { display: grid; gap: 3px; min-width: 0; }
.task-name { font-size: 14px; font-weight: 680; overflow-wrap: anywhere; }
.task-done .task-name { color: var(--muted); text-decoration: line-through; }
.task-meta { color: var(--muted); font-size: 12px; line-height: 1.4; }
.task-remove { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid transparent; border-radius: 50%; background: transparent; color: #405374; font-size: 25px; line-height: 1; cursor: pointer; }
.task-remove:hover { border-color: #cbd4e7; background: #edf2fc; }
.planner-status { color: #374877; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.planner-status:not(:empty) { margin-top: 10px; }

.week-panel { background: #fbfcff; }
.plan-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 15px 0 12px; }
.plan-stats > div { display: flex; flex-direction: column-reverse; gap: 3px; padding: 12px 14px; border: 1px solid #dfe6f7; border-radius: 14px; background: #eef2ff; }
.plan-stats dt { color: #4c5c83; font-size: 12px; font-weight: 600; }
.plan-stats dd { color: #253a82; font-size: clamp(18px, 2.8vw, 27px); font-weight: 735; line-height: 1.2; letter-spacing: -.045em; }
.week-list { display: grid; gap: 6px; }
.week-day { display: grid; grid-template-columns: minmax(64px, .44fr) minmax(0, 1.82fr) minmax(84px, .65fr); gap: 10px; align-items: center; min-height: 64px; padding: 8px 10px; border: 1px solid #e1e6f0; border-radius: 12px; background: #fff; }
.current-day { border-color: #aebaee; }
.week-date { display: grid; align-content: center; gap: 2px; color: #263857; font-size: 14px; line-height: 1.25; }
.week-date span { color: var(--muted); font-size: 12px; }
.current-day .week-date strong { color: var(--blue-dark); }
.week-empty { color: var(--muted); font-size: 13px; }
.day-slots { display: grid; gap: 4px; }
.day-slot { display: flex; align-items: baseline; justify-content: space-between; gap: 3px 8px; flex-wrap: wrap; padding: 5px 7px; border-radius: 6px; background: #eef1ff; color: #293e7d; font-size: 12px; line-height: 1.3; }
.slot-name { min-width: 0; overflow-wrap: anywhere; }
.day-slot strong { font-weight: 680; }
.week-capacity { display: grid; justify-items: end; gap: 2px; color: var(--muted); text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.week-capacity meter { width: min(100%, 105px); height: 12px; }
.week-capacity meter::-webkit-meter-bar { background: #e2e8f5; border: 0; border-radius: 99px; }
.week-capacity meter::-webkit-meter-optimum-value { background: #4e68e0; border-radius: 99px; }
.week-capacity meter::-moz-meter-bar { background: #4e68e0; border-radius: 99px; }
.unplanned { margin-top: 15px; padding: 12px 14px; border: 1px solid #ead5a7; border-radius: 13px; background: #fff7e6; color: #634717; }
.unplanned h3 { margin-bottom: 5px; font-size: 15px; letter-spacing: -.02em; }
.unplanned-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding-block: 6px; font-size: 13px; overflow-wrap: anywhere; }
.unplanned-item + .unplanned-item { border-top: 1px solid #ead5a7; }

@media (max-width: 860px) {
    .planner-layout { grid-template-columns: minmax(0, 1fr); }
    .planner-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

@media (max-width: 550px) {
    .planner-sidebar { grid-template-columns: minmax(0, 1fr); }
    .planner-layout { gap: 15px; }
    .week-day { grid-template-columns: minmax(54px, .45fr) minmax(0, 1.55fr); gap: 4px 8px; }
    .week-capacity { grid-column: 2; grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-items: start; gap: 5px; }
}

@media (max-width: 360px) {
    .task-form-row { grid-template-columns: minmax(0, 1fr); }
}
