﻿﻿.van-nien-body {
  background: #f5f6f8;
  color: #243341;
  --vn-text: #243341;
  --vn-text-strong: #142231;
  --vn-text-muted: #667384;
  --vn-text-soft: #7b8695;
  --vn-text-board: #4f493f;
  --vn-text-label: #585247;
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.van-nien-main {
  background: linear-gradient(180deg, #fffaf2 0%, #f5f6f8 180px);
}

.breadcrumb-wrap {
  color: #738091;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.breadcrumb-wrap a {
  color: #f48024;
}

.quick-search-section {
  display: none;
  margin-bottom: 18px;
}

.quick-search-card {
  padding: 18px;
}

.quick-search-form {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}

.sidebar-form {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}

.quick-search-form .form--control {
  box-sizing: border-box;
  display: block;
  max-width: 100%;
  min-inline-size: 0;
  min-width: 0;
  width: 100%;
}

.sidebar-form .form--control,
.quick-search-form input[type="date"],
.sidebar-form input[type="date"] {
  box-sizing: border-box;
  display: block;
  max-width: 100%;
  min-inline-size: 0;
  min-width: 0;
  width: 100%;
}

.quick-search-form > *,
.sidebar-form > * {
  min-width: 0;
}

.form--control[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667384' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  line-height: 1.4;
  padding-right: 42px;
}

.form--control[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  height: 18px;
  opacity: 0;
  width: 18px;
}

.quick-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
}

.quick-search-actions a {
  color: #f48024;
  font-weight: 600;
}

.article-intro,
.summary-card,
.month-card,
.good-bad-block,
.detail-section,
.sidebar-card {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(20, 32, 48, 0.05);
}

.article-intro,
.summary-card,
.month-card,
.good-bad-block,
.detail-section {
  padding: 22px;
}

.sidebar-card {
  padding: 18px;
}

.article-title {
  color: var(--vn-text-strong);
  font-size: 36px;
  line-height: 1.12;
  margin-bottom: 10px;
}

.article-subtitle,
.section-note,
.section-heading p,
.sidebar-card p {
  color: var(--vn-text-muted);
  line-height: 1.7;
}

.section-kicker {
  color: #cc6b1d;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.intro-compact {
  padding-bottom: 18px;
}

.headline-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.headline-summary-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.headline-summary-compact .headline-box {
  padding: 14px 16px;
}

.headline-summary-compact .headline-box strong {
  font-size: 16px;
  line-height: 1.35;
}

.headline-summary-compact .headline-label {
  font-size: 10px;
  margin-bottom: 6px;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-nav a {
  background: #fff;
  border: 1px solid #e7ecf2;
  border-radius: 999px;
  color: #243341;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
}

.menu-bar ul li a.is-active {
  color: #f48024;
}

.header-brand-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 88px;
}

.header-menu-toggle {
  align-items: center;
  background: #fff7ef;
  border: 1px solid #ecd8c4;
  border-radius: 12px;
  display: none;
  flex-direction: column;
  gap: 4px;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.header-menu-toggle span {
  background: #243341;
  border-radius: 999px;
  display: block;
  height: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  width: 18px;
}

.header-menu-toggle.is-active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.header-menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.header-menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.menu-wrapper {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  min-height: 88px;
}

.menu-bar ul {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
}

.menu-bar ul li {
  list-style: none;
}

.menu-bar ul li a {
  color: #243341;
  display: inline-flex;
  font-weight: 600;
  line-height: 1.4;
}

.logo-box .logo img {
  display: block;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  width: 232px;
}

.menu-dropdown {
  position: relative;
}

.menu-dropdown::after {
  content: "";
  height: 12px;
  left: 0;
  position: absolute;
  right: 0;
  top: 100%;
}

.menu-dropdown > a {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.menu-dropdown-panel {
  background: #fff;
  border: 1px solid #e3eaf2;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(20, 32, 48, 0.12);
  display: grid;
  gap: 4px;
  left: 0;
  min-width: 220px;
  opacity: 0;
  padding: 10px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 4px);
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.menu-dropdown:hover .menu-dropdown-panel,
.menu-dropdown:focus-within .menu-dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-dropdown-panel a {
  border-radius: 10px;
  color: var(--vn-text);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 10px;
}

.menu-dropdown-panel a:hover,
.menu-dropdown-panel a.is-active {
  background: #f4f7fb;
  color: #f48024;
}

.content-group {
  display: grid;
  gap: 14px;
}

.content-pair,
.two-column-section,
.hour-block-split,
.compact-columns {
  display: grid;
  gap: 16px;
}

.content-pair,
.two-column-section,
.compact-columns,
.hour-block-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.group-header {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: auto 1fr;
}

.compact-group-header {
  margin-bottom: 0;
}

.group-index {
  align-items: center;
  background: linear-gradient(135deg, #243341 0%, #41556a 100%);
  border-radius: 16px;
  color: #fff;
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  height: 56px;
  justify-content: center;
  width: 56px;
}

.group-header h2,
.section-heading h2,
.section-heading h3 {
  color: var(--vn-text-strong);
  margin-bottom: 4px;
  text-align: left;
}

.group-header p {
  color: var(--vn-text-muted);
  line-height: 1.55;
  margin-bottom: 0;
  text-align: left;
}

.headline-box,
.good-bad-item,
.detail-card,
.advice-card {
  background: #f8fafc;
  border-radius: 14px;
  padding: 16px;
}

.headline-box strong,
.good-bad-item strong,
.detail-card strong {
  color: var(--vn-text-strong);
  display: block;
  font-size: 18px;
  line-height: 1.5;
}

.headline-label {
  color: var(--vn-text-soft);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.summary-badge {
  background: #1b2838;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  white-space: nowrap;
}

.summary-badge.is-good {
  background: #139e5c;
}

.summary-badge.is-bad {
  background: #bf3f2e;
}

.summary-table,
.sidebar-facts,
.hour-table {
  display: grid;
}

.summary-grid-inline {
  display: grid;
  gap: 0 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.headline-meta-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.headline-meta-item {
  align-items: flex-start;
  background: #f8fafc;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px #eef3f7;
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr;
  margin: 0;
  min-height: 82px;
  padding: 14px 16px;
}

.headline-meta-item dt {
  color: var(--vn-text-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  margin: 0;
  text-transform: uppercase;
}

.headline-meta-item dd {
  color: var(--vn-text-strong);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  text-align: left;
}

.khlh-table th,
.khlh-table td {
  border-color: #dbe4ee !important;
  border-style: solid;
  border-width: 1px;
  vertical-align: top;
}

.khlh-table {
  border-collapse: collapse;
  margin-bottom: 0;
}

.khlh-table > tbody > tr:first-child > td {
  border-top: 0 !important;
}

.khlh-table > tbody > tr:last-child > td {
  border-bottom: 0 !important;
}

.khlh-table > tbody > tr > td:first-child {
  border-left: 0 !important;
}

.khlh-table > tbody > tr > td:last-child {
  border-right: 0 !important;
}

.khlh-table > tbody > tr > td[rowspan] {
  border-bottom: 1px solid #dbe4ee !important;
}

.khlh-table thead th {
  background: #f1f5f9;
  color: #1a2a3b;
  font-weight: 700;
}

.summary-row {
  align-items: center;
  border-bottom: 1px solid #edf1f5;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 0;
}

.compact-row {
  padding: 12px 0;
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row span {
  color: var(--vn-text-muted);
}

.summary-row strong {
  color: var(--vn-text-strong);
  text-align: right;
}

.compact-heading {
  margin-bottom: 12px;
}

.month-nav {
  display: flex;
  gap: 10px;
}

.month-nav a {
  align-items: center;
  background: #f1f4f7;
  border-radius: 12px;
  color: #243341;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.month-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.month-card-board {
  overflow: hidden;
  padding: 0;
}

.month-card-board .month-board-head {
  align-items: center;
  background: linear-gradient(180deg, #8ea096 0%, #788b81 100%);
  color: #fff;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  min-height: 46px;
  text-align: center;
}

.month-card-board .month-board-head h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
}

.month-card-board .month-board-arrow {
  align-items: center;
  color: #fff;
  display: inline-flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.month-card-board .month-board-arrow:hover {
  color: #fff;
}

.month-card-board .month-grid {
  gap: 0;
  background: #d8d6ca;
}

.month-card-board .month-weekday {
  background: #9ba99c;
  border-right: 1px solid rgba(255, 253, 248, 0.32);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 4px;
  text-align: center;
  text-transform: uppercase;
}

.month-card-board .month-weekday:last-child {
  border-right: 0;
}

.month-card-board .month-day {
  background: #fffdf8;
  border: 1px solid #d2cdbd;
  border-left-width: 0;
  border-top-width: 0;
  border-radius: 0;
  color: #39433d;
  display: block;
  min-height: 102px;
  padding: 12px 10px 10px;
  position: relative;
}

.month-card-board .month-day:hover {
  background: #f4f1e8;
  color: #39433d;
}

.month-card-board .month-day.is-selected {
  background: #e1e8de;
}

.month-card-board .month-day.is-today {
  background: #edf1e8;
}

.month-card-board .month-day.is-muted {
  background: #f2efe7;
  color: #929484;
  opacity: 0.58;
  pointer-events: none;
}

.month-card-board .month-day.is-good {
  box-shadow: inset 0 -3px 0 rgba(122, 141, 129, 0.22);
}

.month-card-board .month-day.is-bad {
  box-shadow: inset 0 -3px 0 rgba(127, 113, 145, 0.16);
}

.month-card-board .month-day-top {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.month-card-board .solar {
  color: #3a342c;
  font-size: 18px;
  font-weight: 800;
}

.month-card-board .month-day.is-selected .solar,
.month-card-board .month-day.is-today .solar {
  color: #5e746a;
}

.month-card-board .quality-dot {
  background: #dc5a4b;
  border-radius: 50%;
  display: inline-block;
  height: 6px;
  margin-top: 6px;
  width: 6px;
}

.month-card-board .month-day.is-bad .quality-dot {
  background: #8f5aae;
}

.month-card-board .month-day-middle {
  color: #4d473e;
  font-size: 21px;
  line-height: 1.1;
  margin-top: 6px;
  text-align: center;
}

.month-card-board .month-day-bottom {
  color: #6a645a;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 6px;
  min-height: 32px;
  text-align: center;
}

.month-card-board .month-day.is-muted .quality-dot,
.month-card-board .month-day.is-muted .month-day-middle,
.month-card-board .month-day.is-muted .month-day-bottom {
  visibility: hidden;
}

.month-card-board .month-day.is-muted .solar {
  visibility: hidden;
}

.good-bad-block {
  background: linear-gradient(180deg, #fffaf6 0%, #ffffff 100%);
}

.good-bad-grid,
.detail-columns,
.advice-grid {
  display: grid;
  gap: 14px;
}

.good-bad-grid,
.compact-three-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.advice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.advice-grid-2,
.compact-advice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.advice-card-span {
  grid-column: 1 / -1;
}

.advice-card.good {
  background: #f2fbf6;
}

.advice-card.bad {
  background: #fff4f2;
}

.hour-group {
  border: 1px solid #edf1f5;
  border-radius: 16px;
  overflow: hidden;
}

.hour-group-good {
  background: linear-gradient(180deg, #f4fcf7 0%, #ffffff 100%);
}

.hour-group-bad {
  background: linear-gradient(180deg, #fff6f4 0%, #ffffff 100%);
}

.hour-group-title {
  color: #142231;
  font-size: 17px;
  font-weight: 700;
  padding: 16px 18px 8px;
}

.hour-table-row {
  align-items: start;
  border-top: 1px solid #edf1f5;
  display: grid;
  gap: 12px;
  grid-template-columns: 0.9fr 1fr 1fr 1fr 1fr 1.6fr;
  padding: 12px 18px;
}

.hour-table-head {
  background: rgba(248, 250, 252, 0.9);
  color: #6d7887;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hour-table-row strong {
  color: #142231;
  font-size: 14px;
}

.hour-table-row > div {
  line-height: 1.55;
  min-width: 0;
  overflow-wrap: anywhere;
}

.sidebar-article {
  display: grid;
  gap: 14px;
}

.sidebar-compact {
  gap: 14px;
}

.sidebar-links {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.sidebar-links a {
  color: #f48024;
  font-weight: 600;
}

.sidebar-links-compact a {
  background: #f8fafc;
  border-radius: 12px;
  color: #243341;
  min-width: 0;
  padding: 10px 12px;
}

.quick-search-btn {
  background: linear-gradient(180deg, #c7af98 0%, #b89c80 100%);
  border: 1px solid #c5af98;
  box-shadow: 0 8px 16px rgba(108, 84, 61, 0.1);
  color: #fffdf9;
  max-width: 100%;
  width: 100%;
}

.quick-search-btn:hover,
.quick-search-btn:focus {
  background: linear-gradient(180deg, #bba187 0%, #ac9074 100%);
  border-color: #b69d84;
  color: #fffdf9;
}

.sidebar-card-sticky {
  margin-top: 10px;
  position: sticky;
  top: 18px;
}

.calendar-footer {
  background: #101820;
  color: rgba(255, 255, 255, 0.76);
  padding: 24px 0;
}

.board-section {
  overflow: hidden;
  padding: 0;
  border-color: #ddd7c8;
  box-shadow: 0 10px 24px rgba(79, 73, 63, 0.06);
}

.board-title-row {
  background: linear-gradient(180deg, #8ea096 0%, #788b81 100%);
  color: #fff;
  padding: 12px 18px;
  text-align: center;
}

.board-title-row h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
}

.info-board {
  background: #fffdf8;
  display: grid;
}

.info-board-row {
  border-top: 1px solid #d6d0c1;
  display: grid;
  grid-template-columns: 160px 1fr;
}

.info-board-row:first-child {
  border-top: 0;
}

.info-board-label {
  align-items: center;
  background: #f3efe4;
  border-right: 1px solid #d6d0c1;
  color: var(--vn-text-label);
  display: flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: flex-start;
  padding: 14px 16px;
  text-align: left;
}

.info-board-content {
  color: var(--vn-text-board);
  line-height: 1.7;
  padding: 14px 16px;
  text-align: left;
}

.info-board-content strong,
.info-board-content .text-success,
.info-board-content .text-danger {
  color: var(--vn-text-strong) !important;
}

.info-board-content p:last-child,
.board-list:last-child {
  margin-bottom: 0;
}

#cat-hung .info-board-row {
  grid-template-columns: 170px 1fr;
}

#cat-hung .info-board-label {
  align-items: flex-start;
  padding-top: 16px;
}

#cat-hung .info-board-content {
  text-align: left;
}

#cat-hung .board-inline-text,
#cat-hung .text-success,
#cat-hung .text-danger {
  color: var(--vn-text-board) !important;
}

#cat-hung .board-inline-text span,
#cat-hung .board-list li,
#cat-hung .info-board-content p,
#cat-hung .info-board-content strong {
  color: inherit;
}

#cat-hung .board-list {
  padding-left: 20px;
}

#cat-hung .board-list li {
  margin-bottom: 4px;
}

#cat-hung .info-board-content p {
  margin-bottom: 8px;
}

.info-board-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.board-mini {
  background: #fff;
  border: 1px solid #dfe8c8;
  border-radius: 12px;
  padding: 12px 14px;
}

.board-mini strong {
  color: var(--vn-text-strong);
  display: block;
  margin-bottom: 4px;
}

.board-mini.good {
  background: #f4faec;
}

.board-mini.bad {
  background: #faf4fb;
}

.board-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.board-inline-list .board-mini {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  padding: 8px 10px;
}

.board-inline-list .board-mini strong {
  margin-bottom: 0;
  white-space: nowrap;
}

.board-inline-list .board-mini span {
  color: var(--vn-text-board);
  font-size: 13px;
  line-height: 1.4;
}

.board-inline-text {
  color: var(--vn-text-board);
  font-size: 14px;
  line-height: 1.7;
}

.board-list {
  margin: 0;
  padding-left: 18px;
}

.board-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.board-tags span {
  background: #f3f6e7;
  border: 1px solid #d7e2be;
  border-radius: 999px;
  color: var(--vn-text);
  display: inline-flex;
  font-size: 13px;
  padding: 6px 10px;
}

.hour-advice-wrap {
  overflow-x: auto;
}

.hour-advice-table {
  background: #fffdf8;
  margin-bottom: 0;
}

.hour-advice-table th,
.hour-advice-table td {
  border-color: #d6d0c1 !important;
  vertical-align: top;
}

.hour-advice-table thead th {
  background: #f3efe4;
  color: var(--vn-text-label);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  vertical-align: middle;
}

.hour-advice-table .hour-cell {
  color: var(--vn-text-strong);
  font-weight: 700;
  min-width: 92px;
  text-align: center;
  vertical-align: middle;
}

.hour-advice-table .hour-kind {
  background: #eef3e6;
  color: var(--vn-text);
  font-weight: 700;
  min-width: 72px;
  text-align: center;
  vertical-align: middle;
}

.hour-advice-table .hour-kind-good {
  background: #edf7ef;
}

.hour-advice-table .hour-kind-bad {
  background: #fbefee;
}

.hour-advice-table .hour-detail {
  color: var(--vn-text-board);
  line-height: 1.7;
  min-width: 420px;
  text-align: left;
}

.hour-advice-table .hour-detail strong {
  color: var(--vn-text-strong);
}

.hour-advice-table .star-note {
  color: var(--vn-text-muted);
  font-style: italic;
}

.info-board-summary {
  border-top: 1px solid #d6d0c1;
}

.converter-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.converter-section {
  display: grid;
  gap: 18px;
}

.converter-form {
  display: grid;
  gap: 14px;
}

.converter-field-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.converter-checkbox {
  align-items: center;
  color: var(--vn-text);
  display: inline-flex;
  gap: 10px;
  margin-bottom: 0;
}

.converter-checkbox input {
  accent-color: #f48024;
}

.converter-result {
  background: #f8fafc;
  border-radius: 14px;
  padding: 16px;
}

.converter-link {
  color: #f48024;
  display: inline-flex;
  font-weight: 700;
  margin-top: 12px;
}

.converter-note {
  color: var(--vn-text-muted);
  line-height: 1.6;
}

.month-links-section {
  padding-top: 18px;
}

.month-links-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.month-link-chip {
  background: #f8fafc;
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  color: var(--vn-text);
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  padding: 11px 12px;
  text-align: center;
}

.month-link-chip.is-active {
  background: #243341;
  border-color: #243341;
  color: #fff;
}

.month-summary-list {
  display: grid;
  gap: 12px;
}

.month-summary-stack {
  gap: 16px;
}

.month-summary-section {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.month-summary-header {
  margin-bottom: 14px;
}

.month-summary-header h3 {
  color: var(--vn-text-strong);
  font-size: 22px;
  margin: 0;
}

.month-summary-item {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(20, 32, 48, 0.04);
  padding: 18px 22px;
}

.month-summary-link {
  color: var(--vn-text-strong);
  display: inline-flex;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.month-summary-meta {
  color: #cc6b1d;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.month-summary-note {
  color: var(--vn-text);
  line-height: 1.6;
  margin-bottom: 8px;
}

.converter-top-block {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(20, 32, 48, 0.05);
  margin-bottom: 18px;
  padding: 18px 20px;
}

.converter-top-head h2 {
  color: var(--vn-text-strong);
  font-size: 24px;
  margin-bottom: 0;
}

.converter-compact-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.15fr 0.85fr;
  margin-top: 14px;
}

.converter-compact-card {
  background: #f8fafc;
  border-radius: 14px;
  padding: 16px;
}

.converter-compact-card h3 {
  color: var(--vn-text-strong);
  font-size: 18px;
  margin-bottom: 14px;
}

.converter-compact-form {
  display: grid;
  gap: 12px;
}

.converter-compact-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.converter-compact-fields-top {
  grid-template-columns: minmax(180px, 220px) minmax(220px, 320px);
}

.converter-solar-date .form--control {
  min-width: 0;
}

.converter-inline-btn {
  justify-self: start;
  min-width: 132px;
}

.converter-compact-result {
  display: grid;
  gap: 0;
}

.converter-page {
  display: flex;
  justify-content: center;
}

.converter-shell {
  background: #dde1e6;
  border-radius: 18px;
  padding: 28px 34px;
  width: min(100%, 760px);
}

.converter-page-title {
  color: #14325c;
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 18px;
}

.converter-single-form {
  display: grid;
  gap: 20px;
}

.converter-single-field label {
  color: #243341;
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
}

.converter-single-form .form--control {
  background: #fff;
  border: 1px solid #c7d1dd;
  border-radius: 6px;
  color: #243341;
  height: 48px;
}

.converter-submit {
  justify-self: start;
  min-width: 128px;
}

.converter-output {
  background: #fff;
  border: 1px solid #d6deea;
  border-radius: 14px;
  margin-top: 24px;
  padding: 20px 22px;
}

.converter-output h2 {
  color: #14325c;
  font-size: 22px;
  margin-bottom: 12px;
}

@media (max-width: 1199.98px) {
  .headline-summary,
  .compact-three-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hour-table-row {
    grid-template-columns: 1fr 1fr 1fr 1fr 1.2fr;
  }

  .hour-table-row > div:nth-child(6) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 991.98px) {
  .content-pair,
  .two-column-section,
  .compact-columns,
  .hour-block-split,
  .converter-grid,
  .converter-compact-grid,
  .month-links-grid,
  .headline-summary,
  .good-bad-grid,
  .detail-columns,
  .advice-grid,
  .hour-table-row {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .compact-heading {
    flex-direction: column;
  }

  .hour-table-head {
    display: none;
  }

  .info-board-row {
    grid-template-columns: 1fr;
  }

  .info-board-label {
    border-right: 0;
    border-bottom: 1px solid #a8be7d;
    justify-content: flex-start;
  }

  .info-board-grid {
    grid-template-columns: 1fr;
  }

  .converter-field-grid {
    grid-template-columns: 1fr;
  }

  .headline-meta-list {
    grid-template-columns: 1fr;
  }

  .converter-compact-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .converter-compact-fields-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .month-links-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .van-nien-body {
    overflow-x: hidden;
  }

  .header-area .container {
    overflow: visible;
  }

  .header-brand-row,
  .menu-wrapper {
    min-height: auto;
  }

  .header-brand-row {
    padding: 14px 0;
  }

  .header-menu-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }

  .menu-wrapper {
    align-items: stretch;
    border-left: 0 !important;
    display: none;
    justify-content: stretch;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    padding: 0 0 16px !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .menu-wrapper.is-open {
    display: flex;
  }

  .menu-bar,
  .menu-bar ul,
  .menu-bar ul li,
  .menu-bar ul li a {
    width: 100%;
  }

  .menu-bar > ul > li {
    padding-bottom: 0;
    padding-top: 0;
  }

  .menu-bar ul {
    align-items: stretch;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(20, 32, 48, 0.08);
    flex-direction: column;
    gap: 2px;
    padding: 8px;
  }

  .menu-bar ul li a {
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.25;
    padding: 8px 10px;
  }

  .menu-dropdown::after {
    display: none;
  }

  .menu-dropdown > a {
    justify-content: space-between;
  }

  .menu-dropdown-panel {
    box-shadow: none;
    display: grid;
    left: auto;
    margin-top: 6px;
    max-height: min(320px, 52vh);
    min-width: 100%;
    opacity: 1;
    overflow-y: auto;
    padding: 6px;
    pointer-events: auto;
    position: static;
    right: auto;
    transform: none;
    -webkit-overflow-scrolling: touch;
  }

  .quick-search-card {
    padding: 16px;
  }

  .quick-search-section {
    display: block;
  }

  .quick-search-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .sidebar-form,
  .sidebar-form .form--control {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .quick-search-form .form--control,
  .sidebar-form .form--control {
    font-size: 16px;
  }

  .quick-search-form input[type="date"],
  .sidebar-form input[type="date"] {
    height: 50px;
    padding-left: 12px;
    padding-right: 38px;
  }

  .quick-search-btn {
    font-size: 14px;
    justify-content: center;
    line-height: 24px;
    min-height: 44px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .headline-meta-item {
    gap: 8px;
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }

  .headline-meta-item dd {
    font-size: 16px;
  }

  .headline-summary-compact .headline-box {
    padding: 12px 14px;
  }

  .headline-summary-compact .headline-box strong {
    font-size: 15px;
  }

  .logo-box .logo img {
    width: 198px;
  }

  .article-title {
    font-size: 30px;
  }

  .converter-top-block {
    padding: 16px;
  }

  .converter-compact-fields {
    grid-template-columns: 1fr;
  }

  .converter-compact-fields-top {
    grid-template-columns: 1fr;
  }

  .month-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .converter-shell {
    padding: 22px 18px;
  }

  .converter-page-title {
    font-size: 28px;
  }

  .group-header {
    grid-template-columns: 1fr;
  }

  .group-index {
    height: 50px;
    width: 50px;
  }

  .month-grid {
    gap: 6px;
  }

  .month-card-board .month-grid {
    gap: 0;
  }

  .month-card-board .month-day {
    border-left-width: 1px;
    border-top-width: 1px;
    min-height: 96px;
    padding: 10px;
  }

  .month-card-board .solar {
    font-size: 17px;
  }

  .month-card-board .quality-dot {
    display: none;
  }

  .month-card-board .month-day-middle {
    font-size: 18px;
  }
}

.month-summary-list-grid,
.year-archive-grid,
.year-link-list {
  display: grid;
  gap: 16px;
}

.month-summary-list-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.year-month-grid,
.year-highlight-grid {
  display: grid;
  gap: 16px;
}

.year-archive-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.year-archive-item {
  min-height: 0;
}

.year-month-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.year-highlight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.year-archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.year-archive-card,
.year-link-list a {
  border: 1px solid #d7dfc4;
  border-radius: 14px;
  color: #24311a;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  text-decoration: none;
}

.year-archive-card strong,
.year-link-list a {
  font-weight: 700;
}

.year-link-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.year-link-list a.is-active,
.year-archive-card:hover,
.year-link-list a:hover {
  background: #eff4e4;
  border-color: #a8be7d;
}

@media (max-width: 991.98px) {
  .month-summary-list-grid,
  .year-archive-grid,
  .year-month-grid,
  .year-archive-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .year-highlight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .month-summary-list-grid,
  .year-archive-grid,
  .year-link-list,
  .year-month-grid,
  .year-highlight-grid,
  .year-archive-list {
    grid-template-columns: 1fr;
  }
}

/* Global square corners across app blocks */
.van-nien-body * {
  border-radius: 0 !important;
}

.van-nien-body .board-tags span {
  border-radius: 999px !important;
}
