:root {
  --paper: #f5f2eb;
  --paper-deep: #ece7dc;
  --surface: rgba(255, 253, 248, 0.9);
  --surface-solid: #fffdf8;
  --ink: #1e2927;
  --ink-soft: #59635f;
  --ink-faint: #8a928e;
  --line: rgba(30, 41, 39, 0.11);
  --line-strong: rgba(30, 41, 39, 0.18);
  --study: #347f72;
  --study-soft: #e5f1ed;
  --study-deep: #173d3a;
  --work: #b66e37;
  --work-soft: #f6eadd;
  --work-deep: #73401e;
  --attention: #895441;
  --attention-soft: #f3e7e0;
  --shadow: 0 18px 46px rgba(45, 52, 48, 0.09);
  --shadow-soft: 0 8px 26px rgba(45, 52, 48, 0.06);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 2%, rgba(121, 184, 168, 0.16), transparent 25rem),
    radial-gradient(circle at 94% 18%, rgba(233, 168, 107, 0.14), transparent 23rem),
    linear-gradient(180deg, #f8f5ee 0%, var(--paper) 42%, #f1ede4 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button,
label,
select {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(52, 127, 114, 0.28);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  top: -18rem;
  left: -15rem;
  background: rgba(107, 172, 155, 0.14);
}

.ambient-two {
  top: 27rem;
  right: -23rem;
  background: rgba(226, 153, 91, 0.1);
}

.app-shell {
  width: min(100%, 900px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) 20px calc(118px + var(--safe-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--paper);
  background: var(--study-deep);
  border-radius: 9px;
  font-size: 16px;
  line-height: 1;
}

.brand-name {
  color: var(--study-deep);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.round-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.68);
  border: 1px solid rgba(30, 41, 39, 0.09);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(45, 52, 48, 0.04);
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.icon-button svg,
.round-button svg,
.add-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.subtle {
  background: transparent;
  box-shadow: none;
}

.hero {
  padding: 52px 2px 20px;
}

.eyebrow,
.section-kicker,
.sheet-kicker {
  margin: 0 0 9px;
  color: var(--study);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--study-deep);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: clamp(44px, 12vw, 68px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.week-range {
  margin: 13px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.review-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 16px;
  color: var(--study-deep);
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid rgba(23, 61, 58, 0.11);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.review-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.week-toolbar {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.week-label-button {
  min-height: 42px;
  padding: 0 14px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.week-label-button:hover {
  background: rgba(255, 253, 248, 0.55);
}

.overview {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  margin: 24px 0 0;
  padding: 17px 8px;
  background: rgba(255, 253, 248, 0.58);
  border: 1px solid rgba(30, 41, 39, 0.08);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.overview-item {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.overview-number {
  color: var(--study-deep);
  font-family: "Songti SC", "STSong", serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.overview-label {
  color: var(--ink-faint);
  font-size: 11px;
}

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

main {
  display: block;
}

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

.section-heading h2,
.sheet-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.section-count {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  place-items: center;
  color: var(--study-deep);
  background: var(--study-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.attention-section,
.unscheduled-section,
.week-section {
  margin-top: 34px;
}

.attention-section {
  padding: 20px;
  background: rgba(248, 239, 232, 0.76);
  border: 1px solid rgba(137, 84, 65, 0.12);
  border-radius: var(--radius-xl);
}

.attention-section .section-kicker {
  color: var(--attention);
}

.attention-section .section-heading h2 {
  font-size: 18px;
}

.attention-list,
.unscheduled-list {
  display: grid;
  gap: 10px;
}

.unscheduled-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.empty-inline {
  padding: 18px;
  color: var(--ink-faint);
  background: rgba(255, 253, 248, 0.48);
  border: 1px dashed rgba(30, 41, 39, 0.13);
  border-radius: var(--radius-md);
  font-size: 13px;
  text-align: center;
}

.week-board {
  display: grid;
  gap: 14px;
}

.day-card {
  position: relative;
  padding: 19px;
  background: var(--surface);
  border: 1px solid rgba(30, 41, 39, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 30px rgba(45, 52, 48, 0.035);
  overflow: hidden;
}

.day-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle at top right, rgba(121, 184, 168, 0.08), transparent 68%);
  content: "";
  pointer-events: none;
}

.day-card.is-today {
  border-color: rgba(52, 127, 114, 0.33);
  box-shadow: 0 14px 36px rgba(42, 101, 90, 0.1);
}

.day-card.is-past {
  background: rgba(255, 253, 248, 0.62);
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.day-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-tile {
  display: grid;
  width: 44px;
  height: 48px;
  place-content: center;
  color: var(--study-deep);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: center;
}

.is-today .date-tile {
  color: var(--paper);
  background: var(--study-deep);
  border-color: var(--study-deep);
}

.date-tile .date-number {
  font-family: "Songti SC", "STSong", serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.date-tile .date-month {
  margin-top: 3px;
  color: currentColor;
  font-size: 8px;
  font-weight: 650;
  opacity: 0.7;
}

.day-name {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.day-subline {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.today-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  color: var(--study);
  background: var(--study-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.day-due {
  display: grid;
  gap: 7px;
  padding: 11px 0 0;
}

.due-line {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  color: var(--work-deep);
  background: rgba(246, 234, 221, 0.74);
  border: 0;
  border-radius: 10px;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.due-line::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--work);
  border-radius: 50%;
  content: "";
}

.due-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slots {
  display: grid;
  gap: 2px;
  padding-top: 9px;
}

.slot {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 48px;
  padding: 7px 0;
}

.slot + .slot {
  border-top: 1px dashed rgba(30, 41, 39, 0.08);
}

.slot-label-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
}

.slot-label {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 600;
}

.slot-add {
  display: inline-grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  color: var(--ink-faint);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.slot-add svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.slot-add:hover {
  color: var(--study);
  background: var(--study-soft);
}

.slot-tasks {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.slot-empty {
  display: flex;
  align-items: center;
  min-height: 34px;
  color: rgba(89, 99, 95, 0.42);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.task-card {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 12px 13px 12px 11px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 13px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.task-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(45, 52, 48, 0.06);
}

.task-card.study {
  border-left-color: var(--study);
}

.task-card.work {
  border-left-color: var(--work);
}

.task-card.is-rescheduled {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.4), transparent 30%),
    repeating-linear-gradient(
      -45deg,
      rgba(137, 84, 65, 0.035) 0,
      rgba(137, 84, 65, 0.035) 7px,
      transparent 7px,
      transparent 14px
    ),
    var(--surface-solid);
  border-style: dashed;
  border-left-style: solid;
  border-color: rgba(137, 84, 65, 0.24);
}

.task-card.compact {
  padding-top: 11px;
  padding-bottom: 11px;
}

.complete-button {
  display: inline-grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  color: transparent;
  background: transparent;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
}

.complete-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.complete-button:hover {
  color: var(--surface-solid);
  background: var(--study);
  border-color: var(--study);
}

.task-content {
  min-width: 0;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.type-label,
.source-label,
.rescheduled-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.type-label.study {
  color: var(--study);
}

.type-label.work {
  color: var(--work);
}

.type-label::before {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.source-label {
  max-width: 145px;
  padding: 2px 7px;
  overflow: hidden;
  color: var(--ink-faint);
  background: rgba(30, 41, 39, 0.045);
  border-radius: 999px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rescheduled-label {
  padding: 2px 7px;
  color: var(--attention);
  background: var(--attention-soft);
  border-radius: 999px;
}

.rescheduled-label svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-title {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.task-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.4;
}

.task-deadline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.task-deadline svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-deadline.is-overdue {
  color: var(--attention);
  font-weight: 650;
}

.task-deadline.is-exam {
  color: var(--work-deep);
  font-weight: 650;
}

.task-conflict {
  color: var(--attention);
  font-weight: 650;
}

.attention-list .task-card,
.unscheduled-list .task-card {
  background: rgba(255, 253, 248, 0.8);
}

.app-footer {
  padding: 40px 0 0;
  color: var(--ink-faint);
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-align: center;
}

.add-button {
  position: fixed;
  right: max(20px, calc((100vw - 900px) / 2 + 20px));
  bottom: calc(20px + var(--safe-bottom));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 0 21px 0 17px;
  color: var(--paper);
  background: var(--study-deep);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(23, 61, 58, 0.28);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.add-button svg {
  width: 20px;
  height: 20px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(21, 30, 28, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 180ms ease-out;
}

.sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  width: min(100%, 720px);
  max-height: min(91vh, 900px);
  margin: 0 auto;
  padding: 12px 22px calc(24px + var(--safe-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface-solid);
  border-radius: 30px 30px 0 0;
  box-shadow: 0 -18px 60px rgba(21, 30, 28, 0.17);
  animation: sheet-up 250ms cubic-bezier(0.2, 0.84, 0.32, 1);
}

.sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 17px;
  background: rgba(30, 41, 39, 0.14);
  border-radius: 99px;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.sheet-header .sheet-kicker {
  margin-bottom: 5px;
}

.sheet-intro {
  margin: -8px 0 20px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.field-group {
  min-width: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.field-group legend,
.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.field-label small {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 500;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: var(--paper);
  border-radius: 14px;
}

.segment {
  cursor: pointer;
}

.segment input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segment span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  color: var(--ink-faint);
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 650;
  transition: 160ms ease;
}

.segment i {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
}

.segment-study input:checked + span {
  color: var(--study-deep);
  background: var(--study-soft);
  border-color: rgba(52, 127, 114, 0.12);
}

.segment-work input:checked + span {
  color: var(--work-deep);
  background: var(--work-soft);
  border-color: rgba(182, 110, 55, 0.12);
}

.field {
  display: block;
  margin: 0 0 17px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #faf8f3;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  font-size: 15px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.field select {
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%),
    linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 21px,
    calc(100% - 13px) 21px;
  background-repeat: no-repeat;
  background-size: 5px 5px;
}

.field textarea {
  min-height: 88px;
  padding-top: 13px;
  padding-bottom: 13px;
  line-height: 1.55;
  resize: vertical;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  background: #fff;
  border-color: rgba(52, 127, 114, 0.42);
  box-shadow: 0 0 0 4px rgba(52, 127, 114, 0.08);
}

.field.compact {
  margin-bottom: 0;
}

.two-column-fields {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 10px;
}

.form-block {
  margin: 0 0 18px;
  padding: 16px;
  background: rgba(245, 242, 235, 0.68);
  border: 1px solid rgba(30, 41, 39, 0.07);
  border-radius: var(--radius-md);
}

.form-block-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.form-block-heading .field-label {
  margin-bottom: 3px;
}

.form-block-heading p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.switch-control {
  display: inline-flex;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  display: block;
  width: 44px;
  height: 26px;
  background: rgba(30, 41, 39, 0.15);
  border-radius: 999px;
  transition: background 160ms ease;
}

.switch-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(30, 41, 39, 0.15);
  transition: transform 160ms ease;
}

.switch-control input:checked + .switch-track {
  background: var(--study);
}

.switch-control input:checked + .switch-track span {
  transform: translateX(18px);
}

.deadline-fields {
  padding-top: 2px;
}

.plan-conflict {
  margin: 10px 0 0;
  color: var(--attention);
  font-size: 10px;
  line-height: 1.5;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 13px;
  padding: 11px;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.check-row input {
  position: absolute;
  opacity: 0;
}

.check-box {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 1px;
  place-items: center;
  color: transparent;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
}

.check-box svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check-row input:checked + .check-box {
  color: #fff;
  background: var(--work);
  border-color: var(--work);
}

.check-row strong,
.check-row small {
  display: block;
}

.check-row strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.check-row small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.45;
}

.text-button {
  padding: 4px 0;
  color: var(--study);
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.form-error {
  margin: -3px 0 14px;
  padding: 10px 12px;
  color: #8a443b;
  background: #f7ebe7;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  flex: 1;
  color: var(--paper);
  background: var(--study-deep);
  border: 1px solid var(--study-deep);
  box-shadow: 0 8px 18px rgba(23, 61, 58, 0.16);
}

.primary-button:hover {
  background: #204d49;
}

.secondary-button {
  color: var(--study-deep);
  background: var(--study-soft);
  border: 1px solid rgba(52, 127, 114, 0.12);
}

.danger-button {
  color: #8a443b;
  background: #f8ece8;
  border: 1px solid rgba(138, 68, 59, 0.1);
}

.full-width {
  width: 100%;
}

.settings-card + .settings-card {
  margin-top: 12px;
}

.settings-card {
  padding: 17px;
  background: #faf8f3;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.settings-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-row strong {
  display: block;
  font-size: 14px;
}

.settings-row p {
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.45;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 5px;
  background: var(--ink-faint);
  border-radius: 50%;
}

.status-dot.is-on {
  background: var(--study);
  box-shadow: 0 0 0 5px rgba(52, 127, 114, 0.1);
}

.status-dot.is-warning {
  background: var(--work);
  box-shadow: 0 0 0 5px rgba(182, 110, 55, 0.09);
}

.settings-note {
  margin: 14px 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.settings-card .primary-button,
.settings-card .secondary-button {
  margin-top: 4px;
}

.settings-card .secondary-button {
  margin-top: 8px;
}

.install-card strong {
  font-size: 13px;
}

.install-card ol {
  margin: 11px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
}

.settings-version {
  margin: 20px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: center;
}

.history-list,
.review-list {
  display: grid;
  gap: 10px;
}

.history-group + .history-group {
  margin-top: 10px;
}

.history-group-title {
  margin: 4px 0 8px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.05em;
}

.history-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  background: #faf8f3;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.history-item h3 {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.history-time {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-size: 9px;
  white-space: nowrap;
}

.review-item {
  padding: 15px;
  background: #faf8f3;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.review-item-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.review-symbol {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--study);
  background: var(--study-soft);
  border-radius: 9px;
}

.review-symbol.work {
  color: var(--work);
  background: var(--work-soft);
}

.review-symbol svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.review-item h3 {
  margin: 1px 0 4px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.review-item p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.45;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.review-action {
  min-height: 34px;
  padding: 0 11px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.review-action.is-primary {
  color: var(--study-deep);
  background: var(--study-soft);
  border-color: rgba(52, 127, 114, 0.14);
}

.review-action.is-danger {
  margin-left: auto;
  color: var(--attention);
  background: transparent;
}

.empty-sheet {
  padding: 38px 18px;
  color: var(--ink-faint);
  background: #faf8f3;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: 22px;
  place-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(121, 184, 168, 0.18), transparent 28rem),
    var(--paper);
}

.auth-card {
  width: min(100%, 390px);
  padding: 28px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.brand.large {
  margin-bottom: 34px;
}

.auth-card h2 {
  margin: 0;
  color: var(--study-deep);
  font-family: "Songti SC", "STSong", serif;
  font-size: 32px;
}

.auth-card > p:not(.sheet-kicker) {
  margin: 10px 0 24px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: calc(88px + var(--safe-bottom));
  left: 20px;
  z-index: 120;
  width: fit-content;
  max-width: calc(100% - 40px);
  margin: 0 auto;
  padding: 11px 16px;
  color: var(--paper);
  background: rgba(23, 61, 58, 0.94);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  animation: toast-in 220ms ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(38px);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (min-width: 720px) {
  .app-shell {
    padding-right: 32px;
    padding-left: 32px;
  }

  .week-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .day-card:last-child {
    grid-column: 1 / -1;
  }

  .segmented-control {
    width: 320px;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero {
    padding-top: 40px;
  }

  .hero-heading {
    align-items: center;
  }

  .review-button {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .review-button span {
    display: none;
  }

  .unscheduled-list {
    grid-template-columns: 1fr;
  }

  .day-card {
    padding: 17px 15px;
    border-radius: 25px;
  }

  .slot {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 5px;
  }

  .attention-section {
    padding: 18px 15px;
  }

  .form-actions {
    flex-wrap: wrap;
  }

  .form-actions .primary-button {
    flex-basis: 100%;
    order: -1;
  }

  .sheet {
    padding-right: 17px;
    padding-left: 17px;
  }
}

@media (max-width: 380px) {
  .overview {
    padding-right: 2px;
    padding-left: 2px;
  }

  .overview-item {
    flex-direction: column;
    gap: 2px;
  }

  .overview-number {
    font-size: 22px;
  }

  .day-card {
    padding-right: 13px;
    padding-left: 13px;
  }

  .slot {
    grid-template-columns: 42px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
