.mhlog-dialog {
  box-sizing:border-box; color:#193b35; color-scheme:light;
  position:fixed; inset:0; width:min(37rem,calc(100% - 1.5rem));
  max-width:none; max-height:min(49rem,calc(100vh - 2rem));
  max-height:min(49rem,calc(100dvh - 2rem)); margin:auto; padding:0;
  background:#fffdf8; border:1px solid #c5d1c8; border-radius:1.05rem;
  font:inherit; line-height:1.5; text-align:start; overflow:hidden;
  box-shadow:0 20px 72px #0f292d40;
}
.mhlog-dialog[open] {display:flex;flex-direction:column}
.mhlog-dialog:not([open]),.mhlog-dialog [hidden] {display:none!important}
.mhlog-dialog::backdrop {background:rgb(11 31 32 / .7)}
.mhlog-dialog *, .mhlog-toast {box-sizing:border-box}
.mhlog-dialog button, .mhlog-dialog input {font:inherit}
.mhlog-dialog svg,.mhlog-toast svg {
  width:1.22rem;height:1.22rem;flex:none;fill:none;stroke:currentColor;stroke-width:1.65;
  stroke-linecap:round;stroke-linejoin:round;pointer-events:none;
}
.mhlog-head {
  flex:none;display:flex;align-items:center;justify-content:space-between;gap:.9rem;
  padding:.75rem 1.1rem;border-bottom:1px solid #d9e1d5;
}
.mhlog-heading {display:flex;align-items:center;gap:.55rem}
.mhlog-heading h2 {margin:0;font-family:inherit;font-weight:700;font-size:1.35rem;line-height:1.5;color:#163e36;}
.mhlog-heading h2:focus{outline:none}
.mhlog-book {display:grid;place-items:center;width:2.1rem;height:2.1rem;border-radius:.6rem;background:#e8f0e7;color:#245b4e}
.mhlog-dialog .mhlog-close {
  display:inline-flex;align-items:center;gap:.5rem;padding:.3rem .65rem;min-height:42px;
  color:#315c4f;background:#fafaf4;border:1px solid #c5d4c8;border-radius:.55rem;font-size:.91rem;cursor:pointer;
}
.mhlog-close span {font:1.3rem/1 Arial,sans-serif}
.mhlog-scroll {overflow-y:auto;overscroll-behavior:contain;padding:.9rem 1.1rem 1rem;min-height:0}
.mhlog-switch {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:3px;background:#eff2eb;border:1px solid #d9e0d6;border-radius:.65rem;margin-bottom:.75rem}
.mhlog-dialog .mhlog-switch button {
  min-width:0;min-height:38px;padding:.28rem .15rem;border:0;border-radius:.45rem;
  background:transparent;color:#475b50;font-size:.91rem;font-weight:600;cursor:pointer;
}
.mhlog-dialog .mhlog-switch button[aria-pressed=true] {
  color:#fffdf4;background:#235d50;box-shadow:0 1px 3px #24473836;
}
.mhlog-dialog .mhlog-switch button:focus-visible,.mhlog-dialog :is(button,input,summary):focus-visible {outline:3px solid #b07c35;outline-offset:1px}
.mhlog-date {display:flex;align-items:center;justify-content:space-between;gap:.5rem;font-size:.94rem;color:#38554c;margin:0 0 .75rem}
.mhlog-date input {min-height:42px;max-width:65%;background:white;padding:.25rem .55rem;color:#1b493c;border:1px solid #baccbb;border-radius:.45rem}
.mhlog-total {
  border-radius:.8rem;padding:.85rem 1rem .78rem;color:#f7fbf4;
  background:linear-gradient(118deg,#234c45 0%,#18473d 65%,#164036 100%);border:1px solid #31574b;
}
.mhlog-total p {margin:0}
.mhlog-total-row {display:flex;align-items:baseline;gap:.55rem;flex-wrap:wrap}
.mhlog-date-label {color:#d7e7d8;font-size:.85rem}
.mhlog-time {font-size:clamp(1.52rem,4.8vw,2rem);font-weight:700;line-height:1.55;font-variant-numeric:tabular-nums}
.mhlog-time-hint {font-size:.9rem;color:#d8e9d9}
.mhlog-goal {margin-top:.54rem}
.mhlog-track {position:relative;height:5px;background:#ffffff33;border-radius:10px;overflow:hidden}
.mhlog-track i {position:absolute;inset-block:0;inset-inline-start:0;background:#dfba72;border-radius:inherit}
.mhlog-goal .mhlog-goal-label {margin-top:.4rem;color:#eee5ce;font-size:.85rem}
.mhlog-badges {display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.45rem}
.mhlog-badges span {display:inline-flex;align-items:center;gap:.35rem;padding:.16rem .52rem;border:1px solid #c9a96280;background:#f7e8b71f;border-radius:1rem;color:#fff1c8;font-weight:650;font-size:.85rem}
.mhlog-badges svg {width:1rem;height:1rem}
.mhlog-week {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.15rem;margin-top:.55rem}
.mhlog-dialog .mhlog-day {display:grid;gap:.2rem;justify-items:center;min-width:0;min-height:44px;padding:.3rem 0;border:0;border-radius:.4rem;background:transparent;color:#355448;font-weight:normal;font-size:.78rem;cursor:pointer}
.mhlog-dialog .mhlog-day:hover {background:#edf3eb}
.mhlog-day small {font-size:.74rem;white-space:nowrap;font-variant-numeric:tabular-nums}
.mhlog-day-rail {height:2.65rem;width:.65rem;border-radius:.25rem;background:#edf0e9;position:relative;overflow:hidden}
.mhlog-day-rail i {display:block;position:absolute;inset-inline:0;bottom:0;height:var(--mhlog-height);background:#57897c;border-radius:.25rem}
.mhlog-day:last-child .mhlog-day-rail i {background:#b58b46}
.mhlog-pieces {margin-top:.95rem}
.mhlog-pieces h3 {margin:0 0 .4rem;color:#213f35;font-size:1.02rem}
.mhlog-list {display:grid;gap:.4rem}
.mhlog-piece {border:1px solid #d5dfd3;border-radius:.65rem;background:white;overflow:hidden}
.mhlog-piece summary {
  display:grid;grid-template-columns:minmax(0,1fr) auto 1.15rem;align-items:center;gap:.35rem .65rem;min-height:46px;
  font:inherit;font-weight:650;list-style:none;cursor:pointer;padding:.6rem .72rem;
}
.mhlog-piece summary::-webkit-details-marker {display:none}
.mhlog-piece summary>svg {width:1.05rem;height:1.05rem;color:#697e72}
.mhlog-piece[open] summary>svg {transform:rotate(180deg)}
.mhlog-work-name {color:#1f493e;font-weight:700;min-width:0;overflow-wrap:anywhere}
.mhlog-work-time {color:#455e52;font-size:.9rem;font-variant-numeric:tabular-nums}
.mhlog-strip {grid-column:1 / -1;display:flex;overflow:hidden;height:4px;border-radius:4px;gap:1px;background:#e9eee6}
.mhlog-strip i {flex:0 1 0}
.mhlog-activities {display:grid;gap:.35rem;margin:0;padding:.45rem .8rem .7rem;border-top:1px solid #e6ebe2}
.mhlog-activities>div {display:flex;align-items:baseline;justify-content:space-between;gap:.85rem}
.mhlog-activities dt,.mhlog-activities dd {margin:0;font-size:.91rem}
.mhlog-activities dt::before {content:'';display:inline-block;width:.53em;height:.53em;border-radius:2px;margin-inline-end:.48em;background:var(--mhlog-color)}
.mhlog-activities dd {color:#425c50;font-variant-numeric:tabular-nums;white-space:nowrap}
.mhlog-empty {margin:0;border:1px dashed #c6d4c8;border-radius:.65rem;padding:.8rem;color:#476657;font-size:.95rem}
.mhlog-how {margin-top:.6rem;color:#4b6256}
.mhlog-how summary {width:fit-content;min-height:40px;padding:.55rem 0;cursor:pointer;font-size:.89rem;font-weight:650}
.mhlog-how p,.mhlog-memory,.mhlog-browsing {margin:0;font-size:.85rem;color:#51685a;line-height:1.65}
.mhlog-browsing {margin:.58rem 0 0}
.mhlog-memory {color:#795324}
.mhlog-toast {
  position:fixed;z-index:10000;inset-inline-start:1rem;bottom:max(1rem,env(safe-area-inset-bottom));
  max-width:min(29rem,calc(100vw - 2rem));display:flex;align-items:center;gap:.6rem;
  border-radius:.65rem;color:#fff6da;background:#214e40;box-shadow:0 3px 15px #16372833;
  font:600 .92rem/1.6 Tahoma,Arial,sans-serif;pointer-events:none;opacity:0;
}
.mhlog-toast.mhlog-show {padding:.55rem .8rem;border:1px solid #d1b175;opacity:1}
.mhlog-toast svg {color:#efd095}
@media (max-width:540px) {
  .mhlog-dialog {width:calc(100% - .7rem);max-height:calc(100vh - .7rem);max-height:calc(100dvh - .7rem);border-radius:.85rem}
  .mhlog-head {padding:.5rem .7rem}.mhlog-scroll {padding:.65rem .7rem .8rem}
  .mhlog-total {padding:.72rem .8rem}.mhlog-switch button {font-size:.87rem}
}
@media (max-width:340px) {
  .mhlog-dialog .mhlog-switch button {font-size:.82rem}
  .mhlog-work-time,.mhlog-work-name {font-size:.9rem}
}
@media (prefers-reduced-motion:no-preference) {.mhlog-toast {transition:opacity .15s ease}}
