/* The Planner (A4). Colors and fonts come from style.css; rows from tasks.css. */
.planner-page main { max-width: 1040px; }

.day-nav { display: flex; align-items: center; gap: 4px; margin-top: 14px; }
.day-nav .day-title { margin: 0; font: 600 22px/1.2 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); }
.day-words { margin: 4px 0 0; font-size: 17px; color: var(--soft); }
.day-words.over { color: var(--accent); font-weight: 600; }
.day-note { margin: 6px 0 0; font-size: 15px; color: var(--soft); }
.day-note.small { font-size: 13px; margin: 2px 10px 4px; }
.suggest { margin-top: 8px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 15px; }
.suggest p { margin: 0; }
.suggest-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }

.planner-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; margin-top: 18px; }
.tray { margin-top: 0 !important; align-self: start; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 4px; border-radius: 14px; }
.tray .hint { margin: 0 0 4px; }
.the-day { min-width: 0; }
@media (max-width: 760px), (pointer: coarse) {
  .planner-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tray { position: static; max-height: none; order: 2; }
}

/* Morning and Afternoon: a bold word over a hairline, with its free time. */
.planner-page .bin { margin-top: 18px; border-radius: 14px; padding: 4px; }
.bin h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.bin-facts { font: 400 14px/1.3 var(--sans); letter-spacing: 0; text-transform: none; color: var(--soft); }
.bin-facts.over, .block-left.over { color: var(--accent); font-weight: 600; }
.bin-empty { margin: 8px 10px; font-size: 15px; }
.drop { background: var(--accent-soft); outline: 2px dashed var(--accent); outline-offset: -2px; }
.task-row.dragging { opacity: .4; }
.task-row[draggable=true] { cursor: grab; }

/* A meeting: one quiet line, locked; the calendar owns it. */
.plan-event { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; color: var(--soft); text-decoration: none; font-size: 16px; border-left: 3px solid var(--line); margin: 4px 0; }
.plan-event:hover { color: var(--ink); }
.plan-time { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 14px; }
.plan-event-name { overflow-wrap: anywhere; color: var(--ink); }
.lock { font-size: 12px; }
.all-day { list-style: none; margin: 8px 0 0; padding: 0; }

/* A time block: a container of time, its tasks under it. */
.block { margin: 8px 0; padding: 2px 0 6px; border-left: 4px solid var(--accent); border-radius: 4px 12px 12px 4px; background: var(--card); }
.block.kind-shallow, .strip-bar.kind-shallow { border-color: #8a7b6c; }
.block.kind-routine, .strip-bar.kind-routine { border-color: var(--goal); }
.block.kind-batch, .strip-bar.kind-batch { border-color: #b88a2e; }
.block.kind-buffer, .strip-bar.kind-buffer { border-color: var(--line); }
.block-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%;
  border: 0; background: none; padding: 8px 10px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; min-height: 44px;
}
.block-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.block-name { font-weight: 600; }
.block-left { font-size: 14px; color: var(--soft); margin-left: auto; }
.empty.small { font-size: 14px; margin: 0 10px; }

/* The strip: six in the morning to ten at night, and now. */
.strip { position: relative; height: 34px; margin: 4px 0 0; border-bottom: 1px solid var(--line); }
.strip-hour { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 11px; color: var(--soft); }
.strip-bar { position: absolute; top: 4px; height: 12px; border-radius: 4px; background: var(--span); border-left: 3px solid var(--accent); min-width: 3px; }
.strip-bar.is-event { background: var(--line); border-left-color: var(--soft); }
.strip-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); }

/* Plan it: one choice per line. */
.plan-choices { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.choice { text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; min-height: 44px; }
.choice:hover, .choice:focus-visible { border-color: var(--accent); outline: none; }
.choice.current { color: var(--soft); }

/* The boxes (as the calendar's). */
.event-box { border: 0; border-radius: 16px; padding: 20px; width: min(440px, calc(100vw - 32px)); background: var(--bg); color: var(--ink); }
.event-box::backdrop { background: rgba(0, 0, 0, .35); }
.event-box h2 { margin: 0 0 12px; font: 600 22px/1.2 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); }
.event-box .hint { margin: -6px 0 12px; }
.event-box label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 14px; color: var(--soft); min-width: 0; }
.event-box input, .event-box select {
  font: inherit; font-size: 17px; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0;
}
.times { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.box-actions { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; }
.danger { color: #b3261e !important; }
.box-error { color: #b3261e; font-size: 15px; margin: 0 0 8px; }
@media (prefers-color-scheme: dark) { .danger, .box-error { color: #ff8a80 !important; } }
.only-phone { display: none; }
@media (pointer: coarse) { .only-phone { display: inline; } }

/* Her plan (A6): finish first, then the top three, each naming its goal. */
.picks { margin: 4px 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--card); box-shadow: 0 1px 0 var(--line); }
.picks h2 { margin: 0 0 8px; }
.pick-slot, .pick-three li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 0; }
.pick-three { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.pick-three li { counter-increment: n; }
.pick-three li::before { content: counter(n); font: 700 15px/1 var(--serif); color: var(--accent); min-width: 1.2em; }
.pick-label { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.pick-name { font: 600 18px/1.3 var(--serif); overflow-wrap: anywhere; }
.pick-name.done { color: var(--soft); text-decoration: line-through; }
.pick-empty { color: var(--soft); font-size: 15px; }
.serves { flex: 1 1 220px; min-width: 0; display: flex; align-items: baseline; gap: 6px; font-size: 14px; color: var(--soft); }
.serves input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--goal); background: transparent; border: 0; border-bottom: 1px dashed var(--line); padding: 2px 0; }
.serves input:focus { outline: none; border-bottom-color: var(--accent); }
.week-goals-line { margin-top: 8px; font-size: 14px; color: var(--soft); }
.week-goals-line b { color: var(--ink); font-weight: 600; }
.task-pick { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.star { border: 0; background: none; font-size: 18px; line-height: 1; color: var(--line); cursor: pointer; padding: 6px; min-width: 32px; min-height: 32px; }
.star.on { color: #c9962b; }
.star:focus-visible { outline: 2px solid var(--accent); border-radius: 6px; }

/* The assistant's cards on the board (A6): each applied or dismissed by her. */
.plan-cards { margin-top: 12px; }
.plan-card { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 14px; margin: 6px 0; border-radius: 12px; background: var(--accent-soft); font-size: 15px; }
.plan-card p { margin: 0; flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.plan-card.applied { background: var(--card); color: var(--soft); }

/* The week (A6): a column per day, Sunday to Saturday. */
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.week-day { background: var(--card); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.week-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.week-day-head { display: block; width: 100%; border: 0; background: none; padding: 0; text-align: left; font: 600 15px/1.3 var(--sans); color: var(--ink); cursor: pointer; }
.week-load { font-size: 13px; color: var(--soft); margin: 2px 0 6px; }
.week-load.over { color: var(--accent); font-weight: 600; }
.week-goal { font-size: 13px; color: var(--goal); margin: 0 0 6px; overflow-wrap: anywhere; }
.week-goal.none { color: var(--soft); }
.week-tasks { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.week-tasks li { padding: 3px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.week-tasks li.done { color: var(--soft); text-decoration: line-through; }
@media (max-width: 760px) {
  .week-days { grid-template-columns: minmax(0, 1fr); }
}

/* Plan the day or the week: a slim panel over the board, never hiding it. */
.flow { position: fixed; right: 16px; top: 16px; bottom: 16px; width: min(340px, calc(100vw - 32px)); overflow-y: auto; z-index: 20; padding: 14px 16px; border-radius: 16px; background: var(--bg); box-shadow: 0 10px 40px rgba(0, 0, 0, .18), 0 0 0 1px var(--line); }
.flow-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.flow-head h2 { margin: 0; font: 600 20px/1.2 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); }
.flow-steps { list-style: none; margin: 12px 0 0; padding: 0; }
.flow-steps > li { padding: 10px 0; border-top: 1px solid var(--line); }
.flow-step-title { display: flex; gap: 8px; align-items: baseline; font-weight: 600; }
.flow-mark { width: 1.2em; color: var(--soft); flex: 0 0 auto; }
.flow-steps .is-done .flow-step-title, .flow-steps .is-skipped .flow-step-title { color: var(--soft); font-weight: 400; }
.flow-steps .is-skipped .flow-step-title span:last-child { text-decoration: line-through; }
.flow-end { margin: 6px 0; font-size: 14px; color: var(--soft); }
.flow-body { font-size: 15px; }
.flow-body p { margin: 6px 0; }
.flow-body ul { margin: 6px 0; padding-left: 18px; }
.flow-actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.flow-over { color: var(--accent); font-weight: 600; }
@media (max-width: 760px) {
  .flow { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 45vh; }
  /* The board scrolls clear of the panel. */
  .planner-page.flow-open main { padding-bottom: 48vh; }
}

/* The head's buttons wrap on a phone rather than widen the page. */
.planner-page .tasks-head { flex-wrap: wrap; row-gap: 6px; }
