:root {
  --paper: #f5f2e9;
  --paper-deep: #ebe6da;
  --ink: #20231f;
  --muted: #64675f;
  --line: #d7d1c4;
  --white: #fffdf8;
  --green: #2f5d50;
  --green-light: #c8ddd2;
  --orange: #df754d;
  --orange-light: #f3d1bf;
  --blue: #55799b;
  --blue-light: #ccdae6;
  --yellow: #e9c85d;
  --shadow: 0 18px 50px rgba(43, 46, 40, 0.08);
  --radius-large: 28px;
  --radius-medium: 18px;
  --content-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui,
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.container {
  width: min(calc(100% - 40px), var(--content-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(32, 35, 31, 0.09);
  background: rgba(245, 242, 233, 0.93);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--white);
  background: var(--green);
  border-radius: 50% 50% 42% 58% / 55% 45% 55% 45%;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 94px;
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  border-radius: 50%;
  filter: blur(2px);
}

.hero::before {
  top: 40px;
  right: -130px;
  width: 390px;
  height: 390px;
  background: rgba(200, 221, 210, 0.62);
}

.hero::after {
  bottom: -170px;
  left: -120px;
  width: 330px;
  height: 330px;
  background: rgba(243, 209, 191, 0.48);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  align-items: center;
  gap: clamp(52px, 8vw, 108px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif;
  font-size: clamp(3rem, 7vw, 5.85rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: var(--green);
}

.hero-text {
  max-width: 610px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 36px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

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

.button-primary {
  color: var(--white);
  background: var(--green);
  box-shadow: 0 9px 22px rgba(47, 93, 80, 0.18);
}

.button-primary:hover {
  background: #254d42;
}

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

.button-dark:hover {
  background: #3b3f39;
}

.button-secondary {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.button-secondary:hover {
  background: var(--paper);
}

.text-link {
  color: var(--ink);
  font-weight: 700;
  text-underline-offset: 5px;
}

.hero-board {
  position: relative;
  min-height: 390px;
  padding: 34px;
  background: var(--white);
  border: 1px solid rgba(32, 35, 31, 0.1);
  border-radius: 12px 12px var(--radius-large) 12px;
  box-shadow: var(--shadow);
  transform: rotate(2.4deg);
}

.hero-board::before {
  position: absolute;
  top: -16px;
  left: 50%;
  width: 95px;
  height: 32px;
  content: "";
  background: rgba(233, 200, 93, 0.7);
  transform: translateX(-50%) rotate(-2deg);
}

.board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.board-dot {
  width: 10px;
  height: 10px;
  background: var(--orange);
  border-radius: 50%;
}

.board-quote {
  margin: 44px 0 54px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.75;
}

.board-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.board-tags span {
  padding: 5px 12px;
  color: var(--green);
  background: var(--green-light);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.section {
  padding: 94px 0;
}

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

.section-heading h2,
.tool-intro h2,
.about-card h2 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-heading > p {
  max-width: 410px;
  margin: 0 0 5px;
  color: var(--muted);
}

.compact-heading {
  margin-bottom: 30px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.directory-card {
  position: relative;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-right: 1px solid var(--line);
  text-decoration: none;
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.directory-card:last-child {
  border-right: 0;
}

.directory-card:hover {
  transform: translateY(-5px);
}

.todo-accent:hover {
  background: var(--green-light);
}

.random-accent:hover {
  background: var(--orange-light);
}

.countdown-accent:hover {
  background: var(--blue-light);
}

.directory-number {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.directory-title {
  margin-top: auto;
  font-size: 1.5rem;
  font-weight: 800;
}

.directory-description {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.92rem;
}

.directory-arrow {
  position: absolute;
  top: 24px;
  right: 27px;
  font-size: 1.5rem;
}

.services {
  background: var(--ink);
  color: var(--white);
}

.services .eyebrow {
  color: var(--green-light);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-grid article {
  padding: 29px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-medium);
}

.service-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 40px;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 50%;
  font-size: 1.05rem;
  font-weight: 900;
}

.service-grid article:nth-child(2) .service-icon {
  background: var(--orange-light);
}

.service-grid article:nth-child(3) .service-icon {
  background: var(--blue-light);
}

.service-grid h3 {
  margin: 0 0 8px;
  font-size: 1.16rem;
}

.service-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
}

.tool-section {
  scroll-margin-top: 75px;
}

.alt-section {
  background: var(--paper-deep);
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(55px, 9vw, 120px);
  align-items: start;
}

.tool-index {
  margin: 0 0 17px;
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.tool-intro > p:not(.tool-index) {
  margin: 20px 0 0;
  color: var(--muted);
}

.local-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
}

.local-note > span:first-child {
  font-size: 0.68rem;
}

.tool-panel {
  padding: clamp(24px, 4vw, 40px);
  background: var(--white);
  border: 1px solid rgba(32, 35, 31, 0.09);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

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

input {
  min-height: 50px;
  padding: 11px 15px;
}

textarea {
  min-height: 155px;
  padding: 14px 15px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #96988f;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.13);
}

.input-action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.input-action-row .button {
  border-radius: 13px;
}

.form-message {
  min-height: 1.5em;
  margin: 7px 0 0;
  color: #a13c25;
  font-size: 0.8rem;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 19px;
  padding: 17px 0 11px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.quiet-button {
  padding: 5px 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.quiet-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.todo-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 8px 8px 13px;
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 13px;
}

.todo-item:hover {
  border-color: var(--line);
}

.todo-checkbox {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.todo-text {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.todo-item.completed .todo-text {
  color: var(--muted);
  text-decoration: line-through;
}

.delete-todo {
  min-width: 42px;
  min-height: 36px;
  padding: 4px 9px;
  color: #8b3f2d;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.delete-todo:hover {
  background: var(--orange-light);
}

.empty-state {
  margin: 8px 0 0;
  padding: 26px 15px;
  color: var(--muted);
  background: var(--paper);
  border-radius: 13px;
  text-align: center;
  font-size: 0.88rem;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
}

.input-hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.result-box {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 25px;
  padding: 20px;
  color: var(--ink);
  background: var(--orange-light);
  border-radius: var(--radius-medium);
  text-align: center;
}

.result-label {
  color: #7b4c39;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.result-box strong {
  max-width: 100%;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.35;
}

.result-box.is-error {
  background: #f4d7d1;
}

.field-group + .field-group {
  margin-top: 17px;
}

.countdown-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.countdown-display {
  margin-top: 26px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.countdown-display > p {
  min-height: 1.7em;
  margin: 0 0 15px;
  color: var(--muted);
  text-align: center;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.time-grid div {
  min-width: 0;
  padding: 17px 7px 13px;
  background: var(--blue-light);
  border-radius: 14px;
  text-align: center;
}

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

.time-grid strong {
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.time-grid span {
  margin-top: 6px;
  color: #526476;
  font-size: 0.76rem;
  font-weight: 700;
}

.about {
  padding-top: 38px;
}

.about-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(50px, 9vw, 120px);
  padding: clamp(34px, 7vw, 70px);
  color: var(--white);
  background: var(--green);
  border-radius: var(--radius-large);
}

.about-card .eyebrow {
  color: var(--green-light);
}

.about-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.about-copy p + p {
  margin-top: 18px;
}

.site-footer {
  padding: 34px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-content p {
  margin: 0;
}

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

  .hero-copy {
    max-width: 700px;
  }

  .hero-board {
    min-height: 320px;
    width: min(100%, 520px);
    margin-inline: auto;
  }

  .directory-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .directory-card {
    min-height: 180px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .service-icon {
    margin-bottom: 25px;
  }

  .tool-layout,
  .about-card {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .tool-intro {
    max-width: 650px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 28px), var(--content-width));
  }

  .site-header {
    position: static;
  }

  .nav-wrap {
    min-height: 68px;
  }

  .brand {
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .nav-list {
    display: none;
  }

  .hero {
    padding: 58px 0 70px;
  }

  .hero h1 {
    font-size: clamp(2.65rem, 14vw, 4rem);
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .hero-board {
    min-height: 300px;
    padding: 27px;
    transform: rotate(1deg);
  }

  .board-quote {
    margin: 35px 0 40px;
    font-size: 1.5rem;
  }

  .section {
    padding: 70px 0;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
  }

  .directory-card {
    min-height: 162px;
    padding: 23px;
  }

  .service-grid article {
    padding: 24px;
  }

  .tool-panel {
    padding: 21px;
    border-radius: 21px;
  }

  .input-action-row {
    grid-template-columns: 1fr;
  }

  .input-action-row .button {
    width: 100%;
  }

  .form-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .form-footer .button {
    width: 100%;
  }

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

  .time-grid {
    gap: 5px;
  }

  .time-grid div {
    padding: 14px 3px 11px;
    border-radius: 10px;
  }

  .time-grid strong {
    font-size: 1.22rem;
  }

  .about {
    padding-top: 15px;
  }

  .about-card {
    padding: 30px 24px;
  }

  .footer-content {
    align-items: center;
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}

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