@font-face {
  font-family: "Noto Sans Print";
  src: url("fonts/NotoSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: "Noto Sans Print";
  src: url("fonts/NotoSans-Bold.ttf") format("truetype");
  font-weight: 600 900;
  font-display: block;
}
.weekly-print-document {
  display: none;
}
@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #172f3f !important;
    font-family: "Noto Sans Print", "Segoe UI", sans-serif !important;
  }
  #sidebar,
  body > main > header,
  #connection-status,
  #demo-bar,
  #toast,
  dialog,
  body > main > footer {
    display: none !important;
  }
  main,
  #app {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }
  #app > :not(.weekly-print-document) {
    display: none !important;
  }
  .weekly-print-document {
    display: block !important;
    font-family: "Noto Sans Print", "Segoe UI", sans-serif;
    color: #183343;
    font-size: 9pt;
    line-height: 1.3;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .pw-page {
    height: 193mm;
    display: flex;
    flex-direction: column;
    gap: 3mm;
    break-after: page;
    page-break-after: always;
    box-sizing: border-box;
  }
  .pw-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  .pw-header {
    display: flex !important;
    position: static !important;
    justify-content: space-between;
    align-items: flex-end;
    background: white !important;
    height: auto !important;
    border: 0 !important;
    border-bottom: 1.2pt solid #25495a !important;
    padding: 0 0 2.5mm !important;
    margin: 0 !important;
    flex: none;
    color: #183343 !important;
    gap: 4mm;
  }
  .pw-brand {
    font-size: 8pt;
    font-weight: 700;
    letter-spacing: 0.7pt;
  }
  .pw-brand span {
    font-size: 7.5pt;
    font-weight: 400;
    letter-spacing: 0;
    color: #48616d;
    margin: 0 !important;
  }
  .pw-header h1 {
    font-size: 20pt !important;
    line-height: 1.15 !important;
    letter-spacing: 0.3pt !important;
    margin: 1.2mm 0 !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip-path: none !important;
  }
  .pw-header p {
    font-size: 10pt;
    margin: 1mm 0 0 !important;
  }
  .pw-week {
    text-align: right;
    flex: none;
    font-size: 8pt;
    font-weight: 600;
  }
  .pw-week p {
    font-size: 7.5pt;
    font-weight: 400;
  }
  .pw-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2mm;
    flex: 1;
    min-height: 0;
  }
  .pw-day {
    border: 0.6pt solid #839aa3;
    border-radius: 2.5mm;
    padding: 1.6mm;
    display: flex;
    flex-direction: column;
    min-width: 0;
    break-inside: avoid;
    background: white;
  }
  .pw-day-head {
    padding: 1mm 1mm 2mm;
    border-bottom: 0.6pt solid #c5d2d5;
    margin-bottom: 2mm;
    display: flex;
    flex-direction: column;
    gap: 0.6mm;
  }
  .pw-day-head strong {
    font-size: 8pt;
    letter-spacing: 0.4pt;
  }
  .pw-day-head b {
    font-size: 14pt;
    font-weight: 700;
    line-height: 1.2;
  }
  .pw-day-head span {
    font-size: 6.8pt;
    color: #49616c;
  }
  .pw-tasks {
    display: flex;
    flex-direction: column;
    gap: 1.5mm;
  }
  .pw-task {
    padding: 1.5mm;
    border: 0.4pt solid #c4d0d4;
    border-radius: 1.5mm;
    min-width: 0;
    background: white;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .pw-task-title {
    font-size: 9pt;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .pw-focus {
    font-size: 8pt;
  }
  .pw-task-time {
    font-size: 7pt;
    line-height: 1.35;
    margin: 1mm 0;
    color: #3b525f;
    overflow-wrap: anywhere;
  }
  .pw-choices {
    display: flex;
    gap: 2mm;
    flex-wrap: wrap;
    padding-top: 0.4mm;
  }
  .pw-choice {
    font-size: 8pt;
    display: inline-flex;
    gap: 1mm;
    align-items: center;
    font-weight: 600;
    white-space: nowrap;
  }
  .pw-box {
    width: 3.1mm;
    height: 3.1mm;
    border: 0.65pt solid #465f6c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-sizing: border-box;
    flex: none;
    font-size: 8pt;
    font-style: normal;
    line-height: 1;
  }
  .pw-box.is-checked {
    font-weight: 700;
  }
  .pw-task-note,
  .pw-routine {
    font-size: 6.8pt;
    color: #48606a;
    line-height: 1.3;
    margin-top: 0.8mm;
  }
  .pw-unscored .pw-choice {
    font-size: 7pt;
    font-weight: 400;
  }
  .pw-excluded {
    border-style: dashed;
  }
  .pw-excluded .pw-task-title {
    font-weight: 400;
  }
  .pw-day-sign {
    margin-top: auto;
    padding-top: 2.5mm;
    border-top: 0.4pt solid #b6c6cd;
    display: flex;
    flex-direction: column;
    gap: 1.6mm;
    font-size: 7pt;
    color: #294450;
  }
  .pw-empty {
    font-size: 8pt;
    color: #657b84;
    line-height: 1.5;
    padding: 1mm;
  }
  .pw-empty div {
    height: 8mm;
    border-bottom: 0.4pt dotted #becbd1;
  }
  .pw-footer {
    display: block !important;
    position: static !important;
    flex: none;
    border-top: 1pt solid #25495a;
    padding: 2mm 0 0 !important;
    margin: 0 !important;
    color: #233d4a !important;
    text-align: left !important;
    font-size: 7.5pt !important;
  }
  .pw-legend {
    display: flex;
    align-items: center;
    gap: 3mm;
    flex-wrap: wrap;
  }
  .pw-legend > strong {
    font-size: 7.5pt;
    letter-spacing: 0.35pt;
  }
  .pw-legend > span {
    font-size: 7.3pt;
    line-height: 1.3;
    display: inline-flex;
    gap: 1mm;
    align-items: center;
  }
  .pw-legend .pw-choice {
    font-size: 7.5pt;
  }
  .pw-guidance {
    margin-top: 1.2mm;
  }
  .pw-guidance p {
    font-size: 7.3pt;
    line-height: 1.35;
    margin: 0.6mm 0;
  }
  .pw-parent-sign {
    float: right;
    font-weight: 600;
  }
}
@media print {
  .pw-header span {
    margin: 0 !important;
    color: inherit;
  }
  .pw-footer span {
    color: inherit;
  }
  .pw-box {
    width: 3.6mm;
    height: 3.6mm;
  }
  .pw-demo {
    font-size: 6.8pt;
    color: #49616c;
    display: block;
    margin-top: 0.7mm;
  }
}
@media print {
  .pw-grid {
    grid-template-rows: minmax(0, 1fr);
  }
  .pw-day {
    min-height: 0;
  }
  .pw-tasks {
    gap: 1.2mm;
  }
  .pw-task {
    padding: 1.1mm;
  }
  .pw-task-time {
    margin: 0.7mm 0;
  }
  .pw-day-sign {
    padding-top: 1.8mm;
    gap: 1.2mm;
  }
}

@media print {
  .pw-icon {
    display: inline-block;
    width: 3.5mm;
    height: 3.5mm;
    vertical-align: -0.65mm;
    margin-right: 0.8mm;
    color: #285d78;
    flex: none;
  }
  .pw-task-title { letter-spacing: -0.1pt; }
}
@media print {
  .pw-task-title { font-size: 8.5pt; line-height: 1.2; }
  .pw-task-time { margin: 0.5mm 0; font-size: 6.8pt; }
  .pw-day-sign { flex-shrink: 0; margin-top: auto; }
}
