:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #17202a;
  --muted: #5c6b7a;
  --line: #d8e0ea;
  --brand: #0068ff;
  --brand-2: #00a1ff;
  --ok: #0d8b4b;
  --danger: #c0392b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top right, #d8ecff, var(--bg) 40%);
  color: var(--text);
}

.app {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 300px;
  gap: 16px;
}

h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
}

.desc {
  margin: 0;
  color: var(--muted);
}

.region {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  min-height: calc(100vh - 32px);
  box-shadow: 0 10px 30px rgba(23, 32, 42, 0.08);
}

.hero {
  margin-bottom: 20px;
}

.left-region {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zen-badge {
  width: 52px;
  height: 52px;
  margin: 0 0 8px;
  align-self: center;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #4ca1ff, #0b63ce);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(11, 99, 206, 0.28);
}

.menu-btn {
  width: 100%;
  text-align: center;
  padding: 0 12px;
}

.menu-btn.active {
  color: #fff !important;
  border-color: #0b63ce !important;
  background: linear-gradient(180deg, #2286ff, #0b63ce) !important;
}

.center-region {
  min-width: 0;
}

.right-region h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.calendar-box {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px;
}

.calendar-title {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.calendar-week,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-week span {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.calendar-day {
  min-height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.1;
}

.calendar-day.muted {
  color: #a0adba;
}

.calendar-day.past {
  color: #9aa6b2;
}

.calendar-day.today {
  background: #0b63ce;
  color: #fff;
}

.solar-day {
  font-size: 12px;
  font-weight: 600;
}

.lunar-day {
  margin-top: 2px;
  font-size: 10px;
  opacity: 0.9;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

textarea {
  width: 100%;
  min-height: 140px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface-2);
}

textarea:focus {
  outline: 2px solid #c9e3ff;
  border-color: #a7d3ff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  margin: 14px -5px 18px;
}

button {
  height: 40px;
  width: auto;
  min-width: 0;
  padding: 0 14px;
  margin: 5px;
  border: 1px solid #c7d8eb;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #edf5ff);
  color: #11437e;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  border-color: #9cc5f2;
}

button:active {
  transform: translateY(1px);
}

button.ghost {
  background: #fff;
}

button.copy-btn {
  border-color: #cc8400 !important;
  background: linear-gradient(180deg, #f2a31d, #d98d07) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

button.copy-btn:hover {
  border-color: #b77400 !important;
}

button.cut-btn {
  border-color: #3f93b0 !important;
  background: linear-gradient(180deg, #5fb8d4, #4aa4c0) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

button.cut-btn:hover {
  border-color: #3488a3 !important;
}

button.clear-btn {
  border-color: #c84a4a !important;
  background: linear-gradient(180deg, #e26161, #d95353) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

button.clear-btn:hover {
  border-color: #b53f3f !important;
}

.status {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.status.ok {
  color: var(--ok);
}

.status.err {
  color: var(--danger);
}

@media (max-width: 640px) {
  .app {
    padding: 12px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .region {
    min-height: auto;
    border-radius: 14px;
    padding: 14px;
  }

  textarea {
    min-height: 120px;
  }
}
