/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.class-card {
  border-left: 5px solid var(--class-color);
  background-image: linear-gradient(color-mix(in srgb, var(--class-color) 8%, transparent), color-mix(in srgb, var(--class-color) 8%, transparent));
}

/* Keep scheduling actions next to the lesson on narrow screens. */
.lesson-order-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; min-height: 44px; }
.lesson-drag-handle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: .5rem; background: var(--color-base-200); cursor: grab; touch-action: none; user-select: none; font-size: 1.6rem; line-height: 1; }
.lesson-drag-handle:active { cursor: grabbing; }
.lesson-drag-handle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.lesson-drag-handle:disabled { opacity: .5; cursor: wait; }
.lesson-dragging { opacity: .5; background: var(--color-base-200); }
.lesson-drop-before > td { box-shadow: inset 0 3px var(--color-primary); }
.lesson-drop-after > td { box-shadow: inset 0 -3px var(--color-primary); }
.lesson-drop-into { outline: 2px solid var(--color-primary); outline-offset: -2px; background: var(--color-base-200); }

@media screen and (max-width: 767px) {
  .class-plan-table, .class-plan-table tbody { display: block; width: 100%; }
  .class-plan-table thead { display: none; }
  .class-plan-table tr { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 0; }
  .class-plan-table td { display: block; padding: 0; white-space: normal; }
  .class-plan-table td:nth-child(2) { order: -1; font-size: 1rem; }
  .class-plan-table td:first-child br { display: none; }
  .class-plan-table td:first-child span { margin-left: .5rem; }
  .class-plan-table td:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
  .class-plan-table .btn { min-height: 40px; }
  .class-plan-table .lesson-drop-before > td, .class-plan-table .lesson-drop-after > td { box-shadow: none; }
  .class-plan-table .lesson-drop-before > td:nth-child(2) { box-shadow: 0 -3px var(--color-primary); }
  .class-plan-table .lesson-drop-after > td:last-child { box-shadow: 0 3px var(--color-primary); }
}

html.todo-open { overflow: hidden; }
.todo-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(42rem, 100%);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--color-base-300);
  color: var(--color-base-content);
  box-shadow: -12px 0 40px #0002;
}
.todo-dialog[open] { display: flex; flex-direction: column; }
.todo-dialog::backdrop { background: #0006; }
.todo-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: max(0.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.75rem max(1rem, env(safe-area-inset-left));
  border-bottom: 1px solid var(--color-base-300);
}
.todo-header h2 { margin-right: auto; }
.todo-content {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
.todo-content[busy] { opacity: 0.6; pointer-events: none; }
.todo-dialog :is(.btn, .input, .select) { min-height: 44px; }
.todo-dialog :is(.input, .select, .textarea) { font-size: 1rem; max-width: 100%; }
.todo-dialog :is(h1, h2, p, a) { overflow-wrap: anywhere; }
.todo-dialog .card-body > .flex > div { min-width: 0; max-width: 100%; }
.todo-dialog .card-body.grid { grid-template-columns: minmax(0, 1fr); }
.todo-dialog .card-body.grid > * { grid-column: auto; min-width: 0; }
.planner-brand-short { display: none; }
.planner-brand-mark { width: 32px; height: 32px; flex-shrink: 0; }
.planner-navigation-menu {
  width: min(20rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 6rem);
  overflow-y: auto;
  flex-wrap: nowrap;
  padding: .75rem;
  gap: .25rem;
  border: 1px solid var(--color-base-300);
  font-size: 1rem;
}
.planner-navigation-menu > li > a { min-height: 48px; padding: .75rem 1rem; border-radius: .5rem; }
@media (max-width: 1279px) {
  .desktop-nav-action { display: none; }
  .navbar-start { width: auto; }
  .navbar-end { flex: 1; width: auto; }
}
@media (max-width: 639px) {
  .todo-dialog { width: 100%; border: 0; }
  .planner-brand-full { display: none; }
  .planner-brand-short { display: inline; }
  .planner-brand-mark { width: 28px; height: 28px; }
  .planner-account { max-width: 4.5rem; padding-inline: 0.25rem; }
  .planner-account img { display: none; }
  .navbar { gap: 0; padding-inline: 0.25rem; }
  .navbar-end { gap: 0.25rem; }
  .todo-trigger { padding-inline: 0.65rem; }
}
.class-badge {
  width: fit-content;
  font-size: 0.8rem;
  font-weight: 700;
}
@media print {
  .class-card, .class-badge { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

.class-color-2563eb { --class-color: #2563eb; }
.class-color-7c3aed { --class-color: #7c3aed; }
.class-color-0f766e { --class-color: #0f766e; }
.class-color-be185d { --class-color: #be185d; }
.class-color-c2410c { --class-color: #c2410c; }
.class-color-15803d { --class-color: #15803d; }
.class-color-4338ca { --class-color: #4338ca; }
.class-color-b91c1c { --class-color: #b91c1c; }
.class-color-0e7490 { --class-color: #0e7490; }
.class-color-a16207 { --class-color: #a16207; }

/* Broad, softly faded patterns identify the class without competing with text. */
.class-pattern-zigzags { --class-pattern: url("/assets/class_patterns/zigzags-ce03d406.svg"); }
.class-pattern-circles { --class-pattern: url("/assets/class_patterns/circles-bd941886.svg"); }
.class-pattern-triangles { --class-pattern: url("/assets/class_patterns/triangles-3b5727cb.svg"); }
.class-pattern-squares { --class-pattern: url("/assets/class_patterns/squares-ffbfd7bf.svg"); }
.class-pattern-swatch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 44px;
  height: 40px;
  overflow: hidden;
  border-radius: 7px;
  background: color-mix(in srgb, var(--class-color) 18%, white);
}
.class-pattern-swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--class-color);
  mask-image: var(--class-pattern);
  mask-repeat: repeat;
}
.class-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: inherit;
  background: transparent;
  padding: 0;
}
.class-badge .class-pattern-swatch { width: 24px; height: 24px; border-radius: 4px; }
.planner-class { height: 100%; }
/* Mute elapsed days without filtering the class action dialogs. */
th.planner-day-past,
.planner-day-past .planner-tile,
.planner-day-past .planner-activity,
.planner-day-past .planner-free {
  filter: saturate(0.2);
}
.planner-tile.class-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 136px;
  padding: 0;
  text-align: left;
  color: inherit;
  --tile-background: color-mix(in srgb, var(--class-color) 7%, var(--color-base-100));
  background: var(--tile-background);
  border: 1px solid color-mix(in srgb, var(--class-color) 25%, var(--color-base-300));
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 120ms ease;
}
.planner-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--class-color);
  opacity: 0.22;
  mask-image: var(--class-pattern);
  mask-repeat: repeat;
  mask-size: 64px auto;
  mask-position: right top;
}
.planner-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, var(--tile-background) 5%, color-mix(in srgb, var(--tile-background) 85%, transparent) 48%, transparent 100%);
}
.planner-tile:hover { box-shadow: 0 2px 8px #0002; }
.planner-tile:focus-visible { outline: 3px solid var(--class-color); outline-offset: 3px; }
.planner-class-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 12px 0;
  width: 100%;
}
.planner-class-name,
.planner-lesson-title,
.planner-task-count,
.planner-status,
.planner-more {
  color: var(--color-base-content);
  max-width: 100%;
}
.planner-class-name { font-size: 1.05rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.planner-student-count { color: color-mix(in srgb, var(--color-base-content) 60%, transparent); font-size: 0.75rem; font-weight: 400; line-height: 1.2; white-space: nowrap; }
.planner-more { margin-left: auto; font-size: 1.2rem; line-height: 1; }
.planner-tile-body { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: 12px; width: 100%; }
.planner-lesson-title { font-size: 0.9rem; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.planner-tile-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.planner-tile-footer .badge { font-size: 0.68rem; height: auto; min-height: 1.2rem; padding: 0.1rem 0.4rem; }
.planner-status { font-size: 0.7rem; }
.planner-task-count, .task-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: #b91c1c;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
[data-controller~="task-count"][hidden] { display: none; }
.task-count-complete { background: #15803d; }
.planner-free { min-height: 96px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; opacity: 0.4; }
.planner-activity { padding: 12px; font-size: 0.85rem; opacity: 0.7; }
.class-action-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.class-action-links .btn { height: auto; min-height: 40px; padding-block: 8px; }
.dialog-class-swatch { width: 48px; height: 44px; }
.pattern-option { display: flex; align-items: center; gap: 6px; border: 1px solid var(--color-base-300); border-radius: 8px; padding: 8px; cursor: pointer; font-size: 0.8rem; }
.pattern-option:has(input:checked) { outline: 2px solid var(--class-color); }
.pattern-option .class-pattern-swatch { width: 30px; height: 30px; }
@media print {
  .planner-more, .class-actions-dialog { display: none !important; }
  .class-pattern-swatch, .planner-tile, .planner-tile::before, .planner-tile::after { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* A focused task workspace, using the active theme's surfaces and text. */
.todo-dialog { width: min(44rem, 100%); background: var(--color-base-100); }
.todo-header { padding: 16px 24px; gap: 12px; }
.todo-header h2 { font-size: 0.85rem; font-weight: 650; letter-spacing: 0.02em; }
.todo-header .btn { border-radius: 50%; width: 44px; padding: 0; font-size: 1.1rem; }
.todo-content { padding: 28px max(24px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.todo-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 12px; }
.todo-eyebrow { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.13em; font-weight: 650; opacity: 0.6; margin-bottom: 7px; }
.todo-intro h1, .todo-form-heading h1 { font-size: 1.9rem; letter-spacing: -0.045em; font-weight: 700; line-height: 1.2; }
.todo-subtitle { font-size: 0.85rem; line-height: 1.6; color: color-mix(in srgb, var(--color-base-content) 65%, var(--color-base-100)); }
.todo-intro .todo-subtitle { margin-top: 8px; }
.todo-dialog .todo-primary { background: var(--color-base-content); color: var(--color-base-100); border: 0; border-radius: 10px; box-shadow: none; padding-inline: 17px; white-space: nowrap; }
.todo-primary:hover { opacity: 0.85; }
.todo-primary > span { font-size: 1.3rem; font-weight: 400; }
.todo-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; border-block: 1px solid var(--color-base-300); padding: 14px 0; font-size: 0.8rem; }
.todo-toolbar strong { font-weight: 700; }
.todo-filter { display: flex; align-items: center; gap: 10px; min-width: 0; }
.todo-filter .select { background-color: var(--color-base-200); border: 0; border-radius: 8px; font-size: 0.8rem; width: 180px; box-shadow: none; }
.todo-list { display: grid; gap: 28px; padding-top: 10px; }
.todo-group-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 0.8rem; font-weight: 650; }
.todo-group-heading > span, .todo-history-count { font-size: 0.7rem; min-width: 22px; padding: 2px 6px; border-radius: 6px; text-align: center; background: var(--color-base-200); font-variant-numeric: tabular-nums; }
.todo-group-overdue .todo-group-heading, .todo-date-overdue { color: color-mix(in srgb, var(--color-error) 65%, var(--color-base-content)); }
.todo-rows { border: 1px solid var(--color-base-300); border-radius: 14px; }
.todo-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 32px; gap: 10px; padding: 17px 12px; position: relative; }
.todo-row + .todo-row { border-top: 1px solid var(--color-base-300); }
.todo-row:hover { background: color-mix(in srgb, var(--color-base-200) 45%, transparent); }
.todo-row:first-child { border-radius: 14px 14px 0 0; }
.todo-row:last-child { border-radius: 0 0 14px 14px; }
.todo-row:only-child { border-radius: 14px; }
.todo-complete { width: 36px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.todo-complete span { border: 1.5px solid color-mix(in srgb, var(--color-base-content) 35%, var(--color-base-100)); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: transparent; font-size: 0.8rem; transition: background 120ms, color 120ms; }
.todo-complete:hover span, .todo-complete:focus-visible span { background: var(--color-base-content); color: var(--color-base-100); border-color: var(--color-base-content); }
.todo-row-body { padding-top: 10px; min-width: 0; }
.todo-row h2 { font-size: 0.95rem; font-weight: 600; line-height: 1.5; }
.todo-task-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.todo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; font-size: 0.73rem; }
.todo-meta .class-badge { font-size: 0.73rem; font-weight: 550; }
.todo-meta .class-pattern-swatch { width: 16px; height: 16px; border-radius: 4px; }
.todo-repeat { opacity: 0.65; }
.todo-lesson { display: block; font-size: 0.75rem; opacity: 0.65; margin-top: 6px; text-decoration: underline; text-underline-offset: 3px; }
.todo-notes { font-size: 0.8rem; line-height: 1.6; opacity: 0.75; margin-top: 10px; overflow-wrap: anywhere; }
.todo-actions { position: relative; }
.todo-actions > summary { list-style: none; cursor: pointer; width: 32px; height: 44px; display: grid; place-items: center; font-size: 1.3rem; border-radius: 8px; }
.todo-actions > summary::-webkit-details-marker { display: none; }
.todo-actions > summary:hover, .todo-actions[open] > summary { background: var(--color-base-200); }
.todo-actions[open] { z-index: 2; }
.todo-actions-menu { position: absolute; right: 0; top: 44px; min-width: 130px; padding: 5px; border: 1px solid var(--color-base-300); border-radius: 10px; background: var(--color-base-100); box-shadow: 0 8px 24px #0002; }
.todo-actions-menu a, .todo-actions-menu button { display: flex; align-items: center; min-height: 44px; width: 100%; padding: 8px 12px; border-radius: 6px; font-size: 0.8rem; cursor: pointer; }
.todo-actions-menu :is(a, button):hover { background: var(--color-base-200); }
.todo-delete { color: color-mix(in srgb, var(--color-error) 65%, var(--color-base-content)); }
.todo-history { margin-top: 28px; border-top: 1px solid var(--color-base-300); }
.todo-history > summary { display: flex; align-items: center; gap: 10px; padding: 20px 0; cursor: pointer; list-style: none; }
.todo-history > summary::-webkit-details-marker { display: none; }
.todo-history > summary::before { content: '›'; font-size: 1.1rem; transition: transform 120ms; }
.todo-history[open] > summary::before { transform: rotate(90deg); }
.todo-history h2 { font-size: 0.8rem; font-weight: 600; }
.todo-history-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--color-base-300); }
.todo-history-row > div { flex: 1; min-width: 0; }
.todo-completed-title { font-size: 0.85rem; text-decoration: line-through; opacity: 0.65; }
.todo-history .todo-subtitle { font-size: 0.72rem; }
.todo-text-action { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.78rem; font-weight: 550; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.todo-empty { text-align: center; padding: 40px 12px; }
.todo-empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 16px; background: var(--color-base-200); font-size: 1.3rem; }
.todo-empty h2 { font-size: 1.2rem; font-weight: 650; margin-bottom: 8px; }
.todo-empty p { font-size: 0.85rem; opacity: 0.65; line-height: 1.7; }
.todo-form-heading { padding-bottom: 10px; }
.todo-back { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; min-height: 44px; margin-bottom: 8px; }
.todo-form .card { border: 0; background: transparent; box-shadow: none; }
.todo-form .card-body { padding: 0; gap: 20px; }
.todo-form label { display: block; font-size: 0.8rem; font-weight: 600; }
.todo-form [hidden] { display: none !important; }
.todo-form :is(.input, .select, .textarea) { margin-top: 7px; border: 1px solid var(--color-base-300); border-radius: 9px; background-color: var(--color-base-100); box-shadow: none; font-weight: 400; }
.todo-form .input[name='task[title]'] { font-size: 1.1rem; min-height: 54px; }
.todo-form p { font-size: 0.75rem; line-height: 1.6; }
.todo-form-actions { display: flex; align-items: center; gap: 12px; padding-top: 20px; border-top: 1px solid var(--color-base-300); margin-top: 24px; }
.todo-dialog :is(a, button, summary, input, select, textarea):focus-visible { outline: 2px solid var(--color-base-content); outline-offset: 3px; }
@media (max-width: 639px) {
  .todo-content { padding: 22px max(16px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .todo-header { padding-inline: 16px; }
  .todo-intro { gap: 12px; align-items: flex-start; }
  .todo-intro h1 { font-size: 1.65rem; }
  .todo-intro .todo-primary { padding-inline: 12px; font-size: 0.8rem; }
  .todo-intro .todo-primary > span { display: none; }
  .todo-filter .select { width: 150px; }
  .todo-row { grid-template-columns: 30px minmax(0, 1fr) 28px; padding-inline: 8px; gap: 7px; }
  .todo-complete { width: 30px; }
  .todo-actions > summary { width: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .todo-complete span, .todo-history > summary::before { transition: none; }
}

.todo-header .todo-pin { display: none; width: auto; padding-inline: 12px; border-radius: 8px; font-size: 0.8rem; gap: 7px; }
.todo-pin[aria-pressed="true"] { background: var(--color-base-200); }
@media screen and (min-width: 1024px) {
  .todo-header .todo-pin { display: inline-flex; }
  html.todo-pinned { --todo-docked-width: clamp(22rem, 30vw, 28rem); }
  html.todo-pinned body > main { margin-right: var(--todo-docked-width); }
  .todo-dialog.todo-pinned {
    top: 4rem;
    width: var(--todo-docked-width);
    height: calc(100dvh - 4rem);
    max-height: calc(100dvh - 4rem);
    z-index: 15;
    box-shadow: -4px 0 20px #00000008;
  }
  .todo-pinned .todo-content { padding: 20px 16px; }
  .todo-pinned .todo-header { padding: 12px 16px; }
  .todo-pinned .todo-intro { gap: 12px; align-items: flex-start; }
  .todo-pinned .todo-intro h1 { font-size: 1.65rem; }
  .todo-pinned .todo-primary { padding-inline: 12px; font-size: 0.8rem; }
  .todo-pinned .todo-intro .todo-primary > span { display: none; }
  .todo-pinned .todo-filter .select { width: 150px; }
}

.appearance-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.85rem; }
.appearance-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 12px; }
.appearance-heading h1 { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.035em; }
.appearance-heading p { margin-top: 8px; font-size: 0.9rem; opacity: 0.7; max-width: 40rem; }
.appearance-heading .select { min-width: 150px; }
.appearance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.appearance-card { padding: 12px; background: var(--color-base-100); border: 1px solid var(--color-base-300); border-radius: 18px; min-width: 0; }
.appearance-preview.planner-tile { height: auto; min-height: 136px; cursor: default; box-shadow: none; }
.appearance-preview .planner-class-heading { padding: 20px 18px 0; }
.appearance-preview .planner-class-name { font-size: 1.5rem; letter-spacing: -0.03em; }
.appearance-preview .planner-tile-body { padding: 10px 18px 22px; font-size: 0.8rem; }
.appearance-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.appearance-cycle { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 72px; padding: 10px; border: 1px solid var(--color-base-300); border-radius: 10px; text-align: left; cursor: pointer; }
.appearance-cycle:hover { background: var(--color-base-200); }
.appearance-cycle:focus-visible { outline: 2px solid var(--color-base-content); outline-offset: 3px; }
.appearance-colour-icon, .appearance-pattern-icon { flex: 0 0 26px; width: 26px; height: 30px; border-radius: 6px; }
.appearance-colour-icon { background: var(--class-color); }
.appearance-pattern-icon { --class-color: var(--color-base-content); }
.appearance-control-label { display: grid; gap: 3px; min-width: 0; }
.appearance-control-label > span { font-size: 0.65rem; opacity: 0.65; }
.appearance-control-label strong { font-size: 0.75rem; font-weight: 600; overflow-wrap: anywhere; }
.appearance-cycle-arrow { margin-left: auto; font-size: 1rem; opacity: 0.55; }
.appearance-save-status { min-height: 1.5em; margin: 12px 4px 0; font-size: 0.72rem; opacity: 0.65; }
.appearance-save-error .appearance-save-status { color: color-mix(in srgb, var(--color-error) 65%, var(--color-base-content)); opacity: 1; }
.appearance-empty { padding: 40px 24px; text-align: center; border: 1px solid var(--color-base-300); border-radius: 16px; background: var(--color-base-100); }
.appearance-empty h2 { font-size: 1.2rem; font-weight: 650; }
.appearance-empty p { margin: 10px 0 20px; }

.lesson-workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-block: 8px 16px; }
.lesson-workspace-card { display: block; min-width: 0; border: 1px solid var(--color-base-300); border-radius: 16px; background: var(--color-base-100); padding: 20px; }
.lesson-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; min-height: 40px; }
.lesson-section-heading h2 { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 650; }
.lesson-note-form { display: flex; flex-direction: column; height: 100%; }
.lesson-note-input { width: 100%; flex: 1; min-height: 110px; resize: vertical; border-radius: 10px; padding: 12px; font-size: 0.9rem; line-height: 1.6; }
.lesson-note-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.lesson-note-footer p { font-size: 0.75rem; opacity: 0.65; }
.lesson-task-list { margin-bottom: 12px; }
.lesson-task-list li + li { border-top: 1px solid var(--color-base-300); }
.lesson-task-list li { display: flex; align-items: center; gap: 12px; padding-block: 8px; }
.lesson-task-summary { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lesson-task-list strong { font-size: 0.85rem; font-weight: 550; }
.lesson-task-list small { display: block; font-size: 0.72rem; margin-top: 3px; }
.lesson-task-edit, .lesson-undo { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.8rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lesson-workspace-card .app-feedback { margin-bottom: 12px; }
.lesson-workspace-card .app-feedback .button_to { display: inline; margin-left: 8px; }
.lesson-view-tasks { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.8rem; text-decoration: underline; text-underline-offset: 3px; }
.lesson-tasks-empty { font-size: 0.85rem; opacity: 0.65; padding-block: 12px 24px; }
.lesson-workspace :is(a, button, input, textarea):focus-visible { outline: 2px solid var(--color-base-content); outline-offset: 3px; }
@media (max-width: 767px) { .lesson-workspace { grid-template-columns: minmax(0, 1fr); } }

/* Notifications use readable theme text on a quiet tinted surface. */
.app-feedback-success { --feedback-accent: #15803d; }
.app-feedback-error { --feedback-accent: #b91c1c; }
.app-feedback-info { --feedback-accent: #2563eb; }
.alert.app-feedback { display: block; background: color-mix(in srgb, var(--feedback-accent) 8%, var(--color-base-100)); color: var(--color-base-content); border: 1px solid color-mix(in srgb, var(--feedback-accent) 24%, var(--color-base-100)); border-left: 3px solid var(--feedback-accent); border-radius: 10px; box-shadow: none; padding: 14px 16px; font-size: 0.875rem; line-height: 1.6; }

.lesson-status { border: 1px solid currentColor; font-weight: 650; }
.lesson-status-needs_planning { color: #991b1b; background: #fee2e2; }
.lesson-status-needs_printing { color: #9a3412; background: #ffedd5; }
.lesson-status-ready { color: #166534; background: #dcfce7; }
.task-group-choice { display: inline-flex; align-items: center; gap: .5rem; margin: .25rem .75rem .25rem 0; padding: .5rem .7rem; border: 1px solid var(--color-base-300); border-radius: .6rem; }
.task-group-completions { display: grid; gap: .5rem; min-width: 5rem; }
.task-group-check { display: flex; align-items: center; gap: .45rem; font-size: .75rem; cursor: pointer; }
.task-group-done { font-size: .75rem; color: var(--color-base-content); opacity: .65; }
.week-summary { border: 1px solid var(--color-base-300); background: var(--color-base-100); border-radius: 1rem; padding: 1rem; font-size: .85rem; }
.summary-header, .summary-actions, .summary-stats { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.summary-header { justify-content: space-between; gap: .75rem; }
.summary-muted { color: color-mix(in srgb, var(--color-base-content) 70%, var(--color-base-100)); font-size: .78rem; }
.summary-stats { gap: .5rem 1rem; padding-block: .75rem; margin-top: .5rem; border-bottom: 1px solid var(--color-base-300); }
.summary-status { border-radius: .35rem; padding: .15rem .4rem; font-size: .75rem; font-weight: 600; }
.summary-content { display: grid; gap: 1rem; padding-top: .85rem; }
.summary-content > section { min-width: 0; }
.summary-section-title { font-weight: 650; margin-bottom: .25rem; }
.summary-empty { font-size: .8rem; opacity: .7; margin-top: .4rem; }
.summary-free-periods { font-size: .78rem; margin-top: .45rem; }
.summary-free-periods strong { font-weight: 600; }
.summary-today-list { margin-top: .45rem; }
.summary-today-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .65rem; padding-block: .25rem; }
.summary-period { font-size: .75rem; font-weight: 600; min-width: 1.5rem; }
.summary-class-link { font-weight: 650; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.summary-event { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--color-base-300); }
.summary-event:last-child { border-bottom: 0; padding-bottom: 0; }
.summary-event-date { font-size: .75rem; padding-top: .1rem; }
.summary-event-today .summary-event-date { font-weight: 750; }
.summary-event-today { border-left: 3px solid var(--color-primary); padding-left: .5rem; }
.summary-event-body { min-width: 0; overflow-wrap: anywhere; }
.summary-entry-title strong { font-weight: 600; }
.summary-preview { font-size: .78rem; opacity: .75; }
.summary-kind { font-size: .65rem; font-weight: 400; border: 1px solid var(--color-base-300); border-radius: .25rem; padding: .1rem .25rem; margin-left: .3rem; }
.summary-event summary { cursor: pointer; }
.summary-event details[open] .summary-preview { display: none; }
.summary-note { margin-block: .5rem; font-size: .8rem; }
.week-summary :is(a, button, summary):focus-visible { outline: 2px solid var(--color-base-content); outline-offset: 3px; }
@media (min-width: 900px) {
  .summary-content-current { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .summary-today { border-right: 1px solid var(--color-base-300); padding-right: 1rem; }
}
@media (max-width: 600px) {
  .summary-event { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .summary-header .summary-actions { gap: .25rem; }
}
.planner-club-row th { font-size: .7rem; white-space: normal; vertical-align: top; padding-top: 1rem; }
.planner-club { display: grid; gap: .2rem; padding: .7rem; margin-bottom: .4rem; border: 1px dashed var(--color-base-content); border-radius: .6rem; background: var(--color-base-200); font-size: .85rem; }
.planner-club span { font-size: .65rem; opacity: .65; }
.planner-day-past .planner-club { filter: saturate(.2); opacity: .7; }
.calendar-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.calendar-months { display: grid; gap: 1.5rem; }
.calendar-month { border: 1px solid var(--color-base-300); border-radius: 1rem; background: var(--color-base-100); overflow: hidden; min-width: 0; }
.calendar-month h2 { font-size: 1.1rem; font-weight: 700; padding: 1rem; }
.calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekday { padding: .5rem .25rem; font-size: .7rem; text-align: center; opacity: .65; }
.calendar-day { min-height: 7rem; border-top: 1px solid var(--color-base-300); border-right: 1px solid var(--color-base-300); padding: .35rem; min-width: 0; }
.calendar-day-outside { background: var(--color-base-200); opacity: .4; }
.calendar-day-today { box-shadow: inset 0 0 0 2px var(--color-primary); }
.calendar-date { font-size: .75rem; font-weight: 650; display: inline-block; padding: .15rem .3rem; }
.calendar-event { display: block; font-size: .7rem; line-height: 1.35; padding: .25rem; margin: .2rem 0; background: var(--color-base-200); border-radius: .3rem; overflow-wrap: anywhere; }
.calendar-meeting { border-left: 3px solid var(--color-primary); }
.calendar-club { border-left: 3px solid #0f766e; }
@media (min-width: 1200px) { .calendar-months-many { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .calendar-day { min-height: 4.5rem; padding: .15rem; } .calendar-event { font-size: .6rem; } }
.task-group-check:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: .35rem; }
.task-group-check:hover .todo-complete span, .task-group-check:focus-visible .todo-complete span { background: var(--color-base-content); color: var(--color-base-100); }
.class-actions-dialog .lesson-workspace-card { margin-top: 1rem; }
.calendar-event { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.calendar-more { display: inline-block; font-size: .7rem; font-weight: 650; padding: .2rem; }
.calendar-months-many .calendar-day { min-height: 4.5rem; }

/* Preparation controls share the planner's existing surfaces and type scale. */
.lesson-status-control { display: grid; gap: .4rem; margin-top: 1rem; }
.lesson-status-control label { font-size: .85rem; font-weight: 600; }
.lesson-status-control select { margin-top: .3rem; }
.task-priority { display: inline-flex; padding: .15rem .5rem; border-radius: .4rem; font-size: .75rem; font-weight: 600; background: var(--color-base-200); }
.task-priority-0 { color: #9a3412; background: #ffedd5; }
.todo-filter { flex-wrap: wrap; }
.todo-filter .select { max-width: 100%; }
.todo-planning { border-top: 1px solid var(--color-base-300); padding-top: 1.25rem; }
.todo-planning > .todo-subtitle { margin-bottom: .75rem; }
.todo-planning-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 0; border-bottom: 1px solid var(--color-base-300); }
.todo-planning-row > div { min-width: 0; overflow-wrap: anywhere; }
.todo-planning-row .btn { flex-shrink: 0; }
.planner-after-school-event { border-style: solid; }
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  .planner-table { min-width: 0 !important; width: 100%; font-size: 9px; }
  .planner-table th, .planner-table td { padding: 3px; }
  .planner-table tr { break-inside: avoid; }
  .planner-table .planner-tile { min-height: 0; padding: 6px; }
  .planner-table .planner-lesson-title, .planner-table .planner-class-name { white-space: normal; overflow: visible; }
  .planner-club { padding: 4px; font-size: 9px; }
  .overflow-x-auto { overflow: visible !important; }
  .todo-dialog, .lesson-status-control { display: none !important; }
  html.todo-pinned main { margin-right: 0 !important; }
}
@media (max-width: 640px) {
  .todo-filter select[name="planning_days"] { width: 100%; max-width: none; }
}
