/* Hoja de edición. Los encabezados y el número de fila acompañan el desplazamiento. */
html:has(dialog.jsheet[open]) { overflow: hidden; }
.jsheet {
  width: min(1570px,calc(100% - 34px));
  height: min(800px,calc(100dvh - 40px));
  max-width: 100%;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #afc0c7;
  border-radius: 5px;
  background: #fff;
  color: #183849;
  box-shadow: 0 20px 88px #092b4055;
}
.jsheet::backdrop { background: #0c283d75; }
.jsheet [hidden] { display: none !important; }
.jsheet[open] { display: flex; flex-direction: column; }
.jsheet-layout { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.jsheet > .notice { flex: none; margin: 0; border-radius: 0; }
.jsheet-head { flex: none; display: flex; justify-content: space-between; align-items: start; gap: 14px; padding: 17px 21px 13px; }
.jsheet-head h2 { margin: 0; font-size: 1.47rem; letter-spacing: -.04em; line-height: 1.24; color: #153749; }
.jsheet-head p { margin: 3px 0 0; color: #536a77; font-size: .84rem; }
.jsheet-head p::first-letter { text-transform: uppercase; }
.jsheet .icon-btn, .jsheet .btn { border-radius: 4px; }
.jsheet-command { display: flex; flex: none; align-items: center; gap: 12px; padding: 0 20px 12px; }
.jsheet-modes { display: inline-flex; padding: 2px; gap: 2px; background: #eaf1f1; border: 1px solid #cbd9dc; border-radius: 4px; }
.jsheet-modes button, .jsheet-paste-plan { min-height: 31px; padding: 4px 11px; border: 1px solid transparent; border-radius: 2px; background: transparent; font-size: .81rem; font-weight: 680; color: #45616c; }
.jsheet-modes button[aria-pressed=true] { background: white; border-color: #bfd0cb; color: #145a50; box-shadow: 0 1px 2px #163c3e14; }
.jsheet-paste-plan { display: flex; align-items: center; gap: 6px; color: #185f55; border-color: #b4d2c8; background: #f4faf7; }
.jsheet-paste-plan:hover, .jsheet-paste-plan[aria-expanded=true] { background: #e1f1e9; }
.jsheet-tools { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 0; padding: 6px 13px; border-block: 1px solid #d9e4e6; background: #f5f8f8; }
.jsheet-tool-group { display: flex; align-items: center; gap: 4px; padding-inline: 7px; }
.jsheet-tool-group + .jsheet-tool-group { border-left: 1px solid #d6e1e3; }
.jsheet-tools button, .jsheet-tools summary, .jsheet-extra button, .jsheet-confirm button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 8px; min-height: 32px; margin: 0; border-radius: 3px;
  border: 1px solid transparent; background: transparent; color: #304f5d;
  font: inherit; font-size: .81rem; line-height: 1.3; font-weight: 650; cursor: pointer;
}
.jsheet-tools .jsheet-add { border-color: #a6c8bd; background: #edf7f2; color: #0a6256; }
.jsheet-tools button:not(:disabled):hover, .jsheet-tools summary:hover, .jsheet-extra button:hover { background: #e7efed; border-color: #c4d5d0; }
.jsheet-tools button:disabled { opacity: .5; cursor: default; }
.jsheet-tools button[aria-expanded=true] { color: #065e52; background: #e5f1ed; border-color: #bbd5c9; }
.jsheet-menu { position: relative; }
.jsheet-menu summary { list-style: none; }
.jsheet-menu summary::-webkit-details-marker { display: none; }
.jsheet-menu[open] summary { background: #eaf1ee; }
.jsheet-menu > div { position: absolute; z-index: 9; top: 100%; left: 0; min-width: 158px; width: max-content; padding: 4px; border: 1px solid #c8d6db; border-radius: 3px; background: #fff; box-shadow: 0 4px 18px #17334725; }
.jsheet-menu > div button { display: flex; justify-content: start; width: 100%; }
.jsheet-menu button[data-act=remove] { color: #923935; }
.jsheet-extra { flex: none; min-height: 0; max-height: 32%; overflow-y: auto; padding: 10px 20px; background: #f5faf7; border-bottom: 1px solid #d8e3df; font-size: .84rem; color: #3e5d66; }
.jsheet-extra-head, .jsheet-segments, .jsheet-reuse-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jsheet-extra-head strong { font-size: .89rem; overflow-wrap: anywhere; }
.jsheet-extra-head > button { flex-shrink: 0; }
.jsheet-details { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(145px,100%),1fr)); gap: 10px; margin-block: 5px 9px; }
.jsheet-extra label { font-size: .78rem; font-weight: 650; color: #435f68; }
.jsheet-details label { display: grid; gap: 3px; min-width: 0; }
.jsheet-extra select:not([multiple]) { min-height: 32px; min-width: 0; border: 1px solid #bfd0d4; border-radius: 3px; background-color: #fff; font-size: .82rem; color: #183b49; padding: 4px 27px 4px 8px; }
.jsheet-segments { justify-content: start; flex-wrap: wrap; }
.jsheet-segments label, .jsheet-extra-head label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.jsheet-extra button[data-act=remove-segment] { color: #873932; }
.jsheet[data-mode] .jsheet-extra:has(.jsheet-reuse-rows) {
  display: flex; flex: 0 1 auto; flex-direction: column; gap: 4px; max-height: min(41dvh,325px);
  padding-block: 5px; background: #fff; border-bottom-color: #c5d3d8;
}
@media (min-height: 550px) {
  .jsheet-layout:has(.jsheet-reuse-rows) > .jsheet-scroll { flex: 1 0 min(104px,16dvh); min-height: min(104px,16dvh); }
}
.jsheet-reuse-rows {
  --jw-ink: #264654; min-height: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px;
  overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: 32px 3px;
}
.jsheet-reuse-group { min-width: 0; align-self: start; border: 1px solid #d4dfe3; }
.jsheet-reuse-group-head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 5px; padding: 3px 6px;
  border-bottom: 1px solid #cbdadd; background: #edf3f4; color: #294b58;
}
.jsheet-reuse-group[data-schedule=timed] .jsheet-reuse-group-head { background: #e7f3ee; color: #24594e; }
.jsheet-reuse-group-head h3 { margin: 0; font-size: .75rem; line-height: 1.35; font-weight: 720; }
.jsheet-reuse-count { margin-inline-start: auto; font-size: .6875rem; font-variant-numeric: tabular-nums; }
.jsheet-extra .jsheet-reuse-jump { display: none; }
.jsheet-reuse-cards { display: grid; gap: 2px; padding: 2px; }
.jsheet-reuse-cards .jsheet-reuse-card {
  display: grid; grid-template-columns: 19px minmax(0,1fr); align-items: stretch; min-width: 0;
  color: var(--jw-ink); font-size: .6875rem; line-height: 14px; font-weight: 400; cursor: pointer;
}
.jsheet-reuse-card input { align-self: start; justify-self: center; width: 13px; height: 13px; margin: 2px 0; accent-color: #126f61; cursor: inherit; }
.jsheet-reuse-card .jw-event { height: auto; }
.jsheet-reuse-card .jw-name, .jsheet-reuse-card .jw-context, .jsheet-reuse-card .jw-plan-task > span {
  display: block; overflow: visible; -webkit-line-clamp: unset; overflow-wrap: anywhere;
}
.jsheet-reuse-card .jw-plan-task:hover { text-decoration: none; }
.jsheet-reuse-card .jw-plan-task:hover > [id$="-title"] { text-decoration: underline; }
.jsheet-reuse-card .jsheet-reuse-times { display: flex; flex-wrap: wrap; gap: 0 8px; white-space: normal; }
.jsheet-reuse-range { white-space: nowrap; }
.jsheet-reuse-details, .jsheet-reuse-comment, .jsheet-reuse-reason { display: block; }
.jsheet-reuse-card .jw-context, .jsheet-reuse-comment { white-space: pre-wrap; overflow-wrap: anywhere; }
.jsheet-reuse-card .jw-plan-task .jw-context { padding-inline: 0; }
.jsheet-reuse-comment, .jsheet-reuse-reason { margin-top: 1px; font-size: .6875rem; line-height: 14px; color: #435f67; }
.jsheet-reuse-comment b { font-weight: 650; }
.jsheet-reuse-card .jw-event :is(.jsheet-reuse-comment,.jsheet-reuse-reason) { padding-inline: 6px 4px; }
.jsheet-reuse-reason { color: #74512a; }
.jsheet-reuse-card:has(:checked) .jsheet-reuse-copy { outline: 1px solid #216f63; outline-offset: -1px; }
.jsheet-reuse-card:has(:focus-visible) { outline: 2px solid #147d91; outline-offset: -2px; }
.jsheet-reuse-card:has(:disabled) { cursor: default; }
.jsheet-reuse-card:has(:disabled) .jsheet-reuse-copy { cursor: default; }
.jsheet-reuse-group p.jsheet-reuse-empty { margin: 0; padding: 5px 7px; font-size: .72rem; color: #536b75; }
.jsheet-reuse-foot { justify-content: space-between; flex-shrink: 0; }
.jsheet-reuse-selection { min-width: 0; font-size: .73rem; color: #415c67; font-variant-numeric: tabular-nums; }
.jsheet-extra .jsheet-reuse-foot [data-act=copy-rows] { margin-inline-start: auto; background: #166a5d; color: #fff; border: 1px solid #166a5d; }
.jsheet-extra .jsheet-reuse-foot [data-act=copy-rows]:disabled { opacity: 1; background: #edf1f2; color: #536972; border-color: #cad6da; cursor: default; }
.jsheet-extra .jsheet-reuse-foot [data-act=copy-rows]:enabled:hover { background: #10594f; }
@media (max-width: 640px) {
  .jsheet-reuse-rows { grid-template-columns: minmax(0,1fr); gap: 5px; }
  .jsheet-reuse-group-head:has(.jsheet-reuse-jump) { padding-block: 0; }
  .jsheet-reuse-group-head:has(.jsheet-reuse-jump) .jsheet-reuse-count { margin-inline-start: 0; }
  .jsheet-extra .jsheet-reuse-jump {
    display: inline-flex; margin-inline-start: auto; padding: 2px 4px; min-height: 30px;
    color: #16594f; font-size: .72rem; text-decoration: underline; text-underline-offset: 2px;
  }
  .jsheet-reuse-cards .jsheet-reuse-card { grid-template-columns: 23px minmax(0,1fr); min-height: 24px; }
  .jsheet-reuse-card input { width: 15px; height: 15px; }
}
@media (max-width: 640px) and (min-height: 451px) {
  .jsheet-layout:has(.jsheet-reuse-rows) { overflow-y: auto; overscroll-behavior: contain; }
  .jsheet[data-mode] .jsheet-extra:has(.jsheet-reuse-rows) { flex: none; max-height: min(46dvh,335px); }
  .jsheet-layout:has(.jsheet-reuse-rows) > .jsheet-scroll { flex: 1 0 100px; min-height: 100px; }
}
@media (max-height: 450px) {
  .jsheet[data-mode] .jsheet-extra:has(.jsheet-reuse-rows) { display: block; flex: none; max-height: 44dvh; }
  .jsheet-reuse-rows { margin-block: 3px; overflow: visible; }
  .jsheet-reuse-group-head { position: static; }
}
.jsheet-extra p { margin: 3px 0 0; }
.jsheet-extra:has([data-plan-input]) { max-height: 43%; }
.jsheet-import-label { display: block; margin: 2px 0 5px; }
.jsheet-extra textarea { display: block; width: 100%; min-height: 50px; max-height: 100px; resize: vertical; background: white; border: 1px solid #adcbc0; border-radius: 3px; padding: 6px 8px; font-size: .84rem; color: #244856; }
.jsheet-import-actions { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-top: 6px; }
.jsheet-import-actions label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.jsheet-import-actions select { max-width: 100%; }
.jsheet-extra [data-act=insert-plan] { background: #176c60; color: white; border-color: #176c60; }
.jsheet-extra [data-act=insert-plan]:disabled { background: #e8eeeb; color: #50665d; border-color: #cbdad3; cursor: default; }
.jsheet-extra [data-act=insert-plan]:not(:disabled):hover { color: #fff; background: #105a50; }
.jsheet-extra [data-plan-preview] { margin-top: 6px; color: #3d595f; font-size: .78rem; }
.jsheet-extra [data-plan-preview]:empty { display: none; }
.jsheet-extra [data-plan-preview] ol { margin: 3px 0; padding: 0; list-style: none; background: #fff; border: 1px solid #d4e2dc; }
.jsheet-extra [data-plan-preview] li { display: grid; grid-template-columns: 2em minmax(0,1fr) minmax(0,1.45fr); gap: 7px; padding: 3px 7px; }
.jsheet-extra [data-plan-preview] li + li { border-top: 1px solid #e0eae5; }
.jsheet-extra [data-plan-preview] li > * { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.jsheet-extra [data-plan-preview] .jsheet-plan-comments li { grid-template-columns: 2em minmax(0,1fr) minmax(0,1.2fr) minmax(0,1.2fr); }
.jsheet-guide { flex: none; display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 7px 20px; }
.jsheet-tip { margin: 0; font-size: .77rem; line-height: 1.4; color: #516871; }
.jsheet-cell-tools { display: flex; flex: none; align-items: baseline; gap: 9px; }
.jsheet-cell-tools button { padding: 3px 5px; color: #145e52; font-size: .76rem; font-weight: 650; background: #eff7f3; border: 1px solid #bed5cb; border-radius: 3px; }
.jsheet-cell-tools button:disabled { color: #687a76; background: #f1f4f2; }
.jsheet-keys { position: relative; flex: none; font-size: .75rem; color: #45616d; }
.jsheet-keys summary { white-space: nowrap; cursor: pointer; }
.jsheet-keys dl { position: absolute; z-index: 6; top: 100%; right: 0; width: min(345px,80vw); max-height: min(50dvh,330px); overflow: auto; margin: 4px 0; padding: 9px; background: white; border: 1px solid #c8d6db; border-radius: 3px; box-shadow: 0 4px 18px #17334725; }
.jsheet-keys dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 3px; }
.jsheet-keys dt { font-weight: 680; color: #204852; }
.jsheet-keys dd { margin: 0; text-align: right; }
.jsheet-scroll { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; border-block: 1px solid #c5d3d8; background: #f6f8f9; }
.jsheet-table { width: 100%; min-width: 1100px; border-collapse: separate; border-spacing: 0; table-layout: fixed; text-align: left; background: #fff; }
.jsheet-col-row { width: 34px; }
.jsheet-col-status { width: 116px; }
.jsheet-col-title { width: 19%; }
.jsheet-col-context { width: 23%; }
.jsheet-col-done { width: 68px; }
.jsheet-col-start, .jsheet-col-end { width: 101px; }
.jsheet-col-duration { width: 68px; }
.jsheet-table thead th { position: sticky; top: 0; z-index: 2; height: 35px; padding: 6px 8px; background: #123747; color: #fff; border-right: 1px solid #496574; font-size: .76rem; font-weight: 670; line-height: 1.35; }
.jsheet-table thead th:first-child { position: sticky; left: 0; z-index: 4; text-align: center; padding-inline: 2px; background: #0d3041; }
.jsheet-table tbody th, .jsheet-table td { border-right: 1px solid #d4dee2; border-bottom: 1px solid #d4dee2; padding: 0; }
.jsheet-table tbody th { position: sticky; left: 0; z-index: 1; text-align: center; color: #526a76; background: #f0f4f5; vertical-align: top; }
.jsheet-table tbody th button { display: block; width: 100%; min-height: 24px; padding: 2px; background: transparent; color: inherit; font: inherit; font-size: .74rem; font-variant-numeric: tabular-nums; font-weight: 650; border: 0; }
.jsheet-table tbody th .jsheet-between { min-height: 22px; font-size: 1.02rem; line-height: 17px; color: #467567; }
.jsheet-table tbody th .jsheet-between:hover { color: #0a5648; background: #cfe6db; }
.jsheet-table td { vertical-align: top; font-size: .84rem; }
.jsheet-table .jsheet-current th { background: #dceee6; color: #115e53; box-shadow: inset 3px 0 #237a69; }
.jsheet-table .jsheet-current td { background-color: #fcfefd; }
.jsheet-table .jsheet-row-selected td, .jsheet-table .jsheet-row-selected td.jsheet-c-duration { background: #e1f2ee; box-shadow: inset 0 1px #379580,inset 0 -1px #379580; }
.jsheet-table .jsheet-row-selected th { background: #1c6759; color: white; }
.jsheet-table .jsheet-row-selected th .jsheet-between { color: white; }
.jsheet:not([data-cell-mode=edit]) .jsheet-table textarea:focus { caret-color: transparent; }
.jsheet-table :is(textarea,select,input[type=time]) { display: block; width: 100%; max-width: none; font: inherit; color: #183d4d; line-height: 1.35; border: 1px solid transparent; border-radius: 0; background-color: transparent; }
.jsheet-table textarea { padding: 8px; min-height: 47px; height: 100%; resize: vertical; }
.jsheet-table td.jsheet-c-title textarea { font-weight: 650; }
.jsheet-space-label { display: inline-block; margin: 5px 8px 0; padding: 1px 6px; border-radius: 3px; background: #f2eadb; color: #765221; font-size: .68rem; font-weight: 700; }
.jsheet-table textarea::placeholder { color: #70838a; font-weight: 450; }
.jsheet-bottom-add { display: flex; align-items: center; gap: 7px; min-height: 33px; margin: 6px; padding: 5px 10px; border: 1px dashed #a4c8bb; border-radius: 3px; color: #1c6556; background: #f7fcf9; font-size: .78rem; font-weight: 650; }
.jsheet-bottom-add:hover { background: #e8f5ec; }
.jsheet[data-mode=plan] .jsheet-clock-tools,
.jsheet[data-mode=plan] col:not(.jsheet-col-row,.jsheet-col-title,.jsheet-col-context),
.jsheet[data-mode=plan] .jsheet-table thead th:not(:nth-child(1),:nth-child(3),:nth-child(4)),
.jsheet[data-mode=plan] .jsheet-table td:not(.jsheet-c-title,.jsheet-c-context) { display: none; }
.jsheet[data-mode=plan] .jsheet-table { min-width: 0; }
.jsheet[data-mode=plan] .jsheet-col-title { width: 39%; }
.jsheet[data-mode=plan] .jsheet-col-context { width: auto; }
.jsheet[data-mode=plan] .jsheet-table textarea { min-height: 49px; }
.jsheet-table select:not([multiple]) { width: calc(100% - 8px); min-height: 29px; margin: 4px; padding: 4px 18px 4px 5px; border-radius: 2px; background-size: 12px; background-position: right 3px center; font-size: .78rem; font-weight: 650; }
.jsheet-table select[data-status="En proceso"] { color: #126157; background-color: #e6f2ed; }
.jsheet-table select[data-status="Culminado"] { color: #366641; background-color: #eaf3e9; }
.jsheet-table select[data-status="Pendiente"] { color: #526774; background-color: #f0f3f5; }
.jsheet-table .jsheet-c-done, .jsheet-table .jsheet-c-duration { text-align: center; }
.jsheet-table input[type=checkbox] { width: 16px; height: 16px; margin: 11px auto; cursor: pointer; accent-color: #146e62; }
.jsheet-table input[type=time] { min-height: 36px; height: 36px; padding: 4px; font-size: .8rem; font-variant-numeric: tabular-nums; }
.jsheet-table input[type=time] + input[type=time] { border-top: 1px dashed #d8e2df; }
.jsheet-table input[type=time]::-webkit-calendar-picker-indicator { width: 12px; padding: 0; opacity: .55; }
.jsheet-table .jsheet-c-duration { background-color: #f4f8f7; }
.jsheet-table .jsheet-current .jsheet-c-duration { background-color: #edf6f2; }
.jsheet-table tr td.jsheet-in-range, .jsheet-table tr.jsheet-current td.jsheet-in-range { background-color: #d8eee7; border-right-color:#b8d6cd; border-bottom-color:#b8d6cd; }
@media (forced-colors:active) {
  .jsheet-table td.jsheet-in-range,.jsheet-table tr.jsheet-row-selected td { outline:1px dashed Highlight; outline-offset:-2px; }
}
.jsheet-table output { display: block; padding: 10px 3px; font-weight: 700; color: #35595d; font-variant-numeric: tabular-nums; }
.jsheet :focus-visible { outline: 2px solid #147d91; outline-offset: 1px; }
.jsheet-table :is(textarea,select,input[type=time]):focus, .jsheet-scroll:focus-visible { outline: 2px solid #278272; outline-offset: -2px; }
.jsheet-table :is(textarea,input[type=time]):focus { background-color: #f3fbf7; }
.jsheet-table .jsheet-editing:focus { outline-color: #0e6874; background-color: white; caret-color: #123f4b; }
.jsheet-table output:focus { outline: 2px solid #278272; outline-offset: -2px; }
.jsheet-notice, .jsheet-alert { flex: none; font-size: .82rem; line-height: 1.45; padding: 7px 20px; background: #eef8f3; color: #155e51; }
.jsheet-alert { color: #85372e; background: #fff1ec; }
.jsheet-foot, .jsheet-confirm { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 12px 18px; background: #fff; }
.jsheet-summary { display: grid; gap: 2px; color: #244857; font-size: .82rem; font-variant-numeric: tabular-nums; }
.jsheet-summary span { color: #596f79; font-size: .75rem; }
.jsheet-foot-actions, .jsheet-confirm > div { display: flex; gap: 5px; align-items: center; }
.jsheet-confirm { border-top: 1px solid #dcc7ba; background: #fffbf6; }
.jsheet-confirm p { font-size: .86rem; margin: 0; }
.jsheet-confirm section { min-width: 0; }
.jsheet-confirm h3 { margin: 0 0 3px; color: #693e30; font-size: .91rem; }
.jsheet-confirm p { overflow-wrap: anywhere; }
.jsheet-confirm button { background: #fff; border: 1px solid #d3dce0; }
.jsheet-confirm button[data-act=discard] { color: #913429; border-color: #dfb7ad; }
.jsheet-confirm[data-kind=remove] { border-left: 4px solid #a0352b; border-top-color: #dabbb5; background: #fff2ee; }
.jsheet-confirm[data-kind=remove] h3 { color: #79261f; }
.jsheet-confirm[data-kind=remove] button[data-act=discard] { color: #fff; background: #992f27; border-color: #7c201c; }
.jsheet-confirm[data-kind=remove] button[data-act=discard]:hover { background: #7d211c; }
.jsheet-copy { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; border: none; }
.jsheet[aria-busy=true] .jsheet-foot { opacity: .7; }
@media (min-width: 851px) and (min-height: 550px) {
  .jsheet[data-mode=plan] {
    width: min(1040px,calc(100% - 50px));
    height: auto;
    inset-block-end: auto;
    min-height: min(440px,78dvh);
    max-height: min(860px,86dvh);
    margin: 7dvh auto auto;
  }
  .jsheet[data-mode=plan] .jsheet-extra { max-height: 30dvh; }
}
@media (max-width: 850px) {
  .jsheet { width: calc(100% - 12px); height: calc(100dvh - 16px); }
  .jsheet-head { padding: 12px 14px; }
  .jsheet-tools { padding: 5px 8px; }
  .jsheet-tool-group { padding-inline: 4px; }
  .jsheet-tools button, .jsheet-tools summary { padding-inline: 6px; }
  .jsheet-extra { padding: 7px 12px; }
  .jsheet-details { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .jsheet-command { padding: 0 13px 9px; }
  .jsheet-guide { padding: 6px 13px; }
}
@media (max-width: 560px) {
  .jsheet { width: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .jsheet-head { padding: 9px 11px 7px; }
  .jsheet-head h2 { font-size: 1.15rem; }
  .jsheet-head p { font-size: .77rem; }
  .jsheet-tools { padding: 4px 7px; gap: 2px 0; }
  .jsheet-tool-group { padding: 0 2px; gap: 1px; }
  .jsheet-tool-group + .jsheet-tool-group { border: 0; }
  .jsheet-tools button, .jsheet-tools summary { min-height: 28px; font-size: .76rem; padding: 4px; gap: 3px; }
  .jsheet-tools .j-icon { width: 13px; }
  .jsheet-command { gap: 5px; padding: 0 9px 7px; }
  .jsheet-modes button, .jsheet-paste-plan { padding-inline: 6px; font-size: .76rem; }
  .jsheet-guide { padding: 4px 9px; gap: 4px 8px; align-items: center; flex-wrap: wrap; }
  .jsheet-cell-tools { margin-left: auto; }
  .jsheet-tip { font-size: .71rem; }
  .jsheet-keys { font-size: .7rem; }
  .jsheet[data-mode=plan] .jsheet-col-row { width: 29px; }
  .jsheet[data-mode=plan] .jsheet-col-title { width: 41%; }
  .jsheet-extra [data-plan-input] { font-size: 1rem; }
  .jsheet-extra { max-height: 26%; }
  .jsheet-foot, .jsheet-confirm { flex-wrap: wrap; padding: 8px 9px; }
  .jsheet-foot-actions, .jsheet-confirm > div { margin-left: auto; }
  .jsheet .btn { min-height: 33px; padding: 7px; font-size: .81rem; }
  .jsheet-table :is(textarea,input[type=time]) { font-size: 1rem; }
  .jsheet-table input[type=time] { padding-inline: 1px; }
}
@media (max-height: 450px) {
  .jsheet { height: 100dvh; }
  .jsheet-head { padding: 5px 10px; }
  .jsheet-head h2 { font-size: 1rem; }
  .jsheet-guide { padding-block: 2px; }
  .jsheet-tip { display: none; }
  .jsheet-foot, .jsheet-confirm { padding-block: 5px; }
}

.activity-suggestions {
  position:fixed; z-index:20; box-sizing:border-box; overflow-y:auto; overscroll-behavior:contain;
  padding:3px; border:1px solid #b5c9d1; border-radius:6px; background:#fff;
  box-shadow:0 6px 20px #18384929; color:#183849; text-align:left;
}
.activity-suggestions[hidden] {display:none}
.activity-suggestions [role="option"] {padding:7px 9px; border-radius:3px; cursor:pointer; overflow-wrap:anywhere;}
.activity-suggestions [role="option"] + [role="option"] {border-top:1px solid #edf1f3;}
.activity-suggestions [role="option"]:hover, .activity-suggestions [aria-selected="true"] {background:#e8f5f3;}
.activity-suggestions strong, .activity-suggestions small {display:block; line-height:1.35;}
.activity-suggestions strong {font-size:.84rem; font-weight:650;}
.activity-suggestions small {margin-top:2px; font-size:.72rem; color:#49616f;}
