:root {
  --ink: #14201d;
  --ink-soft: #24332e;
  --muted: #68766f;
  --paper: #f6f8f3;
  --paper-deep: #e9eee6;
  --white: #ffffff;
  --line: rgba(20, 32, 29, 0.14);
  --line-strong: rgba(20, 32, 29, 0.24);
  --lime: #d8f36b;
  --coral: #ed7b62;
  --sky: #d8e9ef;
  --mint: #dff1e7;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", "Noto Sans SC", sans-serif;
  --chinese: "Noto Sans SC", "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--chinese);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.app-shell {
  overflow: hidden;
}

.page-wrap {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 243, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.brand-copy strong {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--coral);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

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

.local-status,
.panel-caption,
.section-note,
.meta-label,
.kicker,
.panel-number,
.utility-icon,
.strip-index,
.note-footer,
.number-label {
  font-family: var(--mono);
  letter-spacing: 0;
}

.local-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.live-dot,
.status-pip {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4eb47c;
  box-shadow: 0 0 0 4px rgba(78, 180, 124, 0.14);
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.icon-button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--lime);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
}

.workspace-hero {
  padding: 76px 0 58px;
  background: var(--ink);
  color: #fff;
}

.workspace-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  gap: 45px;
  align-items: end;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--coral);
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
}

.kicker-light {
  color: var(--lime);
}

.workspace-intro h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(40px, 4.8vw, 64px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.hero-copy {
  max-width: 530px;
  margin: 23px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  line-height: 1.85;
}

.hero-clock {
  display: grid;
  justify-items: end;
  padding-bottom: 4px;
  text-align: right;
}

.meta-label {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  text-transform: uppercase;
}

.hero-clock strong {
  margin: 9px 0 4px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
}

.hero-clock > span:last-child {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.today-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, 0.75fr) 150px;
  min-height: 148px;
  margin-top: 62px;
  border: 1px solid rgba(255, 255, 255, 0.21);
}

.strip-copy,
.strip-stat {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 28px;
}

.strip-index {
  color: var(--coral);
  font-size: 11px;
}

.strip-copy strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

.strip-copy p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.65;
}

.morning-image {
  min-height: 148px;
  border-right: 1px solid rgba(255, 255, 255, 0.21);
  border-left: 1px solid rgba(255, 255, 255, 0.21);
  background-image: url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1200&q=84");
  background-position: center;
  background-size: cover;
}

.strip-stat {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 6px;
  text-align: right;
}

.strip-stat strong {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
}

.strip-stat span {
  color: rgba(255, 255, 255, 0.59);
  font-size: 11px;
}

.dashboard-section,
.tools-section {
  padding: 92px 0 100px;
}

.section-topline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.section-topline .kicker {
  margin-bottom: 16px;
}

.section-topline h2,
.note-panel h2 {
  margin: 0;
  font-size: clamp(30px, 3.5vw, 47px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-note {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.9fr;
  gap: 16px;
  margin-top: 46px;
}

.tool-panel,
.utility-card,
.note-panel,
.quote-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tool-panel {
  min-height: 420px;
  padding: 27px 27px 24px;
  background: var(--white);
}

.focus-panel {
  background: var(--mint);
}

.habit-panel {
  background: #fffdf8;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-number {
  color: var(--coral);
  font-size: 10px;
}

.panel-header h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.panel-caption {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
}

.progress-track {
  height: 5px;
  margin: 22px 0 17px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--paper-deep);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transition: width 220ms ease;
}

.task-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.task-form input,
.converter-row input,
.converter-row output,
.converter-row select,
.countdown-control input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

.task-form input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  font-size: 12px;
}

.task-form input:focus,
.converter-row input:focus,
.converter-row select:focus,
.countdown-control input:focus,
textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 32, 29, 0.08);
}

.add-button {
  width: 40px;
  min-width: 40px;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--lime);
}

.add-button:hover {
  background: var(--coral);
  color: #fff;
}

.task-list,
.habit-list,
.quick-links {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-row,
.habit-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}

.task-row.is-done .task-title {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--coral);
}

.check-control,
.habit-check {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
}

.check-control:hover,
.habit-check:hover {
  border-color: var(--coral);
}

.check-control.is-done,
.habit-check.is-done {
  border-color: var(--coral);
  background: var(--coral);
  color: #fff;
}

.task-title,
.habit-title {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delete-task {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 16px;
}

.delete-task:hover {
  color: var(--coral);
}

.empty-state {
  padding: 18px 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.ghost-button:hover {
  color: var(--ink);
}

.timer-area {
  display: grid;
  justify-items: center;
  padding-top: 28px;
  text-align: center;
}

.timer-ring {
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--coral) var(--timer-progress), rgba(20, 32, 29, 0.11) 0deg);
}

.timer-inner {
  display: grid;
  width: 164px;
  height: 164px;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: var(--mint);
}

.timer-inner strong {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
}

.timer-inner span {
  margin-top: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

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

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-dark {
  background: var(--ink);
  color: #fff;
}

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

.timer-hint {
  max-width: 240px;
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.habit-list {
  margin-top: 24px;
}

.habit-row {
  grid-template-columns: 26px minmax(0, 1fr);
  min-height: 50px;
  background: rgba(246, 248, 243, 0.84);
}

.habit-row.is-done .habit-title {
  color: var(--muted);
}

.habit-title {
  white-space: normal;
}

.panel-footnote {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.notes-section {
  padding: 84px 0;
  background: var(--paper-deep);
}

.notes-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.85fr);
  gap: 16px;
}

.note-panel {
  padding: 30px;
  background: var(--white);
}

.compact-topline {
  align-items: start;
}

.note-panel textarea {
  display: block;
  width: 100%;
  min-height: 155px;
  margin-top: 32px;
  padding: 16px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.8;
  outline: none;
}

.note-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 9px;
}

.quote-panel {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  background: var(--ink);
  color: #fff;
}

.quote-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
}

.icon-button-dark {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--lime);
}

.icon-button-dark:hover {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}

.quote-panel h2 {
  max-width: 390px;
  margin: 40px 0 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
}

.quote-panel p {
  max-width: 360px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.8;
}

.tools-section {
  background: var(--white);
}

.utilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 45px;
}

.utility-card {
  min-height: 300px;
  padding: 25px;
  background: var(--paper);
}

.utility-heading {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.utility-icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 5px;
  background: var(--sky);
  color: var(--ink);
  font-size: 12px;
}

.utility-card:nth-child(2) .utility-icon {
  background: var(--lime);
}

.utility-card:nth-child(3) .utility-icon {
  background: var(--coral);
  color: #fff;
}

.utility-heading h3 {
  margin: 0;
  font-size: 17px;
}

.utility-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.countdown-control {
  display: flex;
  gap: 8px;
  margin-top: 29px;
}

.countdown-control input {
  width: 100%;
  min-height: 40px;
  padding: 0 9px;
  color: var(--ink);
  font-size: 12px;
}

.countdown-result {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 28px 0 0;
}

.countdown-result strong {
  color: var(--coral);
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
}

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

.converter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 8px;
  margin-top: 25px;
}

.converter-row input,
.converter-row output,
.converter-row select {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
}

.converter-row output {
  background: var(--white);
}

.converter-arrow {
  margin: 8px 0 -11px;
  color: var(--coral);
  font-family: var(--mono);
  font-size: 14px;
  text-align: center;
}

.quick-links {
  margin-top: 24px;
}

.quick-links li {
  border-top: 1px solid var(--line);
}

.quick-links li:last-child {
  border-bottom: 1px solid var(--line);
}

.quick-links a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  min-height: 51px;
  font-size: 12px;
}

.quick-links a > span:first-child {
  color: var(--coral);
  font-family: var(--mono);
  font-size: 10px;
}

.quick-links a > span:last-child {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
  text-align: right;
}

.quick-links a:hover strong {
  color: var(--coral);
}

.app-footer {
  background: var(--ink);
  color: #fff;
}

.footer-inner {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-footer .brand-mark {
  background: var(--lime);
  color: var(--ink);
}

.brand-footer .brand-copy small,
.footer-inner p {
  color: rgba(255, 255, 255, 0.5);
}

.footer-inner p,
.back-top {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
}

.back-top {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--lime);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  max-width: min(330px, calc(100% - 44px));
  padding: 12px 15px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(9px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .task-panel {
    grid-row: span 2;
  }

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

  .quick-card {
    grid-column: span 2;
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .page-wrap {
    width: min(100% - 34px, 600px);
  }

  .header-inner {
    min-height: 68px;
  }

  .local-status {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .primary-nav {
    position: absolute;
    top: 67px;
    right: 17px;
    left: 17px;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: 8px 17px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    box-shadow: 0 14px 30px rgba(20, 32, 29, 0.12);
  }

  .primary-nav.is-open {
    display: grid;
  }

  .nav-link {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-link:last-child {
    border-bottom: 0;
  }

  .workspace-hero {
    padding: 60px 0 34px;
  }

  .workspace-intro {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .workspace-intro h1 {
    font-size: 42px;
  }

  .hero-copy {
    margin-top: 18px;
    font-size: 14px;
  }

  .hero-clock {
    justify-items: start;
    text-align: left;
  }

  .hero-clock strong {
    font-size: 34px;
  }

  .today-strip {
    grid-template-columns: 1fr 112px;
    min-height: 124px;
    margin-top: 42px;
  }

  .strip-copy {
    gap: 11px;
    padding: 17px;
  }

  .strip-copy strong {
    font-size: 16px;
  }

  .strip-copy p {
    font-size: 11px;
  }

  .morning-image {
    min-height: 124px;
    border-right: 0;
  }

  .strip-stat {
    display: none;
  }

  .dashboard-section,
  .tools-section {
    padding: 65px 0 72px;
  }

  .section-topline {
    display: grid;
    gap: 18px;
  }

  .section-note {
    margin-bottom: 0;
  }

  .dashboard-grid,
  .notes-grid,
  .utilities-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 31px;
  }

  .task-panel {
    grid-row: auto;
  }

  .tool-panel {
    min-height: 0;
    padding: 23px 19px 20px;
  }

  .timer-area {
    padding-top: 23px;
  }

  .timer-ring {
    width: 164px;
    height: 164px;
  }

  .timer-inner {
    width: 142px;
    height: 142px;
  }

  .timer-inner strong {
    font-size: 31px;
  }

  .notes-section {
    padding: 65px 0;
  }

  .note-panel,
  .quote-panel,
  .utility-card {
    padding: 22px 19px;
  }

  .note-panel textarea {
    min-height: 140px;
    margin-top: 24px;
  }

  .quote-panel {
    min-height: 250px;
  }

  .quote-panel h2 {
    margin-top: 33px;
    font-size: 25px;
  }

  .quick-card {
    grid-column: auto;
  }

  .footer-inner {
    flex-wrap: wrap;
    min-height: 0;
    padding: 23px 0;
  }

  .footer-inner p {
    order: 3;
    width: 100%;
  }
}

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

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