* { box-sizing: border-box; }
body {
  margin: 0;
  color: #172725;
  background: #edf4f1;
  font: 1.125rem/1.5 system-ui, "Noto Sans CJK JP", sans-serif;
}
main {
  max-width: 56rem;
  margin: 1.5rem auto;
  padding: 1.5rem;
  background: #fff;
}
h1 { margin: 0 0 .35em; font-size: 2rem; line-height: 1.25; }
p { margin: .35em 0; }
.units { margin: .5rem 0 .75rem; }
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  min-width: 40rem;
  table-layout: fixed;
  border-collapse: collapse;
}
th, td { border: 1px solid #465955; text-align: center; }
thead th { padding: .35em .15em; background: #e2eeea; }
.date { width: 17%; }
.medicine { width: 12%; }
a { color: inherit; }
@page { size: A4 portrait; margin: 12mm; }

tbody td { height: 5rem; }
.check {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 1.5px solid currentColor;
  vertical-align: middle;
}
.date-entry span { color: #465955; }
.sheet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 1rem 0; }
.sheet-action {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; max-width: 100%; padding: .5rem 1rem;
  border: 2px solid #075746; border-radius: .65rem;
  background: #fff; color: #075746;
  font: inherit; font-weight: 800; text-align: center;
}
.sheet-action[hidden], .scroll-hint { display: none; }
.print-button { background: #075746; color: #fff; cursor: pointer; }
:focus-visible { outline: 3px solid #9c4000; outline-offset: 3px; }
.paper-footer {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  margin-top: 1rem; font-size: 1rem; overflow-wrap: anywhere;
}
.paper-footer img { flex: none; }


@media screen and (max-width: 32rem) {
  main { margin: 0; padding: 1rem; }
  .scroll-hint { display: block; }
}
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  main { margin: 0; padding: 0; max-width: none; }
  .screen-only { display: none; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; }
  tr, footer { break-inside: avoid; }
  h1 { font-size: 24pt; }
  tbody td { height: 24mm; }
  th, td { border-color: #000; }
  thead th { background: #fff; }
  .date-entry span { color: #000; }
  .paper-footer { font-size: 11pt; }
  .paper-footer img { width: 25mm; height: 25mm; }
}
