:root {
  --ink: #162033;
  --muted: #66738a;
  --subtle: #8b96a9;
  --line: #dfe5ef;
  --line-strong: #cfd8e6;
  --paper: #ffffff;
  --soft: #f5f7fb;
  --blue: #376cf6;
  --blue-dark: #1f50c8;
  --cyan: #27a9b8;
  --red: #d84a4a;
  --red-soft: #fff2f1;
  --amber: #b86f12;
  --amber-soft: #fff6df;
  --violet: #7657d8;
  --violet-soft: #f2edff;
  --green: #228167;
  --green-soft: #e9f7f2;
  --shadow: 0 14px 42px rgba(28, 44, 74, .08);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: inherit; }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.shell { width: min(1280px, calc(100% - 42px)); margin: 0 auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(223, 229, 239, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}
.header-inner {
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.brand {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #173a82, var(--blue), var(--cyan));
  box-shadow: 0 8px 20px rgba(55, 108, 246, .2);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-copy { display: flex; align-items: baseline; gap: 7px; }
.brand-cn { font-size: 20px; font-weight: 820; letter-spacing: .1em; }
.brand-en { color: #7d879a; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.header-left { justify-self: start; color: #6b778d; font-size: 13px; }
.header-actions { justify-self: end; }
.header-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 10px;
  color: #43516a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}
.header-link:hover { color: var(--blue-dark); background: #f2f5fb; }
.home-header-inner { display: flex; justify-content: center; }
.home-header-inner .brand { grid-column: auto; }

.hero {
  position: relative;
  padding: 58px 0 62px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 218, 137, .22), transparent 25rem),
    radial-gradient(circle at 79% 5%, rgba(122, 175, 255, .24), transparent 29rem),
    radial-gradient(circle at 52% 110%, rgba(183, 148, 255, .15), transparent 26rem),
    linear-gradient(135deg, #fcfcff, #f5f8ff 55%, #f9fbff);
}
.home-search .search-wrap { max-width: 820px; margin: 0 auto; }
.search-wrap { position: relative; }
.search-box {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px 0 22px;
  border: 1px solid rgba(183, 197, 222, .8);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 13px 36px rgba(63, 84, 128, .11);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-box:focus-within { border-color: rgba(55, 108, 246, .58); box-shadow: 0 15px 42px rgba(55, 108, 246, .15); }
.search-box svg { flex: 0 0 auto; width: 25px; height: 25px; color: var(--blue); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 16px; }
.search-box input::placeholder { color: #909aae; }
.search-key { padding: 3px 8px; border: 1px solid #d9e0eb; border-radius: 7px; color: #8a95aa; background: #f7f9fc; font-size: 12px; }
.search-results {
  position: absolute;
  z-index: 10;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.search-results.open { display: block; }
.search-result { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; border-bottom: 1px solid #edf0f5; text-decoration: none; }
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: #f7f9fe; }
.search-result strong { display: block; font-size: 14px; }
.search-result span { color: var(--muted); font-size: 12px; }
.search-empty { padding: 18px; color: var(--muted); font-size: 14px; }

.section { padding: 54px 0 78px; }
.section-head { margin-bottom: 24px; text-align: center; }
.section-head h2 { margin: 0; font-size: clamp(25px, 2.7vw, 32px); line-height: 1.2; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tool-grid-single { max-width: 680px; grid-template-columns: 1fr; margin: 0 auto; }
.tool-grid-two { max-width: 940px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 auto; }
.tool-card {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(31, 48, 81, .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tool-card:hover { transform: translateY(-4px); border-color: #b8c9f7; box-shadow: var(--shadow); }
.tool-card.hidden { display: none; }
.tool-top { display: flex; align-items: center; justify-content: space-between; }
.tool-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--blue); background: #edf2ff; }
.tool-icon svg { width: 25px; height: 25px; }
.tool-card h3 { margin: 18px 0 7px; font-size: 20px; }
.tool-card p { margin: 0; color: var(--muted); font-size: 14px; }
.tool-arrow { margin-top: auto; padding-top: 18px; color: var(--blue); font-size: 13px; font-weight: 750; }

.calendar-page { padding: 36px 0 74px; background: var(--soft); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 22px; }
.page-heading h1 { margin: 8px 0 0; font-size: clamp(30px, 3.5vw, 44px); line-height: 1.15; letter-spacing: -.035em; }
.crumbs { display: flex; align-items: center; gap: 8px; color: #7a8699; font-size: 13px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--blue); }
.calendar-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 17px; color: #657188; font-size: 12px; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.holiday-dot { background: var(--red); }
.work-dot { background: #d79025; }
.weekend-dot { background: #a7b1c1; }
.anniversary-dot { background: var(--violet); }

.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.calendar-card, .day-card, .calc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 9px 30px rgba(29, 47, 79, .055);
}
.calendar-card { padding: 22px; }
.calendar-toolbar { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.month-navigation { display: flex; align-items: center; gap: 13px; }
.month-navigation h2 { min-width: 150px; margin: 0; text-align: center; font-size: 21px; letter-spacing: -.01em; }
.icon-button, .quiet-button {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: #40506a;
  background: #fff;
  cursor: pointer;
}
.icon-button { font-size: 26px; line-height: 1; }
.quiet-button { padding: 0 14px; font-size: 13px; font-weight: 650; }
.icon-button:hover, .quiet-button:hover { color: var(--blue); border-color: #afc2f5; background: #f6f8ff; }
.weekday-row { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 1px; }
.weekday-row span { padding: 9px 6px; color: #718097; text-align: center; font-size: 12px; font-weight: 700; }
.weekday-row .weekend-label { color: #b25f5f; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #e1e6ef;
  border-radius: 15px;
  background: #e1e6ef;
}
.calendar-day {
  position: relative;
  min-width: 0;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 9px 10px 8px;
  border: 0;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}
.calendar-day:hover { z-index: 1; background: #f4f7ff; }
.calendar-day.weekend { background: #fafbfe; }
.calendar-day.holiday { background: var(--red-soft); }
.calendar-day.adjusted-workday { background: var(--amber-soft); }
.calendar-day.outside-month { color: #a6afbd; background: #f7f8fa; }
.calendar-day.selected { z-index: 2; box-shadow: inset 0 0 0 2px var(--blue); }
.day-top { min-height: 25px; display: flex; align-items: flex-start; justify-content: space-between; gap: 5px; }
.day-number { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 50%; font-size: 14px; }
.calendar-day.today .day-number { color: #fff; background: var(--blue); }
.day-badges { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
.day-badge { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 6px; font-size: 10px; font-style: normal; font-weight: 800; }
.holiday-badge { color: #fff; background: var(--red); }
.work-badge { color: #7b4d0b; background: #f5ce7c; }
.anniversary-badge { color: #fff; background: var(--violet); }
.lunar-label { margin-top: 5px; color: #778399; font-size: 11px; }
.day-event { display: -webkit-box; margin-top: auto; overflow: hidden; color: #56647a; font-size: 10px; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.calendar-day.holiday .day-event { color: #a33f3f; }
.calendar-day.adjusted-workday .day-event { color: #8c5a16; }
.outside-month .day-badges, .outside-month .day-event { opacity: .52; }
.data-scope { margin: 13px 2px 0; color: #8792a5; font-size: 11px; }

.day-card { position: sticky; top: 90px; padding: 24px; }
.selected-date { padding-bottom: 18px; border-bottom: 1px solid #e8ecf2; }
.selected-date > span { color: var(--blue); font-size: 12px; font-weight: 750; }
.selected-date h2 { margin: 4px 0 3px; font-size: 30px; line-height: 1.25; }
.selected-date p { margin: 0; color: var(--muted); font-size: 13px; }
.status-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 17px 0 13px; }
.status-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.holiday-status { color: #a93c3c; background: var(--red-soft); }
.work-status { color: #82520e; background: var(--amber-soft); }
.weekend-status { color: #5f6e84; background: #eef1f5; }
.weekday-status { color: var(--green); background: var(--green-soft); }
.anniversary-status { color: var(--violet); background: var(--violet-soft); }
.day-events { min-height: 36px; }
.event-row { display: flex; align-items: flex-start; gap: 9px; margin: 8px 0; color: #3f4c61; font-size: 13px; }
.event-dot { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: #9ba5b4; }
.event-dot.holiday { background: var(--red); }
.event-dot.workday { background: #d79025; }
.event-dot.festival { background: var(--cyan); }
.event-dot.anniversary { background: var(--violet); }
.empty-events { margin: 8px 0; color: #929bad; font-size: 12px; }
.anniversary-box { margin-top: 21px; padding-top: 20px; border-top: 1px solid #e8ecf2; }
.anniversary-box h3 { margin: 0 0 13px; font-size: 15px; }
.compact-fields { display: grid; gap: 10px; }
.field { display: block; margin: 0; }
.field > span { display: block; margin-bottom: 6px; color: #5b687d; font-size: 11px; font-weight: 700; }
.field input, .field select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  outline: 0;
}
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(55, 108, 246, .1); }
.check-field { display: flex; align-items: center; gap: 8px; margin: 11px 0; color: #5d6a7f; font-size: 12px; cursor: pointer; }
.check-field input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.primary-button {
  width: 100%;
  min-height: 41px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}
.primary-button:hover { background: var(--blue-dark); }
.anniversary-list { max-height: 210px; margin-top: 15px; overflow: auto; }
.anniversary-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid #edf0f5; }
.anniversary-item strong, .anniversary-item span { display: block; }
.anniversary-item strong { max-width: 185px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.anniversary-item span { margin-top: 2px; color: #8b95a6; font-size: 10px; }
.anniversary-item button { padding: 4px 7px; border: 0; color: #9a6570; background: transparent; cursor: pointer; font-size: 10px; }
.anniversary-item button:hover { color: #b43242; }
.empty-anniversaries { margin: 0; color: #979faf; font-size: 11px; }

.calculation-section { margin-top: 38px; }
.section-heading h2 { margin: 0 0 16px; font-size: 25px; }
.calculation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.calc-card { padding: 25px; }
.calc-card h3 { margin: 0 0 18px; font-size: 18px; }
.date-pair { display: grid; grid-template-columns: 1fr 42px 1fr; gap: 10px; align-items: end; }
.swap-button {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--blue);
  background: #fff;
  cursor: pointer;
}
.swap-button:hover { background: #f4f7ff; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 18px; }
.result-grid > div { padding: 14px; border-radius: 12px; background: #f4f7fc; }
.result-grid span, .offset-result > span { display: block; color: #78859a; font-size: 11px; }
.result-grid strong { display: block; margin-top: 3px; font-size: 20px; }
.result-note { min-height: 18px; margin: 12px 1px 0; color: #7f8a9d; font-size: 11px; }
.offset-fields { display: grid; grid-template-columns: 1.25fr .75fr .65fr .9fr; gap: 10px; }
.offset-result { margin-top: 18px; padding: 17px 18px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #17366e, var(--blue-dark)); }
.offset-result > span { color: #bfd0f1; }
.offset-result strong { display: block; margin-top: 4px; font-size: 21px; }
.offset-result small { display: block; margin-top: 5px; color: #d7e1f4; font-size: 11px; }

.converter-page { padding: 36px 0 74px; background: var(--soft); }
.converter-heading h1 span { margin: 0 .16em; color: var(--blue); font-weight: 650; letter-spacing: 0; }
.condition-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.condition-chips span { padding: 7px 11px; border: 1px solid #dbe2ef; border-radius: 999px; color: #66738a; background: #fff; font-size: 11px; white-space: nowrap; }
.converter-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.converter-card, .conditions-card, .formula-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 9px 30px rgba(29, 47, 79, .055);
}
.converter-card { padding: 28px; }
.direction-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; border-radius: 13px; background: #f0f3f8; }
.direction-tabs button { min-height: 43px; padding: 0 15px; border: 0; border-radius: 9px; color: #66738a; background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; }
.direction-tabs button:hover { color: var(--blue-dark); }
.direction-tabs button.active { color: var(--blue-dark); background: #fff; box-shadow: 0 4px 14px rgba(30, 48, 80, .08); }
.conversion-flow { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); gap: 16px; align-items: center; margin-top: 28px; }
.conversion-input, .conversion-result { min-width: 0; min-height: 168px; display: flex; flex-direction: column; justify-content: center; padding: 24px; border-radius: 17px; }
.conversion-input { border: 1px solid var(--line-strong); background: #fff; }
.conversion-input > span, .conversion-result > span { color: #6e7b90; font-size: 12px; font-weight: 700; }
.large-input-wrap { display: flex; align-items: baseline; gap: 10px; margin-top: 11px; }
.large-input-wrap input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: clamp(29px, 4.4vw, 44px);
  font-weight: 780;
  letter-spacing: -.035em;
  -moz-appearance: textfield;
}
.large-input-wrap input::-webkit-outer-spin-button, .large-input-wrap input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.large-input-wrap strong { color: #748096; font-size: 18px; }
.conversion-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(55, 108, 246, .1); }
.swap-direction { width: 46px; height: 46px; border: 1px solid #cfd8e6; border-radius: 50%; color: var(--blue); background: #fff; cursor: pointer; font-size: 20px; }
.swap-direction:hover { color: #fff; border-color: var(--blue); background: var(--blue); }
.conversion-result { color: #fff; background: linear-gradient(135deg, #183b7d, #285fd8 60%, #228eaa); box-shadow: 0 14px 28px rgba(36, 87, 188, .16); }
.conversion-result > span { color: #c9d8f3; }
.conversion-result > strong { margin-top: 9px; overflow-wrap: anywhere; font-size: clamp(31px, 4.5vw, 45px); line-height: 1.16; letter-spacing: -.025em; }
.conversion-result > small { margin-top: 6px; color: #d6e3f7; font-size: 12px; }
.conversion-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; }
.conversion-bottom p { margin: 0; color: #647187; font-size: 13px; }
.converter-actions { display: flex; gap: 8px; }
.converter-actions button { min-height: 38px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 9px; color: #46546b; background: #fff; cursor: pointer; font-size: 12px; font-weight: 650; }
.converter-actions button:hover { color: var(--blue-dark); border-color: #afc1ef; background: #f6f8ff; }
.converter-message { min-height: 18px; margin: 7px 0 0; color: #7d889b; font-size: 11px; }
.converter-message.error { color: #bb4141; }
.converter-message.success { color: var(--green); }
.conditions-card { padding: 24px; }
.conditions-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.conditions-card h2 { margin: 0; font-size: 18px; }
.conditions-card-head button {
  padding: 5px 0;
  border: 0;
  color: #718097;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}
.conditions-card-head button:hover { color: var(--blue); }
.condition-fields { display: grid; }
.condition-field { display: block; padding: 11px 0; border-bottom: 1px solid #e9edf3; }
.condition-field > span:first-child { display: block; margin-bottom: 7px; color: #67748a; font-size: 12px; font-weight: 650; }
.condition-input-wrap {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
}
.condition-input-wrap:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(55, 108, 246, .1); }
.condition-input-wrap input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: 750;
  -moz-appearance: textfield;
}
.condition-input-wrap input::-webkit-outer-spin-button, .condition-input-wrap input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.condition-input-wrap strong { flex: 0 0 auto; color: #8a95a7; font-size: 10px; font-weight: 650; }
.formula-details { margin-top: 20px; padding: 0 24px; }
.formula-details summary { padding: 18px 0; color: #4d5b71; cursor: pointer; font-size: 13px; font-weight: 700; }
.formula-details[open] summary { border-bottom: 1px solid #e8ecf2; }
.formula-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 22px 0 25px; }
.formula-grid h3 { margin: 0 0 11px; font-size: 14px; }
.formula-grid code { display: block; margin-top: 8px; overflow-wrap: anywhere; color: #5f6d83; font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; font-size: 11px; line-height: 1.7; }
.formula-grid p { margin: 12px 0 0; color: #778398; font-size: 11px; line-height: 1.7; }

.site-footer { border-top: 1px solid var(--line); background: #f8fafc; }
.footer-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #6e7b90; font-size: 12px; }
.footer-brand { color: var(--ink); font-weight: 780; }
.footer-links { display: flex; align-items: center; gap: 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--blue); text-decoration: underline; }

@media (max-width: 1100px) {
  .calendar-layout { grid-template-columns: 1fr; }
  .day-card { position: static; }
  .compact-fields { grid-template-columns: minmax(180px, .7fr) 1fr; }
  .anniversary-box form { display: grid; grid-template-columns: 1fr auto 100px; align-items: end; gap: 12px; }
  .anniversary-box form .check-field { margin: 0 0 11px; }
  .anniversary-box form .primary-button { margin-bottom: 1px; }
  .anniversary-list { max-height: none; }
  .calculation-grid { grid-template-columns: 1fr; }
  .converter-layout { grid-template-columns: 1fr; }
  .condition-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 26px, 1280px); }
  .header-inner { grid-template-columns: 1fr 1fr; }
  .header-left { display: none; }
  .brand { grid-column: 1; justify-self: start; }
  .brand-en { display: none; }
  .hero { padding: 40px 0 44px; }
  .search-box { min-height: 58px; padding-left: 17px; }
  .section { padding: 42px 0 58px; }
  .tool-grid, .tool-grid-two { grid-template-columns: 1fr; }
  .calendar-page { padding: 25px 0 52px; }
  .converter-page { padding: 25px 0 52px; }
  .page-heading { display: block; }
  .calendar-legend { justify-content: flex-start; margin-top: 17px; }
  .calendar-card { padding: 14px; }
  .calendar-day { min-height: 88px; padding: 6px; }
  .day-number { width: 25px; height: 25px; font-size: 13px; }
  .day-badge { width: 18px; height: 18px; border-radius: 5px; font-size: 9px; }
  .lunar-label { font-size: 10px; }
  .day-event { font-size: 9px; }
  .anniversary-box form { display: block; }
  .compact-fields { grid-template-columns: 1fr; }
  .anniversary-box form .check-field { margin: 11px 0; }
  .offset-fields { grid-template-columns: 1fr 1fr; }
  .condition-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .formula-grid { grid-template-columns: 1fr; }
  .footer-inner { padding: 24px 0; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 540px) {
  .header-link { padding: 0 8px; }
  .brand-cn { font-size: 18px; }
  .search-key { display: none; }
  .tool-card { min-height: 185px; padding: 23px; }
  .page-heading h1 { font-size: 31px; }
  .calendar-toolbar { align-items: flex-start; }
  .month-navigation { gap: 7px; }
  .month-navigation h2 { min-width: 120px; font-size: 18px; }
  .icon-button { min-width: 34px; min-height: 34px; }
  .quiet-button { min-height: 34px; padding: 0 10px; }
  .weekday-row span { padding: 7px 2px; }
  .calendar-day { min-height: 70px; padding: 5px 4px; }
  .day-badges { gap: 2px; }
  .day-badge { width: 15px; height: 15px; border-radius: 4px; font-size: 8px; }
  .lunar-label { margin-top: 2px; font-size: 9px; }
  .day-event { display: none; }
  .day-card, .calc-card { padding: 20px 17px; }
  .date-pair { grid-template-columns: 1fr; }
  .swap-button { width: 100%; }
  .result-grid { grid-template-columns: 1fr; }
  .converter-card { padding: 18px; }
  .direction-tabs { grid-template-columns: 1fr; }
  .conversion-flow { grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
  .conversion-input, .conversion-result { min-height: 138px; padding: 20px; }
  .swap-direction { justify-self: center; transform: rotate(90deg); }
  .conversion-bottom { align-items: flex-start; flex-direction: column; }
  .converter-actions { width: 100%; }
  .converter-actions button { flex: 1; }
  .condition-fields { grid-template-columns: 1fr; }
  .formula-details { padding: 0 18px; }
}
