/* 臺東青年志工中心 入口頁 — 遊戲介面風
   首屏是 3D 小島（assets/world.js），上面疊一層 HUD；往下是同一批入口的清單版。
   主色只有一個螢光綠 --neon，想換色改這裡。 */

:root {
  --bg: #070b12;
  --bg-2: #0c121c;
  --panel: rgba(9, 14, 23, .74);
  --line: rgba(255, 255, 255, .13);
  --line-2: rgba(255, 255, 255, .07);
  --text: #eef3f8;
  --sub: #a7b6c8;
  --dim: #6f7f93;
  --neon: #2ee67a;
  --neon-ink: #04140a;
  --warm: #ffb86b;

  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --en: "Chakra Petch", "Noto Sans TC", sans-serif;

  --pad: clamp(16px, 4vw, 48px);
  --cut: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--sans); font-size: 1rem; line-height: 1.75;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h2, h3, strong { text-wrap: balance; }
.en { font-family: var(--en); letter-spacing: .04em; }
.nb { display: inline-block; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--pad); }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; }
.skip { position: absolute; left: var(--pad); top: -5rem; z-index: 50; background: var(--neon); color: var(--neon-ink); padding: .5rem 1rem; font-weight: 700; }
.skip:focus { top: .5rem; }

/* 切角面板：遊戲介面的那種斜角 */
.cut { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut))); }

/* =====================================================
   首屏 3D
   ===================================================== */
.world {
  position: relative; height: 100vh; height: 100svh; min-height: 560px; max-height: 1100px;
  overflow: hidden;
  /* 3D 還沒起來、或開不了的時候看到的底：跟場景霧色同一組顏色 */
  background: radial-gradient(120% 90% at 50% 0%, #f6b48c 0%, #d98f86 28%, #2f7f8f 62%, #12414f 100%);
  user-select: none; -webkit-user-select: none;
}
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; opacity: 0; transition: opacity 1.2s; }
.world.is-ready #world { opacity: 1; }
.world.is-drag #world { cursor: grabbing; }
.world.no-webgl #world, .world.no-webgl .pins, .world.no-webgl .pager, .world.no-webgl .intro-p { display: none; }

.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 11, 18, .62) 0%, rgba(7, 11, 18, 0) 22%),
    linear-gradient(0deg, rgba(7, 11, 18, .86) 0%, rgba(7, 11, 18, 0) 46%);
}

/* 關卡標籤 */
.pins { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pin {
  position: absolute; left: 0; top: 0; pointer-events: auto; visibility: hidden;
  display: flex; align-items: center; gap: .45rem;
  padding: .22rem .6rem .22rem .26rem;
  background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: .8rem; font-weight: 700; line-height: 1.3; white-space: nowrap;
  border-radius: 999px;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
  will-change: transform;
}
.pin b {
  display: grid; place-items: center; min-width: 1.75rem; height: 1.75rem; padding-inline: .2rem;
  font-family: var(--en); font-size: .78rem; border-radius: 999px;
  background: var(--neon); color: var(--neon-ink);
}
.pin::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 12px; background: linear-gradient(var(--neon), transparent); }
.pin.is-hover, .pin:hover { border-color: var(--neon); }
.pin.is-on { background: var(--neon); border-color: var(--neon); color: var(--neon-ink); box-shadow: 0 0 0 4px rgba(46, 230, 122, .22), 0 0 30px rgba(46, 230, 122, .55); }
.pin.is-on b { background: var(--neon-ink); color: var(--neon); }
@media (max-width: 760px) {
  .pin { padding: .16rem; }
  .pin span { display: none; }
  .pin.is-on { padding: .2rem .65rem .2rem .2rem; }
  .pin.is-on span { display: inline; }
}

/* HUD */
.hud { position: absolute; inset: 0; pointer-events: none; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; padding: clamp(14px, 2.4vw, 28px) var(--pad) clamp(52px, 8vh, 72px); }
.hud > * { pointer-events: auto; }
.hud-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.brand h1 { font-size: clamp(1.15rem, 3.6vw, 1.6rem); font-weight: 900; letter-spacing: .06em; line-height: 1.3; text-shadow: 0 2px 18px rgba(7, 11, 18, .6); }
.brand .en { font-size: clamp(.56rem, 1.7vw, .7rem); letter-spacing: .26em; text-transform: uppercase; color: var(--neon); font-weight: 600; margin-top: .15rem; }
.hud-nav { display: flex; gap: .5rem; flex: none; }
.chip {
  display: inline-flex; align-items: center; height: 2.3rem; padding-inline: .95rem;
  font-size: .86rem; font-weight: 700; font-family: var(--en); white-space: nowrap;
  background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background .2s, color .2s;
}
.chip:hover { background: var(--text); color: var(--bg); }
.chip-neon { background: var(--neon); color: var(--neon-ink); border-color: var(--neon); }

.live {
  justify-self: start; margin-top: .9rem; max-width: 100%;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .42rem .85rem; font-size: .84rem; font-weight: 500;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--neon);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .2s, background .2s;
}
.live:hover { border-color: var(--neon); background: rgba(9, 14, 23, .92); }
.live-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--neon); box-shadow: 0 0 0 0 rgba(46, 230, 122, .7); animation: ping 1.8s infinite; flex: none; }
.live-k { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--neon); font-weight: 700; flex: none; }
.live-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .live-k { display: none; } }

.hud-bottom { align-self: end; display: grid; gap: .8rem; width: min(100%, 430px); }
.intro-k { font-size: .7rem; letter-spacing: .34em; text-transform: uppercase; color: var(--neon); font-weight: 700; }
.display { font-size: clamp(2.2rem, 9.6vw, 4.2rem); font-weight: 900; line-height: 1.16; letter-spacing: .02em; margin-top: .35rem; text-shadow: 0 4px 30px rgba(7, 11, 18, .55); }
.intro-p { margin-top: .7rem; font-size: .92rem; color: #d5dee9; line-height: 1.7; text-shadow: 0 1px 10px rgba(7, 11, 18, .8); }
@media (hover: none) { .only-fine { display: none; } }

.card {
  position: relative; padding: 1.15rem 1.25rem 1.25rem;
  background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--neon);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}
.card.pop { animation: pop .42s var(--ease) both; }
.card-close { position: absolute; right: .35rem; top: .2rem; width: 2.4rem; height: 2.4rem; font-size: 1.5rem; line-height: 1; color: var(--sub); }
.card-close:hover { color: var(--text); }
.card-meta { display: flex; align-items: center; gap: .6rem; font-size: .78rem; font-weight: 700; color: var(--sub); letter-spacing: .12em; }
.card-meta b { font-size: .86rem; color: var(--neon-ink); background: var(--neon); padding: 0 .5rem; letter-spacing: .06em; }
.card h2 { font-size: clamp(1.45rem, 5.4vw, 1.9rem); font-weight: 900; line-height: 1.3; margin-top: .5rem; padding-right: 1.6rem; }
.card-desc { margin-top: .4rem; font-size: .95rem; color: #d5dee9; line-height: 1.7; }
.card-host { margin-top: .5rem; font-size: .76rem; color: var(--dim); word-break: break-all; }
.go {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: .95rem; padding: .8rem 1.1rem;
  background: var(--neon); color: var(--neon-ink); font-weight: 900; font-size: 1.05rem; letter-spacing: .1em;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background .2s, transform .2s var(--ease);
}
.go span { transition: transform .25s var(--ease); }
.go:hover { background: #fff; }
.go:hover span { transform: translateX(6px); }

.pager { display: flex; align-items: center; gap: .6rem; }
.pager button {
  display: inline-flex; align-items: center; gap: .5rem; height: 2.7rem; padding-inline: 1rem;
  font-weight: 700; font-size: .9rem;
  background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .2s, color .2s, border-color .2s;
}
.pager button:hover { background: var(--neon); color: var(--neon-ink); border-color: var(--neon); }
.pager #next { background: var(--text); color: var(--bg); border-color: var(--text); }
.pager #next:hover { background: var(--neon); border-color: var(--neon); }
.pager #counter { margin-left: auto; font-size: .82rem; font-weight: 600; color: var(--sub); letter-spacing: .14em; text-shadow: 0 1px 8px rgba(7, 11, 18, .9); }

.loading { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); font-size: .8rem; font-weight: 700; letter-spacing: .4em; text-transform: uppercase; display: none; text-align: center; }
.loading i { display: block; width: 140px; height: 3px; margin: .7rem auto 0; background: rgba(255, 255, 255, .25); position: relative; overflow: hidden; }
.loading i::after { content: ""; position: absolute; inset: 0; background: var(--neon); transform: translateX(-100%); animation: load 1.1s infinite; }
.world.is-loading .loading { display: block; }

.scroll-hint {
  position: absolute; left: 50%; bottom: .9rem; transform: translateX(-50%);
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; color: var(--sub);
  padding: .3rem .8rem; white-space: nowrap;
}
.scroll-hint span { display: inline-block; animation: bob 1.6s infinite; }
.scroll-hint:hover { color: var(--neon); }

@media (min-width: 900px) {
  .hud-bottom { width: 440px; gap: 1rem; }
  .display { font-size: clamp(3.2rem, 5.2vw, 4.8rem); }
}

/* =====================================================
   跑馬燈
   ===================================================== */
.marquee { background: var(--neon); color: var(--neon-ink); overflow: hidden; font-weight: 900; font-size: .86rem; letter-spacing: .14em; }
.marquee-track { display: flex; width: max-content; animation: slide 46s linear infinite; }
.marquee span { padding-block: .5rem; white-space: nowrap; }
.marquee i { font-style: normal; font-family: var(--en); opacity: .5; margin-inline: .5em; }

/* =====================================================
   清單區
   ===================================================== */
.sec { padding-block: clamp(3rem, 8vw, 6rem); position: relative; }
.sec + .sec { border-top: 1px solid var(--line-2); }
.events { background:
  radial-gradient(60% 120% at 100% 0%, rgba(46, 230, 122, .1), transparent 60%), var(--bg-2); }
.index { background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 56px 56px; background-position: center top; }

.sec-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .3rem 1.5rem; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.tag { grid-column: 1 / -1; justify-self: start; font-size: .68rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--neon); }
.tag::before { content: "// "; opacity: .6; }
.sec-head h2 { font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 900; line-height: 1.2; letter-spacing: .02em; }
.sec-more { font-size: .88rem; font-weight: 700; color: var(--neon); white-space: nowrap; padding-bottom: .5rem; }
.sec-more span { display: inline-block; transition: transform .25s var(--ease); }
.sec-more:hover span { transform: translateX(5px); }

/* 活動卡 */
.event-list { display: grid; gap: 1rem; }
@media (min-width: 900px) { .event-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem; } }
.event {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.2rem; height: 100%;
  padding: 1.3rem; background: rgba(255, 255, 255, .035); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: background .25s, border-color .25s, transform .25s var(--ease);
}
.event-date { display: grid; align-content: start; gap: .1rem; padding-right: 1.2rem; border-right: 1px solid var(--line); font-family: var(--en); }
.event-date .d { font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--neon); }
.event-date .w { font-family: var(--sans); font-weight: 700; font-size: .95rem; }
.event-date .t { font-size: .76rem; color: var(--sub); white-space: nowrap; }
.event-main { display: grid; align-content: start; gap: .3rem; min-width: 0; }
.event-tag { justify-self: start; font-size: .7rem; font-weight: 700; letter-spacing: .12em; color: var(--neon-ink); background: var(--neon); padding: 0 .5rem; }
.event-main strong { font-size: 1.28rem; font-weight: 900; line-height: 1.4; }
.event-note { font-size: .95rem; color: #d5dee9; }
.event-place { font-size: .84rem; color: var(--dim); line-height: 1.55; }
.event-go { grid-column: 1 / -1; justify-self: end; font-weight: 900; font-size: .95rem; color: var(--neon); letter-spacing: .1em; }
.event-go span { display: inline-block; transition: transform .25s var(--ease); }
.event:hover { background: rgba(46, 230, 122, .09); border-color: var(--neon); transform: translateY(-3px); }
.event:hover .event-go span { transform: translateX(5px); }

/* 入口群組 */
.group { margin-top: clamp(2.2rem, 5vw, 3.4rem); }
.group-head { display: flex; align-items: center; gap: .8rem; }
.box { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; font-weight: 700; font-size: 1rem; background: var(--neon); color: var(--neon-ink); clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px)); }
.group-head h3 { font-size: clamp(1.2rem, 4.4vw, 1.55rem); font-weight: 900; line-height: 1.4; }
.group-head::after { content: ""; flex: 1; height: 1px; background: var(--line); min-width: 1rem; }
.group-note { margin-top: .5rem; color: var(--sub); font-size: .92rem; }
.group-note b { color: var(--neon); font-weight: 700; font-size: 1.05em; }

.rows { margin-top: 1rem; display: grid; gap: .6rem; }
.row {
  position: relative;
  display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) 1.4rem; column-gap: .6rem; align-items: start;
  padding: 1rem 1rem 1rem .9rem;
  background: rgba(12, 18, 28, .82); border: 1px solid var(--line); border-left: 3px solid var(--line);
  transition: background .25s, border-color .25s, transform .25s var(--ease);
}
.row .no { font-size: .86rem; font-weight: 700; color: var(--neon); padding-top: .3rem; }
.row strong { grid-column: 2; font-size: 1.18rem; font-weight: 900; line-height: 1.5; }
.row .desc { grid-column: 2; font-size: .92rem; color: var(--sub); line-height: 1.65; margin-top: .15rem; }
.row .to { grid-column: 2; margin-top: .45rem; font-size: .72rem; color: var(--dim); word-break: break-all; }
.row .arrow { grid-column: 3; grid-row: 1; justify-self: end; padding-top: .1rem; font-size: 1.15rem; color: var(--dim); transition: transform .25s var(--ease), color .25s; }
.row:hover, .row:focus-visible { background: rgba(46, 230, 122, .1); border-color: var(--neon); transform: translateX(4px); }
.row:hover .arrow, .row:focus-visible .arrow { transform: translateX(4px); color: var(--neon); }
@media (min-width: 900px) {
  .row { grid-template-columns: 3rem minmax(13rem, 19rem) minmax(0, 1fr) auto 1.6rem; column-gap: 1.2rem; align-items: baseline; padding: 1.15rem 1.3rem 1.15rem 1.2rem; }
  .row .no { padding-top: 0; }
  .row strong { grid-column: 2; font-size: 1.25rem; }
  .row .desc { grid-column: 3; margin-top: 0; }
  .row .to { grid-column: 4; grid-row: 1; margin-top: 0; max-width: 15rem; text-align: right; }
  .row .arrow { grid-column: 5; padding-top: 0; }
}

/* 我們是誰 */
.about-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.about-text p { font-size: 1.05rem; color: #d5dee9; max-width: 34em; }
.about-text p + p { margin-top: .9rem; }
.about-nums { display: flex; flex-wrap: wrap; gap: 1.4rem 2.6rem; margin-top: 2rem; }
.about-nums div { display: flex; align-items: center; gap: .8rem; }
.about-nums dt { font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--neon); letter-spacing: 0; }
.about-nums dd { font-size: .84rem; line-height: 1.5; color: var(--sub); }
.three { display: grid; gap: .6rem; }
.three li { display: grid; grid-template-columns: 2.6rem 1fr; padding: 1rem 1.1rem; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.three .no { grid-row: span 2; font-size: .92rem; font-weight: 700; color: var(--neon); padding-top: .25rem; }
.three strong { font-size: 1.18rem; font-weight: 900; line-height: 1.5; }
.three .desc { font-size: .92rem; color: var(--sub); }
@media (min-width: 900px) { .about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; } }

/* 找我們 */
.line-cta {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem 1.3rem;
  padding: 1.4rem clamp(1.1rem, 3vw, 2rem);
  background: var(--neon); color: var(--neon-ink);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  transition: background .25s;
}
.line-cta-k { font-size: .8rem; font-weight: 700; letter-spacing: .14em; border: 2px solid currentColor; padding: .05rem .5rem; }
.line-cta-main strong { display: block; font-size: clamp(1.3rem, 4.8vw, 1.9rem); font-weight: 900; line-height: 1.35; }
.line-cta-main .en { font-size: .84rem; font-weight: 600; opacity: .8; }
.line-cta .arrow { font-size: 1.6rem; transition: transform .3s var(--ease); }
.line-cta:hover { background: #fff; }
.line-cta:hover .arrow { transform: translateX(8px); }

.contact-grid { display: grid; grid-template-columns: 1fr; gap: .6rem; margin-top: .8rem; }
.contact-grid a { display: grid; gap: .1rem; padding: 1rem 1.1rem; height: 100%; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); transition: background .25s, border-color .25s; }
.contact-grid .k { font-size: .74rem; letter-spacing: .16em; color: var(--dim); font-weight: 700; }
.contact-grid .v { font-weight: 900; font-size: 1.2rem; line-height: 1.5; }
.contact-grid .v.en { font-weight: 700; font-size: 1.35rem; }
.contact-grid .v.v-sm { font-size: 1rem; font-weight: 600; word-break: break-all; }
.contact-grid .n { font-size: .82rem; color: var(--sub); }
.contact-grid a:hover { background: rgba(46, 230, 122, .1); border-color: var(--neon); }
@media (min-width: 700px) {
  .contact-grid { grid-template-columns: repeat(6, 1fr); }
  .contact-grid li { grid-column: span 2; }
  .contact-grid li:nth-child(n+4) { grid-column: span 3; }
}

/* 頁尾 */
.foot { border-top: 1px solid var(--line); padding-block: 2rem 2.6rem; font-size: .82rem; color: var(--sub); background: #05080d; }
.foot-in { display: grid; gap: 1.4rem; align-items: center; }
.foot-text p { line-height: 1.9; }
/* 青年署 logo 是深色字，放在白底牌子上才看得清楚 */
.foot-yda { justify-self: start; background: #fff; padding: .7rem 1rem; }
.foot-yda img { width: 210px; }
@media (min-width: 900px) { .foot-in { grid-template-columns: 1fr auto; gap: 2.5rem; } .foot-yda { justify-self: end; } }

/* =====================================================
   動態
   ===================================================== */
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 9px rgba(46, 230, 122, 0); } }
@keyframes load { to { transform: translateX(100%); } }
@keyframes bob { 50% { transform: translateY(4px); } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes pop { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.rv { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease), background .25s, border-color .25s; }
.rv.in { opacity: 1; transform: none; }
.row.rv.in:hover { transform: translateX(4px); }
.event.rv.in:hover { transform: translateY(-3px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
