:root {
  --ink: #243e35;
  --green: #295447;
  --muted: #717e73;
  --border: #dfe4d9;
  --paper: #f5f6ef;
  --serif:
    "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia,
    serif;
  font-family: Inter, "PingFang SC", "Microsoft Yahei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}
button:hover {
  filter: brightness(0.94);
}
:focus-visible {
  outline: 2px solid #4d8268;
  outline-offset: 2px;
}
.lucide {
  width: 18px;
  height: 18px;
  stroke-width: 1.65;
  flex-shrink: 0;
}
aside {
  width: 216px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #fcfcf7;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 30px 25px 21px;
}
.brand img {
  width: 42px;
  height: 42px;
}
.brand strong {
  font: 700 25px/1.1 var(--serif);
  letter-spacing: 0.13em;
  display: block;
}
.brand small,
.cardcopy small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  letter-spacing: 0.07em;
}
nav {
  padding: 0 16px;
  overflow: auto;
}
.navgroup {
  font-size: 11px;
  color: #859085;
  letter-spacing: 0.12em;
  padding: 21px 12px 9px;
}
nav button,
.sidefoot button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 7px;
  padding: 11px 14px;
  color: #506157;
  text-align: left;
  margin-bottom: 3px;
}
.current {
  background: #e0eade;
  color: #214f3b;
  font-weight: 650;
}
.sidefoot {
  margin: auto 16px 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
main {
  margin-left: 216px;
}
.top {
  height: 63px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 3vw, 50px);
  background: #fcfcf8;
  border-bottom: 1px solid var(--border);
}
.top div,
.classpick,
.primary,
.text,
.tiny,
.hero span,
.panelhead h2,
.addline,
.toolbar,
.search,
.readmeta {
  display: flex;
  gap: 9px;
  align-items: center;
}
.top div {
  font-size: 12px;
  gap: 13px;
}
.top span,
.slash {
  color: var(--muted);
}
.slash {
  font-style: normal;
}
.classpick {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  padding: 7px 11px;
  font-size: 12px;
  max-width: 220px;
  overflow: hidden;
}
.classpick svg:last-child {
  width: 12px;
}
.avatar {
  border: 1px solid #d6decb;
  background: #e9eddf;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-family: var(--serif);
}
article {
  max-width: 1480px;
  margin: auto;
  padding: 28px clamp(20px, 3vw, 50px) 50px;
}
.heading,
.panelhead,
.calbar,
.taskdate,
.row,
dialog header,
dialog footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.heading {
  margin-bottom: 20px;
}
.heading h1 {
  font: 700 29px/1.25 var(--serif);
  margin: 0;
  letter-spacing: 0.05em;
}
.overline {
  font:
    600 9px/1.2 Georgia,
    serif;
  color: #78876f;
  letter-spacing: 0.2em;
  margin-bottom: 6px;
}
.heading p,
.panel p,
.backup p {
  color: var(--muted);
  line-height: 1.8;
}
.heading p {
  margin: 7px 0;
}
.primary {
  background: var(--green);
  color: #fff;
  display: inline-flex;
  justify-content: center;
  border-radius: 7px;
  padding: 10px 16px;
  font-weight: 550;
  font-size: 13px;
  white-space: nowrap;
}
.hero {
  background: #e4ebdb url("/art/banner.webp") center/cover no-repeat;
  border-radius: 12px;
  border: 1px solid #d7dfce;
  min-height: 188px;
  padding: 25px 32px;
  display: flex;
  align-items: center;
}
.hero h1 {
  font: 700 clamp(28px, 3vw, 43px) / 1.25 var(--serif);
  letter-spacing: 0.07em;
  margin: 12px 0 8px;
}
.herodate {
  font-size: 12px;
  color: #4f6555;
}
.herodate svg {
  width: 15px;
}
.hero p {
  font-family: var(--serif);
  letter-spacing: 0.08em;
  font-size: 15px;
  margin: 0 0 7px;
}
.hero small {
  color: #617363;
  font-size: 11px;
}
.statgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 16px 0 22px;
}
.stat,
.panel,
.resource,
.empty {
  background: #fffefa;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.stat {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}
.stat small,
.meta,
.taskdate,
.cardcopy small,
.bar small {
  font-size: 12px;
  color: var(--muted);
}
.stat strong {
  display: block;
  font:
    600 27px/1.2 Georgia,
    serif;
  margin-top: 4px;
}
.stat em {
  font: 12px sans-serif;
  color: var(--muted);
}
.tileicon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.tileicon svg {
  width: 21px;
  height: 21px;
}
.green,
.selected {
  background: #e3edde;
  color: #496a48;
}
.ochre {
  background: #f4ebd9;
  color: #92713b;
}
.rose {
  background: #f4e6df;
  color: #9d634d;
}
.blue {
  background: #e3ebed;
  color: #4f7176;
}
.twocol {
  display: grid;
  grid-template-columns: minmax(0, 1.57fr) minmax(265px, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}
.twocol .panel {
  height: 100%;
  margin: 0;
}
.panel {
  margin: 0 0 16px;
  padding: 20px 22px;
  min-width: 0;
}
.panelhead {
  margin-bottom: 15px;
}
.panelhead h2 {
  margin: 0;
  font: 700 20px/1.3 var(--serif);
  letter-spacing: 0.035em;
}
.panelhead h2 svg {
  color: #5d775e;
}
.text,
.tiny {
  font-size: 12px;
  color: #5d7562;
  padding: 4px;
  white-space: nowrap;
}
.text svg {
  width: 14px;
}
.tiny {
  border: 1px solid var(--border);
  background: #f9faf4;
  padding: 5px 9px;
  border-radius: 5px;
  display: inline-flex;
}
.taskdate {
  border-bottom: 1px solid var(--border);
  padding: 2px 0 12px;
}
.taskdate span {
  font-size: 11px;
}
.taskrow {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #edf0e7;
  min-height: 46px;
}
.check {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border-radius: 50%;
  border: 1px solid #a1b29c;
  padding: 0;
  display: grid;
  place-items: center;
}
.check svg {
  width: 12px;
}
.done .check {
  background: #50715d;
  color: white;
}
.done .taskname {
  text-decoration: line-through;
  color: var(--muted);
}
.taskname {
  padding: 8px 0;
  flex: 1;
  text-align: left;
  overflow-wrap: anywhere;
}
.tag {
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 10px;
  white-space: nowrap;
}
.taskrow small {
  font-size: 11px;
  color: #819083;
}
.addline {
  font-size: 12px;
  color: #6c806a;
  margin-top: 14px;
  padding: 3px 0;
}
.calbar b {
  font-size: 14px;
}
.calbar {
  margin: -3px 0 6px;
}
.icon {
  display: inline-flex;
  padding: 5px;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  align-items: center;
  row-gap: 1px;
}
.calendar small {
  color: var(--muted);
  font-size: 11px;
}
.calendar button {
  font-size: 12px;
  margin: auto;
  width: 28px;
  height: 25px;
  position: relative;
  border-radius: 6px;
}
.calendar .sel {
  background: var(--green);
  color: white;
}
.calendar .now:not(.sel) {
  outline: 1px solid var(--green);
}
.dot:after {
  content: "";
  width: 3px;
  height: 3px;
  position: absolute;
  bottom: 1px;
  left: calc(50% - 1px);
  border-radius: 50%;
  background: currentColor;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.resource {
  padding: 0;
  overflow: hidden;
  text-align: left;
}
.art {
  height: 105px;
  background-position: center;
  background-size: cover;
  padding: 10px;
}
.river {
  background-image: url("/art/landscape.webp");
}
.plum {
  background-image: url("/art/plum.webp");
}
.bamboo {
  background-image: url("/art/bamboo.webp");
}
.art span {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: #475b49;
  background: #fffdf0e8;
  padding: 3px 7px;
  border: 1px solid #d3d9c8;
  border-radius: 4px;
}
.cardcopy {
  padding: 13px 15px;
}
.cardcopy strong {
  font: 700 19px var(--serif);
}
.empty {
  padding: 34px 16px;
  text-align: center;
  color: #778879;
  font-size: 14px;
}
.panel .empty {
  background: transparent;
  border: 0;
}
.row {
  padding: 11px 2px;
  border-bottom: 1px solid var(--border);
}
.row b {
  flex: 1;
  font-weight: 540;
}
.row input {
  max-width: 95px;
}
.row:last-child {
  border: 0;
}
.filters,
.chips,
.classlist {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.filters button,
.chips button {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fffefa;
}
.filters .active,
.chips .selected {
  background: #dfebdc;
  border-color: #becfbd;
}
.search,
input,
select,
textarea {
  background: white;
  border: 1px solid #d4dbcf;
  border-radius: 6px;
  color: var(--ink);
  padding: 9px 10px;
}
.search {
  max-width: 430px;
  padding: 0 10px;
}
.search input {
  border: 0;
  flex: 1;
  min-width: 0;
}
.toolbar {
  margin-bottom: 15px;
}
.pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0;
  font-size: 12px;
}
progress {
  width: min(60%, 340px);
  accent-color: #537a61;
}
.option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.feedback {
  background: #f0f4e9;
  padding: 12px;
}
.draw {
  text-align: center;
  padding: 30px;
  font: 32px var(--serif);
}
dialog {
  padding: 24px;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: min(490px, calc(100% - 28px));
  max-height: 86dvh;
  background: #fffef9;
  box-shadow: 0 15px 80px #1e34282a;
}
dialog::backdrop {
  background: #152c235f;
}
dialog h2 {
  font: 700 23px var(--serif);
  margin: 0;
}
.fields {
  margin: 21px 0;
  display: grid;
  gap: 14px;
}
.fields label {
  display: grid;
  gap: 7px;
  font-size: 13px;
}
.fields input,
.fields select,
.fields textarea {
  width: 100%;
}
.fields textarea {
  min-height: 92px;
  resize: vertical;
}
.reading {
  line-height: 1.9;
  margin: 0;
}
.danger {
  color: #a7473f;
  margin-right: auto;
}
dialog footer {
  justify-content: flex-end;
}
.backup {
  border-top: 1px solid var(--border);
  padding-top: 15px;
}
.backup p {
  font-size: 12px;
}
#toast {
  position: fixed;
  z-index: 12;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 9px 18px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
}
.mobile {
  display: none;
}
@media (min-width: 1500px) {
  .hero {
    min-height: 220px;
  }
  .art {
    height: 150px;
  }
}
@media (max-width: 1050px) {
  aside {
    width: 180px;
  }
  main {
    margin-left: 180px;
  }
  .stat {
    padding: 12px;
    gap: 10px;
  }
  .twocol {
    grid-template-columns: minmax(0, 1.3fr) minmax(230px, 1fr);
  }
  .panel {
    padding: 17px;
  }
  .statgrid {
    gap: 9px;
  }
}
@media (max-width: 800px) {
  aside {
    width: 220px;
    transform: translateX(-100%);
    transition: transform 0.18s;
  }
  aside.opened {
    transform: none;
  }
  .shade {
    position: fixed;
    inset: 0;
    background: #13281e66;
    z-index: 4;
  }
  .mobile {
    display: inline-flex;
  }
  .top {
    height: 54px;
    padding: 0 15px;
  }
  .top div:first-child > svg,
  .top span,
  .top .slash {
    display: none;
  }
  .top div {
    gap: 8px;
  }
  main {
    margin: 0;
  }
  article {
    padding: 20px 15px 40px;
  }
  .hero {
    min-height: 168px;
  }
  .heading h1 {
    font-size: 25px;
  }
  .classpick {
    max-width: 190px;
  }
  .brand {
    padding-top: 20px;
  }
}
@media (max-width: 600px) {
  .overline {
    font-size: 8px;
  }
  .heading {
    margin-bottom: 14px;
    align-items: center;
  }
  .heading p {
    font-size: 12px;
  }
  .hero {
    padding: 18px;
    min-height: 154px;
    background-position: 61% center;
  }
  .hero h1 {
    font-size: 29px;
  }
  .hero p {
    font-size: 12px;
    letter-spacing: 0.02em;
  }
  .herodate,
  .hero small {
    font-size: 10px;
  }
  .statgrid {
    grid-template-columns: repeat(2, 1fr);
    margin: 10px 0 14px;
  }
  .stat {
    padding: 11px 14px;
  }
  .tileicon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }
  .stat strong {
    font-size: 22px;
  }
  .twocol {
    grid-template-columns: 1fr;
    gap: 13px;
    margin-bottom: 13px;
  }
  .calendar button {
    height: 32px;
    width: 32px;
  }
  .panel {
    padding: 16px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .panel .cards {
    grid-template-columns: 1fr;
  }
  .panel .resource {
    display: flex;
    align-items: stretch;
  }
  .panel .art {
    height: auto;
    min-height: 82px;
    width: 36%;
    flex-shrink: 0;
  }
  .panel .cardcopy {
    align-self: center;
  }
  .art {
    height: 90px;
  }
  .cardcopy {
    padding: 10px;
  }
  .cardcopy strong {
    font-size: 17px;
  }
  .taskrow {
    gap: 8px;
  }
  .taskname {
    font-size: 13px;
  }
  .row {
    flex-wrap: wrap;
  }
  .primary {
    padding: 9px 11px;
  }
  .panelhead h2 {
    font-size: 19px;
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .filters {
    gap: 5px;
  }
  .filters button {
    padding: 6px 9px;
    font-size: 12px;
  }
}
@media print {
  body:has(dialog[open]) #root,
  dialog footer,
  dialog header button,
  #toast {
    display: none;
  }
  dialog[open] {
    position: static;
    display: block;
    max-height: none;
    width: 100%;
    border: 0;
    box-shadow: none;
  }
  body:has(dialog[open]) {
    overflow: visible;
  }
  dialog::backdrop {
    background: white;
  }
}
