:root {
  font-family:
    Inter,
    "Avenir Next",
    Avenir,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #283c32;
  background: #f6f6f2;
  font-synthesis: none;
  --ink: #283c32;
  --muted: #68726c;
  --line: #e3e7df;
  --green: #394e42;
  --pink: #e8bdcc;
  --radius: 18px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #9672b5;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.04em;
}
h1 {
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 650;
  margin-bottom: 12px;
}
h2 {
  font-size: 25px;
  font-weight: 600;
}
h3 {
  font-size: 18px;
}
p {
  line-height: 1.65;
}
small,
.hint {
  font-size: 13px;
}
[hidden] {
  display: none !important;
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  display: block;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: white;
  padding: 12px;
}
.skip-link:focus {
  top: 16px;
}
.primary,
.secondary {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  min-height: 44px;
  padding: 11px 16px;
  transition:
    background 0.16s,
    box-shadow 0.16s;
}
.primary {
  background: var(--green);
  color: white;
  border: 1px solid var(--green);
}
.primary:hover:not(:disabled) {
  background: #263d2e;
  box-shadow: 0 3px 8px #263d2e20;
}
.secondary {
  background: #fff;
  border: 1px solid var(--line);
}
.secondary:hover:not(:disabled) {
  background: #f3f5ee;
}
.full {
  width: 100%;
}
.compact {
  padding: 8px 14px;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  border-radius: 10px;
}
.icon-button:hover {
  background: #e9eee5;
}
.text-button {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  color: #48614e;
  font-weight: 600;
  text-underline-offset: 4px;
}
.text-button:hover {
  text-decoration: underline;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-size: 28px;
  letter-spacing: -1.5px;
  font-weight: 700;
  line-height: 1.1;
}
.brand-caption {
  display: block;
  font-size: 8px;
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-top: 6px;
}
.boot {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.loading-dot {
  width: 9px;
  height: 9px;
  background: var(--pink);
  border-radius: 50%;
  animation: pulse 1s infinite alternate;
}
@keyframes pulse {
  to {
    opacity: 0.25;
  }
}
.error,
.notice {
  border-radius: 10px;
  font-size: 14px;
  padding: 12px 15px;
  margin: 12px 0;
}
.error {
  background: #fff0ee;
  color: #933b39;
  border: 1px solid #f4d1cc;
}
.notice {
  background: #edf4e8;
  color: #385035;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: #293e31;
  color: white;
  padding: 13px 22px;
  border-radius: 12px;
  box-shadow: 0 8px 30px #0002;
  max-width: 90vw;
  font-size: 14px;
}
label {
  font-size: 14px;
  font-weight: 600;
  display: block;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d8dfd7;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  margin-top: 7px;
  font-size: 16px;
}
input::placeholder,
textarea::placeholder {
  color: #859088;
}
textarea {
  resize: vertical;
  min-height: 96px;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
}
/* A calm, self-contained login screen, with no external fonts or trackers. */
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  padding: 16px;
  gap: 16px;
}
.auth-story {
  background: #e7eddf;
  border-radius: 24px;
  padding: 35px 45px 25px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.story-copy {
  margin-top: clamp(45px, 8vh, 100px);
  z-index: 1;
}
.story-copy .eyebrow {
  margin-bottom: 25px;
  color: #54684f;
}
.story-copy h1 {
  font-size: clamp(34px, 4.4vw, 64px);
  font-weight: 550;
  line-height: 1.1;
  letter-spacing: -0.055em;
}
.story-copy p {
  margin-top: 22px;
  color: #5c6d57;
  font-size: 16px;
}
.story-footer {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  font-size: 13px;
  color: #52614d;
  padding-top: 25px;
}
.school-art {
  position: relative;
  height: 245px;
  max-width: 510px;
  margin: 20px 0 15px;
}
.art-sun {
  position: absolute;
  left: 16%;
  top: 4%;
  width: 95px;
  height: 95px;
  background: #e9c67f;
  border-radius: 50%;
}
.art-cloud {
  position: absolute;
  right: 16%;
  top: 10%;
  width: 80px;
  height: 30px;
  background: #f5f6ee;
  border-radius: 30px;
}
.art-cloud:before {
  content: "";
  position: absolute;
  left: 24px;
  top: -16px;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: inherit;
}
.art-block {
  position: absolute;
  bottom: 0;
  width: 29%;
  height: 120px;
}
.art-pink {
  left: 0;
  background: #d7a0b3;
  border-radius: 75px 75px 0 0;
  height: 140px;
}
.art-green {
  left: 31%;
  background: #759376;
  height: 180px;
  border-radius: 80px 80px 0 0;
}
.art-purple {
  left: 62%;
  background: #b4a3c3;
  border-radius: 80px 0 0 0;
  height: 105px;
}
.art-green:after {
  content: "";
  position: absolute;
  width: 33%;
  height: 55%;
  bottom: 0;
  left: 33%;
  background: #e7eddf;
  border-radius: 50px 50px 0 0;
}
.art-stem {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2px;
  height: 100px;
  background: #4b6445;
  transform: rotate(15deg);
}
.art-stem:before,
.art-stem:after {
  content: "";
  position: absolute;
  width: 38px;
  height: 20px;
  top: 15px;
  background: #7e9c74;
  border-radius: 90% 0;
}
.art-stem:before {
  right: 1px;
  transform: rotate(50deg);
}
.art-stem:after {
  left: 0;
  top: 38px;
  transform: rotate(-10deg);
}
.art-caption {
  position: absolute;
  bottom: 10px;
  left: 25px;
  color: #4b3240;
  font-size: 13px;
  font-weight: 600;
  transform: rotate(-5deg);
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 36px;
}
.auth-card {
  width: 100%;
  max-width: 365px;
}
.small-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: #ebdedf;
  border-radius: 16px;
  font-weight: 700;
  font-size: 25px;
  margin-bottom: 30px;
}
.auth-card .eyebrow {
  color: #788072;
  margin-bottom: 13px;
}
.auth-card h2 {
  font-size: 34px;
  margin-bottom: 12px;
}
.auth-card form {
  margin-top: 30px;
}
.auth-card label {
  margin-top: 18px;
}
.auth-card .primary {
  margin-top: 24px;
}
.auth-card .text-button {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
}
.auth-footnote {
  margin-top: 50px;
  font-size: 12px;
  color: #848b81;
  text-align: center;
  line-height: 1.7;
}
/* Calendar workspace. */
.workspace {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 32px 20px 20px;
  background: #f8f9f5;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.sidebar .brand {
  margin: 0 8px;
}
.calendar-picker {
  margin: 43px 5px 22px;
}
.calendar-picker .eyebrow {
  font-size: 10px;
  color: #879080;
  margin-bottom: 8px;
}
.calendar-picker select {
  font-size: 14px;
  font-weight: 600;
  background: #eef1e9;
  border-color: transparent;
  padding: 12px 8px;
  margin: 0;
}
.view-nav {
  display: grid;
  gap: 6px;
}
.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 14px;
  text-align: left;
  font-weight: 550;
}
.nav-button:hover {
  background: #edf0e8;
}
.nav-button.active {
  background: #e7eddf;
  color: #3d563f;
}
.nav-dot {
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6e8666;
}
.sidebar-add {
  margin: 18px 14px;
  font-size: 12px;
}
.sidebar-add .icon {
  width: 16px;
}
.sidebar-bottom {
  margin-top: auto;
}
.gentle-note {
  background: #eff1e9;
  border: 1px solid #e4e8da;
  border-radius: 14px;
  padding: 19px;
  margin: 25px 5px;
  color: #63785b;
}
.gentle-note .icon {
  width: 25px;
  height: 25px;
}
.gentle-note p {
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -0.02em;
  margin: 8px 0;
}
.gentle-note span {
  font-size: 11px;
  color: #859078;
}
.account {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 19px 0 0;
}
.avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #e8d4da;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.account strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.account .icon-button {
  margin-left: auto;
  min-width: 30px;
}
.account .icon {
  width: 17px;
}
.main {
  padding: 0 38px 25px;
  min-width: 0;
  max-width: 1800px;
  width: 100%;
  margin: 0 auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 50px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: #7a8578;
}
.breadcrumb span {
  margin: 0 12px;
  color: #a4ad9e;
}
.breadcrumb strong {
  font-weight: 500;
  color: #52604e;
}
.today-label {
  font-size: 11px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 16px 0 12px;
}
.page-heading .eyebrow {
  color: #7a8573;
  font-size: 10px;
  margin-bottom: 10px;
}
.page-heading p {
  font-size: 14px;
  margin: 0;
}
.page-heading-description {
  display: none;
}
.page-heading .secondary {
  font-size: 12px;
  flex-shrink: 0;
}
.pink-period {
  color: #c489a4;
}
.week-banner {
  display: flex;
  gap: 22px;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 10px 16px;
  background: #eaf0e1;
  border: 1px solid #e0e8d6;
  border-radius: 16px;
  margin-bottom: 12px;
  min-height: 78px;
}
.week-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafbf4;
  border: 1px solid #e0e7d6;
  border-radius: 12px;
  width: 64px;
  height: 58px;
  flex-shrink: 0;
}
.week-tile span {
  font-size: 9px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: #7d8b6d;
  font-weight: 700;
}
.week-tile strong {
  font-size: 29px;
  line-height: 1.3;
  letter-spacing: -0.06em;
  font-weight: 550;
}
.week-meta h2 {
  font-size: 19px;
  margin: 2px 0;
}
.week-meta .eyebrow {
  font-size: 9px;
  color: #7c8e68;
  letter-spacing: 0.14em;
}
.week-meta .muted {
  font-size: 12px;
}
.week-stat {
  margin-left: auto;
  text-align: right;
  position: relative;
  z-index: 1;
  margin-right: 65px;
}
.week-stat strong {
  display: block;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 500;
}
.week-stat span {
  font-size: 11px;
  color: #6e7d5f;
}
.banner-flower {
  position: absolute;
  right: 5px;
  top: -25px;
  font-size: 100px;
  line-height: 1;
  color: #d5dfbf;
  transform: rotate(12deg);
  font-family: Georgia, serif;
}
.calendar-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 3px 18px #25392d03;
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.week-controls {
  display: flex;
  gap: 5px;
  align-items: center;
}
.calendar-toolbar .secondary {
  font-size: 12px;
  min-height: 38px;
  padding: 8px 11px;
}
.print-button {
  margin-left: auto;
}
.copy-button .icon {
  width: 15px;
  height: 15px;
}
.calendar-container {
  overflow: auto;
  min-height: 260px;
}
.calendar-container[aria-busy="true"] {
  opacity: 0.5;
  pointer-events: none;
}
.week-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  table-layout: fixed;
  min-width: 690px;
}
.week-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.week-table th,
.week-table td {
  border-right: 1px solid #edf0e9;
  border-bottom: 1px solid #edf0e9;
}
.week-table th:last-child,
.week-table td:last-child {
  border-right: 0;
}
.week-table tbody tr:last-child > * {
  border-bottom: 0;
}
.week-table thead th {
  padding: 8px 5px 6px;
  font-weight: 500;
  font-size: 11px;
  color: #6f7d6c;
  background: #fff;
  text-align: center;
}
.week-table.hide-dates .day-date {
  display: none;
}
.week-table thead th.today {
  background: #f2f5e9;
}
.day-date {
  display: block;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 500;
  color: #32472f;
  margin-top: 3px;
  letter-spacing: -0.035em;
}
.today .day-date {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #485e3c;
  color: #fff;
  width: 28px;
  height: 28px;
  margin: 2px auto -1px;
  font-size: 13px;
}
.week-table .time-col {
  width: 85px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #93a08b;
}
.week-table .time-cell {
  padding: 10px 6px;
  text-align: center;
  vertical-align: middle;
  font-size: 11px;
  color: #55664c;
  background: #fcfdf9;
  font-weight: 500;
}
.time-cell span {
  display: block;
  color: #919b8a;
  font-size: 10px;
  margin-top: 3px;
}
.week-table td {
  padding: 5px;
  height: 80px;
  vertical-align: top;
}
.cell-button {
  width: 100%;
  min-height: 69px;
  padding: 10px 10px 21px;
  text-align: left;
  position: relative;
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.45;
  transition: background 0.15s;
}
.cell-button .edit-icon {
  position: absolute;
  right: 7px;
  bottom: 6px;
  width: 13px;
  height: 13px;
  opacity: 0.32;
}
.cell-button:hover .edit-icon,
.cell-button:focus-visible .edit-icon {
  opacity: 1;
}
.cell-button.empty {
  border: 1px dashed transparent;
  color: #9aa694;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cell-button.empty .empty-plus {
  opacity: 0;
}
.cell-button.empty:hover {
  border-color: #d6dfcd;
  background: #f7f9f2;
}
.cell-button.empty:hover .empty-plus {
  opacity: 1;
}
.cell-button.lesson:not(.empty) {
  background: #edf1e6;
  color: #445939;
}
.cell-button.event:not(.empty) {
  background: #f6e7ef;
  color: #8b526d;
}
.cell-button.note:not(.empty) {
  background: #eeeaf7;
  color: #6c5889;
}
.entry-kind {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  margin-bottom: 5px;
}
.break-row td,
.break-row th {
  background: #faf9f4 !important;
}
.break-row td {
  height: 40px;
}
.break-row .cell-button {
  min-height: 29px;
  font-size: 10px;
  padding: 6px 16px 6px 6px;
  color: #938873;
  display: block;
}
.break-row .cell-button.empty {
  border: none;
  text-align: center;
}
.break-row .cell-button.empty .empty-plus {
  display: none;
}
.break-row .time-cell {
  font-size: 10px;
}
.break-row .time-cell span {
  display: inline;
  font-size: 9px;
  margin-left: 3px;
}
.break-row .cell-button .edit-icon {
  width: 11px;
  bottom: 9px;
}
.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 16px 20px;
  background: #fdfefa;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.legend-item {
  font-size: 10px;
  color: #788371;
  display: flex;
  gap: 6px;
  align-items: center;
}
.legend-item:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #cbd9b8;
}
.legend-item.event:before {
  background: #e7bfd2;
}
.legend-item.note:before {
  background: #cfc1e8;
}
.legend-item.break:before {
  background: #e4dccb;
}
.save-status {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #79876e;
  font-size: 10px;
}
.save-status .icon {
  width: 13px;
  height: 13px;
}
.bottom-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #86917d;
  font-size: 11px;
  margin-top: 17px;
}
.bottom-note > .icon {
  width: 13px;
}
.bottom-note .text-button {
  margin-left: auto;
  font-size: 11px;
  padding: 0;
  white-space: nowrap;
}
.mobile-days {
  display: none;
}
.editor {
  min-width: 0;
  padding: 5px;
}
.editor textarea {
  font-size: 13px;
  margin: 0;
  padding: 8px;
  min-height: 105px;
}
.editor select {
  font-size: 12px;
  padding: 5px;
  margin: 5px 0;
}
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.editor-actions button {
  font-size: 11px;
  padding: 6px;
  min-height: 32px;
  border-radius: 6px;
}
.editor .error {
  font-size: 11px;
  padding: 7px;
  line-height: 1.4;
}
.editor .hint {
  font-size: 10px;
  color: #7c876f;
}
.agenda-day {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.agenda-day:last-child {
  border-bottom: 0;
}
.agenda-day h3 {
  font-size: 15px;
  margin-bottom: 12px;
}
.agenda-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid #edf0e9;
}
.agenda-row time {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}
.agenda-row p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.agenda-row .pill {
  font-size: 10px;
  border-radius: 8px;
  background: #f0edf6;
  padding: 4px 8px;
}
.empty-agenda {
  text-align: center;
  padding: 55px 22px;
  color: var(--muted);
}
.empty-agenda .icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
}
.empty-agenda h3 {
  color: var(--ink);
}
/* Native accessible dialogs and calendar configuration. */
dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  max-width: 720px;
  width: calc(100% - 32px);
  max-height: 90dvh;
  color: var(--ink);
  box-shadow: 0 20px 90px #14241e26;
}
dialog::backdrop {
  background: #1b2e264f;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.dialog-heading h2 {
  margin: 0;
}
.dialog-heading .eyebrow {
  margin-bottom: 8px;
  color: #839177;
}
.dialog-heading .icon-button {
  flex-shrink: 0;
}
dialog p {
  font-size: 14px;
}
dialog label {
  margin-top: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 23px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 24px 0;
}
legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.day-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.day-checkboxes label {
  display: flex;
  gap: 7px;
  align-items: center;
  background: #f0f3eb;
  border-radius: 8px;
  padding: 10px;
  margin: 0;
  font-size: 13px;
}
.slot-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
}
.slot-section-heading span {
  font-size: 12px;
}
.slot-row {
  display: grid;
  grid-template-columns: 100px 100px 1fr 75px 34px;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}
.slot-row label {
  font-size: 10px;
  margin: 0;
  min-width: 0;
}
.slot-row input {
  font-size: 13px;
  padding: 8px;
  min-width: 0;
}
.slot-row .break-check {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  font-size: 11px;
}
.slot-row .icon-button {
  min-width: 34px;
  min-height: 37px;
}
.hint {
  color: #7d8877;
}
.settings-error {
  margin-top: 10px;
}
.settings-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 24px;
  font-size: 13px;
}
.settings-toggle input {
  margin: 0;
}
@media (min-width: 1600px) {
  .week-table td {
    height: 100px;
  }
  .cell-button {
    min-height: 89px;
    font-size: 14px;
  }
  .main {
    padding: 0 50px 30px;
  }
  .break-row td {
    height: 44px;
  }
  .break-row .cell-button {
    min-height: 33px;
  }
}
@media (max-width: 1150px) {
  .workspace {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .sidebar {
    padding: 26px 14px 18px;
  }
  .main {
    padding: 0 22px 22px;
  }
  .sidebar .brand {
    font-size: 25px;
  }
  .brand-caption {
    font-size: 7px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 32px;
  }
  .page-heading .secondary {
    font-size: 11px;
    padding: 10px;
  }
  .week-stat {
    margin-right: 25px;
  }
  .banner-flower {
    right: -35px;
  }
  .week-meta h2 {
    font-size: 21px;
  }
  .week-banner {
    padding: 20px;
    gap: 16px;
  }
  .legend {
    gap: 10px;
  }
  .auth-story {
    padding: 30px;
  }
  .auth-panel {
    padding: 24px;
  }
}
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    margin: 0;
    flex: 1;
  }
  .sidebar .brand img {
    width: 33px;
    height: 33px;
  }
  .calendar-picker {
    margin: 0;
    max-width: 210px;
  }
  .calendar-picker .eyebrow {
    display: none;
  }
  .view-nav {
    display: flex;
    order: 3;
    width: 100%;
  }
  .nav-button {
    padding: 9px 13px;
  }
  .sidebar-add {
    display: none;
  }
  .sidebar-bottom {
    margin: 0;
  }
  .gentle-note,
  .account > div,
  .account > .avatar {
    display: none;
  }
  .account {
    border: 0;
    padding: 0;
  }
  .main {
    padding: 0 24px 22px;
  }
  .topbar {
    min-height: 57px;
  }
  .page-heading {
    margin: 27px 0 23px;
  }
  .week-table {
    min-width: 690px;
  }
  .page-heading .secondary {
    font-size: 12px;
  }
  .auth-shell {
    grid-template-columns: 1fr 1fr;
  }
  .auth-story {
    padding: 25px;
  }
  .story-copy h1 {
    font-size: 35px;
  }
  .story-copy p {
    font-size: 14px;
  }
  .school-art {
    height: 200px;
  }
  .auth-panel {
    padding: 20px 15px;
  }
  .auth-card h2 {
    font-size: 29px;
  }
}
@media (max-width: 600px) {
  .auth-shell {
    display: block;
    padding: 0;
  }
  .auth-story {
    border-radius: 0;
    padding: 24px;
    min-height: 150px;
  }
  .story-copy,
  .school-art,
  .story-footer {
    display: none;
  }
  .auth-story:after {
    content: "Yhteinen viikko, selkeä suunnitelma.";
    font-size: 14px;
    margin-top: 18px;
    color: #66755b;
  }
  .auth-panel {
    padding: 35px 25px;
  }
  .small-mark {
    display: none;
  }
  .auth-card form {
    margin-top: 23px;
  }
  .auth-footnote {
    margin-top: 30px;
  }
  .sidebar {
    padding: 15px 16px 12px;
    gap: 10px;
  }
  .sidebar .brand {
    font-size: 24px;
  }
  .calendar-picker {
    max-width: 145px;
  }
  .calendar-picker select {
    font-size: 12px;
    padding: 8px;
  }
  .account .icon-button {
    min-width: 32px;
  }
  .view-nav {
    gap: 5px;
  }
  .nav-button {
    font-size: 12px;
    flex: 1;
    justify-content: center;
    padding: 9px 7px;
  }
  .nav-button .icon {
    width: 17px;
  }
  .nav-dot {
    display: none;
  }
  .main {
    padding: 0 16px 22px;
  }
  .topbar {
    min-height: 49px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .breadcrumb span {
    margin: 0 5px;
  }
  .today-label {
    font-size: 9px;
  }
  .page-heading {
    flex-wrap: wrap;
    gap: 15px;
    margin: 25px 0 20px;
  }
  .page-heading h1 {
    font-size: 32px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .page-heading .eyebrow {
    font-size: 8px;
  }
  .page-heading .secondary {
    font-size: 11px;
    min-height: 34px;
    padding: 7px 10px;
  }
  .week-banner {
    padding: 17px 15px;
    gap: 13px;
    margin-bottom: 20px;
    min-height: 104px;
  }
  .week-tile {
    width: 61px;
    height: 66px;
  }
  .week-tile strong {
    font-size: 31px;
  }
  .week-meta h2 {
    font-size: 19px;
  }
  .week-meta .eyebrow {
    font-size: 8px;
  }
  .week-meta .muted {
    font-size: 11px;
  }
  .week-stat {
    display: none;
  }
  .banner-flower {
    font-size: 130px;
    right: -25px;
    top: -12px;
    opacity: 0.5;
    z-index: 0;
  }
  .week-meta {
    position: relative;
    z-index: 1;
  }
  .calendar-toolbar {
    padding: 12px;
    gap: 10px;
  }
  .week-controls {
    gap: 3px;
  }
  .calendar-toolbar .copy-button {
    width: 100%;
    order: 2;
    background: #f6f7f2;
    font-size: 11px;
  }
  .week-controls {
    width: 100%;
    justify-content: space-between;
  }
  .calendar-toolbar .compact {
    flex: 1;
    max-width: 170px;
  }
  .mobile-days {
    display: flex;
    gap: 3px;
    padding: 12px 9px;
    border-bottom: 1px solid var(--line);
  }
  .mobile-day {
    flex: 1;
    min-width: 0;
    border-radius: 10px;
    padding: 7px 2px;
    font-size: 10px;
    color: #7b8871;
  }
  .mobile-day strong {
    display: block;
    font-size: 18px;
    font-weight: 500;
    margin-top: 3px;
  }
  .mobile-day.selected {
    background: #e7eddd;
    color: #3d5937;
  }
  .mobile-day.today strong {
    text-decoration: underline;
    text-decoration-color: #90a36f;
    text-underline-offset: 4px;
  }
  .week-table {
    min-width: 0;
  }
  .week-table .mobile-hidden {
    display: none;
  }
  .week-table .time-col {
    width: 69px;
  }
  .week-table thead th {
    padding: 9px;
  }
  .day-date {
    font-size: 19px;
  }
  .week-table td {
    height: 92px;
    padding: 6px 9px;
  }
  .cell-button {
    min-height: 79px;
    font-size: 14px;
    padding: 12px 14px 23px;
  }
  .cell-button.empty {
    border-color: #ecf0e4;
  }
  .cell-button.empty .empty-plus {
    opacity: 0.65;
    font-size: 12px;
  }
  .cell-button .edit-icon {
    width: 16px;
    height: 16px;
    opacity: 0.55;
    right: 10px;
    bottom: 10px;
  }
  .entry-kind {
    font-size: 9px;
  }
  .break-row td {
    height: 39px;
  }
  .break-row .cell-button {
    font-size: 11px;
    min-height: 27px;
  }
  .calendar-footer {
    padding: 13px;
    gap: 12px;
  }
  .legend {
    gap: 10px;
  }
  .legend-item {
    font-size: 9px;
  }
  .save-status {
    font-size: 10px;
  }
  .bottom-note {
    font-size: 10px;
    align-items: flex-start;
  }
  .bottom-note > .icon {
    margin-top: 2px;
  }
  .bottom-note .text-button {
    font-size: 10px;
  }
  .editor textarea {
    font-size: 16px;
    min-height: 110px;
  }
  .editor select {
    font-size: 14px;
  }
  .editor-actions button {
    font-size: 12px;
    min-height: 38px;
    padding: 8px 13px;
  }
  .editor .error {
    font-size: 12px;
  }
  .editor .hint {
    font-size: 11px;
  }
  dialog {
    padding: 20px 17px;
    width: calc(100% - 20px);
    border-radius: 17px;
  }
  .dialog-heading h2 {
    font-size: 23px;
  }
  .slot-row {
    grid-template-columns: 1fr 1fr 36px;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .slot-row .slot-name {
    grid-column: 1/3;
    grid-row: 2;
  }
  .slot-row .break-check {
    grid-column: 1/3;
    margin: 4px 0;
  }
  .slot-row .remove-slot {
    grid-column: 3;
    grid-row: 1;
  }
  .slot-row input {
    font-size: 14px;
  }
  .day-checkboxes {
    gap: 5px;
  }
  .day-checkboxes label {
    font-size: 11px;
    padding: 8px;
  }
  .agenda-day {
    padding: 17px;
  }
  .agenda-row {
    gap: 10px;
    flex-wrap: wrap;
  }
}

/* Keep the calendar grid in the first viewport on ordinary screens. */
@media (min-width: 601px) {
  .topbar {
    min-height: 50px;
  }
  .page-heading {
    margin: 16px 0 12px;
  }
  .page-heading h1 {
    font-size: 30px;
    margin-bottom: 0;
  }
  .page-heading-description {
    display: none;
  }
  .week-banner {
    min-height: 78px;
    padding: 10px 16px;
    margin-bottom: 12px;
  }
  .week-tile {
    width: 64px;
    height: 58px;
  }
  .calendar-toolbar {
    padding: 10px 14px;
  }
}

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

@media print {
  :root {
    color: #111;
    background: #fff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  body {
    background: #fff;
    color: #111;
    font-size: 10px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  #sidebar,
  .topbar,
  .page-heading,
  .calendar-toolbar,
  #week-error,
  #mobile-days,
  .calendar-footer,
  .bottom-note,
  .bottom-note .text-button,
  .edit-icon,
  dialog,
  .toast {
    display: none !important;
  }
  .workspace {
    display: block;
    min-height: 0;
  }
  .main {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0;
  }
  .week-banner {
    min-height: 0;
    margin: 0 0 4mm;
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #111;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .week-tile {
    width: 54px;
    height: 42px;
    border-color: #cbd5e1;
    border-radius: 4px;
    background: #fff;
  }
  .week-tile span,
  .week-meta .eyebrow,
  .week-meta .muted,
  .week-stat span {
    color: #333;
  }
  .week-tile span {
    font-size: 7px;
    letter-spacing: 0.03em;
  }
  .week-tile strong,
  .week-meta h2,
  .week-stat strong {
    color: #111;
  }
  .week-tile strong {
    font-size: 22px;
  }
  .week-meta h2 {
    font-size: 15px;
  }
  .week-stat strong {
    font-size: 17px;
  }
  .banner-flower {
    display: none;
  }
  .calendar-section {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }
  #agenda {
    display: none !important;
  }
  #calendar-container,
  #calendar-container[hidden] {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    overflow: visible;
    min-height: 0;
    padding: 0;
  }
  .week-table {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 8px;
    margin: 0;
    border: 1px solid #94a3b8 !important;
    border-collapse: collapse;
    border-spacing: 0;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .week-table .mobile-hidden {
    display: table-cell !important;
  }
  .week-table th,
  .week-table td {
    box-sizing: border-box;
    padding: 4px 3px;
    border: 1px solid #cbd5e1 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .week-table thead th {
    color: #111;
    background: #f1f5f9 !important;
    border-bottom: 1px solid #94a3b8 !important;
    font-size: 8px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .week-table tr > :last-child {
    border-right: 1px solid #cbd5e1 !important;
  }
  .week-table tr:last-child > * {
    border-bottom: 1px solid #cbd5e1 !important;
  }
  .week-table .time-col {
    width: 42px;
  }
  .week-table .time-cell {
    padding: 3px 2px;
    color: #222;
    background: #fff;
    font-size: 8px;
  }
  .time-cell span,
  .day-date {
    font-size: 8px;
  }
  .day-date {
    margin-top: 1px;
  }
  .today .day-date {
    width: auto;
    height: auto;
    margin: 1px auto;
    border-radius: 0;
    background: transparent;
    color: #111;
    font-size: 8px;
  }
  .week-table td {
    height: 34px;
    padding: 2px;
    vertical-align: top;
  }
  .cell-button {
    min-height: 28px;
    padding: 3px 4px;
    border-radius: 0;
    color: #111 !important;
    background: #fff !important;
    font-size: 8px;
    line-height: 1.2;
  }
  .cell-button.empty {
    border: 0;
  }
  .cell-button.empty .empty-plus,
  .entry-kind {
    display: none;
  }
  .break-row td,
  .break-row th {
    height: 19px;
    background: #fff !important;
  }
  .break-row .cell-button {
    min-height: 16px;
    padding: 2px;
    color: #333 !important;
    font-size: 7px;
  }
  .skip-link {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Keep routine controls readable at every breakpoint, including narrow phones. */
.nav-button,
.calendar-picker select,
.page-heading .secondary,
.calendar-toolbar .secondary,
.week-table thead th,
.cell-button,
.mobile-day,
.editor-actions button,
.editor select,
.day-checkboxes label {
  font-size: 14px;
}
.eyebrow,
.page-heading .eyebrow,
.week-meta .eyebrow,
.week-tile span,
.today-label,
.breadcrumb,
.sidebar-add,
.account small,
.week-table .time-col,
.week-table .time-cell,
.time-cell span,
.break-row .time-cell,
.break-row .time-cell span,
.break-row .cell-button,
.entry-kind,
.legend-item,
.save-status,
.bottom-note,
.bottom-note .text-button,
.slot-row label,
.slot-row .break-check,
.editor .hint,
.editor .error,
.agenda-row .pill {
  font-size: 12px;
}
.week-table .time-col {
  width: 88px;
}
.break-row .cell-button {
  min-height: 44px;
}
.editor-actions button {
  min-height: 40px;
}
@media (max-width: 600px) {
  .calendar-picker {
    max-width: 150px;
  }
  .week-meta h2 {
    font-size: 20px;
  }
  .week-table .time-col {
    width: 76px;
  }
  .bottom-note {
    flex-wrap: wrap;
  }
  .bottom-note > span {
    flex: 1;
  }
  .legend {
    gap: 12px;
  }
  .calendar-footer {
    align-items: flex-start;
  }
}
