#today-tab { display: none; padding: 28px 20px 64px; }
.day-shell { max-width: 1080px; width: 100%; margin: 0 auto; color: var(--text-main); }
.day-shell * { box-sizing: border-box; }
.day-shell [hidden] { display: none !important; }
.day-heading, .day-toolbar, .day-actions, .day-current-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.day-heading { justify-content: space-between; margin-bottom: 22px; }
.day-heading h1 { margin: 0 0 5px; font-size: 26px; }
.day-title-row { display: flex; align-items: center; gap: 14px; margin-bottom: 7px; }
.day-title-row h1 { margin-bottom: 0; }
.day-title-row #day-open-add { padding: 5px 10px; font-size: 13px; }
.day-muted, .day-shell small { color: var(--text-sub); font-size: 13px; }
.day-shell p { line-height: 1.6; }
.day-shell button, .day-shell input, .day-shell select { font: inherit; }
.day-shell button { border: 1px solid var(--border-light); border-radius: 9px; background: var(--bg-card, #fff); color: var(--text-main); padding: 9px 13px; cursor: pointer; }
.day-shell button:hover { border-color: var(--point-main); }
.day-shell button:disabled { opacity: .5; cursor: default; }
.day-shell button.day-primary { color: #fff; background: #286249; border-color: #286249; }
.day-shell input, .day-shell select { min-width: 0; width: 100%; padding: 10px; border: 1px solid var(--border-light); border-radius: 8px; background: var(--bg-card, #fff); color: var(--text-main); }
.day-toolbar input { width: 155px; }
.day-current { border-radius: 16px; padding: 25px; background: #e7f3ec; color: #203e33; margin-bottom: 25px; }
.day-current h2 { margin: 12px 0; font-size: 25px; }
.day-current .day-muted { color: #526c5e; }
.day-current-top { justify-content: space-between; }
.day-time { font-variant-numeric: tabular-nums; }
.day-running-time { font-size: 34px; letter-spacing: -.6px; margin: 12px 0; }
.day-current .day-actions { margin-top: 20px; }
.day-current .day-next { margin: 18px 0 0; font-size: 13px; }
.day-current:not(.day-current-live) { padding: 16px 20px; margin-bottom: 20px; }
.day-current:not(.day-current-live) h2 { font-size: 20px; margin: 7px 0; }
.day-current:not(.day-current-live) p { margin: 6px 0 0; }
.day-current:not(.day-current-live) .day-running-time { font-size: 23px; margin: 7px 0; }
.day-current:not(.day-current-live) .day-actions { margin-top: 12px; }
.day-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 28px; }
.day-grid.day-plan-editing { grid-template-columns: minmax(0, 1fr) 300px; }
.day-edit-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; font-size: 14px; }
.day-edit-caption button { font-size: 12px; }
.day-section { margin-bottom: 26px; }
.day-section h2 { font-size: 17px; margin: 0 0 14px; }
.day-section > details { border-top: 1px solid var(--border-light); padding-top: 15px; }
.day-shell summary { cursor: pointer; padding: 6px 0; font-weight: 600; }
.day-form { display: grid; gap: 12px; margin-top: 15px; }
.day-form label { display: grid; gap: 6px; font-size: 13px; }
.day-form .day-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.day-form .day-check { display: flex; align-items: center; gap: 8px; }
.day-form input[type=checkbox] { width: 18px; height: 18px; }
.day-error { color: #ac3030; min-height: 0; margin: 0; font-size: 13px; }
.day-notice { padding: 12px 0; font-size: 13px; color: var(--text-sub); }
.day-empty { padding: 32px 0; line-height: 1.8; color: var(--text-sub); }
.day-board-heading { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 14px; }
.day-board-heading h2 { margin: 0; }
.day-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-sub); }
.day-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; background: #c9dfd1; margin-right: 5px; border-radius: 2px; }
.day-legend span:last-child::before { background: #397858; }
.day-timeline-head { display: grid; grid-template-columns: 45px 1fr 1fr; gap: 8px; font-size: 12px; color: var(--text-sub); margin: 12px 0; }
.day-timeline { position: relative; margin: 0 0 22px 45px; }
.day-hour { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border-light); pointer-events: none; }
.day-hour span { position: absolute; left: -45px; top: -8px; color: var(--text-sub); font-size: 11px; }
.day-plot { position: absolute; width: calc(50% - 7px); padding: 5px 8px; border-radius: 5px; overflow: hidden; background: #e2eee6; color: #294d39; min-height: 4px; font-size: 12px; }
.day-plot.actual { left: calc(50% + 4px); background: #397858; color: #fff; }
.day-plot.fixed { background: #ecece7; color: #5b6055; }
.day-plot small { color: inherit; font-size: 11px; display: block; }
.day-row { padding: 0; border-top: 1px solid var(--border-light); }
.day-shell .day-row-summary { display: grid; grid-template-columns: 140px minmax(0,1fr) auto 18px; align-items: center; gap: 12px; padding: 13px 0; list-style: none; font-weight: 400; }
.day-row-summary::-webkit-details-marker { display: none; }
.day-row-summary:hover h3 { color: var(--point-main); }
.day-row-summary:focus-visible { outline: 2px solid var(--point-main); outline-offset: 3px; border-radius: 4px; }
.day-row-time { font-size: 13px; color: var(--text-sub); }
.day-row-chevron { text-align: center; color: var(--text-sub); transition: transform .15s; }
.day-row[open] > summary .day-row-chevron { transform: rotate(180deg); }
.day-row-body { padding: 0 0 15px; }
.day-row-head { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; }
.day-row h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.day-row .day-actions { margin-top: 12px; }
.day-row .day-actions button { font-size: 12px; padding: 6px 9px; }
.day-comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.day-comparison span { display: block; font-size: 12px; }
.day-comparison strong { font-size: 13px; display: block; margin-top: 3px; font-weight: 500; }
.day-row.done h3 { color: var(--text-sub); }
.day-pill { font-size: 11px; background: #edf3ee; color: #496851; border-radius: 5px; padding: 3px 6px; white-space: nowrap; }
.day-change { padding: 12px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.day-change p { margin: 4px 0; }
.day-list { display: grid; gap: 9px; margin-top: 12px; }
.day-list > button { text-align: left; display: flex; justify-content: space-between; gap: 10px; }
.day-routine-card { border: 1px solid var(--border-light); border-radius: 14px; padding: 18px; }
.day-routine-card h2 { margin-bottom: 8px; }
.day-routine-card > p { margin: 0 0 15px; }
.day-routine-card > button { width: 100%; }
.day-routine-hint { display: block; margin: 9px 0 18px; line-height: 1.5; }
.day-routine-card .day-saved-routines { padding-top: 10px; }
.day-saved-routines summary { font-size: 13px; }
.day-saved-routines p { margin: 0; }
.day-template-rows { display: grid; gap: 12px; margin-top: 16px; }
.day-template-row { padding: 14px; border: 1px solid var(--border-light); border-radius: 10px; }
.day-template-row .day-check { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.day-template-row .day-check input { flex: 0 0 18px; }
.day-template-row .day-pair { margin-bottom: 8px; }
.day-template-row .day-muted { margin: 0; }
.day-template-status { margin-top: 8px; }
.day-routine-list { margin: 14px 0; }
.day-routine-list:empty { display: none; }
.day-routine-row { display: flex; justify-content: space-between; align-items: start; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border-light); }
.day-routine-row > div { min-width: 0; }
.day-routine-row strong, .day-routine-row small { display: block; overflow-wrap: anywhere; }
.day-routine-row strong { font-size: 14px; }
.day-routine-row small { line-height: 1.6; margin-top: 4px; }
.day-routine-row button { flex-shrink: 0; font-size: 12px; }
.day-routine-exceptions { padding: 0 10px; background: var(--bg-task); border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.day-routine-options { border-top: 1px solid var(--border-light); padding-top: 10px; }
.day-weekdays { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; padding: 10px 0; border: 0; margin: 0; min-width: 0; }
.day-weekdays legend { font-size: 13px; margin-bottom: 8px; }
.day-weekdays label { justify-items: center; cursor: pointer; font-size: 13px; }
.day-dialog .day-weekdays input[type=checkbox] { width: 20px; height: 20px; }
.day-dialog { max-width: 620px; width: calc(100% - 28px); border: 1px solid var(--border-light); border-radius: 16px; padding: 24px; color: var(--text-main); background: var(--bg-card, #fff); max-height: 85vh; overflow: auto; }
.day-dialog::backdrop { background: #15251d70; }
.day-dialog h2 { margin-top: 0; font-size: 20px; }
.day-actual-dialog .day-actual-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.day-actual-dialog .day-actual-heading h2{margin:0;font-size:18px}
.day-actual-dialog .day-actual-heading button{border:0;background:transparent;color:var(--text-sub);font-size:22px;padding:0;min-width:36px;min-height:36px}
.day-actual-dialog .day-actual-title{font-size:14px;font-weight:600;margin:0 0 8px}
.day-actual-dialog .day-muted{font-size:12px;line-height:1.6;margin:0 0 12px;color:var(--text-sub)}
.day-actual-group{min-width:0;margin:0;padding:0;border:0}
.day-actual-group legend{font-size:12px;color:var(--text-sub);margin-bottom:7px}
.day-actual-pair{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:10px}
.day-actual-pair input{box-sizing:border-box;min-width:0;width:100%;padding:10px 12px;border:1px solid var(--border-light);border-radius:8px;background:var(--bg-input);color:var(--text-main)}
.day-actual-dialog .day-actual-actions{justify-content:flex-end;margin-top:4px}
.day-actual-dialog .day-use-planned{justify-self:start;border:0;background:transparent;color:#286249;padding:3px 0;font-size:12px}
@media(max-width:600px){.day-actual-dialog .day-actual-heading button{min-width:44px;min-height:44px}}
@media(max-width:359px){.day-actual-pair{grid-template-columns:minmax(0,1fr)}}
.day-dialog .day-actions { margin-top: 20px; }
.day-dialog button { font: inherit; padding: 9px 13px; border-radius: 8px; border: 1px solid #c9d6ce; background: #fff; cursor: pointer; }
.day-dialog button.day-primary { color: #fff; background: #286249; }
.day-dialog button:disabled { opacity: .5; }
.day-template-actions { position: sticky; bottom: -24px; padding: 12px 0; border-top: 1px solid var(--border-light); background: var(--bg-card, #fff); }
.day-template-actions button { flex: 1; }
.day-floating-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border-light); }
.day-floating-row strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.day-floating-row small { display: block; margin-top: 4px; }
.day-floating-row .day-actions { margin: 0; }
.day-floating-row button, .day-floating-more summary { font-size: 12px; }
.day-floating-more > .day-actions { margin-top: 8px; }
.day-replan-preview { margin-top: 18px; }
.day-replan-fields { gap: 0; }
.day-replan-fields .day-pair { margin-top: 10px; }
.day-dialog label { overflow-wrap: anywhere; }
.day-dialog .day-error:empty, #day-add-feedback-hint:empty { display: none; }
.day-next-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.day-next-form > label:nth-child(-n+3), .day-next-form > p, .day-next-form > div { grid-column: 1 / -1; }
@media (max-width: 400px) { .day-next-form { grid-template-columns: minmax(0, 1fr); } }
@media (pointer: coarse) { .day-dialog input, .day-dialog select { font-size: 16px; } }
body.day-today-active #timer-container { display: none !important; }
body.day-focus #focus-mode-overlay { background: #14251f !important; backdrop-filter: none; }
#focus-day-next { font-size: 14px; color: #bfdacd; margin: 14px 20px; text-align: center; }
@media (max-width: 800px) {
  .day-grid, .day-grid.day-plan-editing { grid-template-columns: 1fr; gap: 6px; }
  .day-plan-editing .day-sidebar { grid-row: 1; }
  .day-sidebar .day-section { margin-bottom: 14px; }
  .day-current { padding: 20px; }
  .day-current h2 { font-size: 22px; }
  .day-heading { gap: 16px; }
}
@media (max-width: 440px) {
  .day-shell .day-row-summary { grid-template-columns: 94px minmax(0,1fr) auto 14px; gap: 7px; }
  .day-row-summary h3 { font-size: 14px; }
  .day-row-time { font-size: 12px; }
  .day-board-heading { flex-wrap: wrap; }
  .day-template-row .day-pair { grid-template-columns: 1fr; gap: 8px; }
  .day-template-row .day-pair label { grid-template-columns: 28px minmax(0, 1fr); align-items: center; }
  #today-tab { padding: 20px 13px 45px; }
  .day-toolbar { gap: 5px; }
  .day-toolbar button { padding: 9px; }
  .day-toolbar input { width: 143px; }
  .day-comparison { grid-template-columns: 1fr; gap: 6px; }
  .day-comparison > div { display: flex; gap: 10px; align-items: baseline; }
  .day-comparison strong { margin: 0; }
  .day-running-time { font-size: 29px; }
  .day-row-head { flex-wrap: wrap; }
}
@media (pointer: coarse) { .day-shell button, .day-row .day-actions button { min-height: 44px; } }

/* Readable, open checklist and memo panels, using the existing daily records. */
.day-notes { padding:0; margin-bottom:26px; }
.day-notes-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; align-items:start; }
.day-notes-panel { min-width:0; padding:16px; border:1px solid var(--border-light); border-radius:13px; background:var(--bg-card,#fff); }
.day-notes-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.day-notes-heading h2 { margin:0; font-size:18px; font-weight:700; letter-spacing:-.4px; }
#day-notes-count, #day-notes-status { font-size:13px; color:var(--text-sub); }
.day-notes-list { display:grid; gap:7px; }
.day-notes-list:empty { display:none; }
.day-note-check { display:flex; align-items:flex-start; gap:4px; padding:2px 4px; border:1px solid var(--border-light); border-radius:10px; background:var(--bg-main,#f7faf8); min-height:42px; }
.day-note-check:focus-within { border-color:var(--point-main); background:var(--bg-card,#fff); }
.day-note-toggle { flex:0 0 32px; min-height:32px; display:grid; place-items:center; cursor:pointer; }
.day-shell .day-note-toggle input[type=checkbox] { width:20px; height:20px; margin:0; padding:0; cursor:pointer; accent-color:#36755d; }
.day-shell .day-note-input { flex:1; min-width:0; width:0; min-height:35px; max-height:none; box-sizing:border-box; border:0; border-radius:0; padding:6px 2px; background:transparent; font:inherit; font-size:15px; font-weight:500; line-height:1.5; box-shadow:none; outline:none; resize:none; overflow:hidden; white-space:pre-wrap; overflow-wrap:anywhere; }
.day-note-check.is-done .day-note-input { color:var(--text-sub); text-decoration:line-through; }
.day-note-check.is-done { background:transparent; }
.day-shell .day-note-delete { flex:0 0 30px; width:30px; height:32px; padding:0; border:0; background:transparent; font-size:19px; font-weight:400; color:var(--text-sub); opacity:.45; }
.day-note-check:hover .day-note-delete, .day-note-check:focus-within .day-note-delete { opacity:1; }
.day-shell .day-note-delete:hover { color:#a04436; }
.day-notes-empty { color:var(--text-sub); font-size:15px; line-height:1.7; margin:3px 0 12px; }
.day-notes-entry { display:flex; align-items:center; gap:5px; margin-top:10px; padding:2px 4px 2px 10px; border:1px dashed #baccc2; border-radius:10px; background:transparent; }
.day-notes-entry:focus-within { border-style:solid; border-color:var(--point-main); }
.day-shell .day-notes-entry input { flex:1; min-width:0; width:0; border:0; background:transparent; outline:none; padding:7px 0; font-size:15px; box-shadow:none; }
.day-shell .day-notes-entry button { flex:0 0 34px; height:34px; border:0; padding:0; border-radius:8px; background:var(--bg-task,#edf5f0); color:#36755d; font-size:23px; font-weight:400; }
.day-notes-body { min-width:0; }
#day-notes-memo { flex:none; box-sizing:border-box; width:100%; height:152px; min-height:152px; max-height:none; padding:10px 12px; border:1px solid var(--border-light); border-radius:10px; resize:none; overflow:hidden; overflow-wrap:anywhere; background:var(--bg-main,#f7faf8); color:var(--text-main); font:inherit; font-size:15px; line-height:1.7; }
#day-notes-memo:focus { outline:2px solid var(--point-main); outline-offset:2px; border-color:transparent; }
.day-notes-caption { margin:8px 0 0; color:var(--text-sub); font-size:13px; }
.day-notes-feedback { margin-top:14px; padding:14px 16px; border:1px solid var(--border-light); border-radius:10px; background:var(--bg-card,#fff); font-size:14px; }
.day-notes-feedback p { margin:0 0 10px; color:#a04436; }
.day-note-conflict { border:1px solid var(--border-light); border-radius:8px; margin:12px 0; padding:12px; min-width:0; }
.day-note-conflict label { display:grid; grid-template-columns:18px 1fr; gap:6px 10px; margin:8px 0; }
.day-note-conflict input { width:18px; }
.day-note-conflict pre { grid-column:2; white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; max-height:160px; overflow:auto; margin:0; }
@media(max-width:680px) {
 .day-notes-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
 .day-notes-panel { padding:15px 16px; }
 #day-notes-memo { height:144px; min-height:144px; font-size:16px; }
}
@media(pointer:coarse) {
 .day-note-check { padding:0 4px; }
 .day-note-toggle { flex-basis:36px; min-height:44px; }
 .day-shell .day-note-input, .day-shell .day-notes-entry input { font-size:16px; }
 .day-shell .day-note-delete { flex-basis:38px; width:38px; min-height:44px; opacity:.7; }
}


/* Checklist and memo share one fold, without rebuilding their input fields. */
.day-shell .day-notes-fold > .day-notes-fold-heading { display:flex; align-items:center; gap:10px; list-style:none; padding:0; font-size:18px; font-weight:700; }
.day-notes-fold-heading::-webkit-details-marker { display:none; }
.day-notes-fold[open] > .day-notes-fold-heading { margin-bottom:14px; }
.day-notes-chevron { font-size:18px; color:var(--text-sub); transition:transform .15s; }
.day-notes-fold[open] > .day-notes-fold-heading .day-notes-chevron { transform:rotate(180deg); }
.day-notes-fold-heading:focus-visible { outline:2px solid var(--point-main); outline-offset:5px; border-radius:4px; }
.day-current[hidden] { display:none !important; }

/* Give the daily timeline room to read without repeating its schedule below. */
.day-board-heading { margin-bottom:14px; }
.day-board-heading h2 { font-size:20px; font-weight:700; letter-spacing:-.4px; }
.day-legend { font-size:13px; gap:18px; }
.day-legend span::before { width:10px; height:10px; }
.day-timeline-head { grid-template-columns:60px 1fr 1fr; font-size:13px; gap:10px; margin:12px 0 14px; }
.day-timeline { margin-left:60px; margin-bottom:18px; }
.day-hour span { left:-60px; top:-9px; font-size:13px; font-weight:500; }
.day-plot { padding:6px 9px; border-radius:7px; font-size:14px; font-weight:600; line-height:1.4; }
.day-plot small { font-size:12px; margin-top:2px; font-weight:500; }
.day-plot > span { display:block; overflow-wrap:anywhere; }
#day-blocks:not([hidden]) { margin-top:20px; }


@media(max-width:600px) {
  .day-board-heading h2 { font-size:20px; }
  .day-timeline-head { grid-template-columns:52px 1fr 1fr; font-size:12px; gap:7px; }
  .day-timeline { margin-left:52px; }
  .day-hour span { left:-52px; font-size:12px; }
  .day-plot { padding:5px 7px; font-size:14px; }
  .day-plot small { font-size:12px; letter-spacing:-.3px; }
}

/* Fold the timeline while leaving planning tools available. */
.day-shell #day-flow-toggle { display:inline-flex; align-items:center; gap:10px; border:0; border-radius:5px; padding:0; background:transparent; color:inherit; font:inherit; text-align:left; }
.day-shell #day-flow-toggle:hover { color:var(--point-main); }
#day-flow-toggle:focus-visible { outline:2px solid var(--point-main); outline-offset:5px; }
.day-flow-chevron { font-size:17px; color:var(--text-sub); transition:transform .15s; }
#day-flow-toggle[aria-expanded=true] .day-flow-chevron { transform:rotate(180deg); }

/* Keep the timeline a little narrower than the notes, with readable mobile columns. */
.day-flow-section { width:92%; min-width:0; }
@media(max-width:680px) { .day-flow-section { width:100%; } }

/* The complete study workspace now lives below the daily timeline. */
.day-study-section { width:100%; max-width:1080px; margin:0 auto; color:var(--text-main); scroll-margin-top:20px; }
.day-study-section [hidden] { display:none !important; }
.day-study-header { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:0 0 16px; }
.day-study-header h2 { margin:0; font-size:20px; font-weight:700; letter-spacing:-.4px; }
#day-study-toggle { display:inline-flex; align-items:center; gap:10px; padding:0; border:0; border-radius:5px; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }
#day-study-toggle:hover { color:var(--point-main); }
#day-study-toggle:focus-visible { outline:2px solid var(--point-main); outline-offset:5px; }
.day-study-chevron { font-size:17px; color:var(--text-sub); transition:transform .15s; }
#day-study-toggle[aria-expanded=true] .day-study-chevron { transform:rotate(180deg); }
.day-study-add { height:38px; border:1px solid #dce7e1; border-radius:8px; background:var(--bg-card,#fff); color:#4d6659; padding:0 13px; font:inherit; font-size:13px; cursor:pointer; }
.day-study-add:hover { border-color:var(--point-main); }
.day-study-section #execution-tab { display:flex; flex-direction:column; align-items:stretch; padding:0; width:100%; }
.day-study-section #execution-tab .execution-workspace { max-width:none; margin:0; }
.day-study-section #study-dashboard { max-width:none; margin-bottom:18px; }
.day-study-section #study-dashboard-tools { max-width:none; margin-bottom:0; }
@media(max-width:600px) { .day-study-header { margin-bottom:12px; } .day-study-section #study-dashboard .study-summary { grid-template-columns:repeat(3,minmax(0,1fr)); } }

/* Execution shows the intended order; recorded time belongs to Inspection. */
.day-agenda { margin:0; border-top:1px solid var(--border-light); }
.day-agenda-row { display:flex; align-items:center; gap:16px; min-height:66px; padding:11px 4px; border-bottom:1px solid var(--border-light); }
.day-agenda-time { flex:0 0 56px; display:grid; gap:4px; font-size:13px; font-variant-numeric:tabular-nums; }
.day-agenda-time strong { font-weight:600; }
.day-agenda-time span { color:var(--text-sub); font-size:12px; }
.day-agenda-label { flex:1; min-width:0; display:grid; gap:5px; }
.day-agenda-label strong { font-size:15px; font-weight:600; overflow-wrap:anywhere; }
.day-agenda-label small { font-size:12px; color:var(--text-sub); }
.day-agenda-state { color:var(--text-sub); background:var(--bg-card,#fff); border:1px solid var(--border-light); padding:4px 8px; border-radius:6px; font-size:11px; white-space:nowrap; }
.day-agenda-row.is-current { background:#eaf4ee; padding-left:10px; padding-right:10px; border-radius:9px; }
.day-agenda-row.is-done .day-agenda-label strong { color:var(--text-sub); }
.day-agenda-empty { font-size:14px; line-height:1.7; color:var(--text-sub); padding:14px 0; margin:0; }
.day-grid.day-plan-editing { grid-template-columns:minmax(0,1fr); gap:12px; }
.day-plan-editing .day-sidebar { grid-row:auto; }
.day-plan-sources { border:1px solid var(--border-light); border-radius:12px; padding:10px 14px; }
.day-plan-sources > summary { font-size:14px; }
.day-plan-sources[open] > summary { margin-bottom:14px; }
.day-plan-sources .day-routine-card { background:var(--bg-card,#fff); }
.day-row-body { padding:0 0 14px 152px; }
.day-row-body > .day-muted { margin:0 0 8px; }
.day-row .day-actions { margin-top:8px; gap:7px; }
.day-dialog { font-family:inherit; }
.day-dialog input, .day-dialog select { min-width:0; width:100%; font:inherit; padding:10px; border:1px solid var(--border-light); border-radius:8px; background:var(--bg-card,#fff); color:var(--text-main); }
@media(max-width:600px) {
 .day-agenda-row { gap:11px; min-height:62px; }
 .day-row-body { padding-left:0; }
 .day-plan-sources { padding:9px 11px; }
}

.day-notes > .day-notes-fold { border-top:0; padding-top:0; }

/* Give the planning tools a readable trigger and room above the study list. */
#day-plan-layout.day-plan-editing { margin-bottom:32px; }
.day-shell .day-plan-sources { padding:0; background:var(--bg-card,#fff); }
.day-shell .day-plan-sources > summary { min-height:56px; padding:15px 18px; font-size:16px; line-height:1.5; margin:0; }
.day-shell .day-plan-sources[open] > summary { margin-bottom:16px; border-bottom:1px solid var(--border-light); }
.day-shell .day-plan-sources > .day-section { margin-left:16px; margin-right:16px; }
.day-shell .day-plan-sources > .day-section:last-child { margin-bottom:16px; }

/* Match the two section actions and align their right edges with the date toolbar. */
.day-flow-section { width:100%; }
.day-flow-section #day-flow-content { width:92%; }
.day-shell #day-edit-plan,.day-study-add { box-sizing:border-box; height:38px; min-height:38px; min-width:88px; padding:8px 14px; font-size:14px; line-height:20px; font-weight:500; }
@media(max-width:680px) { .day-flow-section #day-flow-content { width:100%; } }
@media(pointer:coarse) { .day-shell #day-edit-plan,.day-study-add { height:44px; min-height:44px; } }

/* Selected date is the heading; the native calendar picker stays above the arrows. */
.day-heading { display:block; margin-bottom:20px; }
.day-date-topline,.day-date-titleline,.day-date-captionline { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.day-date-title { display:flex; flex-wrap:wrap; align-items:center; gap:5px 10px; min-width:0; }
.day-date-titleline .day-toolbar { flex-shrink:0; }
#day-study-streak { border-radius:12px; padding:4px 8px; background:#e8f4ee; color:#326451; font-size:12px; font-weight:600; white-space:nowrap; }
.study-streak-setting { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; min-height:40px; color:var(--text-main); font-size:13px; font-weight:600; }
.study-streak-setting label { flex:1; cursor:pointer; padding:10px 0; }
.study-streak-setting input { width:18px; height:18px; margin:0; accent-color:var(--point-main); cursor:pointer; }
.day-date-topline { min-height:36px; }
#day-selected-month { color:var(--text-sub); font-size:13px; }
.day-calendar-picker { display:flex; position:relative; align-items:center; justify-content:center; flex:0 0 40px; width:40px; height:36px; border-radius:8px; color:var(--text-sub); overflow:hidden; }
.day-calendar-picker:hover { background:var(--bg-task); color:var(--text-main); }
.day-calendar-picker:focus-within { outline:2px solid var(--point-main); outline-offset:2px; }
.day-calendar-picker svg { width:17px; height:17px; pointer-events:none; }
.day-shell .day-calendar-picker #day-date { position:absolute; inset:0; opacity:0; width:100%; height:100%; min-width:0; border:0; padding:0; cursor:pointer; }
.day-calendar-picker #day-date::-webkit-calendar-picker-indicator { position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0; cursor:pointer; }
.day-heading .day-date-titleline h1 { margin:0; font-size:24px; line-height:1.4; font-weight:650; letter-spacing:-.6px; }
.day-heading .day-toolbar { width:auto; flex:0 0 auto; display:flex; justify-content:flex-end; gap:0; margin:0; }
.day-shell .day-toolbar button { display:inline-flex; align-items:center; justify-content:center; width:36px; min-width:36px; min-height:40px; padding:6px; border:0; border-radius:8px; color:var(--text-sub); background:transparent; }
.day-shell .day-toolbar button:hover { color:var(--text-main); background:var(--bg-task); }
.day-date-captionline { min-height:32px; margin-top:5px; }
.day-date-captionline .day-muted { font-size:12px; line-height:1.6; }
.day-shell #day-today { flex:0 0 auto; min-width:0; min-height:32px; padding:4px 0 4px 8px; gap:5px; border:0; border-radius:6px; font-size:12px; font-weight:500; color:var(--text-sub); background:transparent; }
.day-shell #day-today:hover { color:var(--text-main); background:transparent; }
.day-date-captionline #day-today svg { width:14px; height:14px; }
.day-notes { position:relative; }
.day-shell .day-notes-fold > .day-notes-fold-heading { padding-right:116px; min-height:40px; }
.day-shell #day-open-add { position:absolute; right:0; top:0; z-index:1; display:inline-flex; gap:5px; min-height:36px; padding:7px 11px; border:0; border-radius:9px; color:var(--text-main); background:color-mix(in srgb,var(--point-main) 13%,var(--bg-card)); font-size:13px; font-weight:600; white-space:nowrap; }
.day-shell #day-open-add svg { display:block; width:15px; height:15px; }
.day-shell #day-open-add:hover { background:color-mix(in srgb,var(--point-main) 22%,var(--bg-card)); }
@media(max-width:600px) {
  .day-heading { display:block; }
  .day-heading .day-date-titleline h1 { font-size:22px; }
  .day-date-captionline { align-items:flex-start; }
  .day-date-captionline .day-muted { max-width:calc(100% - 64px); }
}
@media(pointer:coarse) {
  .day-calendar-picker { height:44px; flex-basis:44px; width:44px; }
  .day-shell .day-toolbar button { width:40px; min-width:40px; min-height:44px; }
  .day-shell #day-today { min-height:40px; }
  .day-shell #day-open-add { min-height:40px; }
  .day-shell .day-notes-fold > .day-notes-fold-heading { min-height:44px; }
}
@media(max-width:350px) {
  .day-heading .day-date-titleline h1 { font-size:20px; }
  .day-date-titleline { gap:5px; }
}
