/* Tool content only: card dimensions and layout belong to the shared home shell. */
.lm-widget-body { min-width:0; min-height:0; display:flex; flex-direction:column; gap:10px; color:var(--text,#172b28); font-size:14px; overflow:auto; scrollbar-width:thin; }
.lm-widget-body * { box-sizing:border-box; }
.lm-widget-body p,.lm-widget-body h3 { margin:0; }
.lm-widget-body button,.lm-widget-body input,.lm-widget-body textarea { font:inherit; }
.lmw-button { min-height:34px; border:1px solid var(--line,#d1ded7); border-radius:8px; background:var(--panel,#fff); color:var(--accent,#146447); padding:6px 11px; cursor:pointer; flex:none; }
.lmw-button:hover { background:var(--hover,#eaf1ec); }
.lmw-button:focus-visible,.lm-widget-body a:focus-visible { outline:2px solid var(--accent,#146447); outline-offset:2px; }
.lmw-button:disabled { cursor:default; opacity:.55; }
.lmw-primary { background:var(--accent,#146447); color:var(--on-accent,#fff); border-color:transparent; }
.lmw-primary:hover { filter:brightness(.93); background:var(--accent,#146447); }
.lmw-quiet { border-color:transparent; align-self:flex-start; }
.lmw-danger { color:var(--danger,#a62c38); }
.lmw-status { font-size:13px; color:var(--muted,#5e706a); line-height:1.6; }
.lmw-empty { padding:16px 0; }
.lmw-empty-title { font-size:14px; font-weight:600; }
.lmw-error { color:var(--danger,#a62c38); }
.lmw-error-box { border-radius:8px; padding:10px; background:var(--danger-soft,#fff0f1); display:grid; gap:6px; }
.lmw-error-box button { justify-self:start; }
.lmw-meta { font-size:11px; line-height:1.5; color:var(--muted,#5e706a); overflow-wrap:anywhere; }
.lmw-form { display:flex; flex-direction:column; gap:9px; min-width:0; }
.lmw-label { display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--muted,#5e706a); min-width:0; }
.lmw-input,.lmw-textarea { width:100%; min-width:0; border:1px solid var(--line,#d1ded7); border-radius:8px; background:var(--field-bg,#f7faf8); color:var(--text,#172b28); padding:8px 10px; line-height:1.4; }
.lmw-input { height:36px; }
.lmw-input:focus,.lmw-textarea:focus { outline:2px solid var(--accent,#146447); outline-offset:1px; }
.lmw-actions { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.lmw-actions .lmw-meta:last-child { margin-left:auto; }
.lmw-notes { flex:1; min-height:150px; }
.lmw-textarea { resize:none; flex:1; min-height:95px; }
.lm-widget-expanded .lmw-textarea { min-height:300px; }
.lmw-links,.lmw-checklist,.lmw-events { list-style:none; padding:0; margin:0; min-width:0; }
.lmw-links { display:grid; gap:5px; }
.lm-widget-body[data-size="L"] .lmw-links { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 16px; }
.lmw-link-row { display:flex; align-items:center; gap:6px; min-width:0; padding:2px 0; }
.lmw-link { color:var(--accent,#146447); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; text-decoration:none; }
.lmw-link:hover { text-decoration:underline; }
.lmw-link-row .lmw-button { font-size:11px; padding:4px 6px; min-height:30px; }
.lmw-checklist { display:grid; gap:2px; }
.lm-widget-body[data-size="L"] .lmw-checklist { grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 18px; }
.lmw-todo { display:flex; align-items:center; gap:7px; min-width:0; min-height:35px; }
.lmw-todo-label { display:flex; align-items:flex-start; gap:9px; flex:1; min-width:0; line-height:1.6; }
.lmw-todo-label input { accent-color:var(--accent,#146447); width:16px; height:16px; flex:none; margin:3px 0 0; }
.lmw-todo-label span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lmw-todo.is-done .lmw-todo-label span { color:var(--muted,#5e706a); text-decoration:line-through; }
.lmw-todo-delete { font-size:19px; border:0; padding:0; width:30px; min-height:30px; color:var(--muted,#5e706a); }
.lmw-add-todo { display:flex; align-items:center; gap:7px; }
.lmw-add-todo input { flex:1; }
.lmw-countdown { display:flex; align-items:center; gap:20px; padding:9px 0; flex:1; min-width:0; }
.lmw-countdown-number { display:flex; align-items:baseline; gap:6px; color:var(--accent,#146447); }
.lmw-countdown-number strong { font-size:48px; font-weight:600; line-height:1; font-variant-numeric:tabular-nums; }
.lmw-countdown-number span { font-size:12px; }
.lmw-countdown-details { min-width:0; display:grid; gap:7px; }
.lmw-countdown-details h3 { font-size:15px; font-weight:600; overflow-wrap:anywhere; }
.lmw-countdown-details time { color:var(--muted,#5e706a); font-size:12px; }
.lm-widget-body:is([data-size="T"],[data-size="S"]) .lmw-countdown { align-items:flex-start; flex-direction:column; gap:12px; }
.lm-widget-body[data-size="L"] .lmw-countdown-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; }
.lmw-countdown-form .lmw-actions { grid-column:1/-1; }
.lmw-events { display:grid; gap:10px; }
.lm-widget-body[data-size="L"] .lmw-events { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 18px; }
.lmw-event { display:flex; align-items:flex-start; gap:12px; border-left:3px solid var(--accent-soft,#d6e8dc); padding-left:10px; line-height:1.5; }
.lmw-event time { width:54px; flex:none; font-size:12px; color:var(--muted,#5e706a); }
.lmw-event span { min-width:0; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.lm-widget-expanded .lmw-todo-label span { white-space:normal; overflow-wrap:anywhere; }
@media (max-width:600px) { .lm-widget-body[data-size="L"] .lmw-links,.lm-widget-body[data-size="L"] .lmw-countdown-form { grid-template-columns:minmax(0,1fr); } .lmw-button { min-height:40px; } .lmw-input { height:40px; } .lmw-countdown { flex-wrap:wrap; } }
/* A fixed card has ~185px of content space. Editing replaces the link preview,
   and compact forms always keep their submit/cancel/delete row visible. */
.lm-widget-body:not(.lm-widget-expanded) .lmw-form:not(.lmw-notes) { gap:7px; flex-shrink:0; }
.lm-widget-body:not(.lm-widget-expanded) .lmw-form:not(.lmw-notes) .lmw-label { font-size:12px; line-height:16px; gap:3px; }
.lm-widget-body:not(.lm-widget-expanded) .lmw-form:not(.lmw-notes) .lmw-input { height:32px; padding:5px 8px; font-size:13px; }
.lm-widget-body:not(.lm-widget-expanded) .lmw-form:not(.lmw-notes) .lmw-actions { gap:6px; flex-wrap:nowrap; }
.lm-widget-body:not(.lm-widget-expanded) .lmw-form:not(.lmw-notes) .lmw-actions .lmw-meta { display:none; }
.lm-widget-body:not(.lm-widget-expanded) .lmw-form:not(.lmw-notes) .lmw-button { min-height:36px; padding:6px 10px; font-size:12px; }
.lm-widget-body:not(.lm-widget-expanded) .lmw-notes .lmw-actions small { display:none; }
.lm-widget-body:not(.lm-widget-expanded) .lmw-event span { display:block; white-space:nowrap; }
.lm-widget-body:not(.lm-widget-expanded) .lmw-checklist-summary { display:none; }
.lm-widget-body:not(.lm-widget-expanded):is([data-size="T"],[data-size="S"]) .lmw-countdown { flex-direction:row; align-items:center; gap:14px; padding:4px 0; }
.lm-widget-body:not(.lm-widget-expanded) .lmw-countdown-number strong { font-size:40px; }
.lm-widget-body:not(.lm-widget-expanded) .lmw-countdown-details h3 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lm-widget-body:not(.lm-widget-expanded) .lmw-countdown + .lmw-meta { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex-shrink:0; }
@media (max-width:600px) { .lm-widget-body[data-size="L"] .lmw-checklist,.lm-widget-body[data-size="L"] .lmw-events { grid-template-columns:minmax(0,1fr); } .lm-widget-body:not(.lm-widget-expanded) :is(.lmw-links,.lmw-checklist)>li:nth-child(n+4) { display:none; } }
/* Six compact rows fit the fixed card. Wide full-row cards show two columns;
   warnings and the Calendar action stay outside the scrollable event list. */
.lm-widget-body:not(.lm-widget-expanded)[data-module-id="today-schedule"] { container:schedule-card / inline-size; gap:6px; }
.lm-widget-body:not(.lm-widget-expanded)[data-module-id="today-schedule"] .lmw-events { grid-template-columns:minmax(0,1fr); gap:4px 16px; flex:0 1 auto; min-height:0; overflow:auto; align-content:start; scrollbar-width:thin; }
.lm-widget-body:not(.lm-widget-expanded)[data-module-id="today-schedule"] .lmw-event { gap:8px; padding-left:8px; font-size:13px; line-height:20px; }
.lm-widget-body:not(.lm-widget-expanded)[data-module-id="today-schedule"] .lmw-event time { width:48px; font-variant-numeric:tabular-nums; }
.lm-widget-body:not(.lm-widget-expanded)[data-module-id="today-schedule"] .lmw-event:nth-child(n+7) { display:none; }
.lm-widget-body:not(.lm-widget-expanded)[data-module-id="today-schedule"]>.lmw-status { flex-shrink:0; }
.lm-widget-body:not(.lm-widget-expanded)[data-module-id="today-schedule"]>.lmw-quiet { min-height:28px; padding:3px 8px; font-size:12px; line-height:20px; }
@container schedule-card (min-width:480px) {
  .lm-widget-body:not(.lm-widget-expanded)[data-module-id="today-schedule"][data-size="L"] .lmw-events { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .lm-widget-body:not(.lm-widget-expanded)[data-module-id="today-schedule"][data-size="L"] .lmw-event:nth-child(n+7) { display:flex; }
}
/* Layout controls consume extra height while editing. Keep business inputs and
   submit actions fully usable even in a third-width card beside the module panel. */
.hm-editing .lm-widget-body:not(.lm-widget-expanded) { gap:6px; }
.hm-editing .lm-widget-body:not(.lm-widget-expanded) .lmw-form:not(.lmw-notes) { gap:4px; }
.hm-editing .lm-widget-body:not(.lm-widget-expanded) .lmw-form:not(.lmw-notes) .lmw-label { font-size:11px; line-height:14px; gap:2px; }
.hm-editing .lm-widget-body:not(.lm-widget-expanded) .lmw-form:not(.lmw-notes) .lmw-input { height:26px; padding:3px 7px; }
.hm-editing .lm-widget-body:not(.lm-widget-expanded) .lmw-form:not(.lmw-notes) .lmw-button { min-height:28px; padding:4px 8px; }
.hm-editing .lm-widget-body:not(.lm-widget-expanded) .lmw-notes { min-height:0; gap:6px; }
.hm-editing .lm-widget-body:not(.lm-widget-expanded) .lmw-textarea { min-height:60px; }
.hm-editing .lm-widget-body:not(.lm-widget-expanded) .lmw-todo { min-height:26px; }
.hm-editing .lm-widget-body:not(.lm-widget-expanded) .lmw-todo-label { font-size:12px; }
.hm-editing .lm-widget-body:not(.lm-widget-expanded) .lmw-todo-delete { min-height:26px; }
.hm-editing .lm-widget-body:not(.lm-widget-expanded) .lmw-add-todo .lmw-input { height:30px; }
.hm-editing .lm-widget-body:not(.lm-widget-expanded) .lmw-add-todo .lmw-button { min-height:30px; padding:4px 8px; font-size:12px; }
.hm-editing .lm-widget-body:not(.lm-widget-expanded)[data-size="T"] .lmw-links>li:nth-child(n+3) { display:none; }
