.day-plan-page { margin: 0 auto; }
.day-plan-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--paper); }
.day-plan-form { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 16px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.day-plan-form:focus-within { border-color: var(--focus); }
.day-plan-form input { flex: 1; min-width: 0; height: 44px; padding: 0; border: 0; outline: 0; background: transparent; font-size: var(--text-16); }
.day-plan-form input::placeholder { color: var(--muted); }
.day-plan-form button { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: var(--radius-m); color: var(--accent); background: transparent; }
.day-plan-keep-option { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 7px; color: var(--muted); line-height: 1.4; cursor: pointer; font-size: var(--text-13); }
.day-plan-keep-option input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--accent); }
.day-plan-edit-keep { margin-top: 16px; }
.day-plan-transfer { min-height: 0; margin-top: 16px; }
.day-plan-transfer:empty { display: none; }
.day-plan-transfer button { min-height: 44px; padding: 8px 2px; border: 0; background: transparent; color: var(--accent); font-size: var(--text-14); font-weight: 600; }
.day-plan-transfer button span { font-weight: 400; color: var(--muted); }
#modal[data-view="day-plan-carry"] .modal-body { padding-top: 12px; padding-bottom: 12px; }
#modal[data-view="day-plan-carry"] .modal-actions { position: sticky; bottom: 0; padding-top: 16px; background: var(--paper); border-top: 1px solid var(--line); }
#modal[data-view="day-plan-carry"] .modal-actions .button { min-height: 44px; }
.day-plan-carry-group { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.day-plan-carry-group:last-child { margin-bottom: 0; }
.day-plan-carry-group legend { padding: 8px 0; color: var(--muted); font-size: var(--text-13); font-weight: 600; }
.day-plan-carry-task { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 8px 0; cursor: pointer; }
.day-plan-carry-task input { flex: 0 0 22px; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.day-plan-carry-task span { min-width: 0; font-size: var(--text-16); line-height: 1.5; overflow-wrap: anywhere; }
.day-plan-list { list-style: none; padding: 0; margin: 20px 0 0; margin-top: 12px; }
.day-plan-task { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); min-height: 60px; }
.day-plan-check, .day-plan-edit, .day-plan-delete { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-m); background: transparent; }
.day-plan-check span { display: grid; place-items: center; width: 23px; height: 23px; border: 1.5px solid var(--subtle); border-radius: 50%; }
.day-plan-check svg { width: 15px; height: 15px; stroke-width: 2; }
.day-plan-content { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 4px; min-width: 0; min-height: 44px; }
.day-plan-copy { display: block; min-width: 0; }
.day-plan-text { display: block; max-width: 100%; min-width: 0; overflow-wrap: anywhere; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y; font-size: var(--text-15); line-height: 1.5; }
.day-plan-keep-indicator { display: block; margin-top: 2px; color: var(--accent); font-size: var(--text-11); line-height: 1.4; }
.day-plan-text:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-s); }
.day-plan-list.is-reordering { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.day-plan-task.is-dragging { background: var(--surface); outline: 1px dashed var(--line); outline-offset: -1px; }
.day-plan-task.is-dragging > * { opacity: .2; }
.day-plan-drag-preview { position: fixed; z-index: 20; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; min-height: 64px; padding: 8px 0; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); box-shadow: 0 8px 24px #17213b20; pointer-events: none; overflow: hidden; }
.day-plan-drag-preview .day-plan-text { cursor: grabbing; }
.day-plan-drag-preview.is-done .day-plan-check span { color: white; background: var(--success); border-color: var(--success); }
.day-plan-drag-preview.is-done .day-plan-text { color: var(--muted); text-decoration: line-through; }
.day-plan-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.day-plan-pencil { width: 14px; height: 14px; justify-self: center; color: var(--subtle); }
#day-plan-edit-text { font-size: var(--text-16); }
.day-plan-delete { color: var(--subtle); }
.day-plan-delete svg { width: 16px; height: 16px; }
.day-plan-task.is-done .day-plan-check span { color: white; background: var(--success); border-color: var(--success); }
.day-plan-task.is-done .day-plan-text { color: var(--muted); text-decoration: line-through; }
@media (hover: hover) {
  .day-plan-edit:hover .day-plan-pencil { color: var(--accent); }
  .day-plan-check:hover span { border-color: var(--success); }
  .day-plan-delete:hover { color: var(--danger); background: var(--surface); }
  .day-plan-form button:hover { background: var(--tint); }
  .day-plan-transfer button:hover { color: var(--hover); }
}
@media (max-width: 650px) {
  .day-plan-heading { margin-bottom: 24px; }
  .day-plan-heading h1 { font-size: var(--text-28); }
  .day-plan-task { gap: 4px; }
  .day-plan-drag-preview { gap: 4px; }
}

@media (max-width: 700px), (max-width: 1200px) and (max-height: 600px) {
  #modal.modal-page:is([data-view="day-plan-carry"], [data-view="day-plan-edit"]) #modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  #modal.modal-page:is([data-view="day-plan-carry"], [data-view="day-plan-edit"]) form > .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
  #modal.modal-page:is([data-view="day-plan-carry"], [data-view="day-plan-edit"]) .modal-actions {
    position: static;
  }
}
