:root {
  --purple: #79609e;
  --dark: #30273e;
  --muted: #898191;
  --line: #ebe6ef;
  --bg: #faf9fc;
  --soft: #f1ebf8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--dark);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.65;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--dark);
  padding: 9px 16px;
  min-height: 44px;
}
button:hover {
  background: var(--soft);
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b29bcc;
  outline-offset: 3px;
}
.primary {
  background: var(--purple);
  border-color: var(--purple);
  color: white;
}
.primary:hover {
  background: #654d88;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 225px;
  background: white;
  border-right: 1px solid var(--line);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: block;
  font-size: 39px;
  font-weight: 600;
  letter-spacing: -3px;
  line-height: 1.1;
}
.brand > span {
  display: block;
  letter-spacing: 3px;
  font-size: 12px;
  margin-top: 12px;
}
.brand b {
  font-size: 9px;
  font-weight: 400;
  background: var(--soft);
  letter-spacing: 0;
  padding: 3px 5px;
  border-radius: 4px;
}
.side-label {
  font-size: 11px;
  color: var(--muted);
  margin: 23px 0 40px;
}
nav {
  display: grid;
  gap: 9px;
}
nav a {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 17px;
  border-radius: 10px;
  font-size: 20px;
  color: #8b8196;
}
nav a span {
  font-size: 14px;
}
nav a.active {
  background: var(--soft);
  color: #735792;
  font-weight: 600;
}
.side-bottom {
  margin-top: auto;
  font-size: 12px;
  color: #73667f;
}
.side-bottom small {
  font-size: 10px;
  color: var(--muted);
  padding-left: 13px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #9e8ab6;
  border-radius: 50%;
  margin-right: 5px;
}
main {
  margin-left: 225px;
  padding: 0 48px;
  max-width: 1600px;
}
.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}
.local-tag {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 12px;
  letter-spacing: 0;
  color: #7b698c;
}
.hero {
  background: #eee7f6;
  border: 1px solid #e5dbee;
  border-radius: 18px;
  padding: 40px 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #8e77a4;
  font-weight: 600;
  margin: 0 0 12px;
}
h1,
h2,
p {
  overflow-wrap: anywhere;
}
h1 {
  font-size: 32px;
  line-height: 1.55;
  letter-spacing: -1px;
  margin: 0 0 12px;
  font-weight: 600;
}
h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.hero p:not(.eyebrow) {
  color: #83718e;
  font-size: 13px;
  margin: 14px 0 24px;
}
.sparkle {
  color: #ac92c6;
}
.hero-art {
  width: 270px;
  height: 240px;
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.orbit {
  width: 225px;
  height: 225px;
  border: 1px solid #cfbbdf;
  border-radius: 50%;
  transform: rotate(-25deg) scaleY(0.6);
  position: absolute;
}
.orbit:after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid #d9c8e6;
  border-radius: 50%;
  transform: rotate(60deg);
}
.art-star {
  font-size: 160px;
  color: #bda3d1;
  line-height: 1;
  text-shadow: 8px 10px 20px #d9c9e7;
  transform: rotate(12deg);
}
.art-label {
  position: absolute;
  bottom: 9px;
  font-size: 12px;
  color: #a48bb7;
  font-style: italic;
  letter-spacing: 2px;
}
.tiny-star {
  position: absolute;
  right: 18px;
  top: 20px;
  color: #a991be;
  font-size: 35px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 24px 0 30px;
}
.stats a {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  background: white;
  padding: 23px;
  border-radius: 13px;
}
.stat-icon {
  background: #f5f1f9;
  color: #a58bbd;
  border-radius: 10px;
  font-size: 25px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
}
.stats strong {
  display: block;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.3;
}
.stats div > span {
  font-size: 12px;
  color: var(--muted);
}
.arrow {
  margin-left: auto;
  color: #b4a7c1;
}
.panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 0 0 22px;
}
.section-heading a {
  font-size: 11px;
  color: #8f789f;
}
.section-heading .eyebrow {
  margin-bottom: 6px;
}
.empty {
  padding: 35px 10px;
  text-align: center;
  color: var(--muted);
}
.empty .empty-icon {
  display: block;
  font-size: 28px;
  color: #c9b9d8;
  margin-bottom: 10px;
}
.empty p {
  font-size: 12px;
  margin: 5px 0 16px;
}
.empty button {
  font-size: 12px;
  color: var(--purple);
}
.note-panel {
  position: relative;
  background: #f5f1f9;
  padding-top: 36px;
}
.note-panel h2 {
  font-size: 20px;
  margin-top: 20px;
}
.note-panel > p:not(.eyebrow) {
  color: #9989a7;
  font-size: 13px;
}
.note-star {
  position: absolute;
  right: 28px;
  top: 24px;
  font-size: 30px;
  color: #baa4cf;
}
.notice {
  font-size: 11px;
  color: #9787a3;
  border-top: 1px solid #e4daee;
  padding-top: 18px;
  margin-top: 25px;
}
.recent-panel {
  margin-top: 24px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.page-heading h1 {
  font-size: 28px;
}
.page-heading p:not(.eyebrow) {
  color: var(--muted);
  margin: 0;
}
.source-note {
  font-size: 12px;
  color: var(--muted);
  padding: 14px 18px;
  background: var(--soft);
  border-radius: 9px;
  margin-bottom: 24px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.cards > .empty {
  grid-column: 1/-1;
  border: 1px dashed #d7cce1;
  border-radius: 14px;
  padding: 65px 10px;
  background: white;
}
.entry {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  background: white;
  min-width: 0;
}
.entry h3 {
  font-size: 16px;
  margin: 12px 0 7px;
}
.badge {
  background: var(--soft);
  color: #886d9e;
  font-size: 10px;
  border-radius: 5px;
  padding: 4px 8px;
}
.entry-meta {
  color: #8b7d96;
  font-size: 12px;
  margin: 4px 0;
  white-space: pre-wrap;
}
.entry-notes {
  font-size: 13px;
  white-space: pre-wrap;
  color: #72677e;
  margin: 12px 0;
}
.entry-actions {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.entry-actions button {
  font-size: 12px;
  padding: 5px 12px;
}
.source-link {
  font-size: 12px;
  color: var(--purple);
  margin-right: auto;
  text-decoration: underline;
}
.mini-entry {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.mini-entry:last-child {
  border-bottom: 0;
}
.mini-entry strong {
  font-size: 14px;
  display: block;
}
.mini-entry p {
  font-size: 11px;
  color: var(--muted);
  margin: 2px 0;
}
.date-chip {
  border-radius: 9px;
  background: var(--soft);
  color: var(--purple);
  padding: 7px 12px;
  text-align: center;
  min-width: 52px;
  font-size: 12px;
}
.calendar-panel {
  margin-bottom: 26px;
}
.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.calendar-toolbar button {
  padding: 5px 13px;
}
.weekdays,
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.weekdays span {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 14px;
}
.day {
  min-height: 90px;
  border-top: 1px solid var(--line);
  padding: 8px;
  font-size: 12px;
  min-width: 0;
}
.day-number {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
}
.day.is-today .day-number {
  background: var(--purple);
  color: white;
}
.day.outside {
  color: #c9c2d0;
  background: #fcfbfd;
}
.calendar-event {
  display: block;
  text-align: left;
  min-height: 0;
  padding: 3px 5px;
  font-size: 10px;
  border: 0;
  border-radius: 4px;
  background: var(--soft);
  color: #7c6096;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 100%;
  width: 100%;
  margin-top: 4px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin: 40px 0 0;
  padding: 22px 0;
  font-size: 10px;
  color: #a399ad;
}
.mobile-break {
  display: none;
}
dialog {
  width: 480px;
  max-width: calc(100% - 28px);
  max-height: 90dvh;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  color: var(--dark);
  overflow: auto;
}
dialog::backdrop {
  background: #30273e65;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.icon-button {
  border: 0;
  font-size: 24px;
  padding: 0;
  width: 44px;
}
label {
  display: block;
  font-size: 12px;
  margin: 15px 0 0;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid #ded5e8;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fdfcfe;
  color: var(--dark);
  font-size: 16px;
  min-height: 44px;
}
textarea {
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #b59ecd;
  outline-offset: 1px;
}
label small {
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.required {
  color: var(--purple);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.danger {
  background: #a34b67;
  color: white;
  border-color: #a34b67;
}
.form-error,
.warning {
  color: #9b3857;
  background: #fff0f5;
  padding: 12px;
  border-radius: 8px;
}
.warning {
  margin-bottom: 20px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  z-index: 10;
  font-size: 13px;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1500px) {
  main {
    margin-right: auto;
  }
}
@media (max-width: 1050px) {
  .sidebar {
    width: 190px;
    padding: 32px 18px;
  }
  main {
    margin-left: 190px;
    padding: 0 28px;
  }
  .hero {
    padding: 30px;
  }
  .hero-art {
    width: 200px;
  }
  .stats a {
    padding: 16px;
    gap: 12px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 18px 20px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 16px;
  }
  .brand {
    font-size: 28px;
    letter-spacing: -2px;
    display: flex;
    align-items: center;
    gap: 15px;
  }
  .brand > span {
    margin: 0;
    font-size: 10px;
    letter-spacing: 2px;
  }
  .side-label,
  .side-bottom {
    display: none;
  }
  nav {
    display: flex;
    gap: 5px;
  }
  nav a {
    flex: 1;
    justify-content: center;
    padding: 8px 3px;
    gap: 5px;
    font-size: 17px;
    min-height: 44px;
  }
  nav a span {
    font-size: 11px;
    white-space: nowrap;
  }
  main {
    margin: 0;
    padding: 0 20px;
  }
  .topbar {
    height: 58px;
    margin-bottom: 20px;
    font-size: 9px;
  }
  .hero {
    padding: 26px 23px;
    min-height: 270px;
  }
  .hero h1 {
    font-size: 26px;
    position: relative;
    z-index: 1;
  }
  .hero-art {
    position: absolute;
    right: -55px;
    top: 50px;
    width: 150px;
    height: 180px;
    opacity: 0.45;
    pointer-events: none;
  }
  .orbit {
    width: 165px;
    height: 165px;
  }
  .art-star {
    font-size: 115px;
  }
  .art-label {
    display: none;
  }
  .hero p {
    position: relative;
    z-index: 1;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.5px;
  }
  .stats {
    gap: 8px;
    margin: 16px 0 22px;
  }
  .stats a {
    padding: 14px 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .stat-icon {
    width: 28px;
    height: 28px;
    font-size: 19px;
  }
  .stats strong {
    font-size: 22px;
  }
  .stats div > span {
    font-size: 10px;
  }
  .arrow {
    display: none;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .panel {
    padding: 20px;
  }
  .note-panel {
    padding-top: 27px;
  }
  .note-panel h2 {
    margin-top: 10px;
  }
  .notice {
    margin-top: 18px;
  }
  .recent-panel {
    margin-top: 18px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .calendar-panel {
    padding: 15px 10px;
  }
  .calendar-toolbar {
    padding: 0 6px;
  }
  .calendar-toolbar h2 {
    font-size: 16px;
  }
  .calendar-toolbar button {
    padding: 5px 9px;
  }
  .day {
    min-height: 76px;
    padding: 5px 2px;
  }
  .calendar-event {
    font-size: 9px;
    padding: 3px 2px;
  }
  .day-number {
    width: 24px;
    height: 24px;
  }
  .section-heading {
    gap: 10px;
  }
  .section-heading h2 {
    font-size: 17px;
  }
  footer {
    flex-direction: column;
    gap: 4px;
    margin-top: 28px;
  }
  dialog {
    padding: 22px;
  }
  #toast {
    bottom: 20px;
    width: max-content;
    max-width: 90%;
  }
  .mobile-break {
    display: block;
  }
}
