:root {
  color-scheme: light;
  --ink: #242335;
  --ink-soft: #6f6b7d;
  --paper: #fffdf9;
  --paper-warm: #fff7f3;
  --line: rgba(51, 46, 72, 0.12);
  --coral: #fa6f7f;
  --coral-dark: #e65369;
  --lavender: #8f7aea;
  --mint: #36a58b;
  --orange: #ee9d42;
  --shadow: 0 24px 70px rgba(80, 54, 78, 0.1);
  --shadow-soft: 0 12px 35px rgba(80, 54, 78, 0.07);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}

/* Weekly planner: keep day settings inside the compact Day cards. */
.week-day-tabs {
  gap: 10px;
  padding-block: 14px;
}

.week-day-tab {
  grid-template-columns: minmax(0, 1fr) 50px;
  grid-template-rows: 1fr;
  align-items: center;
  align-content: stretch;
  flex-basis: 142px;
  min-height: 96px;
  gap: 8px;
  padding: 11px 10px 11px 13px;
}

.week-day-tab > .week-day-tab-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
}

.week-day-tab-copy strong {
  font-size: 16px;
  line-height: 1.15;
}

.week-day-tab-copy small {
  color: color-mix(in srgb, var(--day-color) 74%, #655e6a);
  font-size: 10px;
  font-weight: 850;
}

.week-day-tab-side em {
  width: max-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--day-color) 20%, white);
  border-radius: 999px;
  color: color-mix(in srgb, var(--day-color) 78%, #4e4654);
  background: color-mix(in srgb, var(--day-color) 9%, white);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-day-tab-side em.is-empty {
  color: #aaa3b0;
  border-color: rgba(96, 85, 110, 0.08);
  background: #f8f6f9;
}

.week-day-tab-sticker,
.week-day-tab-add {
  width: 50px;
  height: 50px;
  border-radius: 15px;
}

.week-day-tab > .week-day-tab-side {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  justify-items: center;
  gap: 4px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
}

.week-day-tab-sticker {
  padding: 2px;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px color-mix(in srgb, var(--day-color) 18%, transparent));
}

.week-day-tab-add {
  display: grid;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--day-color) 28%, white);
  color: color-mix(in srgb, var(--day-color) 68%, #77707e);
  background: color-mix(in srgb, var(--day-color) 6%, white);
  font-size: 19px;
  font-weight: 500;
}

.week-day-tab i {
  right: 8px;
  bottom: 7px;
}

.week-inline-day {
  padding-top: 17px;
}

.week-paired-text {
  margin-top: 0;
}

.week-day-dialog-settings {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(280px, 1.5fr);
  gap: 12px;
  margin: 16px 0 18px;
}

.week-day-dialog-type,
.week-day-dialog-status {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(99, 87, 118, 0.1);
  border-radius: 16px;
  background: #faf8fc;
}

.week-day-dialog-type {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.week-day-dialog-type > span,
.week-day-dialog-status legend,
.week-day-dialog-sticker-head strong {
  color: #4e4756;
  font-size: 12px;
  font-weight: 900;
}

.week-day-dialog-type select {
  width: 100%;
  height: 40px;
  padding-inline: 12px 30px;
  border: 1px solid rgba(143, 122, 234, 0.18);
  border-radius: 11px;
  outline: none;
  color: #51465e;
  background: white;
  font-weight: 850;
}

.week-day-dialog-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.week-day-dialog-status legend {
  float: left;
  margin-right: 3px;
}

.week-day-dialog-status label {
  cursor: pointer;
}

.week-day-dialog-status input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.week-day-dialog-status span {
  display: inline-grid;
  min-height: 36px;
  padding: 0 11px;
  place-items: center;
  border: 1px solid rgba(99, 87, 118, 0.1);
  border-radius: 11px;
  color: #746c7d;
  background: white;
  font-size: 10px;
  font-weight: 900;
}

.week-day-dialog-status input:checked + span {
  color: #765fca;
  border-color: rgba(143, 122, 234, 0.34);
  background: #f1edff;
  box-shadow: 0 5px 12px rgba(108, 87, 190, 0.1);
}

.week-day-dialog-sticker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 2px 9px;
}

.week-day-dialog-sticker-head span {
  color: #9992a0;
  font-size: 10px;
}

@media (max-width: 720px) {
  .week-day-tab {
    flex-basis: 132px;
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .week-day-tab-sticker,
  .week-day-tab-add {
    width: 44px;
    height: 44px;
  }

  .week-day-dialog-settings {
    grid-template-columns: 1fr;
  }

  .week-day-dialog-status {
    flex-wrap: wrap;
  }
}

/* Final weekly card overrides (kept last so legacy planner rules cannot win). */
.week-day-tabs {
  gap: 10px;
  padding-block: 14px;
}

.week-day-tab {
  grid-template-columns: minmax(0, 1fr) 50px;
  grid-template-rows: 1fr;
  align-items: center;
  align-content: stretch;
  flex-basis: 142px;
  min-height: 96px;
  gap: 8px;
  padding: 11px 10px 11px 13px;
}

.week-day-tab > .week-day-tab-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
}

.week-day-tab-copy strong {
  font-size: 16px;
  line-height: 1.15;
}

.week-day-tab-copy small {
  color: color-mix(in srgb, var(--day-color) 74%, #655e6a);
  font-size: 10px;
  font-weight: 850;
}

.week-day-tab-copy em {
  width: max-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--day-color) 20%, white);
  border-radius: 999px;
  color: color-mix(in srgb, var(--day-color) 78%, #4e4654);
  background: color-mix(in srgb, var(--day-color) 9%, white);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-day-tab-copy em.is-empty {
  color: #aaa3b0;
  border-color: rgba(96, 85, 110, 0.08);
  background: #f8f6f9;
}

.week-day-tab-sticker,
.week-day-tab-add {
  grid-column: 2;
  grid-row: 1;
  width: 50px;
  height: 50px;
  border-radius: 15px;
}

.week-day-tab-sticker {
  padding: 2px;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px color-mix(in srgb, var(--day-color) 18%, transparent));
}

.week-day-tab-add {
  display: grid;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--day-color) 28%, white);
  color: color-mix(in srgb, var(--day-color) 68%, #77707e);
  background: color-mix(in srgb, var(--day-color) 6%, white);
  font-size: 19px;
  font-weight: 500;
}

.week-day-tab i {
  right: 8px;
  bottom: 7px;
}

.week-inline-day {
  padding-top: 17px;
}

.week-paired-text {
  margin-top: 0;
}

@media (max-width: 720px) {
  .week-day-tab {
    flex-basis: 132px;
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .week-day-tab-sticker,
  .week-day-tab-add {
    width: 44px;
    height: 44px;
  }
}

/* Day-card side area: large sticker with the overall status directly below it. */
.week-day-tab > .week-day-tab-side {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  justify-items: center;
  gap: 4px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
}

.week-day-tab-side em {
  width: max-content;
  max-width: 58px;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--day-color) 20%, white);
  border-radius: 999px;
  color: color-mix(in srgb, var(--day-color) 78%, #4e4654);
  background: color-mix(in srgb, var(--day-color) 9%, white);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-day-tab-side em.is-empty {
  color: #aaa3b0;
  border-color: rgba(96, 85, 110, 0.08);
  background: #f8f6f9;
}

.week-day-tab-side .week-day-tab-sticker,
.week-day-tab-side .week-day-tab-add {
  grid-column: auto;
  grid-row: auto;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(253, 201, 210, 0.3), transparent 25rem),
    radial-gradient(circle at 94% 30%, rgba(208, 198, 255, 0.32), transparent 26rem),
    linear-gradient(180deg, #fffaf7 0%, #fffdf9 55%, #faf9ff 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.23;
  pointer-events: none;
  background-image: radial-gradient(rgba(36, 35, 53, 0.22) 0.55px, transparent 0.55px);
  background-size: 13px 13px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.page-glow {
  position: fixed;
  z-index: -1;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.35;
  pointer-events: none;
}

.page-glow--one {
  top: 16%;
  left: -190px;
  background: #ffcad3;
}

.page-glow--two {
  right: -190px;
  bottom: 8%;
  background: #d9d0ff;
}

.site-header {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 17px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 96px;
  height: 44px;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.brand-divider {
  width: 1px;
  height: 34px;
  background: var(--line);
}

.brand > span:last-child {
  display: grid;
  gap: 3px;
}

.brand strong {
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 17px;
  letter-spacing: 0.03em;
}

.brand small {
  color: var(--ink-soft);
  font-size: 11px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  margin-right: 5px;
  border: 1px solid rgba(54, 165, 139, 0.2);
  border-radius: 999px;
  color: #247d69;
  background: rgba(231, 249, 243, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.local-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #42b397;
  box-shadow: 0 0 0 4px rgba(54, 165, 139, 0.12);
}

main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.profile-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(480px, 1.4fr);
  gap: clamp(36px, 6vw, 88px);
  min-height: 380px;
  padding: clamp(40px, 6vw, 72px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.91), rgba(255, 247, 247, 0.9)),
    var(--paper);
  box-shadow: var(--shadow);
}

.profile-card::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  left: -180px;
  bottom: -220px;
  border-radius: 50%;
  border: 50px solid rgba(250, 111, 127, 0.08);
}

.profile-intro {
  position: relative;
  z-index: 1;
  align-self: center;
}

.eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--coral-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  margin-bottom: 17px;
  font-size: clamp(30px, 4vw, 49px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.profile-intro p,
.section-heading p {
  max-width: 34rem;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.profile-form-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 28px;
  align-items: start;
}

.avatar-button {
  position: relative;
  width: 128px;
  height: 152px;
  padding: 0;
  overflow: hidden;
  border: 7px solid white;
  border-radius: 62px 62px 22px 22px;
  background: linear-gradient(145deg, #ffdbe0, #e7dffd);
  box-shadow: 0 14px 32px rgba(100, 71, 97, 0.15);
  cursor: pointer;
}

.avatar-button img,
.avatar-placeholder {
  width: 100%;
  height: 100%;
}

.avatar-button img {
  display: block;
  object-fit: cover;
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  color: rgba(92, 70, 105, 0.72);
  font-family: Georgia, serif;
  font-size: 48px;
}

.avatar-edit {
  position: absolute;
  inset: auto 0 0;
  padding: 9px 4px 10px;
  color: white;
  background: rgba(36, 35, 53, 0.68);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transform: translateY(2px);
  transition: background 180ms ease;
}

.avatar-button:hover .avatar-edit {
  background: rgba(36, 35, 53, 0.82);
}

.profile-form,
.dialog-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field > span,
.color-picker legend {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.field em {
  margin-left: 3px;
  color: #a7a3b0;
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input,
.field select {
  height: 47px;
  padding: 0 14px;
}

.field textarea {
  min-height: 86px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.55;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #bbb7c2;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(250, 111, 127, 0.62);
  background: white;
  box-shadow: 0 0 0 4px rgba(250, 111, 127, 0.1);
}

.autosave-status {
  position: absolute;
  right: clamp(40px, 6vw, 72px);
  bottom: 24px;
  z-index: 1;
  color: #9a96a5;
  font-size: 11px;
  transition: color 180ms ease;
}

.autosave-status.is-saved {
  color: var(--mint);
}

.charts-section {
  padding: 92px 0 80px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.primary-button,
.secondary-button,
.text-button,
.danger-button,
.icon-button,
.chart-action,
.preset-row button,
.sticker-tab,
.sticker-item {
  border: 0;
  cursor: pointer;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  color: white;
  background: var(--ink);
  box-shadow: 0 12px 24px rgba(36, 35, 53, 0.18);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button:hover {
  background: #343247;
  box-shadow: 0 16px 28px rgba(36, 35, 53, 0.2);
}

.primary-button span,
.secondary-button span {
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.secondary-button {
  color: var(--coral-dark);
  border: 1px solid rgba(250, 111, 127, 0.25);
  background: #fff3f4;
}

.text-button,
.danger-button {
  padding: 9px 11px;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.text-button:hover {
  background: rgba(36, 35, 53, 0.06);
}

.danger-button {
  color: #cf455b;
}

.danger-button:hover {
  background: rgba(207, 69, 91, 0.08);
}

.empty-state {
  min-height: 390px;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 54px 24px;
  border: 1px dashed rgba(84, 76, 102, 0.2);
  border-radius: var(--radius-xl);
  text-align: center;
  background: rgba(255, 255, 255, 0.54);
}

.empty-state[hidden] {
  display: none;
}

.empty-visual {
  position: relative;
  width: 160px;
  height: 88px;
  margin-bottom: 20px;
  border-left: 2px solid rgba(79, 72, 95, 0.18);
  border-bottom: 2px solid rgba(79, 72, 95, 0.18);
}

.empty-visual::before,
.empty-visual::after {
  content: "";
  position: absolute;
  left: 17px;
  right: 0;
  height: 3px;
  transform-origin: left center;
}

.empty-visual::before {
  top: 53px;
  background: linear-gradient(90deg, var(--coral) 0 36%, var(--lavender) 36% 100%);
  clip-path: polygon(0 45%, 32% 5%, 61% 54%, 100% 0, 100% 65%, 61% 100%, 32% 48%, 0 100%);
  height: 28px;
}

.empty-dot {
  position: absolute;
  z-index: 1;
  width: 12px;
  height: 12px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 3px 10px rgba(94, 64, 86, 0.22);
}

.empty-dot--one { left: 13px; top: 49px; }
.empty-dot--two { left: 64px; top: 36px; background: var(--lavender); }
.empty-dot--three { right: -5px; top: 8px; background: var(--mint); }

.empty-state h3 {
  margin-bottom: 10px;
  font-size: 23px;
}

.empty-state p {
  max-width: 490px;
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
}

.charts-grid {
  display: grid;
  gap: 28px;
}

.chart-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.83);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.chart-card-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 34px 0;
}

.chart-card-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chart-color-mark {
  width: 9px;
  height: 42px;
  flex: none;
  border-radius: 9px;
  background: var(--chart-color);
}

.chart-card h3 {
  margin-bottom: 5px;
  font-size: 23px;
}

.chart-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.chart-meta b {
  color: var(--ink);
  font-weight: 700;
}

.chart-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chart-action {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.chart-action:hover {
  color: var(--ink);
  background: rgba(36, 35, 53, 0.05);
}

.chart-action--danger:hover {
  color: #cf455b;
  background: rgba(207, 69, 91, 0.07);
}

.chart-wrap {
  position: relative;
  min-height: 360px;
  padding: 10px 18px 0;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid-line {
  stroke: rgba(64, 59, 82, 0.09);
  stroke-width: 1;
}

.chart-axis-text {
  fill: #918d9c;
  font-size: 11px;
}

.chart-axis-name {
  fill: #6f6b7d;
  font-size: 11px;
  font-weight: 700;
}

.chart-line {
  fill: none;
  stroke: var(--chart-color);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 5px 6px color-mix(in srgb, var(--chart-color) 22%, transparent));
}

.chart-area {
  opacity: 1;
}

.chart-point {
  cursor: pointer;
  outline: none;
}

.chart-point .point-halo {
  fill: white;
  stroke: color-mix(in srgb, var(--chart-color) 22%, white);
  stroke-width: 8;
  transition: r 160ms ease, stroke-width 160ms ease;
}

.chart-point .point-core {
  fill: var(--chart-color);
  stroke: white;
  stroke-width: 3;
}

.chart-point:hover .point-halo,
.chart-point:focus .point-halo {
  r: 13;
  stroke-width: 10;
}

.point-sticker-bg {
  fill: white;
  stroke: rgba(49, 45, 65, 0.12);
  stroke-width: 1;
  filter: drop-shadow(0 5px 8px rgba(65, 48, 72, 0.18));
}

.chart-empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
}

.chart-empty-inner {
  max-width: 430px;
}

.chart-empty-line {
  width: 130px;
  height: 64px;
  margin: 0 auto 16px;
  border-bottom: 2px dashed rgba(80, 74, 97, 0.16);
  transform: skewY(-8deg);
}

.chart-empty h4 {
  margin: 0 0 8px;
  font-size: 17px;
}

.chart-empty p {
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.chart-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 13px 34px 23px;
  border-top: 1px solid rgba(51, 46, 72, 0.07);
}

.latest-note {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-note strong {
  color: var(--ink);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 46px;
  border-top: 1px solid var(--line);
  color: #918d9b;
  font-size: 11px;
}

.dialog {
  width: min(650px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 28px;
  background: transparent;
}

.dialog::backdrop {
  background: rgba(35, 31, 47, 0.38);
  backdrop-filter: blur(8px);
}

.dialog-card {
  max-height: calc(100vh - 30px);
  padding: 34px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  background: #fffdfb;
  box-shadow: 0 34px 100px rgba(35, 31, 47, 0.28);
}

.dialog-card--wide {
  width: min(760px, calc(100vw - 30px));
}

.dialog:has(.dialog-card--wide) {
  width: min(760px, calc(100% - 30px));
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.dialog-head h2 {
  margin-bottom: 0;
  font-size: 27px;
  letter-spacing: -0.03em;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-soft);
  background: rgba(36, 35, 53, 0.05);
  font-size: 23px;
  line-height: 1;
}

.icon-button:hover {
  background: rgba(36, 35, 53, 0.1);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -5px 0 22px;
}

.preset-row > span {
  margin-right: 3px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.preset-row button {
  padding: 7px 10px;
  border-radius: 999px;
  color: #756d85;
  background: #f4f1f8;
  font-size: 11px;
  font-weight: 700;
}

.preset-row button:hover {
  color: var(--coral-dark);
  background: #fff0f2;
}

.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.color-picker legend {
  width: 100%;
  margin-bottom: 12px;
}

.color-picker label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
}

.color-picker input {
  position: absolute;
  opacity: 0;
}

.color-picker label > span {
  width: 20px;
  height: 20px;
  border: 4px solid white;
  border-radius: 50%;
  outline: 1px solid var(--line);
  background: var(--swatch);
  box-shadow: 0 2px 7px rgba(50, 44, 64, 0.14);
}

.color-picker input:checked + span {
  outline: 2px solid var(--swatch);
  outline-offset: 2px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 30px;
}

.dialog-actions--split {
  justify-content: initial;
}

.dialog-spacer {
  flex: 1;
}

.sticker-section {
  margin-top: 24px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.sticker-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.sticker-title > div {
  display: grid;
  gap: 3px;
}

.sticker-title strong {
  font-size: 13px;
}

.sticker-title span {
  color: var(--ink-soft);
  font-size: 11px;
}

.sticker-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #f4f1f5;
}

.sticker-tab {
  flex: 1;
  min-height: 35px;
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.sticker-tab.is-active {
  color: var(--ink);
  background: white;
  box-shadow: 0 3px 12px rgba(57, 47, 68, 0.08);
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  max-height: 188px;
  margin-top: 12px;
  padding: 2px;
  overflow-y: auto;
}

.sticker-item {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  padding: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #f8f6f7;
}

.sticker-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sticker-item:hover {
  background: #fff0f2;
}

.sticker-item.is-selected {
  border-color: var(--coral);
  background: #fff5f6;
}

.sticker-none {
  color: #9c97a5;
  font-size: 11px;
  font-weight: 700;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 30px;
  padding: 12px 18px;
  border-radius: 12px;
  color: white;
  background: rgba(36, 35, 53, 0.93);
  box-shadow: 0 12px 30px rgba(36, 35, 53, 0.24);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .site-header {
    min-height: 88px;
  }

  .local-badge {
    display: none;
  }

  .profile-card {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 36px;
  }

  .profile-intro {
    max-width: 570px;
  }

  .sticker-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    align-items: center;
  }

  .brand {
    gap: 10px;
  }

  .brand img {
    width: 73px;
    height: 34px;
  }

  .brand-divider,
  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 13px;
  }

  .header-tools {
    gap: 0;
  }

  .header-tools .text-button {
    padding-inline: 7px;
    font-size: 12px;
  }

  .profile-card {
    padding: 34px 22px 48px;
    border-radius: 26px;
  }

  .profile-form-wrap {
    grid-template-columns: 1fr;
  }

  .avatar-editor {
    display: flex;
    justify-content: center;
  }

  .profile-form,
  .dialog-fields {
    grid-template-columns: 1fr;
  }

  .field--wide {
    grid-column: auto;
  }

  .autosave-status {
    right: 22px;
    bottom: 18px;
  }

  .charts-section {
    padding: 70px 0 60px;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 24px;
  }

  .section-heading .primary-button {
    width: 100%;
  }

  .chart-card {
    border-radius: 24px;
  }

  .chart-card-head {
    padding: 24px 20px 0;
  }

  .chart-card-actions {
    align-items: end;
    flex-direction: column;
  }

  .chart-wrap {
    min-height: 250px;
    padding: 12px 0 0;
    overflow-x: auto;
  }

  .chart-svg {
    width: 720px;
    max-width: none;
  }

  .chart-card-foot {
    align-items: stretch;
    flex-direction: column;
    padding: 18px 20px 22px;
  }

  .chart-card-foot .secondary-button {
    width: 100%;
  }

  .latest-note {
    white-space: normal;
  }

  .dialog-card {
    padding: 26px 20px;
    border-radius: 22px;
  }

  .color-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .sticker-title {
    align-items: start;
    flex-direction: column;
  }

  .sticker-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dialog-actions--split {
    flex-wrap: wrap;
  }

  .dialog-spacer {
    display: none;
  }

  #deleteNodeButton {
    width: 100%;
    margin-bottom: 4px;
  }

  footer {
    flex-direction: column;
  }
}

/* Weekly planner: compact header and yes/no completion rows */
.week-node-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 7px;
  border-left: 1px solid rgba(87, 102, 144, 0.1);
}

.week-node-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(87, 102, 144, 0.12);
  border-radius: 10px;
  color: #655d74;
  background: white;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.week-node-actions button:hover:not(:disabled) {
  color: #6957b1;
  border-color: rgba(143, 122, 234, 0.28);
  background: #f7f4ff;
}

.week-node-actions .is-danger {
  color: #a85762;
  border-color: rgba(219, 125, 116, 0.18);
  background: #fff7f5;
}

.week-node-actions button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.week-detail {
  margin-top: 14px;
}

.week-board {
  border-radius: 20px;
}

.week-day-tabs {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(77, 68, 89, 0.08);
  border-radius: 20px 20px 0 0;
}

.week-day-tab {
  flex-basis: 110px;
  min-height: 60px;
  gap: 3px;
  padding: 9px 11px;
}

.week-day-tab strong {
  font-size: 14px;
  text-transform: none;
}

.week-day-tab small {
  font-size: 9px;
}

.week-day-tab i {
  right: 8px;
  bottom: 8px;
  width: 6px;
  height: 6px;
}

.week-inline-day {
  padding: 14px 18px 17px;
}

.week-inline-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 11px;
  border-bottom: 1px dashed color-mix(in srgb, var(--day-color) 17%, white);
}

.week-day-type {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 6px 0 11px;
  border: 1px solid color-mix(in srgb, var(--day-color) 18%, white);
  border-radius: 11px;
  background: color-mix(in srgb, var(--day-color) 5%, white);
}

.week-day-type > span {
  color: color-mix(in srgb, var(--day-color) 76%, #49414f);
  font-size: 10px;
  font-weight: 950;
}

.week-day-type select {
  height: 30px;
  padding: 0 23px 0 5px;
  border: 0;
  outline: 0;
  color: #48414f;
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.week-inline-toolbar .week-inline-status {
  margin-left: auto;
}

.week-inline-toolbar .week-inline-status button {
  min-height: 38px;
}

.week-inline-toolbar .week-inline-sticker {
  width: 42px;
  height: 42px;
  margin-left: 2px;
  border-radius: 12px;
}

.week-inline-toolbar .week-inline-sticker span {
  margin-bottom: -8px;
  font-size: 17px;
}

.week-inline-toolbar .week-inline-sticker small {
  font-size: 7px;
}

.week-paired-text {
  gap: 9px;
  margin-top: 11px;
  padding: 10px;
  border-radius: 14px;
}

.week-paired-text label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.week-paired-text label > span {
  margin: 0;
  white-space: nowrap;
}

.week-paired-text input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(68, 59, 81, 0.1);
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: white;
  font-size: 11px;
}

.week-paired-text label:first-child input {
  border-color: rgba(238, 157, 66, 0.16);
  background: #fffbf5;
}

.week-paired-text label:last-child input {
  border-color: rgba(54, 165, 139, 0.16);
  background: #f7fcfa;
}

.week-paired-text input:focus {
  border-color: color-mix(in srgb, var(--day-color) 44%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--day-color) 9%, transparent);
}

.week-pair-table {
  margin-top: 11px;
}

.week-pair-table-head strong:last-of-type {
  color: #3b826f;
}

.week-pair-record {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.week-pair-checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.week-pair-checks button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(68, 59, 81, 0.1);
  border-radius: 9px;
  color: #9a949e;
  background: #faf9fb;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.week-pair-checks button:first-child[aria-pressed="true"] {
  color: #21856e;
  border-color: rgba(54, 165, 139, 0.34);
  background: #eaf8f3;
}

.week-pair-checks button:last-child[aria-pressed="true"] {
  color: #b34e59;
  border-color: rgba(219, 125, 116, 0.34);
  background: #fff0ed;
}

@media (max-width: 1040px) {
  .week-timeline-controls {
    align-items: stretch;
  }

  .week-node-actions {
    flex-basis: 100%;
    padding: 6px 0 0;
    border-top: 1px solid rgba(87, 102, 144, 0.08);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .week-node-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .week-day-tab {
    flex-basis: 96px;
  }

  .week-inline-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .week-inline-toolbar .week-inline-status {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .week-inline-toolbar .week-inline-sticker {
    margin-left: auto;
  }

  .week-paired-text {
    grid-template-columns: 1fr;
  }

  .week-pair-record {
    grid-template-columns: 68px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 2026 scrapbook redesign */
body {
  background:
    linear-gradient(rgba(255, 252, 244, 0.92), rgba(255, 252, 248, 0.94)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(231, 160, 168, 0.13) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(143, 122, 234, 0.11) 31px 32px),
    #fffaf1;
}

body::before {
  opacity: 0.12;
  background-size: 18px 18px;
}

.site-header {
  min-height: 92px;
}

.brand img {
  width: 84px;
  height: 38px;
  object-fit: contain;
}

.brand strong {
  font-weight: 900;
}

.brand small {
  color: #8d7f8d;
}

.header-tools {
  padding: 5px;
  border: 1px solid rgba(98, 78, 111, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 28px rgba(82, 56, 78, 0.06);
}

.header-tools .text-button {
  min-width: 52px;
}

.header-tools .reset-data-button {
  color: #a96673;
}

.header-tools .reset-data-button:hover {
  color: #c54860;
  background: #fff0f3;
}

.welcome-section {
  position: relative;
}

.hero-paper {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  border: 1px solid rgba(144, 113, 117, 0.12);
  border-radius: 15px 46px 18px 38px;
  background:
    linear-gradient(90deg, transparent 0 56px, rgba(248, 139, 151, 0.14) 56px 58px, transparent 58px),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(205, 172, 150, 0.14) 34px 35px),
    radial-gradient(circle at 84% 8%, rgba(255, 221, 130, 0.22), transparent 15rem),
    linear-gradient(135deg, #fffcf3, #fff9f2 58%, #fff8f8);
  box-shadow: 0 30px 80px rgba(91, 58, 78, 0.12);
  transform: rotate(-0.22deg);
}

.hero-paper::before {
  content: "";
  position: absolute;
  inset: 22px 25px;
  border: 1px dashed rgba(143, 122, 234, 0.18);
  border-radius: 10px 32px 10px 28px;
  pointer-events: none;
}

.hero-paper::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 48px;
  width: 17px;
  height: calc(100% - 96px);
  background: radial-gradient(circle, #eadbc7 0 6px, transparent 6.5px) center top / 17px 43px repeat-y;
  filter: drop-shadow(1px 1px 0 white);
}

.hero-tape {
  position: absolute;
  z-index: 5;
  width: 108px;
  height: 31px;
  opacity: 0.72;
  background:
    linear-gradient(90deg, rgba(255,255,255,.18), transparent 28%, rgba(255,255,255,.16) 55%, transparent),
    #9d8bf0;
  clip-path: polygon(3% 10%, 98% 0, 94% 93%, 1% 100%);
}

.hero-tape--left {
  top: 7px;
  left: 74px;
  transform: rotate(-7deg);
}

.hero-tape--right {
  right: 56px;
  bottom: 8px;
  background-color: #ff8fb1;
  transform: rotate(-4deg);
}

.hero-spark {
  position: absolute;
  z-index: 3;
  color: #ffc94e;
  font-family: Georgia, serif;
  font-size: 34px;
  transform: rotate(12deg);
}

.hero-spark--one {
  top: 54px;
  left: 51%;
}

.hero-spark--two {
  top: 84px;
  right: 35px;
  color: #ff7f9e;
  font-size: 38px;
  transform: rotate(-12deg);
}

.hero-copy {
  position: relative;
  z-index: 4;
  width: 54%;
  padding: 72px 24px 126px 84px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(143, 122, 234, 0.2);
  border-radius: 7px;
  color: #725fbb;
  background: rgba(237, 232, 255, 0.72);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  transform: rotate(-1deg);
}

.hero-logo {
  display: block;
  width: 150px;
  height: 58px;
  margin: 0 0 15px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.hero-copy h1 {
  margin-bottom: 18px;
  color: #232441;
  font-size: clamp(44px, 6vw, 73px);
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: -0.07em;
}

.hero-copy h1 em {
  position: relative;
  z-index: 0;
  color: #745ad7;
  font-style: normal;
  letter-spacing: -0.06em;
}

.hero-copy h1 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -9px;
  bottom: 4px;
  left: -7px;
  height: 20px;
  opacity: 0.72;
  background: #ffd96d;
  clip-path: polygon(0 28%, 99% 0, 96% 89%, 2% 100%);
}

.hero-copy p {
  max-width: 390px;
  margin-bottom: 25px;
  color: #786d7b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.85;
}

.hero-jump {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px 15px 9px 13px;
  color: white;
  background: linear-gradient(120deg, #ff6f8c, #8c72e8);
  box-shadow: 0 10px 0 rgba(105, 83, 151, 0.1), 0 18px 30px rgba(135, 91, 145, 0.15);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transform: rotate(-1deg);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hero-jump:hover {
  box-shadow: 0 7px 0 rgba(105, 83, 151, 0.1), 0 14px 24px rgba(135, 91, 145, 0.18);
  transform: rotate(-1deg) translateY(2px);
}

.hero-jump span {
  font-size: 18px;
}

.hero-cast {
  position: absolute;
  z-index: 2;
  inset: 0 0 0 48%;
}

.hero-cast::before {
  content: "";
  position: absolute;
  width: 370px;
  height: 370px;
  top: 64px;
  right: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 191, 205, 0.48), rgba(220, 210, 255, 0.28) 56%, transparent 57%);
}

.hero-sticker {
  position: absolute;
  display: grid;
  justify-items: center;
  filter: drop-shadow(0 15px 15px rgba(80, 46, 70, 0.17));
}

.hero-sticker img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 2px white) drop-shadow(0 0 2px white) drop-shadow(0 0 1px white);
}

.hero-sticker span {
  position: absolute;
  z-index: 2;
  min-width: max-content;
  padding: 7px 11px;
  border: 3px solid white;
  border-radius: 8px;
  color: #54475c;
  background: #fff2a9;
  box-shadow: 0 5px 12px rgba(67, 45, 66, 0.12);
  font-size: 11px;
  font-weight: 900;
}

.hero-sticker--bella {
  z-index: 2;
  width: 214px;
  height: 214px;
  right: 54px;
  top: 35px;
  transform: rotate(5deg);
}

.hero-sticker--bella span {
  top: 12px;
  right: -12px;
  color: #e95f79;
  background: #fff0f3;
  transform: rotate(5deg);
}

.hero-sticker--diana {
  z-index: 3;
  width: 220px;
  height: 220px;
  left: 34px;
  top: 132px;
  transform: rotate(-6deg);
}

.hero-sticker--diana span {
  left: -18px;
  bottom: 9px;
  color: #b24f68;
  background: #ffe4eb;
  transform: rotate(-4deg);
}

.hero-sticker--eileen {
  z-index: 4;
  width: 215px;
  height: 215px;
  right: 18px;
  bottom: 32px;
  transform: rotate(4deg);
}

.hero-sticker--eileen span {
  right: 2px;
  bottom: 0;
  color: #6651b5;
  background: #eee8ff;
  transform: rotate(3deg);
}

.hero-line {
  position: absolute;
  z-index: 1;
  right: 70px;
  bottom: 46px;
  left: 24px;
  height: 95px;
  border-bottom: 2px solid rgba(103, 87, 155, 0.13);
}

.hero-line::before {
  content: "";
  position: absolute;
  inset: 11px 0 8px;
  background: linear-gradient(90deg, #9c7ded, #ff7895 60%, #ffd557);
  clip-path: polygon(0 73%, 21% 43%, 43% 65%, 64% 8%, 82% 48%, 100% 17%, 100% 22%, 82% 54%, 64% 15%, 43% 73%, 21% 51%, 0 81%);
}

.hero-line i {
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  border: 3px solid white;
  border-radius: 50%;
  background: #8f7aea;
  box-shadow: 0 2px 8px rgba(74, 56, 94, 0.2);
}

.hero-line i:nth-child(1) { left: -4px; top: 64px; }
.hero-line i:nth-child(2) { left: 20%; top: 35px; background: #ff7593; }
.hero-line i:nth-child(3) { left: 42%; top: 57px; background: #8f7aea; }
.hero-line i:nth-child(4) { left: 63%; top: 7px; background: #ffd557; }
.hero-line i:nth-child(5) { right: -4px; top: 15px; background: #ff7593; }

.profile-dock {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 30px;
  width: calc(100% - 72px);
  min-height: 260px;
  margin: -74px auto 0;
  padding: 30px 34px 34px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 26px 60px rgba(82, 52, 75, 0.14);
  backdrop-filter: blur(14px);
}

.profile-dock::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 48%;
  width: 88px;
  height: 22px;
  opacity: 0.55;
  background: #ffd569;
  clip-path: polygon(3% 12%, 100% 0, 95% 91%, 0 100%);
  transform: translateX(-50%) rotate(-2deg);
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 26px;
  border-right: 1px dashed rgba(93, 76, 101, 0.16);
}

.profile-identity > div:last-child {
  display: grid;
  gap: 5px;
}

.profile-tag {
  color: #8b71da;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.profile-identity strong {
  font-size: 17px;
}

.profile-identity small {
  color: #9a8e9b;
  font-size: 10px;
  line-height: 1.5;
}

.profile-dock .avatar-button {
  width: 92px;
  height: 112px;
  flex: none;
  border-width: 5px;
  border-radius: 46px 46px 18px 18px;
}

.profile-dock .avatar-placeholder {
  font-size: 38px;
}

.profile-dock .profile-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-self: center;
  gap: 14px;
}

.profile-dock .field--signature {
  grid-column: 1 / -1;
}

.profile-dock .field input,
.profile-dock .field select {
  height: 44px;
  background: #fffaf7;
}

.profile-dock .autosave-status {
  right: 34px;
  bottom: 13px;
}

.charts-section {
  padding-top: 88px;
}

.section-heading .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 6px;
  color: #e95470;
  background: #ffe7eb;
  letter-spacing: 0.08em;
  transform: rotate(-1deg);
}

.section-heading h2 {
  color: #252442;
  font-weight: 950;
}

.section-heading .primary-button,
.dialog-actions .primary-button {
  border-radius: 9px 16px 10px 14px;
  background: linear-gradient(120deg, #ff718d, #8d73e8);
  box-shadow: 0 12px 24px rgba(138, 89, 142, 0.2);
}

.empty-state {
  position: relative;
  overflow: hidden;
  border: 1px dashed rgba(137, 103, 150, 0.22);
  border-radius: 18px 35px 18px 30px;
  background:
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(194, 155, 181, 0.08) 35px 36px),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 48px rgba(88, 57, 80, 0.08);
}

.empty-state::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 28px;
  top: -5px;
  left: 50%;
  opacity: 0.55;
  background: #ab98f1;
  clip-path: polygon(4% 9%, 100% 0, 96% 95%, 0 100%);
  transform: translateX(-50%) rotate(-3deg);
}

.empty-state h3 {
  font-weight: 900;
}

.chart-card {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(109, 83, 118, 0.12);
  border-radius: 17px 32px 18px 28px;
  background:
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(181, 153, 182, 0.06) 38px 39px),
    rgba(255, 255, 255, 0.92);
}

.chart-card::before {
  content: "";
  position: absolute;
  z-index: 4;
  width: 82px;
  height: 23px;
  top: -8px;
  right: 64px;
  opacity: 0.58;
  background: color-mix(in srgb, var(--chart-color) 65%, white);
  clip-path: polygon(4% 10%, 100% 0, 95% 92%, 0 100%);
  transform: rotate(4deg);
}

.chart-card-head,
.chart-wrap,
.chart-card-foot {
  overflow: hidden;
}

.secondary-button {
  border-radius: 8px 13px 9px 12px;
  color: #745fc5;
  border-color: rgba(143, 122, 234, 0.22);
  background: #f0ebff;
}

.dialog-card {
  border-radius: 17px 30px 18px 26px;
  background:
    repeating-linear-gradient(0deg, transparent 0 37px, rgba(196, 157, 176, 0.06) 37px 38px),
    #fffdfb;
}

@media (max-width: 1000px) {
  .hero-copy {
    width: 55%;
    padding-left: 62px;
  }

  .hero-cast {
    left: 50%;
    transform: scale(0.88);
    transform-origin: right center;
  }

  .profile-dock {
    grid-template-columns: 1fr;
  }

  .profile-identity {
    padding-right: 0;
    padding-bottom: 20px;
    border-right: 0;
    border-bottom: 1px dashed rgba(93, 76, 101, 0.16);
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 76px;
  }

  .hero-paper {
    min-height: 690px;
    border-radius: 13px 28px 16px 24px;
  }

  .hero-paper::after {
    display: none;
  }

  .hero-copy {
    width: 100%;
    padding: 55px 27px 325px;
    text-align: center;
  }

  .hero-kicker {
    justify-content: center;
  }

  .hero-logo {
    width: 124px;
    margin-inline: auto;
  }

  .hero-copy h1 {
    font-size: clamp(40px, 13vw, 61px);
  }

  .hero-copy p {
    margin-inline: auto;
  }

  .hero-cast {
    inset: auto 0 10px;
    height: 345px;
    transform: none;
  }

  .hero-cast::before {
    width: 300px;
    height: 300px;
    top: 10px;
    right: 50%;
    transform: translateX(50%);
  }

  .hero-sticker--bella {
    width: 155px;
    height: 155px;
    top: 0;
    right: 16px;
  }

  .hero-sticker--diana {
    width: 162px;
    height: 162px;
    top: 68px;
    left: 12px;
  }

  .hero-sticker--eileen {
    width: 160px;
    height: 160px;
    right: 21%;
    bottom: 8px;
  }

  .hero-sticker span {
    display: none;
  }

  .hero-line {
    right: 28px;
    bottom: 16px;
    left: 28px;
  }

  .profile-dock {
    width: calc(100% - 24px);
    margin-top: -30px;
    padding: 26px 20px 36px;
  }

  .profile-dock .profile-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-dock .field--signature {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .brand-divider,
  .brand > span:last-child {
    display: none;
  }

  .header-tools {
    background: transparent;
    box-shadow: none;
  }

  .hero-copy {
    padding-inline: 19px;
  }

  .profile-identity {
    align-items: flex-start;
  }

  .profile-dock .profile-form {
    grid-template-columns: 1fr;
  }

  .profile-dock .field--signature {
    grid-column: auto;
  }
}

/* Node details, chart ordering and polished paper decorations */
.hero-tape {
  z-index: 1;
}

.hero-tape--left {
  top: 13px;
  left: 90px;
  width: 98px;
  height: 27px;
}

.hero-tape--right {
  right: 92px;
  bottom: 17px;
  width: 92px;
  height: 25px;
}

.profile-dock::before {
  top: -11px;
  left: 22%;
  width: 76px;
  height: 19px;
  opacity: 0.48;
}

.chart-card::before {
  z-index: 0;
  right: auto;
  left: 42px;
  width: 72px;
  opacity: 0.42;
  transform: rotate(-3deg);
}

.chart-card-head,
.chart-wrap,
.chart-card-foot {
  position: relative;
  z-index: 1;
}

.avatar-button [hidden] {
  display: none !important;
}

.avatar-sticker-grid .sticker-item.is-selected::after {
  content: "✓";
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  background: var(--coral);
  box-shadow: 0 3px 8px rgba(116, 69, 92, 0.22);
  font-size: 12px;
  font-weight: 950;
}

.chart-card-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chart-action--add {
  margin-right: 4px;
  color: #6f59be;
  background: #f0ebff;
}

.chart-action--add:hover {
  color: #5f49aa;
  background: #e8e0ff;
}

.chart-order {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(102, 82, 121, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.chart-action--icon {
  min-width: 29px;
  padding-inline: 7px;
}

.chart-action:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.chart-point.is-selected .point-halo {
  r: 14;
  stroke-width: 10;
}

.chart-point.is-selected .point-core {
  stroke-width: 5;
}

.chart-card-foot {
  align-items: center;
  min-height: 104px;
  padding-top: 18px;
}

.selected-node-detail {
  display: grid;
  flex: 1;
  gap: 9px;
  min-width: 0;
}

.selected-node-heading,
.selected-node-values {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
}

.selected-node-date {
  padding: 5px 9px;
  border-radius: 7px;
  color: #5e4ca9;
  background: #eee9ff;
  font-size: 12px;
  font-weight: 900;
}

.selected-node-values span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #827b88;
  font-size: 10px;
  font-weight: 700;
}

.selected-node-values i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--series-color);
}

.selected-node-values strong {
  color: #4e4856;
}

.selected-node-detail p {
  margin: 0;
  color: #5d5664;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .hero-tape--left {
    left: 44px;
  }

  .hero-tape--right {
    right: 30px;
  }

  .chart-card-actions {
    align-items: flex-end;
  }

  .chart-card-foot {
    align-items: stretch;
  }
}

/* Multi-series charts, joke card and sticker-avatar refinements */
.profile-dock {
  width: 100%;
  min-height: 190px;
  margin: 28px auto 0;
  padding-block: 27px 31px;
}

.profile-dock .avatar-button {
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.85), transparent 28%),
    linear-gradient(145deg, #ffdce5, #e3dcff);
}

.profile-dock .avatar-button img {
  padding: 3px;
  object-fit: contain;
}

.profile-dock .profile-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.joke-card {
  width: min(640px, 100%);
  margin-top: 19px;
  padding: 16px 18px 15px;
  border: 1px dashed rgba(143, 122, 234, 0.27);
  border-radius: 11px 19px 12px 17px;
  background:
    linear-gradient(110deg, rgba(255, 240, 245, 0.9), rgba(243, 239, 255, 0.92)),
    white;
  box-shadow: 0 9px 24px rgba(85, 60, 91, 0.07);
  transform: rotate(-0.25deg);
}

.joke-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.joke-card-head > span {
  color: #df5871;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.joke-card-head button,
.joke-reveal {
  border: 0;
  cursor: pointer;
  font-weight: 850;
}

.joke-card-head button {
  padding: 5px 8px;
  border-radius: 7px;
  color: #7864bf;
  background: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.joke-card #jokeQuestion {
  max-width: none;
  margin: 0 0 11px;
  color: #4e4757;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.65;
}

.joke-answer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 33px;
  padding: 5px 11px;
  border-radius: 8px;
  color: #5e4ca9;
  background: #fff;
  box-shadow: 0 4px 12px rgba(85, 60, 91, 0.07);
  font-size: 12px;
}

.joke-answer[hidden],
.joke-reveal[hidden] {
  display: none;
}

.joke-answer span {
  color: #9b91a2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.joke-reveal {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(120deg, #ff7b94, #8f77e3);
  font-size: 10px;
  box-shadow: 0 6px 14px rgba(130, 83, 142, 0.15);
}

.series-editor-section {
  margin-top: 23px;
  padding-top: 22px;
  border-top: 1px dashed rgba(77, 68, 92, 0.14);
}

.series-editor-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.series-editor-head > div {
  display: grid;
  gap: 4px;
}

.series-editor-head strong {
  font-size: 13px;
}

.series-editor-head span {
  color: var(--ink-soft);
  font-size: 10px;
}

.series-editor-head button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(143, 122, 234, 0.2);
  border-radius: 9px;
  color: #755fc6;
  background: #f0ebff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}

.series-editor-head button:disabled {
  color: #aaa4b1;
  border-color: var(--line);
  background: #f3f1f3;
  cursor: not-allowed;
}

.series-editor {
  display: grid;
  gap: 10px;
}

.series-editor-row {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) minmax(165px, 0.62fr) 34px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(76, 67, 92, 0.09);
  border-radius: 12px;
  background: rgba(255, 250, 248, 0.85);
}

.series-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  color: white;
  background: var(--series-row-color, #E799B0);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--series-row-color, #E799B0) 22%, transparent);
  font-size: 11px;
  font-weight: 900;
}

.series-remove {
  width: 34px;
  height: 44px;
  border: 0;
  border-radius: 9px;
  color: #b18e98;
  background: transparent;
  cursor: pointer;
  font-size: 19px;
}

.series-remove:hover {
  color: #d4475f;
  background: rgba(212, 71, 95, 0.08);
}

.node-series-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.node-series-field > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.node-series-field > span i,
.series-legend-item i,
.chart-range-summary i {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--series-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--series-color) 14%, transparent);
}

.series-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 10px;
}

.series-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #777181;
  font-size: 10px;
  font-weight: 700;
}

.chart-range-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 15px;
  padding: 15px 57px 0;
}

.chart-range-summary span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #756f7d;
  font-size: 10px;
  font-weight: 700;
}

.chart-range-summary small {
  margin-left: auto;
  color: #aaa3ad;
  font-size: 9px;
}

.chart-line {
  stroke: var(--chart-color);
}

.point-halo {
  fill: white;
  stroke: color-mix(in srgb, var(--chart-color) 22%, white);
}

.point-core {
  fill: var(--chart-color);
}

.node-hit-area {
  fill: transparent;
  pointer-events: all;
}

.avatar-dialog-copy {
  margin: -8px 0 18px;
  color: var(--ink-soft);
  font-size: 12px;
}

.avatar-sticker-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  max-height: min(430px, 48vh);
  padding: 10px 3px 3px;
}

@media (max-width: 900px) {
  .profile-dock {
    width: 100%;
    margin-top: 24px;
  }

  .profile-dock .profile-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .series-editor-row {
    grid-template-columns: 29px minmax(0, 1fr) 32px;
  }

  .series-color-field {
    grid-column: 2 / 3;
  }

  .series-remove {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
  }

  .node-series-fields {
    grid-template-columns: 1fr;
  }

  .chart-range-summary {
    padding-inline: 22px;
  }

  .chart-range-summary small {
    width: 100%;
    margin-left: 0;
  }

  .avatar-sticker-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .profile-dock .profile-form {
    grid-template-columns: 1fr;
  }

  .series-editor-head {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Long-term chart navigation and editable joke library */
#chartsTrackStart {
  scroll-margin-top: 24px;
}

.joke-card-actions {
  display: flex;
  gap: 6px;
}

.joke-card-actions #editJokesButton {
  color: #d94f6a;
  background: rgba(255, 255, 255, 0.86);
}

.joke-editor-copy {
  margin: -7px 0 18px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.75;
}

.joke-editor-list {
  display: grid;
  gap: 10px;
  max-height: min(470px, 54vh);
  padding: 3px 5px 3px 2px;
  overflow-y: auto;
}

.joke-editor-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1.3fr) minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(103, 82, 119, 0.1);
  border-radius: 12px;
  background: rgba(255, 250, 248, 0.82);
}

.joke-editor-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #ff7791, #8f7aea);
  font-size: 11px;
  font-weight: 900;
}

.joke-editor-row textarea {
  min-height: 66px;
  resize: vertical;
}

.joke-remove-row {
  width: 34px;
  height: 44px;
  border: 0;
  border-radius: 9px;
  color: #b18e98;
  background: transparent;
  cursor: pointer;
  font-size: 19px;
}

.joke-remove-row:hover {
  color: #d4475f;
  background: rgba(212, 71, 95, 0.08);
}

.joke-add-row {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 1px dashed rgba(143, 122, 234, 0.32);
  border-radius: 11px;
  color: #705bbb;
  background: #f5f1ff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.joke-editor-actions {
  flex-wrap: wrap;
}

.chart-card-head {
  align-items: flex-start;
  flex-wrap: wrap;
}

.chart-card-actions {
  max-width: 650px;
  margin-left: auto;
}

.chart-order {
  gap: 3px;
}

.chart-action--move {
  min-width: auto;
  padding-inline: 9px;
  color: #777181;
  font-size: 10px;
}

.chart-view-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 38px 0;
  padding: 8px 10px 8px 13px;
  border: 1px solid rgba(108, 87, 122, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.chart-view-tools > span {
  color: #7d7583;
  font-size: 10px;
  font-weight: 800;
}

.chart-view-tools > div {
  display: flex;
  gap: 5px;
}

.chart-view-tools button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(143, 122, 234, 0.16);
  border-radius: 8px;
  color: #6d5abb;
  background: #f4f0ff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}

.chart-view-tools button:hover:not(:disabled) {
  background: #eae3ff;
}

.chart-view-tools button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.chart-scroll {
  width: 100%;
  padding-bottom: 9px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-color: #b9a9ee #f1edf7;
  scrollbar-width: thin;
}

.chart-scroll::-webkit-scrollbar {
  height: 9px;
}

.chart-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #f1edf7;
}

.chart-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #f1edf7;
  border-radius: 999px;
  background: #b9a9ee;
}

.chart-scroll .chart-svg {
  max-width: none;
  height: auto;
}

.chart-card-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  min-height: 146px;
  padding: 22px 34px 25px;
  background: linear-gradient(100deg, rgba(248, 244, 255, 0.78), rgba(255, 248, 246, 0.72));
}

.selected-node-detail {
  gap: 12px;
}

.selected-node-heading {
  gap: 10px 18px;
}

.selected-node-date {
  padding: 7px 11px;
  font-size: 14px;
}

.selected-node-values span {
  font-size: 12px;
}

.selected-node-values strong {
  font-size: 14px;
}

.selected-node-detail p {
  min-height: 50px;
  padding: 12px 14px;
  border: 1px dashed rgba(117, 93, 131, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

@media (max-width: 850px) {
  .chart-card-actions {
    width: 100%;
    max-width: none;
  }

  .chart-order {
    flex-wrap: wrap;
  }

  .chart-card-foot {
    grid-template-columns: 1fr;
  }

  .joke-editor-row {
    grid-template-columns: 29px minmax(0, 1fr) 32px;
  }

  .joke-editor-row .field:nth-of-type(2) {
    grid-column: 2 / 3;
  }

  .joke-remove-row {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
  }
}

@media (max-width: 560px) {
  #chartsTrackStart {
    scroll-margin-top: 14px;
  }

  .joke-card-head {
    align-items: flex-start;
  }

  .joke-card-actions {
    flex-direction: column;
  }

  .chart-card-actions {
    align-items: stretch;
  }

  .chart-order,
  .chart-action--add {
    width: 100%;
  }

  .chart-order .chart-action {
    flex: 1;
  }

  .chart-view-tools {
    align-items: stretch;
    flex-direction: column;
    margin-inline: 14px;
  }

  .chart-view-tools > div {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .joke-editor-row {
    grid-template-columns: 26px minmax(0, 1fr) 30px;
    padding: 10px 8px;
  }

  .joke-editor-actions > button {
    flex: 1 1 42%;
  }
}

/* Chart-color-aware detail and management polish */
.chart-manage {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(91, 75, 103, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 12px rgba(68, 51, 76, 0.05);
}

.chart-manage .chart-action {
  min-height: 32px;
  border-radius: 8px;
}

.chart-action--settings {
  color: color-mix(in srgb, var(--chart-color) 72%, #474052);
  background: color-mix(in srgb, var(--chart-color) 10%, white);
}

.chart-action--settings:hover {
  color: color-mix(in srgb, var(--chart-color) 84%, #332c3d);
  background: color-mix(in srgb, var(--chart-color) 17%, white);
}

.chart-action--danger {
  color: #a66f7a;
}

.chart-action--danger:hover {
  color: #c83e57;
  background: #fff0f2;
}

.chart-view-tools {
  min-height: 58px;
  border-color: color-mix(in srgb, var(--chart-color) 18%, white);
  background:
    linear-gradient(105deg,
      color-mix(in srgb, var(--chart-color) 10%, white),
      color-mix(in srgb, var(--chart-color) 4%, white));
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--chart-color) 68%, white);
}

.chart-view-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-view-status > span:last-child {
  display: grid;
  gap: 2px;
}

.chart-view-status strong {
  color: color-mix(in srgb, var(--chart-color) 68%, #3d3746);
  font-size: 12px;
}

.chart-view-status small {
  color: #918897;
  font-size: 9px;
  font-weight: 700;
}

.chart-view-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--chart-color);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--chart-color) 24%, transparent);
  font-size: 17px;
  font-weight: 900;
}

.chart-view-tools button {
  border-color: color-mix(in srgb, var(--chart-color) 18%, white);
  color: color-mix(in srgb, var(--chart-color) 70%, #453e50);
  background: color-mix(in srgb, var(--chart-color) 9%, white);
}

.chart-view-tools button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--chart-color) 16%, white);
}

.chart-card-foot {
  border-top-color: color-mix(in srgb, var(--chart-color) 18%, white);
  background:
    radial-gradient(circle at 8% 18%, color-mix(in srgb, var(--chart-color) 12%, transparent), transparent 22%),
    linear-gradient(105deg,
      color-mix(in srgb, var(--chart-color) 9%, white),
      color-mix(in srgb, var(--chart-color) 3%, white));
  box-shadow: inset 5px 0 0 color-mix(in srgb, var(--chart-color) 74%, white);
}

.selected-node-date {
  color: color-mix(in srgb, var(--chart-color) 76%, #37313e);
  background: color-mix(in srgb, var(--chart-color) 15%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--chart-color) 12%, white);
}

.selected-node-detail p {
  border-color: color-mix(in srgb, var(--chart-color) 22%, white);
  background: color-mix(in srgb, var(--chart-color) 4%, white);
}

.chart-card-foot .secondary-button {
  color: color-mix(in srgb, var(--chart-color) 76%, #433b4b);
  border-color: color-mix(in srgb, var(--chart-color) 25%, white);
  background: color-mix(in srgb, var(--chart-color) 12%, white);
  box-shadow: 0 7px 18px color-mix(in srgb, var(--chart-color) 13%, transparent);
}

.chart-card-foot .secondary-button:hover {
  background: color-mix(in srgb, var(--chart-color) 18%, white);
}

@media (max-width: 560px) {
  .chart-manage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .chart-view-status {
    width: 100%;
  }
}

/* Final visual harmony pass */
.hero-sticker--diana span {
  color: #c92f62;
  border-color: #fff8fb;
  background: linear-gradient(135deg, #ffc4d7, #ffe0e9);
  box-shadow: 0 7px 16px rgba(210, 58, 104, 0.18);
  letter-spacing: 0.02em;
}

@media (min-width: 761px) {
  .hero-sticker--eileen {
    width: 196px;
    height: 196px;
    right: 16px;
    bottom: 43px;
  }

  .hero-line {
    right: 218px;
    bottom: 43px;
  }

  .hero-tape--right {
    right: 236px;
    bottom: 17px;
  }
}

.chart-card-actions {
  gap: 6px;
}

.chart-order,
.chart-manage {
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.chart-card-actions .chart-action {
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--chart-color) 28%, white);
  border-radius: 12px;
  color: color-mix(in srgb, var(--chart-color) 76%, #38313f);
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--chart-color) 14%, white),
      color-mix(in srgb, var(--chart-color) 8%, white));
  box-shadow: 0 5px 13px color-mix(in srgb, var(--chart-color) 14%, transparent);
  font-size: 10px;
  font-weight: 850;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.chart-card-actions .chart-action:hover:not(:disabled) {
  color: color-mix(in srgb, var(--chart-color) 86%, #29232f);
  border-color: color-mix(in srgb, var(--chart-color) 42%, white);
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--chart-color) 22%, white),
      color-mix(in srgb, var(--chart-color) 13%, white));
  box-shadow: 0 7px 16px color-mix(in srgb, var(--chart-color) 20%, transparent);
  transform: translateY(-1px);
}

.chart-card-actions .chart-action:disabled {
  color: color-mix(in srgb, var(--chart-color) 22%, #aaa5ad);
  border-color: color-mix(in srgb, var(--chart-color) 10%, white);
  background: color-mix(in srgb, var(--chart-color) 4%, white);
  box-shadow: none;
  opacity: 0.62;
}

.chart-card-actions .chart-action:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--chart-color) 24%, transparent);
  outline-offset: 2px;
}

.chart-card {
  border-color: color-mix(in srgb, var(--chart-color) 13%, white);
  box-shadow:
    0 18px 48px rgba(72, 56, 79, 0.08),
    0 7px 22px color-mix(in srgb, var(--chart-color) 7%, transparent);
}

.chart-card-head {
  padding-bottom: 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--chart-color) 10%, white);
  background: linear-gradient(105deg,
      color-mix(in srgb, var(--chart-color) 7%, white),
      rgba(255, 255, 255, 0.18) 64%);
}

.series-color-field {
  position: relative;
}

.series-color-field::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 13px;
  width: 10px;
  height: 10px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--series-row-color, #E799B0);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--series-row-color, #E799B0) 34%, white);
  pointer-events: none;
}

.series-color-field select {
  padding-left: 31px;
}

.chart-card-actions .chart-action span[aria-hidden="true"] {
  margin-right: 2px;
  font-size: 12px;
}

.selected-node-values strong {
  display: inline-flex;
  min-width: 32px;
  min-height: 29px;
  padding: 4px 9px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--chart-color) 16%, white);
  border-radius: 8px;
  color: color-mix(in srgb, var(--chart-color) 72%, #342e3b);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 13px color-mix(in srgb, var(--chart-color) 10%, transparent);
  font-size: 14px;
  font-weight: 950;
}

@media (max-width: 850px) {
  .chart-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-card-actions > .chart-action,
  .chart-order,
  .chart-manage {
    width: 100%;
  }

  .chart-order,
  .chart-manage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .chart-card-actions {
    grid-template-columns: 1fr;
  }
}

/* Weekly plan timeline, daily schedule and AI handoff */
.weekly-section {
  padding: 90px 0 10px;
}

.weekly-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.weekly-heading > div:first-child {
  max-width: 720px;
}

.weekly-heading .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 6px;
  color: #637256;
  background: #edf2da;
  letter-spacing: 0.08em;
  transform: rotate(-1deg);
}

.weekly-heading h2 {
  margin: 12px 0 7px;
  color: #252442;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 950;
  letter-spacing: -0.045em;
}

.weekly-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
}

.weekly-heading-actions,
.week-board-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.weekly-heading-actions .primary-button {
  border-radius: 9px 16px 10px 14px;
  background: linear-gradient(120deg, #576690, #8f7aea);
  box-shadow: 0 12px 24px rgba(87, 102, 144, 0.2);
}

.weekly-heading-actions .secondary-button {
  color: #5e5580;
  border-color: rgba(143, 122, 234, 0.2);
  background: #f4f1ff;
}

.weekly-planner {
  position: relative;
  padding: 26px;
  border: 1px solid rgba(77, 67, 92, 0.09);
  border-radius: 30px;
  background:
    repeating-linear-gradient(0deg, transparent 0 43px, rgba(96, 82, 116, 0.045) 43px 44px),
    rgba(255, 255, 255, 0.84);
  box-shadow: 0 24px 70px rgba(82, 58, 78, 0.09);
}

.weekly-planner::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 68px;
  width: 92px;
  height: 25px;
  opacity: 0.62;
  background: linear-gradient(90deg, #e8efc9, #cbdcbf);
  clip-path: polygon(3% 10%, 100% 0, 96% 95%, 0 100%);
  transform: rotate(-3deg);
}

.week-timeline-panel {
  padding: 17px 18px 13px;
  overflow: hidden;
  border: 1px solid rgba(87, 102, 144, 0.11);
  border-radius: 20px;
  background: rgba(249, 249, 254, 0.88);
}

.week-timeline-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #8a8594;
  font-size: 11px;
}

.week-timeline-caption strong {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  color: #5f5870;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(87, 102, 144, 0.1);
}

.week-timeline {
  position: relative;
  display: flex;
  gap: 8px;
  min-height: 84px;
  margin-top: 9px;
  padding: 4px 2px 2px;
  overflow-x: auto;
  scrollbar-color: rgba(87, 102, 144, 0.28) transparent;
}

.week-timeline::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 44px;
  right: 44px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(87, 102, 144, 0.23) 0 10px, transparent 10px 17px);
}

.week-node {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 144px;
  justify-items: center;
  gap: 3px;
  padding: 0 8px 8px;
  border: 0;
  border-radius: 15px;
  color: #777183;
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.week-node:hover,
.week-node.is-selected {
  color: #464054;
  background: rgba(255, 255, 255, 0.88);
}

.week-node:hover {
  transform: translateY(-2px);
}

.week-node-dot {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 2px;
  place-items: center;
  border: 1px solid rgba(87, 102, 144, 0.15);
  border-radius: 50%;
  background: white;
  box-shadow: 0 6px 14px rgba(71, 61, 86, 0.08);
}

.week-node-dot i {
  width: 12px;
  height: 12px;
  border: 3px solid #c9c0f4;
  border-radius: 50%;
  background: white;
}

.week-node.is-selected .week-node-dot {
  border-color: rgba(143, 122, 234, 0.35);
  box-shadow: 0 7px 18px rgba(116, 93, 190, 0.18);
}

.week-node.is-selected .week-node-dot i {
  border-color: #8f7aea;
  background: #8f7aea;
}

.week-node strong {
  font-size: 15px;
}

.week-node small {
  color: #9893a2;
  font-size: 10px;
  white-space: nowrap;
}

.week-empty {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 28px;
  border: 1px dashed rgba(143, 122, 234, 0.24);
  border-radius: 22px;
  background: linear-gradient(120deg, rgba(244, 241, 255, 0.8), rgba(255, 248, 244, 0.8));
}

.week-empty[hidden],
.week-detail[hidden] {
  display: none;
}

.week-empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #8f7aea;
  background: white;
  box-shadow: 0 10px 24px rgba(98, 78, 128, 0.1);
  font-size: 23px;
}

.week-empty h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.week-empty p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.week-detail {
  margin-top: 20px;
}

.week-board {
  overflow: hidden;
  border: 1px solid rgba(70, 61, 87, 0.09);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
}

.week-board-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 30px 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(231, 153, 176, 0.13), transparent 25%),
    linear-gradient(120deg, rgba(247, 244, 255, 0.88), rgba(255, 251, 247, 0.82));
}

.week-board-title {
  min-width: 0;
}

.week-board-date {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #685a96;
  background: #eee9ff;
  font-size: 11px;
  font-weight: 900;
}

.week-board-title h3 {
  margin: 10px 0 6px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.035em;
}

.week-board-title p {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.weekly-action {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(143, 122, 234, 0.2);
  border-radius: 12px;
  color: #675d87;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 7px 17px rgba(76, 61, 102, 0.07);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.weekly-action:hover {
  border-color: rgba(143, 122, 234, 0.38);
  background: white;
  transform: translateY(-1px);
}

.weekly-action--export {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg, #576690, #8f7aea);
}

.week-summary-strip {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid rgba(87, 102, 144, 0.08);
  border-bottom: 1px solid rgba(87, 102, 144, 0.08);
  background: #fbfafc;
}

.week-summary-strip > span {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 11px;
  color: #696474;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(65, 57, 77, 0.07);
}

.week-summary-strip strong {
  font-size: 17px;
}

.week-summary-strip small {
  font-size: 10px;
}

.week-summary-status--missed strong { color: #576690; }
.week-summary-status--okay strong { color: #ce7693; }
.week-summary-status--great strong { color: #c65f58; }

.week-summary-strip > p {
  flex: 1;
  align-self: center;
  margin: 0 0 0 8px;
  color: #87818e;
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

.week-days {
  display: grid;
}

.week-day-card {
  --day-color: #8f7aea;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  border-bottom: 1px solid rgba(72, 64, 86, 0.08);
  background: linear-gradient(90deg, color-mix(in srgb, var(--day-color) 5%, white), rgba(255, 255, 255, 0.96) 26%);
}

.week-day-card:last-child {
  border-bottom: 0;
}

.week-day-card--missed { --day-color: #576690; }
.week-day-card--okay { --day-color: #E799B0; }
.week-day-card--great { --day-color: #DB7D74; }

.week-day-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 10px;
  color: color-mix(in srgb, var(--day-color) 82%, #39323f);
  background: color-mix(in srgb, var(--day-color) 9%, white);
}

.week-day-rail span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.week-day-rail strong {
  margin-top: 2px;
  font-size: 24px;
  line-height: 1;
}

.week-day-rail i {
  flex: 1;
  width: 2px;
  min-height: 34px;
  margin-top: 12px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--day-color) 38%, white);
}

.week-day-content {
  min-width: 0;
  padding: 22px 24px 24px;
}

.week-day-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.week-day-date {
  color: color-mix(in srgb, var(--day-color) 78%, #3d3544);
  font-size: 12px;
  font-weight: 950;
}

.week-day-head h4 {
  margin: 4px 0 3px;
  font-size: 19px;
  letter-spacing: -0.025em;
}

.week-day-head small {
  color: #918b98;
  font-size: 10px;
}

.week-day-head-side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-day-head-side img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border: 3px solid white;
  border-radius: 50%;
  background: white;
  box-shadow: 0 6px 15px rgba(64, 55, 75, 0.12);
}

.week-day-status {
  padding: 6px 10px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--day-color) 78%, #3d3544);
  background: color-mix(in srgb, var(--day-color) 13%, white);
  font-size: 10px;
  font-weight: 950;
}

.week-day-head-side button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--day-color) 20%, white);
  border-radius: 10px;
  color: color-mix(in srgb, var(--day-color) 76%, #42394a);
  background: white;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.week-day-head-side button:hover {
  background: color-mix(in srgb, var(--day-color) 9%, white);
}

.week-day-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 17px;
}

.week-day-column {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(74, 65, 86, 0.07);
  border-radius: 15px;
}

.week-day-column--plan {
  background: #fffaf4;
}

.week-day-column--record {
  background: #f5fbf8;
}

.week-day-label,
.week-day-diet span,
.week-day-note span {
  display: block;
  margin-bottom: 9px;
  color: #807987;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.05em;
}

.week-day-items {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.week-day-items > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 5px 9px;
  border-radius: 9px;
  color: #625d69;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(64, 56, 74, 0.07);
  font-size: 11px;
}

.week-day-items b {
  color: #35313e;
  font-weight: 900;
}

.week-day-items i {
  color: #817b88;
  font-style: normal;
}

.week-day-empty-copy {
  margin: 0;
  color: #aaa5ae;
  font-size: 11px;
}

.week-day-diet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 13px;
  padding: 13px 15px;
  border: 1px dashed rgba(219, 125, 116, 0.17);
  border-radius: 14px;
  background: rgba(255, 250, 247, 0.78);
}

.week-day-diet span,
.week-day-note span {
  margin-bottom: 4px;
}

.week-day-diet p,
.week-day-note p {
  margin: 0;
  color: #68626f;
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.week-day-note {
  margin-top: 10px;
  padding: 12px 15px;
  border-left: 3px solid color-mix(in srgb, var(--day-color) 66%, white);
  border-radius: 4px 12px 12px 4px;
  background: color-mix(in srgb, var(--day-color) 6%, white);
}

.week-dialog-copy {
  margin: -10px 0 24px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

#weekDayDialog {
  width: min(980px, calc(100% - 30px));
}

.week-day-dialog-card {
  width: min(980px, calc(100vw - 30px));
}

.week-day-main-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.day-editor-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.day-editor-block {
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(67, 59, 80, 0.08);
  border-radius: 18px;
}

.day-editor-block--plan { background: #fff9f2; }
.day-editor-block--record { background: #f3faf7; }

.day-editor-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.day-editor-head > div {
  display: grid;
  gap: 3px;
}

.day-editor-head strong {
  font-size: 13px;
}

.day-editor-head span {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.day-editor-head button {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  color: #716587;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(81, 69, 96, 0.08);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

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

.day-pair-row {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.35fr) 28px;
  align-items: end;
  gap: 7px;
}

.day-pair-row .field {
  gap: 4px;
}

.day-pair-row .field > span {
  font-size: 9px;
}

.day-pair-row input {
  height: 38px;
  padding: 0 10px;
  font-size: 11px;
}

.day-pair-row > button {
  display: grid;
  width: 28px;
  height: 28px;
  margin-bottom: 5px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #a27c87;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.day-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.day-status-fieldset {
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.day-status-fieldset legend {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 900;
}

.day-status-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.day-status-option {
  cursor: pointer;
}

.day-status-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.day-status-option span {
  display: grid;
  min-height: 64px;
  align-content: center;
  gap: 3px;
  padding: 10px 13px;
  border: 1px solid rgba(70, 63, 82, 0.1);
  border-radius: 14px;
  color: #5d5765;
  background: #faf9fb;
  font-size: 12px;
  font-weight: 950;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.day-status-option small {
  color: #96909c;
  font-size: 9px;
  font-weight: 600;
}

.day-status-option input:focus-visible + span {
  outline: 3px solid rgba(143, 122, 234, 0.2);
  outline-offset: 2px;
}

.day-status-option input:checked + span {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(74, 59, 85, 0.09);
}

.day-status-option--missed input:checked + span {
  color: #445176;
  border-color: rgba(87, 102, 144, 0.32);
  background: #eef0f6;
}

.day-status-option--okay input:checked + span {
  color: #a95878;
  border-color: rgba(231, 153, 176, 0.42);
  background: #fff0f5;
}

.day-status-option--great input:checked + span {
  color: #a94f49;
  border-color: rgba(219, 125, 116, 0.42);
  background: #fff0ed;
}

.week-import-toolbar {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
  padding: 13px;
  border: 1px dashed rgba(143, 122, 234, 0.22);
  border-radius: 14px;
  background: #faf8ff;
}

.week-import-toolbar .secondary-button {
  min-height: 40px;
}

.week-import-toolbar span {
  min-width: 0;
  overflow: hidden;
  color: #8b8593;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-import-paste textarea {
  min-height: 220px;
  font-family: Consolas, "Microsoft YaHei UI", monospace;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 820px) {
  .weekly-heading,
  .week-board-head {
    align-items: stretch;
    flex-direction: column;
  }

  .weekly-heading-actions,
  .week-board-actions {
    justify-content: flex-start;
  }

  .week-summary-strip {
    flex-wrap: wrap;
  }

  .week-summary-strip > p {
    flex-basis: 100%;
    margin: 3px 0 0;
    text-align: left;
  }

  .day-editor-columns,
  .day-notes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .weekly-section {
    padding-top: 66px;
  }

  .weekly-planner {
    padding: 15px;
    border-radius: 22px;
  }

  .week-timeline-panel {
    padding-inline: 10px;
  }

  .week-empty {
    grid-template-columns: auto 1fr;
    padding: 20px;
  }

  .week-empty .secondary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .week-board-head {
    padding: 22px 20px 19px;
  }

  .week-day-card {
    grid-template-columns: 45px minmax(0, 1fr);
  }

  .week-day-content {
    padding: 18px 14px 20px;
  }

  .week-day-head,
  .week-day-head-side {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .week-day-head-side {
    justify-content: flex-end;
  }

  .week-day-columns,
  .week-day-diet,
  .week-day-main-fields,
  .day-status-options {
    grid-template-columns: 1fr;
  }

  .week-summary-strip > span {
    flex: 1 1 calc(50% - 8px);
  }

  .day-pair-row {
    grid-template-columns: 1fr 28px;
    padding-bottom: 9px;
    border-bottom: 1px dashed rgba(71, 62, 83, 0.09);
  }

  .day-pair-row .field:nth-child(2) {
    grid-column: 1;
  }

  .day-pair-row > button {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }

  .day-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .week-import-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Chart card finishing pass */
.chart-card::before {
  left: 48px;
  right: auto;
  top: -9px;
  z-index: 4;
  width: 84px;
  height: 22px;
  opacity: 0.7;
  pointer-events: none;
  filter: drop-shadow(0 4px 5px color-mix(in srgb, var(--chart-color) 12%, transparent));
  transform: rotate(-4deg);
}

.chart-card-head {
  position: relative;
  z-index: 2;
  overflow: visible;
}

.chart-card-title {
  min-width: 0;
  align-items: flex-start;
}

.chart-color-mark {
  display: none;
}

.chart-card h3 {
  margin-bottom: 7px;
  font-size: clamp(21px, 2vw, 25px);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.chart-meta {
  flex-wrap: wrap;
  gap: 5px;
}

.chart-meta > span[aria-hidden="true"] {
  display: none;
}

.chart-meta > span:not([aria-hidden="true"]) {
  display: inline-flex;
  min-height: 24px;
  padding: 4px 8px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--chart-color) 10%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--chart-color) 5%, white);
  line-height: 1;
}

.series-legend {
  gap: 6px;
  margin-top: 7px;
}

.series-legend-item {
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--series-color) 12%, white);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.chart-range-summary {
  gap: 8px 18px;
  padding-top: 17px;
}

.chart-range-summary span {
  font-size: 11px;
}

.chart-range-summary small {
  font-size: 10px;
  line-height: 1.45;
}

.chart-axis-name--series {
  font-size: 12px;
  font-weight: 850;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.chart-axis-series-name {
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 3px;
  paint-order: stroke;
}

.chart-axis-separator {
  fill: #b5aeba;
  stroke: none;
  font-weight: 700;
}

.chart-axis-text--multi {
  font-size: 9px;
  font-weight: 850;
}

.chart-view-tools {
  min-height: 72px;
  margin-top: 13px;
  padding: 11px 13px 11px 15px;
  border-radius: 14px;
}

.chart-view-icon {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  font-size: 19px;
}

.chart-view-status {
  gap: 12px;
}

.chart-view-status > span:last-child {
  gap: 4px;
}

.chart-view-status strong {
  font-size: 14px;
  letter-spacing: 0.01em;
}

.chart-view-status small {
  font-size: 11px;
  line-height: 1.25;
}

.chart-view-tools button {
  min-height: 36px;
  padding-inline: 12px;
  border-radius: 10px;
  font-size: 11px;
}

.hero-sticker--bella {
  --member-color: #DB7D74;
  --member-ink: #934a44;
}

.hero-sticker--diana {
  --member-color: #E799B0;
  --member-ink: #a74365;
}

.hero-sticker--eileen {
  --member-color: #576690;
  --member-ink: #435071;
}

.hero-sticker--bella span,
.hero-sticker--diana span,
.hero-sticker--eileen span {
  color: var(--member-ink);
  border-color: rgba(255, 255, 255, 0.94);
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--member-color) 28%, white),
      color-mix(in srgb, var(--member-color) 16%, white));
  box-shadow: 0 7px 16px color-mix(in srgb, var(--member-color) 22%, transparent);
}

.chart-card-actions .chart-action {
  min-height: 40px;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.01em;
}

.chart-card-actions .chart-action--add {
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--chart-color) 20%, white),
      color-mix(in srgb, var(--chart-color) 12%, white));
}

.chart-card-actions .chart-action--danger {
  border-style: dashed;
}

.chart-card-actions .chart-action--danger:hover:not(:disabled) {
  border-style: solid;
}

@media (max-width: 850px) {
  .chart-card-head {
    gap: 18px;
  }

  .chart-card-title,
  .chart-card-actions {
    width: 100%;
  }

  .chart-card-actions {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .chart-card-head {
    padding-inline: 17px;
  }

  .chart-card-title {
    gap: 10px;
  }

  .chart-color-mark {
    display: none;
  }

  .chart-meta > span:not([aria-hidden="true"]),
  .series-legend-item {
    font-size: 9px;
  }

  .chart-card-actions .chart-action {
    min-height: 42px;
  }

  .chart-card::before {
    left: 25px;
    width: 68px;
    height: 19px;
  }

  .chart-range-summary {
    padding-top: 14px;
  }

  .chart-view-tools {
    min-height: 0;
    margin-inline: 14px;
  }

  .chart-view-status strong {
    font-size: 13px;
  }

  .chart-view-status small {
    font-size: 10px;
  }
}

/* Empty states, avatar action and custom sticker polish */
.chart-empty .secondary-button {
  color: color-mix(in srgb, var(--chart-color) 78%, #39323f);
  border-color: color-mix(in srgb, var(--chart-color) 30%, white);
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--chart-color) 19%, white),
      color-mix(in srgb, var(--chart-color) 10%, white));
  box-shadow: 0 9px 20px color-mix(in srgb, var(--chart-color) 16%, transparent);
}

.chart-empty .secondary-button:hover {
  color: color-mix(in srgb, var(--chart-color) 88%, #29232f);
  border-color: color-mix(in srgb, var(--chart-color) 42%, white);
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--chart-color) 27%, white),
      color-mix(in srgb, var(--chart-color) 16%, white));
}

.chart-empty-line {
  border-bottom-color: color-mix(in srgb, var(--chart-color) 30%, white);
}

.empty-state {
  overflow: visible;
}

.empty-state::before {
  top: -10px;
  left: 46px;
  z-index: 3;
  width: 84px;
  height: 22px;
  opacity: 0.7;
  background: linear-gradient(90deg, #E799B0, #8f7aea);
  filter: drop-shadow(0 4px 5px rgba(112, 82, 142, 0.12));
  transform: rotate(-4deg);
}

.profile-dock .avatar-button {
  margin-bottom: 25px;
  overflow: visible;
}

.profile-dock .avatar-button img,
.profile-dock .avatar-placeholder {
  overflow: hidden;
  border-radius: 38px 38px 12px 12px;
}

.profile-dock .avatar-edit {
  inset: auto auto -24px 50%;
  min-width: max-content;
  padding: 5px 11px;
  border: 2px solid white;
  border-radius: 999px;
  color: #5f5368;
  background: #fff;
  box-shadow: 0 7px 16px rgba(72, 53, 78, 0.14);
  transform: translateX(-50%);
}

.profile-dock .avatar-button:hover .avatar-edit {
  color: #6b54bd;
  background: #f4efff;
}

@media (max-width: 520px) {
  .empty-state::before {
    left: 28px;
    width: 68px;
    height: 19px;
  }
}

/* Compact weekly navigation and direct day editing */
.week-timeline-copy {
  display: flex;
  align-items: center;
  gap: 9px;
}

.week-timeline-copy strong {
  padding: 5px 10px;
  border-radius: 999px;
  color: #5f5870;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(87, 102, 144, 0.1);
}

.week-timeline-controls,
.week-scroll-buttons {
  display: flex;
  align-items: center;
  gap: 7px;
}

.week-timeline-controls label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 6px 0 10px;
  border: 1px solid rgba(87, 102, 144, 0.1);
  border-radius: 10px;
  color: #8a8493;
  background: white;
  font-size: 10px;
  font-weight: 800;
}

.week-timeline-controls select {
  min-width: 86px;
  height: 28px;
  padding: 0 22px 0 4px;
  border: 0;
  outline: 0;
  color: #514a60;
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.week-scroll-buttons {
  gap: 4px;
  margin-left: 2px;
}

.week-scroll-buttons button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(87, 102, 144, 0.12);
  border-radius: 10px;
  color: #665d78;
  background: white;
  box-shadow: 0 5px 12px rgba(73, 62, 87, 0.05);
  cursor: pointer;
}

.week-scroll-buttons button:hover {
  color: #725fc1;
  border-color: rgba(143, 122, 234, 0.3);
  background: #f7f4ff;
}

.week-filter-empty {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 18px 0 0;
  color: #96909e;
  font-size: 12px;
  text-align: center;
}

.weekly-action--danger {
  color: #a85762;
  border-color: rgba(219, 125, 116, 0.2);
  background: #fff6f4;
}

.weekly-action--danger:hover {
  color: #98414c;
  border-color: rgba(219, 125, 116, 0.38);
  background: #ffefec;
}

.week-day-tabs {
  display: flex;
  gap: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(77, 68, 89, 0.08);
  background: #fcfbfd;
  scrollbar-color: rgba(143, 122, 234, 0.28) transparent;
  overscroll-behavior-inline: contain;
}

.week-day-tab {
  --day-color: #8f7aea;
  position: relative;
  display: grid;
  flex: 1 0 126px;
  min-width: 0;
  min-height: 84px;
  align-content: center;
  gap: 2px;
  padding: 10px 12px 12px;
  overflow: hidden;
  border: 1px solid rgba(74, 65, 86, 0.08);
  border-radius: 15px;
  color: #827c89;
  background: white;
  cursor: pointer;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.week-day-tab--missed { --day-color: #576690; }
.week-day-tab--okay { --day-color: #E799B0; }
.week-day-tab--great { --day-color: #DB7D74; }

.week-day-tab:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--day-color) 30%, white);
}

.week-day-tab.is-selected {
  color: color-mix(in srgb, var(--day-color) 80%, #342d3b);
  border-color: color-mix(in srgb, var(--day-color) 38%, white);
  background: color-mix(in srgb, var(--day-color) 8%, white);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--day-color) 13%, transparent);
}

.week-day-tab > span {
  color: color-mix(in srgb, var(--day-color) 78%, #51485b);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.week-day-tab strong {
  font-size: 16px;
  letter-spacing: 0.03em;
}

.week-day-tab small {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-day-tab i {
  position: absolute;
  right: 10px;
  bottom: 9px;
  width: 7px;
  height: 7px;
  border: 2px solid color-mix(in srgb, var(--day-color) 35%, white);
  border-radius: 50%;
  background: white;
}

.week-day-tab:not(.week-day-tab--pending) i {
  border-color: var(--day-color);
  background: var(--day-color);
}

.week-inline-day {
  --day-color: #8f7aea;
  padding: 24px 26px 20px;
  background:
    radial-gradient(circle at 96% 2%, color-mix(in srgb, var(--day-color) 9%, transparent), transparent 24%),
    linear-gradient(180deg, color-mix(in srgb, var(--day-color) 3%, white), white 36%);
}

.week-inline-day--missed { --day-color: #576690; }
.week-inline-day--okay { --day-color: #E799B0; }
.week-inline-day--great { --day-color: #DB7D74; }

.week-inline-day-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: end;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px dashed color-mix(in srgb, var(--day-color) 18%, white);
}

.week-inline-sticker {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed color-mix(in srgb, var(--day-color) 32%, white);
  border-radius: 20px;
  color: color-mix(in srgb, var(--day-color) 76%, #48404e);
  background: color-mix(in srgb, var(--day-color) 8%, white);
  cursor: pointer;
}

.week-inline-sticker img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

.week-inline-sticker span {
  margin-bottom: -9px;
  font-size: 22px;
}

.week-inline-sticker small {
  font-size: 9px;
  font-weight: 900;
}

.week-inline-basics {
  display: grid;
  grid-template-columns: minmax(132px, 0.72fr) minmax(210px, 1.5fr) minmax(150px, 0.82fr);
  gap: 9px;
}

.week-inline-basics label,
.week-paired-text label,
.week-inline-note {
  display: grid;
  gap: 6px;
}

.week-inline-basics label > span,
.week-paired-text label > span,
.week-inline-note > span {
  color: #777180;
  font-size: 10px;
  font-weight: 900;
}

.week-inline-basics input,
.week-pair-row input,
.week-paired-text textarea,
.week-inline-note textarea {
  width: 100%;
  border: 1px solid rgba(68, 59, 81, 0.1);
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.week-inline-basics input,
.week-pair-row input {
  height: 42px;
  padding: 0 11px;
  font-size: 11px;
}

.week-inline-basics input:focus,
.week-pair-row input:focus,
.week-paired-text textarea:focus,
.week-inline-note textarea:focus {
  border-color: color-mix(in srgb, var(--day-color) 48%, white);
  background: white;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--day-color) 10%, transparent);
}

.week-inline-status {
  display: flex;
  gap: 5px;
}

.week-inline-status button {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(74, 65, 86, 0.09);
  border-radius: 11px;
  color: #817b88;
  background: white;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.week-inline-status button:nth-child(1)[aria-pressed="true"] {
  color: #445176;
  border-color: rgba(87, 102, 144, 0.3);
  background: #eef0f6;
}

.week-inline-status button:nth-child(2)[aria-pressed="true"] {
  color: #a95878;
  border-color: rgba(231, 153, 176, 0.4);
  background: #fff0f5;
}

.week-inline-status button:nth-child(3)[aria-pressed="true"] {
  color: #a94f49;
  border-color: rgba(219, 125, 116, 0.4);
  background: #fff0ed;
}

.week-pair-table {
  margin-top: 19px;
  padding: 14px;
  border: 1px solid rgba(70, 62, 83, 0.08);
  border-radius: 17px;
  background: rgba(250, 249, 252, 0.78);
}

.week-pair-table-head,
.week-pair-row {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) minmax(0, 1fr) 31px;
  gap: 9px;
}

.week-pair-table-head {
  align-items: center;
  padding: 0 2px 9px;
  color: #6f6978;
  font-size: 11px;
}

.week-pair-table-head strong:first-of-type {
  color: #a06f52;
}

.week-pair-table-head strong:last-of-type {
  color: #3b826f;
}

.week-pair-rows {
  display: grid;
  gap: 8px;
}

.week-pair-row {
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(73, 64, 86, 0.07);
  border-radius: 13px;
  background: white;
}

.week-pair-number {
  color: color-mix(in srgb, var(--day-color) 70%, #77717e);
  font-size: 10px;
  font-weight: 950;
  text-align: center;
}

.week-pair-plan {
  display: grid;
  grid-template-columns: minmax(110px, 0.72fr) minmax(130px, 1fr);
  gap: 7px;
}

.week-pair-record {
  min-width: 0;
}

.week-pair-plan input {
  border-color: rgba(238, 157, 66, 0.16);
  background: #fffbf5;
}

.week-pair-record input {
  border-color: rgba(54, 165, 139, 0.16);
  background: #f7fcfa;
}

.week-pair-row > button {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #a26c74;
  background: #fff1f1;
  cursor: pointer;
}

.week-pair-row > button:hover {
  color: #8c4650;
  background: #ffe5e5;
}

.week-add-pair {
  min-height: 39px;
  margin: 10px 0 0 44px;
  padding: 0 13px;
  border: 1px dashed color-mix(in srgb, var(--day-color) 28%, white);
  border-radius: 11px;
  color: color-mix(in srgb, var(--day-color) 74%, #4c4354);
  background: color-mix(in srgb, var(--day-color) 5%, white);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.week-add-pair:hover {
  background: color-mix(in srgb, var(--day-color) 10%, white);
}

.week-paired-text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
  padding: 14px;
  border: 1px solid rgba(70, 62, 83, 0.08);
  border-radius: 17px;
  background: rgba(250, 249, 252, 0.72);
}

.week-paired-text label:first-child textarea {
  border-color: rgba(238, 157, 66, 0.16);
  background: #fffbf5;
}

.week-paired-text label:last-child textarea {
  border-color: rgba(54, 165, 139, 0.16);
  background: #f7fcfa;
}

.week-paired-text textarea,
.week-inline-note textarea {
  min-height: 92px;
  padding: 11px 12px;
  resize: vertical;
  font-size: 11px;
  line-height: 1.65;
}

.week-inline-note {
  margin-top: 14px;
}

.week-inline-note textarea {
  min-height: 76px;
  border-left: 3px solid color-mix(in srgb, var(--day-color) 48%, white);
  background: color-mix(in srgb, var(--day-color) 4%, white);
}

.week-inline-save-tip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin: 12px 2px 0;
  color: #99939f;
  font-size: 9px;
}

.week-inline-save-tip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #42b397;
  box-shadow: 0 0 0 4px rgba(54, 165, 139, 0.1);
}

@media (max-width: 920px) {
  .week-timeline-caption {
    align-items: stretch;
    flex-direction: column;
  }

  .week-timeline-controls {
    flex-wrap: wrap;
  }

  .week-inline-day-head {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .week-inline-sticker {
    width: 64px;
    height: 64px;
  }

  .week-inline-status {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .week-pair-table-head,
  .week-pair-row {
    grid-template-columns: 31px minmax(0, 1fr) minmax(0, 0.9fr) 31px;
  }

  .week-pair-plan {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .week-timeline-copy {
    align-items: flex-start;
    flex-direction: column;
  }

  .week-timeline-controls label {
    flex: 1 1 calc(50% - 6px);
  }

  .week-timeline-controls select {
    width: 100%;
  }

  .week-scroll-buttons {
    width: 100%;
  }

  .week-scroll-buttons button {
    flex: 1;
  }

  .week-day-tabs {
    padding-inline: 12px;
  }

  .week-day-tab {
    flex-basis: 112px;
  }

  .week-inline-day {
    padding: 19px 14px 16px;
  }

  .week-inline-day-head {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
  }

  .week-inline-sticker {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .week-inline-basics {
    grid-template-columns: 1fr;
  }

  .week-inline-status {
    justify-content: stretch;
  }

  .week-inline-status button {
    flex: 1;
    padding-inline: 5px;
  }

  .week-pair-table {
    padding: 10px;
  }

  .week-pair-table-head {
    display: none;
  }

  .week-pair-row {
    grid-template-columns: 28px minmax(0, 1fr) 29px;
  }

  .week-pair-plan,
  .week-pair-record {
    grid-column: 2;
  }

  .week-pair-number {
    grid-row: 1 / 3;
  }

  .week-pair-row > button {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .week-pair-plan::before,
  .week-pair-record::before {
    display: block;
    margin-bottom: 5px;
    font-size: 9px;
    font-weight: 900;
  }

  .week-pair-plan::before {
    content: "计划安排";
    color: #a06f52;
  }

  .week-pair-record::before {
    content: "实际完成";
    color: #3b826f;
  }

  .week-add-pair {
    width: 100%;
    margin-left: 0;
  }

  .week-paired-text {
    grid-template-columns: 1fr;
    padding: 11px;
  }
}

/* Final weekly card overrides (kept last so legacy planner rules cannot win). */
.week-day-tabs {
  gap: 10px;
  padding-block: 14px;
}

.week-day-tab {
  grid-template-columns: minmax(0, 1fr) 50px;
  grid-template-rows: 1fr;
  align-items: center;
  align-content: stretch;
  flex-basis: 142px;
  min-height: 96px;
  gap: 8px;
  padding: 11px 10px 11px 13px;
}

.week-day-tab > .week-day-tab-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
}

.week-day-tab-copy strong {
  font-size: 16px;
  line-height: 1.15;
}

.week-day-tab-copy small {
  color: color-mix(in srgb, var(--day-color) 74%, #655e6a);
  font-size: 10px;
  font-weight: 850;
}

.week-day-tab-copy em {
  width: max-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--day-color) 20%, white);
  border-radius: 999px;
  color: color-mix(in srgb, var(--day-color) 78%, #4e4654);
  background: color-mix(in srgb, var(--day-color) 9%, white);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-day-tab-copy em.is-empty {
  color: #aaa3b0;
  border-color: rgba(96, 85, 110, 0.08);
  background: #f8f6f9;
}

.week-day-tab-sticker,
.week-day-tab-add {
  grid-column: 2;
  grid-row: 1;
  width: 50px;
  height: 50px;
  border-radius: 15px;
}

.week-day-tab-sticker {
  padding: 2px;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px color-mix(in srgb, var(--day-color) 18%, transparent));
}

.week-day-tab-add {
  display: grid;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--day-color) 28%, white);
  color: color-mix(in srgb, var(--day-color) 68%, #77707e);
  background: color-mix(in srgb, var(--day-color) 6%, white);
  font-size: 19px;
  font-weight: 500;
}

.week-day-tab i {
  right: 8px;
  bottom: 7px;
}

.week-inline-day {
  padding-top: 17px;
}

.week-paired-text {
  margin-top: 0;
}

@media (max-width: 720px) {
  .week-day-tab {
    flex-basis: 132px;
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .week-day-tab-sticker,
  .week-day-tab-add {
    width: 44px;
    height: 44px;
  }
}
