/* ==========================================================================
   中国奶蛙大学 · 石河子 —— 中间页样式
   配色取自石河子的三样东西：棉白（地膜棉田）、军垦红（兵团）、胡杨金（秋色），
   主强调色仍是奶蛙黄 #fece0e。
   注意：全站 CSP 关闭了内联样式与内联脚本，所有样式必须写在这里。
   ========================================================================== */

:root {
  --bg: #fdf7ea;
  --fg: #3b2a00;
  --muted: #8f7a45;
  --ink: #fece0e;          /* 奶蛙黄 */
  --red: #b8262c;          /* 军垦红 */
  --gold: #d98324;         /* 胡杨金 */
  --sky: #2f6f8f;          /* 天山蓝 */
  --track: rgba(254, 206, 14, .22);
  --card: #ffffff;
  --size: min(62vw, 32svh, 260px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14100a;
    --fg: #f7edd2;
    --muted: #a8996c;
    --track: rgba(254, 206, 14, .16);
    --card: #221c11;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 20px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  cursor: default;
  user-select: auto;
  -webkit-tap-highlight-color: transparent;
}
body.choosing, body.leaving { cursor: default; }

/* ---------- 背景：棉絮粒子 + 天山剪影 ---------- */
.fluff {
  position: fixed; inset: 0; z-index: 3;
  width: 100%; height: 100%;
  pointer-events: none;
}
.ridge {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 0;
  width: 100%; height: clamp(120px, 26vh, 260px);
  pointer-events: none;
  opacity: .5;
}
.ridge-back { fill: var(--sky); opacity: .28; }
.ridge-front { fill: var(--gold); opacity: .22; }
.ridge { opacity: .18; }
.choosing .core, .choosing .dots i, .choosing .caret { animation: none; }

/* ---------- 开场：圆盘 + 旋转文字环 + 进度圈 ---------- */
.intro {
  position: relative; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 30px;
  text-align: center;
  transition: opacity .45s ease-in, transform .45s ease-in;
}
.choosing .intro, .leaving .intro { display: none; }
html:not(.js) .intro { display: none; }

.badge { position: relative; width: var(--size); aspect-ratio: 1; }
.badge::before {
  content: ""; position: absolute; inset: 2%;
  border-radius: 50%; background: #fff;
  box-shadow: 0 12px 34px rgba(80, 50, 0, .18);
}
.badge img, .badge svg { position: absolute; }
.badge .ring, .badge .core { inset: 0; width: 100%; height: 100%; }
.core { object-fit: contain; padding: 17%; }

.ring { overflow: visible; }
.ring-text {
  fill: #3b2a00;
  font-size: 11.4px;
  font-weight: 700;
  letter-spacing: .16em;
}

.progress { inset: -5.5%; width: 111%; height: 111%; transform: rotate(-90deg); overflow: visible; }
.progress circle { fill: none; stroke-width: 1.2; stroke-linecap: round; }
.progress .track { stroke: var(--track); }
.progress .bar { stroke: var(--red); stroke-dasharray: 100; stroke-dashoffset: 100; }

.copy { display: flex; flex-direction: column; align-items: center; gap: 10px; }
h1 {
  font-size: clamp(26px, 7vw, 40px);
  font-weight: 800;
  letter-spacing: .12em;
  padding-left: .12em;
}
.school {
  font-size: clamp(12px, 3.4vw, 14px);
  letter-spacing: .28em;
  padding-left: .28em;
  color: var(--red);
  font-weight: 700;
}
.status { font-size: clamp(14px, 4vw, 17px); }
.hint { font-size: 13px; color: var(--muted); }

/* 校长致辞：逐字打出 + 光标闪烁（整活文案，一眼假） */
.speech {
  display: flex; align-items: baseline; gap: 8px;
  max-width: 30em; min-height: 2.9em;
  font-size: clamp(13px, 3.6vw, 15px); line-height: 1.6;
  color: var(--fg);
}
.speech-tag {
  flex: none; padding: 2px 8px; border-radius: 999px;
  background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
}
.speech-text { text-align: left; }
.caret { width: 1px; height: 1.05em; background: var(--red); animation: blink 1s steps(1) infinite; }

.dots i {
  display: inline-block; width: .3em; height: .3em; margin-left: .18em;
  border-radius: 50%; background: currentColor; vertical-align: middle;
  animation: dot 1s ease-in-out infinite;
}
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }

.sectors { position: relative; z-index: 4; width: min(1040px, 100%); margin: 30px auto; padding: 20px 0; }
.js .sectors { display: none; }
.choosing .sectors { display: block; }
.destination-heading { text-align: center; margin-bottom: 32px; }
.eyebrow { color: var(--red); font-size: 12px; letter-spacing: .16em; margin-bottom: 12px; }
.destination-heading h2 { font-size: clamp(28px, 6vw, 44px); letter-spacing: .05em; margin-bottom: 12px; }
.destination-heading > p:last-child { font-size: 14px; color: var(--muted); }
.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sector { display: flex; flex-direction: column; gap: 22px; padding: 30px 26px; border: 1px solid rgba(143,122,69,.24); border-radius: 22px; background: var(--card); color: var(--fg); text-decoration: none; box-shadow: 0 8px 30px rgba(80,50,0,.04); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, opacity .25s ease; }
.entry-number { font-size: 12px; letter-spacing: .12em; color: var(--red); }
.sector:nth-child(2) .entry-number { color: var(--sky); }
.sector:nth-child(3) .entry-number { color: var(--gold); }
.sector b { font-size: 26px; letter-spacing: .08em; }
.entry-description { flex: 1; font-size: 14px; line-height: 1.8; color: var(--muted); }
.entry-domain { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding-top: 20px; border-top: 1px solid rgba(143,122,69,.18); }
.entry-domain i { font-style: normal; font-size: 20px; }
.sector:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 18px 40px rgba(80,50,0,.1); }
.sector:focus-visible, button:focus-visible { outline: 3px solid var(--sky); outline-offset: 4px; }
.choosing .sector { animation: card-in .5s ease both; }
.choosing .sector:nth-child(2) { animation-delay: .08s; }
.choosing .sector:nth-child(3) { animation-delay: .16s; }
.leaving .sector:not(.picked) { opacity: .35; }
.leaving .sector.picked { border-color: var(--gold); }
.source-note { text-align: center; font-size: 11px; color: var(--muted); margin-top: 24px; line-height: 1.8; }
.topbar { position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(1040px, 100%); margin: 0 auto 30px; }
.crest { font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.crest-sub { font-size: 11px; color: var(--muted); border: 1px solid rgba(143,122,69,.3); border-radius: 999px; padding: 5px 10px; }
.foot { position: relative; z-index: 4; font-size: 11px; color: var(--muted); line-height: 1.9; text-align: center; width: 100%; margin-top: 28px; }
.corner { position: relative; z-index: 4; display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.ghost-btn { padding: 7px 16px; border: 1px solid rgba(143,122,69,.35); border-radius: 999px; background: var(--card); color: var(--fg); font: inherit; font-size: 12px; cursor: pointer; }
.ghost-btn:hover { background: var(--track); }
.core.is-missing { display: none; }
@keyframes card-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.about {
  width: min(380px, calc(100vw - 32px)); margin: auto;
  padding: 0; border: 0; border-radius: 16px;
  background: var(--card); color: var(--fg);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
  cursor: auto; user-select: text;
}
.about[open] { animation: rise .25s ease-out; }
.about::backdrop { background: rgba(20, 16, 5, .45); backdrop-filter: blur(3px); }
.about-body { padding: 24px 22px 18px; }
.about h2 { font-size: 18px; margin-bottom: 12px; }
.about p { font-size: 14px; line-height: 1.75; }
.about p + p { margin-top: 8px; }
.about .tip { color: var(--muted); }
.about form { margin-top: 18px; text-align: right; }
.about form button {
  padding: 8px 18px; border: 0; border-radius: 999px;
  background: var(--ink); color: #3b2a00;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}

/* ---------- 录取通知书（融合自 parody 官网派，彩蛋解锁） ---------- */
.letter {
  width: min(420px, calc(100vw - 32px)); margin: auto;
  padding: 0; border: 0; border-radius: 6px;
  background: #fffdf4; color: #4a2c00;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .35);
  cursor: auto; user-select: text;
}
.letter[open] { animation: rise .3s ease-out; }
.letter::backdrop { background: rgba(20, 16, 5, .55); backdrop-filter: blur(3px); }
.letter-card {
  position: relative; padding: 30px 26px 22px;
  border: 2px solid var(--red); margin: 8px;
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(184, 38, 44, .07) 27px 28px);
}
.letter-card::before {
  content: ""; position: absolute; inset: 4px;
  border: 1px solid rgba(184, 38, 44, .45); pointer-events: none;
}
.letter-no { font-size: 11px; letter-spacing: .18em; color: var(--red); }
.letter h2 { font-size: 24px; letter-spacing: .16em; margin: 6px 0 2px; text-align: center; }
.letter-sub { text-align: center; font-size: 12px; letter-spacing: .3em; color: var(--muted); margin-bottom: 18px; }
.letter-body { font-size: 14px; line-height: 2; text-align: justify; }
.letter-body b { color: var(--red); }
.seal {
  position: absolute; right: 22px; bottom: 84px;
  width: 92px; height: 92px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 3px solid rgba(184, 38, 44, .8); color: rgba(184, 38, 44, .85);
  font-size: 11px; line-height: 1.35; text-align: center; letter-spacing: .04em;
  transform: rotate(-14deg) scale(1); opacity: .92;
}
.letter[open] .seal { animation: stamp .5s cubic-bezier(.3, 1.6, .5, 1) .25s backwards; }
.letter form { margin-top: 16px; text-align: right; }
.letter form button {
  padding: 8px 18px; border: 0; border-radius: 999px;
  background: var(--red); color: #fff;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}

.toast {
  position: fixed; z-index: 7;  left: 50%; top: max(18px, env(safe-area-inset-top));
  translate: -50% 0;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(20, 16, 5, .82); color: #fff;
  font-size: 14px; letter-spacing: .06em;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: rise .3s ease-out;
}
.toast[hidden] { display: none; }

.nojs {
  position: fixed; inset: auto 16px 16px; z-index: 8;
  padding: 14px 16px; border-radius: 14px;
  background: var(--card); color: var(--fg);
  font-size: 14px; text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}
.nojs a { color: var(--red); font-weight: 700; }

/* ---------- 动画 ---------- */
.run .badge { animation: pop .7s cubic-bezier(.34, 1.56, .64, 1) backwards; }
.run .core  { animation: breathe 1.8s ease-in-out .7s infinite; }
.run .bar   { animation: fill var(--delay, 2600ms) linear forwards; }
.run .copy  { animation: rise .5s ease-out .15s backwards; }
.paused .bar { animation-play-state: paused; }

@keyframes pop { from { transform: scale(.55) rotate(-25deg); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(1.03); } }
@keyframes fill { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes hub { to { transform: translate(-50%, -50%) scale(1); } }
@keyframes dot { 0%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-.25em); } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes unspin { to { rotate: -360deg; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes stamp { from { transform: rotate(-40deg) scale(2.4); opacity: 0; } }

@media (max-width: 680px) {
.entry-grid { grid-template-columns: 1fr; gap: 12px; }
.sector { padding: 22px; gap: 12px; }
.sector b { font-size: 23px; }
.entry-domain { padding-top: 12px; }
.destination-heading { margin-bottom: 22px; }
.topbar { flex-wrap: wrap; margin-bottom: 24px; }
.speech { max-width: 100%; }
}
[hidden] { display: none !important; }
.tip { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 14px; }

.core-word { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; color: #3b2a00; font-size: 48px; font-weight: 800; line-height: 1.25; }
.core-word small { font-size: 18px; letter-spacing: .2em; }

:root { --bg: #fff7df; --fg: #302616; --muted: #796a50; --size: min(62vw, 35svh, 290px); }
body { padding: 28px clamp(20px,5vw,80px); background-image: radial-gradient(rgba(88,62,20,.12) .7px,transparent .7px); background-size: 12px 12px; }
.stage-word { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-8deg); font-size: clamp(100px,23vw,380px); font-weight: 950; letter-spacing: -.08em; color: rgba(169,110,20,.07); pointer-events: none; }
.transition-wave { position: fixed; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px; border-radius: 50%; background: var(--ink); z-index: 8; pointer-events: none; transform: scale(0); }
.choosing .transition-wave { animation: wave .85s cubic-bezier(.65,0,.25,1) both; }
.topbar, .sectors { max-width: 1240px; }
.badge::before { background: var(--ink); border: 2px solid #302616; box-shadow: 8px 10px 0 #302616; }
.badge::after { content: ''; position: absolute; inset: 20%; border: 1px dashed rgba(48,38,22,.3); border-radius: 50%; pointer-events: none; }
.badge { cursor: pointer; }
.core-word { font-size: clamp(40px,9vw,64px); font-weight: 950; transform: rotate(-8deg); }
h1 { font-size: clamp(28px,6vw,48px); letter-spacing: -.03em; }
.destination-heading h2 { font-size: clamp(36px,7vw,80px); font-weight: 950; letter-spacing: -.04em; }
.eyebrow { font-weight: 800; }
.entry-grid { gap: 24px; padding: 12px 8px 24px; }
.sector { --tilt: -3deg; --accent: #fece0e; position: relative; min-height: 310px; padding: 32px 26px 24px; background: var(--accent); color: #302616; border: 2px solid #302616; border-radius: 8px 40px 8px 8px; box-shadow: 8px 10px 0 #302616; transform: rotate(var(--tilt)); }
.sector:nth-child(2) { --tilt: 2deg; --accent: #c4e4e5; margin-top: 26px; }
.sector:nth-child(3) { --tilt: -2deg; --accent: #f3b78f; }
.sector::before { content: ''; position: absolute; width: 76px; height: 23px; top: -13px; left: calc(50% - 38px); background: rgba(255,253,234,.8); border-inline: 1px dashed rgba(48,38,22,.25); transform: rotate(-5deg); }
.sector::after { content: 'GO'; position: absolute; top: 38px; right: 22px; font-size: 40px; font-weight: 950; color: rgba(48,38,22,.12); transform: rotate(12deg); }
.sector b { font-size: clamp(25px,3.2vw,42px); font-weight: 950; letter-spacing: -.04em; margin-top: 12px; }
.entry-description { color: #51412c; font-size: 13px; }
.entry-number, .sector:nth-child(2) .entry-number, .sector:nth-child(3) .entry-number { color: #302616; font-size: 11px; font-weight: 800; }
.entry-domain { align-items: center; font-size: 11px; border-color: rgba(48,38,22,.3); }
.entry-domain i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #302616; color: var(--accent); font-size: 21px; transition: transform .25s; }
.sector:hover, .sector:focus-visible { transform: translateY(-12px) rotate(0); border-color: #302616; box-shadow: 12px 18px 0 #302616; }
.sector:hover .entry-domain i { transform: rotate(45deg); }
.choosing .sector { animation: ticket-in .65s cubic-bezier(.18,.9,.25,1.2) .35s backwards; }
.choosing .sector:nth-child(2) { animation-delay: .46s; }
.choosing .sector:nth-child(3) { animation-delay: .57s; }
.choosing .destination-heading { animation: rise .5s .25s backwards; }
.leaving .sector { animation: none; }
.leaving .sector:not(.picked) { opacity: .2; transform: translateY(20px) rotate(var(--tilt)); }
.leaving .sector.picked { transform: translateY(-12px) rotate(0) scale(1.05); }
.speech-tag, .caret { display: none; }
.run .badge { animation: stage-pop .85s cubic-bezier(.2,.8,.25,1.3) both; }
.run .core { animation: wobble 1.4s ease-in-out .8s infinite; }
.choosing .core { animation: none; }
@keyframes wave { 0% { transform: scale(0); opacity: 1; } 60% { transform: scale(80); opacity: 1; } 100% { transform: scale(80); opacity: 0; } }
@keyframes stage-pop { 0% { opacity: 0; transform: translateY(80px) scale(.3) rotate(-35deg); } 65% { opacity: 1; transform: translateY(-12px) scale(1.08) rotate(6deg); } 100% { transform: none; } }
@keyframes wobble { 50% { transform: rotate(5deg) scale(1.08); } }
@keyframes ticket-in { from { opacity: 0; transform: translateY(80px) scale(.75) rotate(calc(var(--tilt) * 4)); } to { opacity: 1; transform: rotate(var(--tilt)); } }
@media (max-width:700px) { body { padding: 22px 20px; } .entry-grid { grid-template-columns: 1fr; gap: 26px; } .sector { min-height: 210px; gap: 12px; padding: 24px; } .sector:nth-child(2) { margin-top: 0; } .sector b { margin-top: 0; font-size: 30px; } .sector::after { top: 20px; } .entry-domain { padding-top: 10px; } .stage-word { font-size: 36vw; } }
@media (prefers-color-scheme:dark) { :root { --bg: #201e19; --fg: #f9edcf; --muted: #c2b392; } .stage-word { color: rgba(254,206,14,.07); } }
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .transition-wave { display: none; } }

.mascot-core { object-fit: contain; padding: 16%; filter: drop-shadow(0 8px 3px rgba(100,62,0,.15)); }
.mascot-host { display: flex; align-items: center; justify-content: center; gap: 14px; margin: -12px auto 18px; }
.mascot-host img { width: 100px; height: 100px; object-fit: contain; transform: rotate(-8deg); }
.mascot-bubble { position: relative; background: var(--card); color: var(--fg); border: 2px solid var(--fg); border-radius: 20px 20px 20px 4px; padding: 12px 18px; font-size: 14px; font-weight: 800; transform: rotate(3deg); box-shadow: 3px 4px 0 var(--fg); }
.mascot-bubble small { display: block; font-size: 9px; font-weight: 400; opacity: .6; margin-top: 4px; }
.credits { font-size: 11px !important; color: var(--muted); }
.credits a { color: inherit; text-underline-offset: 3px; }
@media(max-width:700px) { .mascot-host img { width: 78px; height: 78px; } .mascot-bubble { font-size: 12px; padding: 10px 13px; } .destination-heading h2 { font-size: clamp(28px,6vw,48px); } }

:root { --bg: #f1efe6; --ink: #e9ce52; --fg: #292c22; --muted: #686c59; }
body { background-image: linear-gradient(rgba(70,78,45,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(70,78,45,.045) 1px,transparent 1px); background-size: 32px 32px; }
.stage-word { font-family: monospace; letter-spacing: -.1em; color: rgba(80,96,48,.07); }
.crest-sub { border-radius: 3px; font-family: monospace; }
.badge::before { background: #fff; box-shadow: 8px 10px 0 #31382b; }
.mascot-core { padding: 20%; object-fit: cover; border-radius: 50%; filter: none; }
.mascot-host img { width: 140px; height: 120px; object-fit: cover; object-position: center 30%; border: 2px solid #31382b; transform: rotate(-5deg); box-shadow: 5px 5px 0 #31382b; }
.mascot-bubble { border-radius: 2px; transform: rotate(2deg); font-family: monospace; }
.sector { --accent: #e9ce52; border-radius: 3px; }
.sector:nth-child(2) { --accent: #bac7a0; }
.sector:nth-child(3) { --accent: #d1cbbb; }
.sector::after { content: '?'; font-family: monospace; font-size: 64px; }
.entry-domain i { border-radius: 3px; }
.ghost-btn { border-radius: 3px; }
#pv { font-size: 16px; color: var(--fg); font-variant-numeric: tabular-nums; }
.run .core { animation: ponder 2.4s steps(2,end) .8s infinite; }
@keyframes ponder { 50% { transform: rotate(-4deg) translateY(-3px); } }
@media(max-width:700px) { .mascot-host img { width: 100px; height: 92px; } }
@media(prefers-color-scheme:dark) { :root { --bg: #20231c; --fg: #edeedb; --muted: #bbc0a6; } }
@media(prefers-reduced-motion:reduce) { .run .core { animation: none; } }

/* ---------- 诊断条：JS 未执行时才可见；样式加载正常时做成醒目红条 ---------- */
.boot-probe { position: fixed; top: 0; left: 0; right: 0; z-index: 10000; background: #b8262c; color: #fff; padding: 10px 12px; font: 13px/1.5 monospace; text-align: center; }
