:root {
  --bg: #05030d;
  --panel: rgba(14, 11, 26, 0.78);
  --text: #f4efff;
  --muted: rgba(232, 224, 255, 0.7);
  --line: rgba(255, 255, 255, 0.09);
  --accent: #b855ff;
  --accent-2: #2d7bdc;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 22%, rgba(126, 45, 255, 0.32), transparent 20%),
    radial-gradient(circle at 80% 18%, rgba(184, 85, 255, 0.2), transparent 20%),
    radial-gradient(circle at 75% 76%, rgba(120, 20, 255, 0.15), transparent 22%),
    linear-gradient(180deg, #090410 0%, #05030d 56%, #040208 100%);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.28;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.35));
}

body::after {
  content: "";
  position: fixed;
  inset: auto -20vw -18vh auto;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle, rgba(184, 85, 255, 0.16) 0%, rgba(184, 85, 255, 0.04) 32%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}

.page-shell {
  width: min(1500px, calc(100vw - 28px));
  margin: 18px auto 34px;
}

.masthead,
.hero,
.article-section,
.footer {
  position: relative;
  z-index: 1;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 20px 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(18, 14, 30, 0.92), rgba(10, 7, 19, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  padding: 7px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(145deg, #8e2cff, #31144d 58%, #160a25 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 22px rgba(142, 44, 255, 0.34),
    0 14px 32px rgba(0, 0, 0, 0.38);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: #d599ff;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.top-nav a {
  color: rgba(244, 239, 255, 0.75);
  text-decoration: none;
  font-size: 14px;
  transition: color 160ms ease, transform 160ms ease;
}

.top-nav a:hover {
  color: #fff;
  transform: translateY(-1px);
}

.visitor-card {
  min-width: 172px;
  padding: 16px 18px;
  border-radius: 22px;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(184, 85, 255, 0.18), transparent 45%),
    linear-gradient(180deg, rgba(32, 20, 48, 0.96), rgba(14, 11, 26, 0.98));
  border: 1px solid rgba(197, 141, 255, 0.24);
}

.visitor-label,
.visitor-note {
  display: block;
  font-size: 12px;
  color: rgba(235, 229, 255, 0.68);
}

.visitor-count {
  display: block;
  margin: 8px 0 6px;
  font-size: 38px;
  line-height: 1;
  color: #ff9dff;
  text-shadow: 0 0 18px rgba(184, 85, 255, 0.48);
}

.hero {
  display: grid;
  /* 原双栏给右侧月历卡使用，暂时保留注释便于恢复 */
  /* grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr); */
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  justify-items: center;
  gap: 28px;
  margin-top: 14px;
  padding: 46px 34px 28px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(17, 10, 31, 0.86), rgba(6, 4, 13, 0.82)),
    radial-gradient(circle at 18% 26%, rgba(168, 68, 255, 0.22), transparent 26%),
    radial-gradient(circle at 78% 34%, rgba(122, 44, 255, 0.18), transparent 24%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
  width: min(100%, 860px);
}

.hero-copy-card {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 26px 32px 32px;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 18% 10%, rgba(50, 191, 214, 0.16), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(238, 187, 96, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(16, 22, 39, 0.72), rgba(9, 8, 22, 0.58)),
    rgba(8, 7, 17, 0.36);
  border: 1px solid rgba(126, 216, 232, 0.16);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 18px 46px rgba(0, 0, 0, 0.22),
    0 0 34px rgba(50, 191, 214, 0.08);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.hero-copy-card::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 26px;
  border: 1px solid rgba(126, 216, 232, 0.1);
  background: none;
  opacity: 1;
  pointer-events: none;
}

.hero-copy-card::after {
  content: "";
  position: absolute;
  inset: auto;
  background: none;
  pointer-events: none;
}

.hero-copy-card > * {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-self: center;
  margin: 0 0 14px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #f3d8ff;
  background: rgba(184, 85, 255, 0.1);
  border: 1px solid rgba(197, 141, 255, 0.18);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-title-image {
  display: block;
  width: min(100%, 300px);
  max-height: 330px;
  height: auto;
  margin: 6px 0 0;
  object-fit: contain;
  filter:
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.18))
    drop-shadow(0 0 22px rgba(126, 216, 232, 0.14));
}

.palace-list {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 12px;
  text-align: left;
  align-self: stretch;
}

.palace-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(126, 216, 232, 0.12);
}

.palace-item span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #0e1320;
  background: linear-gradient(135deg, #7de8ff, #f0c66a);
  font-size: 12px;
  font-weight: 800;
}

.palace-item p {
  margin: 0;
  color: rgba(232, 225, 245, 0.76);
  font-size: 12px;
  line-height: 1.35;
}

.palace-item strong {
  display: block;
  color: rgba(255, 250, 255, 0.94);
  font-size: 12px;
  line-height: 1.25;
  margin-bottom: 2px;
}

.hero-copy-text {
  max-width: 52ch;
  margin: 16px 0 0;
  color: rgba(235, 229, 255, 0.76);
  font-size: 14px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-button,
.hero-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
}

.hero-button {
  color: #fff;
  background: linear-gradient(135deg, #d06cff, #7e2fff 70%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 24px rgba(126, 47, 255, 0.35);
}

.hero-chip {
  color: rgba(244, 239, 255, 0.82);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-preview {
  position: relative;
  z-index: 1;
  min-height: 0;
  height: 100%;
  display: flex;
}

.preview-frame {
  position: relative;
  height: 100%;
  min-height: 100%;
  width: 100%;
  border-radius: 32px;
  padding: 12px;
  background:
    radial-gradient(circle at 34% 18%, rgba(184, 85, 255, 0.16), transparent 24%),
    radial-gradient(circle at 70% 40%, rgba(122, 44, 255, 0.16), transparent 20%),
    linear-gradient(180deg, rgba(24, 14, 40, 0.96), rgba(8, 6, 17, 0.96));
  border: 1px solid rgba(197, 141, 255, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 0 0 1px rgba(184, 85, 255, 0.04),
    0 30px 70px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
}

.preview-window {
  position: relative;
  height: 100%;
  min-height: 100%;
  width: 100%;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(12, 10, 24, 0.92), rgba(9, 7, 18, 0.98));
  overflow: hidden;
  display: flex;
}

.preview-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
}

.preview-card {
  position: relative;
  z-index: 1;
  width: calc(100% - 8px);
  margin: 4px auto;
  padding: 14px;
  min-height: calc(100% - 8px);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(22, 17, 36, 0.94), rgba(15, 11, 25, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(184, 85, 255, 0.08), 0 22px 48px rgba(0, 0, 0, 0.35);
  display: flex;
}

.calendar-card {
  height: 100%;
  min-height: 100%;
  width: 100%;
  padding: 22px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 10%, rgba(50, 191, 214, 0.16), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(238, 187, 96, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(16, 22, 39, 0.72), rgba(9, 8, 22, 0.58)),
    rgba(8, 7, 17, 0.36);
  color: #f6f0ff;
  border: 1px solid rgba(126, 216, 232, 0.16);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 18px 46px rgba(0, 0, 0, 0.22),
    0 0 34px rgba(50, 191, 214, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
  backdrop-filter: blur(10px);
}

.calendar-topline,
.calendar-month-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.calendar-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(48, 190, 213, 0.18), rgba(238, 187, 96, 0.12));
  color: #c6f8ff;
  font-size: 14px;
  letter-spacing: 0.12em;
  flex: 0 0 auto;
}

.calendar-topline-icon,
.calendar-month-arrows {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: rgba(246, 240, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  font-size: 14px;
  flex: 0 0 auto;
}

.calendar-month-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.calendar-nav-button,
.calendar-nav-today {
  height: 38px;
  border: none;
  border-radius: 12px;
  background: rgba(23, 33, 54, 0.86);
  color: rgba(226, 247, 255, 0.92);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 0 0 1px rgba(130, 218, 236, 0.14);
  cursor: pointer;
  flex: 0 0 auto;
}

.calendar-nav-button {
  width: 38px;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.calendar-nav-today {
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.calendar-nav-button:hover,
.calendar-nav-today:hover {
  background: rgba(34, 55, 86, 0.92);
}

.calendar-nav-button:active,
.calendar-nav-today:active {
  transform: translateY(1px);
}

.calendar-month {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  color: #fff7ff;
  background: linear-gradient(90deg, #f8fbff, #6fe7ff 34%, #f2c96d 68%, #ff8fb6);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.calendar-weekdays {
  gap: 3px;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.1;
  font-weight: 700;
  color: rgba(215, 235, 244, 0.9);
  text-align: center;
}

.calendar-grid {
  gap: 0;
  flex: 0 0 auto;
  align-content: start;
}

.calendar-cell {
  min-height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: rgba(246, 249, 255, 0.9);
  border-radius: 14px;
  font-size: 15px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.calendar-cell-day {
  font-size: 15px;
  line-height: 1;
}

.calendar-cell-lunar {
  font-size: 12px;
  line-height: 1;
  color: rgba(184, 202, 215, 0.74);
  white-space: nowrap;
}

.calendar-cell--jieqi .calendar-cell-lunar {
  color: rgba(255, 219, 129, 0.96);
  font-weight: 700;
}

.calendar-cell--empty {
  min-height: 38px;
}

.calendar-cell--today {
  color: #fff;
  background: linear-gradient(135deg, #2e8df3, #34d6c6 52%, #f1bd57);
  border-radius: 999px;
  padding: 4px 0 5px;
  box-shadow:
    0 8px 18px rgba(45, 123, 220, 0.34),
    0 0 24px rgba(52, 214, 198, 0.24);
}

.calendar-cell--today .calendar-cell-lunar {
  color: rgba(255, 255, 255, 0.88);
}

.calendar-cell--selected {
  color: #fff;
  background: linear-gradient(135deg, #2d7bdc, #41a9ff 58%, #7fd8ff);
  box-shadow:
    0 8px 20px rgba(45, 123, 220, 0.34),
    0 0 24px rgba(65, 169, 255, 0.2);
}

.calendar-cell--selected .calendar-cell-lunar {
  color: rgba(255, 255, 255, 0.92);
}

.calendar-summary {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(126, 216, 232, 0.14);
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.calendar-gregorian {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff7ff;
  background: linear-gradient(90deg, #fffafd, #76e5ff 38%, #f2cb72 76%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.calendar-lunar-today {
  margin-top: 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(226, 218, 238, 0.76);
  background: linear-gradient(90deg, #cfefff, #9df3e6 34%, #f0c66a 68%, #ff9bbd);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.25;
}

.calendar-footer-lines {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(126, 216, 232, 0.14);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calendar-footer-line {
  font-size: 15px;
  color: rgba(225, 234, 244, 0.84);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

#calendar-footer-line-2 {
  background: linear-gradient(90deg, #eff9ff, #7de8ff 34%, #f0c66a 70%, #ff91b6);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#calendar-footer-line-1 {
  font-size: 16px;
  font-weight: 700;
}

#calendar-footer-line-2:empty {
  display: none;
}

#calendar-footer-line-1:empty {
  display: none;
}

.calendar-note {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(184, 202, 215, 0.78);
  line-height: 1.25;
}

.calendar-converter {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(126, 216, 232, 0.14);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-converter-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.calendar-converter-label {
  font-size: 15px;
  font-weight: 700;
  color: rgba(239, 249, 255, 0.94);
  white-space: nowrap;
}

.calendar-converter-fields {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.calendar-select {
  height: 34px;
  min-width: 72px;
  padding: 0 8px;
  border: 1px solid rgba(126, 216, 232, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(126, 216, 232, 0.14), rgba(255, 255, 255, 0.07)),
    rgba(12, 18, 32, 0.82);
  color: #f5fbff;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.calendar-select option {
  color: #15151a;
}

.calendar-select--short {
  min-width: 64px;
}

.calendar-select--medium {
  min-width: 76px;
}

#lunar-month {
  min-width: 64px;
}

.calendar-unit {
  font-size: 14px;
  color: rgba(205, 223, 235, 0.82);
  white-space: nowrap;
}

.calendar-converter-button {
  min-height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f8df0, #33c8c1);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.calendar-converter-button:hover {
  filter: brightness(1.03);
}

.calendar-converter-button:active {
  transform: translateY(1px);
}

.calendar-converter-message {
  min-height: 20px;
  font-size: 13px;
  color: rgba(184, 202, 215, 0.82);
}

.calendar-converter-message.is-error {
  color: #ff8d8d;
}

.calendar-converter-bazi {
  min-height: 20px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 250, 255, 0.9);
  background: linear-gradient(90deg, #eff9ff, #7de8ff 34%, #f0c66a 70%, #ff91b6);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.35;
}

.preview-float {
  position: absolute;
  border-radius: 24px;
  border: 1px solid rgba(197, 141, 255, 0.16);
  background: linear-gradient(180deg, rgba(33, 18, 55, 0.82), rgba(15, 11, 25, 0.9));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.preview-float-left {
  top: 26px;
  left: -42px;
  width: 170px;
  height: 140px;
  background:
    radial-gradient(circle at 44% 34%, rgba(184, 85, 255, 0.4), transparent 14%),
    linear-gradient(180deg, rgba(42, 20, 75, 0.86), rgba(13, 9, 25, 0.95));
}

.preview-float-right {
  right: -18px;
  bottom: 28px;
  width: 138px;
  height: 178px;
  background:
    radial-gradient(circle at 50% 30%, rgba(184, 85, 255, 0.3), transparent 18%),
    linear-gradient(180deg, rgba(35, 18, 58, 0.9), rgba(13, 9, 25, 0.96));
}

.article-section {
  margin-top: 16px;
  padding: 24px 18px 4px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(14, 10, 24, 0.9), rgba(10, 7, 19, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.section-head {
  padding: 6px 14px 16px;
}

.section-label {
  margin: 0 0 8px;
  font-size: 12px;
  color: #d599ff;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-head h3 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.article-list {
  display: grid;
  gap: 18px;
}

.article-group {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.article-group--basics {
  background:
    linear-gradient(135deg, rgba(24, 83, 125, 0.62), rgba(18, 39, 63, 0.88) 36%, rgba(8, 14, 25, 0.94)),
    rgba(8, 16, 28, 0.92);
  border-color: rgba(89, 178, 232, 0.28);
}

.article-group--cases {
  background:
    linear-gradient(135deg, rgba(48, 105, 72, 0.62), rgba(24, 55, 42, 0.88) 36%, rgba(9, 18, 18, 0.94)),
    rgba(9, 18, 18, 0.92);
  border-color: rgba(118, 204, 142, 0.28);
}

.article-group--courses {
  background:
    linear-gradient(135deg, rgba(140, 84, 38, 0.64), rgba(78, 48, 32, 0.88) 36%, rgba(22, 13, 10, 0.94)),
    rgba(22, 13, 10, 0.92);
  border-color: rgba(232, 160, 82, 0.3);
}

.article-group-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.article-group-title {
  min-width: 0;
}

.article-group--basics .article-group-head {
  background: linear-gradient(90deg, rgba(42, 130, 185, 0.36), rgba(42, 130, 185, 0.08));
}

.article-group--cases .article-group-head {
  background: linear-gradient(90deg, rgba(80, 150, 100, 0.36), rgba(80, 150, 100, 0.08));
}

.article-group--courses .article-group-head {
  background: linear-gradient(90deg, rgba(196, 119, 54, 0.38), rgba(196, 119, 54, 0.08));
}

.article-group-title span {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.article-group-title p {
  margin: 6px 0 0;
  color: rgba(235, 229, 255, 0.62);
  font-size: 14px;
  line-height: 1.5;
}

.article-group-toggle {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.article-group-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

.article-group-list {
  overflow: hidden;
}

.article-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 20px 18px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.article-card:hover {
  transform: translateY(-2px);
  border-top-color: rgba(197, 141, 255, 0.24);
  background:
    linear-gradient(90deg, rgba(184, 85, 255, 0.08), rgba(255, 255, 255, 0.02) 30%, transparent),
    rgba(10, 7, 18, 0.7);
}

.article-group-list .article-card:first-child {
  border-top: none;
}

.thumb {
  width: 200px;
  height: 132px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-main {
  min-width: 0;
}

.article-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: rgba(235, 229, 255, 0.54);
  font-size: 14px;
}

.excerpt {
  margin: 12px 0 0;
  color: rgba(235, 229, 255, 0.72);
  line-height: 1.86;
}

.tags {
  min-width: 200px;
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #ffacff;
  background: rgba(184, 85, 255, 0.1);
  border: 1px solid rgba(197, 141, 255, 0.16);
  white-space: nowrap;
}

.article-group--basics .tag {
  color: #9edfff;
  background: rgba(33, 130, 190, 0.18);
  border-color: rgba(112, 200, 245, 0.26);
}

.article-group--cases .tag {
  color: #abe8b8;
  background: rgba(76, 153, 92, 0.18);
  border-color: rgba(146, 228, 160, 0.26);
}

.article-group--courses .tag {
  color: #ffd19a;
  background: rgba(199, 123, 50, 0.18);
  border-color: rgba(255, 183, 100, 0.28);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 16px 20px;
  border-radius: 22px;
  color: rgba(235, 229, 255, 0.62);
  background: rgba(14, 11, 26, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .masthead {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
  }
}

@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-preview {
    min-height: 0;
  }

  .preview-frame {
    min-height: 0;
  }

  .article-card {
    grid-template-columns: 1fr;
  }

  .thumb {
    width: 100%;
    height: 220px;
  }

  .tags {
    min-width: 0;
    justify-content: flex-start;
  }

  .tag-row {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 16px, 1500px);
    margin-top: 8px;
  }

  .masthead,
  .hero,
  .article-section,
  .footer {
    border-radius: 22px;
  }

  .masthead {
    grid-template-columns: 1fr;
  }

  .visitor-card {
    width: 100%;
  }

  .hero {
    padding: 28px 18px 18px;
  }

  .hero-title-image {
    width: min(100%, 260px);
  }

  .palace-list {
    grid-template-columns: 1fr;
  }

  .hero-copy-card {
    width: 100%;
    min-height: 520px;
    padding: 22px;
  }

  .preview-card {
    width: calc(100% - 8px);
  }

  .calendar-converter-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .calendar-converter-button {
    width: 100%;
  }

  .preview-float-left {
    left: -18px;
    width: 116px;
    height: 104px;
  }

  .preview-float-right {
    right: -12px;
    width: 98px;
    height: 130px;
  }

  .article-card {
    padding: 18px 14px;
  }

  .article-title {
    font-size: 20px;
  }

  .footer {
    flex-direction: column;
  }
}
