#weekly-planner-app {
  color-scheme: light;
  --ink: #243a38;
  --muted: #647470;
  --accent: #ed762e;
  --accent-dark: #a84216;
  --soft: #fff3e9;
  --notes: #087d85;
  --notes-soft: #f0f8f7;
  --edge: linear-gradient(125deg, #f7b7a0, #efd56a 32%, #becf8f 65%, #92c7c2);
  --line: #dce2dd;
}

#weekly-planner-app * {
  box-sizing: border-box;
}

#weekly-planner-app {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
}

#weekly-planner-app[data-theme="sky"] {
  --accent: #367ca6;
  --accent-dark: #245776;
  --soft: #edf5fa;
  --notes: #8b5a8c;
  --notes-soft: #faf4fa;
  --edge: linear-gradient(125deg, #b2d6ed, #c0caea, #dfb5d2);
}

#weekly-planner-app[data-theme="sage"] {
  --accent: #56765c;
  --accent-dark: #3f5e44;
  --soft: #f0f5eb;
  --notes: #947044;
  --notes-soft: #faf7ef;
  --edge: linear-gradient(125deg, #c4d6b1, #d3d9ac, #dcc8aa);
}

#weekly-planner-app[data-theme="ink"] {
  --accent: #4d5856;
  --accent-dark: #283330;
  --soft: #f7f7f5;
  --notes: #4d5856;
  --notes-soft: #fafaf9;
  --edge: #d6dbd5;
}

#weekly-planner-app button,
#weekly-planner-app input,
#weekly-planner-app select,
#weekly-planner-app textarea {
  font: inherit;
  color: inherit;
}

#weekly-planner-app button,
#weekly-planner-app summary {
  cursor: pointer;
}

#weekly-planner-app button,
#weekly-planner-app input,
#weekly-planner-app select {
  touch-action: manipulation;
}

#weekly-planner-app button {
  border: 0;
}

#weekly-planner-app a {
  color: inherit;
}

#weekly-planner-app button {
  background: none;
}

#weekly-planner-app input,
#weekly-planner-app textarea {
  border-radius: 0;
}

#weekly-planner-app button:focus-visible,
#weekly-planner-app input:focus-visible,
#weekly-planner-app select:focus-visible,
#weekly-planner-app summary:focus-visible,
#weekly-planner-app a:focus-visible {
  outline: 2px solid #147e88;
  outline-offset: 4px;
}

#weekly-planner-app [hidden] {
  display: none !important;
}

#weekly-planner-app .icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

#weekly-planner-app .icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

#weekly-planner-app .flip {
  transform: rotate(180deg);
}

#weekly-planner-app .sr-only {
  position: absolute;
  height: 1px;
  width: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#weekly-planner-app .print-only {
  display: none;
}

#weekly-planner-app .planner-main {
  max-width: 1280px;
  padding: 34px 0 25px;
  margin: auto;
}

#weekly-planner-app .intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

#weekly-planner-app .eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: #758278;
  margin: 0 0 9px;
}

#weekly-planner-app h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(30px, 3vw, 40px);
  letter-spacing: -1.1px;
  line-height: 1.1;
  margin: 0;
}

#weekly-planner-app h1 em {
  color: #768365;
  font-weight: 400;
}

#weekly-planner-app .intro-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

#weekly-planner-app .button {
  min-height: 43px;
  padding: 11px 18px;
  border: 1px solid #d4ddd5;
  border-radius: 7px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

#weekly-planner-app .button:hover {
  background: #f3f6f1;
}

#weekly-planner-app .button.primary {
  background: #244d45;
  border-color: #244d45;
  color: #fff;
  box-shadow: 0 2px 3px #21413612;
}

#weekly-planner-app .button.primary:hover {
  background: #173c34;
}

#weekly-planner-app button:disabled {
  opacity: .55;
  cursor: wait;
}

#weekly-planner-app .toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 18px;
  border: 1px solid #dce2d8;
  border-radius: 9px;
  background: #ffffff94;
}

#weekly-planner-app .week-controls,
#weekly-planner-app .appearance-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

#weekly-planner-app .icon-button {
  width: 32px;
  height: 34px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
}

#weekly-planner-app .icon-button:hover,
#weekly-planner-app .text-button:hover {
  background: #e6ece3;
}

#weekly-planner-app .text-button {
  min-height: 34px;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#weekly-planner-app .date-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

#weekly-planner-app .date-control .icon {
  width: 17px;
}

#weekly-planner-app #week-date {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  max-width: 150px;
  padding: 5px 0;
}

#weekly-planner-app .themes {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  gap: 9px;
}

#weekly-planner-app .swatch {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  position: relative;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #dce1d7;
}

#weekly-planner-app .swatch.selected {
  box-shadow: 0 0 0 2px #52645b;
}

#weekly-planner-app .swatch.citrus {
  background: #ed8e4d;
}

#weekly-planner-app .swatch.sky {
  background: #74a7c9;
}

#weekly-planner-app .swatch.sage {
  background: #90a883;
}

#weekly-planner-app .swatch.ink {
  background: #787d75;
}

#weekly-planner-app .toolbar-divider {
  height: 25px;
  width: 1px;
  background: #dce1d7;
  margin: 0 12px;
}

#weekly-planner-app .weather-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
}

#weekly-planner-app .weather-toggle .icon {
  width: 18px;
  color: #948c64;
}

#weekly-planner-app .switch-track {
  width: 29px;
  height: 17px;
  background: #cbd2c7;
  border-radius: 15px;
  padding: 3px;
  display: inline-block;
}

#weekly-planner-app .switch-track span {
  width: 11px;
  height: 11px;
  background: white;
  border-radius: 50%;
  display: block;
  transition: transform .15s;
}

#weekly-planner-app [aria-checked="true"] .switch-track {
  background: #347566;
}

#weekly-planner-app [aria-checked="true"] .switch-track span {
  transform: translateX(12px);
}

#weekly-planner-app .more-menu {
  position: relative;
  margin-left: 8px;
}

#weekly-planner-app .more-menu summary {
  list-style: none;
  padding: 6px 5px 10px;
  font-size: 18px;
  letter-spacing: 1px;
}

#weekly-planner-app .more-menu summary::-webkit-details-marker {
  display: none;
}

#weekly-planner-app .menu-content {
  position: absolute;
  z-index: 10;
  top: 38px;
  right: 0;
  width: 230px;
  padding: 15px;
  background: #fff;
  box-shadow: 0 8px 30px #183f2920;
  border: 1px solid #dce2d8;
  border-radius: 8px;
}

#weekly-planner-app .menu-content label {
  display: block;
  font-size: 12px;
  margin-bottom: 14px;
}

#weekly-planner-app .menu-content select {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 7px;
  border: 1px solid #dce2d8;
  border-radius: 4px;
  background: #fff;
}

#weekly-planner-app .menu-content .check-label {
  display: flex;
  align-items: center;
  gap: 7px;
}

#weekly-planner-app .menu-content button {
  display: block;
  width: 100%;
  padding: 9px 0;
  text-align: left;
  font-size: 12px;
  border-top: 1px solid #edf0ea;
}

#weekly-planner-app .danger {
  color: #ae432e;
}

#weekly-planner-app .weather-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -6px 0 12px;
  min-height: 36px;
  padding: 0 9px;
  color: #5c7068;
}

#weekly-planner-app .location-button {
  font-weight: 600;
}

#weekly-planner-app .edit-location {
  font-size: 10px;
  text-decoration: underline;
  margin-left: 3px;
  font-weight: 400;
}

#weekly-planner-app #weather-status {
  font-size: 11px;
  margin-left: auto;
}

#weekly-planner-app .paper-frame {
  padding: 7px;
  background: var(--edge);
  box-shadow: 0 8px 24px #4c5c2f0c, 0 2px 4px #4c5c2f10;
  border-radius: 2px;
}

#weekly-planner-app .paper {
  padding: 27px 31px 13px;
  background: #fffefa;
  border: 1px solid #ffffffa8;
  outline: 1px solid #ffffffa8;
  outline-offset: 3px;
}

#weekly-planner-app .paper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

#weekly-planner-app .paper-heading {
  min-width: 0;
  flex: 1;
}

#weekly-planner-app #planner-title {
  font-family: Georgia, serif;
  font-size: 35px;
  font-weight: 400;
  letter-spacing: -.9px;
  border: 0;
  background: transparent;
  padding: 0;
  max-width: 100%;
  width: 100%;
  line-height: 1.15;
}

#weekly-planner-app #planner-title:hover {
  box-shadow: 0 1px var(--line);
}

#weekly-planner-app .paper-dates {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  margin-top: 9px;
  letter-spacing: .2px;
}

#weekly-planner-app #week-number {
  color: var(--accent-dark);
  font-size: 9px;
  letter-spacing: 1.3px;
  font-weight: 700;
}

#weekly-planner-app .dot {
  color: #aeb6a5;
}

#weekly-planner-app .paper-flourish {
  display: flex;
  align-items: center;
  gap: 14px;
}

#weekly-planner-app .doodle-sun {
  width: 43px;
  height: 43px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linecap: round;
  transform: rotate(10deg);
}

#weekly-planner-app .paper-flourish span {
  font-family: Georgia, serif;
  font-style: italic;
  color: #798466;
  font-size: 18px;
  transform: rotate(-4deg);
}

#weekly-planner-app .focus-line {
  display: flex;
  align-items: baseline;
  gap: 17px;
  margin: 22px 0 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

#weekly-planner-app .focus-line label {
  font-size: 9px;
  letter-spacing: 1.3px;
  font-weight: 700;
  white-space: nowrap;
  color: #718075;
}

#weekly-planner-app .focus-line input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  padding: 2px 0;
}

#weekly-planner-app input::placeholder,
#weekly-planner-app textarea::placeholder {
  color: #a0aa9f;
  opacity: 1;
}

#weekly-planner-app .planner-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 25px;
}

#weekly-planner-app .day-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

#weekly-planner-app .day-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--soft);
  border-top: 3px solid var(--accent);
  min-height: 39px;
  padding: 8px 11px;
}

#weekly-planner-app .day-heading h3 {
  margin: 0;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.2px;
  font-weight: 650;
  color: var(--accent-dark);
}

#weekly-planner-app .day-date {
  font-size: 11px;
  color: var(--accent-dark);
}

#weekly-planner-app .day-card.is-today .day-date {
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--accent);
  color: white;
  margin: -4px 0;
}

#weekly-planner-app .day-card.is-today .day-heading h3::after {
  content: ' · TODAY';
  font-size: 7px;
  letter-spacing: .4px;
}

#weekly-planner-app .day-card textarea {
  display: block;
  width: 100%;
  resize: none;
  overflow-y: hidden;
  border: 0;
  padding: 6px 8px 0;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 25px, var(--line) 25px, var(--line) 26px);
  background-position: 0 1px;
  background-attachment: local;
  line-height: 26px;
  min-height: 163px;
  font-size: 13px;
  font-family: 'Segoe UI', Arial, sans-serif;
  flex: 1;
}

#weekly-planner-app .day-card textarea:focus {
  outline: 1px solid var(--accent);
  outline-offset: 5px;
  border-radius: 1px;
}

#weekly-planner-app .notes-card {
  background: var(--notes-soft);
  outline: 1px solid #91bbba60;
  outline-offset: 7px;
}

#weekly-planner-app .notes-card .day-heading {
  border-color: var(--notes);
  background: transparent;
  padding-left: 8px;
}

#weekly-planner-app .notes-card .day-heading h3,
#weekly-planner-app .notes-card .notes-star {
  color: var(--notes);
}

#weekly-planner-app .notes-star {
  font-family: Georgia, serif;
  font-size: 19px;
  line-height: 10px;
}

#weekly-planner-app .notes-card textarea {
  --line: #cbdedb;
}

#weekly-planner-app .day-weather {
  padding: 8px 6px 4px;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 7px;
}

#weekly-planner-app .day-weather .weather-symbol {
  width: 23px;
  height: 23px;
  color: #888952;
}

#weekly-planner-app .day-weather .weather-copy {
  flex: 1;
  min-width: 0;
}

#weekly-planner-app .weather-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 10px;
}

#weekly-planner-app .weather-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#weekly-planner-app .weather-temp {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
}

#weekly-planner-app .weather-temp span {
  color: #859086;
  font-weight: 400;
}

#weekly-planner-app .weather-extra {
  font-size: 9px;
  color: #6c7b71;
  margin-top: 4px;
}

#weekly-planner-app .no-forecast {
  color: #939e91;
  font-size: 10px;
  font-style: italic;
}

#weekly-planner-app .paper-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 22px;
  color: #82907d;
  font-size: 9px;
  letter-spacing: .25px;
}

#weekly-planner-app .paper-footer span:first-child {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 11px;
}

#weekly-planner-app .weather-credit {
  font-size: 8px;
  margin-top: 10px;
  color: #7b867a;
  line-height: 1.5;
}

#weekly-planner-app .below-paper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 12px 5px 0;
  font-size: 10px;
  color: #7b897c;
}

#weekly-planner-app .save-status {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 170px;
  color: #587563;
}

#weekly-planner-app .save-status .icon {
  width: 14px;
  height: 14px;
}

#weekly-planner-app .below-paper .text-button {
  font-size: 10px;
  font-weight: 500;
}

#weekly-planner-app .settings-dialog {
  width: min(500px, calc(100% - 32px));
  color: var(--ink);
  border: 1px solid #d4dfd4;
  padding: 30px;
  border-radius: 14px;
  background: #fffefa;
  box-shadow: 0 15px 80px #14302930;
  max-height: 90vh;
}

#weekly-planner-app .settings-dialog::backdrop {
  background: #183a3055;
  backdrop-filter: blur(3px);
}

#weekly-planner-app .dialog-heading {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

#weekly-planner-app .dialog-heading .icon-button {
  margin-top: -7px;
  margin-right: -10px;
}

#weekly-planner-app h2 {
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -.5px;
  margin: 0 0 12px;
}

#weekly-planner-app .dialog-copy,
#weekly-planner-app .compact-dialog p {
  font-size: 13px;
  line-height: 1.6;
  color: #68786d;
  margin: 0 0 20px;
}

#weekly-planner-app .settings-dialog select,
#weekly-planner-app .settings-dialog input:not([type="checkbox"]) {
  display: block;
  width: 100%;
  padding: 10px;
  min-height: 40px;
  border: 1px solid #d5ded3;
  background: #fff;
  border-radius: 5px;
  font-size: 12px;
  margin-top: 6px;
}

#weekly-planner-app .settings-dialog label,
#weekly-planner-app .field-label {
  font-size: 11px;
  font-weight: 600;
}

#weekly-planner-app .location-detect {
  margin: 12px 0 17px;
  width: 100%;
  font-size: 12px;
  font-weight: 400;
  background: #f5f7f1;
}

#weekly-planner-app .settings-dialog details summary {
  font-size: 12px;
  color: #567267;
}

#weekly-planner-app .custom-fields {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

#weekly-planner-app .two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

#weekly-planner-app .weather-options {
  margin: 22px 0 17px;
}

#weekly-planner-app .small-copy {
  font-size: 10px;
  color: #7f8b80;
  line-height: 1.7;
}

#weekly-planner-app #location-status {
  font-size: 11px;
  color: #a14b31;
  min-height: 0;
}

#weekly-planner-app .full-width {
  width: 100%;
  margin-top: 5px;
}

#weekly-planner-app .compact-dialog {
  max-width: 470px;
}

#weekly-planner-app .dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

#weekly-planner-app .danger-button {
  background: #a64a35;
  color: white;
  border-color: #a64a35;
}

#weekly-planner-app .danger-button:hover {
  background: #893b29;
}

#weekly-planner-app .help-list {
  padding-left: 19px;
  font-size: 13px;
  line-height: 1.6;
  color: #68786d;
}

#weekly-planner-app .help-list li {
  padding-left: 5px;
  margin-bottom: 14px;
}

#weekly-planner-app .help-list strong {
  color: #3e594c;
}

#weekly-planner-app .notice {
  padding: 12px;
  background: #fff3d7;
  border: 1px solid #ecd49a;
  margin: 12px 0;
  font-size: 12px;
}

#weekly-planner-app .toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 7px;
  background: #244d45;
  color: #fff;
  box-shadow: 0 5px 20px #19332933;
  z-index: 20;
  max-width: calc(100% - 30px);
  font-size: 12px;
}

@media (min-width: 1500px) {
  #weekly-planner-app .planner-main {
    padding-top: 42px;
  }
  #weekly-planner-app .day-card textarea {
    min-height: 189px;
  }
  #weekly-planner-app .planner-grid {
    gap: 28px;
  }
  #weekly-planner-app .paper {
    padding: 31px 35px 16px;
  }
}

@media (max-width: 1350px) {
  #weekly-planner-app .planner-main {
    margin: 0 28px;
  }
}

@media (max-width: 1000px) {
  #weekly-planner-app .paper {
    padding: 24px 22px 13px;
  }
  #weekly-planner-app .planner-grid {
    gap: 22px 18px;
  }
  #weekly-planner-app .day-heading {
    padding: 8px;
  }
  #weekly-planner-app .day-heading h3 {
    font-size: 10px;
    letter-spacing: .6px;
  }
  #weekly-planner-app .day-card.is-today .day-heading h3::after {
    content: ' •';
  }
  #weekly-planner-app .paper-flourish span {
    font-size: 15px;
  }
  #weekly-planner-app .weather-main {
    flex-wrap: wrap;
  }
  #weekly-planner-app .weather-temp {
    font-size: 10px;
  }
  #weekly-planner-app .intro-copy {
    max-width: 460px;
    line-height: 1.5;
  }
}

@media (max-width: 760px) {
  #weekly-planner-app .planner-main {
    margin: 0 18px;
    padding-top: 25px;
  }
  #weekly-planner-app .intro {
    flex-wrap: wrap;
    margin-bottom: 18px;
    gap: 16px;
  }
  #weekly-planner-app .intro .button {
    min-height: 38px;
    padding: 9px 12px;
    font-size: 12px;
  }
  #weekly-planner-app h1 {
    font-size: 34px;
  }
  #weekly-planner-app .toolbar {
    flex-wrap: wrap;
    padding: 10px;
  }
  #weekly-planner-app .week-controls {
    width: 100%;
    justify-content: space-between;
  }
  #weekly-planner-app .appearance-controls {
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid #e2e7df;
    padding-top: 10px;
    gap: 10px;
  }
  #weekly-planner-app .toolbar-divider {
    display: none;
  }
  #weekly-planner-app .themes {
    gap: 13px;
    padding-left: 6px;
  }
  #weekly-planner-app .more-menu {
    margin-left: 0;
  }
  #weekly-planner-app .planner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
  #weekly-planner-app .notes-card {
    order: 8 !important;
  }
  #weekly-planner-app .paper {
    padding: 21px 18px 13px;
  }
  #weekly-planner-app .paper-flourish {
    gap: 0;
  }
  #weekly-planner-app .paper-flourish span {
    display: none;
  }
  #weekly-planner-app #planner-title {
    font-size: 29px;
  }
  #weekly-planner-app .focus-line {
    gap: 10px;
    flex-wrap: wrap;
    margin: 19px 0;
  }
  #weekly-planner-app .focus-line input {
    flex-basis: 100%;
  }
  #weekly-planner-app .day-card textarea {
    min-height: 163px;
  }
  #weekly-planner-app .day-heading h3 {
    font-size: 11px;
  }
  #weekly-planner-app .below-paper {
    flex-wrap: wrap;
    gap: 1px 12px;
  }
  #weekly-planner-app .below-paper > span:nth-child(2) {
    order: 3;
    width: 100%;
    font-size: 9px;
  }
  #weekly-planner-app .weather-bar {
    flex-wrap: wrap;
    gap: 3px;
  }
  #weekly-planner-app .location-button {
    padding-left: 0;
  }
  #weekly-planner-app #weather-status {
    order: 3;
    width: 100%;
    margin: 0 0 4px;
  }
  #weekly-planner-app .weather-bar > .icon-button {
    margin-left: auto;
  }
  #weekly-planner-app .paper-dates {
    gap: 6px;
    font-size: 10px;
  }
  #weekly-planner-app .paper-footer {
    font-size: 8px;
  }
  #weekly-planner-app .paper-footer span:first-child {
    font-size: 9px;
  }
  #weekly-planner-app .weather-main {
    flex-wrap: nowrap;
  }
}

@media (max-width: 420px) {
  #weekly-planner-app .planner-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  #weekly-planner-app .paper {
    padding: 19px 16px 13px;
  }
  #weekly-planner-app .day-card textarea {
    min-height: 137px;
  }
  #weekly-planner-app .paper-flourish {
    display: none;
  }
  #weekly-planner-app .day-card.is-today .day-heading h3::after {
    content: ' · TODAY';
  }
  #weekly-planner-app .settings-dialog {
    padding: 22px;
  }
  #weekly-planner-app .intro-copy {
    font-size: 12px;
  }
  #weekly-planner-app .paper-footer {
    flex-wrap: wrap;
  }
  #weekly-planner-app .weather-main {
    justify-content: flex-start;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #weekly-planner-app * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@page {
  size: A4 landscape;
  margin: 5mm;
}

@media print {
  #weekly-planner-app {
    background: white;
    color: #243a38;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  #weekly-planner-app .screen-only,
  #weekly-planner-app dialog,
  #weekly-planner-app .toast,
  #weekly-planner-app noscript,
  #weekly-planner-app #planner-title,
  #weekly-planner-app #weekly-focus,
  #weekly-planner-app .day-card textarea {
    display: none !important;
  }
  /* Grey guidance and decorative copy are for the editor only.
     Forecast text and the user's print mirrors remain visible. */
  #weekly-planner-app .paper-flourish span,
  #weekly-planner-app .focus-line label,
  #weekly-planner-app .paper-footer {
    display: none !important;
  }
  #weekly-planner-app input::placeholder,
  #weekly-planner-app textarea::placeholder {
    color: transparent !important;
    opacity: 0 !important;
  }
  #weekly-planner-app .print-only {
    display: block;
  }
  #weekly-planner-app .planner-main {
    max-width: none;
    margin: 0;
    padding: 0;
  }
  /* Also fill the sheet if the print helper has not loaded. The normal
     Print button uses the isolated, ad-free document in print.js. */
  #weekly-planner-app .paper-frame {
    display: flex;
    width: 287mm;
    max-width: 100%;
    height: 199mm;
    padding: 1mm;
    box-shadow: none;
    border-radius: 0;
  }
  #weekly-planner-app .paper {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 2mm;
  }
  #weekly-planner-app .paper-header {
    gap: 5mm;
  }
  #weekly-planner-app #print-title {
    font-size: 20pt;
    margin: 0;
  }
  #weekly-planner-app .paper-dates {
    margin-top: 2mm;
    font-size: 8pt;
  }
  #weekly-planner-app .paper-flourish {
    display: flex;
    gap: 3mm;
  }
  #weekly-planner-app .doodle-sun {
    width: 10mm;
    height: 10mm;
  }
  #weekly-planner-app .focus-line {
    display: flex;
    flex-wrap: nowrap;
    margin: 2mm 0;
    padding-bottom: 1mm;
    gap: 4mm;
  }
  #weekly-planner-app .focus-line:has(#print-focus:empty) {
    display: none;
  }
  #weekly-planner-app .paper-header {
    flex: 0 0 auto;
    margin-bottom: 2mm;
  }
  #weekly-planner-app #print-focus {
    font-size: 9pt;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  #weekly-planner-app .planner-grid {
    flex: 1 1 0;
    min-height: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 3mm;
  }
  #weekly-planner-app .day-card {
    min-height: 0;
  }
  #weekly-planner-app .day-heading {
    flex: 0 0 auto;
    min-height: 7mm;
    padding: 1mm 2mm;
    border-top-width: .7mm;
  }
  #weekly-planner-app .day-heading h3 {
    font-size: 8pt;
    letter-spacing: .6pt;
  }
  #weekly-planner-app .day-date {
    font-size: 8pt;
  }
  #weekly-planner-app .day-card.is-today .day-heading h3::after {
    content: '';
  }
  #weekly-planner-app .day-card.is-today .day-date {
    background: none;
    color: var(--accent-dark);
    width: auto;
    height: auto;
    margin: 0;
  }
  #weekly-planner-app .day-print {
    flex: 1 1 0;
    min-height: 0;
    padding: 1mm 2mm 0;
    font-size: 9pt;
    line-height: 6mm;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 5.8mm, var(--line) 5.8mm, var(--line) 6mm);
    background-position: 0 1mm;
  }
  #weekly-planner-app .notes-card {
    order: 3 !important;
    outline-offset: 1.6mm;
  }
  #weekly-planner-app .day-weather {
    min-height: 9mm;
    padding: 1.5mm 1mm 1mm;
    gap: 1mm;
  }
  #weekly-planner-app .day-weather .weather-symbol {
    width: 5mm;
    height: 5mm;
  }
  #weekly-planner-app .weather-main {
    font-size: 7pt;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 1mm;
  }
  #weekly-planner-app .weather-temp {
    font-size: 7pt;
  }
  #weekly-planner-app .weather-extra,
  #weekly-planner-app .no-forecast {
    font-size: 6pt;
  }
  #weekly-planner-app .weather-credit {
    margin-top: 2mm;
    font-size: 6pt;
  }
  #weekly-planner-app .weather-credit a {
    text-decoration: none;
  }
  #weekly-planner-app[data-theme="ink"] .paper-frame {
    background: none;
    border: .3mm solid #9a9f98;
  }
  #weekly-planner-app[data-theme="ink"] .day-heading,
  #weekly-planner-app[data-theme="ink"] .notes-card {
    background: white;
  }
}
