/* 非遗民俗主题站：全站统一视觉 */
:root {
  --ink: #30211b;
  --red: #8d241f;
  --red-dark: #551613;
  --gold: #c99b52;
  --paper: #eee0bf;
  --paper-light: #f8efd9;
  --shadow: 0 14px 32px rgba(61, 25, 18, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Serif SC", "STSong", "SimSun", serif;
  line-height: 1.8;
  background:
    radial-gradient(circle at 20% 20%, rgba(141,36,31,.08) 0 1px, transparent 2px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(112,74,43,.05) 1px, transparent 1px) 0 0 / 5px 100%,
    var(--paper);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, a { -webkit-tap-highlight-color: transparent; }
button:active, .pressable:active, .btn:active, .card:active { transform: translateY(2px) scale(.98); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--gold);
  background: rgba(77, 18, 16, .96);
  box-shadow: 0 5px 18px rgba(44, 14, 12, .28);
}
.nav-wrap {
  max-width: 1180px;
  min-height: 70px;
  margin: auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { color: #f7e8c1; font-size: 21px; font-weight: 700; letter-spacing: 5px; white-space: nowrap; }
.brand span { color: var(--gold); }
.main-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.main-nav a {
  padding: 8px 12px;
  color: #f4dfb7;
  border-radius: 3px;
  transition: .28s ease;
}
.main-nav a:hover, .main-nav a.active {
  color: #fff7df;
  background: linear-gradient(135deg, var(--red), #b54b34);
  box-shadow: 0 5px 12px rgba(0,0,0,.2);
  transform: translateY(-2px);
}

.hero, .page-hero {
  position: relative;
  overflow: hidden;
  color: #fff3d1;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(50,10,9,.88), rgba(116,30,24,.6), rgba(50,10,9,.88)),
    repeating-linear-gradient(45deg, #74221c 0 12px, #812820 12px 24px);
}
.hero { min-height: 520px; display: grid; place-items: center; }
.page-hero { min-height: 270px; display: grid; place-items: center; }
.hero::before, .page-hero::before {
  content: "云  纹  非  遗  民  俗  山  河  岁  时  云  纹";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(229,190,106,.52);
  padding: 8px;
  color: rgba(239,203,128,.34);
  font-size: 17px;
  letter-spacing: 22px;
}
.hero-content { position: relative; z-index: 1; max-width: 760px; padding: 55px 20px; }
.eyebrow { color: #e9c67e; letter-spacing: 8px; font-size: 14px; }
h1 { margin: 18px 0 8px; font-size: clamp(38px, 7vw, 78px); line-height: 1.18; letter-spacing: 10px; text-shadow: 0 5px 0 rgba(50,10,8,.4); }
.page-hero h1 { font-size: clamp(34px, 5vw, 56px); }
.hero p { margin: 20px auto 28px; max-width: 650px; color: #f2dfbd; font-size: 18px; }
.seal { display: inline-grid; place-items: center; width: 72px; height: 72px; border: 2px solid #efd18c; color: #efd18c; transform: rotate(-5deg); letter-spacing: 3px; line-height: 1.2; }

.btn {
  display: inline-block;
  min-width: 140px;
  padding: 11px 22px;
  color: #fff3d6;
  background: linear-gradient(135deg, #a53028, #6c1917);
  border: 1px solid #d8ad60;
  border-radius: 3px;
  box-shadow: 0 7px 16px rgba(47,10,9,.28);
  cursor: pointer;
  transition: .25s ease;
}
.btn:hover { transform: translateY(-3px); filter: brightness(1.13); box-shadow: 0 11px 24px rgba(47,10,9,.35); }

.section { max-width: 1180px; margin: auto; padding: 78px 22px; }
.section-title { text-align: center; margin-bottom: 38px; }
.section-title small { color: var(--red); letter-spacing: 6px; font-weight: 700; }
.section-title h2 { margin: 6px 0; color: var(--red-dark); font-size: clamp(27px, 4vw, 40px); letter-spacing: 6px; }
.section-title h2::after { content: ""; display: block; width: 90px; height: 3px; margin: 14px auto; background: linear-gradient(90deg, transparent, var(--red), transparent); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quick-grid { grid-template-columns: repeat(5, 1fr); }
.card {
  position: relative;
  padding: 26px;
  background: rgba(248,239,217,.86);
  border: 1px solid rgba(124,68,43,.26);
  box-shadow: 0 8px 18px rgba(67,31,22,.1);
  transition: .3s ease;
}
.card::after { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(154,100,56,.2); pointer-events: none; }
.card:hover { transform: translateY(-8px); border-color: var(--gold); box-shadow: var(--shadow); background: #fff6df; }
.card h3 { color: var(--red); margin: 7px 0; font-size: 22px; letter-spacing: 2px; }
.card .num { color: var(--gold); font-size: 32px; font-weight: 700; }
.card p { margin-bottom: 0; color: #6a5043; }

.feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: 45px; align-items: center; }
.placeholder-art {
  min-height: 340px;
  display: grid;
  place-items: center;
  color: #f3dcaa;
  text-align: center;
  letter-spacing: 4px;
  border: 9px solid #f4e5c4;
  outline: 1px solid #9f6c46;
  background:
    radial-gradient(circle at 50% 45%, transparent 0 65px, rgba(237,201,131,.65) 66px 68px, transparent 69px),
    linear-gradient(145deg, rgba(67,15,14,.25), transparent),
    #7d2922;
  box-shadow: var(--shadow);
}
.feature-copy h2 { color: var(--red-dark); font-size: 38px; margin: 0 0 16px; }
.tag { display: inline-block; margin: 4px; padding: 2px 11px; color: var(--red); border: 1px solid var(--gold); border-radius: 99px; font-size: 13px; }
.paper-band { background: rgba(103,47,33,.08); border-top: 1px solid rgba(130,78,49,.2); border-bottom: 1px solid rgba(130,78,49,.2); }

.media-box {
  position: relative;
  min-height: 380px;
  display: grid;
  place-items: center;
  color: #f3dfb5;
  border: 8px solid #5d1b18;
  background: linear-gradient(140deg, #2a1714, #70231e);
  box-shadow: var(--shadow);
}
.media-box .play-mark { width: 82px; height: 82px; display: grid; place-items: center; border: 2px solid #e5bd70; border-radius: 50%; font-size: 30px; }
.media-box p { position: absolute; bottom: 16px; }
.video-player { width: 100%; min-height: 380px; background: transparent; }
.video-note { position: absolute; inset: 45% 10% auto; text-align: center; pointer-events: none; }

.timeline { position: relative; max-width: 900px; margin: auto; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--gold); }
.timeline-item { width: 48%; margin-bottom: 28px; }
.timeline-item:nth-child(even) { margin-left: 52%; }
.timeline-item strong { color: var(--red); font-size: 22px; }

.mask-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.mask-card { cursor: pointer; padding: 13px; }
.mask-visual {
  min-height: 250px;
  display: grid;
  place-items: center;
  color: #ffe4a4;
  font-size: 65px;
  border: 3px double var(--gold);
  background: radial-gradient(circle, #c69b53 0 8%, #efe0b8 9% 25%, #8e2821 26% 45%, #401315 46%);
  transition: .3s ease;
}
.mask-card:hover .mask-visual { transform: scale(1.035); filter: saturate(1.2); }
.mask-card.clicked { animation: cardTap .28s ease; }
@keyframes cardTap { 50% { transform: scale(.96); } }
.mask-tooltip {
  position: fixed;
  z-index: 100;
  width: min(330px, calc(100vw - 28px));
  padding: 17px 20px;
  color: #f9e9c5;
  background: rgba(74,17,15,.97);
  border: 1px solid var(--gold);
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s, transform .18s;
}
.mask-tooltip.show { opacity: 1; transform: translateY(0); }
.mask-tooltip strong { display: block; color: #e6bf73; font-size: 20px; }

.formation { min-height: 180px; text-align: center; }
.dot-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 28px 0 8px; }
.dot { width: 33px; height: 33px; border: 7px solid #e3ba6e; border-radius: 50%; background: var(--red); box-shadow: 0 3px 8px rgba(0,0,0,.2); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-item { min-height: 230px; overflow: hidden; padding: 0; display: grid; place-items: end start; background: linear-gradient(145deg, #6e211d, #c19255); }
.gallery-item span { z-index: 1; width: 100%; padding: 15px; color: #fae7bd; background: rgba(63,16,14,.75); }
.stat { text-align: center; }
.stat b { display: block; color: var(--red); font-size: 44px; line-height: 1.2; }

.music-control {
  position: fixed;
  right: 88px;
  bottom: 22px;
  z-index: 90;
  width: 54px;
  height: 54px;
  color: #f5d99d;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--red-dark);
  box-shadow: 0 8px 20px rgba(57,15,13,.3);
  cursor: pointer;
  transition: .25s ease;
}
.music-control:hover { transform: translateY(-4px) rotate(8deg); background: var(--red); }
.music-control.playing { animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(141,36,31,.15); } }

.site-footer { color: #e7cea0; background: #481513; border-top: 4px solid var(--gold); }
.footer-inner { max-width: 1180px; margin: auto; padding: 35px 22px; display: flex; justify-content: space-between; gap: 25px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a:hover { color: #fff; }

.reveal { opacity: 0; transform: translateY(25px); transition: .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* 英歌舞问答助手 */
.yingge-ai { position: fixed; right: 20px; bottom: 22px; z-index: 120; font-family: "Noto Serif SC", "STSong", "SimSun", serif; }
.yingge-ai-toggle {
  width: 60px;
  height: 60px;
  padding: 7px;
  color: #f8e7bd;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: linear-gradient(145deg, #a13228, #551613);
  box-shadow: 0 9px 24px rgba(57,15,13,.35);
  cursor: pointer;
  transition: .25s ease;
}
.yingge-ai-toggle span { display: block; font-weight: 700; line-height: 1.2; }
.yingge-ai-toggle:hover { transform: translateY(-5px); filter: brightness(1.12); }
.yingge-ai-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(390px, calc(100vw - 28px));
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transform-origin: bottom right;
  border: 1px solid var(--gold);
  background: #f6ead0;
  box-shadow: 0 18px 45px rgba(50,16,13,.32);
  transition: .24s ease;
}
.yingge-ai-panel.open { visibility: visible; opacity: 1; transform: none; }
.yingge-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: #f8e7bd;
  background: linear-gradient(135deg, #731d19, #481513);
  border-bottom: 2px solid var(--gold);
}
.yingge-ai-header strong, .yingge-ai-header small { display: block; }
.yingge-ai-header small { color: #d9b976; font-size: 11px; letter-spacing: 2px; }
.yingge-ai-header button { color: #f5ddb0; border: 0; background: transparent; cursor: pointer; }
#yinggeAiClose { margin-left: 7px; font-size: 22px; }
.yingge-ai-messages { height: 310px; padding: 16px; overflow-y: auto; background: radial-gradient(circle at 15% 10%, rgba(141,36,31,.06), transparent 45%), #f6ead0; }
.yingge-ai-message { width: fit-content; max-width: 86%; margin-bottom: 12px; padding: 9px 12px; border-radius: 4px; line-height: 1.65; font-size: 14px; box-shadow: 0 3px 8px rgba(70,30,20,.09); }
.yingge-ai-message.assistant { color: #4c3027; border: 1px solid rgba(145,91,48,.22); background: #fff7e3; }
.yingge-ai-message.user { margin-left: auto; color: #fff0cf; background: #86251f; }
.yingge-ai-suggestions { display: flex; gap: 6px; padding: 0 12px 10px; overflow-x: auto; }
.yingge-ai-suggestions button { flex: 0 0 auto; padding: 5px 9px; color: var(--red); border: 1px solid #c69b53; border-radius: 99px; background: transparent; cursor: pointer; font-size: 12px; }
.yingge-ai-suggestions button:hover { color: #fff4d5; background: var(--red); }
.yingge-ai-form { display: grid; grid-template-columns: 1fr auto; gap: 7px; padding: 11px; border-top: 1px solid rgba(126,75,42,.24); background: #ead9b5; }
.yingge-ai-form input { min-width: 0; padding: 10px; color: var(--ink); border: 1px solid #bd9251; outline: none; background: #fff8e8; }
.yingge-ai-form input:focus { border-color: var(--red); box-shadow: 0 0 0 2px rgba(141,36,31,.12); }
.yingge-ai-form button { padding: 8px 15px; color: #f7e5bb; border: 1px solid var(--gold); background: var(--red-dark); cursor: pointer; }
.yingge-ai-form button:hover { background: var(--red); }

@media (max-width: 980px) {
  .nav-wrap { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
  .main-nav { gap: 2px; }
  .main-nav a { padding: 6px 8px; font-size: 13px; }
  .quick-grid, .mask-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .nav-wrap, .footer-inner { flex-direction: column; align-items: center; }
  .main-nav { justify-content: center; }
  .hero { min-height: 460px; }
  .grid, .quick-grid, .mask-grid, .gallery-grid, .feature { grid-template-columns: 1fr; }
  .section { padding: 55px 16px; }
  .timeline::before { left: 10px; }
  .timeline-item, .timeline-item:nth-child(even) { width: auto; margin-left: 28px; }
  .yingge-ai { right: 12px; bottom: 12px; }
  .music-control { right: 80px; bottom: 15px; }
  .yingge-ai-messages { height: 280px; }
}
