:root {
  color-scheme: light;
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-soft: #f0f4f2;
  --ink: #1d2522;
  --muted: #68726e;
  --line: #dfe5e1;
  --accent: #2f6f62;
  --accent-dark: #204f46;
  --accent-soft: #e4f1ed;
  --warning: #9b6616;
  --warning-soft: #fff4dc;
  --danger: #aa3428;
  --danger-soft: #ffe9e6;
  --shadow: 0 16px 38px rgba(36, 44, 40, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(47, 111, 98, 0.08), transparent 30%),
    linear-gradient(180deg, #fbfcfb 0%, var(--bg) 420px);
  color: var(--ink);
  font-family:
    Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  letter-spacing: 0;
}

.hidden {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.app-shell {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.landing-shell {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 56px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand-mark span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.72fr);
  gap: 38px;
  align-items: center;
  min-height: calc(100vh - 236px);
  padding: 64px 0 34px;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 12px 0 18px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.04;
}

.hero-text {
  max-width: 660px;
  color: #4d5a55;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.large-button {
  min-height: 50px;
  padding: 0 20px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

.trust-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 7px 11px;
}

.product-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 16px;
}

.preview-toolbar {
  display: flex;
  gap: 7px;
  padding-bottom: 14px;
}

.preview-toolbar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cbd5d1;
}

.preview-block,
.preview-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 14px;
}

.preview-block p:last-child {
  margin-top: 8px;
  color: #34403b;
  line-height: 1.55;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.preview-grid strong,
.preview-grid span {
  display: block;
}

.preview-grid strong {
  margin-top: 8px;
  font-size: 18px;
}

.preview-grid span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.preview-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-bottom: 26px;
}

.feature-strip article {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
}

.feature-number {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.feature-strip h2 {
  margin: 12px 0 8px;
  font-size: 20px;
}

.feature-strip p {
  color: var(--muted);
  line-height: 1.6;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 22px;
}

.topbar h1,
h2,
p {
  margin: 0;
}

.topbar h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-actions,
.button-row,
.section-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.landing-nav .topbar-actions {
  margin-left: auto;
}

.active-nav {
  background: var(--accent);
  color: #ffffff;
}

.control-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-radius: 16px;
  padding: 22px;
}

.control-hero h2 {
  margin-top: 4px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.06;
}

.control-hero p:last-child {
  max-width: 640px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(320px, 1.14fr);
  gap: 18px;
  align-items: start;
}

.lower-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.settings-panel {
  border-color: rgba(223, 229, 225, 0.86);
  border-radius: 14px;
  padding: 18px;
}

.plan-tools {
  position: sticky;
  top: 18px;
}

.stacked-actions {
  align-items: stretch;
  flex-direction: column;
}

.focus-config-panel {
  box-shadow: none;
}

.focus-config-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #3e4b46;
  font-size: 14px;
  font-weight: 800;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.input-panel,
.today-section,
.tasks-section,
.calendar-section,
.settings-panel,
.control-hero,
.settings-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.input-panel {
  position: sticky;
  top: 20px;
  padding: 20px;
}

.main-panel {
  display: grid;
  gap: 20px;
}

.today-section,
.tasks-section {
  padding: 20px;
}

.panel-heading,
.section-title-row {
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.panel-heading h2,
.section-title-row h2 {
  margin-top: 3px;
  font-size: 24px;
  line-height: 1.2;
}

.panel-heading p,
.settings-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.key-pill,
.urgency {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.key-pill {
  color: var(--danger);
  background: var(--danger-soft);
}

.key-pill.ready {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.field-label {
  display: block;
  margin: 14px 0 7px;
  color: #34403b;
  font-size: 13px;
  font-weight: 800;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfdfc;
  color: var(--ink);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

textarea {
  min-height: 238px;
  resize: vertical;
  padding: 14px;
  line-height: 1.6;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(24, 110, 91, 0.14);
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 40px;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.ghost-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #2d3934;
}

.ghost-button:hover {
  background: var(--surface-soft);
}

.danger-button {
  border: 1px solid #f0bab4;
  background: #fff8f7;
  color: var(--danger);
}

.icon-button {
  width: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.wide {
  flex: 1;
}

.button-row {
  margin-top: 14px;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.quick-stats div {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfdfc;
  padding: 12px;
}

.quick-stats strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.quick-stats span {
  color: var(--muted);
  font-size: 12px;
}

.status-box,
.plan-summary,
.empty-state {
  border-radius: 10px;
  background: var(--surface-soft);
  color: #41504a;
  line-height: 1.6;
}

.status-box {
  padding: 12px;
  font-size: 14px;
}

.status-box.error {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-box.success {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.plan-summary {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
}

.plan-list {
  display: grid;
  gap: 12px;
  counter-reset: plan-step;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-item {
  counter-increment: plan-step;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 14px;
}

.plan-item::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  content: counter(plan-step);
  font-weight: 900;
}

.plan-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.45;
}

.plan-meta,
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.plan-meta {
  grid-column: 2;
  margin-top: 0;
}

.task-list {
  display: grid;
  gap: 16px;
}

.task-group {
  display: grid;
  gap: 10px;
}

.task-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.task-group-title h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.task-group-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-group-items {
  display: grid;
  gap: 10px;
}

.task-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
  background: #ffffff;
}

.task-card:has(.urgency.high) {
  border-color: #f1b9b3;
  background: linear-gradient(90deg, #fff8f7 0%, #ffffff 34%);
}

.task-card.done {
  opacity: 0.64;
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.task-subject {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}

.task-description {
  margin-top: 3px;
  font-weight: 850;
  line-height: 1.48;
}

.task-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.mini-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: #2d3934;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.mini-button:hover {
  background: var(--surface-soft);
}

.mini-button.delete {
  color: var(--danger);
}

.urgency.high {
  color: var(--danger);
  background: var(--danger-soft);
}

.urgency.medium {
  color: var(--warning);
  background: var(--warning-soft);
}

.urgency.low {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.task-steps,
.task-assumptions {
  margin: 0;
  padding-left: 18px;
  color: #4b5853;
  font-size: 14px;
  line-height: 1.58;
}

.empty-state {
  padding: 24px;
  text-align: center;
}

.settings-modal {
  width: min(560px, calc(100% - 28px));
  border: 0;
  padding: 0;
  background: transparent;
}

.settings-modal::backdrop {
  background: rgba(17, 24, 20, 0.42);
}

.settings-card {
  padding: 18px;
}

.settings-note {
  margin-top: 12px;
}

@media (max-width: 880px) {
  .app-shell,
  .landing-shell {
    padding: 16px;
  }

  .topbar,
  .workspace,
  .hero-section,
  .feature-strip,
  .task-card-header {
    grid-template-columns: 1fr;
  }

  .topbar,
  .landing-nav {
    align-items: center;
  }

  .workspace {
    display: grid;
  }

  .hero-section {
    min-height: auto;
    padding: 42px 0 24px;
  }

  .input-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .app-shell,
  .landing-shell {
    padding: 12px;
  }

  .topbar-actions,
  .hero-actions,
  .button-row,
  .section-title-row,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .primary-button,
  .ghost-button,
  .danger-button {
    width: 100%;
  }

  .topbar-actions .primary-button,
  .topbar-actions .ghost-button,
  .topbar-actions .danger-button {
    width: auto;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .task-actions,
  .plan-title {
    flex-direction: column;
  }
}

/* Focused study dashboard */
.app-shell {
  width: min(1180px, 100%);
  padding: 24px;
}

.topbar {
  padding-bottom: 18px;
}

.topbar h1 {
  font-size: clamp(25px, 3vw, 34px);
}

.quiet-action {
  color: var(--muted);
}

.workspace {
  display: block;
}

.main-panel {
  gap: 18px;
}

.home-page {
  gap: 18px;
}

.home-hero {
  border: 1px solid rgba(47, 111, 98, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(47, 111, 98, 0.09), transparent 48%),
    #ffffff;
  box-shadow: 0 24px 70px rgba(32, 79, 70, 0.1);
  padding: clamp(24px, 4vw, 44px);
}

.home-copy {
  display: grid;
  align-content: center;
  gap: 18px;
}

.home-copy h2 {
  max-width: 760px;
  color: #263832;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: 0;
}

.home-copy p:not(.eyebrow) {
  max-width: 720px;
  color: #4d5a55;
  font-size: 18px;
  line-height: 1.75;
}

.home-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-page-grid article {
  border: 1px solid rgba(217, 225, 221, 0.92);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(36, 44, 40, 0.045);
  padding: 18px;
}

.home-page-grid h3 {
  margin: 12px 0 8px;
  color: #31423b;
  font-size: 20px;
}

.home-page-grid p {
  color: var(--muted);
  line-height: 1.65;
}


.today-section {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border-color: rgba(47, 111, 98, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(47, 111, 98, 0.08), transparent 42%),
    #ffffff;
  box-shadow: 0 24px 70px rgba(32, 79, 70, 0.12);
  padding: clamp(22px, 3vw, 32px);
}

.today-section .section-title-row {
  align-items: flex-start;
  margin-bottom: 22px;
}

.today-section .section-title-row h2 {
  max-width: 680px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
}

.today-section .eyebrow {
  color: var(--accent-dark);
}

.support-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.74fr) minmax(0, 1.26fr);
  gap: 18px;
  align-items: start;
}

.input-panel,
.tasks-section {
  border-color: rgba(223, 229, 225, 0.86);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(36, 44, 40, 0.045);
  padding: 18px;
}

.tasks-section {
  box-shadow: none;
}

.tasks-section .section-title-row,
.input-panel .panel-heading {
  margin-bottom: 14px;
}

.tasks-section .section-title-row h2,
.input-panel .panel-heading h2 {
  font-size: 20px;
}

.input-panel textarea {
  min-height: 168px;
}

.quick-stats {
  gap: 8px;
  margin: 14px 0;
}

.quick-stats div {
  min-height: 68px;
  border-radius: 12px;
}

.quick-stats strong {
  font-size: 21px;
}

.plan-summary {
  max-width: 760px;
  margin-bottom: 20px;
  padding: 0;
  border-left: 0;
  background: transparent;
  color: #4d5a55;
  font-size: 17px;
}

.plan-list {
  gap: 14px;
}

.execution-flow {
  display: grid;
  gap: 16px;
}

.flow-message {
  width: fit-content;
  border-radius: 999px;
  background: rgba(228, 241, 237, 0.9);
  color: var(--accent-dark);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.session-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.session-progress span {
  border: 1px solid rgba(223, 229, 225, 0.88);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  padding: 6px 10px;
}

.now-card {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(47, 111, 98, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 18px 45px rgba(32, 79, 70, 0.1);
}

.now-header,
.now-footer,
.flow-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.flow-label {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.now-header span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.now-header > span {
  background: var(--accent);
  color: #ffffff;
}

.now-header > div span {
  min-height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 13px;
  box-shadow: none;
}

.now-header > div {
  display: grid;
  gap: 5px;
}

.focus-state {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.now-card h3 {
  max-width: 780px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.13;
}

.focus-meter {
  overflow: hidden;
  height: 9px;
  max-width: 560px;
  border-radius: 999px;
  background: rgba(223, 229, 225, 0.75);
}

.focus-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #72a99b);
}

.focus-instruction {
  max-width: 720px;
  color: #53615b;
  font-size: 16px;
  line-height: 1.62;
}

.focus-timer-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  max-width: 620px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.break-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(223, 229, 225, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 16px;
}

.break-card h3 {
  margin: 4px 0 6px;
  color: var(--accent-dark);
  font-size: 20px;
}

.break-card p:last-child {
  color: var(--muted);
  line-height: 1.55;
}

.now-reason {
  max-width: 760px;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

.now-reason strong {
  display: block;
  color: var(--accent-dark);
  font-size: 13px;
  margin-bottom: 5px;
}

.now-reason p {
  color: #4d5a55;
  line-height: 1.6;
}

.now-footer span {
  color: var(--muted);
  font-weight: 800;
}

.complete-card {
  background: #ffffff;
}

.complete-card p:last-child {
  color: var(--muted);
  line-height: 1.6;
}

.now-empty,
.next-empty {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  padding: 18px;
  line-height: 1.6;
}

.next-flow {
  display: grid;
  gap: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
  padding: 14px;
}

.flow-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.next-card {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(223, 229, 225, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 12px 14px;
}

.next-card strong {
  color: #35423d;
  line-height: 1.42;
}

.next-card span {
  color: var(--muted);
  font-size: 13px;
}

.later-flow {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.44);
  color: var(--muted);
  padding: 12px 14px;
}

.later-flow summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.later-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.later-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(223, 229, 225, 0.85);
  padding-top: 8px;
}

.later-list strong {
  color: #4a5752;
  font-size: 13px;
}

.later-list span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.calendar-section {
  border: 1px solid rgba(223, 229, 225, 0.86);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
  padding: 16px 18px;
}

.calendar-section .section-title-row {
  margin-bottom: 12px;
}

.calendar-section h2 {
  font-size: 20px;
}

.calendar-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.study-calendar {
  display: grid;
  gap: 12px;
}

.calendar-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-summary span {
  border-radius: 999px;
  background: rgba(240, 244, 242, 0.82);
  padding: 6px 10px;
}

.calendar-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(148px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.session-block {
  display: grid;
  gap: 5px;
  min-height: 92px;
  border: 1px solid rgba(223, 229, 225, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  padding: 11px;
}

.session-block strong {
  color: #3e4b46;
  font-size: 14px;
}

.session-block span {
  color: var(--muted);
  font-size: 12px;
}

.session-time {
  font-weight: 900;
}

.session-block.current {
  border-color: rgba(47, 111, 98, 0.28);
  background: var(--accent-soft);
}

.session-block.current strong,
.session-block.current .session-time {
  color: var(--accent-dark);
}

.session-block.done {
  opacity: 0.58;
}

.calendar-empty {
  border-radius: 12px;
  background: rgba(240, 244, 242, 0.76);
  color: var(--muted);
  padding: 14px;
  line-height: 1.55;
}

.plan-item {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(47, 111, 98, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 16px;
}

.plan-item::before {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(47, 111, 98, 0.18);
  font-size: 18px;
}

.plan-step-body {
  display: grid;
  gap: 9px;
}

.plan-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  color: var(--accent-dark);
  font-size: 18px;
  line-height: 1.4;
}

.plan-title strong {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 5px 11px;
  font-size: 13px;
  white-space: nowrap;
}

.plan-meta {
  grid-column: auto;
  margin-top: 0;
  line-height: 1.45;
}

.task-list {
  gap: 14px;
}

.task-group {
  gap: 8px;
}

.task-group-title h3 {
  color: #394640;
  font-size: 14px;
}

.task-group-items {
  gap: 8px;
}

.task-card {
  gap: 9px;
  border-radius: 12px;
  padding: 12px;
}

.task-card:has(.urgency.high) {
  border-color: rgba(170, 52, 40, 0.22);
  background: #fffafa;
}

.task-description {
  font-weight: 800;
}

.task-meta {
  gap: 7px;
  margin-top: 0;
  font-size: 12px;
}

.task-meta span:not(.urgency) {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.urgency {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 11px;
}

.mini-button {
  min-height: 30px;
  border-radius: 10px;
  color: #52615b;
  padding: 0 9px;
  font-size: 12px;
}

@media (max-width: 880px) {
  .support-grid {
    grid-template-columns: 1fr;
  }

  .control-grid,
  .lower-grid,
  .focus-config-grid {
    grid-template-columns: 1fr;
  }

  .control-hero {
    flex-direction: column;
  }

  .home-page-grid {
    grid-template-columns: 1fr;
  }

  .today-section {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .today-section .section-title-row h2 {
    font-size: 34px;
  }

  .plan-item,
  .plan-title {
    grid-template-columns: 1fr;
  }

  .now-header,
  .now-footer,
  .flow-section-title,
  .break-card,
  .later-list div {
    align-items: stretch;
    flex-direction: column;
  }

  .now-footer .primary-button {
    width: 100%;
  }
}

.input-mode-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(217, 225, 221, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  padding: 14px;
}

.input-mode-card h3 {
  margin: -4px 0 2px;
  color: #31423b;
  font-size: 16px;
}

.compact-form-grid,
.availability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.availability-panel {
  margin-top: 18px;
}

.calendar-page {
  display: grid;
  gap: 18px;
}

.calendar-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(217, 225, 221, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 22px;
}

.calendar-hero h2 {
  margin: 0;
  color: #263832;
  font-size: 34px;
  letter-spacing: 0;
}

.calendar-hero p:last-child,
.calendar-insight {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.calendar-insight {
  border-radius: 14px;
  background: rgba(240, 244, 242, 0.8);
  padding: 14px 16px;
}

.study-calendar {
  display: grid;
  gap: 14px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.calendar-day {
  min-width: 180px;
  border: 1px solid rgba(217, 225, 221, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.calendar-day-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(224, 230, 227, 0.9);
  padding: 12px;
}

.calendar-day-header strong {
  color: #31423b;
  font-size: 14px;
}

.calendar-day-header span,
.calendar-day-empty {
  color: var(--muted);
  font-size: 12px;
}

.calendar-day-body {
  display: grid;
  gap: 8px;
  min-height: 220px;
  padding: 10px;
}

.calendar-day-empty {
  align-self: start;
  border-radius: 10px;
  background: rgba(240, 244, 242, 0.72);
  padding: 10px;
  line-height: 1.5;
}

button.session-block {
  width: 100%;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.session-block {
  min-height: 116px;
  border-radius: 12px;
  background: #ffffff;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.session-block:hover {
  border-color: rgba(47, 111, 98, 0.28);
  box-shadow: 0 12px 24px rgba(38, 56, 50, 0.08);
  transform: translateY(-1px);
}

.session-block small {
  color: #7b8983;
  font-size: 11px;
  line-height: 1.45;
}

.session-dialog {
  width: min(620px, calc(100vw - 28px));
  border: 0;
  border-radius: 18px;
  background: #fbfcfb;
  color: #263832;
  box-shadow: 0 28px 80px rgba(25, 35, 31, 0.28);
  padding: 0;
}

.session-dialog::backdrop {
  background: rgba(20, 29, 26, 0.28);
  backdrop-filter: blur(3px);
}

.session-editor {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.session-linked-task {
  display: grid;
  gap: 4px;
  border-radius: 12px;
  background: rgba(240, 244, 242, 0.85);
  padding: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.session-linked-task strong {
  color: #31423b;
}

.session-linked-task small {
  color: #87948f;
}

.subject-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.subject-chip {
  border: 1px solid rgba(217, 225, 221, 0.96);
  border-radius: 999px;
  background: rgba(248, 250, 249, 0.9);
  color: #52615b;
  cursor: pointer;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.subject-chip:hover {
  border-color: rgba(47, 111, 98, 0.3);
  color: var(--accent-dark);
}

.onboarding-dialog {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  border-radius: 22px;
  background: #fbfcfb;
  color: #263832;
  box-shadow: 0 32px 90px rgba(24, 34, 30, 0.3);
  padding: 0;
}

.onboarding-dialog::backdrop {
  background: rgba(20, 29, 26, 0.34);
  backdrop-filter: blur(4px);
}

.onboarding-shell {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.onboarding-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  border-bottom: 1px solid rgba(224, 230, 227, 0.9);
  padding-bottom: 18px;
}

.onboarding-header h2 {
  margin: 0;
  color: #253730;
  font-size: 30px;
  letter-spacing: 0;
}

.onboarding-header p:last-child,
.onboarding-step p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.onboarding-step {
  display: grid;
  gap: 14px;
}

.onboarding-step h3 {
  margin: 0;
  color: #31423b;
  font-size: 22px;
}

.setup-badge {
  width: fit-content;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.subject-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.subject-option {
  border: 1px solid rgba(217, 225, 221, 0.96);
  border-radius: 999px;
  background: #ffffff;
  color: #4c5d56;
  cursor: pointer;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}

.subject-option.selected {
  border-color: rgba(47, 111, 98, 0.34);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(47, 111, 98, 0.14);
}

.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.time-range span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tutorial-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tutorial-cards article {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(217, 225, 221, 0.9);
  border-radius: 14px;
  background: #ffffff;
  padding: 14px;
}

.tutorial-cards strong {
  color: var(--accent-dark);
}

.tutorial-cards span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid rgba(224, 230, 227, 0.9);
  padding-top: 16px;
}

@media (max-width: 880px) {
  .compact-form-grid,
  .availability-grid {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .tutorial-cards,
  .onboarding-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .compact-form-grid,
  .availability-grid {
    grid-template-columns: 1fr;
  }

  .calendar-days {
    grid-template-columns: repeat(7, minmax(168px, 1fr));
  }

  .onboarding-header,
  .onboarding-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .onboarding-header h2 {
    font-size: 24px;
  }
}
