:root {
  color-scheme: light;
  --bg: #f3f8fb;
  --surface: #ffffff;
  --ink: #17212b;
  --muted: #617080;
  --line: #d9e7ef;
  --line-strong: #b9d1dd;
  --accent: #24a9df;
  --accent-dark: #087faf;
  --brand-green: #96d22b;
  --brand-green-dark: #5f9d25;
  --brand-orange: #ff6a00;
  --brand-yellow: #ffc400;
  --brand-blue: #24a9df;
  --soft: #edf8fd;
  --soft-warm: #fff7df;
  --row-a: #ffffff;
  --row-b: #f7fbfd;
  --shadow: 0 18px 45px rgba(23, 33, 43, 0.1);
  --shadow-soft: 0 10px 24px rgba(23, 33, 43, 0.08);
  --warm: #ff6a00;
  --warm-soft: #fff4dd;
  --plan-theme: #24a9df;
  --plan-theme-soft: #edf8fd;
  --plan-theme-mid: #cceef9;
  --plan-theme-line: #89d5ee;
  --plan-theme-accent: #ff6a00;
  --plan-accent-soft: #fff4dd;
  --plan-accent-mid: #ffd0ad;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 9% 6%, rgba(255, 196, 0, 0.2) 0 58px, transparent 59px),
    radial-gradient(circle at 92% 10%, rgba(150, 210, 43, 0.18) 0 74px, transparent 75px),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #eef7fb 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  overflow-y: auto;
}

body {
  overflow-y: auto;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1820px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 22px 0;
}

.planner {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 16px;
  align-items: start;
  overflow: visible;
  padding: 22px;
  border: 1px solid rgba(36, 169, 223, 0.22);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-locked .planner {
  display: none;
}

.login-panel {
  display: grid;
  gap: 20px;
  width: min(460px, 100%);
  margin: 12vh auto 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-panel[hidden] {
  display: none;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.login-form span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 9px;
}

.login-remember input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 14px 18px;
  border: 1px solid #e3f2f8;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(36, 169, 223, 0.1), rgba(150, 210, 43, 0.08) 58%, rgba(255, 106, 0, 0.1));
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
}

.brand-logo {
  width: 118px;
  height: 76px;
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
}

.brand-lockup h1 {
  margin: 0;
  color: #17212b;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.teacher-badge {
  align-self: center;
  max-width: 260px;
  overflow: hidden;
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-password {
  display: grid;
  gap: 4px;
  width: 150px;
}

.admin-password span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.admin-password input {
  min-height: 42px;
}

.tabs {
  position: sticky;
  top: 14px;
  z-index: 3;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 28px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  scrollbar-width: thin;
}

.sidebar-tab-block {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #d7ecf4;
  border-radius: 8px;
  background: #f8fcfe;
}

.sidebar-tab-heading {
  margin: 0 0 2px;
  color: #4d5c66;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.planner > section,
.planner > div:not(.topbar):not(.tabs) {
  grid-column: 2;
}

.tab {
  position: relative;
  width: 100%;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.92rem;
  font-weight: 850;
  text-align: left;
}

.tab.has-unread::before {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--brand-orange);
  transform: translateY(-50%);
}

.tab[hidden] {
  display: none;
}

.tab.is-hidden-by-setting {
  border-color: #d9e2e8;
  background: #f4f7f8;
  color: #7a8791;
  opacity: 0.78;
}

.tab.is-hidden-by-setting::after {
  content: " hidden";
  display: inline-block;
  margin-left: 6px;
  color: #8a4f1d;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tab.is-active {
  border-color: #bfe4f1;
  background: #fff;
  color: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(36, 169, 223, 0.11);
}

.sidebar-tab-block:nth-child(1) .tab.is-active {
  border-color: #bfe4f1;
}

.sidebar-tab-block:nth-child(2) .tab.is-active {
  border-color: #cfe9b4;
}

.sidebar-tab-block:nth-child(3) .tab.is-active {
  border-color: #f4d2a8;
}

.sidebar-tab-block:nth-child(4) .tab.is-active {
  border-color: #cfc8e9;
}

.tab.dragging-tab {
  opacity: 0.45;
}

.dashboard-view {
  display: grid;
  gap: 18px;
  padding-top: 16px;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 190px;
  padding: 24px;
  border: 1px solid #bfe4f1;
  border-radius: 8px;
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 196, 0, 0.28) 0 42px, transparent 43px),
    radial-gradient(circle at 91% 74%, rgba(255, 106, 0, 0.18) 0 58px, transparent 59px),
    linear-gradient(135deg, #eaf8fd 0%, #ffffff 48%, #f0f9e6 100%);
  box-shadow: var(--shadow-soft);
}

.dashboard-hero h2,
.dashboard-group-head h3 {
  margin: 0;
}

.dashboard-hero h2 {
  max-width: 760px;
  font-size: clamp(2rem, 5vw, 4.3rem);
  line-height: 0.98;
}

.dashboard-hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.45;
}

.dashboard-groups {
  display: grid;
  gap: 14px;
}

.dashboard-announcements {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d8e9f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(23, 33, 43, 0.06);
}

.dashboard-announcements-head,
.announcement-card-head,
.announcement-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-announcements-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.1rem;
}

.announcement-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid #edf4f7;
  border-radius: 8px;
  background: #f8fcfe;
}

.announcement-form label {
  display: grid;
  gap: 7px;
}

.announcement-form span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.announcement-form textarea {
  min-height: 52px;
  max-height: 120px;
}

.announcement-list {
  display: grid;
  gap: 8px;
}

.announcement-card {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid #dcebf2;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #fafeff;
}

.announcement-card.is-sub-request {
  border-left-color: var(--brand-orange);
  background: #fffaf2;
}

.announcement-card-head strong {
  margin-right: auto;
  color: var(--ink);
  font-weight: 1000;
}

.announcement-delete-button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 0.78rem;
}

.announcement-card-head span,
.announcement-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.announcement-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.announcement-actions {
  justify-content: flex-start;
}

.dashboard-group {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #d9eaf2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.dashboard-group-head {
  display: grid;
  gap: 2px;
}

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.dashboard-card {
  display: grid;
  gap: 6px;
  align-content: start;
  justify-items: start;
  min-height: 96px;
  padding: 13px;
  border: 1px solid #d5eaf2;
  border-radius: 8px;
  background: #f8fcfe;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.dashboard-card:hover,
.dashboard-card:focus-visible {
  border-color: var(--accent);
  background: #eef9fd;
  transform: translateY(-1px);
}

.dashboard-card strong {
  font-size: 1rem;
}

.dashboard-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.primary-dashboard-card {
  border-color: var(--brand-green);
  background: linear-gradient(135deg, #edf9df, #f8fcfe);
}

.admin-dashboard-group[hidden] {
  display: none;
}

.hidden {
  display: none;
}

[hidden] {
  display: none !important;
}

.class-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px);
  gap: 10px;
  align-items: end;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #cde5df;
  border-radius: 8px;
  background: var(--soft);
}

.class-bar label,
.saved-plan-bar label {
  display: grid;
  gap: 8px;
}

.native-class-select {
  display: none !important;
}

.class-bar span,
.saved-plan-bar span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.planner-class-picker {
  display: grid;
  gap: 10px;
}

.planner-class-picker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 132px;
  overflow: auto;
  padding: 2px;
}

.planner-class-choice {
  border: 1px solid #b8d9d1;
  background: #ffffff;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 800;
  box-shadow: none;
}

.planner-class-choice.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.saved-plan-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--plan-theme-line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--plan-theme-soft), #ffffff 58%);
}

html[data-plan-design="stripes"] .saved-plan-bar,
html[data-plan-design="stripes"] .spreadsheet-theme-bar,
html[data-plan-design="stripes"] .outline-header,
html[data-plan-design="stripes"] .outline-row-head,
html[data-plan-design="stripes"] .planner-outline-head {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.58) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, var(--plan-theme-soft), var(--plan-accent-soft));
}

html[data-plan-design="dots"] .saved-plan-bar,
html[data-plan-design="dots"] .spreadsheet-theme-bar,
html[data-plan-design="dots"] .outline-header,
html[data-plan-design="dots"] .outline-row-head,
html[data-plan-design="dots"] .planner-outline-head {
  background:
    radial-gradient(circle at 14px 14px, var(--plan-theme-line) 0 3px, transparent 3px),
    linear-gradient(135deg, var(--plan-theme-soft), var(--plan-accent-soft));
  background-size: 28px 28px, auto;
}

html[data-plan-design="grid"] .saved-plan-bar,
html[data-plan-design="grid"] .spreadsheet-theme-bar,
html[data-plan-design="grid"] .outline-header,
html[data-plan-design="grid"] .outline-row-head,
html[data-plan-design="grid"] .planner-outline-head {
  background:
    linear-gradient(var(--plan-theme-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--plan-theme-line) 1px, transparent 1px),
    linear-gradient(135deg, var(--plan-theme-soft), var(--plan-accent-soft));
  background-size: 26px 26px, 26px 26px, auto;
}

html[data-plan-design="burst"] .saved-plan-bar,
html[data-plan-design="burst"] .spreadsheet-theme-bar,
html[data-plan-design="burst"] .outline-header,
html[data-plan-design="burst"] .outline-row-head,
html[data-plan-design="burst"] .planner-outline-head {
  background:
    radial-gradient(circle at 18% 20%, var(--plan-accent-mid), transparent 28%),
    radial-gradient(circle at 84% 18%, var(--plan-theme-mid), transparent 24%),
    linear-gradient(135deg, var(--plan-theme-soft), #ffffff 58%);
}

html[data-plan-design="stars"] .saved-plan-bar,
html[data-plan-design="stars"] .spreadsheet-theme-bar,
html[data-plan-design="stars"] .outline-header,
html[data-plan-design="stars"] .outline-row-head,
html[data-plan-design="stars"] .planner-outline-head {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='%23c9841e' fill-opacity='.42' d='M14 4.5l2.7 6 6.5.7-4.9 4.4 1.4 6.4-5.7-3.3-5.7 3.3 1.4-6.4-4.9-4.4 6.5-.7z'/%3E%3C/svg%3E"),
    linear-gradient(135deg, var(--plan-theme-soft), var(--plan-accent-soft));
  background-size: 28px 28px, auto;
}

html[data-plan-design="hearts"] .saved-plan-bar,
html[data-plan-design="hearts"] .spreadsheet-theme-bar,
html[data-plan-design="hearts"] .outline-header,
html[data-plan-design="hearts"] .outline-row-head,
html[data-plan-design="hearts"] .planner-outline-head {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='%23c9841e' fill-opacity='.42' d='M14 22.5C8 17.2 5 14.5 5 10.6 5 8 7 6 9.5 6c1.6 0 3.2.9 4.1 2.2C14.6 6.9 16.1 6 17.8 6 20.3 6 22.3 8 22.3 10.6c0 3.9-3.1 6.6-8.3 11.9z'/%3E%3C/svg%3E"),
    linear-gradient(135deg, var(--plan-theme-soft), #ffffff 62%);
  background-size: 28px 28px, auto;
}

html[data-plan-design="waves"] .saved-plan-bar,
html[data-plan-design="waves"] .spreadsheet-theme-bar,
html[data-plan-design="waves"] .outline-header,
html[data-plan-design="waves"] .outline-row-head,
html[data-plan-design="waves"] .planner-outline-head {
  background:
    radial-gradient(ellipse at 50% 0, transparent 0 48%, var(--plan-theme-line) 49% 52%, transparent 53%),
    radial-gradient(ellipse at 50% 100%, transparent 0 48%, var(--plan-accent-mid) 49% 52%, transparent 53%),
    linear-gradient(135deg, var(--plan-theme-soft), #ffffff 62%);
  background-size: 54px 24px, 54px 24px, auto;
}

html[data-plan-design="confetti"] .saved-plan-bar,
html[data-plan-design="confetti"] .spreadsheet-theme-bar,
html[data-plan-design="confetti"] .outline-header,
html[data-plan-design="confetti"] .outline-row-head,
html[data-plan-design="confetti"] .planner-outline-head {
  background:
    linear-gradient(25deg, transparent 0 45%, var(--plan-theme-line) 46% 54%, transparent 55%),
    linear-gradient(115deg, transparent 0 47%, var(--plan-accent-mid) 48% 55%, transparent 56%),
    radial-gradient(circle at 28px 12px, var(--plan-theme-accent) 0 2px, transparent 3px),
    linear-gradient(135deg, var(--plan-theme-soft), #ffffff 62%);
  background-size: 42px 38px, 36px 34px, 48px 42px, auto;
}

html[data-plan-design="image"] .saved-plan-bar,
html[data-plan-design="image"] .spreadsheet-theme-bar,
html[data-plan-design="image"] .outline-header,
html[data-plan-design="image"] .outline-row-head,
html[data-plan-design="image"] .planner-outline-head {
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62)),
    var(--plan-background-image),
    linear-gradient(135deg, var(--plan-theme-soft), var(--plan-accent-soft));
  background-position: center;
  background-size: auto, cover, auto;
}

.plan-color-field input[type="color"] {
  width: 100%;
  min-height: 42px;
  padding: 4px;
  border: 1px solid var(--plan-theme-line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.plan-upload-field input[type="file"] {
  width: 100%;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--plan-theme-line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-notes-panel {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #ead7a6;
  border-radius: 8px;
  background: var(--soft-warm);
}

.admin-notes-panel label,
.coach-notes-panel label {
  display: grid;
  gap: 8px;
}

.admin-notes-panel span,
.coach-notes-panel span,
.skill-note-label span {
  color: #7c5a13;
  font-size: 0.82rem;
  font-weight: 900;
}

.plan-notes-input,
.coach-notes-input {
  min-height: 86px;
  border-color: #dfc67d;
  background: #fffdf7;
}

.coach-notes-panel {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #ead7a6;
  border-radius: 8px;
  background: #fffaf0;
}

.coach-notes-carry-panel {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #ead7a6;
  border-radius: 8px;
  background: #fffdf7;
}

.coach-notes-carry-panel strong {
  color: var(--ink);
}

.coach-notes-status {
  min-height: 18px;
  margin: 0;
  color: #80622a;
  font-size: 0.8rem;
  font-weight: 800;
}

.next-month-capture-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #cfded9;
  border-radius: 8px;
  background: #f8fcfa;
}

.next-month-capture-panel label {
  display: grid;
  gap: 8px;
}

.next-month-capture-panel span {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.next-month-capture-panel textarea {
  min-height: 74px;
  background: #ffffff;
}

.next-month-capture-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.next-month-capture-actions span {
  color: var(--accent-dark);
}

.build-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #cde5df;
  border-radius: 8px;
  background: #fbfdfc;
  box-shadow: var(--shadow-soft);
}

.build-panel h2 {
  font-size: 1.35rem;
  color: var(--ink);
}

.build-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.build-controls label {
  display: grid;
  gap: 8px;
}

.build-controls span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.individual-count-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.7fr) minmax(110px, 0.55fr) minmax(110px, 0.55fr) repeat(3, auto);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #d4e2f1;
  border-radius: 8px;
  background: #f8fbff;
}

.individual-count-panel label {
  display: grid;
  gap: 8px;
}

.individual-count-panel .login-remember {
  align-self: center;
  display: flex;
}

.individual-count-panel span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.individual-count-summary {
  display: grid;
  gap: 4px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #c7d8ea;
  border-radius: 8px;
  background: #ffffff;
}

.individual-count-summary strong {
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
}

#individualSkillCountAverage {
  align-self: center;
  color: #34516f;
  grid-column: 1 / -1;
}

.individual-count-history {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.individual-count-history span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #c7d8ea;
  border-radius: 999px;
  background: #ffffff;
  color: #34516f;
}

.native-outline-select {
  display: none !important;
}

.outline-choice-field {
  display: grid;
  gap: 6px;
  min-width: min(100%, 220px);
}

.outline-choice-field > span {
  color: #5e7288;
  font-size: 0.78rem;
  font-weight: 850;
}

.outline-choice-trigger {
  justify-content: flex-start;
  min-height: 42px;
  width: 100%;
  border: 1px solid #c7d8ea;
  background: #ffffff;
  color: #5e7288;
  box-shadow: none;
}

.outline-choice-trigger.has-value {
  border-color: var(--accent);
  color: var(--text);
}

.outline-choice-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.outline-choice-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  place-items: start center;
  padding: 72px 16px 24px;
  background: rgba(17, 43, 74, 0.32);
}

.outline-choice-modal.is-open {
  display: grid;
}

.outline-choice-modal-card {
  display: grid;
  gap: 12px;
  width: min(560px, 100%);
  max-height: min(680px, calc(100vh - 104px));
  overflow: hidden;
  padding: 18px;
  border: 1px solid #c7d8ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(17, 43, 74, 0.28);
}

.outline-choice-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.outline-choice-modal-head h3 {
  margin: 0;
}

.outline-choice-modal-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  max-height: min(480px, calc(100vh - 250px));
  overflow: auto;
  padding: 2px;
}

.outline-choice-group {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d9e7ef;
  border-radius: 8px;
  background: #f7fbfd;
}

.outline-choice-group h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.outline-choice-group-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.camp-name-field {
  min-width: min(100%, 220px);
}

.saved-plans-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.saved-plans-collapsible {
  display: block;
}

.saved-plans-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.saved-plans-summary::-webkit-details-marker {
  display: none;
}

.saved-plans-summary h2,
.saved-plans-summary p {
  margin: 0;
}

.saved-plans-summary span {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 950;
}

.saved-plans-collapsible[open] .saved-plans-summary span {
  font-size: 0;
}

.saved-plans-collapsible[open] .saved-plans-summary span::after {
  content: "Hide list";
  font-size: 0.85rem;
}

.saved-plans-collapsible .saved-plans-head {
  margin-top: 12px;
}

.saved-plans-head,
.saved-plans-group-head,
.saved-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.saved-plans-list {
  display: grid;
  gap: 10px;
}

.saved-plans-card,
.saved-plans-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d9e7ef;
  border-radius: 8px;
  background: #f7fbfd;
}

.saved-plans-card h3 {
  margin: 0;
  font-size: 0.95rem;
}

.saved-plans-days {
  display: grid;
  gap: 6px;
}

.saved-plan-row {
  padding: 6px;
  border-radius: 8px;
  background: #ffffff;
}

.saved-plan-name {
  justify-content: flex-start;
  flex: 1;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  text-align: left;
}

.danger {
  border-color: #fecaca !important;
  color: #b91c1c !important;
}

#outlineChoiceModalEmpty.is-hidden {
  display: none;
}

.outline-choice-button {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #b8d9d1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.15;
  box-shadow: none;
}

.outline-choice-button:hover,
.outline-choice-button:focus-visible {
  border-color: var(--accent);
  background: #eef9f6;
  color: var(--accent);
}

.outline-choice-button.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  letter-spacing: 0;
}

h2 {
  font-size: 1rem;
}

.lesson-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 18px;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
}

.grid-head,
.grid-cell {
  min-width: 0;
}

.time-head,
.time-cell,
.time-end {
  min-width: 0;
}

.grid-head {
  padding: 10px;
  border: 1px solid var(--plan-theme-line);
  border-radius: 8px;
  background: var(--plan-theme-soft);
  color: var(--plan-theme);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.grid-cell {
  display: block;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--row-a);
}

.planner-outline-row {
  overflow: visible;
  border: 1px solid var(--plan-theme-line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(24, 32, 29, 0.04);
}

.planner-outline-row.row-odd {
  background: var(--plan-theme-soft);
}

.planner-outline-head {
  display: grid;
  grid-template-columns: minmax(118px, 0.26fr) minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 10px 12px;
  background: linear-gradient(90deg, var(--plan-theme-soft), #ffffff 70%);
}

.planner-outline-row.is-collapsed .planner-outline-skills,
.planner-outline-row.is-collapsed .outline-skills-edit {
  display: none;
}

.planner-row-toggle {
  align-self: center;
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.planner-outline-head .outline-time {
  min-height: auto;
  padding: 7px;
}

.planner-outline-head .time-range {
  font-size: 0.78rem;
}

.planner-outline-head .duration-label {
  gap: 4px;
}

.planner-outline-head .duration-label input {
  min-height: 32px;
}

.planner-outline-head .row-actions {
  gap: 4px;
  margin-top: 5px;
}

.planner-outline-head .row-move-button {
  min-height: 28px;
  padding: 3px 6px;
  font-size: 0.72rem;
}

.outline-time,
.outline-category-edit {
  border-radius: 8px;
  background: #ffffff;
}

.outline-category-edit {
  display: grid;
  align-content: center;
}

.planner-outline-skills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 10px 12px 12px;
}

.outline-skill-edit {
  display: grid;
  grid-template-columns: minmax(120px, 0.25fr) minmax(220px, 1fr);
  gap: 8px 12px;
  align-items: start;
  background: #ffffff;
}

.outline-skill-edit:nth-child(even) {
  background: var(--plan-theme-soft);
}

.outline-edit-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.outline-end-time {
  justify-self: start;
  min-width: min(100%, 220px);
  background: #fffaf0;
  border-color: #ead69b;
}

.grid-cell.row-odd {
  background: var(--plan-theme-soft);
}

.grid-cell.row-even {
  background: var(--row-a);
}

.category-cell {
  border-left: 3px solid var(--plan-theme);
}

.time-cell {
  border-left: 3px solid #e6ad4f;
}

.row-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.row-move-button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 0.78rem;
}

.grid-cell.is-highlighted {
  border-color: #eab308;
  background: #fff8d6;
  box-shadow: inset 0 0 0 1px #eab308;
}

.planner-outline-row.is-highlighted {
  border-color: #eab308;
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.24);
}

.skill-picker {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
}

.category-picker {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.category-picker .skill-search-menu {
  left: 0;
}

.skill-search-toggle {
  min-height: 38px;
  padding: 0;
}

.skill-search-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 30px;
  right: 0;
  display: grid;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(24, 32, 29, 0.16);
}

.skill-search-menu[hidden] {
  display: none;
}

.skill-search-option {
  min-height: 36px;
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.skill-search-option:hover {
  background: var(--soft);
  color: var(--accent-dark);
}

.skill-search-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.locked-value {
  display: block;
  overflow-wrap: anywhere;
}

.category-value {
  grid-column: 1 / -1;
  color: var(--accent-dark);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.25;
}

.skill-value {
  grid-column: 2;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.25;
}

.locked-value[hidden] {
  display: none;
}

.plan-locked .lesson-grid select,
.plan-locked .lesson-grid .skill-search-input,
.plan-locked .lesson-grid .skill-search-toggle,
.plan-locked .lesson-grid .skill-search-menu {
  display: none;
}

.plan-locked .skill-picker {
  align-items: start;
}

.video-link {
  display: inline-flex;
  grid-column: 2;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 28px;
  margin-top: 2px;
  border: 1px solid #b9ddd6;
  border-radius: 999px;
  background: #effaf7;
  color: #075e54;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  padding: 0 10px;
  text-decoration: none;
  white-space: nowrap;
}

.video-link:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.coach-resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #fbfdfc;
}

.coach-resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #0f766e;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.coach-resource-link:hover {
  background: #0b5e58;
}

.resource-view {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.resource-view.hidden {
  display: none;
}

.resource-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #fbfdfc;
}

.resource-frame {
  width: 100%;
  min-height: min(760px, calc(100vh - 230px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

#clipCutterView.resource-view {
  height: calc(100vh - 42px);
  min-height: 860px;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  gap: 8px;
  margin-top: 4px;
}

#clipCutterView .resource-view-head {
  padding: 6px 10px;
}

#clipCutterView .resource-view-head .eyebrow {
  margin-bottom: 2px;
}

#clipCutterView .resource-view-head h2 {
  font-size: 1.08rem;
}

#clipCutterView .resource-frame {
  height: 100%;
  min-height: 800px;
}

body:not(.auth-locked):has(#clipCutterView:not(.hidden)) {
  background: #ffffff;
}

body:not(.auth-locked):has(#clipCutterView:not(.hidden)) .shell {
  width: 100vw;
  padding: 0;
}

.planner:has(#clipCutterView:not(.hidden)) {
  min-height: 100vh;
  grid-template-columns: 160px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 8px;
  padding: 6px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.planner:has(#clipCutterView:not(.hidden)) .topbar {
  padding: 6px 8px;
}

.planner:has(#clipCutterView:not(.hidden)) .brand-logo {
  width: 64px;
  height: 40px;
}

.planner:has(#clipCutterView:not(.hidden)) .brand-lockup {
  gap: 8px;
  min-width: 210px;
}

.planner:has(#clipCutterView:not(.hidden)) .brand-lockup h1 {
  font-size: 1.05rem;
}

.planner:has(#clipCutterView:not(.hidden)) .actions {
  gap: 6px;
}

.planner:has(#clipCutterView:not(.hidden)) .actions button {
  min-height: 32px;
  padding: 7px 9px;
}

.planner:has(#clipCutterView:not(.hidden)) .tabs {
  top: 6px;
  gap: 6px;
  max-height: calc(100vh - 12px);
}

.planner:has(#clipCutterView:not(.hidden)) .sidebar-tab-block {
  gap: 4px;
  padding: 7px;
}

.planner:has(#clipCutterView:not(.hidden)) .tab {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 0.78rem;
}

.planner:has(#clipCutterView:not(.hidden)) #clipCutterView.resource-view {
  height: calc(100vh - 64px);
  min-height: 900px;
  margin-top: 0;
}

.planner:has(#clipCutterView:not(.hidden)) #clipCutterView .resource-view-head {
  display: none;
}

.planner:has(#clipCutterView:not(.hidden)) #clipCutterView .resource-frame {
  min-height: 880px;
  border-radius: 6px;
}

.message-generator {
  display: grid;
  gap: 12px;
}

.message-generator-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #fbfdfc;
}

.message-tab-button {
  border: 1px solid #cfe4dc;
  background: #eef7f4;
  color: var(--accent-dark);
  box-shadow: none;
}

.message-tab-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.classroom-message-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.15fr);
  gap: 14px;
  align-items: start;
}

.message-generator-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.message-details-card,
.message-output-card {
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
}

.teacher-faq-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.55fr);
  gap: 14px;
  align-items: start;
}

.teacher-faq-search-panel,
.teacher-faq-admin-panel {
  min-width: 0;
}

.teacher-faq-search-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.teacher-faq-search-card input,
.teacher-faq-form input,
.teacher-faq-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.teacher-faq-form {
  display: grid;
  gap: 12px;
}

.teacher-faq-form textarea {
  min-height: 140px;
  resize: vertical;
}

.teacher-faq-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.teacher-faq-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.teacher-faq-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: start;
  justify-content: space-between;
}

.teacher-faq-card h3 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1rem;
}

.teacher-faq-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
  white-space: pre-wrap;
}

.teacher-faq-actions,
.teacher-faq-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-feedback-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
}

.app-feedback-form {
  display: grid;
  gap: 12px;
}

.app-feedback-form label {
  display: grid;
  gap: 6px;
}

.app-feedback-form input,
.app-feedback-form select,
.app-feedback-form textarea {
  width: 100%;
}

.app-feedback-form textarea {
  min-height: 150px;
}

.app-feedback-list {
  display: grid;
  gap: 12px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.app-feedback-card h3 {
  font-size: 1rem;
}

.coach-notes-panel {
  display: none;
}

.danger-text {
  color: #991b1b;
}

.message-section-title {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1.15rem;
}

.message-form-section {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #fbfdfc;
}

.message-form-section-title {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.teacher-permissions-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #fbfdfc;
}

.teacher-permissions-panel h4 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.95rem;
}

.email-alerts-panel {
  border-color: #cfe6ff;
  background: #f8fbff;
}

.text-alerts-panel {
  border-color: #f7d6a6;
  background: #fff8ec;
}

.teacher-permission-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.teacher-permission-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #ffffff;
  font-weight: 800;
}

.teacher-directory-permissions {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.message-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.message-generator label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.optional-note {
  min-height: 78px;
}

#output {
  min-height: 430px;
  border-color: #d8e7e2;
  background: #ffffff;
  line-height: 1.5;
}

.message-preview-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef7f4;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.message-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.message-tutorial-card,
.settings-locked,
.settings-unlocked {
  width: min(850px, 100%);
  margin: 0 auto;
}

.message-tutorial-content {
  display: grid;
  gap: 10px;
  line-height: 1.45;
}

.message-tutorial-content h4 {
  margin: 0 0 4px;
  color: var(--accent-dark);
}

.teacher-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 8px;
}

#teachersView {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: none;
}

#teachersView.hidden {
  display: none;
}

.teacher-directory-panel,
.tab-visibility-panel {
  width: 100%;
  max-width: none;
}

.teacher-directory-head,
.teacher-editor-head,
.teacher-section-head,
.teacher-directory-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.teacher-directory-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.app-backup-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 14px 0 18px;
  padding: 12px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #f8fcfb;
}

.app-backup-tools strong {
  color: var(--accent-dark);
}

.app-backup-tools p {
  margin: 2px 0 0;
}

.app-backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.file-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.teacher-directory-sidebar,
.teacher-editor,
.teacher-editor-section {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #ffffff;
}

.teacher-directory-sidebar {
  position: static;
  max-height: none;
  overflow: visible;
}

.teacher-editor-head h3,
.teacher-editor-section h4 {
  margin: 0;
  color: var(--accent-dark);
}

.teacher-preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.teacher-directory-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.teacher-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #fbfdfc;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.teacher-item:hover,
.teacher-item:focus-visible {
  border-color: var(--brand-teal);
  background: #f4fbf8;
  outline: none;
}

.teacher-item.is-selected {
  border-color: var(--brand-orange);
  background: #fff9ed;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.14);
}

.teacher-directory-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.teacher-directory-name strong {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.teacher-directory-name span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.teacher-directory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.teacher-directory-actions .ghost {
  min-height: 32px;
  padding: 0 10px;
}

@media (max-width: 1200px) {
  .teacher-directory-workspace {
    grid-template-columns: 1fr;
  }

  .teacher-directory-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 900px) {
  .teacher-directory-workspace {
    grid-template-columns: 1fr;
  }

  .teacher-directory-sidebar {
    position: static;
    max-height: none;
  }

  .teacher-directory-head,
  .teacher-editor-head,
  .teacher-section-head,
  .app-backup-tools {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-backup-tools {
    grid-template-columns: 1fr;
  }

  .app-backup-actions {
    justify-content: flex-start;
  }

  .teacher-directory-form {
    grid-template-columns: 1fr;
  }

  .teacher-faq-layout {
    grid-template-columns: 1fr;
  }
}

.next-month-notes-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.next-month-notes-panel label {
  display: grid;
  gap: 8px;
}

.next-month-notes-panel span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.next-month-notes-panel textarea {
  min-height: min(520px, 55vh);
  line-height: 1.45;
}

.notes-log-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.notes-log-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 0.4fr) minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.notes-log-toolbar label {
  display: grid;
  gap: 8px;
}

.notes-log-toolbar span,
.notes-log-meta {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.notes-log-list {
  display: grid;
  gap: 10px;
}

.notes-log-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #fbfdfc;
}

.notes-log-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.notes-log-card-head strong {
  color: var(--ink);
  font-weight: 900;
}

.notes-log-card-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.notes-log-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.next-month-class-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.next-month-class-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #fbfdfc;
}

.next-month-class-card h3 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1rem;
}

.next-month-class-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.next-month-class-card li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #ffffff;
  line-height: 1.35;
}

.next-month-submission {
  display: grid;
  gap: 4px;
}

.next-month-submission small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.25;
}

.next-month-submission span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: pre-wrap;
}

.next-month-added-button {
  padding: 5px 9px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.next-month-notes-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.next-month-notes-actions span {
  color: var(--accent-dark);
}

.ready-game-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-dark);
  font-weight: 900;
}

.ready-game-toggle input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--accent);
}

.ready-game-layout {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.ready-game-card,
.ready-game-coach-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ready-game-card h3 {
  margin: 0;
  color: var(--accent-dark);
}

.ready-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.ready-game-grid label {
  display: grid;
  gap: 6px;
}

.ready-game-grid span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.ready-game-actions,
.ready-game-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ready-game-actions span {
  color: var(--accent-dark);
  font-weight: 800;
}

.ready-game-table-wrap {
  overflow-x: auto;
}

.ready-game-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}

.ready-game-table th,
.ready-game-table td {
  padding: 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.ready-game-table th {
  color: var(--accent-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.ready-game-table td strong {
  display: block;
  margin-bottom: 5px;
}

.ready-game-class-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.ready-game-class-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--accent-dark);
  font-weight: 900;
}

.ready-game-class-option input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.ready-game-edit,
.ready-game-delete {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.76rem;
}

.ready-game-edit {
  margin-right: 5px;
}

.ready-game-coach-panel {
  border-color: var(--plan-theme-line);
  border-left: 7px solid var(--plan-theme-accent);
  background: linear-gradient(135deg, var(--plan-accent-soft), #ffffff 62%);
}

.ready-game-coach-panel.is-collapsed .ready-game-coach-body {
  display: none;
}

.ready-game-coach-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 24px;
}

.ready-game-timer {
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr) repeat(4, auto);
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--plan-theme-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.ready-game-timer > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.ready-game-timer-display {
  color: var(--accent-dark);
  font-size: 1.7rem;
  line-height: 1;
}

.ready-game-coach-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(110px, 0.45fr) minmax(130px, 0.6fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--plan-theme-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.ready-game-coach-form label {
  display: grid;
  gap: 6px;
}

.ready-game-coach-form label span,
.ready-game-coach-form > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.ready-game-coach-meta {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 900;
}

.ready-game-coach-list li {
  padding: 8px;
  border: 1px solid var(--plan-theme-line);
  border-radius: 8px;
  background: #ffffff;
}

.ready-game-coach-list strong,
.ready-game-coach-list span {
  display: block;
}

.ready-game-coach-list span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

#backupStatus.is-success {
  color: var(--accent-dark);
  font-weight: 900;
}

#backupStatus.is-warning {
  color: var(--warm);
  font-weight: 900;
}

.refund-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: 12px;
}

.refund-form,
.refund-list-panel,
.message-form,
.message-list-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.refund-form label,
.message-form label {
  display: grid;
  gap: 7px;
}

.refund-form span,
.message-form span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.refund-notes-field,
.message-body-field {
  min-height: 132px;
}

.refund-actions,
.refund-list-head,
.refund-request-head,
.message-actions,
.message-list-head,
.message-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.refund-actions,
.message-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.refund-list-head strong,
.message-list-head strong {
  color: var(--accent-dark);
  font-size: 0.9rem;
}

.refund-list,
.message-list {
  display: grid;
  gap: 10px;
}

.refund-request-card,
.message-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #fbfdfc;
}

.refund-request-head strong,
.message-card-head strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.refund-request-details,
.message-details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.refund-request-details span,
.message-details span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #cfe4dc;
  border-radius: 999px;
  background: #eef7f4;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.refund-request-notes,
.refund-request-meta,
.message-body,
.message-meta {
  margin: 0;
  line-height: 1.4;
}

.refund-request-notes,
.message-body {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.refund-request-meta,
.message-meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.teacher-directory-rate {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.staff-chat-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.38fr) minmax(420px, 1fr);
  min-height: 680px;
  overflow: hidden;
  border: 1px solid #d8e9f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(23, 33, 43, 0.08);
}

.staff-chat-sidebar,
.staff-chat-conversation {
  display: grid;
  background: #ffffff;
}

.staff-chat-sidebar {
  gap: 12px;
  align-content: start;
  padding: 14px;
  border-right: 1px solid #e1edf3;
  background: #f6fbfd;
}

.staff-chat-conversation {
  grid-template-rows: auto minmax(360px, 1fr) auto;
  min-width: 0;
}

.staff-chat-compose {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-top: 1px solid #e1edf3;
  background: #ffffff;
}

.staff-chat-sidebar label,
.staff-chat-compose label {
  display: grid;
  gap: 7px;
}

.staff-chat-sidebar span,
.staff-chat-compose span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.staff-chat-conversation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 14px 16px;
  border-bottom: 1px solid #e1edf3;
  background: #ffffff;
}

.staff-chat-conversation-head p,
.staff-chat-conversation-head h3 {
  margin: 0;
}

.staff-chat-conversation-head p,
.staff-chat-conversation-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
}

.staff-chat-conversation-head h3 {
  color: var(--ink);
  font-size: 1.18rem;
}

.staff-chat-message-field textarea {
  min-height: 44px;
  max-height: 110px;
  border-radius: 8px;
  background: #f8fcfe;
}

.staff-chat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 420px;
  max-height: 620px;
  overflow-y: auto;
  padding: 18px;
  background: linear-gradient(180deg, #f7fbfd 0%, #eef7fb 100%);
}

.staff-chat-thread-list {
  display: grid;
  gap: 6px;
}

.staff-chat-thread {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.staff-chat-thread.has-unread {
  border-color: var(--brand-orange);
  background: #fffaf2;
}

.staff-chat-thread.is-active {
  border-color: #bfe4f1;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(23, 33, 43, 0.06);
}

.staff-chat-thread-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.staff-chat-thread-text strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-chat-thread-text span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-chat-thread small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.staff-chat-unread {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand-orange);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 1000;
}

.staff-chat-unread[hidden] {
  display: none;
}

.staff-chat-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--brand-orange);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 1000;
  flex: 0 0 auto;
}

.staff-chat-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: min(88%, 680px);
  color: var(--ink);
}

.staff-chat-card.is-mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.staff-chat-card.is-mine .staff-chat-avatar {
  background: var(--brand-green);
}

.staff-chat-card.is-sub-request .staff-chat-bubble {
  border-color: #f4c47d;
  background: #fffaf2;
}

.staff-chat-bubble {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d9eaf2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(23, 33, 43, 0.06);
}

.staff-chat-card.is-mine .staff-chat-bubble {
  border-color: #bfe4f1;
  background: #eaf8fd;
}

.staff-chat-card-head,
.staff-chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.staff-chat-actions {
  justify-content: flex-start;
}

.staff-chat-card.is-mine .staff-chat-actions {
  justify-content: flex-end;
}

.staff-chat-card-head span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.staff-chat-card p {
  margin: 0;
  line-height: 1.45;
}

.staff-chat-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: auto;
  color: var(--muted);
  text-align: center;
}

.staff-chat-empty .staff-chat-avatar {
  width: 52px;
  height: 52px;
}

.staff-chat-empty strong {
  color: var(--ink);
}

.staff-chat-empty p {
  margin: 0;
}

.staff-chat-sub-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 950;
}

.staff-chat-sub-status.is-open {
  background: #fff3df;
  color: #8b3c00;
}

.staff-chat-sub-status.is-filled {
  background: #e9f7e5;
  color: var(--brand-green-dark);
}

.staff-chat-accept-sub {
  min-height: 34px;
  padding-inline: 12px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  text-decoration: none;
}

.floating-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
}

.auth-locked .floating-chat {
  display: none;
}

.floating-notes {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 200;
  display: grid;
  justify-items: start;
  gap: 10px;
  pointer-events: none;
}

.auth-locked .floating-notes {
  display: none;
}

.floating-chat-button,
.floating-chat-panel,
.floating-notes-button,
.floating-notes-panel {
  pointer-events: auto;
}

.floating-chat-button,
.floating-notes-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 74px;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: 999px;
  border-color: var(--brand-orange);
  background: var(--brand-orange);
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(23, 33, 43, 0.22);
  font-weight: 1000;
}

.floating-notes-button {
  border-color: #0f766e;
  background: #0f766e;
}

.floating-chat-button:hover,
.floating-chat-button:focus-visible,
.floating-notes-button:hover,
.floating-notes-button:focus-visible {
  background: #e77e1c;
  transform: translateY(-2px);
}

.floating-notes-button:hover,
.floating-notes-button:focus-visible {
  background: #0b5f58;
}

.floating-chat-button.has-unread {
  animation: chatPulse 1.8s ease-in-out infinite;
}

@keyframes chatPulse {
  0%,
  100% {
    box-shadow: 0 16px 30px rgba(23, 33, 43, 0.22);
  }

  50% {
    box-shadow: 0 16px 34px rgba(244, 145, 66, 0.42);
  }
}

.floating-chat-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-orange);
  font-size: 0.76rem;
}

.floating-chat-button strong[hidden] {
  display: none;
}

.floating-chat-panel {
  width: min(390px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid #d8e9f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 48px rgba(23, 33, 43, 0.22);
}

.floating-notes-panel {
  width: min(430px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid #cfe5df;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 48px rgba(23, 33, 43, 0.22);
}

.floating-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e1edf3;
  background: #f6fbfd;
}

.floating-chat-head p,
.floating-chat-head h3 {
  margin: 0;
}

.floating-chat-head p,
.floating-chat-recipient span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
}

.floating-chat-head h3 {
  color: var(--ink);
  font-size: 1rem;
}

.icon-button {
  min-width: 34px;
  min-height: 34px;
  padding: 5px;
}

.floating-chat-recipient {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf4f7;
}

.floating-notes-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf4f7;
}

.floating-notes-context span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e8f6f2;
  color: #0f5f58;
  font-size: 0.78rem;
  font-weight: 950;
}

.floating-notes-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf4f7;
  background: #fbfefd;
}

.floating-notes-editor label {
  display: grid;
  gap: 4px;
}

.floating-notes-editor span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 950;
}

.floating-notes-editor input,
.floating-notes-editor select {
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.86rem;
}

.floating-notes-editor button {
  grid-column: 1 / -1;
  min-height: 34px;
  padding: 6px 10px;
}

.floating-notes-panel textarea {
  width: calc(100% - 24px);
  min-height: 180px;
  margin: 12px;
  border-radius: 8px;
  background: #f8fcfe;
  resize: vertical;
}

.floating-notes-panel .hint {
  margin: 0;
  padding: 0 12px 12px;
}

.floating-chat-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: min(420px, 52vh);
  overflow-y: auto;
  padding: 12px;
  background: linear-gradient(180deg, #f7fbfd 0%, #eef7fb 100%);
}

.floating-chat-message {
  display: grid;
  justify-items: start;
  gap: 5px;
  width: min(88%, 310px);
  padding: 9px 10px;
  border: 1px solid #d9eaf2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 7px 16px rgba(23, 33, 43, 0.06);
}

.floating-chat-message.is-mine {
  align-self: flex-end;
  justify-items: end;
  border-color: #bfe4f1;
  background: #eaf8fd;
}

.floating-chat-message.is-sub-request {
  border-color: #f4c47d;
  background: #fffaf2;
}

.floating-chat-message-meta,
.floating-chat-actions,
.floating-chat-compose {
  display: flex;
  align-items: center;
  gap: 7px;
}

.floating-chat-message-meta {
  justify-content: space-between;
  width: 100%;
}

.floating-chat-message-meta strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.floating-chat-message-meta span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.floating-chat-message p,
.floating-chat-empty {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
}

.floating-chat-actions {
  flex-wrap: wrap;
}

.floating-chat-empty {
  margin: auto;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.floating-chat-compose {
  align-items: end;
  padding: 10px;
  border-top: 1px solid #e1edf3;
  background: #ffffff;
}

.floating-chat-compose textarea {
  min-height: 42px;
  max-height: 100px;
  border-radius: 8px;
  background: #f8fcfe;
}

.floating-chat-compose button {
  min-height: 42px;
}

.tab-visibility-panel {
  margin-top: 14px;
}

.tab-visibility-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.tab-visibility-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 900;
}

.tab-visibility-option input {
  width: 18px;
  height: 18px;
}

.time-sheet-layout {
  display: block;
}

.time-sheet-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
  border: 1px solid #d9eaf2;
  border-radius: 8px;
  background: #ffffff;
}

.time-sheet-status {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.time-sheet-toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(150px, 0.7fr) minmax(210px, auto) auto auto auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #bfe4f1;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef9fd, #ffffff);
}

.time-sheet-toolbar label {
  display: grid;
  gap: 6px;
}

.time-sheet-toolbar label span,
.time-sheet-total-pill span,
.time-sheet-rate-pill span,
.time-sheet-count-pill span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.time-sheet-total-pill,
.time-sheet-rate-pill,
.time-sheet-count-pill {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #cfe9f4;
  border-radius: 8px;
  background: #ffffff;
}

.time-sheet-total-pill strong,
.time-sheet-rate-pill strong,
.time-sheet-count-pill strong {
  color: var(--accent-dark);
  font-size: 0.95rem;
}

.time-sheet-total-pill strong {
  color: var(--brand-orange);
}

.time-sheet-week-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: end;
}

.time-sheet-week-nav button {
  min-height: 38px;
  padding: 7px 9px;
  font-size: 0.84rem;
}

.time-sheet-clock-bar {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) auto minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #d9eaf2;
  border-radius: 8px;
  background: #ffffff;
}

.time-sheet-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.time-clock-how-to-panel {
  display: grid;
  gap: 14px;
  margin: 12px 0;
  padding: 16px;
  border: 1px solid #d9eaf2;
  border-left: 6px solid var(--brand-orange);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: var(--shadow-soft);
}

.time-clock-how-to-panel[hidden] {
  display: none;
}

.time-clock-how-to-panel h3 {
  margin: 2px 0 0;
}

.time-clock-how-to-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.time-clock-how-to-grid article {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #ead69b;
  border-radius: 8px;
  background: #ffffff;
}

.time-clock-how-to-grid strong {
  color: var(--accent-dark);
  font-size: 0.95rem;
}

.time-clock-how-to-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.45;
}

.time-sheet-clock-bar h3 {
  margin: 0 0 4px;
}

.time-sheet-clock-bar #officeClockStatus {
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 950;
}

.time-sheet-main-card {
  grid-row: auto;
}

.time-sheet-side-card {
  min-height: auto;
}

.time-off-request-card {
  border-color: #f4cf98;
  background: #fffaf3;
}

.time-off-under-clock {
  margin: -2px 0 12px;
  box-shadow: none;
}

.missed-clock-card {
  margin: -2px 0 12px;
  border-color: #d9eaf2;
  background: #f8fcff;
  box-shadow: none;
}

.sub-requests-under-time-off {
  margin: 0 0 14px;
  box-shadow: none;
}

.time-sheet-summary-card {
  grid-column: auto;
}

.time-sheet-page-button {
  border-color: var(--brand-orange);
  background: #fff6ec;
  color: var(--accent-dark);
  box-shadow: 0 3px 0 rgba(244, 145, 66, 0.16);
}

.time-sheet-details-page {
  display: grid;
  gap: 12px;
}

.time-sheet-details-page.hidden {
  display: none;
}

.time-sheet-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #e3edf2;
  border-radius: 8px;
  background: #f8fafc;
}

.time-sheet-detail-head h3 {
  margin: 0;
}

.time-sheet-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.time-sheet-details-page .time-sheet-card {
  border-color: #e5edf2;
  box-shadow: none;
}

.payroll-table-shell {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5edf2;
  border-radius: 8px;
  background: #ffffff;
}

.payroll-week-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  color: #0f2433;
  font-size: 0.9rem;
}

.payroll-week-table th,
.payroll-week-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf2f5;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.payroll-week-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f7f9;
  color: #102d40;
  font-size: 0.82rem;
  font-weight: 900;
}

.payroll-week-table tbody th {
  width: 130px;
  background: #fbfcfd;
  color: #8a96a3;
  font-weight: 950;
}

.payroll-week-table tbody tr:hover td,
.payroll-week-table tbody tr:hover th {
  background: #f8fcff;
}

.payroll-empty-row td {
  color: #9aa6b2;
  text-align: center;
}

.payroll-job-pill {
  display: inline-flex;
  align-items: center;
  max-width: 150px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  background: #cfe0f3;
  color: #ffffff;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payroll-edit-input {
  width: 100%;
  min-width: 92px;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid #d7e4ec;
  border-radius: 8px;
  background: #ffffff;
  color: #102d40;
  font: inherit;
  font-weight: 800;
}

.payroll-job-edit {
  min-width: 150px;
}

.payroll-date-edit {
  min-width: 132px;
}

.payroll-time-edit {
  min-width: 108px;
}

.payroll-rate-edit {
  min-width: 90px;
}

.payroll-notes-edit {
  min-width: 180px;
  font-weight: 700;
}

.payroll-row-actions {
  display: flex;
  gap: 6px;
}

.payroll-job-pill.is-office {
  background: #b7accd;
}

.payroll-strong-cell {
  color: #001e38;
  font-weight: 950;
}

.payroll-bonus-cell {
  color: #047857;
  font-weight: 950;
}

.payroll-approval-panel {
  background: #fbfdfe;
}

.payroll-approval-list {
  display: grid;
  gap: 8px;
}

.payroll-approval-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe7ee;
  border-left: 6px solid var(--brand-orange);
  border-radius: 8px;
  background: #ffffff;
}

.payroll-approval-card.is-approved {
  border-left-color: var(--brand-green);
  background: #f5fbf2;
}

.payroll-approval-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.payroll-approval-state {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.payroll-approval-state span {
  color: var(--accent-dark);
  font-weight: 950;
}

.payroll-approval-state small {
  color: var(--muted);
  font-weight: 800;
  text-align: right;
}

.time-sheet-head,
.time-clock-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.time-sheet-head h3 {
  margin: 0;
  font-size: 1rem;
}

.time-sheet-head span,
.time-sheet-head strong {
  color: var(--accent-dark);
  font-weight: 1000;
}

.time-sheet-filters,
.manual-time-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.manual-time-form label,
.time-sheet-filters label,
.time-clock-notes {
  display: grid;
  gap: 7px;
}

.manual-time-form span,
.time-sheet-filters span,
.time-clock-notes span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.scheduled-class-list,
.time-entry-list {
  display: grid;
  gap: 8px;
}

.scheduled-class-list {
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 6px;
}

.scheduled-bulk-toolbar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: min(100%, 720px);
  padding: 10px;
  border: 1px solid #c4deeb;
  border-radius: 8px;
  background: #f8fcfe;
}

.scheduled-bulk-toolbar span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 950;
}

.time-sheet-day {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 180px;
  min-height: 430px;
  padding: 12px;
  border: 1px solid #c4deeb;
  border-radius: 8px;
  background: #f4fafc;
}

.time-sheet-day.has-approved-time-off {
  border-color: #ef7777;
  background: #fff1f1;
  box-shadow: inset 0 0 0 2px rgba(239, 68, 68, 0.12);
}

.time-sheet-day.has-approved-time-off .time-sheet-day-head {
  border-bottom-color: #f2b5b5;
}

.time-sheet-day.has-approved-time-off .time-sheet-day-head strong,
.time-sheet-day.has-approved-time-off .time-sheet-day-head span {
  color: #8f1d1d;
}

.time-off-day-notice {
  margin: 0;
  padding: 8px 9px;
  border: 1px solid #f2a2a2;
  border-radius: 8px;
  background: #ffe4e4;
  color: #8f1d1d;
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.3;
}

.time-sheet-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 7px;
  border-bottom: 1px solid #e4eef3;
}

.time-sheet-day-head strong {
  color: var(--ink);
}

.time-sheet-day-head span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.day-select-button {
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  font-size: 0.76rem;
}

.scheduled-class-card {
  display: grid;
  gap: 7px;
}

.scheduled-class-select {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #d8e7ed;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
}

.scheduled-class-select input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

.scheduled-class-select:has(input:disabled) {
  opacity: 0.55;
}

.scheduled-class-button {
  position: relative;
  display: grid;
  gap: 6px;
  justify-content: flex-start;
  width: 100%;
  min-height: 108px;
  padding: 13px 12px 13px 16px;
  border: 2px solid #6fb9d2;
  border-left: 6px solid var(--brand-orange);
  background: #ffffff;
  color: var(--accent-dark);
  text-align: left;
  box-shadow: 0 3px 0 rgba(17, 70, 90, 0.1);
}

.scheduled-class-button::after {
  content: "";
  position: absolute;
  inset: 7px 7px auto auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--brand-green);
}

.scheduled-class-button strong {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.2;
}

.scheduled-class-time,
.scheduled-class-action {
  color: #365a68;
  font-size: 0.8rem;
  font-weight: 900;
}

.scheduled-class-action {
  color: var(--brand-green-dark);
  text-transform: uppercase;
}

.scheduled-class-button:hover,
.scheduled-class-button:focus-visible {
  border-color: var(--brand-green-dark);
  border-left-color: var(--brand-green);
  background: #f2fbec;
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 rgba(62, 137, 49, 0.16);
}

.scheduled-class-button:disabled {
  cursor: default;
  opacity: 0.76;
  border-color: #d5e2e8;
  border-left-color: var(--brand-green);
  background: #eef7f0;
  box-shadow: none;
  transform: none;
}

.scheduled-class-button:disabled .scheduled-class-action {
  color: #486b50;
}

.scheduled-sub-button {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d8e7ed;
  background: #fff8ef;
  color: #8b3c00;
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 950;
}

.scheduled-sub-button:hover,
.scheduled-sub-button:focus-visible {
  border-color: var(--brand-orange);
  background: #fff0dc;
  color: #612800;
  transform: translateY(-1px);
}

.scheduled-sub-button:disabled {
  cursor: default;
  border-color: #dce7dc;
  background: #eef7f0;
  color: var(--brand-green-dark);
  transform: none;
}

.time-sheet-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 950;
}

.time-sheet-card summary span {
  color: var(--accent-dark);
  font-size: 0.86rem;
}

.compact-time-form {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  padding-top: 4px;
}

.compact-time-form .time-clock-notes,
.compact-time-form button {
  grid-column: 1 / -1;
}

.compact-checkbox-line {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #d9eaf2;
  border-radius: 8px;
  background: #ffffff;
}

.compact-checkbox-line input {
  width: auto;
  margin: 0;
}

.compact-notes textarea {
  min-height: 74px;
}

.compact-entry-list {
  max-height: 260px;
  overflow: auto;
}

.time-entry-card {
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid #d9eaf2;
  border-radius: 8px;
  background: #fbfdfe;
}

.time-entry-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.time-entry-card .danger-button {
  justify-self: start;
}

.time-off-actions {
  justify-content: flex-start;
}

.time-off-policy-note,
.sub-workflow-note {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid #cfe7f1;
  border-radius: 8px;
  background: #f4fbfd;
  color: #27465a;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.45;
}

.sub-workflow-note {
  display: grid;
  gap: 8px;
}

.sub-workflow-note p {
  margin: 0;
}

.sub-workflow-note.needs-cancel {
  border-color: #f1b9b9;
  background: #fff5f5;
  color: #8f1d1d;
}

.sub-workflow-note.has-sub {
  border-color: #b8e0cf;
  background: #f2fbf7;
  color: #0f6848;
}

.sub-accept-button {
  justify-self: start;
  min-height: 36px;
  padding-inline: 14px;
}

.sub-admin-accept-select {
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #c8dde8;
  border-radius: 8px;
  background: #ffffff;
  color: #102d40;
  font-weight: 850;
}

.learner-message-builder {
  display: grid;
  gap: 12px;
}

.learner-message-controls {
  grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
  align-items: end;
}

.learner-message-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 12px;
}

.learner-message-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.learner-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.learner-message-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.learner-message-card textarea {
  min-height: 190px;
  background: #fbfdfc;
  line-height: 1.45;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.tutorial-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.tutorial-card h3 {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 1rem;
}

.tutorial-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.tutorial-steps {
  display: grid;
  gap: 14px;
}

.tutorial-section ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 24px;
}

.tutorial-section li {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.4;
}

.tutorial-section li::marker {
  color: var(--accent-dark);
  font-weight: 900;
}

.tutorial-section li > span {
  display: block;
  margin-bottom: 8px;
}

.tutorial-screenshot {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid #cfe0dc;
  border-radius: 8px;
  background: #f6faf8;
  box-shadow: inset 0 0 0 1px #ffffff;
}

.mini-shot {
  max-width: 620px;
  margin: 0;
  padding: 10px;
}

.mock-browser-bar {
  display: flex;
  gap: 5px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dce8e3;
}

.mock-browser-bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #b7c8c1;
}

.mock-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mock-tabs span,
.mock-tabs strong {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #d9e7e2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.76rem;
}

.mock-tabs strong {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.mock-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.single-control {
  grid-template-columns: minmax(160px, 260px);
}

.mock-controls label,
.mock-controls button {
  display: grid;
  gap: 4px;
  min-height: 48px;
  align-content: center;
  padding: 8px;
  border: 1px solid #d9e7e2;
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.mock-controls span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.mock-controls strong,
.mock-controls button {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.mock-controls button {
  border-color: #0f766e;
  background: #effaf7;
  color: #075e54;
}

.mock-outline,
.mock-grid {
  display: grid;
  gap: 6px;
}

.mock-outline div {
  display: grid;
  grid-template-columns: minmax(115px, 0.8fr) minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid #d9e7e2;
  border-radius: 8px;
  background: #ffffff;
}

.mock-outline .mock-highlighted {
  border-color: #0f766e;
  background: #eef7f4;
  box-shadow: inset 3px 0 0 #0f766e;
}

.mock-outline strong,
.mock-outline span,
.mock-grid div {
  font-size: 0.76rem;
  font-weight: 850;
}

.mock-outline strong {
  color: var(--accent-dark);
}

.mock-grid {
  grid-template-columns: minmax(88px, 0.7fr) minmax(110px, 1fr) minmax(130px, 1fr);
}

.mock-grid div {
  min-height: 34px;
  padding: 8px;
  border: 1px solid #d9e7e2;
  border-radius: 8px;
  background: #ffffff;
}

.mock-grid div:nth-child(-n + 3) {
  background: #effaf7;
  color: var(--accent-dark);
  text-align: center;
}

.mock-skill-row,
.mock-games-row,
.mock-note {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid #d9e7e2;
  border-radius: 8px;
  background: #ffffff;
}

.mock-skill-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.mock-skill-row strong,
.mock-games-row label,
.mock-games-row strong,
.mock-games-row span,
.mock-note strong,
.mock-note span {
  font-size: 0.78rem;
  font-weight: 850;
}

.mock-skill-row button {
  min-height: 30px;
  border: 1px solid #b9ddd6;
  border-radius: 999px;
  background: #effaf7;
  color: #075e54;
  font-size: 0.74rem;
  font-weight: 900;
}

.mock-games-row {
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.6fr);
}

.mock-games-row label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mock-games-row div,
.mock-note {
  background: #fbfdfc;
}

.mock-games-row div {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #d9e7e2;
  border-radius: 8px;
}

.mock-note span {
  color: var(--muted);
}

.mock-note button {
  justify-self: start;
  min-height: 30px;
  border-radius: 999px;
  font-size: 0.74rem;
}

.skill-note-label {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.section-note-label {
  display: grid;
  gap: 6px;
  margin: 0 12px 10px;
  padding: 10px;
  border: 1px solid #ead69b;
  border-radius: 8px;
  background: #fffaf0;
}

.section-note-label span {
  color: #7c5a13;
  font-size: 0.8rem;
  font-weight: 900;
}

.individual-note-label {
  margin-top: 10px;
}

.skill-note-input {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  resize: vertical;
  border-color: #dfc67d;
  background: #fffdf8;
  font-size: 0.82rem;
}

.skill-note-label[hidden],
.section-note-label[hidden] {
  display: none;
}

.plan-locked .skill-note-label,
.plan-locked .section-note-label {
  display: none;
}

.skill-note,
.section-note {
  min-height: 52px;
  border-color: #dfc67d;
  background: #fffdf8;
  font-size: 0.82rem;
  line-height: 1.25;
  padding: 8px;
}

.skill-note:disabled,
.section-note:disabled,
.plan-notes-input:disabled {
  background: #f6f1e6;
  color: #806d49;
  opacity: 0.72;
}

.skill-note-display,
.section-note-display {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #dfc67d;
  border-radius: 6px;
  background: #fffaf0;
  color: #5f4610;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.section-note-display {
  margin: 0 12px 10px;
}

.skill-note-display::before,
.section-note-display::before {
  content: "Notes";
  display: block;
  margin-bottom: 4px;
  color: #7c5a13;
  font-size: 0.76rem;
  font-weight: 900;
}

.skill-note-display[hidden],
.section-note-display[hidden] {
  display: none;
}

.planner-outline-row.is-collapsed .section-note-label,
.planner-outline-row.is-collapsed .section-note-display {
  display: none;
}

.game-check {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

.time-label,
.duration-label {
  display: grid;
  gap: 6px;
}

.time-label span,
.duration-label span,
.time-end span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.time-cell {
  display: grid;
  gap: 8px;
}

.time-range {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.25;
}

.duration-label input {
  min-height: 36px;
}

.time-end {
  display: grid;
  gap: 4px;
}

.time-end strong {
  font-size: 1rem;
}

.grid-end-spacer {
  grid-column: span 6;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

label {
  min-width: 0;
}

select,
input {
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
  text-overflow: clip;
}

textarea {
  width: 100%;
  max-width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px;
  font: inherit;
  outline: none;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 0 14px;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.12);
}

button:hover {
  background: var(--accent-dark);
}

.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.ghost:hover {
  background: #f6f8f6;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.plan-locked .lesson-grid {
  border-radius: 8px;
  outline: 2px solid rgba(15, 118, 110, 0.26);
  outline-offset: 4px;
}

.search-row {
  margin-top: 20px;
}

.search-row label {
  display: grid;
  gap: 8px;
}

.search-row span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.games-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #cde5df;
  border-radius: 8px;
  background: #fbfdfc;
  box-shadow: var(--shadow-soft);
}

.games-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.games-panel ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 18px;
}

.games-panel li {
  overflow-wrap: anywhere;
}

.empty {
  margin: 14px 0 0;
  color: var(--muted);
}

.result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result strong {
  display: block;
  overflow-wrap: anywhere;
}

.result span {
  color: var(--muted);
  font-size: 0.84rem;
}

.status {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--accent-dark);
  font-weight: 800;
}

.plan-video-summary {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #cde5df;
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--accent-dark);
  font-weight: 900;
}

.plan-video-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.plan-video-controls label {
  display: grid;
  gap: 8px;
}

.plan-video-controls span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.plan-video-editor {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.plan-video-head,
.plan-video-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(105px, 0.3fr) minmax(240px, 1.1fr) minmax(220px, 0.9fr) auto;
  gap: 10px;
  align-items: center;
}

.plan-video-head {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.plan-video-row {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.plan-video-row:nth-child(odd) {
  background: #f3faf7;
}

.plan-video-row:nth-child(even) {
  background: #ffffff;
}

.plan-video-skill {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.plan-video-skill strong,
.plan-video-skill span {
  overflow-wrap: anywhere;
}

.plan-video-skill span {
  color: var(--muted);
  font-size: 0.82rem;
}

.video-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.has-video {
  background: #edf8f1;
  color: #166534;
}

.missing-video {
  background: #fff6e6;
  color: #92400e;
}

.plan-video-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.plan-video-upload input[type="file"] {
  min-width: 0;
  font-size: 0.78rem;
}

.compact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 6px;
  padding: 0 12px;
  font-weight: 900;
  text-decoration: none;
}

.outline-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.outline-header,
.outline-row {
  border: 1px solid var(--plan-theme-line);
  border-left: 7px solid var(--plan-theme);
  border-radius: 8px;
  background: #ffffff;
}

.outline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-color: var(--plan-theme-line);
  background: linear-gradient(135deg, var(--plan-theme-soft), #ffffff 62%);
  box-shadow: var(--shadow-soft);
}

.outline-header::after {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--plan-theme) 0 50%, var(--plan-theme-accent) 50% 100%);
  box-shadow: 0 0 0 1px var(--plan-theme-line);
  content: "";
}

.outline-header h2 {
  font-size: 1.35rem;
}

.outline-individual-meta {
  margin: 7px 0 0;
  color: #34516f;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.3;
}

.outline-individual-counter {
  display: grid;
  grid-template-columns: minmax(160px, 0.55fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid #c7d8ea;
  border-radius: 8px;
  background: #f8fbff;
}

.outline-individual-counter h3 {
  margin: 0;
  font-size: 1rem;
}

.outline-individual-counter-controls {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(100px, 0.55fr) 56px repeat(2, auto) minmax(160px, 1fr);
  gap: 8px;
  align-items: end;
}

.outline-individual-counter label {
  display: grid;
  gap: 5px;
}

.outline-individual-counter label span,
.outline-individual-counter-average,
.outline-individual-counter-status {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.outline-individual-counter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px;
  border: 1px solid #c7d8ea;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 1.2rem;
}

.outline-individual-skill-buttons {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.outline-individual-skill-count-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  border-color: #c7d8ea;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.outline-individual-skill-count-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outline-individual-skill-count-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  border-radius: 999px;
  background: #edf9df;
  color: var(--brand-green-dark);
}

.outline-header > strong,
.outline-header-actions > strong {
  color: var(--plan-theme);
  white-space: nowrap;
}

.outline-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.outline-plan-note,
.outline-note {
  border: 1px solid #ead69b;
  border-radius: 6px;
  background: #fffaf0;
  color: #5f4610;
  line-height: 1.35;
}

.outline-plan-note {
  padding: 12px;
  font-weight: 800;
}

.class-reminder {
  padding: 14px;
  border: 1px solid #cde5df;
  border-radius: 8px;
  background: #f7fbfa;
  box-shadow: var(--shadow-soft);
}

.class-reminder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 38px;
  margin-bottom: 10px;
  background: transparent;
  color: var(--accent-dark);
  font-size: 1rem;
  font-weight: 1000;
  text-align: left;
}

.class-reminder-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #0f766e;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.class-reminder-head span:hover,
.class-reminder-head span:focus {
  background: #0b5e58;
  outline: none;
}

.class-reminder.is-collapsed ol {
  display: none;
}

.class-reminder ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 18px;
  margin: 0;
  padding-left: 22px;
}

.class-reminder li {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.outline-row {
  overflow: hidden;
  box-shadow: 0 5px 16px rgba(24, 32, 29, 0.04);
}

.outline-row.is-highlighted {
  border-color: #eab308;
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.24);
}

.outline-row.is-collapsed .outline-secondary,
.outline-row.is-collapsed .outline-skills,
.outline-row.is-collapsed .outline-private-section-note {
  display: none;
}

.outline-row-head {
  display: grid;
  grid-template-columns: minmax(145px, 0.35fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: var(--plan-theme-soft);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.outline-row-head:hover {
  background: var(--plan-theme-mid);
}

.outline-row-head div {
  display: grid;
  gap: 3px;
  justify-items: center;
  text-align: center;
}

.outline-row-head span,
.outline-secondary {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.outline-row-head strong {
  color: var(--plan-theme);
  font-size: 1.05rem;
  font-weight: 1000;
  line-height: 1.15;
}

.outline-row-time {
  color: var(--plan-theme-accent);
}

.outline-toggle {
  justify-self: end;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.outline-secondary {
  margin: 10px 14px 0;
}

.outline-skills {
  display: grid;
  gap: 7px;
  padding: 10px 12px 12px;
}

.outline-private-section-note {
  display: grid;
  gap: 6px;
  margin: 0 12px 12px;
  padding: 10px;
  border: 1px solid #ead7a6;
  border-radius: 8px;
  background: #fffaf0;
}

.outline-private-section-note span {
  color: #7c5a13;
  font-size: 0.8rem;
  font-weight: 900;
}

.outline-private-section-note textarea {
  min-height: 66px;
  border-color: #dfc67d;
  background: #fffdf7;
}

.outline-skill {
  display: grid;
  grid-template-columns: 22px minmax(180px, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--plan-theme-mid);
  border-radius: 8px;
  background: #ffffff;
}

.outline-skill:nth-child(even) {
  background: var(--plan-theme-soft);
}

.outline-skill-no-game-check {
  grid-template-columns: minmax(180px, 1fr) auto;
}

.individual-column-plan {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  overflow: hidden;
  min-height: 390px;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.individual-column-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  min-height: 390px;
  padding: 12px;
  border-right: 1px solid rgba(90, 106, 123, 0.18);
}

.individual-column-card:last-child {
  border-right: 0;
}

.individual-column-tone-0 {
  background: #f3caca;
}

.individual-column-tone-1 {
  background: #fff2c9;
}

.individual-column-tone-2 {
  background: #d8ead2;
}

.individual-column-tone-3 {
  background: #c7d9f5;
}

.individual-column-section,
.individual-column-skills {
  display: grid;
  align-content: start;
  gap: 8px;
}

.individual-column-skills {
  align-self: center;
}

.individual-column-section input,
.individual-column-section-note,
.individual-column-skill-editor {
  width: 100%;
  border: 1px solid rgba(90, 106, 123, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.68);
  color: #12293b;
  font-weight: 800;
}

.individual-column-section input {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 1rem;
}

.individual-column-section-note {
  min-height: 78px;
  resize: vertical;
  font-size: 0.86rem;
}

.individual-column-skill-editor {
  min-height: 160px;
  resize: vertical;
  font-size: 0.95rem;
  line-height: 1.45;
}

.individual-column-skills small {
  color: #52687a;
  font-size: 0.78rem;
  font-weight: 800;
}

.individual-column-video-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.individual-column-section > span,
.individual-column-skills > span {
  color: #0b1720;
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: lowercase;
}

.individual-column-section strong {
  color: #0f2333;
  font-size: 1rem;
  line-height: 1.2;
}

.individual-column-section small {
  color: #4a5c6c;
  font-size: 0.78rem;
  font-weight: 900;
}

.individual-column-skills ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.individual-column-skills li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(90, 106, 123, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.54);
}

.individual-column-skills li strong {
  min-width: 0;
  color: #12293b;
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.individual-column-note {
  grid-column: 1 / -1;
  margin: 0;
  color: #33495b;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.individual-column-private-note {
  align-self: end;
  border-top: 1px solid rgba(90, 106, 123, 0.2);
  padding-top: 8px;
}

.individual-column-private-note summary {
  color: #31495f;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
}

.individual-column-private-note textarea {
  width: 100%;
  min-height: 74px;
  margin-top: 8px;
  border-color: rgba(90, 106, 123, 0.25);
  background: rgba(255, 255, 255, 0.72);
}

.lesson-video-search {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--plan-theme-line);
  border-left: 7px solid var(--plan-theme);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--plan-theme-soft), #ffffff 62%);
  box-shadow: var(--shadow-soft);
}

.lesson-video-picker {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1fr) auto minmax(180px, 1fr);
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--plan-theme-mid);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.lesson-video-picker label {
  display: grid;
  gap: 6px;
}

.lesson-video-picker label span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.lesson-video-link-text {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.outline-note {
  grid-column: 2 / -1;
  margin: 0;
  padding: 8px 10px;
  font-size: 0.84rem;
  font-weight: 700;
}

.outline-note::before,
.outline-plan-note::before {
  content: "Notes";
  display: block;
  margin-bottom: 4px;
  color: #7c5a13;
  font-size: 0.76rem;
  font-weight: 900;
}

.outline-section-note::before {
  content: "Section notes";
}

.outline-video-link {
  grid-column: auto;
  margin: 0;
}

.outline-game-check {
  align-self: center;
}

.outline-games {
  padding: 14px;
  border: 1px solid #cde5df;
  border-radius: 8px;
  background: #fbfdfc;
  box-shadow: var(--shadow-soft);
}

.move-up-rubric {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8c38a;
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: var(--shadow-soft);
}

.rubric-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #ead69b;
  border-radius: 8px;
  background: #ffffff;
}

.rubric-section > strong {
  color: var(--accent-dark);
  font-size: 1rem;
}

.rubric-section ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
}

.rubric-section li {
  font-weight: 750;
  line-height: 1.3;
}

.outline-games ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 18px;
}

.outline-games li {
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.outline-games-copy-field {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #cde5df;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}

.outline-games-copy-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 150, 171, 0.14);
  outline: none;
}

.combo-builder {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cde5df;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.combo-builder-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.combo-builder-head h2 {
  margin: 0;
}

.combo-builder-head > span {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.combo-builder-body {
  display: grid;
  gap: 12px;
}

.combo-builder.is-collapsed .combo-builder-body {
  display: none;
}

.combo-builder-controls {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(130px, 0.6fr) auto auto auto;
  gap: 10px;
  align-items: end;
}

.combo-builder-controls label,
.combo-builder-option-group {
  display: grid;
  gap: 5px;
}

.combo-builder-controls label span,
.combo-builder-option-group > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.combo-builder-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  min-height: 42px;
}

.combo-builder-lengths {
  grid-template-columns: repeat(4, minmax(38px, 1fr));
}

.combo-builder-segmented button {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #cde5df;
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.combo-builder-segmented button.is-selected {
  border-color: var(--accent);
  background: #e6f6f9;
  color: var(--accent-dark);
  box-shadow: 0 0 0 2px rgba(34, 150, 171, 0.12);
}

.combo-builder-toggle {
  display: flex !important;
  min-height: 42px;
  flex-direction: row;
  gap: 7px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #fbfdfc;
}

.combo-builder-output {
  min-height: 48px;
  padding: 12px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--accent-dark);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.45;
}

.game-link-editor {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(260px, 1.15fr) auto auto;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #cde5df;
  border-radius: 8px;
  background: #ffffff;
}

.game-link-editor label {
  display: grid;
  gap: 6px;
}

.game-link-editor span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.coach-game-buttons {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.coach-game-button-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.coach-game-button {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.coach-game-button:hover:not(:disabled) {
  background: #0b5e58;
}

.coach-game-button:disabled {
  cursor: not-allowed;
  border-color: #d5ded9;
  background: #eef2ef;
  color: #7d8982;
}

.game-button-editor {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.game-button-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(180px, 0.9fr) minmax(260px, 1.2fr) auto auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.game-button-row label {
  display: grid;
  gap: 6px;
}

.game-button-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.class-list-editor {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.class-list-head,
.class-list-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(110px, 0.25fr) minmax(280px, 1.1fr) auto auto auto;
  gap: 10px;
  align-items: center;
}

.class-list-head {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0 12px;
}

.class-list-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.class-rubric-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  padding: 10px;
  border: 1px solid #ead69b;
  border-radius: 8px;
  background: #fffaf0;
}

.class-rubric-field span {
  color: #7c5a13;
  font-size: 0.82rem;
  font-weight: 900;
}

.class-rubric-field textarea {
  min-height: 96px;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.skills-search-bar {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #cde5df;
  border-radius: 8px;
  background: #f7fbfa;
}

.skills-search-bar label {
  display: grid;
  gap: 8px;
}

.skills-search-bar span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.quick-skill-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #f0c98a;
  border-radius: 8px;
  background: #fff8ec;
}

.quick-skill-form label {
  display: grid;
  gap: 7px;
}

.quick-skill-form span {
  color: #7a4c0f;
  font-size: 0.84rem;
  font-weight: 900;
}

.skills-editor {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.skill-sheet-spreadsheet-panel {
  display: grid;
  gap: 12px;
}

.skill-sheet-spreadsheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 14px;
  border: 1px solid #bedbd4;
  border-radius: 8px;
  background: #ffffff;
}

.skill-sheet-spreadsheet-actions .hint {
  margin-right: auto;
}

.skill-sheet-spreadsheet-wrap {
  min-height: 560px;
  overflow: auto;
  border: 1px solid #bedbd4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.skill-sheet-spreadsheet {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}

.skill-sheet-spreadsheet th,
.skill-sheet-spreadsheet td {
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.skill-sheet-spreadsheet th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #145c63;
  color: #ffffff;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}

.skill-sheet-spreadsheet th:nth-child(1),
.skill-sheet-spreadsheet td:nth-child(1),
.skill-sheet-spreadsheet th:nth-child(2),
.skill-sheet-spreadsheet td:nth-child(2) {
  width: 190px;
}

.skill-sheet-spreadsheet th:nth-child(3),
.skill-sheet-spreadsheet td:nth-child(3) {
  width: 270px;
}

.skill-sheet-spreadsheet th:nth-child(4),
.skill-sheet-spreadsheet td:nth-child(4),
.skill-sheet-spreadsheet th:nth-child(5),
.skill-sheet-spreadsheet td:nth-child(5) {
  width: 230px;
}

.skill-sheet-spreadsheet th:last-child,
.skill-sheet-spreadsheet td:last-child {
  width: 88px;
  border-right: 0;
  text-align: center;
}

.skill-sheet-group-row td {
  padding: 0;
  background: #eaf6f2;
  border-top: 2px solid #9fcac2;
  border-bottom: 1px solid #bedbd4;
}

.skill-sheet-group-row-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}

.skill-sheet-group-row-inner strong {
  color: #123f43;
  font-size: 1rem;
}

.skill-sheet-group-row-inner span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.skill-sheet-group-row.is-collapsed td {
  background: #f7fbfa;
}

.skill-sheet-group-row.has-visible-rows td {
  border-bottom-color: #9fcac2;
}

.skill-sheet-spreadsheet input {
  width: 100%;
  min-width: 0;
  border-color: #cbd5e1;
  background: #ffffff;
  font-size: 0.95rem;
}

.skill-sheet-spreadsheet input:focus {
  outline: 3px solid rgba(20, 92, 99, 0.18);
  border-color: #145c63;
}

.skill-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #bedbd4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.skill-card-head {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  background: #eaf6f2;
  border-bottom: 1px solid #cde5df;
}

.skill-card-body {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #fbfdfc;
}

.skill-card.is-collapsed .skill-card-body {
  display: none;
}

.collapse-toggle {
  min-height: 42px;
  white-space: nowrap;
}

.skill-edit-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e4ddd0;
  border-left: 5px solid #d6a53f;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 4px 12px rgba(24, 32, 29, 0.03);
}

.secondary-edit-head {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding-bottom: 4px;
}

.skill-edit-row.is-collapsed .bulk-skill-editor,
.skill-edit-row.is-collapsed .skill-link-editor {
  display: none;
}

.editor-label {
  display: grid;
  gap: 8px;
}

.editor-label span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.skill-link-editor {
  display: grid;
  gap: 8px;
}

.skill-link-head,
.skill-link-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(240px, 1.2fr) auto;
  gap: 8px;
  align-items: center;
}

.skill-link-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.bulk-skill-editor {
  display: grid;
  gap: 8px;
}

.bulk-category-editor {
  padding: 12px;
  border: 1px dashed #9fcac2;
  border-radius: 8px;
  background: #f3fbf8;
}

.bulk-skill-editor textarea {
  min-height: 92px;
  resize: vertical;
}

.bulk-skill-actions {
  display: grid;
  gap: 8px;
}

.compact-button {
  min-height: 36px;
  padding: 0 10px;
}

.danger-button {
  border-color: #e7b8b8;
  color: #991b1b;
}

.danger-button:hover {
  background: #fff1f1;
}

.todo-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.todo-form .todo-notes-field {
  grid-column: 1 / -1;
}

.todo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  margin: 14px 0;
}

.todo-toolbar label {
  max-width: 220px;
}

.todo-list {
  display: grid;
  gap: 10px;
}

.todo-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #ffffff;
}

.todo-card.is-done {
  border-left-color: #94a3b8;
  opacity: 0.72;
}

.todo-card.is-done strong {
  text-decoration: line-through;
}

.todo-card.has-unread-task {
  border-left: 6px solid var(--brand-orange);
  background: #fff9ed;
}

.sub-outschool-panel {
  margin-bottom: 16px;
}

.sub-outschool-card {
  border-left-color: var(--brand-orange);
}

.todo-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff4dd;
  color: #8a3b00;
  font-size: 0.78rem;
  font-weight: 900;
}

.todo-card-head,
.todo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.todo-card-head strong {
  min-width: min(100%, 260px);
  font-size: 1rem;
}

.todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.todo-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--plan-theme-soft);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.todo-notes {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.todo-actions {
  justify-content: flex-start;
}

.todoist-embed {
  min-height: 620px;
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.todoist-embed iframe {
  display: block;
  width: 100%;
  height: min(76vh, 760px);
  min-height: 620px;
  border: 0;
  background: #ffffff;
}

.move-learner-tool {
  display: grid;
  gap: 16px;
}

.move-learner-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.move-learner-tabs button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.move-learner-tabs button.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.move-learner-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.move-learner-output {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 700;
  white-space: pre-wrap;
}

.move-learner-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.move-learner-list-head h3 {
  margin: 0;
}

.move-learner-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.move-learner-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.move-learner-table th,
.move-learner-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.move-learner-table th {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.move-learner-table tr:last-child td {
  border-bottom: 0;
}

.move-learner-table button {
  margin: 0;
  padding: 8px 10px;
}

.completed-log-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.completed-log-panel[hidden] {
  display: none;
}

.completed-log-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.refund-request-card.is-completed {
  border-left-color: #94a3b8;
  background: #f8fafc;
}

.spreadsheet-planner-shell {
  display: grid;
  gap: 16px;
  min-height: calc(100vh - 150px);
}

.spreadsheet-planner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.spreadsheet-planner-head h2 {
  margin: 4px 0;
}

.spreadsheet-planner-actions,
.spreadsheet-planner-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.spreadsheet-planner-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.spreadsheet-theme-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--plan-theme-line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--plan-theme-soft), #ffffff 58%);
}

.spreadsheet-theme-bar input[type="color"] {
  min-height: 42px;
  padding: 4px;
  border: 1px solid var(--plan-theme-line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.spreadsheet-theme-bar input[type="file"] {
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--plan-theme-line);
  border-radius: 8px;
  background: #ffffff;
}

.spreadsheet-theme-bar .ghost {
  align-self: end;
  min-height: 42px;
}

.spreadsheet-notes-field {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.spreadsheet-notes-field textarea {
  min-height: 74px;
}

.spreadsheet-table-wrap {
  min-height: 520px;
  max-height: none;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.spreadsheet-planner-table {
  width: 100%;
  min-width: 1420px;
  border-collapse: collapse;
  table-layout: fixed;
}

.spreadsheet-planner-table th,
.spreadsheet-planner-table td {
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.spreadsheet-planner-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--plan-theme);
  color: #ffffff;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}

.spreadsheet-planner-table th:first-child,
.spreadsheet-planner-table td:first-child {
  width: 140px;
}

.spreadsheet-planner-table th:nth-child(2),
.spreadsheet-planner-table td:nth-child(2) {
  width: 92px;
}

.spreadsheet-planner-table th:nth-child(3),
.spreadsheet-planner-table td:nth-child(3) {
  width: 180px;
}

.spreadsheet-planner-table th:nth-child(4),
.spreadsheet-planner-table td:nth-child(4) {
  width: 180px;
}

.spreadsheet-planner-table th:nth-child(10),
.spreadsheet-planner-table td:nth-child(10) {
  width: 240px;
}

.spreadsheet-planner-table th:last-child,
.spreadsheet-planner-table td:last-child {
  width: 86px;
  border-right: 0;
  text-align: center;
}

.spreadsheet-planner-table input,
.spreadsheet-planner-table textarea {
  width: 100%;
  min-width: 0;
  border-color: #cbd5e1;
  background: #ffffff;
  font-size: 0.95rem;
}

.spreadsheet-planner-table textarea {
  min-height: 58px;
  resize: vertical;
}

.spreadsheet-planner-table input:focus,
.spreadsheet-planner-table textarea:focus,
.spreadsheet-planner-toolbar input:focus,
.spreadsheet-planner-toolbar select:focus,
.spreadsheet-theme-bar input:focus,
.spreadsheet-theme-bar select:focus,
.spreadsheet-notes-field textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--plan-theme) 18%, transparent);
  border-color: var(--plan-theme);
}

.spreadsheet-row-time {
  display: block;
  padding: 10px 8px;
  border-radius: 8px;
  background: var(--plan-theme-soft);
  color: #123f43;
  font-weight: 800;
  text-align: center;
}

.spreadsheet-remove-row {
  min-width: 0;
  padding: 8px 10px;
}

.spreadsheet-picker-menu {
  position: fixed;
  z-index: 10000;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #b6c7d2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.spreadsheet-picker-menu[hidden] {
  display: none;
}

.spreadsheet-picker-menu button {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  font-weight: 650;
  text-align: left;
}

.spreadsheet-picker-menu button:hover,
.spreadsheet-picker-menu button.is-selected {
  background: #e0f2f1;
  color: #123f43;
}

@media (max-width: 1200px) {
  .shell {
    width: min(100vw - 24px, 1180px);
  }

  .planner {
    padding: 20px;
  }

  .plan-video-head,
  .plan-video-row {
    grid-template-columns: minmax(180px, 1fr) minmax(100px, 0.35fr) minmax(200px, 1fr) minmax(200px, 0.9fr) auto;
  }

  .skill-edit-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .shell {
    width: min(100vw - 20px, 1560px);
    padding: 10px 0;
  }

  .planner {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .topbar,
  .tabs,
  .planner > section,
  .planner > div:not(.topbar):not(.tabs) {
    grid-column: 1;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .topbar h1 {
    font-size: 2rem;
  }

  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .actions {
    justify-content: stretch;
  }

  .actions button {
    flex: 1;
  }

  .ready-game-layout,
  .ready-game-timer,
  .ready-game-coach-form,
  .move-learner-form,
  .time-sheet-layout,
  .time-sheet-detail-layout,
  .time-sheet-toolbar,
  .staff-chat-layout,
  .staff-chat-compose,
  .announcement-form,
  .time-sheet-clock-bar {
    grid-template-columns: 1fr;
  }

  .time-sheet-main-card,
  .time-sheet-summary-card {
    grid-column: auto;
    grid-row: auto;
  }

  .time-sheet-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .payroll-approval-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .payroll-approval-state {
    justify-items: start;
  }

  .scheduled-class-list {
    grid-template-columns: repeat(7, minmax(150px, 1fr));
  }

  .teacher-badge,
  .admin-password {
    width: 100%;
    max-width: none;
  }

  .tabs {
    position: sticky;
    top: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 6px;
    margin-inline: -4px;
    padding-inline: 4px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 8px;
    background: var(--surface);
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-tab-block {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: max-content;
  }

  .sidebar-tab-heading {
    margin: 0 6px 0 0;
    white-space: nowrap;
  }

  .tab {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    padding: 0 14px;
    white-space: nowrap;
    text-align: center;
  }

  .class-bar {
    grid-template-columns: 1fr;
  }

  .saved-plan-bar {
    grid-template-columns: 1fr;
  }

  .build-controls {
    grid-template-columns: 1fr;
  }

  .games-head {
    align-items: stretch;
    flex-direction: column;
  }

  .grid-head,
  .grid-cell {
    padding: 9px;
  }

  .planner-outline-head {
    grid-template-columns: 1fr;
  }

  .planner-row-toggle {
    justify-self: stretch;
  }

  .planner-outline-skills,
  .outline-skill-edit,
  .lesson-video-picker {
    grid-template-columns: 1fr;
  }

  .editor-toolbar,
  .quick-skill-form,
  .plan-video-controls,
  .skill-card-head,
  .secondary-edit-head,
  .skill-edit-row,
  .skill-link-head,
  .skill-link-row,
  .class-list-head,
  .class-list-row,
  .plan-video-head,
  .plan-video-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .editor-toolbar,
  .outline-header {
    align-items: stretch;
    flex-direction: column;
  }

  .outline-header > strong {
    white-space: normal;
  }

  .outline-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .outline-row-head {
    grid-template-columns: minmax(105px, 0.45fr) minmax(0, 1fr) auto;
  }

  .outline-row-head div {
    justify-items: start;
    text-align: left;
  }

  .outline-skill {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .outline-video-link {
    grid-column: 2;
    justify-self: start;
  }

  .outline-note {
    grid-column: 1 / -1;
  }

  .game-link-editor {
    grid-template-columns: 1fr;
  }

  .game-button-row {
    grid-template-columns: 1fr;
  }

  .plan-video-head,
  .skill-link-head {
    display: none;
  }

  .refund-layout {
    grid-template-columns: 1fr;
  }

  .classroom-message-layout,
  .message-row {
    grid-template-columns: 1fr;
  }

  .learner-message-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .floating-chat {
    right: 12px;
    bottom: 12px;
  }

  .floating-notes {
    left: 12px;
    bottom: 12px;
  }

  .floating-chat-panel {
    width: calc(100vw - 24px);
  }

  .floating-notes-panel {
    width: calc(100vw - 24px);
  }

  .floating-chat-list {
    height: min(420px, 56vh);
  }

  .shell {
    width: 100%;
    padding: 0;
  }

  .planner,
  .login-panel {
    min-height: 100vh;
    border-width: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .planner {
    padding: 12px;
  }

  .login-panel {
    width: 100%;
    margin: 0;
    padding: 18px;
  }

  .topbar {
    gap: 12px;
    padding-bottom: 12px;
  }

  .brand-lockup {
    flex-direction: column;
  }

  .brand-logo {
    width: 136px;
    height: 88px;
  }

  .topbar h1 {
    font-size: 1.75rem;
  }

  .dashboard-hero {
    min-height: auto;
    padding: 18px;
  }

  .dashboard-hero h2 {
    font-size: 2.1rem;
  }

  .dashboard-card-grid {
    grid-template-columns: 1fr;
  }

  .compact-time-form {
    grid-template-columns: 1fr;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .teacher-badge,
  .admin-password {
    grid-column: 1 / -1;
  }

  .tabs {
    position: sticky;
    top: 0;
    z-index: 4;
    margin: 12px -12px 0;
    padding: 0 12px 1px;
    background: var(--surface);
  }

  .tab {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .class-bar,
  .saved-plan-bar,
  .admin-notes-panel,
    .coach-notes-panel,
    .build-panel,
    .games-panel,
    .outline-games,
    .combo-builder,
    .coach-game-buttons {
    padding: 12px;
  }

  .combo-builder-controls {
    grid-template-columns: 1fr;
  }

  .build-panel {
    gap: 14px;
  }

  .build-controls {
    padding: 12px;
  }

  .lesson-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-inline: 0;
    padding: 0;
  }

  .grid-head,
  .grid-cell {
    min-width: 0;
    padding: 8px;
  }

  .time-head,
  .time-cell,
  .time-end {
    min-width: 0;
  }

  select,
  input,
  button {
    min-height: 42px;
  }

  .outline-panel {
    gap: 10px;
  }

  .resource-view-head {
    align-items: stretch;
    flex-direction: column;
  }

  .mock-outline div,
  .mock-grid,
  .mock-skill-row,
  .mock-games-row {
    grid-template-columns: 1fr;
  }

  .outline-header,
  .outline-row-head,
  .outline-skills,
  .outline-games {
    padding: 12px;
  }

  .outline-row-head {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
  }

  .outline-row-time {
    grid-column: 1 / -1;
    font-size: 0.9rem;
  }

  .outline-toggle {
    align-self: center;
  }

  .outline-row-head strong {
    font-size: 1rem;
  }

  .outline-skill {
    padding: 9px;
  }

  .video-link,
  .compact-link {
    width: 100%;
  }

  .coach-game-button-list {
    display: grid;
  }

  .todo-form {
    grid-template-columns: 1fr;
  }

  .actions button,
  .saved-plan-bar button,
  .build-controls button,
  .plan-video-controls button,
  .game-link-editor button,
    .game-link-editor a,
    .game-button-row button,
    .refund-actions button,
    .message-actions button,
    .coach-game-button,
    .games-head button {
    width: 100%;
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  body {
    background: #f3f8fb;
  }

  .shell {
    width: 100%;
    padding: 0;
  }

  .planner {
    width: 100%;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .topbar,
  .tabs,
  .planner > section,
  .planner > div:not(.topbar):not(.tabs) {
    min-width: 0;
    grid-column: 1;
  }

  .topbar {
    position: relative;
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  .brand-lockup {
    min-width: 0;
  }

  .brand-logo {
    flex: 0 0 auto;
  }

  .topbar h1 {
    font-size: 1.6rem;
    line-height: 1.12;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .actions button,
  .login-actions button,
  .resource-view-head button,
  .saved-plan-bar button,
  .build-controls button,
  .manual-time-form button,
  .todo-actions button,
  .message-actions button {
    width: 100%;
  }

  .teacher-badge {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    white-space: normal;
  }

  .tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    gap: 8px;
    max-height: none;
    margin: 0 -10px;
    padding: 8px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    background: #ffffff;
    border-block: 1px solid #d9e7ef;
    border-radius: 0;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-tab-block {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: max-content;
    padding: 6px;
    border-radius: 8px;
  }

  .sidebar-tab-heading {
    margin: 0 4px 0 0;
    white-space: nowrap;
  }

  .tab {
    width: auto;
    min-width: 112px;
    min-height: 44px;
    padding: 8px 12px;
    white-space: nowrap;
  }

  .resource-view,
  .dashboard-page,
  .build-panel,
  .saved-plan-bar,
  .admin-notes-panel,
  .coach-notes-panel,
  .games-panel,
  .outline-panel,
  .outline-header,
  .outline-row,
  .individual-column-plan,
  .outline-games,
  .combo-builder,
  .time-sheet-card,
  .teacher-directory-panel,
  .tab-visibility-panel,
  .move-learner-tool,
  .refund-tool,
  .ready-game-shell {
    width: 100%;
    min-width: 0;
  }

  .resource-view-head,
  .dashboard-hero,
  .teacher-directory-head,
  .teacher-editor-head,
  .teacher-section-head,
  .saved-plans-head,
  .saved-plans-group-head,
  .time-sheet-detail-head,
  .time-sheet-head,
  .outline-header,
  .games-head,
  .combo-builder-head {
    align-items: stretch;
    flex-direction: column;
  }

  .class-bar,
  .saved-plan-bar,
  .build-controls,
  .plan-video-controls,
  .lesson-video-picker,
  .teacher-directory-form,
  .todo-form,
  .message-form,
  .message-settings-grid,
  .refund-form,
  .move-learner-form,
  .ready-game-form,
  .manual-time-form,
  .time-sheet-toolbar,
  .time-sheet-filters,
  .time-sheet-clock-bar,
  .staff-chat-compose,
  .announcement-form,
  .app-feedback-form,
  .teacher-faq-form,
  .clip-cutter-controls,
  .combo-builder-controls {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  label,
  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }

  input,
  select,
  textarea,
  button {
    min-height: 44px;
    font-size: 16px;
  }

  textarea {
    min-height: 96px;
  }

  .lesson-grid,
  .planner-outline-skills,
  .outline-skill-edit,
  .plan-video-head,
  .plan-video-row,
  .game-link-editor,
  .game-button-row,
  .class-list-head,
  .class-list-row,
  .skill-card-head,
  .skill-link-row,
  .secondary-edit-head,
  .secondary-edit-row,
  .individual-skill-count-row,
  .teacher-directory-workspace,
  .staff-chat-layout,
  .next-month-class-sections,
  .notes-log-controls,
  .faq-admin-layout,
  .app-feedback-admin-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .individual-column-plan {
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
    overflow-x: auto;
  }

  .individual-column-card {
    min-width: 180px;
  }

  .plan-video-head,
  .class-list-head,
  .skill-link-head,
  .secondary-edit-head {
    display: none;
  }

  .lesson-grid,
  .class-list-editor,
  .plan-video-editor,
  .skills-editor,
  .teacher-directory-list,
  .time-entry-list,
  .payroll-approval-list {
    gap: 10px;
  }

  .grid-cell,
  .plan-video-row,
  .class-list-row,
  .skill-card,
  .teacher-directory-item,
  .time-entry-card,
  .todo-card,
  .announcement-card,
  .faq-card,
  .app-feedback-card {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .scheduled-class-list {
    grid-template-columns: repeat(7, minmax(220px, 1fr));
    gap: 10px;
    margin-inline: -2px;
    padding: 2px 2px 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .time-sheet-day {
    min-width: 220px;
    min-height: 300px;
    scroll-snap-align: start;
  }

  .scheduled-class-button {
    min-height: 104px;
  }

  .payroll-table-shell,
  .ready-game-table-shell,
  .teacher-directory-table-shell {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .payroll-table {
    min-width: 780px;
  }

  .resource-frame,
  #clipCutterView .resource-frame {
    width: 100%;
    min-height: 78vh;
  }

  .planner:has(#clipCutterView:not(.hidden)) {
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
  }

  .planner:has(#clipCutterView:not(.hidden)) .tabs {
    display: flex;
    max-height: none;
  }

  .planner:has(#clipCutterView:not(.hidden)) #clipCutterView.resource-view,
  .planner:has(#clipCutterView:not(.hidden)) #clipCutterView .resource-frame {
    min-height: 86vh;
    height: auto;
  }

  .floating-chat,
  .floating-notes {
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .floating-chat {
    right: 12px;
  }

  .floating-notes {
    left: 12px;
  }

  .floating-chat-panel,
  .floating-notes-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 92px);
  }

  .floating-chat-list {
    height: min(420px, 52vh);
  }
}

@media (max-width: 460px) {
  .planner {
    padding: 8px;
  }

  .topbar {
    padding: 10px;
  }

  .brand-lockup {
    flex-direction: column;
    gap: 8px;
  }

  .brand-logo {
    width: 112px;
    height: 72px;
  }

  .topbar h1,
  .login-panel h1 {
    font-size: 1.35rem;
  }

  .actions,
  .login-actions,
  .todo-actions,
  .message-actions,
  .refund-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .tab {
    min-width: 104px;
    padding-inline: 10px;
  }

  .dashboard-card-grid,
  .teacher-dashboard-actions,
  .teacher-alert-grid,
  .ready-game-stats,
  .time-sheet-stats,
  .summary-grid,
  .video-search-controls {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .outline-row-head,
  .outline-skill,
  .outline-skill-no-game-check {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .outline-game-check,
  .outline-video-link,
  .outline-note {
    grid-column: 1 / -1;
  }

  .scheduled-class-list {
    grid-template-columns: repeat(7, minmax(245px, 1fr));
  }

  .time-sheet-day {
    min-width: 245px;
  }
}
