:root {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #442919;
  background: #fff9f1;
  font-synthesis: none;
  --brand: #bd4606;
  --muted: #826b5d;
  --line: #f0e2d5;
  --orange: #b4312b;
  --accent: #ff7417;
}
.task-view-switch {
  display: flex;
  padding: 5px;
  background: #f2e7db;
  border-radius: 14px;
  margin: 0 0 16px;
  gap: 5px;
  width: fit-content;
}
.task-view-switch button {
  padding: 11px 28px;
  border-radius: 10px;
  background: transparent;
  color: #765642;
  font-weight: 700;
}
.task-view-switch button[aria-pressed="true"] {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 2px 7px #68391512;
}
.task-calendar {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  margin: 18px 0 24px;
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 18px 8px;
}
.calendar-toolbar h2 {
  margin: 0;
  font-size: 21px;
}
.calendar-toolbar > div {
  display: flex;
  gap: 5px;
}
.calendar-nav {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 13px;
  color: #69452e;
  background: #fffaf4;
}
.calendar-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 18px 16px;
  font-size: 12px;
  color: var(--muted);
}
.calendar-date-row input {
  width: 145px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: #69452e;
}
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays {
  background: #fffbf5;
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 12px 0;
  color: var(--muted);
  font-size: 12px;
}
.calendar-cell {
  min-width: 0;
  min-height: 134px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 5px;
  position: relative;
}
.calendar-cell:nth-child(7n) {
  border-right: 0;
}
.calendar-cell.selected {
  background: #fff0df;
  box-shadow: inset 0 0 0 2px #c95412;
}
.calendar-cell.outside-month {
  background: #f8f7f5;
  color: #9d9287;
}
.calendar-cell.outside-month.selected {
  background: #fff0df;
}
.calendar-day {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 3px;
  padding: 5px;
  color: inherit;
  background: transparent;
  min-height: 40px;
  position: relative;
}
.calendar-day-number {
  font-weight: 700;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.is-today .calendar-day-number {
  color: white;
  background: #bd4606;
}
.calendar-count {
  font-size: 11px;
  color: #796553;
}
.calendar-overdue-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ba2525;
  right: 5px;
  bottom: 2px;
}
.calendar-previews {
  display: grid;
  gap: 4px;
}
.calendar-previews .calendar-nav {
  font-size: 10px;
  padding: 5px 0;
  border: 0;
}
.calendar-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px 8px;
  font-size: 12px;
  border-top: 1px solid var(--line);
  color: #816a56;
}
.calendar-overdue-text {
  color: #ac2622;
}
.calendar-note {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
  padding: 0 16px 14px;
}
.calendar-more {
  text-align: center;
  padding: 20px;
}
@media (max-width: 640px) {
  .task-view-switch {
    width: 100%;
  }
  .task-view-switch button {
    flex: 1;
    padding: 11px 8px;
  }
  .calendar-toolbar {
    padding: 14px 10px 8px;
  }
  .calendar-toolbar h2 {
    font-size: 16px;
  }
  .calendar-nav {
    padding: 9px 10px;
  }
  .calendar-date-row {
    padding: 6px 10px 12px;
    gap: 7px;
    font-size: 10px;
  }
  .calendar-date-row input {
    width: 126px;
    font-size: 11px;
  }
  .calendar-cell {
    min-height: 67px;
    padding: 2px;
  }
  .calendar-day {
    flex-direction: column;
    gap: 3px;
    padding: 4px 0;
  }
  .calendar-day-number {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  .calendar-count {
    font-size: 10px;
  }
  .calendar-weekdays {
    font-size: 10px;
    padding: 10px 0;
  }
  .calendar-previews {
    display: none;
  }
  .calendar-summary {
    padding: 12px 10px 6px;
    gap: 8px;
    font-size: 10px;
  }
  .calendar-note {
    padding: 0 10px 12px;
    font-size: 10px;
  }
  #day-agenda h2 {
    font-size: 16px;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button,
input,
select,
textarea,
a {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #c99047;
}
button {
  transition:
    background 0.16s,
    transform 0.16s;
}
button:hover {
  filter: brightness(0.97);
}
.loading {
  padding: 80px;
  text-align: center;
}
.shell {
  min-height: 100vh;
  padding-left: 232px;
}
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 232px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 34px 22px;
  display: flex;
  flex-direction: column;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -1px;
}
.brand-icon {
  background: var(--brand);
  color: #fff1d8;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 26px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 6px;
}
.side-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #9a7b65;
  margin: 48px 14px 15px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 13px;
  background: none;
  color: #82624d;
  padding: 14px 16px;
  border-radius: 12px;
  text-align: left;
  font-size: 14px;
}
.nav button.active {
  background: #fff0df;
  color: var(--brand);
  font-weight: 700;
}
.nav .glyph {
  font-size: 19px;
  width: 22px;
  text-align: center;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 22px 9px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.8;
  color: #927967;
}
.sidebar-bottom strong {
  color: #6a4229;
}
.content {
  max-width: 1380px;
  margin: auto;
  padding: 30px 42px 60px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 32px;
  font-size: 12px;
  color: #826b5d;
}
.identity {
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  background: #ffe5c9;
  color: var(--brand);
  border-radius: 50%;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.link {
  background: transparent;
  color: var(--brand);
  padding: 6px;
  font-size: 12px;
}
.demo-label {
  display: inline-block;
  border: 1px solid #f2d7bc;
  border-radius: 20px;
  padding: 5px 10px;
  color: #8c4b1c;
  font-size: 11px;
  margin-left: 10px;
  background: #fff0df;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 700;
  color: #ad5828;
  margin-bottom: 9px;
}
h1 {
  font-size: 29px;
  letter-spacing: -1px;
  margin: 0 0 10px;
  font-weight: 700;
}
h2 {
  font-size: 17px;
  margin: 0;
}
h3 {
  font-size: 15px;
  margin: 0;
}
p {
  line-height: 1.7;
}
.sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.primary {
  background: var(--brand);
  color: white;
  border-radius: 9px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
}
.secondary {
  background: #fff;
  color: #744a30;
  border: 1px solid #ead8c7;
  border-radius: 9px;
  padding: 11px 15px;
  font-size: 13px;
}
.quiet {
  background: #fff0df;
  color: var(--brand);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 12px;
}
.danger {
  background: #fff0eb;
  color: #a83827;
  border-radius: 9px;
  padding: 10px 16px;
}
.hero {
  background: linear-gradient(115deg, #ffe5c1, #fff2d9 68%, #ffdfaf);
  border-radius: 18px;
  color: #50280e;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px;
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
}
.hero:after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border: 1px solid #ffc27f;
  border-radius: 50%;
  right: -40px;
  top: -64px;
  opacity: 0.5;
  pointer-events: none;
}
.hero h2 {
  font-size: 20px;
  line-height: 1.7;
}
.hero p {
  margin: 6px 0 0;
  color: #865735;
  font-size: 12px;
}
.hero-number {
  font-size: 52px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -3px;
  min-width: 115px;
  text-align: right;
  z-index: 1;
}
.hero-number span {
  font-size: 17px;
  letter-spacing: 0;
}
.hero-number small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1px;
  margin-top: 11px;
  color: #865735;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px 21px;
  position: relative;
}
.stat .label {
  font-size: 12px;
  color: #826b5d;
}
.stat strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
  margin: 14px 0 6px;
  letter-spacing: -1px;
}
.stat small {
  font-size: 10px;
  color: #967b68;
}
.stat.overdue strong {
  color: var(--orange);
}
.stat .dot {
  position: absolute;
  right: 20px;
  top: 22px;
  background: #ffd4aa;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.stat.overdue .dot {
  background: #db7a63;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.section-head .sub {
  margin-top: 5px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
}
.filters input,
.filters select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: #765037;
  font-size: 12px;
}
.filters label {
  font-size: 11px;
  color: #8b6b54;
}
.store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 28px;
}
.store-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 21px;
  text-align: left;
  width: 100%;
  color: inherit;
}
.store-card:hover {
  border-color: #efa66c;
  transform: translateY(-2px);
}
.store-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
}
.store-no {
  font-size: 11px;
  color: #ac8a6b;
  letter-spacing: 2px;
}
.store-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  color: #846b59;
}
.store-row strong {
  color: #6f4221;
}
.progress {
  height: 5px;
  background: #fff0df;
  border-radius: 10px;
  overflow: hidden;
  margin: 14px 0;
}
.progress span {
  display: block;
  height: 100%;
  background: #f7862c;
  border-radius: 10px;
}
.tag {
  display: inline-block;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 500;
  border-radius: 6px;
  background: #f7eee4;
  color: #856b55;
  white-space: nowrap;
}
.tag.overdue {
  background: #ffebe6;
  color: #ad342c;
}
.tag.done {
  background: #eaf4ed;
  color: #356c4a;
}
.tag.pending {
  background: #fff0d6;
  color: #8c5818;
}
.panels {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.task-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.task {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 17px 20px;
  cursor: pointer;
}
.task:hover {
  border-color: #e3b181;
}
.task-mark {
  flex-shrink: 0;
  width: 23px;
  height: 23px;
  border: 1.5px solid #dcc0a5;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #fff;
}
.task.done .task-mark {
  background: #58956a;
  border-color: #58956a;
}
.task-main {
  min-width: 0;
  flex: 1;
}
.task-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}
.task-meta {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  font-size: 10px;
  color: #8b715e;
  flex-wrap: wrap;
}
.task-chevron {
  color: #b69b85;
  font-size: 23px;
  margin-left: 5px;
}
.compact .task {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #f3e7dc;
  padding: 15px 0;
}
.reminder-callout {
  padding: 16px;
  background: #fff6e7;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.8;
  color: #866044;
  margin-top: 18px;
}
.mini-entry {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 0;
  border-bottom: 1px solid #f3e7dc;
  font-size: 12px;
}
.mini-entry .icon {
  background: #fff0df;
  padding: 10px;
  border-radius: 10px;
  color: #ba611e;
}
.empty {
  padding: 48px 22px;
  text-align: center;
  color: #907963;
  font-size: 13px;
  line-height: 1.9;
}
.empty-symbol {
  font-size: 40px;
  color: #d89d60;
  margin-bottom: 15px;
}
.placeholder {
  max-width: 650px;
  text-align: center;
  margin: 70px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 60px 40px;
}
.placeholder h2 {
  font-size: 24px;
}
.placeholder p {
  color: #8b7562;
  font-size: 13px;
}
.placeholder .big-icon {
  font-size: 56px;
  color: #cf7d39;
  margin-bottom: 20px;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 15% 15%, #ffe8c9, transparent 55%), #fff9f1;
}
.login-box {
  width: min(540px, 100%);
  padding: 38px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 25px 90px #7a350c0b;
}
.login-box h1 {
  font-size: 32px;
  margin: 33px 0 12px;
}
.login-box p {
  font-size: 13px;
  color: #826c59;
}
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 24px 0;
}
.role-button {
  border: 1px solid #efdbc7;
  background: #fffcf6;
  border-radius: 11px;
  padding: 15px;
  text-align: left;
  color: #72492e;
  font-size: 12px;
}
.role-button:first-child {
  background: #fff0df;
}
.login-foot {
  font-size: 11px !important;
  line-height: 1.9;
}
dialog {
  border: 1px solid #efdbc7;
  border-radius: 18px;
  padding: 0;
  width: min(680px, calc(100vw - 28px));
  max-height: 90vh;
  color: #442919;
  box-shadow: 0 20px 100px #61320b25;
}
dialog::backdrop {
  background: #41220f66;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-body {
  padding: 24px 26px;
}
.dialog-head button {
  background: #fff0df;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  color: #ac6230;
}
.dialog-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 17px;
}
.field input,
.field select,
.field textarea {
  border: 1px solid #e9d7c5;
  background: #fff;
  border-radius: 8px;
  padding: 11px;
  color: #563820;
  width: 100%;
}
.field textarea {
  min-height: 100px;
  resize: vertical;
}
.field small {
  color: #8a6e58;
  line-height: 1.8;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 10px 0;
}
.checks label {
  font-size: 12px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.checks input {
  width: auto;
  accent-color: var(--brand);
}
.error {
  color: #aa382a;
  background: #fff0e9;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  margin: 12px 0;
  line-height: 1.8;
}
.detail-title {
  font-size: 22px;
  margin: 10px 0;
}
.detail-text {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.9;
  background: #fff8ed;
  padding: 18px;
  border-radius: 10px;
}
.audit {
  font-size: 12px;
  line-height: 1.9;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: #826b56;
}
.audit strong {
  color: #674329;
}
.muted {
  color: #88705c;
  font-size: 12px;
}
.import-text {
  min-height: 180px !important;
  font-family: monospace;
  font-size: 12px !important;
}
.preview-table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
}
.preview-table th,
.preview-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 6px;
  text-align: left;
}
.scroll-x {
  overflow: auto;
}
.plan-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.member-card {
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 12px;
  margin: 12px 0;
}
.member-card h3 {
  margin-bottom: 14px;
}
.member-card .field {
  margin-bottom: 9px;
}
.invite-code {
  background: #fff0d6;
  padding: 18px;
  border-radius: 10px;
  word-break: break-all;
  font-family: monospace;
  font-size: 16px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 35px;
  transform: translate(-50%, 20px);
  background: #603614;
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  font-size: 13px;
  transition: 0.2s;
  max-width: 90vw;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1500px) {
  .content {
    padding-top: 40px;
  }
  .store-grid {
    gap: 20px;
  }
  .hero {
    padding: 30px 34px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 190px;
    padding: 30px 15px;
  }
  .shell {
    padding-left: 190px;
  }
  .content {
    padding: 25px;
  }
  .store-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .panels {
    grid-template-columns: 1fr;
  }
  .brand {
    font-size: 18px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
}
@media (max-width: 700px) {
  .shell {
    padding-left: 0;
    padding-bottom: 78px;
  }
  .sidebar {
    width: auto;
    top: auto;
    right: 0;
    height: 70px;
    padding: 6px 10px 10px;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .sidebar > .brand,
  .side-label,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    flex-direction: row;
    justify-content: space-around;
    gap: 2px;
  }
  .nav button {
    padding: 7px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 10px;
    flex: 1;
  }
  .nav .glyph {
    font-size: 19px;
  }
  .content {
    padding: 18px 17px 25px;
  }
  .topbar {
    font-size: 10px;
    margin-bottom: 25px;
    align-items: flex-start;
  }
  .topbar .date-meta {
    max-width: 145px;
    line-height: 1.8;
  }
  .demo-label {
    margin: 5px 0 0;
    padding: 2px 7px;
  }
  .heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
  h1 {
    font-size: 25px;
  }
  .heading > .actions {
    width: 100%;
  }
  .actions button {
    font-size: 11px;
    padding: 10px 12px;
  }
  .hero {
    padding: 22px 20px;
    border-radius: 15px;
  }
  .hero h2 {
    font-size: 17px;
  }
  .hero p {
    max-width: 215px;
    font-size: 10px;
  }
  .hero-number {
    font-size: 40px;
    min-width: 85px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
  }
  .stat {
    padding: 15px 18px;
  }
  .stat strong {
    font-size: 26px;
    margin-top: 10px;
  }
  .store-grid {
    gap: 10px;
  }
  .store-card {
    padding: 17px 13px;
  }
  .store-row {
    font-size: 10px;
  }
  .panel {
    padding: 18px;
  }
  .task {
    padding: 15px 13px;
    gap: 10px;
  }
  .task-title {
    font-size: 12px;
  }
  .task-meta {
    font-size: 10px;
    gap: 6px;
  }
  .filters {
    gap: 7px;
  }
  .filters input {
    min-width: 0;
    max-width: 135px;
  }
  .filters select {
    max-width: 135px;
  }
  .dialog-body {
    padding: 20px;
  }
  .dialog-head {
    padding: 19px 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .login-box {
    padding: 28px 23px;
  }
  .login-box h1 {
    font-size: 28px;
  }
  .placeholder {
    margin: 35px auto;
    padding: 45px 20px;
  }
  #toast {
    bottom: 85px;
  }
  .identity {
    gap: 6px;
  }
  .identity .name {
    max-width: 106px;
  }
  .tag {
    padding: 4px 6px;
    font-size: 9px;
  }
  .section-head h2 {
    font-size: 16px;
  }
}

/* Sunny Pet: the supplied logo stays intact; the interface uses its warm palette. */
.ui-icon {
  width: 23px;
  height: 23px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.brand {
  font-size: 19px;
  letter-spacing: 0;
  gap: 10px;
}
.brand small {
  font-size: 9px;
  letter-spacing: 0.8px;
  color: #8c6d52;
}
.brand-logo,
.hero-mascot,
.login-art {
  display: block;
  position: relative;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}
.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  border: 1px solid #f2dfc6;
}
.brand-logo img {
  position: absolute;
  width: 240%;
  max-width: none;
  left: -70%;
  top: -55%;
}
.sidebar {
  background: #fffcf7;
}
.nav button {
  border-radius: 15px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.nav button.active {
  background: #fff0de;
  box-shadow: inset 3px 0 #f4761a;
}
.sidebar-bottom {
  padding: 22px 0 0;
  font-size: 11px;
}
.sidebar-bottom .ui-icon {
  display: block;
  color: #e4802f;
  margin-bottom: 12px;
  width: 30px;
  height: 30px;
}
.mobile-brand {
  display: none;
}
.mobile-break {
  display: none;
}
.heading .actions {
  justify-content: flex-end;
}
.primary {
  background: #bd4606;
  box-shadow: 0 4px 10px #a8460718;
  border-radius: 12px;
}
.secondary,
.quiet {
  border-radius: 12px;
}
.hero {
  border: 1px solid #f4d3ac;
  border-radius: 25px;
  padding: 28px 30px;
  gap: 20px;
  min-height: 174px;
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.6px;
}
.hero p {
  font-size: 12px;
  max-width: 440px;
}
.hero-kicker {
  font-size: 11px;
  color: #9a541c;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-kicker .ui-icon {
  width: 18px;
  height: 18px;
}
.hero-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}
.hero-mascot {
  width: 110px;
  height: 110px;
  border-radius: 30px;
  transform: rotate(5deg);
  border: 4px solid #fff8ef;
  box-shadow: 0 8px 18px #bd681517;
}
.hero-mascot img {
  position: absolute;
  width: 160%;
  max-width: none;
  left: -30%;
  top: -32%;
}
.hero-number {
  color: #7e390d;
  text-align: center;
  letter-spacing: -2px;
  font-size: 48px;
  min-width: 108px;
}
.hero-number small {
  font-size: 10px;
  color: #80502a;
  letter-spacing: 0;
}
.hero:after {
  width: 250px;
  height: 250px;
  border: 25px solid #ffb56345;
  right: -80px;
  top: -100px;
}
.stat,
.store-card,
.panel {
  border-radius: 19px;
  box-shadow: 0 4px 16px #70390004;
}
.stat strong {
  font-size: 34px;
  color: #57331d;
}
.stat.overdue {
  background: #fff9f6;
}
.stat .label {
  color: #7b604c;
}
.stat small {
  color: #846e5d;
}
.store-top {
  margin-bottom: 20px;
}
.store-top h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.store-symbol {
  display: inline-flex;
  background: #fff0dc;
  border-radius: 11px;
  padding: 9px;
  color: #be601c;
}
.store-symbol .ui-icon {
  width: 20px;
  height: 20px;
}
.store-no {
  color: #a78362;
}
.progress {
  height: 6px;
}
.progress span {
  background: linear-gradient(90deg, #ffad4c, #f97921);
}
.task-title,
.detail-title,
.batch-review strong {
  overflow-wrap: anywhere;
}
.tag.overdue {
  background: #ffebe8;
  color: #a9322b;
}
.tag.pending {
  color: #895119;
}
.placeholder .big-icon .ui-icon {
  width: 62px;
  height: 62px;
}
.login-wrap {
  padding: 35px;
  background:
    radial-gradient(ellipse at 15% 10%, #ffe5c0, transparent 50%), #fff9ef;
}
.login-layout {
  width: min(1060px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border: 1px solid #f1ddc5;
  border-radius: 32px;
  box-shadow: 0 28px 100px #8a430b0c;
  overflow: hidden;
}
.login-story {
  padding: 40px 42px 30px;
  background: linear-gradient(155deg, #fff7e7, #fff0d4);
  position: relative;
}
.story-copy {
  margin-top: 44px;
}
.story-copy .eyebrow {
  font-size: 9px;
  letter-spacing: 1.5px;
}
.story-copy h1 {
  font-size: 36px;
  line-height: 1.5;
  margin: 18px 0 10px;
  color: #543017;
  letter-spacing: -1px;
}
.story-copy em {
  font-style: normal;
  color: #c4510c;
}
.story-copy p {
  font-size: 13px;
  color: #8c684a;
}
.login-art {
  width: 230px;
  height: 220px;
  margin: 25px auto 23px;
  border-radius: 42px;
  box-shadow: 0 12px 28px #ba661d0c;
  transform: rotate(-4deg);
}
.login-art img {
  position: absolute;
  width: 160%;
  max-width: none;
  left: -30%;
  top: -32%;
}
.story-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #906037;
}
.story-note .ui-icon {
  color: #e27c21;
  width: 19px;
  height: 19px;
}
.login-box {
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 62px 40px 28px;
}
.login-box h2 {
  font-size: 26px;
  color: #57331c;
  margin: 16px 0;
}
.login-box p {
  font-size: 13px;
}
.login-box .demo-label {
  margin: 17px 0 0;
  font-size: 11px;
}
.role-grid {
  gap: 12px;
  margin: 20px 0 22px;
}
.role-button {
  padding: 17px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 13px;
  border-radius: 13px;
}
.role-button:nth-child(-n + 2) {
  background: #fff0dd;
  border-color: #f3ce9f;
  color: #94430d;
  font-weight: 600;
}
.role-button span:last-child {
  color: #b08564;
}
.login-signoff {
  border-top: 1px solid #f0e3d5;
  padding-top: 18px;
  margin-top: 24px;
  font-size: 12px;
  color: #7b4c2b;
}
.login-signoff span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #8a725d;
}
dialog {
  border-radius: 24px;
}
dialog.batch-dialog {
  width: min(760px, calc(100vw - 28px));
}
.dialog-head {
  position: sticky;
  top: 0;
  background: #fffcf7;
  z-index: 3;
}
.dialog-head button {
  font-size: 20px;
}
.batch-step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 25px 0 16px;
}
.batch-step > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff0df;
  color: #bd4606;
  font-size: 12px;
  font-weight: 700;
}
.batch-step small {
  margin-left: auto;
  font-size: 12px;
  color: #876c58;
}
.batch-titles {
  min-height: 145px !important;
  line-height: 1.9;
}
.batch-settings {
  grid-template-columns: 1.2fr 1fr 0.8fr;
}
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.field:has(.checks) {
  border: 1px solid #f0e2d5;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fffcf7;
}
.batch-summary {
  background: #fff3df;
  border: 1px solid #f3dcc0;
  border-radius: 14px;
  padding: 17px;
  margin-bottom: 12px;
}
.batch-summary strong {
  display: block;
  font-size: 16px;
  color: #84430f;
}
.batch-summary span {
  display: block;
  font-size: 12px;
  margin-top: 8px;
  color: #85644b;
}
.batch-review {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  counter-reset: batch;
}
.batch-review li {
  border: 1px solid #f0e2d5;
  border-radius: 13px;
  padding: 16px;
  margin: 10px 0;
  counter-increment: batch;
}
.batch-review li > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.batch-review strong {
  flex: 1;
  font-size: 14px;
  line-height: 1.7;
}
.batch-review strong:before {
  content: counter(batch, decimal-leading-zero) "  ";
  color: #b58352;
}
.batch-review p {
  font-size: 12px;
  color: #84694f;
  margin: 7px 0 0;
}
.batch-review .batch-requirements {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #6c513a;
  border-top: 1px dashed #efddc7;
  padding-top: 10px;
}
.batch-success {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #eaf4ed;
  color: #356c4a;
  font-size: 30px;
  margin-bottom: 20px;
}
#batch-preview {
  scroll-margin-top: 85px;
}
@media (max-width: 1200px) {
  .heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .heading .actions {
    justify-content: flex-start;
  }
  .hero-mascot {
    display: none;
  }
  .hero h2 {
    font-size: 22px;
  }
}
@media (max-width: 850px) {
  .login-layout {
    max-width: 560px;
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 25px 30px;
  }
  .story-copy {
    margin-top: 24px;
  }
  .story-copy h1 {
    font-size: 28px;
  }
  .login-art,
  .story-note,
  .story-copy .eyebrow {
    display: none;
  }
  .login-box {
    padding: 30px;
  }
}
@media (max-width: 700px) {
  .sidebar {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    height: auto;
    background: #fffcf7f5;
    backdrop-filter: blur(12px);
  }
  .nav button {
    padding: 7px 3px;
    font-size: 11px;
    border-radius: 10px;
  }
  .nav button.active {
    box-shadow: none;
  }
  .nav .ui-icon {
    width: 21px;
    height: 21px;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #965326;
    font-size: 11px;
    margin-bottom: 4px;
    font-weight: 600;
  }
  .mobile-brand .brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .mobile-break {
    display: block;
  }
  .topbar .date-meta {
    max-width: 165px;
  }
  .date-meta .demo-label {
    display: block;
    width: fit-content;
  }
  .identity {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 140px;
    font-size: 11px;
  }
  .identity .avatar {
    width: 28px;
    height: 28px;
  }
  .heading {
    margin-bottom: 18px;
  }
  .heading .actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }
  .heading .actions button {
    padding: 12px 10px;
    font-size: 13px;
  }
  .hero {
    padding: 21px 18px;
    gap: 12px;
    min-height: 155px;
    border-radius: 21px;
  }
  .hero h2 {
    font-size: 18px;
    max-width: 205px;
    line-height: 1.6;
  }
  .hero p {
    font-size: 11px;
  }
  .hero-kicker {
    font-size: 10px;
    gap: 5px;
    line-height: 1.6;
  }
  .hero-kicker .ui-icon {
    display: none;
  }
  .hero-number {
    min-width: 82px;
    font-size: 39px;
  }
  .hero-number small {
    font-size: 10px;
  }
  .stat strong {
    font-size: 30px;
  }
  .store-top h3 {
    display: block;
    font-size: 15px;
  }
  .store-symbol {
    display: flex;
    width: fit-content;
    margin-bottom: 12px;
    padding: 8px;
  }
  .store-top {
    align-items: flex-start;
    margin-bottom: 15px;
  }
  .store-row {
    gap: 4px;
  }
  .store-card {
    padding: 17px 14px;
  }
  .task-title {
    font-size: 14px;
  }
  .task-meta,
  .store-row {
    font-size: 11px;
  }
  .tag {
    font-size: 10px;
  }
  .batch-settings {
    grid-template-columns: 1fr;
  }
  .field {
    font-size: 13px;
  }
  .checks {
    gap: 17px;
  }
  .checks label {
    font-size: 13px;
  }
  .checks input {
    width: 17px;
    height: 17px;
  }
  .dialog-footer .primary {
    font-size: 13px;
    padding: 13px 18px;
  }
  .batch-summary span {
    line-height: 1.8;
  }
  .login-wrap {
    padding: 18px;
  }
  .login-story {
    padding: 26px 25px 19px;
  }
  .login-box {
    padding: 27px 23px;
  }
  .login-box h2 {
    font-size: 23px;
  }
  .role-button {
    padding: 15px 12px;
    font-size: 12px;
  }
}

/* Each task keeps its own schedule and store selection. */
dialog.batch-dialog {
  width: min(860px, calc(100vw - 28px));
}
.batch-defaults,
.batch-paste {
  border: 1px solid #e8d6c5;
  border-radius: 14px;
  padding: 16px;
  background: #fffaf3;
  margin: 16px 0;
}
.batch-defaults summary,
.batch-paste summary {
  cursor: pointer;
  font-weight: 700;
  color: #57331c;
}
.batch-defaults summary small {
  display: block;
  font-weight: 400;
  margin: 6px 0 0 18px;
  color: #826b5d;
}
.batch-defaults[open] summary,
.batch-paste[open] summary {
  margin-bottom: 16px;
}
.batch-item {
  border: 1px solid #e9d8c9;
  border-radius: 18px;
  padding: 20px;
  margin: 14px 0;
  background: #fff;
  box-shadow: 0 4px 16px #44291905;
}
.batch-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}
.batch-item-head h4 {
  margin: 0;
  color: #ad430c;
  font-size: 15px;
}
.batch-item-head .link {
  padding: 6px 9px;
}
.batch-item textarea {
  min-height: 68px;
}
.batch-item .field:last-child {
  margin-bottom: 0;
}
.batch-row-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
}
@media (max-width: 600px) {
  .batch-item {
    padding: 14px;
    border-radius: 14px;
  }
  .batch-item-head .link {
    font-size: 12px;
    padding: 6px;
  }
  .batch-defaults,
  .batch-paste {
    padding: 12px;
  }
  .batch-defaults .quiet {
    white-space: normal;
    line-height: 1.5;
  }
}

.account-login {
  margin: 22px 0;
}
.account-login .primary {
  width: 100%;
}
.demo-accounts {
  margin: 20px 0;
}
.demo-accounts summary {
  cursor: pointer;
  color: #826b5d;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.profile-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}
.nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.guest-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 22px;
}
.guest-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 0;
  background: none;
  gap: 6px;
  color: #826b5d;
}
.guest-nav .active {
  color: #bd4606;
  font-weight: 700;
}
[hidden] {
  display: none !important;
}
@media (max-width: 720px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .nav button {
    flex: 1 1 20%;
    min-width: 0;
    font-size: 11px;
    padding-left: 2px;
    padding-right: 2px;
  }
  .guest-nav {
    gap: 0;
    justify-content: space-around;
  }
  .guest-nav button {
    font-size: 11px;
  }
}

.member-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}
.member-group-choice {
  text-align: left;
  border: 1px solid #ead9c9;
  background: #fffaf3;
  border-radius: 16px;
  padding: 16px;
  color: #876e59;
}
.member-group-choice span {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
}
.member-group-choice strong {
  font-size: 24px;
  color: #442919;
}
.member-group-choice small {
  font-size: 11px;
  font-weight: 400;
}
.member-group-choice.selected {
  border-color: #bd4606;
  background: #fff0df;
  box-shadow: 0 0 0 1px #bd4606 inset;
  color: #a43b05;
}
.member-group-heading,
.member-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.member-group-heading h3 {
  margin: 0 0 4px;
}
.member-group-heading .primary {
  flex-shrink: 0;
}
.member-group-note {
  font-size: 13px;
  color: #876e59;
  line-height: 1.7;
  margin: 14px 0;
}
.member-summary {
  padding: 18px;
  border-radius: 16px;
  background: #fff;
}
.member-summary h4 {
  margin: 0;
  overflow-wrap: anywhere;
}
.member-summary h4 small {
  font-weight: 400;
}
.member-summary .sub {
  overflow-wrap: anywhere;
}
.member-summary-head {
  align-items: flex-start;
}
.member-summary-head .tag {
  flex-shrink: 0;
}
.member-card-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.tag.inactive {
  color: #8b7767;
  background: #f2eeea;
}
.member-empty {
  border: 1px dashed #e4ccb5;
  border-radius: 16px;
  padding: 30px 18px;
  color: #876e59;
  line-height: 1.8;
  text-align: center;
}
@media (max-width: 600px) {
  .member-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .member-group-choice {
    padding: 13px 15px;
  }
  .member-group-choice span {
    margin-bottom: 6px;
  }
  .member-group-heading .primary {
    padding: 12px;
    font-size: 13px;
  }
}

.digest-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.9;
  background: #fffaf3;
  border: 1px solid #efdfce;
  padding: 18px;
  border-radius: 14px;
}

/* Distinct targets: a checkbox completes; the title opens task details. */
.task-toggle {
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  padding: 10px;
  margin: -10px 0 -10px -10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
}
.task-toggle:hover {
  background: #fff0df;
}
.task-toggle:disabled {
  opacity: 0.55;
  cursor: wait;
}
.task-open {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  text-align: left;
  box-shadow: none;
  color: inherit;
}
.task-open:hover {
  background: transparent;
}
.task-open .task-title,
.task-open .task-meta {
  display: block;
}
.task-open .task-meta span {
  margin-right: 8px;
}
.task-state-marker {
  width: 23px;
  flex-shrink: 0;
  text-align: center;
  color: #b85b1b;
  font-size: 21px;
}
.task.done .task-state-marker {
  color: #356c4a;
}
.task-toggle:focus-visible,
.task-open:focus-visible {
  outline: 2px solid #bd4606;
  outline-offset: 3px;
}
.task.important {
  border: 2px solid #d52c35;
}
.task.important.overdue {
  background: #b91c2b;
  border-color: #b91c2b;
  color: #fff;
}
.task.important.overdue .task-title,
.task.important.overdue .task-meta,
.task.important.overdue .task-chevron {
  color: #fff;
}
.task.important.overdue .task-mark {
  background: #fff;
  border-color: #fff;
}
.priority-label {
  color: #a91024;
  font-size: 0.78em;
  font-weight: 750;
  padding-right: 5px;
}
.task.important.overdue .priority-label {
  color: #fff;
}
.learning-intro {
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(120deg, #ffe8c3, #fff5df);
  margin-bottom: 22px;
}
.learning-intro h2 {
  margin: 10px 0;
  font-size: clamp(21px, 3vw, 30px);
}
.learning-intro p {
  color: #74583e;
  line-height: 1.8;
}
.learning-intro .actions {
  margin-top: 18px;
}
.learning-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}
.learning-stats {
  margin: 22px 0;
}
.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
  gap: 16px;
}
.learning-card {
  padding: 23px;
  border: 1px solid #ecdaca;
  border-radius: 20px;
  background: #fff;
  min-width: 0;
}
.learning-card h3 {
  margin: 16px 0 10px;
  overflow-wrap: anywhere;
}
.learning-card .actions {
  margin-top: 15px;
}
.learning-card > .primary {
  margin-top: 15px;
}
.learning-card.late {
  border-color: #d94444;
}
.learning-library {
  margin: 20px 0;
}
.learning-library > summary {
  padding: 16px 0;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.learning-store-summary {
  margin: 22px 0;
}
.learning-store-summary .store-card {
  text-align: left;
}
.cycle-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 0;
  border-bottom: 1px solid #eee3d7;
  flex-wrap: wrap;
}
.learning-dialog {
  width: min(900px, calc(100vw - 24px));
  max-width: 900px;
}
.learning-module-edit {
  border: 1px solid #ebd6be;
  border-radius: 18px;
  padding: 22px;
  margin: 20px 0;
  background: #fffdf9;
}
.learning-module-edit .section-head {
  margin-top: 0;
}
.learning-question-edit {
  border: 1px solid #e7d8c8;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fff;
}
.question-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}
.question-option > input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}
.question-option > input:not([type="checkbox"]) {
  min-width: 0;
  flex: 1;
}
.question-option > button {
  padding: 8px;
}
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff1dc;
  border-radius: 10px;
  padding: 3px 9px;
  margin: 4px;
  overflow-wrap: anywhere;
}
.learning-job {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 0;
}
.learning-job > input,
.learning-job .field {
  flex: 1;
  min-width: 160px;
}
.module-steps {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  margin: 22px 0;
  padding-bottom: 8px;
}
.module-steps button {
  flex: 0 0 auto;
  max-width: 300px;
  white-space: normal;
}
.lesson-content {
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 20px 0;
}
.media-item {
  margin: 12px 0;
}
.media-item small {
  display: block;
  color: #8b715b;
}
.teaching-image,
.teaching-video {
  max-width: 100%;
  max-height: 480px;
  border-radius: 12px;
  background: #f7f0e7;
}
.exam-question {
  border: 1px solid #ecdac7;
  border-radius: 14px;
  margin: 20px 0;
  padding: 18px;
}
.exam-question legend {
  padding: 4px 8px;
  font-weight: 700;
}
.exam-question small {
  font-weight: 400;
  color: #90725a;
}
.exam-option {
  display: flex;
  gap: 12px;
  align-items: start;
  padding: 14px 10px;
  border-radius: 10px;
  background: #fffaf3;
  margin: 7px 0;
  line-height: 1.7;
}
.exam-option input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 4px;
}
.attempt-history {
  margin-top: 24px;
  border-top: 1px solid #eedfcc;
  padding: 18px 0;
}
.attempt-history article {
  border-bottom: 1px solid #eedfcc;
  padding: 14px 0;
}
.assignment-meta {
  line-height: 1.8;
}
#evidence-list {
  margin: 10px 0;
  color: #4a7650;
}
@media (max-width: 600px) {
  .learning-intro {
    padding: 20px;
  }
  .learning-module-edit {
    padding: 15px;
  }
  .learning-card {
    padding: 18px;
  }
  .learning-dialog .dialog-body {
    padding: 14px;
  }
  .learning-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .learning-filters input {
    max-width: 155px;
  }
  .learning-filters select {
    max-width: 100%;
  }
}

/* Company work overview: three business areas, one filter scope. */
.overview-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 8px 0 22px;
}
.overview-welcome h2 {
  font-size: 26px;
  margin: 10px 0;
}
.overview-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.overview-tab {
  text-align: left;
  padding: 20px;
  border: 1px solid #ead8c8;
  border-radius: 20px;
  background: #fff;
  color: #5b3828;
  box-shadow: 0 4px 16px #71432105;
}
.overview-tab.active {
  background: #fff0d9;
  border: 2px solid #c35416;
  padding: 19px;
}
.overview-tab:disabled {
  opacity: 0.58;
  cursor: default;
}
.overview-tab-number {
  display: block;
  font-size: 12px;
  letter-spacing: 2px;
  color: #9c735e;
  margin-bottom: 10px;
}
.overview-tab strong {
  display: block;
  font-size: 19px;
}
.overview-tab-count {
  display: block;
  margin-top: 12px;
  font-size: 13px;
}
.overview-tab-count b {
  font-size: 26px;
  padding-right: 5px;
}
.overview-tab small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #947865;
}
.overview-section {
  border: 1px solid #efdfd1;
  border-radius: 24px;
  background: #fffdfa;
  padding: 26px;
  margin-bottom: 22px;
}
.overview-section .section-head {
  margin-top: 0;
}
.overview-section .section-head h2 {
  font-size: 23px;
  margin: 8px 0;
}
.overview-stats {
  margin: 22px 0;
}
.overview-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.overview-group {
  border: 1px solid #ebded1;
  border-radius: 16px;
  background: #fff;
  padding: 17px;
  color: #4b2b1a;
  text-align: left;
}
.overview-group h3 {
  display: flex;
  justify-content: space-between;
  margin: 0 0 14px;
  font-size: 15px;
}
.overview-group strong {
  font-size: 24px;
}
.overview-group small {
  font-size: 12px;
  color: #8e786b;
  font-weight: 400;
}
.overview-group p {
  color: #8a7363;
  font-size: 12px;
  margin: 9px 0 0;
}
.overview-group.important-group {
  border-color: #c6434e;
  background: #fff9f9;
}
.overview-subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 26px 0 12px;
}
.overview-subhead h3 {
  margin: 0;
  font-size: 16px;
}
.overview-store-list {
  border: 1px solid #efdfd1;
  border-radius: 16px;
  overflow: hidden;
}
.overview-store {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 16px;
  border: 0;
  border-bottom: 1px solid #f2e9df;
  border-radius: 0;
  text-align: left;
  background: #fff;
  padding: 15px 18px;
  color: #5b3828;
  font-size: 13px;
}
.overview-store:last-child {
  border-bottom: 0;
}
.overview-store > span:first-child {
  min-width: 105px;
}
.overview-store strong {
  font-size: 14px;
}
.overview-store small {
  display: block;
  font-size: 11px;
  color: #957e6e;
  margin-top: 5px;
}
.overview-store em {
  font-style: normal;
  padding-left: 10px;
  color: #947865;
}
.overview-store-progress {
  flex: 1;
  height: 5px;
  background: #f3e9dd;
  border-radius: 5px;
  overflow: hidden;
}
.overview-store-progress i {
  display: block;
  height: 100%;
  background: #e79646;
  border-radius: 5px;
}
.text-danger {
  color: #bd2437 !important;
}
.overview-focus {
  display: grid;
  gap: 9px;
}
.overview-focus-row {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  border: 1px solid #eee0d3;
  border-radius: 14px;
  padding: 15px;
  background: #fff;
  color: #4b2b1a;
}
.overview-focus-row > span:first-child {
  flex: 1;
  min-width: 0;
}
.overview-focus-row strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.overview-focus-row small {
  display: block;
  font-size: 11px;
  color: #967a66;
  margin-top: 7px;
}
.overview-reminders {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: #fff3e5;
  border-radius: 18px;
}
.overview-reminders h3 {
  margin: 0;
  font-size: 16px;
}
.overview-reminders p {
  margin: 9px 0;
  font-size: 13px;
}
.overview-reminders small {
  color: #947865;
  font-size: 12px;
}
.recipient-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.recipient-list {
  max-height: 300px;
  overflow: auto;
  display: grid;
  gap: 8px;
}
.recipient-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fffaf4;
  border: 1px solid #edddcd;
  border-radius: 12px;
  padding: 13px;
}
.recipient-choice input {
  width: 18px;
  height: 18px;
  flex: none;
}
.recipient-choice strong {
  display: block;
  font-size: 14px;
}
.recipient-choice small {
  display: block;
  color: #927766;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.7;
}
.recipient-choice[hidden] {
  display: none;
}
.inspection-guide {
  line-height: 1.8;
  margin: 12px 0 18px;
}
.inspection-guide p {
  margin: 5px 0 0;
}
@media (max-width: 650px) {
  .overview-welcome {
    align-items: flex-start;
    gap: 10px;
  }
  .overview-welcome h2 {
    font-size: 20px;
  }
  .overview-welcome > .quiet {
    flex: none;
    padding: 9px;
    font-size: 11px;
  }
  .overview-tabs {
    gap: 7px;
  }
  .overview-tab {
    padding: 12px 9px;
    border-radius: 14px;
  }
  .overview-tab.active {
    padding: 11px 8px;
  }
  .overview-tab strong {
    font-size: 14px;
  }
  .overview-tab-count {
    font-size: 10px;
  }
  .overview-tab-count b {
    font-size: 22px;
  }
  .overview-tab small {
    display: none;
  }
  .overview-tab-number {
    margin-bottom: 6px;
    font-size: 10px;
  }
  .overview-section {
    padding: 16px 12px;
    border-radius: 18px;
  }
  .overview-section .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
  .overview-stats {
    gap: 8px;
    grid-template-columns: repeat(2, 1fr);
  }
  .overview-groups {
    grid-template-columns: 1fr;
  }
  .overview-group {
    padding: 14px;
  }
  .overview-store {
    padding: 13px 10px;
    gap: 9px;
    font-size: 11px;
  }
  .overview-store > span:first-child {
    min-width: 75px;
  }
  .overview-store-progress {
    min-width: 20px;
  }
  .overview-store em {
    display: block;
    padding: 4px 0 0;
  }
  .overview-reminders {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }
  .overview-subhead {
    flex-wrap: wrap;
  }
  .recipient-tools {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
/* Task planning and stage reports share the same visual language. */
.task-list-hint {
  margin: -7px 0 20px;
}
.task-group {
  margin: 25px 0;
}
.task-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.task-group-heading h3 {
  margin: 0;
  font-size: 16px;
}
.task-group-note {
  margin: -3px 0 13px;
}
.task-progress {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  max-width: 360px;
}
.task-progress-label {
  min-width: 68px;
  color: #8e5c3b;
  font-size: 11px;
  font-weight: 600;
}
.task-progress-track {
  display: block;
  height: 6px;
  overflow: hidden;
  flex: 1;
  min-width: 38px;
  border-radius: 99px;
  background: #f1e5d8;
}
.task-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ed8c29;
}
.task.done .task-progress-track i {
  background: #4f8e68;
}
.task-latest-note {
  display: block;
  margin-top: 7px;
  color: #93684f;
  font-size: 11px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.task.important.overdue .task-progress-label,
.task.important.overdue .task-latest-note {
  color: #fff;
}
.task.important.overdue .task-progress-track {
  background: #f3c9cd;
}
.task.important.overdue .task-progress-track i {
  background: #ca3448;
}
.task-detail-heading {
  padding: 16px;
  border-radius: 14px;
  background: #fff8ee;
  border: 1px solid #eed9c3;
}
.task-detail-heading.important {
  border-color: #de7f86;
}
.task-detail-heading.important.overdue {
  background: #ffeaeb;
  border-color: #d74b5c;
}
.task-detail-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.task-detail-heading .detail-title {
  margin-top: 12px;
}
.task-detail-heading .sub {
  margin-bottom: 10px;
}
.task-progress-large {
  max-width: none;
}
.task-progress-large .task-progress-label {
  min-width: 85px;
  font-size: 13px;
}
.task-progress-large .task-progress-track {
  height: 9px;
}
.task-detail-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #efe1d4;
}
.task-detail-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.task-detail-section h3 small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: normal;
  color: #987660;
}
.task-detail-section > .detail-text {
  margin-bottom: 0;
}
.task-detail-section summary {
  padding: 5px 0;
  cursor: pointer;
  font-weight: 600;
  color: #7f4928;
}
.task-detail-section .field {
  margin-top: 14px;
}
.progress-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 18px 0;
}
.progress-choices legend {
  margin-bottom: 10px;
  color: #805a3d;
  font-size: 12px;
}
.progress-choice {
  position: relative;
  min-width: 0;
}
.progress-choice input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.progress-choice span {
  min-height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 7px 3px;
  border: 1px solid #e6cbb1;
  border-radius: 10px;
  background: #fff;
  color: #7d5438;
  font-size: 13px;
  font-weight: 600;
}
.progress-choice input:checked + span {
  background: #fff0df;
  border-color: #c66418;
  color: #a84e0b;
  box-shadow: inset 0 0 0 1px #c66418;
}
.progress-choice input:focus-visible + span {
  outline: 3px solid #f8cb98;
  outline-offset: 3px;
}
.progress-history {
  padding: 0;
  margin: 12px 0;
  list-style: none;
}
.progress-history-row {
  border-left: 3px solid #f2c28e;
  padding: 0 0 5px 13px;
  margin: 0 0 18px;
}
.progress-history-row > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.progress-history-row > div > span {
  color: #b25c20;
  font-weight: 700;
}
.progress-history-row time,
.progress-history-row > small {
  color: #94725a;
  font-size: 11px;
}
.progress-history-row .detail-text {
  margin: 8px 0;
  font-size: 13px;
}
.task-admin-editor #task-priority-form {
  border-top: 1px dashed #ecd8c5;
  padding-top: 10px;
}
.task-conflict h4 {
  margin: 0 0 8px;
}
.task-conflict dl {
  margin: 12px 0;
  padding: 12px;
  background: #fffaf4;
  border-radius: 10px;
}
.task-conflict dt {
  font-weight: 700;
  margin-top: 10px;
}
.task-conflict dt:first-child {
  margin-top: 0;
}
.task-conflict dd {
  margin: 4px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.task-conflict .actions {
  margin-top: 12px;
}
.overview-task-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff8ee;
  border: 1px solid #edddca;
  border-radius: 14px;
  padding: 16px 18px;
  margin: 14px 0 18px;
}
.overview-task-progress > div {
  flex: 1;
  min-width: 0;
}
.overview-task-progress strong {
  font-size: 14px;
}
.overview-task-progress .sub {
  display: block;
  margin: 5px 0 10px;
  font-size: 11px;
}
.overview-task-progress .task-progress-track {
  max-width: 520px;
}
@media (max-width: 640px) {
  .task-progress {
    max-width: 100%;
    gap: 7px;
  }
  .task-progress-label {
    min-width: 62px;
    font-size: 10px;
  }
  .task-latest-note {
    font-size: 10px;
  }
  .task-group-heading h3 {
    font-size: 14px;
  }
  .progress-choices {
    gap: 6px;
  }
  .progress-choice span {
    font-size: 12px;
  }
  .overview-task-progress {
    padding: 13px 12px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .overview-task-progress > div {
    min-width: 160px;
  }
  .overview-task-progress > button {
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .content:has(.task-view-switch) .topbar {
    margin-bottom: 12px;
  }
  .content:has(.task-view-switch) .heading {
    margin-bottom: 12px;
    gap: 8px;
  }
  .content:has(.task-view-switch) .heading .eyebrow {
    display: none;
  }
  .content:has(.task-view-switch) .heading h1 {
    font-size: 22px;
    margin-bottom: 5px;
  }
  .content:has(.task-view-switch) .heading .sub {
    margin: 4px 0;
  }
}

/* 0.9.2: give the working content priority, keep tools one tap away. */
.compact-shell .topbar {
  display: none;
}
.compact-shell .heading {
  align-items: center;
  flex-direction: row;
  margin-bottom: 10px;
  gap: 10px;
}
.compact-shell .heading .eyebrow,
.compact-shell .heading > div > .sub {
  display: none;
}
.compact-shell .heading h1 {
  margin: 0;
  font-size: 23px;
}
.compact-tools {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  margin: 0;
  min-width: 0;
}
.compact-tools > summary {
  cursor: pointer;
  padding: 10px 12px;
  font-size: 12px;
  color: #9c420e;
  font-weight: 700;
}
.compact-tools-body {
  padding: 10px;
  border-top: 1px solid var(--line);
}
.compact-tools-body .filters {
  margin: 0;
  padding: 0;
}
.compact-tools-body .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.compact-tools-body .actions button {
  flex: 1 1 100px;
}
.compact-shell .heading > .compact-tools {
  max-width: 100%;
}
.compact-shell .heading:has(> .compact-tools[open]) {
  flex-wrap: wrap;
}
.compact-shell .heading > .compact-tools[open] {
  width: 100%;
}
.compact-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.task-view-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.task-view-toolbar .task-view-switch {
  margin: 0;
  flex: 1;
}
.task-view-toolbar > .compact-tools[open] {
  width: 100%;
}
.task-view-toolbar .task-view-switch button {
  padding: 9px 14px;
  flex: 1;
}
.task-calendar {
  margin: 10px 0 16px;
  container-type: inline-size;
}
.calendar-toolbar {
  padding: 7px 10px;
}
.calendar-toolbar h2 {
  font-size: 16px;
}
.calendar-date-row {
  padding: 5px 12px;
}
.calendar-period {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  padding-block: 3px;
}
.calendar-period span {
  font-size: 12px;
  color: var(--muted);
}
.calendar-period input {
  position: absolute;
  inset: 0;
  width: 100%;
  min-width: 0;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.calendar-period input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  cursor: pointer;
}
.calendar-period:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.calendar-board {
  width: 100%;
  min-width: 0;
}
.calendar-weekdays {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.calendar-cell {
  min-height: 80px;
  padding: 3px;
}
.calendar-day {
  flex-direction: row;
  min-height: 32px;
  padding: 3px;
}
.calendar-day-number {
  width: auto;
  min-width: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 0 3px;
}
.calendar-count {
  font-size: 10px;
}
.calendar-previews {
  display: grid;
  gap: 2px;
}
.compact-more,
.week-preview {
  display: none;
}
.calendar-task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  min-height: 26px;
  padding: 2px 5px;
  gap: 4px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #f0eae3;
  color: #453428;
  text-align: left;
  font-size: 12px;
  line-height: 1.35;
}
.calendar-task-card.important {
  border-color: #c5332b;
  background: #fff1df;
}
.calendar-task-card.important.overdue {
  background: #b91c1c;
  color: white;
}
.calendar-task-card.secondary.overdue {
  border-inline-start: 2px solid #b45822;
  background: #fff0df;
  color: #6b3418;
}
.calendar-task-card.done {
  background: #edf2ed;
  color: #637666;
  border-color: #d4e0d3;
}
.calendar-task-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-task-card time {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  white-space: nowrap;
}
.calendar-task-card.done .calendar-task-name {
  text-decoration: line-through;
}
.calendar-agenda {
  display: grid;
  gap: 5px;
}
.calendar-agenda .calendar-task-card {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 7px;
  gap: 10px;
  font-size: 15px;
  align-items: baseline;
}
.calendar-agenda .calendar-task-name {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}
.calendar-agenda time {
  font-size: 13px;
}
.calendar-day-agenda {
  padding: 9px 12px 12px;
  border-top: 1px solid var(--line);
}
.agenda-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.agenda-heading h2 {
  margin: 0;
  font-size: 16px;
}
.agenda-heading small {
  margin-left: 7px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.agenda-heading .calendar-nav {
  min-height: 32px;
  padding: 4px 9px;
}
.agenda-message {
  font-size: 14px;
  margin: 10px 0;
  color: var(--muted);
}
.calendar-cell, .week-date, .week-slot {
  cursor: pointer;
}
.calendar-focused .week-dates {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-focused .week-corner {
  display: none;
}
.calendar-focused .week-preview {
  display: grid;
  gap: 2px;
}
.week-dates,
.week-time-labels,
.week-hour-row {
  display: grid;
  grid-template-columns: 48px repeat(7, minmax(0, 1fr));
}
.week-time-labels {
  text-align: center;
  padding: 6px 0;
  color: #765d49;
  font-size: 12px;
  border-block: 1px solid var(--line);
  background: #fffbf5;
}
.week-dates {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #fffbf5;
  border-block: 1px solid var(--line);
}
.week-corner,
.week-hour {
  position: sticky;
  left: 0;
  z-index: 1;
  padding: 7px 4px;
  background: #fffaf4;
  color: #785e49;
  text-align: center;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.week-name {
  padding-left: 4px;
  color: #765d49;
  font-size: 11px;
}
.week-date,
.week-slot {
  min-width: 0;
  padding: 3px;
  border-left: 1px solid var(--line);
}
.week-date.selected,
.week-slot.selected {
  background: #fff4e8;
}
.week-slot {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 42px;
}
.week-hour-row {
  border-bottom: 1px solid var(--line);
}
.calendar-all {
  color: #93400f;
  padding: 3px;
  font-size: 11px;
  background: transparent;
  border: 0;
}
.week-empty {
  position: sticky;
  left: 0;
  width: fit-content;
  padding: 16px 10px;
  font-size: 13px;
  color: var(--muted);
}
.calendar-explanation {
  padding: 10px;
  font-size: 11px;
  border-top: 1px solid var(--line);
  color: #806a55;
}
.calendar-explanation summary {
  cursor: pointer;
}
.calendar-explanation .calendar-note {
  padding: 8px 0 0;
}
@media (max-width: 640px) {
  .compact-shell .content {
    padding: 12px 10px 90px;
  }
  .compact-shell .heading h1,
  .compact-shell .content:has(.task-view-switch) .heading h1 {
    font-size: 20px;
    margin: 0;
  }
  .compact-shell .heading {
    margin: 0 0 9px;
  }
  .compact-shell .overview-tabs {
    margin-top: 10px;
  }
  .compact-shell .section-head .eyebrow {
    display: none;
  }
  .compact-shell .section-head .sub {
    font-size: 11px;
    margin: 4px 0;
  }
  .calendar-previews {
    display: grid;
  }
  .calendar-day {
    flex-direction: row;
  }
  .calendar-cell {
    min-height: 72px;
    padding: 3px;
  }
}

/* Seven columns stay in view. The open day supplies full, wrapping titles. */
@container (max-width: 740px) {
  .calendar-toolbar {
    gap: 4px;
    padding: 4px 6px;
  }
  .calendar-toolbar h2 {
    font-size: clamp(13px, 4.1cqi, 17px);
  }
  .calendar-toolbar .calendar-nav {
    padding: 5px 7px;
    min-height: 30px;
  }
  .calendar-weekdays {
    padding: 4px 0;
    font-size: 12px;
  }
  .calendar-cell,
  .week-date {
    padding: 1px;
    min-height: 66px;
  }
  .calendar-date-tools {
    display: flex;
    align-items: center;
    min-height: 23px;
  }
  .calendar-day {
    flex: 1;
    justify-content: center;
    min-width: 0;
    min-height: 23px;
    padding: 0;
  }
  .calendar-day-number {
    height: 21px;
    padding: 0 2px;
    min-width: 0;
    border-radius: 5px;
    font-size: 13px;
  }
  .month-prefix,
  .calendar-count,
  .calendar-all,
  .week-timeline,
  .week-hour-row,
  .week-corner {
    display: none;
  }
  .compact-more {
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #f5e9db;
    color: #6d472b;
    min-height: 23px;
    padding: 0 1px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
  }
  .compact-more[data-capacity="2"] {
    display: inline-flex;
  }
  .calendar-cell .calendar-task-card,
  .week-preview .calendar-task-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 1px 2px;
    min-height: 25px;
    font-size: 11.5px;
    line-height: 1.15;
  }
  .calendar-previews .calendar-task-card:nth-child(n+3),
  .week-preview .calendar-task-card:nth-child(n+3) {
    display: none;
  }
  .calendar-board .calendar-task-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    overflow: hidden;
  }
  .calendar-task-card time {
    display: none;
  }
  .calendar-agenda .calendar-task-card {
    font-size: 14px;
    align-items: center;
  }
  .calendar-task-card.secondary:not(.done):not(.overdue) {
    background: #eeeae5;
    color: #463f39;
  }
  .calendar-task-card.important:not(.done):not(.overdue) {
    background: #ffe2dc;
    color: #742a22;
    border-color: #be4038;
  }
  .calendar-task-card.long-term:not(.done):not(.overdue) {
    background: #ffe8b5;
    color: #684419;
  }
  .week-dates {
    position: static;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .week-name {
    display: block;
    padding: 3px 0;
    text-align: center;
    font-size: 12px;
  }
  .week-preview {
    display: grid;
    gap: 2px;
  }
  .calendar-explanation {
    padding: 5px 8px;
  }
}
@media (min-height: 840px) {
  @container (max-width: 740px) {
    .calendar-previews .calendar-task-card:nth-child(3),
    .week-preview .calendar-task-card:nth-child(3) {
      display: flex;
    }
    .compact-more[data-capacity="2"] { display: none; }
    .compact-more[data-capacity="3"] { display: inline-flex; }
  }
}
@media (max-height: 680px) {
  @container (max-width: 740px) {
    .calendar-month:not(.calendar-focused) .calendar-cell {
      min-height: 52px;
    }
    .calendar-month:not(.calendar-focused) .calendar-task-card:nth-child(n+2),
    .calendar-month:not(.calendar-focused) .compact-more[data-capacity="2"] {
      display: none;
    }
    .calendar-month:not(.calendar-focused) .compact-more[data-capacity="1"] {
      display: inline-flex;
    }
  }
}

/* Keep the two disclosure buttons on the same row. Their panels each
   take the entire width so that a phone can fit both date fields. */
.workspace-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0 8px;
  margin: 8px 0 14px;
}
.workspace-tools > details,
.workspace-tools > details::details-content {
  display: contents;
}
.workspace-tools > details > summary {
  grid-row: 1;
  grid-column: 1;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid #e4d5c5;
  border-radius: 9px;
  background: #fff;
  color: #5e4534;
  min-height: 38px;
  font-size: 14px;
}
.workspace-tools > details > summary::-webkit-details-marker {
  display: none;
}
.workspace-tools > details > summary::after {
  content: "⌄";
  font-size: 16px;
  color: #83593b;
}
.workspace-tools > details[open] > summary {
  background: #fff1df;
  border-color: #b87341;
}
.workspace-tools > details[open] > summary::after {
  content: "⌃";
}
.workspace-tools > details:nth-child(2) > summary {
  grid-column: 2;
}
.workspace-tools > details > .compact-tools-body {
  grid-row: 2;
  grid-column: 1/-1;
  min-width: 0;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}
.workspace-tools > details:not([open]) > .compact-tools-body {
  display: none;
}
.workspace-fields,
.workspace-actions,
.workspace-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.workspace-field {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  font-size: 13px;
  color: #654d3d;
}
.workspace-field input,
.workspace-field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 38px;
  padding: 6px 8px;
  color: #38291f;
  font: inherit;
  font-size: 14px;
  border: 1px solid #ddcfbf;
  border-radius: 8px;
  background: #fff;
}
.workspace-dates {
  grid-column: 1/-1;
  min-width: 0;
  margin: 0;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.workspace-dates legend {
  padding: 0 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #584435;
}
.workspace-filter-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
}
.workspace-filter-footer button,
.workspace-actions button {
  min-height: 38px;
  font-size: 14px;
}
.workspace-actions {
  gap: 8px;
}
.workspace-actions .primary {
  grid-column: 1/-1;
}
.workspace-actions + .compact-tools,
.workspace-actions + .notice,
.workspace-tools .inspection-guide + details {
  margin-top: 10px;
}
.compact-shell .overview-tabs {
  margin: 6px 0;
  gap: 6px;
}
.overview-tabs .overview-tab,
.overview-tabs .overview-tab.active {
  padding: 8px 10px;
  border-radius: 11px;
}
.overview-tabs .overview-tab.active {
  border-width: 1px;
  box-shadow: inset 0 0 0 1px #bf5b22;
}
.overview-tab-count {
  margin-top: 2px;
}
.overview-tab-count b {
  font-size: 1em;
  padding: 0;
}
.learning-tabs[role="group"] {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #f1e7dc;
  margin: 0 0 8px;
}
.learning-tabs[role="group"] button {
  min-width: 0;
  min-height: 40px;
  padding: 4px;
  font-size: 14px;
  line-height: 1.25;
  background: transparent;
  color: #694c37;
  border: 0;
  box-shadow: none;
}
.learning-tabs[role="group"] button.primary {
  background: #fff;
  color: #983903;
  box-shadow: 0 1px 4px #53331519;
}
@media (max-width: 640px) {
  .learning-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 10px 0;
  }
  .learning-stats .stat {
    padding: 8px 3px;
    border-radius: 8px;
    text-align: center;
    min-width: 0;
  }
  .learning-stats .stat .label {
    font-size: 12px;
  }
  .learning-stats .stat strong {
    font-size: 20px;
  }
  .overview-tabs .overview-tab {
    text-align: center;
  }
  .overview-tab .overview-tab-count {
    font-size: 12px;
  }
  .overview-tab .overview-tab-count b {
    font-size: 13px;
  }
}

/* Short portrait phones still need the last week above the fixed tab bar. */
@media (max-width:640px) and (max-height:620px) {
  .compact-shell .content:has(.task-calendar) {padding-top:4px;}
  .compact-shell .content:has(.task-calendar) .heading {margin:0 0 3px;}
  .content:has(.task-calendar) .heading summary {padding:6px 9px;}
  .content:has(.task-calendar) .task-view-switch {padding:2px;}
  .content:has(.task-calendar) .task-view-switch button {padding:5px 9px;}
  .content:has(.task-calendar) .task-view-toolbar summary {padding:6px 9px;}
  .task-calendar {margin-top:4px;}
  .calendar-month .calendar-toolbar {padding-block:1px;}
  .calendar-month .calendar-weekdays {padding-block:1px;}
  .calendar-month:not(.calendar-focused) .calendar-cell {min-height:46px;}
  .calendar-month .calendar-task-card {padding-block:0;}
  .calendar-month .calendar-date-tools,.calendar-month .calendar-day,.calendar-month .compact-more {min-height:21px;}
}

@media (max-width: 640px) {
  .overview-section .compact-heading,
  .overview-section .overview-subhead {
    flex-flow: row nowrap;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
  }
  .overview-section .compact-heading {
    margin: 0 0 8px;
  }
  .overview-section .compact-heading h2 {
    margin: 0;
    font-size: 18px;
  }
  .overview-section .compact-heading button,
  .overview-section .overview-subhead button {
    flex: none;
    padding: 6px 9px;
    min-height: 36px;
    font-size: 13px;
  }
  .overview-section .overview-subhead {
    margin: 16px 0 8px;
  }
  .overview-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 8px 0;
  }
  .overview-stats .stat {
    min-width: 0;
    padding: 8px 2px;
    border-radius: 9px;
    text-align: center;
  }
  .overview-stats .label {
    font-size: 12px;
    line-height: 1.3;
  }
  .overview-stats .stat strong {
    margin: 3px 0 0;
    font-size: 20px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
  }
  .overview-stats .stat small {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.task-heading-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.task-heading-info .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.task-mode-switch {
  display: inline-flex;
  flex: none;
  padding: 2px;
  border: 1px solid #dfc6af;
  border-radius: 10px;
  background: #fff;
}
.task-mode-switch button {
  min-height: 38px;
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  color: #674733;
  background: transparent;
  white-space: nowrap;
}
.task-mode-switch button[aria-pressed="true"] {
  color: #fff;
  background: var(--brand);
}
.task-mode-switch button:focus-visible {
  outline: 2px solid #452819;
  outline-offset: -2px;
}
.task-context {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.25;
  color: #725845;
  overflow-wrap: anywhere;
}
.task-context strong {
  color: #553924;
  font-size: 13px;
}
@media (max-width: 640px) {
  .task-heading-info { gap: 8px; }
  .task-mode-switch button { padding: 6px 8px; }
  .heading:has(.task-heading-info) { flex-wrap: wrap; }
  .heading:has(.task-heading-info) > .primary { min-height: 38px; padding: 6px 10px; }
}
.store-work-list {
  display: grid;
  gap: 6px;
}
.store-work-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  color: inherit;
}
.store-work-row > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.store-work-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.store-work-row .tag { flex: none; }
.store-work-title { overflow-wrap: anywhere; }
.store-work-detail > div {
  display: grid;
  grid-template-columns: 5em minmax(0, 1fr);
  padding: 7px 0;
  gap: 8px;
}
.store-work-detail dt { color: var(--muted); }
.store-work-detail dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.store-work-members { max-height: 230px; overflow-y: auto; }
