:root {
  --accent: #79b75a;
  --accent-bold: #4a8a34;
  --soft-bg: #f4f7ed;
  --panel-bg: #ffffff;
  --border: #d4e6c5;
  --text: #333333;
  --muted: #6a7c5e;
  --page-width: 1200px;
  --font-scale: 1;
}

body.layout-narrow {
  --page-width: 960px;
}

body.layout-standard {
  --page-width: 1200px;
}

body.layout-wide {
  --page-width: 1320px;
}

body.layout-large {
  --page-width: 1440px;
}

body.layout-xl {
  --page-width: 1600px;
}

body.layout-full {
  --page-width: 100%;
}

body.font-large {
  --font-scale: 1.1;
}

body.font-xl {
  --font-scale: 1.2;
}

body.font-xxl {
  --font-scale: 1.35;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #e9f3df;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  font-size: calc(16px * var(--font-scale));
}

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

.page {
  max-width: var(--page-width);
  margin: 24px auto 48px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(86, 117, 75, 0.08);
  overflow: hidden;
}

.top-bar {
  background: var(--soft-bg);
  display: flex;
  align-items: stretch;
  border-bottom: 2px solid var(--border);
  border-top: 4px solid var(--accent);
}

.top-section {
  padding: 18px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.top-section + .top-section {
  border-left: 1px solid #e2edd8;
}

.logo-slot {
  width: 220px;
  align-items: center;
  justify-content: center;
}

.logo-slot img {
  display: block;
  max-width: 100%;
  max-height: 64px;
  object-fit: contain;
}

.info-panel {
  flex: 1;
  min-width: 260px;
  gap: 10px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  color: #577050;
}

.info-date {
  font-weight: 600;
  color: var(--accent-bold);
}

.info-lunar {
  color: var(--muted);
}

.link-primary,
.link-secondary {
  font-size: 14px;
}

.link-primary {
  color: #f0473c;
}

.link-secondary {
  color: var(--accent-bold);
}

.weather-panel {
  flex: 1.8;
}

.weather-widget {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  color: #586c4a;
}

.weather-widget p {
  margin: 0;
  color: #94a486;
}

.ad-panel {
  width: 180px;
  align-items: center;
  justify-content: center;
}

.ad-panel img {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
  display: block;
}

.primary-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--muted);
  flex-wrap: wrap;
}

.tab-list {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  flex: 1;
}

.tab-list span {
  position: relative;
  padding-bottom: 6px;
}

.tab-extra {
  margin-left: auto;
}

.tab-list .active {
  color: var(--accent-bold);
  font-weight: 600;
}

.tab-list .active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent-bold);
}

.tab-extra select {
  border: 2px solid #1f6de2;
  padding: 4px 28px 4px 10px;
  font-size: 14px;
  color: #1f6de2;
  background: #fff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #1f6de2 50%),
    linear-gradient(135deg, #1f6de2 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.tab-extra select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(31, 109, 226, 0.2);
}

.classic-search {
  padding: 20px 32px 12px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.classic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.classic-tabs span {
  padding: 4px 12px;
  border: 1px solid transparent;
  cursor: pointer;
}

.classic-tabs .active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.classic-search-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  border: 2px solid var(--border);
  padding: 14px 18px;
  background: #fdfef8;
}

.classic-logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-bold);
  line-height: 1;
}

.classic-logo .du {
  color: #e04e1f;
  margin-left: 2px;
}

.classic-input-wrap {
  flex: 1;
  display: flex;
  gap: 10px;
}

.classic-input-wrap input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #cfe3ba;
  font-size: 16px;
}

.classic-input-wrap button {
  padding: 10px 32px;
  background: var(--accent-bold);
  color: #fff;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.classic-input-wrap button:hover {
  background: #3d762a;
}

.classic-quicknotes {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #567255;
}

.classic-quicknotes a {
  color: var(--accent-bold);
}

.legacy-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 20px 32px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.legacy-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legacy-block {
  border: 1px solid var(--border);
  padding: 14px 16px;
  background: #fff;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  font-size: 14px;
  color: #4a5f3b;
}

.icon-entry {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-entry img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.icon-text {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.icon-sep {
  color: #a0b68e;
}

.hot-block .hot-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hot-list {
  columns: 2;
  column-gap: 20px;
  font-size: 13px;
  color: #4d6342;
}

.hot-list span {
  display: block;
  padding: 4px 0;
}

.legacy-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-bold);
  margin-bottom: 10px;
}

.legacy-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4a5f3b;
}

.legacy-line {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.legacy-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legacy-board {
  border: 1px solid #cde0b7;
  padding: 12px 16px;
  background: #fff;
}

.board-row {
  display: grid;
  grid-template-columns: 70px 1fr 72px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e1efd4;
  font-size: 14px;
  color: #425631;
}

.board-row:last-child {
  border-bottom: none;
}

.board-label {
  font-weight: 600;
  color: #3b8c26;
  font-size: 15px;
}

.board-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: #3f5130;
}

.board-more {
  font-size: 12px;
  text-align: right;
  color: #2f7c1f;
}

.tool-strip {
  padding: 20px 32px;
  background: #f5f8ed;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tool-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 16px;
}

.tool-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-bold);
  margin-bottom: 10px;
}

.tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 14px;
  color: #425631;
}

.friend-links {
  padding: 24px 32px 40px;
  background: #fff;
  font-size: 14px;
  color: #566547;
}

.friend-title {
  font-weight: 600;
  color: var(--accent-bold);
  margin-bottom: 8px;
}

.friend-items {
  line-height: 1.8;
  margin: 0 0 12px;
}

.friend-meta {
  margin: 0;
  color: #6f7d62;
}
