:root {
  --page-bg: #f2f3f5;
  --text: #333333;
  --muted: #626675;
  --line: #d7d9e0;
  --line-soft: #e0e1e3;
  --blue: #4e6ef2;
  --red: #eb3333;
  --rest-bg: rgba(235, 51, 51, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 48px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.brand {
  font-size: 14px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 14px;
}

.nav-links a {
  color: #4f566b;
  font-size: 13px;
  text-decoration: none;
}

.nav-links a:hover {
  color: #1f2430;
}

.home-main {
  width: 100%;
  margin: 0;
  padding: 16px 24px 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.cards-grid {
  width: min(1004px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 350px) minmax(0, 638px);
  gap: 16px;
  align-items: start;
}

.feature-card {
  width: 100%;
  max-width: 100%;
  border-radius: 16px;
  background: #fff;
  padding: 18px 15px 15px;
  margin: 0;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 120px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  background: linear-gradient(180deg, rgba(51, 186, 255, 0.1) 0%, rgba(51, 186, 255, 0) 100%);
  pointer-events: none;
}

.feature-card[data-card-id="weather"] {
  min-height: 350px;
  padding: 0;
  color: #fff;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.24), transparent 24%),
    linear-gradient(145deg, #78aeca 0%, #9cc1cd 52%, #86b8b3 100%);
  box-shadow: 0 16px 36px rgba(48, 87, 104, 0.18);
}

.feature-card[data-card-id="weather"]::before {
  display: none;
}

.weather-card {
  position: relative;
  min-height: 350px;
  padding: 16px 18px 18px;
  overflow: hidden;
  text-shadow: 0 1px 8px rgba(35, 62, 76, 0.26);
}

.weather-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(40, 77, 94, 0.08));
  pointer-events: none;
}

.weather-hero,
.weather-hourly,
.weather-daily,
.weather-state {
  position: relative;
  z-index: 1;
}

.weather-hero {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.weather-city {
  font-size: 16px;
  line-height: 20px;
  font-weight: 700;
}

.weather-temp {
  margin-top: 2px;
  font-size: 48px;
  line-height: 48px;
  font-weight: 300;
  letter-spacing: 0;
}

.weather-now {
  margin-top: 2px;
  text-align: right;
  font-weight: 700;
}

.weather-now .weather-icon {
  margin-left: auto;
  transform: scale(1.18);
  transform-origin: right center;
}

.weather-condition {
  margin-top: 2px;
  font-size: 13px;
  line-height: 16px;
}

.weather-hi-lo {
  margin-top: 1px;
  font-size: 18px;
  line-height: 22px;
  white-space: nowrap;
}

.weather-hourly {
  margin-top: 10px;
  padding: 9px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.weather-hour {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
}

.weather-hour-time,
.weather-hour-temp {
  font-size: 12px;
  line-height: 14px;
  font-weight: 700;
}

.weather-daily {
  margin-top: 11px;
  display: grid;
  gap: 8px;
}

.weather-day {
  display: grid;
  grid-template-columns: 34px 26px 34px 1fr 34px;
  align-items: center;
  gap: 8px;
}

.weather-day-name,
.weather-low,
.weather-high {
  font-size: 13px;
  line-height: 16px;
  font-weight: 800;
}

.weather-low {
  opacity: 0.82;
  text-align: right;
}

.weather-high {
  text-align: right;
}

.weather-bar {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(94, 136, 149, 0.24);
  overflow: hidden;
}

.weather-bar span {
  position: absolute;
  left: var(--bar-left);
  width: var(--bar-width);
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #42dbc8, #ffe766, #ffba21);
}

.weather-icon {
  display: block;
  width: 25px;
  height: 22px;
  filter: drop-shadow(0 1px 4px rgba(39, 65, 79, 0.22));
}

.weather-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.weather-icon-sun,
.weather-icon-moon {
  width: 24px;
}

.weather-icon-rain,
.weather-icon-snow,
.weather-icon-storm {
  height: 25px;
}

.weather-cloud {
  fill: #fff;
}

.weather-cloud-shadow {
  fill: rgba(119, 158, 171, 0.24);
}

.weather-sun-rays {
  opacity: 0.96;
}

.weather-state {
  padding: 14px;
  font-size: 13px;
  font-weight: 700;
}

.weather-error {
  color: rgba(255, 255, 255, 0.9);
}

.card-head,
.calendar-body {
  position: relative;
}

.card-head {
  z-index: 5;
}

.calendar-body {
  z-index: 1;
}

.card-head {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  display: none;
}

.calendar-controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-arrow,
.calendar-today {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
}

.calendar-pick {
  position: relative;
}

.calendar-pick[data-pick="mode"] {
  width: 115px;
}

.calendar-pick[data-pick="year"] {
  width: 130px;
}

.calendar-pick[data-pick="month"] {
  width: 80px;
}

.calendar-pick-btn {
  width: 100%;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #4e5568;
  font-size: 14px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.calendar-pick-caret {
  font-size: 12px;
  color: #9197aa;
}

.calendar-pick-menu {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  width: 120px;
  min-width: 92px;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #dde1ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(26, 38, 68, 0.14);
  display: none;
  pointer-events: auto;
}

.calendar-pick.is-open .calendar-pick-menu {
  display: block;
}

.calendar-pick-item {
  width: 100%;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  padding: 0 8px;
  font-size: 13px;
  color: #3f465a;
  cursor: pointer;
}

.calendar-pick-item:hover {
  background: #f3f6ff;
}

.calendar-pick-item.is-selected {
  color: #2f59f5;
  background: #eef3ff;
}

.calendar-arrow {
  width: 24px;
  border: 0;
  background: transparent;
  color: #8d92a3;
  font-size: 24px;
  line-height: 24px;
  cursor: pointer;
}

.calendar-arrow:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.calendar-today {
  width: 82px;
  border-color: var(--line-soft);
  color: #333;
  cursor: pointer;
}

.calendar-body {
  margin-top: 10px;
}

.calendar-week-header,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-week-header {
  padding: 0 13px;
}

.week-label {
  text-align: center;
  font-size: 14px;
  line-height: 14px;
  color: #333;
}

.week-label.weekend {
  color: var(--red);
}

.calendar-grid {
  margin-top: 0;
}

.day-item {
  padding: 0 8px;
  margin-top: 12px;
}

.day-item.is-other-month {
  opacity: 0.3;
}

.day-box {
  position: relative;
  width: 59px;
  max-width: 100%;
  height: 55px;
  margin: 0 auto;
  border: 0 solid transparent;
  border-radius: 12px;
  box-sizing: border-box;
  padding: 6px 0 9px;
  background: transparent;
  cursor: pointer;
}

.day-box.is-selected {
  border-width: 2px;
  border-color: var(--blue);
}

.day-box.is-rest {
  background: var(--rest-bg);
}

.day-number {
  display: block;
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 22px;
  font-weight: 500;
  color: #333;
}

.day-sub {
  display: block;
  font-size: 12px;
  line-height: 12px;
  font-weight: 400;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-box.is-weekend .day-number {
  color: var(--red);
}

.day-box.is-rest .day-number,
.day-box.is-rest .day-sub {
  color: var(--red);
}

.day-box.is-selected.is-today .day-number,
.day-box.is-selected.is-today .day-sub {
  color: var(--blue);
}

.day-tag {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 14px;
  line-height: 14px;
  padding: 0 2px;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
}

.day-tag.rest {
  background: var(--red);
}

.day-tag.work {
  background: #4f5978;
}

.day-tag.today {
  background: var(--blue);
}

.calendar-foot {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.detail-pill {
  border: 1px solid var(--line-soft);
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: #596074;
}

.calendar-loading,
.calendar-error {
  margin: 8px 0;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #5f6577;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.82);
}

@media (max-width: 760px) {
  .home-main {
    padding: 10px 10px 24px;
    align-items: stretch;
  }

  .cards-grid {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature-card {
    padding: 12px 8px 10px;
    border-radius: 12px;
  }

  .feature-card[data-card-id="weather"] {
    min-height: 330px;
    padding: 0;
  }

  .weather-card {
    min-height: 330px;
    padding: 14px 16px 16px;
  }

  .weather-temp {
    font-size: 44px;
    line-height: 44px;
  }

  .card-head {
    height: auto;
  }

  .calendar-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  .calendar-pick-btn {
    height: 30px;
    font-size: 13px;
  }

  .calendar-pick-menu {
    max-height: 220px;
  }

  .calendar-pick[data-pick="mode"] {
    width: 92px;
  }

  .calendar-pick[data-pick="year"] {
    width: 104px;
  }

  .calendar-pick[data-pick="month"] {
    width: 72px;
  }

  .calendar-today {
    width: 66px;
  }

  .calendar-week-header {
    padding: 0 2px;
  }

  .calendar-grid {
    margin-top: 2px;
  }

  .day-item {
    margin-top: 6px;
    padding: 0 2px;
  }

  .day-box {
    width: 44px;
    height: 48px;
    border-radius: 10px;
    padding: 4px 0 6px;
  }

  .day-number {
    margin-bottom: 4px;
    font-size: 18px;
    line-height: 18px;
  }

  .day-sub {
    font-size: 11px;
    line-height: 11px;
  }
}
.site-footer {
  width: min(1004px, 100%);
  margin: -18px 24px 28px auto;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  color: #747888;
  font-size: 12px;
}
.site-footer a {
  color: inherit;
  text-decoration: none;
}
.site-footer a:hover {
  color: #1f2430;
}
@media (max-width: 760px) {
  .site-footer {
    width: auto;
    margin: -8px 12px 24px;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
