
.hwl-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.hwl { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hwl[hidden] { display: none; }
.hwl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.hwl-add { min-height: 44px; padding: 0 18px; font-weight: 800; }
.hwl-groupby { display: inline-flex; border: 1.5px solid var(--color-border); border-radius: 999px; overflow: hidden; margin-left: auto; }
.hwl-gb { background: none; border: 0; padding: 8px 12px; min-height: 40px; font-size: 13px; font-weight: 700; color: var(--color-text-secondary); cursor: pointer; white-space: nowrap; }
.hwl-gb[aria-pressed="true"] { background: var(--color-text); color: var(--color-surface); }
.hwl-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.hwl-fchip { border: 1.5px solid var(--color-border); background: var(--color-surface); color: var(--color-text); border-radius: 999px; padding: 6px 12px; min-height: 36px; font-size: 13px; font-weight: 600; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hwl-fchip[aria-pressed="true"] { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.hwl-evening { padding: 10px 12px; border-radius: var(--radius-md); background: var(--color-surface-2); color: var(--color-text); font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.hwl-evening--late { background: #fdecea; color: #8e2418; }
[data-theme="dark"] .hwl-evening--late { background: #4a1208; color: #ffb4a8; }
.hwl-empty { display: flex; flex-direction: column; gap: 4px; padding: 18px 14px; border: 1.5px dashed var(--color-border); border-radius: var(--radius-md); color: var(--color-text-secondary); text-align: center; }
.hwl-empty strong { color: var(--color-text); }
.hwl-muted { color: var(--color-text-muted); }
.hwl-small { font-size: 12px; }

.hwl-group { display: flex; flex-direction: column; gap: 6px; }
.hwl-group__head { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.hwl-group__label, .hwl-group__toggle { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-secondary); }
.hwl-group__label--late { color: #c0392b; }
[data-theme="dark"] .hwl-group__label--late { color: #ef9a9a; }
.hwl-group__toggle { background: none; border: 0; padding: 6px 0; min-height: 36px; cursor: pointer; }
.hwl-list { display: flex; flex-direction: column; gap: 8px; }

.hwl-row { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 10px 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.hwl-row--late { border-left: 4px solid #c0392b; }
.hwl-row--done .hwl-row__title { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--color-text-secondary); }
.hwl-row--suggest { border-style: dashed; background: var(--color-surface-2); }
.hwl-row--flash { animation: hwlFlash 1.6s ease-out 1; }
@keyframes hwlFlash { 0% { box-shadow: 0 0 0 3px var(--color-primary); } 100% { box-shadow: 0 0 0 0 transparent; } }
.hwl-check { flex: none; width: 32px; height: 32px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--color-text-secondary); background: var(--color-surface); color: #fff; font-size: 17px; font-weight: 900; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.hwl-check[aria-pressed="true"] { background: #2e7d32; border-color: #2e7d32; }
.hwl-check--src { border: 0; background: none; font-size: 20px; cursor: default; color: inherit; }
.hwl-row__main { flex: 1; min-width: 0; }
.hwl-row__head { display: flex; flex-direction: column; gap: 3px; width: 100%; background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer; min-height: 32px; }
.hwl-row__title { display: block; font-weight: 700; color: var(--color-text); overflow-wrap: anywhere; line-height: 1.3; }
.hwl-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; color: var(--color-text-secondary); }
.hwl-due { font-weight: 700; }
.hwl-due--late { color: #c0392b; }
.hwl-due--soon { color: #a15c00; }
[data-theme="dark"] .hwl-due--late { color: #ef9a9a; }
[data-theme="dark"] .hwl-due--soon { color: #ffcc80; }
.hwl-chip { display: inline-block; max-width: 100%; padding: 1px 8px; border-radius: 999px; background: var(--color-surface-2); color: var(--color-text-secondary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hwl-chip--class { background: rgba(46, 125, 150, .24); color: var(--color-text); }
.hwl-chip--teacher { background: rgba(217, 138, 28, .26); color: var(--color-text); }
.hwl-st { font-weight: 700; }
.hwl-st--doing { color: var(--cp-cyan, #1d5e73); }
.hwl-st--done, .hwl-st--handed { color: #2e7d32; }
[data-theme="dark"] .hwl-st--doing { color: #9fd6e8; }
[data-theme="dark"] .hwl-st--done, [data-theme="dark"] .hwl-st--handed { color: #81c784; }
.hwl-st--todo { display: none; }
.hwl-prog { font-weight: 700; font-variant-numeric: tabular-nums; }

.hwl-row__body { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.hwl-text { margin: 0; font-size: 14px; color: var(--color-text); overflow-wrap: anywhere; }
.hwl-quote { margin: 6px 0 0; font-size: 14px; color: var(--color-text-secondary); font-style: italic; overflow-wrap: anywhere; }
.hwl-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.hwl-item { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; min-height: 36px; font-size: 14px; cursor: pointer; overflow-wrap: anywhere; }
.hwl-item input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: #2e7d32; }
.hwl-item input:checked + span { text-decoration: line-through; color: var(--color-text-secondary); }
.hwl-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.hwl-photos img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--color-border); }
.hwl-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.hwl-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; padding: 4px 12px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text);
  font: inherit; font-size: 13px; font-weight: 700; line-height: 1.2; text-transform: none; letter-spacing: 0; cursor: pointer; max-width: 100%;
}
.hwl-act:hover { border-color: var(--color-primary); }
.hwl-act:focus-visible { outline: 3px solid var(--cp-cyan, #4adcd8); outline-offset: 2px; }
.hwl-act:disabled { opacity: .6; cursor: default; }
.hwl-act--primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.hwl-act--ghost { background: none; border-color: transparent; color: var(--color-text-secondary); }
.hwl-act--ghost:hover { border-color: var(--color-border); }
.hwl-act[aria-pressed="true"] { background: #c0392b; border-color: #c0392b; color: #fff; }
.hwl-stsel select { min-height: 36px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); padding: 0 8px; font-size: 13px; font-weight: 600; }
.hwl-del { color: #c0392b; }
.hwl-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--color-surface-2); font-size: 13px; color: var(--color-text-secondary); }
.hwl-share span { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.hwl-sheet { max-width: 520px; width: 100%; max-height: min(92vh, 820px); overflow-y: auto; }
.hwl-text-in { height: auto; min-height: 84px; padding: 10px 12px; line-height: 1.4; resize: vertical; }
.hwl-inputs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 10px; }
.hwl-inputs .hwl-act { min-height: 40px; }
.hwl-lang { min-height: 38px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); padding: 0 6px; font-size: 13px; }
.hwl-pagebox { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 6px; align-items: start; }
.hwl-pagebox[hidden] { display: none; }
.hwl-pagebox .modal-input { margin-bottom: 8px; min-width: 0; }
.hwl-pagebox .hwl-act { min-height: 46px; }
.hwl-photos--sheet:empty { display: none; }
.hwl-photos--sheet { margin-bottom: 10px; }
.hwl-ph { position: relative; }
.hwl-ph button { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--color-text); color: var(--color-surface); font-size: 12px; cursor: pointer; }
.hwl-itemsbox { margin-bottom: 8px; }
.hwl-itemshead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hwl-itemshead .modal-label { margin: 0; }
.hwl-edit-items { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hwl-edit-items li { display: flex; gap: 6px; align-items: center; }
.hwl-edit-items .modal-input { margin: 0; height: 40px; min-width: 0; }
.hwl-edit-items .hwl-act { min-height: 40px; min-width: 40px; }
.hwl-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 10px; }
.hwl-grid .modal-input { min-width: 0; }
.hwl-grid small { display: block; margin: -10px 0 8px; font-size: 11px; min-height: 13px; }
.hwl-toggle { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; font-weight: 600; color: var(--color-text); }
.hwl-toggle input { width: 20px; height: 20px; }
@media (max-width: 380px) { .hwl-grid { grid-template-columns: minmax(0, 1fr); } .hwl-groupby { margin-left: 0; } }

.hwl-mini { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.hwl-mini__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hwl-mini__head .section-label { margin: 0; }
.hwl-mini__row { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; text-align: left; padding: 8px 10px; min-height: 44px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); color: inherit; cursor: pointer; }
.hwl-mini__t { font-weight: 700; overflow-wrap: anywhere; }
.hwl-mini__all { align-self: flex-start; }

.hwl-rec { display: flex; flex-direction: column; gap: 6px; }
.hwl-rec__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); min-width: 0; }
.hwl-rec__t { font-weight: 700; overflow-wrap: anywhere; }
.hwl-rec__m { font-size: 12px; color: var(--color-text-secondary); }
.hwl-rec__row .hwl-act { flex: none; }
.hwl-rec__day { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-secondary); margin-top: 6px; }

.lpo-hw { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-md); border: 1.5px dashed var(--color-border); }
.lpo-hw h4 { margin: 0 0 6px; }
.lpo-hw__item { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-top: 1px solid var(--color-border); }
.lpo-hw__item:first-of-type { border-top: 0; }
.lpo-hw__acts { display: flex; flex-wrap: wrap; gap: 6px; }
