/* Full-screen intro -> three campus windows. Campus-green accent; native dialog top layer. */
:root {
  color-scheme: light;
  --background: #fcfcf6;
  --foreground: #263b2b;
  --muted: #657460;
  --accent: #679a35;
  --accent-ink: #507d27;
  --track: #e3e9d8;
  --surface: #fffef9;
  --line: #e1e7d8;
  --wheel-period: 180s;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --background:#141d16; --foreground:#eaf0e2; --muted:#b4c1a9; --track:#35432e; --surface:#1c281f; --line:#37442f; --accent:#a0bf73; --accent-ink:#bbd695; }
}
:root[data-theme="dark"] { color-scheme:dark; --background:#141d16; --foreground:#eaf0e2; --muted:#b4c1a9; --track:#35432e; --surface:#1c281f; --line:#37442f; --accent:#a0bf73; --accent-ink:#bbd695; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100dvh; overflow: hidden; background: var(--background); color: var(--foreground); }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
[hidden] { display: none !important; }
html:not(.js) .js-only { display: none; }
html:not(.js) .intro { display: none; }
.icon { width: 18px; height: 18px; fill: currentColor; }
.intro { position: fixed; inset: 0; display: grid; place-items: center; padding: 32px 20px 58px; transition: opacity .65s ease, transform .8s ease; }
.intro-content { position:relative; display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: -12px; }
.intro-campus-wash { position:absolute; inset:auto 0 0; height:33dvh; display:grid; grid-template-columns:1fr 1fr; opacity:.09; pointer-events:none; mask-image:linear-gradient(to bottom,transparent,black 80%); }
.intro-campus-wash img { width:100%; height:100%; min-width:0; object-fit:cover; object-position:center 60%; filter:grayscale(.6); }
.badge-campus-background { position:absolute; inset:35% 14% 19%; overflow:hidden; opacity:.14; border-radius:50%; mask-image:linear-gradient(transparent,black 25%,black 80%,transparent); }
.badge-campus-background img { height:100%; width:100%; object-fit:cover; object-position:center 65%; filter:grayscale(1); }
.school-badge { position: relative; width: min(300px, 61vw, 42dvh); aspect-ratio: 1; margin-bottom: 32px; }
.school-badge > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.badge-ground { fill: #fffefa; }
.badge-border { fill: none; stroke: var(--accent); stroke-width: 3; }
.badge-inner-border { fill: none; stroke: var(--accent); stroke-width: 1; opacity: .48; }
.badge-character { position: absolute; inset: 17% 14%; display: grid; place-items: center; }
.badge-character img { position:absolute; inset:0; height:100%; width:100%; object-fit:contain; transform:scale(1.12); }
.badge-lettering text { fill: #5e8e31; font-weight: 700; }
.badge-english { font-family: Arial, sans-serif; font-size: 14px; letter-spacing: 1.8px; }
.badge-chinese { font-size: 16px; letter-spacing: 2px; }
.badge-progress { transform: rotate(-90deg); }
.badge-progress circle { fill: none; stroke-width: 1.35; stroke-linecap: round; }
.progress-track { stroke: var(--track); }
.progress-fill { stroke: var(--accent); stroke-dasharray: 1; stroke-dashoffset: 1; }
h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 650; letter-spacing: .16em; margin: 0 0 15px; padding-left: .16em; }
.school-motto { font-size: 13px; font-weight: 400; letter-spacing: .34em; margin: 0; padding-left: .34em; color: var(--muted); }
.school-heritage { margin:15px 0 -4px; display:flex; align-items:center; gap:10px; font-size:10px; letter-spacing:.07em; color:var(--muted); }
.school-heritage i { display:block; width:1px; height:9px; background:var(--line); }
.intro-status { font-size: 13px; letter-spacing: .05em; margin: 30px 0 0; min-height: 20px; }
.loading-dots i { display: inline-block; width: 3px; height: 3px; margin-left: 3px; background: currentColor; border-radius: 50%; vertical-align: 2px; }
.skip-intro { margin-top: 12px; padding: 8px 10px; font-size: 10px; letter-spacing: .04em; color: var(--muted); border: 0; background: none; border-radius: 99px; }
.skip-intro:hover { color: var(--foreground); }
body:not(.choosing) { cursor: pointer; }
.choosing .intro { opacity: 0; transform: scale(1.08); pointer-events: none; }
.campus-world { position: fixed; inset: 0; background: #171712; overflow: hidden; }
.js .campus-world { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .8s ease .12s, visibility 0s .9s; }
.js .choosing .campus-world { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .8s ease .12s; }
.campus-wheel { position: absolute; inset: 0; }
.campus-sector { position: absolute; inset: 0; color: #fffef8; text-decoration: none; cursor: pointer; }
.sector-school { clip-path: polygon(50% 50%, calc(50% - 129.9vmax) calc(50% - 75vmax),50% calc(50% - 150vmax),calc(50% + 129.9vmax) calc(50% - 75vmax)); }
.sector-ai { clip-path: polygon(50% 50%,calc(50% + 129.9vmax) calc(50% - 75vmax),calc(50% + 129.9vmax) calc(50% + 75vmax),50% calc(50% + 150vmax)); }
.sector-library { clip-path: polygon(50% 50%,50% calc(50% + 150vmax),calc(50% - 129.9vmax) calc(50% + 75vmax),calc(50% - 129.9vmax) calc(50% - 75vmax)); }
.sector-scene { position: absolute; inset: 0; }
.sector-scene img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transform: scale(1.025); transition: transform 1s cubic-bezier(.2,.7,.2,1), filter .6s; filter: saturate(.72); }
.sector-ai .sector-scene img { object-position: center 20%; }
.sector-library .sector-scene img { object-position: center top; }
.scene-shade { position: absolute; inset: 0; background: rgb(15 17 13 / .46); transition: background-color .5s; }
.campus-sector:hover .scene-shade, .campus-sector:focus-visible .scene-shade { background: rgb(15 17 13 / .22); }
.campus-sector:hover .sector-scene img, .campus-sector:focus-visible .sector-scene img { transform: scale(1.065); filter: saturate(.92); }
.sector-label { --distance: 28vmin; position: absolute; translate: -50% -50%; text-align: center; white-space: nowrap; padding: 19px 24px 17px; border-radius: 12px; background: rgb(22 23 17 / .5); backdrop-filter: blur(7px); border: 1px solid rgb(255 249 225 / .14); transition: color .3s, background-color .3s, border-color .3s; }
.sector-school .sector-label { left: 50%; top: calc(50% - var(--distance)); }
.sector-ai .sector-label { left: calc(50% + var(--distance) * .866); top: calc(50% + var(--distance) / 2); }
.sector-library .sector-label { left: calc(50% - var(--distance) * .866); top: calc(50% + var(--distance) / 2); }
.sector-label small { display: block; font-size: clamp(10px,1vw,12px); font-weight: 400; letter-spacing: .15em; opacity: .78; margin-bottom: 9px; }
.sector-label strong { display: block; font-size: clamp(23px,3.4vw,40px); line-height: 1.45; letter-spacing: .08em; font-weight: 600; }
.sector-ai .sector-label strong { font-size: clamp(20px,2.7vw,32px); }
.sector-url { display: block; font-size: 9px; font-weight: 400; letter-spacing: .05em; opacity: .75; margin-top: 11px; }
.sector-url > span { padding-left: 6px; }
.campus-sector:hover .sector-label, .campus-sector:focus-visible .sector-label, .campus-sector.picked .sector-label { background: #e1edce; color: #263b2b; border-color: #a5c580; }
.campus-sector:focus-visible { outline: none; }
.campus-sector:focus-visible .sector-label { outline: 2px solid #fff7db; outline-offset: 6px; }
.sector-ray { position: absolute; top: 50%; left: 50%; height: 2px; width: 150vmax; margin-top: -1px; background: var(--accent); transform-origin: 0 50%; transform: rotate(var(--angle)); pointer-events: none; }
.ray-one { --angle: -30deg; }
.ray-two { --angle: 90deg; }
.ray-three { --angle: 210deg; }
.campus-hub { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: clamp(66px,10vmin,94px); aspect-ratio: 1; border: 2px solid var(--accent); border-radius: 50%; background: #fdfef7; overflow: hidden; pointer-events: none; box-shadow: 0 3px 22px rgb(14 15 8 / .2); }
.campus-hub img { display: block; height: 92%; width: 92%; object-fit: contain; margin: 2% auto; }
.campus-hub span { position: absolute; left: 50%; bottom: 4px; translate: -50%; color: #527b2c; background: #fdfef7; border-radius: 99px; padding: 1px 6px; font: 600 9px Arial,sans-serif; letter-spacing: 1px; }
.world-heading { position: absolute; top: max(26px,env(safe-area-inset-top)); left: 30px; color: #fffdf3; pointer-events: none; opacity: .85; text-shadow: 0 1px 10px rgb(0 0 0 / .3); }
.world-heading > span { font-size: 12px; letter-spacing: .12em; }
.world-heading > small { display: block; font-size: 9px; letter-spacing: .18em; opacity: .65; margin-top: 7px; }
.world-hint { position: absolute; bottom: max(16px,env(safe-area-inset-bottom)); left: 50%; translate: -50%; margin: 0; color: rgb(255 252 232 / .66); font-size: 10px; letter-spacing: .14em; pointer-events: none; white-space: nowrap; }
.page-tools { position: fixed; inset: auto max(21px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(21px,env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.tools-left { display: flex; align-items: center; gap: 13px; }
.tools-right { display:flex; align-items:center; gap:16px; }
.culture-button { font-weight:600; }
.tool-button { pointer-events: auto; background: none; border: 0; padding: 8px 6px; border-radius: 99px; font-size: 10px; color: var(--muted); }
.tool-button:hover { color: var(--foreground); }
.sound-button[data-blocked="true"] { color: var(--accent-ink); }
.tool-button .icon { width: 15px; height: 15px; display: block; }
.replay-button, .motion-button { display: none; }
.choosing .replay-button, .choosing .motion-button { display: inline-block; }
.choosing .tool-button { color: rgb(255 250 226 / .72); }
.choosing .tool-button:hover { color: #fff9e9; }
.choosing .sound-button[data-blocked="true"] { color: #d9edb7; }
.leaving .campus-sector:not(.picked), .leaving .sector-ray, .leaving .campus-hub, .leaving .page-tools, .leaving .world-heading, .leaving .world-hint { opacity: 0; transition: opacity .35s; }
.leaving .campus-sector.picked .sector-scene img { transform: scale(1.1); filter: saturate(1); }
.leaving .campus-sector.picked .scene-shade { background: rgb(15 17 13 / .1); }
.campus-sector { transition: opacity .4s; }
.about-dialog { width: min(420px,calc(100vw - 36px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--foreground); }
.about-dialog::backdrop { background: rgb(16 16 11 / .45); backdrop-filter: blur(8px); }
.dialog-close { position: absolute; right: 15px; top: 15px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; }
.dialog-close:hover { background: var(--track); }
.about-year { font: 500 36px Arial,sans-serif; letter-spacing: -.04em; color: var(--accent-ink); }
.about-dialog h2 { margin: 14px 0 20px; font-size: 20px; font-weight: 600; letter-spacing: .03em; }
.about-dialog p { font-size: 12px; line-height: 1.95; color: var(--muted); }
.school-history { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 18px 0; margin: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.school-history strong { display: block; font: 500 23px Arial,sans-serif; }
.school-history span { display: block; margin-top: 7px; font-size: 10px; line-height: 1.8; color: var(--muted); }
.source-link { font-size: 10px; color: var(--muted); text-underline-offset: 4px; }
.photo-source { display:block; margin-top:10px; }
.about-dialog .privacy-note { font-size: 10px; margin: 20px 0; }
.about-confirm { display: block; padding: 10px 22px; background: var(--accent); color: #17280f; border: 0; border-radius: 99px; margin-left: auto; font-size: 12px; }
.culture-dialog { width:min(860px,calc(100vw - 36px)); max-height:calc(100dvh - 40px); overflow-y:auto; padding:34px; background:var(--surface); color:var(--foreground); border:1px solid var(--line); border-radius:20px; }
.culture-dialog::backdrop { background:rgb(16 26 16 / .52); backdrop-filter:blur(8px); }
.culture-header { padding-right:25px; margin-bottom:24px; }
.culture-header > p { margin:0 0 9px; font-size:10px; color:var(--accent-ink); letter-spacing:.12em; }
.culture-header h2 { margin:0 0 10px; font-size:28px; font-weight:600; letter-spacing:-.025em; }
.culture-header > span { color:var(--muted); font-size:11px; line-height:1.8; }
.culture-layout { display:grid; grid-template-columns:1.35fr 1fr; gap:30px; }
.culture-places { min-width:0; }
.place-tabs { display:flex; align-items:center; gap:17px; margin-bottom:16px; border-bottom:1px solid var(--line); }
.place-tabs button { padding:0 0 12px; margin-bottom:-1px; border:0; border-bottom:2px solid transparent; background:none; color:var(--muted); white-space:nowrap; font-size:11px; }
.place-tabs button[aria-selected="true"] { border-bottom-color:var(--accent); color:var(--foreground); font-weight:650; }
.culture-landmark { margin:0; }
.culture-landmark > img { display:block; width:100%; height:265px; object-fit:cover; object-position:center; border-radius:10px; background:var(--track); }
.culture-landmark figcaption { margin-top:14px; }
.culture-landmark figcaption strong { display:block; font-size:14px; font-weight:600; }
.culture-landmark figcaption span { display:block; color:var(--muted); font-size:10px; line-height:1.9; margin-top:6px; min-height:38px; }
.culture-story { padding-top:1px; }
.emblem-story { display:flex; align-items:center; gap:13px; }
.emblem-story > img { height:72px; width:72px; flex:0 0 auto; object-fit:contain; }
.emblem-story h3 { font-size:14px; font-weight:600; margin:0 0 7px; }
.emblem-story p { margin:0; font-size:10px; line-height:1.9; color:var(--muted); }
.culture-timeline { margin:23px 0; display:grid; gap:15px; }
.culture-timeline > div { display:grid; grid-template-columns:56px 1fr; align-items:center; gap:10px; }
.culture-timeline dt { font:500 24px Arial,sans-serif; color:var(--accent-ink); letter-spacing:-.05em; }
.culture-timeline dd { margin:0; color:var(--muted); font-size:10px; line-height:1.8; }
.culture-motto { margin:0; font-size:26px; line-height:1.6; letter-spacing:.08em; font-weight:500; }
.culture-note { color:var(--muted); font-size:10px; line-height:1.9; max-width:27em; }
.culture-footer { display:flex; align-items:center; justify-content:space-between; gap:18px; border-top:1px solid var(--line); padding-top:21px; margin-top:19px; }
.culture-footer p { color:var(--muted); font-size:9px; line-height:1.8; margin:0; }
.culture-footer button { flex:0 0 auto; border:1px solid var(--line); border-radius:99px; background:transparent; padding:10px 17px; font-size:11px; }
.culture-footer button:hover { border-color:var(--accent); }
.culture-footer button > span { padding-left:10px; }
@media (prefers-reduced-motion: no-preference) {
  .intro-content { animation: intro-in .8s cubic-bezier(.2,.7,.2,1) both; }
  .badge-lettering { animation: badge-orbit 100s linear infinite; }
  .loading-dots i { animation: loading-dot 1.3s ease-in-out infinite; }
  .loading-dots i:nth-child(2) { animation-delay: .18s; }
  .loading-dots i:nth-child(3) { animation-delay: .36s; }
  .choosing .campus-wheel { animation: wheel-orbit var(--wheel-period) linear infinite; }
  .choosing .sector-scene, .choosing .sector-label { animation: scene-counterorbit var(--wheel-period) linear infinite; }
  .wheel-paused .campus-wheel, .wheel-paused .sector-scene, .wheel-paused .sector-label, .about-open .campus-wheel, .about-open .sector-scene, .about-open .sector-label, .about-open .badge-lettering { animation-play-state: paused; }
  .about-dialog[open], .culture-dialog[open] { animation: dialog-in .25s ease both; }
}
@keyframes intro-in { from { opacity:0; transform:translateY(9px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes badge-orbit { to { rotate: 360deg; } }
@keyframes loading-dot { 0%,100% { opacity:.25; transform:translateY(0); } 45% { opacity:1; transform:translateY(-2px); } }
@keyframes wheel-orbit { to { rotate:360deg; } }
@keyframes scene-counterorbit { to { rotate:-360deg; } }
@keyframes dialog-in { from { opacity:0; transform:translateY(8px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
@media (max-width: 767px) {
  .intro { padding-bottom: 68px; }
  .school-badge { width: min(285px,65vw,39dvh); margin-bottom: 30px; }
  h1 { font-size: clamp(22px,6vw,29px); letter-spacing:.11em; padding-left:.11em; margin-bottom:16px; }
  .school-motto { font-size:11px; letter-spacing:.23em; padding-left:.23em; }
  .school-heritage { font-size:9px; gap:8px; margin-top:14px; }
  .intro-status { font-size:11px; margin-top:28px; }
  .skip-intro { font-size:10px; }
  .campus-wheel { display:grid; grid-template-rows:repeat(3,1fr); }
  .campus-sector { position:relative; clip-path:none; overflow:hidden; min-height:0; }
  .campus-sector + .campus-sector { border-top:1px solid rgb(160 191 115 / .7); }
  .sector-scene img { object-position: center 35%; }
  .sector-school .sector-scene img { object-position:center 58%; }
  .scene-shade, .campus-sector:hover .scene-shade, .campus-sector:focus-visible .scene-shade { background:linear-gradient(180deg,rgb(15 17 13 / .20),rgb(15 17 13 / .35) 35%,rgb(15 17 13 / .74)); }
  .sector-label { inset:auto auto 30px 25px !important; translate:none; background:none; border:0; padding:0; text-align:left; backdrop-filter:none; }
  .sector-label small { font-size:9px; letter-spacing:.14em; margin-bottom:7px; }
  .sector-label strong { font-size:27px; letter-spacing:.08em; }
  .sector-ai .sector-label strong { font-size:24px; line-height:1.3; }
  .sector-ai .sector-label br { display:none; }
  .sector-library .sector-label { bottom:60px !important; }
  .sector-url { font-size:8px; margin-top:8px; }
  .campus-sector:hover .sector-label, .campus-sector:focus-visible .sector-label { background:none; color:#fffdf1; }
  .campus-sector:focus-visible .sector-label { outline-offset:10px; }
  .sector-ray, .campus-hub { display:none; }
  .world-heading { left:auto; right:20px; top:20px; text-align:right; }
  .world-heading > span { font-size:9px; }
  .world-heading > small { font-size:7px; margin-top:5px; }
  .world-hint { display:none; }
  .page-tools { bottom:max(12px,env(safe-area-inset-bottom)); left:16px; right:16px; }
  .motion-button, .choosing .motion-button { display:none; }
  .tools-left { gap:12px; }
  .about-dialog { padding:30px 26px; }
  .about-dialog h2 { font-size:18px; }
  .intro-campus-wash { height:28dvh; opacity:.08; }
  .tools-right { gap:12px; }
  .culture-dialog { padding:28px 23px; }
  .culture-header { margin-bottom:22px; }
  .culture-header h2 { font-size:23px; }
  .culture-header > span { font-size:10px; }
  .culture-layout { grid-template-columns:1fr; gap:22px; }
  .place-tabs { justify-content:space-between; gap:10px; }
  .place-tabs button { font-size:10px; }
  .culture-landmark > img { height:210px; }
  .culture-story { display:grid; grid-template-columns:1fr 1fr; gap:13px 20px; }
  .emblem-story, .culture-timeline { grid-column:1 / -1; }
  .emblem-story > img { width:66px; height:66px; }
  .culture-timeline { margin:4px 0 6px; }
  .culture-motto { font-size:22px; }
  .culture-note { margin:5px 0; font-size:10px; }
  .culture-footer { gap:12px; align-items:flex-start; }
  .culture-footer p { max-width:17em; }
  .choosing .campus-wheel, .choosing .sector-scene, .choosing .sector-label { animation:none; }
}
@media (max-height: 520px) and (min-width:768px) {
  .school-badge { width:38dvh; margin-bottom:20px; }
  h1 { font-size:25px; margin-bottom:10px; }
  .school-motto { font-size:10px; }
  .school-heritage { margin-top:10px; font-size:8px; }
  .intro-status { margin-top:18px; font-size:10px; }
  .skip-intro { margin-top:4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation:none !important; transition:none !important; }
  .motion-button, .choosing .motion-button { display:none; }
}
@media (prefers-reduced-transparency: reduce) {
  .sector-label { background:#28271e; backdrop-filter:none; }
  .about-dialog::backdrop { backdrop-filter:none; background:rgb(16 16 11 / .7); }
}
