.merlin-tally{display:none}
@media (min-width:1180px) and (min-height:440px){
  body:has(.merlin-tally:not([hidden])) main{padding-inline-end:248px}
  .merlin-tally{
    display:flex;flex-direction:column;position:fixed;z-index:3;
    inset-block-start:max(104px,calc(env(safe-area-inset-top) + 96px));
    inset-inline-end:max(14px,env(safe-area-inset-right));
    width:216px;max-height:calc(100vh - 130px);max-height:calc(100dvh - 130px);
    border:2px solid #452176;border-radius:21px;padding:12px;overflow:auto;
    background:#fffdf7;color:#2b1745;box-shadow:4px 5px 0 #daccf0;line-height:1.36;
    overscroll-behavior:contain;scrollbar-gutter:stable;
  }
  .tally-top{display:flex;align-items:center;gap:6px;justify-content:space-between}
  .tally-top h2{font:bold 1.21rem/1.12 Georgia,serif;letter-spacing:-.03em}
  #tally-toggle{flex:none;min-width:34px;min-height:34px;padding:0;color:#452176;background:#f1e6fb;border:0;border-radius:11px;font-weight:900}
  #tally-count{margin:.38rem 0 .48rem;font-size:.76rem;font-weight:750;color:#512d70}
  #tally-items{list-style:none;padding:0;margin:0}
  #tally-items li+li{border-top:1px solid #eadff3}
  .tally-visit,#tally-weeks,#tally-review{
    display:block;width:100%;overflow-wrap:anywhere;text-align:start;border:0;
    color:#2b1745;font-size:.83rem;background:transparent;border-radius:9px;padding:8px 6px;min-height:42px;
  }
  .tally-visit strong,.tally-visit small{display:block}
  .tally-visit small{font-size:.75rem;color:#512d70;margin-top:2px}
  .tally-visit:hover,#tally-weeks:hover{background:#f0e8fa}
  #tally-weeks{background:#f0e8fa;margin-top:7px;font-size:.75rem}
  #tally-review{text-align:center;font-weight:850;background:#dafa62;margin-top:8px}
  .tally-note{font-size:.67rem;margin:.45rem 0 0;color:#512d70}
}
@media print{.merlin-tally{display:none!important}body:has(.merlin-tally:not([hidden])) main{padding-inline-end:0}}
@media (min-width:1180px) and (min-height:440px){
 .merlin-tally{background:linear-gradient(#bcff39 0 68px,#fcfff0 68px);border-color:#577c15;box-shadow:4px 5px 0 #d6ec96;}
 #tally-toggle{background:#e7ff9b;}
}
.tally-fee {font-size:.78rem;line-height:1.35;font-weight:820;color:#476514;margin:0 0 .35rem;padding:.32rem .4rem;border-radius:.44rem;background:#f0ffd0;}
