/* A3: compact rhythm with readable text and generous touch targets. */
/* Mobile detail (60) < shared dialogs (100) < feedback (160/180). */
.modal-backdrop { z-index: 100; }
.toast { z-index: 160; }
body { font-size: 14px; }
.task-title { font-size: 16px; }
.task-meta-line, .task-plan-line, .micro-badge, .date-line, .week-navigation strong,
.summary-cell span, .nav-eyebrow, .type-tag-filter, .type-label-count, .fact-row dt,
.fact-row input, .fact-row select, .field-hint, .detail-project, .storage-card p,
.field span, .tag-choice, .progress-form textarea, .progress-form input[type="text"],
.progress-entry time, .progress-entry small, .checklist li, .task-tag-field__heading p,
.builder-heading p, .report-note p, .report-date-field span, .report-range { font-size: 12px; }
.field input, .field select, .field textarea, .detail-note, .progress-entry p,
.report-output, .checklist-add input { font-size: 14px; }
.task-main-button { min-width: 0; }
.task-title { white-space: normal; overflow-wrap: anywhere; }
.task-end { min-width: 94px; }
.due-label { font-size: 13px; font-weight: 650; }
.task-row.is-done { opacity: 1; }
.task-row.is-done .task-title { color: #65728a; }
.row-status { display: inline-block; color: #566881; font-size: 11px; margin-top: 5px; padding: 2px 6px; border-radius: 4px; background: #f1f4f9; }
.status-progress { color: #2454c5; background: #edf3ff; }
.status-waiting { color: #875b14; background: #fff6df; }
.status-done { color: #35775e; background: #edf6f1; }
.work-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 0 4px; }
.work-tools button, .work-tools select, .utility-modal button, .utility-modal select,
.secondary-button, .report-tools button, .task-more button, #task-extras select {
  border: 1px solid #d3deed; border-radius: 7px; color: #405777; background: #fff;
  font: 500 13px/1.5 var(--sans); padding: 8px 11px; min-height: 38px; cursor: pointer;
}
.work-tools button { display: inline-flex; align-items: center; gap: 5px; }
.work-tools .ui-icon { width: 16px; height: 16px; }
.work-tools button:hover, .utility-modal button:hover, .secondary-button:hover { background: #f0f5ff; border-color: #90abea; }
.work-tools button[aria-pressed="true"] { background: #edf2ff; border-color: #2859df; color: #224dbe; }
#toggle-detail { margin-left: auto; }
.detail-collapsed .app-shell { grid-template-columns: 228px minmax(0, 1fr); }
.detail-collapsed .detail-panel { display: none; }
.detail-close { display: inline-flex; align-items: center; justify-content: center; }
.detail-status-actions { flex-wrap: wrap; gap: 8px; }
.secondary-button { display: inline-flex; gap: 6px; align-items: center; }
.task-more { position: relative; margin-left: auto; }
.task-more summary { list-style: none; cursor: pointer; color: #52637c; border: 1px solid #d3deed; border-radius: 7px; padding: 8px 10px; font-size: 13px; }
.task-more > div { position: absolute; z-index: 30; top: 44px; right: 0; width: 175px; display: grid; gap: 5px; padding: 7px; border: 1px solid #dce4ef; background: #fff; box-shadow: 0 9px 30px #25304720; border-radius: 9px; }
.task-more .delete-button { color: #b64236; }
.day-counts { color: inherit; opacity: .86; font-size: 10px; display: block; margin-top: 5px; white-space: nowrap; }
.day-cell { min-height: 74px; }
.delivery-chart { border-bottom: 1px solid #e4eaf2; padding: 9px 0; }
.delivery-chart summary, .completed-tasks summary, .recurrence-preview summary { cursor: pointer; color: #52637c; font-size: 13px; }
.delivery-chart summary span, .recurrence-preview summary small { font-size: 11px; font-weight: 400; color: #687890; margin-left: 8px; }
#delivery-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; padding: 16px 10px 8px; }
#delivery-chart button { border: 0; background: transparent; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 6px; cursor: pointer; color: #52637c; }
#delivery-chart button span { display: block; width: min(40px, 70%); background: #d9e5fd; border-radius: 5px 5px 2px 2px; }
#delivery-chart button:hover span { background: #2859df; }
#delivery-chart strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.completed-tasks, .recurrence-preview { border: 1px solid #e4eaf2; border-radius: 9px; margin: 18px 0; padding: 14px; }
.completed-tasks summary, .recurrence-preview summary { font-weight: 600; }
.completed-tasks[open] > summary, .recurrence-preview[open] > summary { margin-bottom: 14px; }
.recurrence-preview { background: #fafcff; border-style: dashed; }
.recurrence-preview > button { width: 100%; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border: 0; border-top: 1px solid #e9eef6; background: transparent; color: #5b6b81; text-align: left; font: 12px/1.7 var(--sans); cursor: pointer; }
.recurrence-preview .ui-icon { width: 16px; margin-right: 7px; }
.reminder-strip { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #7b5a24; background: #fffbef; border: 1px solid #efe2be; border-radius: 7px; padding: 9px 12px; margin-top: 10px; }
.reminder-strip button { margin-left: auto; color: #785418; border: 0; border-bottom: 1px solid #c5a465; background: transparent; cursor: pointer; white-space: nowrap; }
.reminder-strip .ui-icon { width: 17px; }
[hidden] { display: none !important; }
.onboarding-card { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #f4f8ff; border: 1px solid #dce7fa; border-radius: 10px; padding: 18px; margin-top: 14px; }
.onboarding-card > div { flex: 1 1 100%; }
.onboarding-card p { margin: 8px 0; font-size: 13px; color: #576e90; }
.onboarding-card button { border: 1px solid #b6cbed; background: #fff; color: #2856b8; border-radius: 6px; padding: 8px 10px; cursor: pointer; }
.utility-modal { width: min(740px, 100%); }
.utility-modal p { font-size: 13px; line-height: 1.8; color: #63748c; }
.utility-modal form { display: grid; gap: 15px; }
.utility-modal .submit-task, .utility-modal button[type="submit"] { color: #fff; background: #2859df; border-color: #2859df; }
.utility-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.utility-grid button { min-height: 64px; text-align: left; padding: 15px; }
.utility-row { display: flex; align-items: center; gap: 8px; padding: 14px 0; border-bottom: 1px solid #e5ecf5; font-size: 14px; }
.utility-row > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.utility-row small { display: block; color: #667a95; font-size: 12px; margin-top: 6px; }
.utility-row button { flex-shrink: 0; }
.utility-empty { padding: 28px 12px; text-align: center; background: #f7faff; border-radius: 9px; }
.batch-log-row { min-width: 0; border: 1px solid #dfe7f3; padding: 15px; border-radius: 8px; margin: 15px 0; display: grid; gap: 8px; }
.batch-log-row legend { color: #324e72; font-size: 14px; font-weight: 600; padding: 0 5px; }
.batch-log-row textarea, .batch-log-row input { min-width: 0; border: 1px solid #d5dfec; border-radius: 6px; font: 14px/1.6 var(--sans); padding: 10px; background: #fff; }
.batch-log-row textarea { min-height: 74px; resize: vertical; }
.progress-entry { position: relative; }
.progress-entry > button:not(.progress-entry__remove) { color: #295cbf; border: 0; border-bottom: 1px solid #bed0ed; background: transparent; font: 12px var(--sans); padding: 5px 0; margin-top: 8px; cursor: pointer; }
.progress-history { max-height: 500px; overflow: auto; }
.reminder-settings { padding: 13px; border-radius: 8px; border: 1px solid #e1e8f4; margin: 12px 0 18px; color: #4c6588; }
.reminder-settings summary { cursor: pointer; font-size: 13px; }
.reminder-settings small, #task-extras small { display: block; font-size: 12px; line-height: 1.7; color: #60718b; margin: 10px 0; }
.reminder-settings .field-grid { margin-top: 14px; }
.field input[type="checkbox"] { width: 22px; height: 22px; accent-color: #2859df; }
.report-tools { display: grid; gap: 12px; font-size: 13px; margin-bottom: 18px; }
.report-tools details { border: 1px solid #dfe7f3; border-radius: 8px; padding: 10px 12px; background: #f9fbff; }
.report-tools summary { cursor: pointer; color: #45618a; }
.report-tools p { font-size: 12px; line-height: 1.8; color: #657790; }
.report-tools details > button { margin: 8px 8px 0 0; }
.report-draft-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #507464; }
.report-choice { display: flex; gap: 9px; align-items: center; line-height: 1.7; padding: 9px 0; font-size: 13px; color: #415776; }
.report-choice input { width: 20px; height: 20px; accent-color: #2859df; flex-shrink: 0; }
.undo-bar { position: fixed; z-index: 180; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: 9px; background: #243a5c; box-shadow: 0 8px 35px #21314b25; color: #fff; font-size: 13px; }
.undo-bar button { min-height: 32px; color: #fff; background: transparent; border: 1px solid #7e9ac1; border-radius: 5px; padding: 4px 10px; cursor: pointer; white-space: nowrap; }
.undo-bar #undo-dismiss { border: 0; font-size: 20px; padding: 0 5px; }
input::placeholder, textarea::placeholder { color: #6b7a90; }
.storage-warning { background: #fff2ef; border: 1px solid #db9184; color: #9c3026; padding: 12px 14px; font-size: 13px; line-height: 1.7; border-radius: 8px; margin: 10px 0; }
.field input, .field select, .fact-row input, .fact-row select { min-height: 38px; }
@media (min-width: 1081px) and (max-width: 1280px) {
  .app-shell { grid-template-columns: 196px minmax(0, 1fr) 300px; }
  .detail-collapsed .app-shell { grid-template-columns: 196px minmax(0, 1fr); }
  .workspace { padding: 0 18px 45px; }
  .work-tools { gap: 5px; }
  .work-tools button, .work-tools select { font-size: 12px; padding: 7px 8px; }
}
@media (max-width: 1080px) {
  #toggle-detail { display: none; }
  .detail-collapsed .app-shell { grid-template-columns: 214px minmax(0, 1fr); }
  .detail-collapsed .detail-panel { display: block; }
}
@media (max-width: 760px) {
  .work-tools { gap: 7px; padding-top: 10px; }
  .work-tools button, .work-tools select { min-height: 42px; font-size: 12px; padding: 8px 10px; }
  .work-tools #daily-log { margin-left: auto; }
  .work-tools #workspace-tools { flex: 1 1 100%; text-align: center; justify-content: center; min-height: 34px; background: #f7f9fc; }
  .new-task-button, .report-button { min-height: 42px; font-size: 12px; }
  .task-title { font-size: 15px; }
  .task-meta-line, .task-plan-line, .due-label { font-size: 12px; }
  .task-meta-line { gap: 3px; }
  .task-end { min-width: 75px; max-width: 98px; }
  .task-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .task-check { width: 28px; height: 28px; position: relative; }
  .task-check::after { content: ''; position: absolute; inset: -7px; }
  .task-badges .tag-badge { display: inline-flex !important; font-size: 10px; max-width: 94px; overflow-wrap: anywhere; }
  .day-cell { padding: 7px 3px; }
  .day-counts { font-size: 9px; white-space: normal; line-height: 1.5; }
  .day-cell__name { font-size: 11px; }
  .week-navigation button { min-width: 36px; min-height: 38px; }
  .reminder-strip { font-size: 11px; }
  .reminder-strip > span { flex: 1; }
  .reminder-strip button { min-height: 36px; }
  .detail-panel { width: 100%; max-width: 100%; left: 0; right: 0; top: 0; bottom: 0; height: 100dvh; z-index: 60; padding-bottom: 40px; }
  .detail-title { font-size: 22px; }
  .field input, .field select, .field textarea, .fact-row input, .fact-row select,
  .progress-form textarea, .progress-form input, .batch-log-row textarea, .batch-log-row input { font-size: 16px; min-height: 44px; }
  .modal-close, .detail-close, .utility-modal button { min-height: 44px; }
  .detail-close { min-width: 44px; }
  .checklist li { padding: 14px 0; }
  .checklist li button[data-detail-action="check"] { position: relative; width: 24px; height: 24px; }
  .checklist li button[data-detail-action="check"]::after { content: ''; position: absolute; inset: -8px; }
  .utility-modal { padding: 20px 15px; }
  .utility-grid { gap: 9px; }
  .utility-row { flex-wrap: wrap; }
  .utility-row > span:first-child { flex-basis: 100%; }
  .recurrence-preview > button { flex-direction: column; align-items: start; gap: 3px; }
  .recurrence-preview summary small { display: block; margin: 7px 0 0; }
  .undo-bar { bottom: 83px; font-size: 12px; padding: 8px 10px; gap: 7px; }
  .undo-bar button { min-height: 38px; }
  .report-output { font-size: 14px; }
}
